@mxtommy/kip 3.3.0-beta.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/.github/instructions/angular.instructions.md +19 -0
  2. package/CHANGELOG.md +19 -0
  3. package/COPILOT.md +257 -0
  4. package/README.md +19 -0
  5. package/package.json +19 -19
  6. package/public/3rdpartylicenses.txt +26 -26
  7. package/public/chunk-3HDDBXQX.js +2 -0
  8. package/public/chunk-3RECQ7FO.js +1 -0
  9. package/public/{chunk-RRAVS5O5.js → chunk-44YUY7UC.js} +1 -1
  10. package/public/chunk-5K7TBZVE.js +4 -0
  11. package/public/{chunk-FT5BOMBZ.js → chunk-7MAW5JUV.js} +1 -1
  12. package/public/chunk-AADA4WFK.js +5 -0
  13. package/public/{chunk-RWUVBWWO.js → chunk-B3PMU746.js} +1 -1
  14. package/public/chunk-B427KQYP.js +8 -0
  15. package/public/{chunk-FMXUVLIS.js → chunk-C7LQ4JH6.js} +1 -1
  16. package/public/chunk-ECOFSL27.js +2 -0
  17. package/public/chunk-ENKPORJ2.js +4 -0
  18. package/public/chunk-G2YDCXRS.js +1 -0
  19. package/public/chunk-GCRU2MQN.js +3 -0
  20. package/public/{chunk-4I72QW7P.js → chunk-JGQZHRVH.js} +2 -2
  21. package/public/chunk-KS5NMMLP.js +1 -0
  22. package/public/chunk-OFKNWTWQ.js +3 -0
  23. package/public/chunk-QFYHTHWH.js +5 -0
  24. package/public/chunk-RRKP4LCJ.js +3 -0
  25. package/public/chunk-S3ZVIKLY.js +3 -0
  26. package/public/chunk-SFNSRKY4.js +18 -0
  27. package/public/chunk-SG7QU6WS.js +60 -0
  28. package/public/chunk-VBLNSAAZ.js +2 -0
  29. package/public/chunk-W6GQAXBI.js +1 -0
  30. package/public/chunk-WGM3TAMK.js +6 -0
  31. package/public/chunk-WXVRRQMZ.js +2 -0
  32. package/public/chunk-ZKAVJSP3.js +2 -0
  33. package/public/index.html +2 -2
  34. package/public/main-U4UEIZM3.js +236 -0
  35. package/public/polyfills-QVNLPVFF.js +2 -0
  36. package/public/styles-IMZWSNV6.css +1 -0
  37. package/public/chunk-33V5LB3S.js +0 -1
  38. package/public/chunk-3VDHINWX.js +0 -5
  39. package/public/chunk-3ZEGWRD3.js +0 -5
  40. package/public/chunk-4BOCTD5N.js +0 -8
  41. package/public/chunk-4JOAS6PU.js +0 -6
  42. package/public/chunk-55NKBYQA.js +0 -2
  43. package/public/chunk-74Q7ESW3.js +0 -3
  44. package/public/chunk-BR6DGEVY.js +0 -2
  45. package/public/chunk-C2FHZBTV.js +0 -3
  46. package/public/chunk-DHPOFP3B.js +0 -2
  47. package/public/chunk-EV5JRVML.js +0 -1
  48. package/public/chunk-I6I4BVGS.js +0 -3
  49. package/public/chunk-JIU24MDF.js +0 -2
  50. package/public/chunk-JZ455OYD.js +0 -18
  51. package/public/chunk-MKRJYLEZ.js +0 -7
  52. package/public/chunk-PG77CNSY.js +0 -4
  53. package/public/chunk-PZFXKRRN.js +0 -60
  54. package/public/chunk-SGYCFQGT.js +0 -0
  55. package/public/chunk-UNIQOPO4.js +0 -1
  56. package/public/chunk-UXHQY4AJ.js +0 -3
  57. package/public/chunk-XKOTWXAB.js +0 -2
  58. package/public/chunk-YHKDUORM.js +0 -1
  59. package/public/main-B6YUWQPL.js +0 -234
  60. package/public/polyfills-2DK6FBPF.js +0 -2
  61. package/public/styles-JBXUFPXQ.css +0 -1
@@ -0,0 +1,2 @@
1
+ import{a as ve}from"./chunk-AADA4WFK.js";import{s as fe}from"./chunk-GCRU2MQN.js";import{a as de,g as ce,i as ne,o as se}from"./chunk-ENKPORJ2.js";import{$b as O,Aa as x,Ae as _e,Da as H,Eb as E,Fb as K,Gb as X,I as V,Ic as re,Qa as w,Rb as A,Wc as oe,Xd as le,Yb as f,Zb as _,Zd as ue,_b as p,ad as G,dc as ee,ed as h,ef as pe,fc as y,fd as j,hc as te,he as q,ic as ie,jc as ae,ka as B,kc as T,lb as v,lc as D,mc as S,na as $,oa as N,p as L,pa as Q,pb as Z,pe as z,ra as P,sc as F,se as me,ta as o,wb as J,xb as W,xe as he,yb as Y,ye as be,za as M}from"./chunk-SFNSRKY4.js";var je=(()=>{class r{appSettings=o(ce);data=o(se);_svcDatasetConfigs=[];_svcDataSource=[];_svcSubjectObserverRegistry=[];constructor(){let e=this.appSettings;this._svcDatasetConfigs=e.getDataSets(),this.startAll()}setupServiceSubjectRegistry(e,i){let t=this._svcSubjectObserverRegistry.findIndex(a=>a.datasetUuid==e);t>=0&&(this._svcSubjectObserverRegistry[t].rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(t,1)),this._svcSubjectObserverRegistry.push({datasetUuid:e,rxjsSubject:new L(i)})}createDataSourceConfiguration(e){let t={uuid:e.uuid,pathObserverSubscription:null,sampleTime:null,maxDataPoints:null,smoothingPeriod:null,historicalData:[]};switch(e.timeScaleFormat){case"hour":t.maxDataPoints=e.period*60,t.sampleTime=6e4,t.smoothingPeriod=Math.floor(t.maxDataPoints*.25);break;case"minute":t.maxDataPoints=e.period*60,t.sampleTime=1e3,t.smoothingPeriod=Math.floor(t.maxDataPoints*.25);break;default:t.maxDataPoints=e.period*5,t.sampleTime=200,t.smoothingPeriod=Math.floor(t.maxDataPoints*.25);break}return t}startAll(){console.log("[Dataset Service] Auto Starting "+this._svcDatasetConfigs.length.toString()+" Datasets");for(let e of this._svcDatasetConfigs)this.start(e.uuid)}start(e){let i=this._svcDatasetConfigs.find(c=>c.uuid==e);if(!i){console.warn(`[Dataset Service] Dataset UUID:${e} not found`);return}let t=this.createDataSourceConfiguration(i);this.setupServiceSubjectRegistry(t.uuid,t.maxDataPoints);let a=this._svcDataSource[this._svcDataSource.push(t)-1];console.log(`[Dataset Service] Starting Dataset recording process: ${t.uuid}`),console.log(`[Dataset Service] Path: ${i.path}, Scale: ${i.timeScaleFormat}, Period: ${i.period}, Datapoints: ${t.maxDataPoints}`);function u(c){return s=>V(c).pipe(B(s,(g,R)=>R))}a.pathObserverSubscription=this.data.subscribePath(i.path,i.pathSource).pipe(u(t.sampleTime)).subscribe(c=>{if(c.data.value===null)return;a.maxDataPoints>0&&a.historicalData.length>=a.maxDataPoints&&a.historicalData.shift(),a.historicalData.push(c.data.value);let s=this.updateDataset(a,i.baseUnit);this._svcSubjectObserverRegistry.find(g=>g.datasetUuid===a.uuid).rxjsSubject.next(s)})}stop(e){let i=this._svcDataSource.findIndex(t=>t.uuid==e);console.log(`[Dataset Service] Stopping Dataset ${e} data capture`),this._svcDataSource[i].pathObserverSubscription.unsubscribe(),this._svcDataSource.splice(i,1)}list(){return ne(this._svcDatasetConfigs)}getDatasetConfig(e){return this._svcDatasetConfigs.find(i=>i.uuid===e)}getDataSourceInfo(e){return this._svcDataSource.find(i=>i.uuid===e)}create(e,i,t,a,u){let c=de.create(),s={uuid:c,path:e,pathSource:i,baseUnit:this.data.getPathUnitType(e),timeScaleFormat:t,period:a,label:u};console.log(`[Dataset Service] Creating new Dataset: ${s.uuid}, Path: ${s.path}, Source: ${s.pathSource} Scale: ${s.timeScaleFormat}, Period: ${s.period}`),this._svcDatasetConfigs.push(s),this.start(c),this.appSettings.saveDataSets(this._svcDatasetConfigs)}edit(e){let i=this._svcDatasetConfigs.find(t=>t.uuid===e.uuid);if(JSON.stringify(i)===JSON.stringify(e)){console.log(`[Dataset Service] No changes detected for Dataset ${e.uuid}.`);return}this.stop(e.uuid),console.log(`[Dataset Service] Updating Dataset: ${e.uuid}`),e.baseUnit=this.data.getPathUnitType(e.path),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(t=>t.uuid===e.uuid),1,e),this.start(e.uuid),this.appSettings.saveDataSets(this._svcDatasetConfigs)}remove(e){this.stop(e),console.log(`[Dataset Service] Removing Dataset: ${e}`),this._svcDatasetConfigs.splice(this._svcDatasetConfigs.findIndex(i=>i.uuid===e),1),this._svcSubjectObserverRegistry.find(i=>i.datasetUuid===e).rxjsSubject.complete(),this._svcSubjectObserverRegistry.splice(this._svcSubjectObserverRegistry.findIndex(i=>i.datasetUuid===e),1),this.appSettings.saveDataSets(this._svcDatasetConfigs)}getDatasetObservable(e){let i=this._svcSubjectObserverRegistry.find(t=>t.datasetUuid==e);return i?i.rxjsSubject.asObservable():null}updateDataset(e,i){let t=null,a=null;switch(i){case"rad":t=s(e.historicalData),a=R(e.historicalData,e.smoothingPeriod);break;default:t=c(e.historicalData),a=g(e.historicalData,e.smoothingPeriod);break}return{timestamp:Date.now(),data:{value:e.historicalData[e.historicalData.length-1],sma:a,ema:null,doubleEma:null,lastAverage:t,lastMinimum:Math.min(...e.historicalData),lastMaximum:Math.max(...e.historicalData)}};function c(d){return d.length===0?null:d.reduce((n,l)=>n+l,0)/d.length}function s(d){let n=d.map(m=>[Math.cos(m),Math.sin(m)]).reduce((m,U)=>[m[0]+U[0],m[1]+U[1]],[0,0]),l=Math.sqrt(n[0]*n[0]+n[1]*n[1]),C=[n[0]/l,n[1]/l],k=Math.atan2(C[1],C[0]);return k=(k+Math.PI)%(2*Math.PI)-Math.PI,k}function g(d,b){d.length<b&&(b=d.length);let n=0;for(let l=d.length-b;l<d.length;l++)n+=d[l];return n/b}function R(d,b){if(d.length===0)return 0;let n=Math.min(b,d.length),l=0;for(let m=d.length-n;m<d.length;m++)l+=d[m];return(l/n+Math.PI)%(2*Math.PI)-Math.PI}}static \u0275fac=function(i){return new(i||r)};static \u0275prov=N({token:r,factory:r.\u0275fac})}return r})();var Se=["input"],Ie=["formField"],Re=["*"],I=class{source;value;constructor(ye,e){this.source=ye,this.value=e}},Ce={provide:pe,useExisting:$(()=>xe),multi:!0},ge=new P("MatRadioGroup"),Pe=new P("mat-radio-default-options",{providedIn:"root",factory:Me});function Me(){return{color:"accent",disabledInteractive:!1}}var xe=(()=>{class r{_changeDetector=o(G);_value=null;_name=o(q).getId("mat-radio-group-");_selected=null;_isInitialized=!1;_labelPosition="after";_disabled=!1;_required=!1;_buttonChanges;_controlValueAccessorChangeFn=()=>{};onTouched=()=>{};change=new E;_radios;color;get name(){return this._name}set name(e){this._name=e,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(e){this._labelPosition=e==="before"?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(e){this._selected=e,this.value=e?e.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markRadiosForCheck()}get required(){return this._required}set required(e){this._required=e,this._markRadiosForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markRadiosForCheck()}_disabledInteractive=!1;constructor(){}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(e=>e===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(e=>{e.name=this.name,e._markForCheck()})}_updateSelectedRadioFromValue(){let e=this._selected!==null&&this._selected.value===this._value;this._radios&&!e&&(this._selected=null,this._radios.forEach(i=>{i.checked=this.value===i.value,i.checked&&(this._selected=i)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new I(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(e=>e._markForCheck())}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetector.markForCheck()}static \u0275fac=function(i){return new(i||r)};static \u0275dir=Y({type:r,selectors:[["mat-radio-group"]],contentQueries:function(i,t,a){if(i&1&&ae(a,ke,5),i&2){let u;D(u=S())&&(t._radios=u)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[2,"disabled","disabled",h],required:[2,"required","required",h],disabledInteractive:[2,"disabledInteractive","disabledInteractive",h]},outputs:{change:"change"},exportAs:["matRadioGroup"],features:[re([Ce,{provide:ge,useExisting:r}])]})}return r})(),ke=(()=>{class r{_elementRef=o(w);_changeDetector=o(G);_focusMonitor=o(le);_radioDispatcher=o(fe);_defaultOptions=o(Pe,{optional:!0});_ngZone=o(K);_renderer=o(Z);_uniqueId=o(q).getId("mat-radio-");_cleanupClick;id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}_labelPosition;get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){e!==this._required&&this._changeDetector.markForCheck(),this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(e){this._color=e}_color;get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new E;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations=me();_injector=o(H);constructor(){o(ue).load(be);let e=o(ge,{optional:!0}),i=o(new oe("tabindex"),{optional:!0});this.radioGroup=e,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,i&&(this.tabIndex=j(i,0))}focus(e,i){i?this._focusMonitor.focusVia(this._inputElement,i,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,i)=>{e!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._cleanupClick=this._renderer.listen(this._inputElement.nativeElement,"click",this._onInputClick)})}ngOnDestroy(){this._cleanupClick?.(),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new I(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_onInputClick=e=>{this.disabled&&this.disabledInteractive&&e.preventDefault()};_updateTabIndex(){let e=this.radioGroup,i;if(!e||!e.selected||this.disabled?i=this.tabIndex:i=e.selected===this?this.tabIndex:-1,i!==this._previousTabIndex){let t=this._inputElement?.nativeElement;t&&(t.setAttribute("tabindex",i+""),this._previousTabIndex=i,X(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===t&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===t&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=J({type:r,selectors:[["mat-radio-button"]],viewQuery:function(i,t){if(i&1&&(T(Se,5),T(Ie,7,w)),i&2){let a;D(a=S())&&(t._inputElement=a.first),D(a=S())&&(t._rippleTrigger=a.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(i,t){i&1&&y("focus",function(){return t._inputElement.nativeElement.focus()}),i&2&&(A("id",t.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),F("mat-primary",t.color==="primary")("mat-accent",t.color==="accent")("mat-warn",t.color==="warn")("mat-mdc-radio-checked",t.checked)("mat-mdc-radio-disabled",t.disabled)("mat-mdc-radio-disabled-interactive",t.disabledInteractive)("_mat-animation-noopable",t._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",h],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:j(e)],checked:[2,"checked","checked",h],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",h],required:[2,"required","required",h],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",h]},outputs:{change:"change"},exportAs:["matRadioButton"],ngContentSelectors:Re,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio","aria-invalid","false",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,t){if(i&1){let a=ee();te(),_(0,"div",2,0)(2,"div",3)(3,"div",4),y("click",function(c){return M(a),x(t._onTouchTargetClick(c))}),p(),_(4,"input",5,1),y("change",function(c){return M(a),x(t._onInputInteraction(c))}),p(),_(6,"div",6),O(7,"div",7)(8,"div",8),p(),_(9,"div",9),O(10,"div",10),p()(),_(11,"label",11),ie(12),p()()}i&2&&(f("labelPosition",t.labelPosition),v(2),F("mdc-radio--disabled",t.disabled),v(2),f("id",t.inputId)("checked",t.checked)("disabled",t.disabled&&!t.disabledInteractive)("required",t.required),A("name",t.name)("value",t.value)("aria-label",t.ariaLabel)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),v(5),f("matRippleTrigger",t._rippleTrigger.nativeElement)("matRippleDisabled",t._isRippleDisabled())("matRippleCentered",!0),v(2),f("for",t.inputId))},dependencies:[he,ve],styles:[`.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:not([disabled])~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{border-color:var(--mat-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active>.mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{border-color:var(--mat-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px);top:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mat-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mat-radio-state-layer-size, 40px);height:var(--mat-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background>.mdc-radio__inner-circle{border-color:var(--mat-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background>.mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple>.mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio>.mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background>.mdc-radio__outer-circle{border-color:var(--mat-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}
2
+ `],encapsulation:2,changeDetection:0})}return r})(),ot=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=W({type:r});static \u0275inj=Q({imports:[z,_e,ke,z]})}return r})();export{je as a,xe as b,ke as c,ot as d};
@@ -0,0 +1,4 @@
1
+ import{$b as me,A as wi,Aa as ji,Cb as pt,Fa as mt,Fb as I,G as Ai,H as ki,Hd as Se,Ia as $i,Ic as ye,J as Di,Ja as ut,K as ge,L as ft,Ld as P,M as Ei,Na as zi,Qa as ie,Qc as Gi,Rb as Ge,Sb as M,Sd as Ce,T as Mi,Tb as F,Tc as ht,U as Fi,Uc as Ki,Wd as Yt,Yb as ve,Z as Oi,Zb as R,Zc as Ze,Zd as Xi,_ as Ii,_b as N,_c as Qi,ad as Ji,ce as er,da as Ri,dc as Bi,ec as Ke,ed as Zt,f as j,fa as Ni,fc as Qe,g as lt,ga as Pi,gc as re,gd as Zi,h as _i,ha as ct,hc as Kt,he as Te,hf as rr,ia as Li,ic as W,j as Ve,jc as _e,jf as or,kc as q,lb as w,lc as D,m as h,mc as E,n as yi,nc as Vi,o as v,oa as C,ob as Wi,oc as Je,oe as tr,of as ar,p as pe,pa as be,pb as He,pc as Qt,pe as we,qc as Jt,qe as Xt,r as Si,ra as $,sc as G,se as ir,t as dt,ta as f,te as Ae,u as Ci,vc as Hi,vd as Yi,vf as nr,wb as qe,wc as qi,x as H,xb as xe,y as Ti,yb as z,z as he,za as Ui}from"./chunk-SFNSRKY4.js";var ke=(()=>{class t{TIMEOUT_DURATION=1e4;serverServiceEndpoint$=new v({operation:0,message:"Not connected",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null});signalKURL;serverName;serverVersion$=new v(null);serverRoles=[];http=f(Se);resetSignalK(e,i,o){return j(this,null,function*(){if(!e.url){console.log("[Connection Service] Connection reset called with null or empty URL value");return}let a={operation:1,message:"Connecting...",serverDescription:null,httpServiceUrl:null,WsServiceUrl:null};this.signalKURL=e,this.serverServiceEndpoint$.next(a);let n=this.signalKURL.url;n.endsWith("signalk/")||(n+="/signalk/");try{console.log("[Connection Service] Connecting to: "+this.signalKURL.url);let s=yield H(this.http.get(n,{observe:"response"}).pipe(Ti(this.TIMEOUT_DURATION),ft(u=>(u.name==="TimeoutError"&&console.error("[Connection Service] Connection request timed out after "+this.TIMEOUT_DURATION+"ms"),Ci(u)))));console.debug("[Connection Service] Signal K HTTP Endpoints retrieved"),this.serverVersion$.next(s.body.server.version);let l=s.body.endpoints.v1["signalk-http"],d=s.body.endpoints.v1["signalk-ws"];i?(console.debug("[Connection Service] Proxy Mode Enabled"),a.httpServiceUrl=window.location.origin+new URL(l).pathname,a.WsServiceUrl=(window.location.protocol=="https:"?"wss://":"ws://")+window.location.host+new URL(d).pathname):(a.httpServiceUrl=l,a.WsServiceUrl=d),console.debug("[Connection Service] HTTP URI: "+a.httpServiceUrl),console.debug("[Connection Service] WebSocket URI: "+a.WsServiceUrl),a.operation=2,a.message=s.status.toString(),a.serverDescription=`${s.body.server.id} ${s.body.server.version}`}catch(s){a.operation=3,a.message=s.message,this.handleError(s)}finally{a.subscribeAll=!!o,this.serverServiceEndpoint$.next(a)}})}handleError(e){let i=e.status===0?`[Connection Service] ${e.name}: ${e.message}`:`[Connection Service] Backend returned code ${e.status}, body was: ${e.error}`;throw console.error(i),e}getServiceEndpointStatusAsO(){return this.serverServiceEndpoint$.asObservable()}setServerInfo(e,i,o){this.serverName=e,this.serverRoles=o,console.log(`[Connection Service] Server Name: ${e}, Version: ${i}, Roles: ${JSON.stringify(o)}`)}get skServerName(){return this.serverName}get skServerVersion(){return this.serverVersion$.getValue()}get skServerRoles(){return this.serverRoles}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Ha=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,ei=t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let r=t.match(Ha);if(!r)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return r.shift(),r},sr=t=>t==="*"||t==="x"||t==="X",lr=t=>{let r=parseInt(t,10);return isNaN(r)?t:r},qa=(t,r)=>typeof t!=typeof r?[String(t),String(r)]:[t,r],Ga=(t,r)=>{if(sr(t)||sr(r))return 0;let[e,i]=qa(lr(t),lr(r));return e>i?1:e<i?-1:0},ti=(t,r)=>{for(let e=0;e<Math.max(t.length,r.length);e++){let i=Ga(t[e]||"0",r[e]||"0");if(i!==0)return i}return 0};var dr=(t,r)=>{let e=ei(t),i=ei(r),o=e.pop(),a=i.pop(),n=ti(e,i);return n!==0?n:o&&a?ti(o.split("."),a.split(".")):o||a?o?-1:1:0};var ii=(t,r,e)=>{Ka(e);let i=dr(t,r);return cr[e].includes(i)},cr={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},fr=Object.keys(cr),Ka=t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(fr.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${fr.join("|")}`)};var mr=(()=>{class t{server=f(ke);http=f(Se);serverEndpoint=null;isAppDataSupported=!1;configFileVersion=null;sharedConfigName;InitConfig=null;storageServiceReady$=new h;patchQueue$=new h;patch=function(e){return this.http.post(e.url,e.document).pipe(Li(()=>console.log("[Storage Service] Remote config patch request completed successfully")),ft(i=>this.handleError(i)))};constructor(){let e=this.server;e.serverServiceEndpoint$.subscribe(i=>{i.httpServiceUrl!==null&&(this.serverEndpoint=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4)+"applicationData/",console.log("[Storage Service] Service startup. AppData API set to: "+this.serverEndpoint)),i.operation===2?this.storageServiceReady$.next(!0):this.storageServiceReady$.next(!1)}),e.serverVersion$.subscribe(i=>{i&&(this.isAppDataSupported=ii(i,"1.27.0",">="))}),this.patchQueue$.pipe(Ei(i=>this.patch(i))).subscribe(()=>{})}listConfigs(e){return j(this,null,function*(){let i=[];if(!this.serverEndpoint)return console.warn("[Storage Service] No server endpoint set. Cannot retrieve config list"),null;let o=this.serverEndpoint,a=o+"global/kip/"+this.configFileVersion+"/?keys=true",n=o+"user/kip/"+this.configFileVersion+"/?keys=true";return e&&(a=o+"global/kip/"+e+"/?keys=true",n=o+"user/kip/"+e+"/?keys=true"),yield H(this.http.get(a)).then(s=>{for(let l of s)i.push({scope:"global",name:l});console.log("[Storage Service] Retrieved Global config list")}).catch(s=>{this.handleError(s)}),yield H(this.http.get(n)).then(s=>{for(let l of s)i.push({scope:"user",name:l});console.log("[Storage Service] Retrieved User config list")}).catch(s=>{this.handleError(s)}),i})}getConfig(e,i,o,a){return j(this,null,function*(){let n=null,s=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i;return o&&(s=this.serverEndpoint+e+"/kip/"+o+"/"+i),yield H(this.http.get(s)).then(l=>{n=l,console.log(`[Storage Service] Retrieved config [${i}] from [${e}] scope`),a&&(this.InitConfig=l)}).catch(l=>{this.handleError(l)}),n})}setConfig(e,i,o,a){return j(this,null,function*(){let n=this.serverEndpoint+e+"/kip/"+this.configFileVersion+"/"+i,s=null;return a&&(n=this.serverEndpoint+e+"/kip/"+a+"/"+i),yield H(this.http.post(n,o)).then(l=>{console.log(`[Storage Service] Saved config [${i}] to [${e}] scope`),s=l}).catch(l=>{this.handleError(l)}),s})}patchConfig(e,i,o){let a=this.serverEndpoint+"user/kip/"+this.configFileVersion,n;switch(o&&(a=this.serverEndpoint+"user/kip/"+o),e){case"IAppConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/app`,value:i}];break;case"IThemeConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/theme/themeName`,value:i.themeName}];break;case"IWidgetConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/widget`,value:i}];break;case"ILayoutConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/layout`,value:i}];break;case"Dashboards":n=[{op:"replace",path:`/${this.sharedConfigName}/dashboards`,value:i}];break;case"Array<IUnitDefaults>":n=[{op:"replace",path:`/${this.sharedConfigName}/app/unitDefaults`,value:i}];break;case"Array<IDatasetDef>":n=[{op:"replace",path:`/${this.sharedConfigName}/app/dataSets`,value:i}];break;case"INotificationConfig":n=[{op:"replace",path:`/${this.sharedConfigName}/app/notificationConfig`,value:i}];break;default:console.warn("[Storage Service] JSON Patch request type unknown");break}let s={url:a,document:n};this.patchQueue$.next(s)}patchGlobal(e,i,o,a,n){let s=this.serverEndpoint+i+"/kip/"+this.configFileVersion;n&&(s=this.serverEndpoint+i+"/kip/"+n);let l;switch(a){case"add":l=[{op:"add",path:`/${e}`,value:o}];break;case"replace":l=[{op:"replace",path:`/${e}`,value:o}];break;case"remove":l=[{op:"remove",path:`/${e}`,value:o}];break;default:console.warn("[Storage Service] JSON Patch operation request type unknown");break}let d={url:s,document:l};this.patchQueue$.next(d)}removeItem(e,i,o){let a=this.serverEndpoint+e+"/kip/"+this.configFileVersion;o&&(a=this.serverEndpoint+e+"/kip/"+o);let n=[{op:"remove",path:`/${i}`}],s={url:a,document:n};this.patchQueue$.next(s)}clear(){}set activeConfigFileVersion(e){this.configFileVersion=e}handleError(e){throw e.status===0?console.error("[Storage Service] An error occurred:",e.error):console.error("[Storage Service] Backend returned error: ",e.message),e}get initConfig(){return this.InitConfig}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var oe=class{static create(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)})}};var Ye={disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}};var gt={Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"};var ur={configVersion:11,autoNightMode:!0,redNightMode:!1,nightModeBrightness:.27,dataSets:[],unitDefaults:gt,notificationConfig:Ye},pr={themeName:""};var hr={configVersion:11,kipUUID:oe.create(),signalKUrl:null,proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var ri={configVersion:11,autoNightMode:!1,redNightMode:!1,nightModeBrightness:.27,dataSets:[{uuid:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",path:"self.environment.wind.speedApparent",pathSource:"default",period:1,baseUnit:"m/s",label:"self.environment.wind.speedApparent, Source: default, Scale: minute, Period: 1",timeScaleFormat:"minute"}],unitDefaults:{Unitless:"unitless",Speed:"knots",Flow:"l/h",Temperature:"celsius",Length:"m",Volume:"liter",Current:"A",Potential:"V",Charge:"C",Power:"W",Energy:"J",Pressure:"mmHg","Fuel Distance":"nm/l","Energy Distance":"nm/kWh",Density:"kg/m3",Time:"Hours","Angular Velocity":"deg/min",Angle:"deg",Frequency:"Hz",Ratio:"ratio",Resistance:"ohm"},notificationConfig:{disableNotifications:!1,menuGrouping:!0,security:{disableSecurity:!0},devices:{disableDevices:!1,showNormalState:!1,showNominalState:!1},sound:{disableSound:!1,muteNormal:!0,muteNominal:!0,muteWarn:!0,muteAlert:!1,muteAlarm:!1,muteEmergency:!1}}},oi=[{id:"3e0825ee-95fd-4ad4-8802-e0507845b668",name:"Sailing",configuration:[{w:3,h:4,id:"339698a7-2cff-4ab9-9b50-d8056f971471",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"339698a7-2cff-4ab9-9b50-d8056f971471",config:{displayName:"Depth",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.depth.belowTransducer",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"m",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"yellow",enableTimeout:!1,dataTimeout:5}}},x:0,y:0},{w:5,h:10,id:"a44028e0-dfee-4492-895b-2b03a60f3a69",selector:"widget-wind-steer",input:{widgetProperties:{type:"widget-wind-steer",uuid:"a44028e0-dfee-4492-895b-2b03a60f3a69",config:{filterSelfPaths:!0,paths:{headingPath:{description:"Heading",path:"self.navigation.headingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},courseOverGround:{description:"Course Over Ground",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindAngle:{description:"True Wind Angle",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},trueWindSpeed:{description:"True Wind Speed",path:"self.environment.wind.speedTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},appWindAngle:{description:"Apparent Wind Angle",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500},appWindSpeed:{description:"Apparent Wind Speed",path:"self.environment.wind.speedApparent",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"m/s",convertUnitTo:"knots",sampleTime:500},nextWaypointBearing:{description:"Next Waypoint Bearing",path:"self.navigation.courseGreatCircle.nextPoint.bearingTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",convertUnitTo:"deg",sampleTime:500}},windSectorEnable:!0,windSectorWindowSeconds:5,laylineEnable:!0,laylineAngle:40,waypointEnable:!0,courseOverGroundEnable:!0,sailSetupEnable:!1,enableTimeout:!1,dataTimeout:5}}},x:3,y:0},{w:4,h:6,id:"24406c15-7738-4dc1-a206-7a4862c2931d",selector:"widget-gauge-ng-radial",input:{widgetProperties:{type:"widget-gauge-ng-radial",uuid:"24406c15-7738-4dc1-a206-7a4862c2931d",config:{displayName:"SOG",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.speedOverGround",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,convertUnitTo:"knots",sampleTime:500}},displayScale:{lower:0,upper:10,type:"linear"},gauge:{type:"ngRadial",subType:"measuring",enableTicks:!0,compassUseNumbers:!1},numInt:1,numDecimal:1,enableTimeout:!1,color:"yellow",dataTimeout:5}}},x:8,y:0},{w:3,h:4,id:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"c6bcaa53-afa1-42c7-ad92-d5f7dba14734",config:{displayName:"STW",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.navigation.speedThroughWater",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"knots",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!0,showMin:!0,numDecimal:1,numInt:1,color:"contrast",enableTimeout:!1,dataTimeout:5}}},x:0,y:4},{w:4,h:6,id:"973c8804-be09-4923-bb5d-48c13b65db69",selector:"widget-data-chart",input:{widgetProperties:{type:"widget-data-chart",uuid:"973c8804-be09-4923-bb5d-48c13b65db69",config:{displayName:"Chart Label",filterSelfPaths:!0,convertUnitTo:"knots",datasetUUID:"afbe4e41-26f5-404f-a55d-9f7b9b76fbd1",invertData:!1,datasetAverageArray:"sma",showAverageData:!0,trackAgainstAverage:!1,showDatasetMinimumValueLine:!1,showDatasetMaximumValueLine:!1,showDatasetAverageValueLine:!0,showDatasetAngleAverageValueLine:!1,showLabel:!1,showTimeScale:!0,startScaleAtZero:!1,verticalGraph:!1,showYScale:!0,yScaleSuggestedMin:null,yScaleSuggestedMax:null,enableMinMaxScaleLimit:!1,yScaleMin:null,yScaleMax:null,numDecimal:1,color:"green"}}},x:8,y:6},{w:3,h:4,id:"05414722-733a-4483-89b0-07f3945ffd97",selector:"widget-numeric",input:{widgetProperties:{type:"widget-numeric",uuid:"05414722-733a-4483-89b0-07f3945ffd97",config:{displayName:"Engine Room",filterSelfPaths:!0,paths:{numericPath:{description:"Numeric Data",path:"self.environment.inside.engineRoom.temperature",source:"default",pathType:"number",isPathConfigurable:!0,convertUnitTo:"celsius",showPathSkUnitsFilter:!0,pathSkUnitsFilter:null,sampleTime:500}},showMax:!1,showMin:!1,numDecimal:1,numInt:1,color:"blue",enableTimeout:!1,dataTimeout:5}}},x:0,y:8},{w:5,h:2,id:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",selector:"widget-simple-linear",input:{widgetProperties:{type:"widget-simple-linear",uuid:"1a7a3f79-2eb4-4092-a0c3-9a61db8a8586",config:{displayName:"House Bank",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.electrical.batteries.0.voltage",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!0,pathSkUnitsFilter:"V",convertUnitTo:"V",sampleTime:500}},displayScale:{lower:0,upper:15,type:"linear"},gauge:{type:"simpleLinear",unitLabelFormat:"full"},numInt:1,numDecimal:2,color:"green",enableTimeout:!1,dataTimeout:5}}},x:3,y:10}]},{id:"7c67c8c5-dc55-4e1d-9fc5-3dd95fd41bea",name:"Charting",configuration:[{x:0,y:0,w:8,h:12,id:"488d620a-37d4-4b98-849d-304cd18003e9",selector:"widget-freeboardsk",input:{widgetProperties:{type:"widget-freeboardsk",uuid:"488d620a-37d4-4b98-849d-304cd18003e9"}}},{x:8,y:0,w:2,h:3,id:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",selector:"widget-gauge-ng-compass",input:{widgetProperties:{type:"widget-gauge-ng-compass",uuid:"26a2a150-5af8-4f1d-aaab-0cb2a406fc17",config:{displayName:"COG (T)",filterSelfPaths:!0,paths:{gaugePath:{description:"Numeric Data",path:"self.navigation.courseOverGroundTrue",source:"default",pathType:"number",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",showConvertUnitTo:!1,convertUnitTo:"deg",sampleTime:500}},gauge:{type:"ngRadial",subType:"marineCompass",enableTicks:!0,compassUseNumbers:!0,showValueBox:!1},enableTimeout:!1,color:"purple",dataTimeout:5}}}},{x:10,y:0,w:2,h:3,id:"caf9ca47-fcf6-4736-a314-2b5210edaf03",selector:"widget-datetime",input:{widgetProperties:{type:"widget-datetime",uuid:"caf9ca47-fcf6-4736-a314-2b5210edaf03",config:{displayName:"Next WP Arrival",filterSelfPaths:!0,paths:{gaugePath:{description:"String Data",path:"self.navigation.datetime",source:"default",pathType:"Date",isPathConfigurable:!0,sampleTime:500}},dateFormat:"dd/MM HH:mm",dateTimezone:"America/Toronto",color:"contrast",enableTimeout:!1,dataTimeout:5}}}},{x:8,y:3,w:4,h:9,id:"daa21350-009e-4d99-8209-364f9b99caee",selector:"widget-autopilot",input:{widgetProperties:{type:"widget-autopilot",uuid:"daa21350-009e-4d99-8209-364f9b99caee",config:{displayName:"N2k Autopilot",filterSelfPaths:!0,paths:{apState:{description:"Autopilot State",path:"self.steering.autopilot.state",source:"default",pathType:"string",isPathConfigurable:!0,showPathSkUnitsFilter:!1,convertUnitTo:"",sampleTime:500},apTargetHeadingMag:{description:"Autopilot Target Heading Mag",path:"self.steering.autopilot.target.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},apTargetWindAngleApp:{description:"Autopilot Target Wind Angle Apparent",path:"self.steering.autopilot.target.windAngleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingMag:{description:"Heading Magnetic",path:"self.navigation.headingMagnetic",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},headingTrue:{description:"Heading True",path:"self.navigation.headingTrue",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleApparent:{description:"Wind Angle Apparent",path:"self.environment.wind.angleApparent",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},windAngleTrueWater:{description:"Wind Angle True Water",path:"self.environment.wind.angleTrueWater",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500},rudderAngle:{description:"Rudder Angle",path:"self.steering.rudderAngle",source:"default",pathType:"number",convertUnitTo:"deg",isPathConfigurable:!0,showPathSkUnitsFilter:!1,pathSkUnitsFilter:"rad",sampleTime:500}},usage:{headingMag:["wind","route","auto","standby"],headingTrue:["wind","route","auto","standby"],windAngleApparent:["wind"],windAngleTrueWater:["wind"]},typeVal:{headingMag:"Mag",headingTrue:"True",windAngleApparent:"AWA",windAngleTrueWater:"TWA"},barColor:"accent",autoStart:!1,enableTimeout:!1,dataTimeout:5}}}}]}],ai={themeName:""};var $m={configVersion:11,kipUUID:oe.create(),signalKUrl:"https://demo.signalk.org",proxyEnabled:!1,signalKSubscribeAll:!1,useDeviceToken:!1,loginName:null,loginPassword:null,useSharedConfig:!1,sharedConfigName:"default"};var Qa="",Ja=11,Xe=11,Zm=(()=>{class t{storage=f(mr);unitDefaults=new v({});themeName=new v(Qa);kipKNotificationConfig=new v(Ye);autoNightMode=new v(!1);redNightMode=new v(!1);nightModeBrightness=new v(1);proxyEnabled=!1;signalKSubscribeAll=!1;useDeviceToken=!1;loginName;loginPassword;useSharedConfig;sharedConfigName;activeConfig={app:null,theme:null,dashboards:null};kipUUID;signalkUrl;widgets;_dashboards=[];dataSets=[];configUpgrade=ut(!1);constructor(){if(console.log("[AppSettings Service] Service startup..."),this.storage.activeConfigFileVersion=Ja,!window.localStorage)console.error(`[AppSettings Service] LocalStorage NOT SUPPORTED by browser
2
+ This is a requirement to run Kip. See browser documentation to enable this feature.`);else{this.loadConnectionConfig();let e;if(this.storage.initConfig===null&&this.useSharedConfig&&this.loginName!==null&&this.loginPassword!==null&&this.signalkUrl.url!==null?this.resetSettings():e=this.storage.initConfig,e)console.log("[AppSettings Service] Remote configuration storage enabled"),this.checkConfigUpgradeRequired(!1),this.activeConfig=e,this.pushSettings();else{console.log("[AppSettings Service] LocalStorage enabled");let i={app:null,theme:null,dashboards:null};i.app=this.loadConfigFromLocalStorage("appConfig"),i.app.configVersion!==Xe&&this.checkConfigUpgradeRequired(!0),i.dashboards=this.loadConfigFromLocalStorage("dashboardsConfig"),i.theme=this.loadConfigFromLocalStorage("themeConfig"),this.activeConfig=i,this.pushSettings()}}}loadConnectionConfig(){let e=this.loadConfigFromLocalStorage("connectionConfig");switch(e.configVersion){case 11:break;default:console.error(`[AppSettings Service] Invalid connectionConfig version ${e.configVersion}. Resetting and loading connection configuration default`),this.resetConnection();break}this.signalkUrl={url:e.signalKUrl,new:!1},this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.useDeviceToken=e.useDeviceToken,this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.sharedConfigName=e.sharedConfigName,this.kipUUID=e.kipUUID}resetConnection(){localStorage.setItem("connectionConfig",JSON.stringify(this.getDefaultConnectionConfig())),this.reloadApp()}checkConfigUpgradeRequired(e){e?this.configUpgrade.set(!0):this.storage.listConfigs(9).then(i=>j(this,null,function*(){for(let o of i)try{if((yield this.storage.getConfig(o.scope,o.name,9)).app?.configVersion===10){this.configUpgrade.set(!0),console.log("[AppSettings Service] Configuration upgrade required for version 10.");break}}catch(a){console.error(`[AppSettings Service] Error fetching configuration for ${o.name}:`,a)}})).catch(i=>{console.error("[AppSettings Service] Error fetching configuration data:",i)})}loadConfigFromLocalStorage(e){let i=JSON.parse(localStorage.getItem(e));if(i===null)switch(console.log(`[AppSettings Service] Error loading ${e} config. Force loading ${e} defaults`),e){case"appConfig":i=this.getDefaultAppConfig();break;case"connectionConfig":i=this.getDefaultConnectionConfig();break;case"dashboardsConfig":i=this.getDefaultDashboardsConfig();break;case"themeConfig":i=this.getDefaultThemeConfig();break;default:console.error(`[AppSettings Service] Invalid ${e} default config requested`);break}if(e==="connectionConfig"&&i.configVersion!==Xe)switch(console.log(`[AppSettings Service] Invalid ${e} version. Force loading defaults`),e){case"connectionConfig":i=this.getDefaultConnectionConfig();break}return i}pushSettings(){this.themeName.next(this.activeConfig.theme.themeName),this.dataSets=this.activeConfig.app.dataSets,this.unitDefaults.next(this.activeConfig.app.unitDefaults),this.kipKNotificationConfig.next(this.activeConfig.app.notificationConfig),this.activeConfig.app.autoNightMode===void 0?this.setAutoNightMode(!1):this.autoNightMode.next(this.activeConfig.app.autoNightMode),this.activeConfig.app.redNightMode===void 0?this.setRedNightMode(!1):this.redNightMode.next(this.activeConfig.app.redNightMode),this.activeConfig.app.nightModeBrightness===void 0?this.setNightModeBrightness(.2):this.nightModeBrightness.next(this.activeConfig.app.nightModeBrightness),this.activeConfig.dashboards===void 0?this._dashboards=[]:this._dashboards=this.activeConfig.dashboards}getDefaultUnitsAsO(){return this.unitDefaults.asObservable()}getDefaultUnits(){return this.unitDefaults.getValue()}setDefaultUnits(e){this.unitDefaults.next(e),this.useSharedConfig?this.storage.patchConfig("Array<IUnitDefaults>",e):this.saveAppConfigToLocalStorage()}getAppConfig(){return this.buildAppStorageObject()}getConnectionConfig(){return this.buildConnectionStorageObject()}setConnectionConfig(e){this.loginName=e.loginName,this.loginPassword=e.loginPassword,this.useSharedConfig=e.useSharedConfig,this.proxyEnabled=e.proxyEnabled,this.signalKSubscribeAll=e.signalKSubscribeAll,this.signalkUrl.url=e.signalKUrl,e.useSharedConfig?this.useDeviceToken=!1:this.useDeviceToken=!0,this.saveConnectionConfigToLocalStorage()}setUseDeviceToken(e){this.useDeviceToken=e,this.saveConnectionConfigToLocalStorage()}getDashboardConfig(){return this.buildDashboardStorageObject()}getThemeConfig(){return this.buildThemeStorageObject()}get KipUUID(){return this.kipUUID}getThemeNameAsO(){return this.themeName.asObservable()}setThemeName(e){if(this.themeName.next(e),this.useSharedConfig){let i={themeName:e};this.storage.patchConfig("IThemeConfig",i)}else this.saveThemeConfigToLocalStorage()}getThemeName(){return this.themeName.getValue()}getAutoNightModeAsO(){return this.autoNightMode.asObservable()}setAutoNightMode(e){this.autoNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getAutoNightMode(){return this.autoNightMode.getValue()}getRedNightModeAsO(){return this.redNightMode.asObservable()}getRedNightMode(){return this.redNightMode.getValue()}setRedNightMode(e){this.redNightMode.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getNightModeBrightness(){return this.nightModeBrightness.getValue()}setNightModeBrightness(e){this.nightModeBrightness.next(e);let i=this.buildAppStorageObject();this.useSharedConfig?this.storage.patchConfig("IAppConfig",i):this.saveAppConfigToLocalStorage()}getWidgets(){return this.widgets}saveDashboards(e){this.useSharedConfig?this.storage.patchConfig("Dashboards",e):this.saveLDashboardsConfigToLocalStorage(e),this._dashboards=e}saveDataSets(e){this.dataSets=e,this.useSharedConfig?this.storage.patchConfig("Array<IDatasetDef>",e):this.saveAppConfigToLocalStorage()}getDataSets(){return this.dataSets}getNotificationServiceConfigAsO(){return this.kipKNotificationConfig.asObservable()}getNotificationConfig(){return this.kipKNotificationConfig.getValue()}setNotificationConfig(e){this.kipKNotificationConfig.next(e),this.useSharedConfig?this.storage.patchConfig("INotificationConfig",e):this.saveAppConfigToLocalStorage()}resetSettings(){let e={app:null,theme:null,dashboards:null};e.app=this.getDefaultAppConfig(),e.theme=this.getDefaultThemeConfig(),e.dashboards=this.getDefaultDashboardsConfig(),this.useSharedConfig?this.storage.setConfig("user",this.sharedConfigName,e).then(()=>{console.log("[AppSettings Service] Replaced server config name: "+this.sharedConfigName+", with default configuration values"),this.reloadApp()}).catch(i=>{console.error("[AppSettings Service] Error replacing server config name: "+this.sharedConfigName+", with default configuration values",i)}):this.reloadApp()}replaceConfig(e,i,o){let a=JSON.stringify(i);localStorage.setItem(e,a),o&&this.reloadApp()}loadDemoConfig(){if(this.useSharedConfig){let e={app:ri,dashboards:oi,theme:ai};console.log("[AppSettings Service] Loading Demo configuration settings as remote config: "+this.useSharedConfig+" and reloading app."),this.storage.setConfig("user",this.sharedConfigName,e),this.reloadApp()}else console.log("[AppSettings Service] Loading Demo configuration settings to LocalStorage"),this.replaceConfig("appConfig",ri),this.replaceConfig("dashboardsConfig",oi),this.replaceConfig("themeConfig",ai,!0)}reloadApp(){console.log("[AppSettings Service] Reload app"),location.replace("./")}buildAppStorageObject(){return{configVersion:Xe,autoNightMode:this.autoNightMode.getValue(),redNightMode:this.redNightMode.getValue(),nightModeBrightness:this.nightModeBrightness.getValue(),dataSets:this.dataSets,unitDefaults:this.unitDefaults.getValue(),notificationConfig:this.kipKNotificationConfig.getValue()}}buildConnectionStorageObject(){return{configVersion:Xe,kipUUID:this.kipUUID,signalKUrl:this.signalkUrl.url,proxyEnabled:this.proxyEnabled,signalKSubscribeAll:this.signalKSubscribeAll,useDeviceToken:this.useDeviceToken,loginName:this.loginName,loginPassword:this.loginPassword,useSharedConfig:this.useSharedConfig,sharedConfigName:this.sharedConfigName}}buildDashboardStorageObject(){return this._dashboards}buildThemeStorageObject(){return{themeName:this.themeName.getValue()}}saveAppConfigToLocalStorage(){console.log("[AppSettings Service] Saving Application config to LocalStorage"),localStorage.setItem("appConfig",JSON.stringify(this.buildAppStorageObject()))}saveConnectionConfigToLocalStorage(){console.log("[AppSettings Service] Saving Connection config to LocalStorage"),localStorage.setItem("connectionConfig",JSON.stringify(this.buildConnectionStorageObject()))}saveLDashboardsConfigToLocalStorage(e){console.log("[AppSettings Service] Saving Dashboard config to LocalStorage"),localStorage.setItem("dashboardsConfig",JSON.stringify(e))}saveThemeConfigToLocalStorage(){console.log("[AppSettings Service] Saving Theme config to LocalStorage"),localStorage.setItem("themeConfig",JSON.stringify(this.buildThemeStorageObject()))}getDefaultAppConfig(){let e=ur;return e.notificationConfig=Ye,e.unitDefaults=gt,e.configVersion=Xe,localStorage.setItem("appConfig",JSON.stringify(e)),e}getDefaultConnectionConfig(){let e=hr;return e.kipUUID=oe.create(),e.signalKUrl=window.location.origin,localStorage.setItem("connectionConfig",JSON.stringify(e)),e}getDefaultDashboardsConfig(){let e=[];return localStorage.setItem("dashboardsConfig",JSON.stringify(e)),e}getDefaultThemeConfig(){let e=pr;return localStorage.setItem("themeConfig",JSON.stringify(e)),e}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Za(){this.__data__=[],this.size=0}var gr=Za;function Ya(t,r){return t===r||t!==t&&r!==r}var K=Ya;function Xa(t,r){for(var e=t.length;e--;)if(K(t[e][0],r))return e;return-1}var ae=Xa;var en=Array.prototype,tn=en.splice;function rn(t){var r=this.__data__,e=ae(r,t);if(e<0)return!1;var i=r.length-1;return e==i?r.pop():tn.call(r,e,1),--this.size,!0}var br=rn;function on(t){var r=this.__data__,e=ae(r,t);return e<0?void 0:r[e][1]}var xr=on;function an(t){return ae(this.__data__,t)>-1}var vr=an;function nn(t,r){var e=this.__data__,i=ae(e,t);return i<0?(++this.size,e.push([t,r])):e[i][1]=r,this}var _r=nn;function De(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}De.prototype.clear=gr;De.prototype.delete=br;De.prototype.get=xr;De.prototype.has=vr;De.prototype.set=_r;var ne=De;function sn(){this.__data__=new ne,this.size=0}var yr=sn;function ln(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}var Sr=ln;function dn(t){return this.__data__.get(t)}var Cr=dn;function fn(t){return this.__data__.has(t)}var Tr=fn;var cn=typeof global=="object"&&global&&global.Object===Object&&global,bt=cn;var mn=typeof self=="object"&&self&&self.Object===Object&&self,un=bt||mn||Function("return this")(),_=un;var pn=_.Symbol,L=pn;var wr=Object.prototype,hn=wr.hasOwnProperty,gn=wr.toString,et=L?L.toStringTag:void 0;function bn(t){var r=hn.call(t,et),e=t[et];try{t[et]=void 0;var i=!0}catch{}var o=gn.call(t);return i&&(r?t[et]=e:delete t[et]),o}var Ar=bn;var xn=Object.prototype,vn=xn.toString;function _n(t){return vn.call(t)}var kr=_n;var yn="[object Null]",Sn="[object Undefined]",Dr=L?L.toStringTag:void 0;function Cn(t){return t==null?t===void 0?Sn:yn:Dr&&Dr in Object(t)?Ar(t):kr(t)}var V=Cn;function Tn(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}var A=Tn;var wn="[object AsyncFunction]",An="[object Function]",kn="[object GeneratorFunction]",Dn="[object Proxy]";function En(t){if(!A(t))return!1;var r=V(t);return r==An||r==kn||r==wn||r==Dn}var Ee=En;var Mn=_["__core-js_shared__"],xt=Mn;var Er=function(){var t=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Fn(t){return!!Er&&Er in t}var Mr=Fn;var On=Function.prototype,In=On.toString;function Rn(t){if(t!=null){try{return In.call(t)}catch{}try{return t+""}catch{}}return""}var Z=Rn;var Nn=/[\\^$.*+?()[\]{}|]/g,Pn=/^\[object .+?Constructor\]$/,Ln=Function.prototype,Un=Object.prototype,jn=Ln.toString,$n=Un.hasOwnProperty,zn=RegExp("^"+jn.call($n).replace(Nn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wn(t){if(!A(t)||Mr(t))return!1;var r=Ee(t)?zn:Pn;return r.test(Z(t))}var Fr=Wn;function Bn(t,r){return t?.[r]}var Or=Bn;function Vn(t,r){var e=Or(t,r);return Fr(e)?e:void 0}var O=Vn;var Hn=O(_,"Map"),se=Hn;var qn=O(Object,"create"),Y=qn;function Gn(){this.__data__=Y?Y(null):{},this.size=0}var Ir=Gn;function Kn(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}var Rr=Kn;var Qn="__lodash_hash_undefined__",Jn=Object.prototype,Zn=Jn.hasOwnProperty;function Yn(t){var r=this.__data__;if(Y){var e=r[t];return e===Qn?void 0:e}return Zn.call(r,t)?r[t]:void 0}var Nr=Yn;var Xn=Object.prototype,es=Xn.hasOwnProperty;function ts(t){var r=this.__data__;return Y?r[t]!==void 0:es.call(r,t)}var Pr=ts;var is="__lodash_hash_undefined__";function rs(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Y&&r===void 0?is:r,this}var Lr=rs;function Me(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}Me.prototype.clear=Ir;Me.prototype.delete=Rr;Me.prototype.get=Nr;Me.prototype.has=Pr;Me.prototype.set=Lr;var ni=Me;function os(){this.size=0,this.__data__={hash:new ni,map:new(se||ne),string:new ni}}var Ur=os;function as(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}var jr=as;function ns(t,r){var e=t.__data__;return jr(r)?e[typeof r=="string"?"string":"hash"]:e.map}var le=ns;function ss(t){var r=le(this,t).delete(t);return this.size-=r?1:0,r}var $r=ss;function ls(t){return le(this,t).get(t)}var zr=ls;function ds(t){return le(this,t).has(t)}var Wr=ds;function fs(t,r){var e=le(this,t),i=e.size;return e.set(t,r),this.size+=e.size==i?0:1,this}var Br=fs;function Fe(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var i=t[r];this.set(i[0],i[1])}}Fe.prototype.clear=Ur;Fe.prototype.delete=$r;Fe.prototype.get=zr;Fe.prototype.has=Wr;Fe.prototype.set=Br;var vt=Fe;var cs=200;function ms(t,r){var e=this.__data__;if(e instanceof ne){var i=e.__data__;if(!se||i.length<cs-1)return i.push([t,r]),this.size=++e.size,this;e=this.__data__=new vt(i)}return e.set(t,r),this.size=e.size,this}var Vr=ms;function Oe(t){var r=this.__data__=new ne(t);this.size=r.size}Oe.prototype.clear=yr;Oe.prototype.delete=Sr;Oe.prototype.get=Cr;Oe.prototype.has=Tr;Oe.prototype.set=Vr;var de=Oe;function us(t,r){for(var e=-1,i=t==null?0:t.length;++e<i&&r(t[e],e,t)!==!1;);return t}var Hr=us;var ps=function(){try{var t=O(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ie=ps;function hs(t,r,e){r=="__proto__"&&Ie?Ie(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}var Re=hs;var gs=Object.prototype,bs=gs.hasOwnProperty;function xs(t,r,e){var i=t[r];(!(bs.call(t,r)&&K(i,e))||e===void 0&&!(r in t))&&Re(t,r,e)}var _t=xs;function vs(t,r,e,i){var o=!e;e||(e={});for(var a=-1,n=r.length;++a<n;){var s=r[a],l=i?i(e[s],t[s],s,e,t):void 0;l===void 0&&(l=t[s]),o?Re(e,s,l):_t(e,s,l)}return e}var Q=vs;function _s(t,r){for(var e=-1,i=Array(t);++e<t;)i[e]=r(e);return i}var qr=_s;function ys(t){return t!=null&&typeof t=="object"}var T=ys;var Ss="[object Arguments]";function Cs(t){return T(t)&&V(t)==Ss}var si=Cs;var Gr=Object.prototype,Ts=Gr.hasOwnProperty,ws=Gr.propertyIsEnumerable,As=si(function(){return arguments}())?si:function(t){return T(t)&&Ts.call(t,"callee")&&!ws.call(t,"callee")},tt=As;var ks=Array.isArray,U=ks;function Ds(){return!1}var Kr=Ds;var Zr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qr=Zr&&typeof module=="object"&&module&&!module.nodeType&&module,Es=Qr&&Qr.exports===Zr,Jr=Es?_.Buffer:void 0,Ms=Jr?Jr.isBuffer:void 0,Fs=Ms||Kr,X=Fs;var Os=9007199254740991,Is=/^(?:0|[1-9]\d*)$/;function Rs(t,r){var e=typeof t;return r=r??Os,!!r&&(e=="number"||e!="symbol"&&Is.test(t))&&t>-1&&t%1==0&&t<r}var yt=Rs;var Ns=9007199254740991;function Ps(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ns}var St=Ps;var Ls="[object Arguments]",Us="[object Array]",js="[object Boolean]",$s="[object Date]",zs="[object Error]",Ws="[object Function]",Bs="[object Map]",Vs="[object Number]",Hs="[object Object]",qs="[object RegExp]",Gs="[object Set]",Ks="[object String]",Qs="[object WeakMap]",Js="[object ArrayBuffer]",Zs="[object DataView]",Ys="[object Float32Array]",Xs="[object Float64Array]",el="[object Int8Array]",tl="[object Int16Array]",il="[object Int32Array]",rl="[object Uint8Array]",ol="[object Uint8ClampedArray]",al="[object Uint16Array]",nl="[object Uint32Array]",x={};x[Ys]=x[Xs]=x[el]=x[tl]=x[il]=x[rl]=x[ol]=x[al]=x[nl]=!0;x[Ls]=x[Us]=x[Js]=x[js]=x[Zs]=x[$s]=x[zs]=x[Ws]=x[Bs]=x[Vs]=x[Hs]=x[qs]=x[Gs]=x[Ks]=x[Qs]=!1;function sl(t){return T(t)&&St(t.length)&&!!x[V(t)]}var Yr=sl;function ll(t){return function(r){return t(r)}}var Ne=ll;var Xr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,it=Xr&&typeof module=="object"&&module&&!module.nodeType&&module,dl=it&&it.exports===Xr,li=dl&&bt.process,fl=function(){try{var t=it&&it.require&&it.require("util").types;return t||li&&li.binding&&li.binding("util")}catch{}}(),ee=fl;var eo=ee&&ee.isTypedArray,cl=eo?Ne(eo):Yr,Pe=cl;var ml=Object.prototype,ul=ml.hasOwnProperty;function pl(t,r){var e=U(t),i=!e&&tt(t),o=!e&&!i&&X(t),a=!e&&!i&&!o&&Pe(t),n=e||i||o||a,s=n?qr(t.length,String):[],l=s.length;for(var d in t)(r||ul.call(t,d))&&!(n&&(d=="length"||o&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||yt(d,l)))&&s.push(d);return s}var Ct=pl;var hl=Object.prototype;function gl(t){var r=t&&t.constructor,e=typeof r=="function"&&r.prototype||hl;return t===e}var Le=gl;function bl(t,r){return function(e){return t(r(e))}}var Tt=bl;var xl=Tt(Object.keys,Object),to=xl;var vl=Object.prototype,_l=vl.hasOwnProperty;function yl(t){if(!Le(t))return to(t);var r=[];for(var e in Object(t))_l.call(t,e)&&e!="constructor"&&r.push(e);return r}var io=yl;function Sl(t){return t!=null&&St(t.length)&&!Ee(t)}var fe=Sl;function Cl(t){return fe(t)?Ct(t):io(t)}var Ue=Cl;function Tl(t,r){return t&&Q(r,Ue(r),t)}var ro=Tl;function wl(t){var r=[];if(t!=null)for(var e in Object(t))r.push(e);return r}var oo=wl;var Al=Object.prototype,kl=Al.hasOwnProperty;function Dl(t){if(!A(t))return oo(t);var r=Le(t),e=[];for(var i in t)i=="constructor"&&(r||!kl.call(t,i))||e.push(i);return e}var ao=Dl;function El(t){return fe(t)?Ct(t,!0):ao(t)}var J=El;function Ml(t,r){return t&&Q(r,J(r),t)}var no=Ml;var co=typeof exports=="object"&&exports&&!exports.nodeType&&exports,so=co&&typeof module=="object"&&module&&!module.nodeType&&module,Fl=so&&so.exports===co,lo=Fl?_.Buffer:void 0,fo=lo?lo.allocUnsafe:void 0;function Ol(t,r){if(r)return t.slice();var e=t.length,i=fo?fo(e):new t.constructor(e);return t.copy(i),i}var wt=Ol;function Il(t,r){var e=-1,i=t.length;for(r||(r=Array(i));++e<i;)r[e]=t[e];return r}var At=Il;function Rl(t,r){for(var e=-1,i=t==null?0:t.length,o=0,a=[];++e<i;){var n=t[e];r(n,e,t)&&(a[o++]=n)}return a}var mo=Rl;function Nl(){return[]}var kt=Nl;var Pl=Object.prototype,Ll=Pl.propertyIsEnumerable,uo=Object.getOwnPropertySymbols,Ul=uo?function(t){return t==null?[]:(t=Object(t),mo(uo(t),function(r){return Ll.call(t,r)}))}:kt,je=Ul;function jl(t,r){return Q(t,je(t),r)}var po=jl;function $l(t,r){for(var e=-1,i=r.length,o=t.length;++e<i;)t[o+e]=r[e];return t}var Dt=$l;var zl=Tt(Object.getPrototypeOf,Object),$e=zl;var Wl=Object.getOwnPropertySymbols,Bl=Wl?function(t){for(var r=[];t;)Dt(r,je(t)),t=$e(t);return r}:kt,Et=Bl;function Vl(t,r){return Q(t,Et(t),r)}var ho=Vl;function Hl(t,r,e){var i=r(t);return U(t)?i:Dt(i,e(t))}var Mt=Hl;function ql(t){return Mt(t,Ue,je)}var rt=ql;function Gl(t){return Mt(t,J,Et)}var go=Gl;var Kl=O(_,"DataView"),Ft=Kl;var Ql=O(_,"Promise"),Ot=Ql;var Jl=O(_,"Set"),It=Jl;var Zl=O(_,"WeakMap"),Rt=Zl;var bo="[object Map]",Yl="[object Object]",xo="[object Promise]",vo="[object Set]",_o="[object WeakMap]",yo="[object DataView]",Xl=Z(Ft),ed=Z(se),td=Z(Ot),id=Z(It),rd=Z(Rt),ue=V;(Ft&&ue(new Ft(new ArrayBuffer(1)))!=yo||se&&ue(new se)!=bo||Ot&&ue(Ot.resolve())!=xo||It&&ue(new It)!=vo||Rt&&ue(new Rt)!=_o)&&(ue=function(t){var r=V(t),e=r==Yl?t.constructor:void 0,i=e?Z(e):"";if(i)switch(i){case Xl:return yo;case ed:return bo;case td:return xo;case id:return vo;case rd:return _o}return r});var te=ue;var od=Object.prototype,ad=od.hasOwnProperty;function nd(t){var r=t.length,e=new t.constructor(r);return r&&typeof t[0]=="string"&&ad.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var So=nd;var sd=_.Uint8Array,ze=sd;function ld(t){var r=new t.constructor(t.byteLength);return new ze(r).set(new ze(t)),r}var We=ld;function dd(t,r){var e=r?We(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var Co=dd;var fd=/\w*$/;function cd(t){var r=new t.constructor(t.source,fd.exec(t));return r.lastIndex=t.lastIndex,r}var To=cd;var wo=L?L.prototype:void 0,Ao=wo?wo.valueOf:void 0;function md(t){return Ao?Object(Ao.call(t)):{}}var ko=md;function ud(t,r){var e=r?We(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var Nt=ud;var pd="[object Boolean]",hd="[object Date]",gd="[object Map]",bd="[object Number]",xd="[object RegExp]",vd="[object Set]",_d="[object String]",yd="[object Symbol]",Sd="[object ArrayBuffer]",Cd="[object DataView]",Td="[object Float32Array]",wd="[object Float64Array]",Ad="[object Int8Array]",kd="[object Int16Array]",Dd="[object Int32Array]",Ed="[object Uint8Array]",Md="[object Uint8ClampedArray]",Fd="[object Uint16Array]",Od="[object Uint32Array]";function Id(t,r,e){var i=t.constructor;switch(r){case Sd:return We(t);case pd:case hd:return new i(+t);case Cd:return Co(t,e);case Td:case wd:case Ad:case kd:case Dd:case Ed:case Md:case Fd:case Od:return Nt(t,e);case gd:return new i;case bd:case _d:return new i(t);case xd:return To(t);case vd:return new i;case yd:return ko(t)}}var Do=Id;var Eo=Object.create,Rd=function(){function t(){}return function(r){if(!A(r))return{};if(Eo)return Eo(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}(),Mo=Rd;function Nd(t){return typeof t.constructor=="function"&&!Le(t)?Mo($e(t)):{}}var Pt=Nd;var Pd="[object Map]";function Ld(t){return T(t)&&te(t)==Pd}var Fo=Ld;var Oo=ee&&ee.isMap,Ud=Oo?Ne(Oo):Fo,Io=Ud;var jd="[object Set]";function $d(t){return T(t)&&te(t)==jd}var Ro=$d;var No=ee&&ee.isSet,zd=No?Ne(No):Ro,Po=zd;var Wd=1,Bd=2,Vd=4,Lo="[object Arguments]",Hd="[object Array]",qd="[object Boolean]",Gd="[object Date]",Kd="[object Error]",Uo="[object Function]",Qd="[object GeneratorFunction]",Jd="[object Map]",Zd="[object Number]",jo="[object Object]",Yd="[object RegExp]",Xd="[object Set]",ef="[object String]",tf="[object Symbol]",rf="[object WeakMap]",of="[object ArrayBuffer]",af="[object DataView]",nf="[object Float32Array]",sf="[object Float64Array]",lf="[object Int8Array]",df="[object Int16Array]",ff="[object Int32Array]",cf="[object Uint8Array]",mf="[object Uint8ClampedArray]",uf="[object Uint16Array]",pf="[object Uint32Array]",g={};g[Lo]=g[Hd]=g[of]=g[af]=g[qd]=g[Gd]=g[nf]=g[sf]=g[lf]=g[df]=g[ff]=g[Jd]=g[Zd]=g[jo]=g[Yd]=g[Xd]=g[ef]=g[tf]=g[cf]=g[mf]=g[uf]=g[pf]=!0;g[Kd]=g[Uo]=g[rf]=!1;function Lt(t,r,e,i,o,a){var n,s=r&Wd,l=r&Bd,d=r&Vd;if(e&&(n=o?e(t,i,o,a):e(t)),n!==void 0)return n;if(!A(t))return t;var u=U(t);if(u){if(n=So(t),!s)return At(t,n)}else{var m=te(t),c=m==Uo||m==Qd;if(X(t))return wt(t,s);if(m==jo||m==Lo||c&&!o){if(n=l||c?{}:Pt(t),!s)return l?ho(t,no(n,t)):po(t,ro(n,t))}else{if(!g[m])return o?t:{};n=Do(t,m,s)}}a||(a=new de);var b=a.get(t);if(b)return b;a.set(t,n),Po(t)?t.forEach(function(y){n.add(Lt(y,r,e,y,t,a))}):Io(t)&&t.forEach(function(y,k){n.set(k,Lt(y,r,e,k,t,a))});var p=d?l?go:rt:l?J:Ue,S=u?void 0:p(t);return Hr(S||t,function(y,k){S&&(k=y,y=t[k]),_t(n,k,Lt(y,r,e,k,t,a))}),n}var $o=Lt;var hf=1,gf=4;function bf(t){return $o(t,hf|gf)}var di=bf;var xf="/signalk/v1/",zo="auth/login",vf="auth/logout",_f="auth/validate",yf=60,Wo=(()=>{class t{http=f(Se);conn=f(ke);_IsLoggedIn$=new v(!1);isLoggedIn$=this._IsLoggedIn$.asObservable();_authToken$=new v(null);authToken$=this._authToken$.asObservable();connectionEndpointSubscription=null;authTokenSubscription=null;isRenewingToken=!1;loginUrl=null;logoutUrl=null;validateTokenUrl=null;constructor(){let e=JSON.parse(localStorage.getItem("authorization_token"));e&&(e.isDeviceAccessToken?e.expiry===null?(console.log("[Authentication Service] Device Access Token found with expiry: NEVER"),this._authToken$.next(e)):this.isTokenExpired(e.expiry)?(console.log("[Authentication Service] Device Access Token expired. Deleting token"),localStorage.removeItem("authorization_token")):(console.log("[Authentication Service] Device Access Token found in Local Storage"),this._authToken$.next(e)):(console.log("[Authentication Service] User session token found in Local Storage"),console.log("[Authentication Service] Deleting user session token"),localStorage.removeItem("authorization_token"))),this.authTokenSubscription=this._authToken$.pipe(ge(i=>!!i&&i.expiry!==null),Fi((i,o)=>i.expiry===o.expiry),he(i=>{let o=this.getTokenExpirationDate(i.expiry,yf),a=o.getTime()-Date.now();return console.log(`[Authentication Service] Token refresh timer set for ${a} ms (Token Expiry: ${o.toISOString()})`),Math.max(a,0)}),Pi(i=>ki(i))).subscribe(()=>{this.handleTokenRenewal()}),this.connectionEndpointSubscription=this.conn.serverServiceEndpoint$.subscribe(i=>{if(i.operation===2){let o=i.httpServiceUrl.substring(0,i.httpServiceUrl.length-4);this.loginUrl=o+zo,this.logoutUrl=o+vf,this.validateTokenUrl=o+_f}})}handleTokenRenewal(){if(this.isRenewingToken){console.warn("[Authentication Service] Token renewal already in progress.");return}this.isRenewingToken=!0;let e=JSON.parse(localStorage.getItem("authorization_token"));if(!e){console.warn("[Authentication Service] No token found in local storage. Cannot renew."),this.isRenewingToken=!1;return}if(e.isDeviceAccessToken)console.warn("[Authentication Service] Device Access Token expired. Manual renewal required."),this.isRenewingToken=!1;else if(this.isTokenExpired(e.expiry))console.log("[Authentication Service] User session Token expired. Cannot renew."),this.isRenewingToken=!1;else{console.log("[Authentication Service] User session Token expires soon. Renewing token...");let i=JSON.parse(localStorage.getItem("connectionConfig"));this.login({usr:i.loginName,pwd:i.loginPassword}).then(()=>{console.log("[Authentication Service] Token successfully renewed.")}).catch(o=>{console.error("[Authentication Service] Token renewal failed. Server returned:",o.error)}).finally(()=>{this.isRenewingToken=!1})}}login(a){return j(this,arguments,function*({usr:e,pwd:i,newUrl:o}){let n;if(o?n=o.replace(/\/+$/,"")+xf+zo:n=this.loginUrl,this._IsLoggedIn$.getValue()&&(yield this.logout(!0)),!n)throw console.error("[Authentication Service] Login URL is not set. Cannot perform login."),this.deleteToken(),new Error("Login URL is not set.");yield H(this.http.post(n,{username:e,password:i},{observe:"response"})).then(s=>{console.log("[Authentication Service] User "+e+" login successful"),this.setSession(s.body.token)}).catch(s=>{this.deleteToken(),this.handleError(s)})})}handleError(e){throw e.status===0?(console.error("[Authentication Service] An error occurred:",e.error),this.deleteToken()):console.error(`[Authentication Service] Backend returned code ${e.status}, body was: `,e.error),e}setSession(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!1};i===void 0?(o.token=e,console.log("[Authentication Service] User Session Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Session Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Session Authorization Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!0),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}isTokenExpired(e){return Math.floor(new Date().getTime()/1e3)>=e}getTokenExpirationDate(e,i){let o=new Date(0);if(i){let a=new Date(0);a.setUTCSeconds(e-i),o=a}else o.setUTCSeconds(e);return o}renewToken(){return this.http.post(this.validateTokenUrl,null,{observe:"response"})}logout(e){return j(this,null,function*(){localStorage.removeItem("authorization_token"),yield H(this.http.put(this.logoutUrl,null)).then(()=>{this._IsLoggedIn$.next(!1),e||this._authToken$.next(null),console.log("[Authentication Service] User logged out")}).catch(i=>{console.error(i)})})}deleteToken(){this._authToken$&&(console.log("[Authentication Service] Deleting Authorization token"),localStorage.removeItem("authorization_token"),this._IsLoggedIn$.next(!1),this._authToken$.next(null))}setDeviceAccessToken(e){if(e){let i=JSON.parse(atob(e.split(".")[1])).exp,o={token:null,expiry:null,isDeviceAccessToken:!0};i===void 0?(o.token=e,console.log("[Authentication Service] Device Access Token received. Token Expiration: NEVER"),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o))):this.isTokenExpired(i)?console.log("[Authentication Service] Received expired Device Access Token from server"):(o.token=e,o.expiry=i,console.log("[Authentication Service] Device Access Token received. Token Expiration: "+this.getTokenExpirationDate(o.expiry)),this._IsLoggedIn$.next(!1),this._authToken$.next(o),localStorage.setItem("authorization_token",JSON.stringify(o)))}}ngOnDestroy(){this.connectionEndpointSubscription?.unsubscribe(),this.authTokenSubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Sf={url:"",deserializer:t=>JSON.parse(t.data),serializer:t=>JSON.stringify(t)},Cf="WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }",Ut=class t extends yi{constructor(r,e){if(super(),this._socket=null,r instanceof Ve)this.destination=e,this.source=r;else{let i=this._config=Object.assign({},Sf);if(this._output=new h,typeof r=="string")i.url=r;else for(let o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);if(!i.WebSocketCtor&&WebSocket)i.WebSocketCtor=WebSocket;else if(!i.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new pe}}lift(r){let e=new t(this._config,this.destination);return e.operator=r,e.source=this,e}_resetState(){this._socket=null,this.source||(this.destination=new pe),this._output=new h}multiplex(r,e,i){let o=this;return new Ve(a=>{try{o.next(r())}catch(s){a.error(s)}let n=o.subscribe({next:s=>{try{i(s)&&a.next(s)}catch(l){a.error(l)}},error:s=>a.error(s),complete:()=>a.complete()});return()=>{try{o.next(e())}catch(s){a.error(s)}n.unsubscribe()}})}_connectSocket(){let{WebSocketCtor:r,protocol:e,url:i,binaryType:o}=this._config,a=this._output,n=null;try{n=e?new r(i,e):new r(i),this._socket=n,o&&(this._socket.binaryType=o)}catch(l){a.error(l);return}let s=new lt(()=>{this._socket=null,n&&n.readyState===1&&n.close()});n.onopen=l=>{let{_socket:d}=this;if(!d){n.close(),this._resetState();return}let{openObserver:u}=this._config;u&&u.next(l);let m=this.destination;this.destination=_i.create(c=>{if(n.readyState===1)try{let{serializer:b}=this._config;n.send(b(c))}catch(b){this.destination.error(b)}},c=>{let{closingObserver:b}=this._config;b&&b.next(void 0),c&&c.code?n.close(c.code,c.reason):a.error(new TypeError(Cf)),this._resetState()},()=>{let{closingObserver:c}=this._config;c&&c.next(void 0),n.close(),this._resetState()}),m&&m instanceof pe&&s.add(m.subscribe(this.destination))},n.onerror=l=>{this._resetState(),a.error(l)},n.onclose=l=>{n===this._socket&&this._resetState();let{closeObserver:d}=this._config;d&&d.next(l),l.wasClean?a.complete():a.error(l)},n.onmessage=l=>{try{let{deserializer:d}=this._config;a.next(d(l))}catch(d){a.error(d)}}}_subscribe(r){let{source:e}=this;return e?e.subscribe(r):(this._socket||this._connectSocket(),this._output.subscribe(r),r.add(()=>{let{_socket:i}=this;this._output.observers.length===0&&(i&&(i.readyState===1||i.readyState===0)&&i.close(),this._resetState())}),r)}unsubscribe(){let{_socket:r}=this;r&&(r.readyState===1||r.readyState===0)&&r.close(),this._resetState(),super.unsubscribe()}};function fi(t){return new Ut(t)}var Bo=(()=>{class t{_destroyRef=f(mt);_skRequests$=new h;_skNotificationsMsg$=new h;_skValue$=new h;_skMetadata$=new h;_vesselSelfUrn$=new h;_selfUrn=void 0;streamEndpoint={operation:0,message:"Not connected",hasToken:!1};streamEndpoint$=new v(this.streamEndpoint);endpointWS=null;SubscriptionType="self";WS_RECONNECT_INTERVAL=5e3;WS_RETRY_COUNT=5;WS_CONNECTION_SUBSCRIBE="?subscribe=";WS_CONNECTION_META="&sendMeta=all";socketWS$;socketWSCloseEvent$=new h;socketWSOpenEvent$=new h;authToken=null;timeoutIds=[];server=f(ke);auth=f(Wo);zones=f(I);constructor(){this.server.serverServiceEndpoint$.pipe(P(this._destroyRef)).subscribe(e=>{let i=null;e.operation===2?i="New endpoint":i="Connection stopped",e.operation===2?(this.endpointWS=e.WsServiceUrl,this.socketWS$&&this.streamEndpoint.operation!==4&&this.closeWS(i),this.timeoutIds.push(setTimeout(()=>{this.connectWS(i)},250))):this.socketWS$&&e.operation!==1&&this.streamEndpoint.operation!==4&&this.closeWS(i),e.subscribeAll?this.SubscriptionType="all":this.SubscriptionType="self"}),this.auth.authToken$.pipe(P(this._destroyRef)).subscribe(e=>{if(this.authToken!=e){this.authToken=e;let i=null;e?i="New token":i="Deleted Token",this.socketWS$&&(this.streamEndpoint.operation===2||this.streamEndpoint.operation===1)&&(this.closeWS(i),this.timeoutIds.push(setTimeout(()=>{this.connectWS(i)},250)))}}),this.socketWSOpenEvent$.pipe(P(this._destroyRef)).subscribe(()=>{this.streamEndpoint.message="Connected",this.streamEndpoint.operation=2,this.authToken?console.log("[Delta Service] WebSocket connected with Authorization Token"):console.log("[Delta Service] WebSocket connected without Authorization Token"),this.streamEndpoint$.next(this.streamEndpoint)}),this.socketWSCloseEvent$.pipe(P(this._destroyRef)).subscribe(e=>{e.wasClean?(this.streamEndpoint.message="WebSocket closed",this.streamEndpoint.operation=0,console.log("[Delta Service] WebSocket closed")):(console.log("[Delta Service] WebSocket terminated due to socket error"),this.streamEndpoint.message="WebSocket error",this.streamEndpoint.operation=3,console.log("[Delta Service] WebSocket closed")),this.streamEndpoint$.next(this.streamEndpoint)}),Ai(document,"visibilitychange").pipe(P(this._destroyRef)).subscribe(()=>{document.visibilityState==="visible"?(console.log("[Delta Service] App resumed, checking WebSocket connection..."),this.checkAndReconnect("App resumed")):document.visibilityState==="hidden"&&console.log("[Delta Service] App suspended")})}connectWS(e){this.streamEndpoint.message="Connecting",this.streamEndpoint.operation=1,console.log(`[Delta Service] ${e}: WebSocket opening...`),this.streamEndpoint$.next(this.streamEndpoint),this.socketWS$=this.getNewWebSocket(),this.zones.runOutsideAngular(()=>{this.socketWS$.pipe(Ii({count:this.WS_RETRY_COUNT,delay:(i,o)=>(console.error(`[Delta Service] WebSocket error (attempt ${o}): ${JSON.stringify(i,["code","message","type"])}`),dt(i).pipe(Mi(this.WS_RECONNECT_INTERVAL)))})).pipe(P(this._destroyRef)).subscribe({next:i=>this.processWebsocketMessage(i),error:i=>console.error("[Delta Service] WebSocket connection failed after maximum retries:",i)})})}getNewWebSocket(){let e=this.WS_CONNECTION_SUBSCRIBE+this.SubscriptionType+this.WS_CONNECTION_META;return this.authToken!=null?(e+="&token="+this.authToken.token,this.streamEndpoint.hasToken=!0):this.streamEndpoint.hasToken=!1,fi({url:this.endpointWS+e,closeObserver:this.socketWSCloseEvent$,openObserver:this.socketWSOpenEvent$})}closeWS(e){this.socketWS$&&(this.streamEndpoint.operation=4,console.log("[Delta Service] "+e+": WebSocket closing..."),this.socketWS$.complete())}publishDelta(e){this.socketWS$?(console.log("[Delta Service] WebSocket sending message"),this.socketWS$.next(e)):(this.timeoutIds.push(setTimeout(()=>{this.socketWS$&&(console.log("[Delta Service] WebSocket retry sending message"),this.socketWS$.next(e))},1e3)),console.log("[Delta Service] No WebSocket present to send message"))}processWebsocketMessage(e){if(e.updates){this.parseUpdates(e.updates,e.context);return}if(e.requestId){this._skRequests$.next(e);return}if(e.errorMessage){console.warn("[Delta Service] Service received stream error message: "+e.errorMessage);return}if(e.self){this._selfUrn=e.self,this._vesselSelfUrn$.next(e.self),this.server.setServerInfo(e.name,e.version,e.roles);return}console.warn("[Delta Service] Unknown message type. Message content:"+e)}parseUpdates(e,i){e.forEach(o=>{o.meta!==void 0&&o.meta.forEach(a=>this.parseSkMeta(a,i)),o.values!==void 0&&o.values.forEach(a=>{if(a.path.startsWith("notifications."))this._skNotificationsMsg$.next(a);else if(typeof a.value=="object"&&a.value!==null)Object.keys(a.value).forEach(n=>{let s={context:i,path:`${a.path}.${n}`,source:o.$source,timestamp:o.timestamp,value:a.value[n]};o.$source=="defaults"&&a.path==""&&(s.path=s.path.slice(1)),i!=this._selfUrn&&a.path==""&&(s.path=s.path.slice(1)),this._skValue$.next(s)});else{let n={context:i,path:a.path,source:o.$source,timestamp:o.timestamp,value:a.value};this._skValue$.next(n)}})})}parseSkMeta(e,i){e.value.properties!==void 0?Object.keys(e.value.properties).forEach(o=>{this._skMetadata$.next({context:i,path:`${e.path}.${o}`,meta:e.value.properties[o]})}):this._skMetadata$.next({context:i,path:e.path,meta:e.value})}getDataStreamStatusAsO(){return this.streamEndpoint$.asObservable()}subscribeRequestUpdates(){return this._skRequests$.asObservable()}subscribeNotificationsUpdates(){return this._skNotificationsMsg$.asObservable()}subscribeDataPathsUpdates(){return this._skValue$.asObservable()}subscribeMetadataUpdates(){return this._skMetadata$.asObservable()}subscribeSelfUpdates(){return this._vesselSelfUrn$.asObservable()}checkAndReconnect(e){this.streamEndpoint.operation!==2?(console.log(`[Delta Service] ${e}: WebSocket not connected, attempting to reconnect...`),this.closeWS(e),this.timeoutIds.push(setTimeout(()=>this.connectWS(e),250))):console.log(`[Delta Service] ${e}: WebSocket is already connected.`)}ngOnDestroy(){this.closeWS("App terminated"),this._skRequests$.complete(),this._skNotificationsMsg$.complete(),this._skValue$.complete(),this._skMetadata$.complete(),this._vesselSelfUrn$.complete(),this.streamEndpoint$.complete(),this.socketWSOpenEvent$.complete(),this.socketWSCloseEvent$.complete(),this.socketWS$?.complete(),this.timeoutIds.forEach(e=>clearTimeout(e))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Tf(t){return t}var jt=Tf;function wf(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}var Vo=wf;var Af=800,kf=16,Df=Date.now;function Ef(t){var r=0,e=0;return function(){var i=Df(),o=kf-(i-e);if(e=i,o>0){if(++r>=Af)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}var Ho=Ef;function Mf(t){return function(){return t}}var qo=Mf;var Ff=Ie?function(t,r){return Ie(t,"toString",{configurable:!0,enumerable:!1,value:qo(r),writable:!0})}:jt,Go=Ff;var Of=Ho(Go),Ko=Of;var Qo=Math.max;function If(t,r,e){return r=Qo(r===void 0?t.length-1:r,0),function(){for(var i=arguments,o=-1,a=Qo(i.length-r,0),n=Array(a);++o<a;)n[o]=i[r+o];o=-1;for(var s=Array(r+1);++o<r;)s[o]=i[o];return s[r]=e(n),Vo(t,this,s)}}var Jo=If;function Rf(t,r){return Ko(Jo(t,r,jt),t+"")}var Zo=Rf;function Nf(t,r,e){if(!A(e))return!1;var i=typeof r;return(i=="number"?fe(e)&&yt(r,e.length):i=="string"&&r in e)?K(e[r],t):!1}var Yo=Nf;function Pf(t){return Zo(function(r,e){var i=-1,o=e.length,a=o>1?e[o-1]:void 0,n=o>2?e[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,n&&Yo(e[0],e[1],n)&&(a=o<3?void 0:a,o=1),r=Object(r);++i<o;){var s=e[i];s&&t(r,s,i,a)}return r})}var Xo=Pf;var Lf="[object Object]",Uf=Function.prototype,jf=Object.prototype,ea=Uf.toString,$f=jf.hasOwnProperty,zf=ea.call(Object);function Wf(t){if(!T(t)||V(t)!=Lf)return!1;var r=$e(t);if(r===null)return!0;var e=$f.call(r,"constructor")&&r.constructor;return typeof e=="function"&&e instanceof e&&ea.call(e)==zf}var ta=Wf;var Bf="__lodash_hash_undefined__";function Vf(t){return this.__data__.set(t,Bf),this}var ia=Vf;function Hf(t){return this.__data__.has(t)}var ra=Hf;function $t(t){var r=-1,e=t==null?0:t.length;for(this.__data__=new vt;++r<e;)this.add(t[r])}$t.prototype.add=$t.prototype.push=ia;$t.prototype.has=ra;var oa=$t;function qf(t,r){for(var e=-1,i=t==null?0:t.length;++e<i;)if(r(t[e],e,t))return!0;return!1}var aa=qf;function Gf(t,r){return t.has(r)}var na=Gf;var Kf=1,Qf=2;function Jf(t,r,e,i,o,a){var n=e&Kf,s=t.length,l=r.length;if(s!=l&&!(n&&l>s))return!1;var d=a.get(t),u=a.get(r);if(d&&u)return d==r&&u==t;var m=-1,c=!0,b=e&Qf?new oa:void 0;for(a.set(t,r),a.set(r,t);++m<s;){var p=t[m],S=r[m];if(i)var y=n?i(S,p,m,r,t,a):i(p,S,m,t,r,a);if(y!==void 0){if(y)continue;c=!1;break}if(b){if(!aa(r,function(k,ce){if(!na(b,ce)&&(p===k||o(p,k,e,i,a)))return b.push(ce)})){c=!1;break}}else if(!(p===S||o(p,S,e,i,a))){c=!1;break}}return a.delete(t),a.delete(r),c}var zt=Jf;function Zf(t){var r=-1,e=Array(t.size);return t.forEach(function(i,o){e[++r]=[o,i]}),e}var sa=Zf;function Yf(t){var r=-1,e=Array(t.size);return t.forEach(function(i){e[++r]=i}),e}var la=Yf;var Xf=1,ec=2,tc="[object Boolean]",ic="[object Date]",rc="[object Error]",oc="[object Map]",ac="[object Number]",nc="[object RegExp]",sc="[object Set]",lc="[object String]",dc="[object Symbol]",fc="[object ArrayBuffer]",cc="[object DataView]",da=L?L.prototype:void 0,ci=da?da.valueOf:void 0;function mc(t,r,e,i,o,a,n){switch(e){case cc:if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case fc:return!(t.byteLength!=r.byteLength||!a(new ze(t),new ze(r)));case tc:case ic:case ac:return K(+t,+r);case rc:return t.name==r.name&&t.message==r.message;case nc:case lc:return t==r+"";case oc:var s=sa;case sc:var l=i&Xf;if(s||(s=la),t.size!=r.size&&!l)return!1;var d=n.get(t);if(d)return d==r;i|=ec,n.set(t,r);var u=zt(s(t),s(r),i,o,a,n);return n.delete(t),u;case dc:if(ci)return ci.call(t)==ci.call(r)}return!1}var fa=mc;var uc=1,pc=Object.prototype,hc=pc.hasOwnProperty;function gc(t,r,e,i,o,a){var n=e&uc,s=rt(t),l=s.length,d=rt(r),u=d.length;if(l!=u&&!n)return!1;for(var m=l;m--;){var c=s[m];if(!(n?c in r:hc.call(r,c)))return!1}var b=a.get(t),p=a.get(r);if(b&&p)return b==r&&p==t;var S=!0;a.set(t,r),a.set(r,t);for(var y=n;++m<l;){c=s[m];var k=t[c],ce=r[c];if(i)var vi=n?i(ce,k,c,r,t,a):i(k,ce,c,t,r,a);if(!(vi===void 0?k===ce||o(k,ce,e,i,a):vi)){S=!1;break}y||(y=c=="constructor")}if(S&&!y){var nt=t.constructor,st=r.constructor;nt!=st&&"constructor"in t&&"constructor"in r&&!(typeof nt=="function"&&nt instanceof nt&&typeof st=="function"&&st instanceof st)&&(S=!1)}return a.delete(t),a.delete(r),S}var ca=gc;var bc=1,ma="[object Arguments]",ua="[object Array]",Wt="[object Object]",xc=Object.prototype,pa=xc.hasOwnProperty;function vc(t,r,e,i,o,a){var n=U(t),s=U(r),l=n?ua:te(t),d=s?ua:te(r);l=l==ma?Wt:l,d=d==ma?Wt:d;var u=l==Wt,m=d==Wt,c=l==d;if(c&&X(t)){if(!X(r))return!1;n=!0,u=!1}if(c&&!u)return a||(a=new de),n||Pe(t)?zt(t,r,e,i,o,a):fa(t,r,l,e,i,o,a);if(!(e&bc)){var b=u&&pa.call(t,"__wrapped__"),p=m&&pa.call(r,"__wrapped__");if(b||p){var S=b?t.value():t,y=p?r.value():r;return a||(a=new de),o(S,y,e,i,a)}}return c?(a||(a=new de),ca(t,r,e,i,o,a)):!1}var ha=vc;function ga(t,r,e,i,o){return t===r?!0:t==null||r==null||!T(t)&&!T(r)?t!==t&&r!==r:ha(t,r,e,i,ga,o)}var ba=ga;function _c(t){return function(r,e,i){for(var o=-1,a=Object(r),n=i(r),s=n.length;s--;){var l=n[t?s:++o];if(e(a[l],l,a)===!1)break}return r}}var xa=_c;var yc=xa(),va=yc;function Sc(t,r,e){(e!==void 0&&!K(t[r],e)||e===void 0&&!(r in t))&&Re(t,r,e)}var ot=Sc;function Cc(t){return T(t)&&fe(t)}var _a=Cc;function Tc(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}var at=Tc;function wc(t){return Q(t,J(t))}var ya=wc;function Ac(t,r,e,i,o,a,n){var s=at(t,e),l=at(r,e),d=n.get(l);if(d){ot(t,e,d);return}var u=a?a(s,l,e+"",t,r,n):void 0,m=u===void 0;if(m){var c=U(l),b=!c&&X(l),p=!c&&!b&&Pe(l);u=l,c||b||p?U(s)?u=s:_a(s)?u=At(s):b?(m=!1,u=wt(l,!0)):p?(m=!1,u=Nt(l,!0)):u=[]:ta(l)||tt(l)?(u=s,tt(s)?u=ya(s):(!A(s)||Ee(s))&&(u=Pt(l))):m=!1}m&&(n.set(l,u),o(u,l,i,a,n),n.delete(l)),ot(t,e,u)}var Sa=Ac;function Ca(t,r,e,i,o){t!==r&&va(r,function(a,n){if(o||(o=new de),A(a))Sa(t,r,n,e,Ca,i,o);else{var s=i?i(at(t,n),a,n+"",t,r,o):void 0;s===void 0&&(s=a),ot(t,n,s)}},J)}var Ta=Ca;function kc(t,r){return ba(t,r)}var Dc=kc;var Ec=Xo(function(t,r,e){Ta(t,r,e)}),mi=Ec;var Be=function(t){return t.Normal="normal",t.Nominal="nominal",t.Alert="alert",t.Warn="warn",t.Alarm="alarm",t.Emergency="emergency",t}(Be||{});var Mc=function(t){return t.Visual="visual",t.Sound="sound",t}(Mc||{});var Fc="self",wa=t=>isFinite(+(t instanceof Date?t:new Date(t)))?!!new RegExp("^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$").test(t):!1,Aa=t=>{if(t)return t==="RFC 3339 (UTC)"?"Date":"number"},ny=(()=>{class t{delta=f(Bo);_destroyRef=f(mt);_deltaUpdatesCounter=null;_deltaUpdatesSubject=new pe(60);_deltaUpdatesCounterTimer=null;_isSkDataFullTreeActive=!1;_skDataSubject$=new v([]);_dataServiceMeta=[];_isSkMetaFullTreeActive=!1;_dataServiceMetaSubject$=new v([]);_skNotificationMsg$=new h;_skNotificationMeta$=new h;_isReset=new h;_selfUrn="self";_skData=[];_pathRegister=[];constructor(){this._deltaUpdatesCounterTimer=setInterval(()=>{if(this._deltaUpdatesCounter!==null){let e={timestamp:Date.now(),value:this._deltaUpdatesCounter};this._deltaUpdatesSubject.next(e),this._deltaUpdatesCounter=0}},1e3),this.delta.subscribeDataPathsUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.updatePathData(e)}),this.delta.subscribeMetadataUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.setMeta(e)}),this.delta.subscribeNotificationsUpdates().pipe(P(this._destroyRef)).subscribe(e=>{let i=e.path.replace("notifications.","self."),o=this._skData.find(a=>a.path==i);if(o&&o.state!==e.value.state){o.state=e.value.state;let a=this._pathRegister.find(n=>n.path==i);a&&a._pathState$.next(o.state)}this._skNotificationMsg$.next(e)}),this.delta.subscribeSelfUpdates().pipe(P(this._destroyRef)).subscribe(e=>{this.setSelfUrn(e)})}getSignalkDeltaUpdateStatistics(){return this._deltaUpdatesSubject.asObservable()}resetSignalKData(){this._skData=[],this._selfUrn="self",this._isReset.next(!0)}unsubscribePath(e){let i=this._pathRegister.findIndex(o=>o.path===e);if(i!==-1){let o=this._pathRegister[i];o._pathData$?.complete(),o._pathState$?.complete(),o.pathDataUpdate$?.complete(),o.pathMeta$?.complete(),this._pathRegister.splice(i,1)}}subscribePath(e,i){let o=this._pathRegister.find(p=>p.path===e&&p.source===i);if(o)return o.pathDataUpdate$;let a=null,n=null,s=null,l=Be.Normal,d={data:{value:null,timestamp:null},state:l},u=null,m=this._skData.find(p=>p.path==e);this._skData.length&&m&&(a=i==="default"?m.pathValue:m.sources?.[i]?.sourceValue??null,n=i==="default"?m.pathTimestamp:m.sources?.[i]?.sourceTimestamp??null,s=n?new Date(n):null,d={data:{value:a,timestamp:s},state:m.state||l},l=m.state||l,u=m.meta||null);let c={path:e,source:i,_pathData$:new v(d.data),_pathState$:new v(d.state),pathDataUpdate$:new v(d),pathMeta$:new v(u)};return wi([c._pathData$,c._pathState$]).pipe(he(([p,S])=>({data:p,state:S}))).subscribe(p=>c.pathDataUpdate$.next(p)),this._pathRegister.push(c),c.pathDataUpdate$}updatePathData(e){this._deltaUpdatesCounter++;let i=this.setPathContext(e.context,e.path),o=this._skData.find(n=>n.path==i);if(o)o.defaultSource===void 0&&(o.defaultSource=e.source),o.type===void 0&&e.value!==null&&(o.type=typeof e.value,o.type==="string"&&wa(e.value)&&(o.type="Date")),o.pathValue=e.value,o.pathTimestamp=e.timestamp,o.sources[e.source]={sourceTimestamp:e.timestamp,sourceValue:e.value};else{let n=typeof e.value;n==="string"&&wa(e.value)&&(n="Date"),o={path:i,pathValue:e.value,pathTimestamp:e.timestamp,defaultSource:e.source,type:n,state:Be.Normal,sources:{[e.source]:{sourceTimestamp:e.timestamp,sourceValue:e.value}}},this._skData.push(o)}let a=this._pathRegister.filter(n=>n.path===i);if(a.length){let n={value:o.pathValue,timestamp:new Date(o.pathTimestamp)},s=a.find(d=>d.source==="default");s&&s._pathData$.next(n);let l=a.find(d=>d.source===e.source);l&&l._pathData$.next(n)}this._isSkDataFullTreeActive&&this._skDataSubject$.next(this._skData)}setMeta(e){if(e.path.startsWith("notifications."))this._skNotificationMeta$.next(e);else{let i=this.setPathContext(e.context,e.path),o=this._skData.find(n=>n.path===i);o?(o.type==="object"&&e.meta.units&&(o.type=Aa(e.meta.units)),o.meta=mi(o.meta,e.meta)):(o={path:i,pathValue:void 0,pathTimestamp:void 0,type:Aa(e.meta.units),state:Be.Normal,defaultSource:void 0,sources:{},meta:e.meta},this._skData.push(o));let a=this._pathRegister.find(n=>n.path===i);a&&a.pathMeta$.next(o.meta),this._isSkMetaFullTreeActive&&(this._dataServiceMeta.push({path:i,meta:o.meta}),this._dataServiceMetaSubject$.next(this._dataServiceMeta))}}startSkMetaFullTree(){return this._isSkMetaFullTreeActive=!0,this._dataServiceMeta=this._skData.filter(e=>e.meta!==void 0&&e.path.startsWith("self.")).map(e=>({path:e.path,meta:e.meta})),this._dataServiceMetaSubject$.next(this._dataServiceMeta),this._dataServiceMetaSubject$}stopSkMetaFullTree(){this._isSkMetaFullTreeActive=!1,this._dataServiceMetaSubject$.next(null),this._dataServiceMeta=null}startSkDataFullTree(){return this._isSkDataFullTreeActive=!0,this._skDataSubject$.next(this._skData),this._skDataSubject$}stopSkDataFullTree(){this._isSkDataFullTreeActive=!1}setSelfUrn(e){e!==""||e!==null?(console.debug("[Signal K Data Service] Setting self to: "+e),this._selfUrn=e):console.error("[Signal K Data Service] Invalid self URN: "+e)}setPathContext(e,i){return e!==this._selfUrn?`${e}.${i}`:`${Fc}.${i}`}getPathsByType(e,i){return this._skData.filter(o=>o.type===e&&(!i||o.path.startsWith("self"))).map(o=>o.path)}getPathsAndMetaByType(e,i,o){return this._skData.filter(a=>{let n=a.type===e,s=!o||a.path.startsWith("self"),l=i===!0?a.meta?.supportsPut===!0:!0;return n&&s&&l}).map(a=>({path:a.path,meta:a.meta}))}getPathObject(e){return di(this._skData.find(i=>i.path===e))||null}getPathUnitType(e){return this._skData.find(i=>i.path===e)?.meta?.units||null}timeoutPathObservable(e,i){let o=this._pathRegister.find(a=>a.path==e);if(o){let a;["string","Date","number"].includes(i)&&(a={data:{value:null,timestamp:null},state:Be.Normal}),o.pathDataUpdate$.next(a)}}getNotificationMsgObservable(){return this._skNotificationMsg$.asObservable()}getNotificationMetaObservable(){return this._skNotificationMeta$.asObservable()}getPathMetaObservable(e){return this._pathRegister.find(o=>o.path==e)?.pathMeta$.asObservable()||dt(null)}getPathMeta(e){return this._skData.find(i=>i.path===e)?.meta||null}isResetService(){return this._isReset.asObservable()}ngOnDestroy(){this._deltaUpdatesSubject?.complete(),this._skNotificationMsg$?.complete(),this._skNotificationMeta$?.complete(),this._isReset?.complete(),this._skDataSubject$?.complete(),this._dataServiceMetaSubject$?.complete(),this._deltaUpdatesCounterTimer&&clearInterval(this._deltaUpdatesCounterTimer)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ui=class{_box;_destroyed=new h;_resizeSubject=new h;_resizeObserver;_elementObservables=new Map;constructor(r){this._box=r,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(r){return this._elementObservables.has(r)||this._elementObservables.set(r,new Ve(e=>{let i=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(r,{box:this._box}),()=>{this._resizeObserver?.unobserve(r),i.unsubscribe(),this._elementObservables.delete(r)}}).pipe(ge(e=>e.some(i=>i.target===r)),Ri({bufferSize:1,refCount:!0}),ct(this._destroyed))),this._elementObservables.get(r)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},ka=(()=>{class t{_cleanupErrorListener;_observers=new Map;_ngZone=f(I);constructor(){typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.()}observe(e,i){let o=i?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new ui(o)),this._observers.get(o).observe(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Oc=["notch"],Ic=["matFormFieldNotchedOutline",""],Rc=["*"],Da=["iconPrefixContainer"],Ea=["textPrefixContainer"],Ma=["iconSuffixContainer"],Fa=["textSuffixContainer"],Nc=["textField"],Pc=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Lc=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Uc(t,r){t&1&&me(0,"span",20)}function jc(t,r){if(t&1&&(R(0,"label",19),W(1,1),M(2,Uc,1,0,"span",20),N()),t&2){let e=re(2);ve("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Ge("for",e._control.disableAutomaticLabeling?null:e._control.id),w(2),F(!e.hideRequiredMarker&&e._control.required?2:-1)}}function $c(t,r){if(t&1&&M(0,jc,3,5,"label",19),t&2){let e=re();F(e._hasFloatingLabel()?0:-1)}}function zc(t,r){t&1&&me(0,"div",7)}function Wc(t,r){}function Bc(t,r){if(t&1&&pt(0,Wc,0,0,"ng-template",13),t&2){re(2);let e=Jt(1);ve("ngTemplateOutlet",e)}}function Vc(t,r){if(t&1&&(R(0,"div",9),M(1,Bc,1,1,null,13),N()),t&2){let e=re();ve("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),w(),F(e._forceDisplayInfixLabel()?-1:1)}}function Hc(t,r){t&1&&(R(0,"div",10,2),W(2,2),N())}function qc(t,r){t&1&&(R(0,"div",11,3),W(2,3),N())}function Gc(t,r){}function Kc(t,r){if(t&1&&pt(0,Gc,0,0,"ng-template",13),t&2){re();let e=Jt(1);ve("ngTemplateOutlet",e)}}function Qc(t,r){t&1&&(R(0,"div",14,4),W(2,4),N())}function Jc(t,r){t&1&&(R(0,"div",15,5),W(2,5),N())}function Zc(t,r){t&1&&me(0,"div",16)}function Yc(t,r){t&1&&W(0,6)}function Xc(t,r){if(t&1&&(R(0,"mat-hint",21),Hi(1),N()),t&2){let e=re(2);ve("id",e._hintLabelId),w(),qi(e.hintLabel)}}function em(t,r){if(t&1&&(M(0,Xc,2,2,"mat-hint",21),W(1,7),me(2,"div",22),W(3,8)),t&2){let e=re();F(e.hintLabel?0:-1)}}var pi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-label"]]})}return t})(),gi=new $("MatError"),tm=(()=>{class t{id=f(Te).getId("mat-mdc-error-");constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-error"],["","matError",""]],hostAttrs:[1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(i,o){i&2&&Ke("id",o.id)},inputs:{id:"id"},features:[ye([{provide:gi,useExisting:t}])]})}return t})(),hi=(()=>{class t{align="start";id=f(Te).getId("mat-mdc-hint-");static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(i,o){i&2&&(Ke("id",o.id),Ge("align",null),G("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"}})}return t})(),Ua=new $("MatPrefix");var bi=new $("MatSuffix"),im=(()=>{class t{set _isTextSelector(e){this._isText=!0}_isText=!1;static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[ye([{provide:bi,useExisting:t}])]})}return t})(),ja=new $("FloatingLabelParent"),Oa=(()=>{class t{_elementRef=f(ie);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}_floating=!1;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}_monitorResize=!1;_resizeObserver=f(ka);_ngZone=f(I);_parent=f(ja);_resizeSubscription=new lt;constructor(){}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return rm(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(i,o){i&2&&G("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return t})();function rm(t){let r=t;if(r.offsetParent!==null)return r.scrollWidth;let e=r.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}var Ia="mdc-line-ripple--active",Bt="mdc-line-ripple--deactivating",Ra=(()=>{class t{_elementRef=f(ie);_cleanupTransitionEnd;constructor(){let e=f(I),i=f(He);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=i.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Bt),e.add(Ia)}deactivate(){this._elementRef.nativeElement.classList.add(Bt)}_handleTransitionEnd=e=>{let i=this._elementRef.nativeElement.classList,o=i.contains(Bt);e.propertyName==="opacity"&&o&&i.remove(Ia,Bt)};ngOnDestroy(){this._cleanupTransitionEnd()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return t})(),Na=(()=>{class t{_elementRef=f(ie);_ngZone=f(I);open=!1;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,i=e.querySelector(".mdc-floating-label");i?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(i.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>i.style.transitionDuration="")}))):e.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){let i=this._notch.nativeElement;!this.open||!e?i.style.width="":i.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=qe({type:t,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(i,o){if(i&1&&q(Oc,5),i&2){let a;D(a=E())&&(o._notch=a.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(i,o){i&2&&G("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},attrs:Ic,ngContentSelectors:Rc,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(i,o){i&1&&(Kt(),me(0,"div",1),R(1,"div",2,0),W(3),N(),me(4,"div",3))},encapsulation:2,changeDetection:0})}return t})(),Vt=(()=>{class t{value;stateChanges;id;placeholder;ngControl;focused;empty;shouldLabelFloat;required;disabled;errorState;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t})}return t})();var Ht=new $("MatFormField"),$a=new $("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Pa="fill",om="auto",La="fixed",am="translateY(-50%)",xi=(()=>{class t{_elementRef=f(ie);_changeDetectorRef=f(Ji);_dir=f(tr);_platform=f(Ce);_idGenerator=f(Te);_ngZone=f(I);_defaults=f($a,{optional:!0});_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=Ze("iconPrefixContainer");_textPrefixContainerSignal=Ze("textPrefixContainer");_iconSuffixContainerSignal=Ze("iconSuffixContainer");_textSuffixContainerSignal=Ze("textSuffixContainer");_prefixSuffixContainers=ht(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=Qi(pi);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Ae(e)}_hideRequiredMarker=!1;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||om}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let i=e||this._defaults?.appearance||Pa;this._appearanceSignal.set(i)}_appearanceSignal=ut(Pa);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||La}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||La}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}_hintLabel="";_hasIconPrefix=!1;_hasTextPrefix=!1;_hasIconSuffix=!1;_hasTextSuffix=!1;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}_destroyed=new h;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_animationsDisabled=ir();constructor(){let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),this._syncOutlineLabelOffset()}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled")},300)}),this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck()}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getLabelId=ht(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let i=this._control,o="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(o+e.controlType),i.controlType&&this._elementRef.nativeElement.classList.add(o+i.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=i.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck()}),this._describedByChanges?.unsubscribe(),this._describedByChanges=i.stateChanges.pipe(Ni([void 0,void 0]),he(()=>[i.errorState,i.userAriaDescribedBy]),Oi(),ge(([[a,n],[s,l]])=>a!==s||n!==l)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),i.ngControl&&i.ngControl.valueChanges&&(this._valueChanges=i.ngControl.valueChanges.pipe(ct(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Di(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_outlineLabelOffsetResizeObserver=null;_syncOutlineLabelOffset(){Zi({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset())});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"})}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())})}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=ht(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let a=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,n=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;a?e.push(a.id):this._hintLabel&&e.push(this._hintLabelId),n&&e.push(n.id)}else this._errorChildren&&e.push(...this._errorChildren.map(a=>a.id));let i=this._control.describedByIds,o;if(i){let a=this._describedByIds||e;o=e.concat(i.filter(n=>n&&!a.includes(n)))}else o=e;this._control.setDescribedByIds(o),this._describedByIds=e}}_getOutlinedLabelOffset(){let e=this._dir.valueSignal();if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return["",null];if(!this._isAttachedToDom())return null;let i=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,a=this._iconSuffixContainer?.nativeElement,n=this._textSuffixContainer?.nativeElement,s=i?.getBoundingClientRect().width??0,l=o?.getBoundingClientRect().width??0,d=a?.getBoundingClientRect().width??0,u=n?.getBoundingClientRect().width??0,m=e==="rtl"?"-1":"1",c=`${s+l}px`,p=`calc(${m} * (${c} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,S=`var(--mat-mdc-form-field-label-transform, ${am} translateX(${p}))`,y=s+l+d+u;return[S,y]}_writeOutlinedLabelStyles(e){if(e!==null){let[i,o]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=i),o!==null&&this._notchedOutline?._setMaxWidth(o)}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=qe({type:t,selectors:[["mat-form-field"]],contentQueries:function(i,o,a){if(i&1&&(Vi(a,o._labelChild,pi,5),_e(a,Vt,5),_e(a,Ua,5),_e(a,bi,5),_e(a,gi,5),_e(a,hi,5)),i&2){Qt();let n;D(n=E())&&(o._formFieldControl=n.first),D(n=E())&&(o._prefixChildren=n),D(n=E())&&(o._suffixChildren=n),D(n=E())&&(o._errorChildren=n),D(n=E())&&(o._hintChildren=n)}},viewQuery:function(i,o){if(i&1&&(Je(o._iconPrefixContainerSignal,Da,5),Je(o._textPrefixContainerSignal,Ea,5),Je(o._iconSuffixContainerSignal,Ma,5),Je(o._textSuffixContainerSignal,Fa,5),q(Nc,5),q(Da,5),q(Ea,5),q(Ma,5),q(Fa,5),q(Oa,5),q(Na,5),q(Ra,5)),i&2){Qt(4);let a;D(a=E())&&(o._textField=a.first),D(a=E())&&(o._iconPrefixContainer=a.first),D(a=E())&&(o._textPrefixContainer=a.first),D(a=E())&&(o._iconSuffixContainer=a.first),D(a=E())&&(o._textSuffixContainer=a.first),D(a=E())&&(o._floatingLabel=a.first),D(a=E())&&(o._notchedOutline=a.first),D(a=E())&&(o._lineRipple=a.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:40,hostBindings:function(i,o){i&2&&G("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[ye([{provide:Ht,useExisting:t},{provide:ja,useExisting:t}])],ngContentSelectors:Lc,decls:19,vars:25,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["aria-atomic","true","aria-live","polite"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(i,o){if(i&1){let a=Bi();Kt(Pc),pt(0,$c,1,1,"ng-template",null,0,Gi),R(2,"div",6,1),Qe("click",function(s){return Ui(a),ji(o._control.onContainerClick(s))}),M(4,zc,1,0,"div",7),R(5,"div",8),M(6,Vc,2,2,"div",9),M(7,Hc,3,0,"div",10),M(8,qc,3,0,"div",11),R(9,"div",12),M(10,Kc,1,1,null,13),W(11),N(),M(12,Qc,3,0,"div",14),M(13,Jc,3,0,"div",15),N(),M(14,Zc,1,0,"div",16),N(),R(15,"div",17)(16,"div",18),M(17,Yc,1,0)(18,em,4,1),N()()}if(i&2){let a;w(2),G("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),w(2),F(!o._hasOutline()&&!o._control.disabled?4:-1),w(2),F(o._hasOutline()?6:-1),w(),F(o._hasIconPrefix?7:-1),w(),F(o._hasTextPrefix?8:-1),w(2),F(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),w(2),F(o._hasTextSuffix?12:-1),w(),F(o._hasIconSuffix?13:-1),w(),F(o._hasOutline()?-1:14),w(),G("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic");let n=o._getSubscriptMessageType();w(),G("mat-mdc-form-field-error-wrapper",n==="error")("mat-mdc-form-field-hint-wrapper",n==="hint"),w(),F((a=n)==="error"?17:a==="hint"?18:-1)}},dependencies:[Oa,Na,Yi,Ra,hi],styles:[`.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator,.mdc-text-field__input::-webkit-search-cancel-button{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-filled-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-filled-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-filled-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mat-form-field-outlined-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mat-form-field-outlined-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-outlined-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-filled-error-caret-color, var(--mat-sys-error))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mat-form-field-outlined-error-caret-color, var(--mat-sys-error))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-filled-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mat-form-field-outlined-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small));border-top-right-radius:var(--mat-form-field-filled-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mat-form-field-filled-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mat-form-field-filled-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-filled-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-filled-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-filled-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-filled-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-filled-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mat-form-field-filled-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-filled-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-filled-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-filled-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mat-form-field-outlined-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mat-form-field-outlined-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mat-form-field-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mat-form-field-outlined-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mat-form-field-outlined-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mat-form-field-outlined-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mat-form-field-outlined-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-form-field-outlined-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-form-field-outlined-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-form-field-outlined-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-outline-color, var(--mat-sys-outline));border-width:var(--mat-form-field-outlined-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mat-form-field-outlined-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mat-form-field-outlined-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{max-width:min(100%,calc(100% - max(12px, var(--mat-form-field-outlined-container-shape, var(--mat-sys-corner-extra-small))) * 2))}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mat-form-field-filled-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mat-form-field-filled-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mat-form-field-filled-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mat-form-field-filled-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}@keyframes _mat-form-field-subscript-animation{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px;opacity:1;transform:translateY(0);animation:_mat-form-field-subscript-animation 0ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field.mat-form-field-animations-enabled.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field.mat-form-field-animations-enabled .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field.mat-form-field-animations-enabled .mat-mdc-form-field-error-wrapper{animation-duration:300ms}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}
3
+ `],encapsulation:2,changeDetection:0})}return t})();var qt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=xe({type:t});static \u0275inj=be({imports:[we,er,xi,we]})}return t})();var nm=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=qe({type:t,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,o){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
4
+ `],encapsulation:2,changeDetection:0})}return t})(),sm={passive:!0},za=(()=>{class t{_platform=f(Ce);_ngZone=f(I);_renderer=f(Wi).createRenderer(null,null);_styleLoader=f(Xi);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return Si;this._styleLoader.load(nm);let i=Yt(e),o=this._monitoredElements.get(i);if(o)return o.subject;let a=new h,n="cdk-text-field-autofilled",s=d=>{d.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(n)?(i.classList.add(n),this._ngZone.run(()=>a.next({target:d.target,isAutofilled:!0}))):d.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(n)&&(i.classList.remove(n),this._ngZone.run(()=>a.next({target:d.target,isAutofilled:!1})))},l=this._ngZone.runOutsideAngular(()=>(i.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(i,"animationstart",s,sm)));return this._monitoredElements.set(i,{subject:a,unlisten:l}),a}stopMonitoring(e){let i=Yt(e),o=this._monitoredElements.get(i);o&&(o.unlisten(),o.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Wa=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=xe({type:t});static \u0275inj=be({})}return t})();var Ba=new $("MAT_INPUT_VALUE_ACCESSOR");var Va=(()=>{class t{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Gt=class{_defaultMatcher;ngControl;_parentFormGroup;_parentForm;_stateChanges;errorState=!1;matcher;constructor(r,e,i,o,a){this._defaultMatcher=r,this.ngControl=e,this._parentFormGroup=i,this._parentForm=o,this._stateChanges=a}updateErrorState(){let r=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,o=this.ngControl?this.ngControl.control:null,a=i?.isErrorState(o,e)??!1;a!==r&&(this.errorState=a,this._stateChanges.next())}};var lm=["button","checkbox","file","hidden","image","radio","range","reset","submit"],dm=new $("MAT_INPUT_CONFIG"),OS=(()=>{class t{_elementRef=f(ie);_platform=f(Ce);ngControl=f(or,{optional:!0,self:!0});_autofillMonitor=f(za);_ngZone=f(I);_formField=f(Ht,{optional:!0});_renderer=f(He);_uid=f(Te).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=f(dm,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new h;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=Ae(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(rr.required)??!1}set required(e){this._required=Ae(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&Xt().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Ae(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>Xt().has(e));constructor(){let e=f(ar,{optional:!0}),i=f(nr,{optional:!0}),o=f(Va),a=f(Ba,{optional:!0,self:!0}),n=this._elementRef.nativeElement,s=n.nodeName.toLowerCase();a?$i(a.value)?this._signalBasedValueAccessor=a:this._inputValueAccessor=a:this._inputValueAccessor=n,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(n,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Gt(o,this.ngControl,i,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=s==="select",this._isTextarea=s==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=n.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&Ki(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let i=this._elementRef.nativeElement;i.type==="number"?(i.type="text",i.setSelectionRange(0,0),i.type="number"):i.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){lm.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let i=e.target;!i.value&&i.selectionStart===0&&i.selectionEnd===0&&(i.setSelectionRange(1,1),i.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=z({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(i,o){i&1&&Qe("focus",function(){return o._focusChanged(!0)})("blur",function(){return o._focusChanged(!1)})("input",function(){return o._onInput()}),i&2&&(Ke("id",o.id)("disabled",o.disabled&&!o.disabledInteractive)("required",o.required),Ge("name",o.name||null)("readonly",o._getReadonlyAttribute())("aria-disabled",o.disabled&&o.disabledInteractive?"true":null)("aria-invalid",o.empty&&o.required?null:o.errorState)("aria-required",o.required)("id",o.id),G("mat-input-server",o._isServer)("mat-mdc-form-field-textarea-control",o._isInFormField&&o._isTextarea)("mat-mdc-form-field-input-control",o._isInFormField)("mat-mdc-input-disabled-interactive",o.disabledInteractive)("mdc-text-field__input",o._isInFormField)("mat-mdc-native-select-inline",o._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Zt]},exportAs:["matInput"],features:[ye([{provide:Vt,useExisting:t}]),zi]})}return t})(),IS=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=xe({type:t});static \u0275inj=be({imports:[we,qt,qt,Wa,we]})}return t})();export{oe as a,Ye as b,hr as c,ke as d,ii as e,mr as f,Zm as g,Dc as h,di as i,Be as j,Mc as k,Wo as l,Bo as m,mi as n,ny as o,ka as p,pi as q,tm as r,hi as s,im as t,Vt as u,Ht as v,$a as w,xi as x,qt as y,Va as z,Gt as A,OS as B,IS as C};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-3RECQ7FO.js";import{g as l}from"./chunk-S3ZVIKLY.js";import{a as g}from"./chunk-W6GQAXBI.js";import"./chunk-7MAW5JUV.js";import{g as a,l as r}from"./chunk-ENKPORJ2.js";import{ta as t,wb as s}from"./chunk-SFNSRKY4.js";var v=(()=>{class o{dialog=t(l);auth=t(r);appService=t(g);appSettingsService=t(a);connectionConfig=null;ngOnInit(){this.connectionConfig=this.appSettingsService.getConnectionConfig(),this.openUserCredentialModal("Sign in failed: Incorrect user/password. Enter valide credentials or access the Confifuration/Settings menu, validate the server URL or/and disable the user Sign in option")}openUserCredentialModal(e){this.dialog.open(c,{disableClose:!0,data:{user:this.connectionConfig.loginName,password:this.connectionConfig.loginPassword,error:e}}).afterClosed().subscribe(i=>{i===void 0||!i||(this.connectionConfig.loginName=i.user,this.connectionConfig.loginPassword=i.password,this.appSettingsService.setConnectionConfig(this.connectionConfig),this.serverLogin())})}serverLogin(e){this.auth.login({usr:this.connectionConfig.loginName,pwd:this.connectionConfig.loginPassword,newUrl:e}).then(()=>{this.appSettingsService.reloadApp()}).catch(n=>{n.status==401?(this.openUserCredentialModal("Sign in failed: Invalide user/password. Enter valide credentials"),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==404?(this.appService.sendSnackbarNotification("Sign in failed: Login API not found at URL. See connection detail status in Configuration/Settings",5e3,!1),console.log("[Setting-SignalK Component] Sign in failed: "+n.error.message)):n.status==0?(this.appService.sendSnackbarNotification("Sign in failed: Cannot reach server at Signal K URL. See connection detail status in Configuration/Settings",5e3,!1),console.log("[Setting-SignalK Component] Sign in failed: Cannot reach server at Signal K URL:"+n.message)):(this.appService.sendSnackbarNotification("Unknown authentication failure: "+JSON.stringify(n),5e3,!1),console.log("[Setting-SignalK Component] Unknown login error response: "+JSON.stringify(n)))})}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=s({type:o,selectors:[["app-widget-login"]],decls:0,vars:0,template:function(n,i){},encapsulation:2})}return o})();export{v as WidgetLoginComponent};