@signalk/freeboard-sk 2.24.0-beta.2 → 2.24.0-beta.4
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.
- package/package.json +1 -1
- package/public/chunk-25QXN3ZS.js +1 -0
- package/public/{chunk-KII72BJM.js → chunk-4LYHWMHX.js} +1 -1
- package/public/chunk-6OLOPNVL.js +1 -0
- package/public/chunk-6OO6QZTY.js +1 -0
- package/public/{chunk-QI5ICQLG.js → chunk-HQSHA6SH.js} +1 -1
- package/public/{chunk-WIUBUSFZ.js → chunk-LW22M4W6.js} +1 -1
- package/public/chunk-LXWUCH7T.js +1 -0
- package/public/{chunk-DT3KOU7O.js → chunk-SPR3QKKD.js} +1 -1
- package/public/{chunk-PVMR7EP7.js → chunk-XWAJLSAM.js} +78 -77
- package/public/index.html +1 -1
- package/public/main-GD3FN7RN.js +11 -0
- package/public/{worker-7GKP5VP4.js → worker-42LKK6ER.js} +20 -4
- package/public/worker-LG44LVQH.js +5 -0
- package/public/chunk-57OGK3K6.js +0 -1
- package/public/chunk-AZGA6QFQ.js +0 -1
- package/public/chunk-V6RYVIHA.js +0 -1
- package/public/chunk-WDCDO7ZN.js +0 -1
- package/public/main-CDKOXZZ2.js +0 -11
- package/public/worker-PVLEZAQQ.js +0 -5
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as ze,Aa as it,Ba as nt,D as qe,E as L,J as je,P as Xe,Q as Ye,R as Je,b as Me,e as Ee,fa as Qe,g as We,ga as $,h as ke,ha as ee,l as Pe,la as $e,m as H,ma as et,na as tt,u as Ge,v as Ze,w as He,x as Q,z as Ke}from"./chunk-XWAJLSAM.js";import{a as xe,d as Oe,i as Fe,j as Ie,k as Be}from"./chunk-TQPGRJVE.js";import{e as Le,f as X,g as Y,h as Ue,i as J}from"./chunk-HQSHA6SH.js";import{$d as Ve,Aa as V,Ba as T,Da as b,Ea as S,Ed as we,Fa as w,Fb as I,Ga as h,Gd as Ce,Ha as i,Ia as n,Ja as D,Jb as fe,Jd as A,Kb as B,L as E,Ld as ye,M as g,Md as N,N as m,O as x,Od as R,P as ge,Qa as W,Sa as p,T as me,Td as U,Ua as y,V as F,W as ce,Wd as G,Xd as ve,_ as pe,_d as be,ae as Te,be as De,cb as M,ce as Z,fa as s,fb as _e,ge as K,hb as d,he as Ae,ib as C,jb as k,je as Ne,lb as _,mb as f,me as z,na as P,nb as u,ne as Re,rd as ue,re as q,se as j,vd as he,xd as Se,za as O}from"./chunk-QPQHN5VS.js";import"./chunk-EQVTEUXC.js";var pt=(l,c)=>c[0];function _t(l,c){if(l&1&&(i(0,"mat-option",8),x(),i(1,"svg",6),D(2,"line",7),n()()),l&2){let a=c.$implicit;h("value",a),s(2),O("stroke-width",a)}}function ft(l,c){if(l&1&&(i(0,"mat-option",8),x(),i(1,"svg",6),D(2,"line",9),n()()),l&2){let a=c.$implicit;h("value",a[0]),s(2),O("stroke-dasharray",a[1])}}var te=class l{color=B("#ff0000");dash=B("none");weight=B(1);_color=I(()=>this.color());_dash=I(()=>this.dash());_weight=I(()=>this.weight());selectionChange=fe();app=E(L);line={dashArrays:this.app.lineDashMap,weights:[1,2,3,4,5]};constructor(){}ngOnInit(){}onSelectChange(c){let a=this.app.formatLineDashArray(this._dash());this.selectionChange.emit({lineStyle:{fill:{color:this._color()},stroke:{color:this._color(),width:this._weight(),lineDash:a}},config:{color:this._color(),weight:this._weight(),dash:this._dash()}})}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["linestyle-select"]],inputs:{color:[1,"color"],dash:[1,"dash"],weight:[1,"weight"]},outputs:{selectionChange:"selectionChange"},decls:25,vars:5,consts:[[2,"display","flex"],[2,"width","100px"],["mat-input","","matNativeControl","","type","color",3,"ngModelChange","change","ngModel"],[2,"width","110px"],[3,"ngModelChange","selectionChange","ngModel"],[2,"display","flex","align-items","center","gap","8px"],["width","48","height","10",2,"vertical-align","middle","margin-right","6px"],["x1","0","y1","5","x2","48","y2","5","stroke","currentColor","stroke-array","none"],[3,"value"],["x1","0","y1","5","x2","48","y2","5","stroke","currentColor","stroke-width","2"]],template:function(a,e){a&1&&(i(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),d(3,"Color"),n(),i(4,"input",2),u("ngModelChange",function(r){return f(e._color,r)||(e._color=r),r}),p("change",function(r){return e.onSelectChange({key:"color",value:r.srcElement.value})}),n()(),i(5,"mat-form-field",3)(6,"mat-label"),d(7,"Weight"),n(),i(8,"mat-select",4),u("ngModelChange",function(r){return f(e._weight,r)||(e._weight=r),r}),p("selectionChange",function(r){return e.onSelectChange({key:"weight",value:r.value})}),i(9,"mat-select-trigger")(10,"div",5),x(),i(11,"svg",6),D(12,"line",7),n()()(),S(13,_t,3,2,"mat-option",8,b),n()(),ge(),i(15,"mat-form-field",3)(16,"mat-label"),d(17,"Style"),n(),i(18,"mat-select",4),u("ngModelChange",function(r){return f(e._dash,r)||(e._dash=r),r}),p("selectionChange",function(r){return e.onSelectChange({key:"dash",value:r.value})}),i(19,"mat-select-trigger")(20,"div",5),x(),i(21,"svg",6),D(22,"line",9),n()()(),S(23,ft,3,2,"mat-option",8,pt),n()()()),a&2&&(s(4),_("ngModel",e._color),s(4),_("ngModel",e._weight),s(4),O("stroke-width",e._weight()),s(),w(e.line.weights),s(5),_("ngModel",e._dash),s(4),O("stroke-dasharray",e.line.dashArrays.get(e._dash())),s(),w(e.line.dashArrays))},dependencies:[Z,R,U,G,N,A,H,j,q,z,K,J,Y,Ue,X],encapsulation:2})};var ht=(l,c)=>c[0];function St(l,c){if(l&1){let a=W();i(0,"div",4)(1,"mat-radio-button",5,0),p("change",function(){g(a);let o=M(2),r=y().$implicit,t=y();return r[1].current=o.value,m(t.save(!0))}),d(3),n()()}if(l&2){let a=c.$implicit,e=y().$implicit;s(),h("name",e[0])("value",a)("checked",a===e[1].current),s(2),k(" ",a.split(".").slice(-1)," ")}}function wt(l,c){if(l&1&&(i(0,"div",2)(1,"div",3)(2,"div"),d(3),n()(),i(4,"div"),S(5,St,4,4,"div",4,b),n()()),l&2){let a=c.$implicit;s(3),C(a[1].name),s(2),w(a[1].available)}}var ie=class l{title="";chosen=new me;pathChoices={tws:{name:"True Wind Speed",choices:["environment.wind.speedTrue","environment.wind.speedOverGround"],available:[],current:""},twd:{name:"True Wind Direction",choices:["environment.wind.directionTrue","environment.wind.directionMagnetic","environment.wind.angleTrueGround","environment.wind.angleTrueWater"],available:[],current:""},heading:{name:"Heading / COG",choices:["navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic","navigation.headingTrue","navigation.headingMagnetic"],available:[],current:""}};pathChoicesArray=Object.entries(this.pathChoices);availPaths;app=E(L);constructor(){}ngOnInit(){this.initEntries()}initEntries(){this.availPaths=new Map(Object.entries(this.app.data.vessels.prefAvailablePaths)),this.pathChoices.tws.current=this.app.config.units.preferredPaths.tws,this.pathChoices.twd.current=this.app.config.units.preferredPaths.twd,this.pathChoices.heading.current=this.app.config.units.preferredPaths.heading,Object.entries(this.pathChoices).forEach(a=>{let e=a[1];e.choices.forEach(o=>{this.availPaths.has(o)&&e.available.push(o)}),e.available.length===0&&e.available.push(e.choices[0])})}save(c){let a={};Object.entries(this.pathChoices).forEach(e=>{a[e[0]]=e[1].current}),this.chosen.emit({save:c,value:a})}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["signalk-preferred-paths"]],inputs:{title:"title"},outputs:{chosen:"chosen"},decls:6,vars:1,consts:[["pathopt",""],[2,"font-size","10pt"],[1,"sk-details"],[1,"title"],[2,"margin","5px 0 5px 0"],[3,"change","name","value","checked"]],template:function(a,e){a&1&&(i(0,"fieldset")(1,"legend",1),d(2),n(),i(3,"div"),S(4,wt,7,1,"div",2,ht),n()()),a&2&&(s(2),C(e.title),s(2),w(e.pathChoicesArray))},dependencies:[ee,$],styles:[".sk-details[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;font-family:Roboto,Arial,Helvetica,sans-serif;font-size:10pt;max-height:100%;width:60vw;max-width:300px}.sk-details[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background:left 1px -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.18)),color-stop(.65,transparent)) #b2bbc2e3;padding:3px 5px 0;margin-top:3px;font-weight:500;line-height:23px;color:#000}.sk-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:0;line-height:23px;margin:0;flex:1 1 auto;overflow:auto}.sk-details[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;flex-direction:row;line-height:26px;border-width:0 0 0 0;border-style:solid;border-color:gray;padding-left:5px}.sk-details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-width:0 0 1px 0}.sk-details[_ngcontent-%COMP%] .sectionname[_ngcontent-%COMP%]{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;font-weight:500}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;width:100%;background-color:#fff}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-style:italic}.sk-details[_ngcontent-%COMP%] .pathvalue[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0})};var v=(l,c)=>c[0],Ct=(l,c)=>c.id;function yt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Mt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function vt(l,c){if(l&1&&(i(0,"mat-option",111),d(1),n()),l&2){let a=c.$implicit;h("value",a.url)("matTooltip",a.description),s(),k(" ",a.name," ")}}function bt(l,c){if(l&1){let a=W();i(0,"div",41)(1,"div",34)(2,"mat-form-field",35)(3,"mat-label"),d(4,"Select Instruments App"),n(),i(5,"mat-select",52),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.display.plugins.instruments,o)||(r.facade.settings.display.plugins.instruments=o),m(o)}),p("selectionChange",function(){g(a);let o=y();return m(o.onInstrumentApp())}),S(6,vt,2,3,"mat-option",111,b),n()()(),i(8,"div",34)(9,"mat-form-field",87)(10,"mat-label"),d(11,"Parameters"),n(),i(12,"input",112,17),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.display.plugins.parameters,o)||(r.facade.settings.display.plugins.parameters=o),m(o)}),p("change",function(){g(a);let o=y();return m(o.persistModel("pluginParameters"))}),n()()(),i(14,"div",34)(15,"mat-checkbox",113),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.display.plugins.startOnOpen,o)||(r.facade.settings.display.plugins.startOnOpen=o),m(o)}),p("change",function(){g(a);let o=y();return m(o.persistModel("pluginStartOnOpen"))}),d(16," Halt App on hide "),n()(),i(17,"div",34)(18,"button",114),p("click",function(){g(a);let o=y();return m(o.toggleFavourites())}),i(19,"mat-icon"),d(20,"star"),n(),d(21," FAVOURITES "),n()()()}if(l&2){let a=y();s(5),_("ngModel",a.facade.settings.display.plugins.instruments),s(),w(a.facade.applicationList),s(6),h("disabled",a.facade.settings.display.plugins.instruments===null),_("ngModel",a.facade.settings.display.plugins.parameters),s(3),_("ngModel",a.facade.settings.display.plugins.startOnOpen)}}function Vt(l,c){if(l&1&&(i(0,"mat-list-option",116),d(1),n()),l&2){let a=c.$implicit,e=y(2);h("disabled",a.url==e.facade.settings.display.plugins.instruments)("selected",e.facade.settings.display.plugins.favourites.includes(a.url))("value",a.url),s(),k(" ",a.name," ")}}function Tt(l,c){if(l&1){let a=W();i(0,"div",33)(1,"div",34)(2,"div",93),D(3,"br"),d(4,"Select Favourite Apps: "),n(),D(5,"mat-divider"),i(6,"mat-selection-list",115,18),p("selectionChange",function(o){g(a);let r=M(7),t=y();return m(t.onFavSelected(o,r))}),S(8,Vt,2,4,"mat-list-option",116,b),n()()()}if(l&2){let a=y();s(8),w(a.facade.favouritesList)}}function Dt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Et(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Wt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function kt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Pt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Lt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function xt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Ot(l,c){if(l&1){let a=W();i(0,"div",34)(1,"mat-form-field",35)(2,"mat-label"),d(3,"Position display format"),n(),i(4,"mat-select",117),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.units.positionFormat,o)||(r.facade.settings.units.positionFormat=o),m(o)}),p("selectionChange",function(){g(a);let o=y();return m(o.persistModel())}),S(5,xt,2,2,"mat-option",37,b),n()()()}if(l&2){let a=y();s(4),_("ngModel",a.facade.settings.units.positionFormat),s(),w(a.options.preferredValues.coords)}}function Ft(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function It(l,c){if(l&1){let a=W();i(0,"div",34)(1,"mat-form-field",35)(2,"mat-label"),d(3,"Prefer True / Magnetic values"),n(),i(4,"mat-select",118),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.units.headingAttribute,o)||(r.facade.settings.units.headingAttribute=o),m(o)}),p("selectionChange",function(){g(a);let o=y();return m(o.persistModel("headingAttribute"))}),S(5,Ft,2,2,"mat-option",37,b),n()()()}if(l&2){let a=y();s(4),_("ngModel",a.facade.settings.units.headingAttribute),s(),w(a.options.preferredValues.heading)}}function Bt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function At(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Nt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Rt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Ut(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Gt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function Zt(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a positive number "),n())}function Ht(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a positive number "),n())}function Kt(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a positive number "),n())}function zt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function qt(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a number > 0 "),n())}function jt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function Xt(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function Yt(l,c){if(l&1&&(i(0,"mat-radio-button",37),D(1,"img",119),d(2),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),_e(`transform: scale(${a[0]})`),s(),k(" (",a[1],") ")}}function Jt(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a value between -90 and 90 (max 9 decimals) "),n())}function Qt(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a value between -180 and 180 (max 9 decimals) "),n())}function $t(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function ei(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function ti(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function ii(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function ni(l,c){l&1&&(i(0,"mat-error"),d(1," Please enter a number >= 1. "),n())}function ai(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function oi(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function ri(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function si(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function li(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function di(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function gi(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function mi(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function ci(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function pi(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a),s(),C(a)}}function _i(l,c){if(l&1){let a=W();i(0,"button",120),p("click",function(){g(a),y();let o=M(497);return m(o.value="")}),i(1,"mat-icon"),d(2,"close"),n()()}}function fi(l,c){if(l&1&&(i(0,"mat-list-option",95),d(1),n()),l&2){let a=c.$implicit,e=y();h("selected",e.facade.settings.resources.paths.includes(a))("value",a),s(),k(" ",a," ")}}function ui(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a.id),s(),C(a.name)}}function hi(l,c){if(l&1){let a=W();i(0,"mat-tab",96)(1,"div",28)(2,"div",29)(3,"div",108)(4,"div",31),d(5,"RADAR SETTINGS"),n(),i(6,"mat-card",32)(7,"div",41)(8,"div",34)(9,"mat-form-field",121)(10,"mat-label"),d(11,"Radar Devices"),n(),i(12,"mat-select",122,19),u("ngModelChange",function(o){g(a);let r=y();return f(r.facade.settings.radars.deviceId,o)||(r.facade.settings.radars.deviceId=o),m(o)}),p("selectionChange",function(){g(a);let o=y();return m(o.doRadar())}),S(14,ui,2,2,"mat-option",37,Ct),n()()(),i(16,"div",34)(17,"button",123),p("click",function(){g(a);let o=y();return m(o.refreshRadars())}),i(18,"mat-icon"),d(19," refresh"),n(),d(20," REFRESH "),n()()()()()()()()}if(l&2){let a=y();s(12),h("disabled",!a.radarList().length||a.app.uiCtrl().radarLayer),_("ngModel",a.facade.settings.radars.deviceId),s(2),w(a.radarList())}}function Si(l,c){if(l&1&&(i(0,"mat-option",37),d(1),n()),l&2){let a=c.$implicit;h("value",a[0]),s(),C(a[1])}}function wi(l,c){l&1&&(i(0,"mat-error"),d(1," Value required. "),n())}var rt=class l{show={favourites:F(!1)};options;aisStateFilter={moored:!1,anchored:!1};formattedNumberModel={rangeCirclesDistance:1e3};unitsChangedSignal=F(0);radarList=F([]);saveOnClose=!1;facade=E(nt);myElement=E(pe);dialogRef=E(ue);wakeLock=E(He);s57=E(Ke);app=E(L);radarApi=E(qe);constructor(){this.options=new it,ce(()=>{this.unitsChangedSignal(),this.formatNumberModel()})}ngOnInit(){this.facade.refresh(),this.facade.settings.selections.aisState.forEach(c=>{c in this.aisStateFilter&&(this.aisStateFilter[c]=!0)}),this.refreshRadars()}refreshRadars(){this.radarApi.listRadars().then(c=>{this.radarList.set(c)}).catch(()=>{this.radarList.set([])})}formatNumberModel(){this.formattedNumberModel={rangeCirclesDistance:this.facade.settings.units.distance==="kilometer"?Math.floor(this.facade.settings.vessels.rangeCirclesDistance/1e3):Math.floor(Q.transform(this.facade.settings.vessels.rangeCirclesDistance,"m","naut-mile"))}}raiseChange(){this.app.alignUnitPrefs(this.app.serverConfig.unitPreferences()),this.unitsChangedSignal.update(c=>c+1)}handleClose(){this.saveOnClose&&this.persistModel(),this.dialogRef.close()}doWakelock(c){this.persistModel(),c?this.wakeLock.disable():this.wakeLock.enable()}doS57(c){this.facade.settings.map.s57Options.depthUnit=this.facade.settings.units.depth,c?this.parseNumber(c):this.persistModel(),this.s57.setOptions(this.facade.settings.map.s57Options)}doRadar(){this.radarApi.init(this.facade.settings.radars.deviceId).then(c=>{c&&this.persistModel()})}onLineStyle(c,a){let e=this.facade.settings.vessels.selfLines[c];e&&(e.color=a.config.color,e.dash=a.config.dash,e.weight=a.config.weight,this.app.selfLines.update(o=>{let r=Object.assign({},o);return r[c]=a.lineStyle,r}),this.persistModel())}toggleFavourites(){this.show.favourites.update(c=>!c)}parseNumber(c,a){if(typeof c.model!="number"){c.reset(this.fallbackToDefault());return}!a&&c.model<0&&c.reset(Math.abs(c.model)),this.persistModel()}parseFormattedNumber(c,a){typeof c.model=="number"&&(!a&&c.model<0&&c.reset(Math.abs(c.model)),this.facade.settings.vessels.rangeCirclesDistance=this.facade.settings.units.distance==="kilometer"?Math.floor(this.formattedNumberModel.rangeCirclesDistance*1e3):Math.floor(Q.nauticalMilesToKm(this.formattedNumberModel.rangeCirclesDistance)*1e3),this.persistModel())}fallbackToDefault(){let c=ze();if(typeof this.facade.settings.map.s57Options.shallowDepth!="number")return c.map.s57Options.shallowDepth;if(typeof this.facade.settings.map.s57Options.safetyDepth!="number")return c.map.s57Options.safetyDepth;if(typeof this.facade.settings.map.s57Options.deepDepth!="number")return c.map.s57Options.deepDepth;if(typeof this.facade.fixedPosition[0]!="number"||typeof this.facade.fixedPosition[1]!="number")return 0;if(typeof this.facade.settings.course.arrivalCircle!="number")return c.course.arrivalCircle}persistModel(c){this.facade.applySettings(),this.facade.emitChangeEvent(c)}deferPersist(c){this.saveOnClose=!0,this.facade.emitChangeEvent(c)}onInstrumentApp(){this.persistModel("pluginInstruments"),this.facade.buildFavouritesList()}onPreferredPaths(c){c.save&&(this.facade.settings.units.preferredPaths=c.value,this.persistModel())}onFavSelected(c,a){this.facade.settings.display.plugins.favourites=a.selectedOptions.selected.map(e=>e.value),this.persistModel()}onAisStateFilter(){let c=[];for(let a in this.aisStateFilter)this.aisStateFilter[a]&&c.push(a);this.facade.settings.selections.aisState=[].concat(c),this.persistModel()}onResPathSelected(c){this.facade.settings.resources.paths=c.selectedOptions.selected.map(a=>a.value),this.facade.settings.resources.paths.forEach(a=>{a in this.facade.settings.selections.resourceSets||(this.facade.settings.selections.resourceSets[a]=[])}),this.persistModel()}clearAuthToken(){this.facade.clearToken()}renderSymbol(c){return Q.getSymbol(c)}static \u0275fac=function(a){return new(a||l)};static \u0275cmp=P({type:l,selectors:[["settings-dialog"]],decls:592,vars:120,consts:[["serverprefs",""],["distunits",""],["s57shallowDepth","ngModel"],["s57safetyDepth","ngModel"],["s57deepDepth","ngModel"],["coursearrivalcircle","ngModel"],["courseautoadvance",""],["courseautoadvanceon",""],["vesselfixedlocationmode",""],["fixedlat","ngModel"],["fixedlon","ngModel"],["rangeCirclesDistance","ngModel"],["notesrootfilter",""],["respath",""],["skmaxradius",""],["videourl","ngModel"],["experiments",""],["instparams","ngModel"],["favs",""],["radarlist",""],[2,"background-color","transparent"],[1,"dialog-icon"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content","",2,"display","flex"],["dynamicHeight","false","mat-stretch-tabs","false","mat-align-tabs","start"],["label","Display"],[1,"theme-page","settings"],[1,"theme-panel"],["id","sectDisplay",1,"setting-group"],[1,"setting-group-title"],[1,"setting-card"],[1,"setting-card-row",2,"padding-bottom","10px"],[1,"setting-card-row-item"],[2,"width","100%"],["matTooltip","Dark Mode setting.",3,"ngModelChange","selectionChange","ngModel"],[3,"value"],["label","after","matTooltip","Auto-set using environment.mode value.",3,"ngModelChange","change","ngModel"],["matTooltip","Action button selection.",3,"ngModelChange","selectionChange","ngModel"],["label","after","matTooltip","Disable wake lock.",3,"ngModelChange","change","disabled","ngModel"],[1,"setting-card-row"],["matTooltip","Do not play sounds","label","after",3,"ngModelChange","change","ngModel"],["label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Period of time out of alarm state before re-triggering.",3,"ngModelChange","selectionChange","ngModel","disabled"],["label","Units"],["id","sectUnits",1,"setting-group"],["label","after","matTooltip","Use the unit preferences configured on the server.",3,"ngModelChange","change","disabled","ngModel"],[3,"ngModelChange","selectionChange","disabled","ngModel"],["title","Preferred Paths",3,"chosen"],["label","Map"],["id","sectMap",1,"setting-group"],[3,"ngModelChange","selectionChange","ngModel"],["matTooltip","Add close button to popovers","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Double Click map to zoom","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Keep tiles visible when zooming past chart maxZoom","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Do not exit follow vessel when map is panned.","label","after",3,"ngModelChange","change","ngModel"],["placeholder","Graphicsstyle",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Boundaries",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Color Table",3,"ngModelChange","selectionChange","ngModel"],["placeholder","Colors",3,"ngModelChange","selectionChange","ngModel"],["matInput","","type","number","required","","min","0",3,"ngModelChange","change","ngModel"],["matSuffix",""],["multiple","","placeholder","Layers",3,"ngModelChange","selectionChange","ngModel"],["label","Course"],["id","sectCourse",1,"setting-group"],["matTooltip","Select the trigger for advancing to next point.",3,"ngModelChange","selectionChange","disabled","ngModel"],["matTooltip","Period of time before destination is advanced to next waypoint.",3,"ngModelChange","selectionChange","disabled","ngModel"],["label","Vessels"],["id","sectVessels",1,"setting-group"],[3,"ngModelChange","change","ngModel"],["label","after","matTooltip","e.g. Building, Camp, etc.",3,"ngModelChange","change","ngModel"],["floatLabel","always"],["matInput","","type","number","required","","pattern","^-?([1-8]?[0-9])(\\.\\d{1,9})?$","min","-90","max","90",3,"ngModelChange","change","ngModel","disabled"],["matInput","","type","number","required","","pattern","^-?(1[0-7]?[0-9]|[1-9]?[0-9])(\\.\\d{1,9})?$","min","-180","max","180",3,"ngModelChange","change","ngModel","disabled"],["matTooltip","Length of heading line.",3,"ngModelChange","selectionChange","ngModel"],[3,"selectionChange","color","dash","weight"],["matTooltip","Length of COG line.",3,"ngModelChange","selectionChange","ngModel"],[3,"ngModelChange","selectionChange","ngModel","disabled"],["label","after",3,"ngModelChange","change","ngModel","disabled"],["matInput","","type","number","required","","min","1",3,"ngModelChange","change","ngModel","disabled"],["matTooltip","Select to source trail data from the server","label","after",3,"ngModelChange","change","disabled","ngModel"],["discrete","","tickInterval","1","min","1","max","96",3,"disabled"],["matSliderThumb","",3,"ngModelChange","valueChange","ngModel"],["label","Resources"],["id","sectNotes",1,"setting-group"],[3,"valueChange","selectionChange","disabled","value"],["floatLabel","always",2,"width","100%"],["matInput","","type","text","placeholder","?radius=%note:radius%","matTooltip","Filter to apply when retrieving notes",3,"ngModelChange","change","ngModel"],["matSuffix","","mat-icon-button",""],["matTooltip","Allow group name editing.","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Require position information when adding notes to a group.","label","after",3,"ngModelChange","change","ngModel"],["id","sectResLayers",1,"setting-group"],[2,"font-style","italic"],["matTooltip","Select resource layers to show.",3,"selectionChange"],[3,"selected","value"],["label","Radar"],["label","Signal K"],["id","sectSKConnection",1,"setting-group"],[2,"font-size","smaller"],["matToolTip","Check to receive other vessel data","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive AtoN data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matTooltip","Check to receive aircraft data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive SaR data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Check to receive Weather / Meteo data","matTooltipPosition","below","label","after",3,"ngModelChange","change","ngModel"],["matToolTip","Only include AIS targets within this distance","matTooltipPosition","below",3,"ngModelChange","selectionChange","ngModel"],["mat-icon-button","","matTooltip","Clear Auth Token",3,"click"],["label","Experiments"],["id","sectExperiments",1,"setting-group"],["matInput","","type","text","required","","placeholder","Video stream URL","matTooltip","Enter URL of video stream",3,"ngModelChange","change","disabled","ngModel"],["matTooltip","Enable ALL experimental Features","label","after",3,"ngModelChange","change","ngModel"],["matTooltipPosition","right",3,"value","matTooltip"],["matInput","","type","text","placeholder","e.g. ?layout=mylayout","matTooltip","Enter parameters to pass to Instrument App",3,"ngModelChange","change","disabled","ngModel"],["matTooltip","Stop instrument app when hidden","label","after",3,"ngModelChange","change","ngModel"],["mat-raised-button","","matTooltip","Favourite Apps","label","after",3,"click"],[3,"selectionChange"],[3,"disabled","selected","value"],["matTooltip","Display position in this format",3,"ngModelChange","selectionChange","ngModel"],["matTooltip","Preferred value type for paths not in Preferred Paths above",3,"ngModelChange","selectionChange","ngModel"],["src","./assets/img/vessels/self.png"],["matSuffix","","mat-icon-button","",3,"click"],[2,"width","stretch"],["matToolTip","Select radar device","matTooltipPosition","below",3,"ngModelChange","selectionChange","disabled","ngModel"],["mat-raised-button","",3,"click"]],template:function(a,e){if(a&1){let o=W();i(0,"mat-toolbar",20)(1,"span",21)(2,"mat-icon"),d(3,"settings"),n()(),i(4,"span",22),d(5,"Settings"),n(),i(6,"span",23)(7,"button",24),p("click",function(){return g(o),m(e.handleClose())}),i(8,"mat-icon"),d(9,"close"),n()()()(),i(10,"div",25)(11,"mat-tab-group",26)(12,"mat-tab",27)(13,"div",28)(14,"div",29)(15,"div",30)(16,"div",31),d(17,"DISPLAY"),n(),i(18,"mat-card",32)(19,"mat-card-content")(20,"div",33)(21,"div",34)(22,"mat-form-field",35)(23,"mat-label"),d(24,"Dark Mode setting"),n(),i(25,"mat-select",36),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.darkMode.source,t)||(e.facade.settings.display.darkMode.source=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel("darkTheme"))}),S(26,yt,2,2,"mat-option",37,v),n()()(),i(28,"div",34)(29,"mat-checkbox",38),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.nightMode,t)||(e.facade.settings.display.nightMode=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(30," Auto-set Night Mode "),n()(),i(31,"div",34)(32,"mat-form-field",35)(33,"mat-label"),d(34,"Action Button"),n(),i(35,"mat-select",39),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.fab,t)||(e.facade.settings.display.fab=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(36,Mt,2,2,"mat-option",37,v),n()()(),i(38,"div",34)(39,"mat-checkbox",40),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.disableWakelock,t)||(e.facade.settings.display.disableWakelock=t),m(t)}),p("change",function(t){return g(o),m(e.doWakelock(t.checked))}),d(40," Allow Device to Sleep "),n()()()()(),D(41,"br"),i(42,"mat-card",32)(43,"mat-card-content"),V(44,bt,22,4,"div",41),V(45,Tt,10,0,"div",33),n()(),D(46,"br"),n(),i(47,"div",30)(48,"div",31),d(49,"SOUND"),n(),i(50,"mat-card",32)(51,"mat-card-content")(52,"div",33)(53,"div",34)(54,"mat-checkbox",42),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.muteSound,t)||(e.facade.settings.display.muteSound=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(55," Do not Play Sounds "),n()(),i(56,"div",34)(57,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.depthAlarm.enabled,t)||(e.facade.settings.display.depthAlarm.enabled=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(58," Show DEPTH Alarms "),n()(),i(59,"div",34)(60,"mat-form-field",35)(61,"mat-label"),d(62,"Alarm Smoothing Time"),n(),i(63,"mat-select",44),u("ngModelChange",function(t){return g(o),f(e.facade.settings.display.depthAlarm.smoothing,t)||(e.facade.settings.display.depthAlarm.smoothing=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(64,Dt,2,2,"mat-option",37,v),n()()()()()()()()()(),i(66,"mat-tab",45)(67,"div",28)(68,"div",29)(69,"div",46)(70,"div",31),d(71,"UNITS & VALUES"),n(),i(72,"mat-card",32)(73,"mat-card-content")(74,"div",33)(75,"div",34)(76,"fieldset")(77,"legend")(78,"mat-checkbox",47,0),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.useServerPrefs,t)||(e.facade.settings.units.useServerPrefs=t),m(t)}),p("change",function(){return g(o),e.raiseChange(),m(e.persistModel())}),d(80," Use Server Unit Preferences "),n()(),i(81,"div",33)(82,"div",34)(83,"mat-form-field",35)(84,"mat-label"),d(85,"Distance units"),n(),i(86,"mat-select",48,1),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.distance,t)||(e.facade.settings.units.distance=t),m(t)}),p("selectionChange",function(){return g(o),e.raiseChange(),m(e.persistModel())}),S(88,Et,2,2,"mat-option",37,v),n()()(),i(90,"div",34)(91,"mat-form-field",35)(92,"mat-label"),d(93,"Depth units"),n(),i(94,"mat-select",48),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.depth,t)||(e.facade.settings.units.depth=t),m(t)}),p("selectionChange",function(){return g(o),e.raiseChange(),m(e.doS57())}),S(95,Wt,2,2,"mat-option",37,v),n()()(),i(97,"div",34)(98,"mat-form-field",35)(99,"mat-label"),d(100,"Length units"),n(),i(101,"mat-select",48),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.length,t)||(e.facade.settings.units.length=t),m(t)}),p("selectionChange",function(){return g(o),e.raiseChange(),m(e.persistModel())}),S(102,kt,2,2,"mat-option",37,v),n()()(),i(104,"div",34)(105,"mat-form-field",35)(106,"mat-label"),d(107,"Temperature units"),n(),i(108,"mat-select",48),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.temperature,t)||(e.facade.settings.units.temperature=t),m(t)}),p("selectionChange",function(){return g(o),e.raiseChange(),m(e.persistModel())}),S(109,Pt,2,2,"mat-option",37,v),n()()(),i(111,"div",34)(112,"mat-form-field",35)(113,"mat-label"),d(114,"Speed units"),n(),i(115,"mat-select",48),u("ngModelChange",function(t){return g(o),f(e.facade.settings.units.speed,t)||(e.facade.settings.units.speed=t),m(t)}),p("selectionChange",function(){return g(o),e.raiseChange(),m(e.persistModel())}),S(116,Lt,2,2,"mat-option",37,v),n()()()()()()(),i(118,"div",33),V(119,Ot,7,1,"div",34),V(120,It,7,1,"div",34),i(121,"div",34)(122,"signalk-preferred-paths",49),p("chosen",function(t){return g(o),m(e.onPreferredPaths(t))}),n()()()()()()()()(),i(123,"mat-tab",50)(124,"div",28)(125,"div",29)(126,"div",51)(127,"div",31),d(128,"MAP"),n(),i(129,"mat-card")(130,"mat-card-content")(131,"div",33)(132,"div",34)(133,"mat-form-field",35)(134,"mat-label"),d(135,"Feature label zoom level"),n(),i(136,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.labelsMinZoom,t)||(e.facade.settings.map.labelsMinZoom=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(137,Bt,2,2,"mat-option",37,b),n()()(),i(139,"div",34)(140,"mat-form-field",35)(141,"mat-label"),d(142,"Offset Vessel Center"),n(),i(143,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.centerOffset,t)||(e.facade.settings.map.centerOffset=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(144,At,2,2,"mat-option",37,v),n()()(),i(146,"div",34)(147,"mat-checkbox",53),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.popoverMulti,t)||(e.facade.settings.map.popoverMulti=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(148," Popovers close with button "),n()(),i(149,"div",34)(150,"mat-checkbox",54),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.doubleClickZoom,t)||(e.facade.settings.map.doubleClickZoom=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(151," Double click to Zoom "),n()(),i(152,"div",34)(153,"mat-checkbox",55),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.overZoomTiles,t)||(e.facade.settings.map.overZoomTiles=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(154," Keep tiles visible on max zoom "),n()(),i(155,"div",34)(156,"mat-checkbox",56),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.lockMoveMap,t)||(e.facade.settings.map.lockMoveMap=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(157," Lock Follow Vessel "),n()()()()(),i(158,"div",31),d(159,"VECTOR CHARTS"),n(),i(160,"mat-card")(161,"mat-card-content")(162,"div",33)(163,"div",34)(164,"mat-form-field",35)(165,"mat-label"),d(166,"Graphics Style"),n(),i(167,"mat-select",57),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.graphicsStyle,t)||(e.facade.settings.map.s57Options.graphicsStyle=t),m(t)}),p("selectionChange",function(){return g(o),m(e.doS57())}),S(168,Nt,2,2,"mat-option",37,v),n()()(),i(170,"div",34)(171,"mat-form-field",35)(172,"mat-label"),d(173,"Boundaries"),n(),i(174,"mat-select",58),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.boundaries,t)||(e.facade.settings.map.s57Options.boundaries=t),m(t)}),p("selectionChange",function(){return g(o),m(e.doS57())}),S(175,Rt,2,2,"mat-option",37,v),n()()(),i(177,"div",34)(178,"mat-form-field",35)(179,"mat-label"),d(180,"Color Table (Requires refresh)"),n(),i(181,"mat-select",59),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.colorTable,t)||(e.facade.settings.map.s57Options.colorTable=t),m(t)}),p("selectionChange",function(){return g(o),m(e.doS57())}),S(182,Ut,2,2,"mat-option",37,v),n()()(),i(184,"div",34)(185,"mat-form-field",35)(186,"mat-label"),d(187,"Colors"),n(),i(188,"mat-select",60),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.colors,t)||(e.facade.settings.map.s57Options.colors=t),m(t)}),p("selectionChange",function(){return g(o),m(e.doS57())}),S(189,Gt,2,2,"mat-option",37,b),n()()()(),i(191,"div",33)(192,"div",34)(193,"mat-form-field",35)(194,"mat-label"),d(195,"Shallow depth"),n(),i(196,"input",61,2),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.shallowDepth,t)||(e.facade.settings.map.s57Options.shallowDepth=t),m(t)}),p("change",function(){g(o);let t=M(197);return m(e.doS57(t))}),n(),V(198,Zt,2,0,"mat-error"),i(199,"span",62),d(200,"m"),n()()(),i(201,"div",34)(202,"mat-form-field",35)(203,"mat-label"),d(204,"Safety depth"),n(),i(205,"input",61,3),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.safetyDepth,t)||(e.facade.settings.map.s57Options.safetyDepth=t),m(t)}),p("change",function(){g(o);let t=M(206);return m(e.doS57(t))}),n(),V(207,Ht,2,0,"mat-error"),i(208,"span",62),d(209,"m"),n()()(),i(210,"div",34)(211,"mat-form-field",35)(212,"mat-label"),d(213,"Deep depth"),n(),i(214,"input",61,4),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.deepDepth,t)||(e.facade.settings.map.s57Options.deepDepth=t),m(t)}),p("change",function(){g(o);let t=M(215);return m(e.doS57(t))}),n(),V(216,Kt,2,0,"mat-error"),i(217,"span",62),d(218,"m"),n()()(),i(219,"div",34)(220,"mat-form-field",35)(221,"mat-label"),d(222,"Layers"),n(),i(223,"mat-select",63),u("ngModelChange",function(t){return g(o),f(e.facade.settings.map.s57Options.otherLayers,t)||(e.facade.settings.map.s57Options.otherLayers=t),m(t)}),p("selectionChange",function(){return g(o),m(e.doS57())}),S(224,zt,2,2,"mat-option",37,v),n()()()()()()()()()(),i(226,"mat-tab",64)(227,"div",28)(228,"div",29)(229,"div",65)(230,"div",31),d(231,"COURSE"),n(),i(232,"mat-card",32)(233,"mat-card-content")(234,"div",33)(235,"div",34)(236,"mat-form-field",35)(237,"mat-label"),d(238,"Arrival Circle"),n(),i(239,"input",61,5),u("ngModelChange",function(t){return g(o),f(e.facade.settings.course.arrivalCircle,t)||(e.facade.settings.course.arrivalCircle=t),m(t)}),p("change",function(){g(o);let t=M(240);return m(e.parseNumber(t))}),n(),V(241,qt,2,0,"mat-error"),i(242,"span",62),d(243,"m"),n()()()(),i(244,"div",33)(245,"div",34)(246,"mat-checkbox",43,6),u("ngModelChange",function(t){return g(o),f(e.facade.settings.course.autoNextPointOnArrival,t)||(e.facade.settings.course.autoNextPointOnArrival=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(248," Auto-advance to next point on arrival "),n()()(),i(249,"div",33)(250,"div",34)(251,"mat-form-field",35)(252,"mat-label"),d(253,"Notification type to use"),n(),i(254,"mat-select",66,7),u("ngModelChange",function(t){return g(o),f(e.facade.settings.course.autoNextPointTrigger,t)||(e.facade.settings.course.autoNextPointTrigger=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(256,jt,2,2,"mat-option",37,b),n()()(),i(258,"div",34)(259,"mat-form-field",35)(260,"mat-label"),d(261,"Time to wait before advancing"),n(),i(262,"mat-select",67),u("ngModelChange",function(t){return g(o),f(e.facade.settings.course.autoNextPointDelay,t)||(e.facade.settings.course.autoNextPointDelay=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(263,Xt,2,2,"mat-option",37,v),n()()()()()()()()()(),i(265,"mat-tab",68)(266,"div",28)(267,"div",29)(268,"div",69)(269,"div",31),d(270,"VESSEL"),n(),i(271,"mat-card",32)(272,"mat-card-content")(273,"div",33)(274,"div",34)(275,"fieldset")(276,"legend"),d(277,"Vessel Icon Size"),n(),i(278,"div",33)(279,"div",34)(280,"mat-radio-group",70),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.iconScale,t)||(e.facade.settings.vessels.iconScale=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),S(281,Yt,3,4,"mat-radio-button",37,v),n()()()()()(),i(283,"div",34)(284,"fieldset")(285,"legend")(286,"mat-checkbox",71,8),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.fixedLocationMode,t)||(e.facade.settings.vessels.fixedLocationMode=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(288," Fixed Location Mode "),n()(),i(289,"div",33)(290,"div",34)(291,"mat-form-field",72)(292,"mat-label"),d(293,"Latitude"),n(),i(294,"input",73,9),u("ngModelChange",function(t){return g(o),f(e.facade.fixedPosition[1],t)||(e.facade.fixedPosition[1]=t),m(t)}),p("change",function(){g(o);let t=M(295);return m(e.parseNumber(t,!0))}),n(),V(296,Jt,2,0,"mat-error"),n(),i(297,"mat-form-field",72)(298,"mat-label"),d(299,"Longitude"),n(),i(300,"input",74,10),u("ngModelChange",function(t){return g(o),f(e.facade.fixedPosition[0],t)||(e.facade.fixedPosition[0]=t),m(t)}),p("change",function(){g(o);let t=M(301);return m(e.parseNumber(t,!0))}),n(),V(302,Qt,2,0,"mat-error"),n()()()()()()(),D(303,"br"),i(304,"mat-card",32)(305,"mat-card-content")(306,"div",34)(307,"fieldset")(308,"legend"),d(309,"Vessel Lines:"),n(),i(310,"div",33)(311,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.windVectors,t)||(e.facade.settings.vessels.windVectors=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(312," Display Wind Vectors "),n(),i(313,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.laylines,t)||(e.facade.settings.vessels.laylines=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(314," Display Laylines "),n()(),i(315,"div",33)(316,"div",34)(317,"fieldset")(318,"legend"),d(319,"Heading Line"),n(),i(320,"div",33)(321,"div",34)(322,"mat-form-field")(323,"mat-label"),d(324,"Heading Line Length"),n(),i(325,"mat-select",75),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.selfLines.heading.length,t)||(e.facade.settings.vessels.selfLines.heading.length=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(326,$t,2,2,"mat-option",37,v),n()()(),i(328,"div",34)(329,"linestyle-select",76),p("selectionChange",function(t){return g(o),m(e.onLineStyle("heading",t))}),n()()()()()(),i(330,"div",33)(331,"div",34)(332,"fieldset")(333,"legend"),d(334,"COG Line"),n(),i(335,"div",33)(336,"div",34)(337,"mat-form-field")(338,"mat-label"),d(339,"COG Line Length"),n(),i(340,"mat-select",77),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.selfLines.cog.length,t)||(e.facade.settings.vessels.selfLines.cog.length=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(341,ei,2,2,"mat-option",37,v),n()()(),i(343,"div",34)(344,"linestyle-select",76),p("selectionChange",function(t){return g(o),m(e.onLineStyle("cog",t))}),n()()()()()()()(),i(345,"div",34)(346,"fieldset")(347,"legend")(348,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.rangeCircles,t)||(e.facade.settings.vessels.rangeCircles=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(349," Display Range Circles "),n()(),i(350,"div",33)(351,"div",34)(352,"mat-form-field",35)(353,"mat-label"),d(354,"Number of Range Circles"),n(),i(355,"mat-select",78),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.rangeCircleCount,t)||(e.facade.settings.vessels.rangeCircleCount=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(356,ti,2,2,"mat-option",37,b),n()()(),i(358,"div",34)(359,"mat-form-field",35)(360,"mat-label"),d(361,"Minimum Zoom Level"),n(),i(362,"mat-select",78),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.rangeCircleMinZoom,t)||(e.facade.settings.vessels.rangeCircleMinZoom=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(363,ii,2,2,"mat-option",37,b),n()()()(),i(365,"div",33)(366,"div",34)(367,"mat-checkbox",79),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.rangeCirclesFixed,t)||(e.facade.settings.vessels.rangeCirclesFixed=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(368," Use Fixed Distance "),n()(),i(369,"div",34)(370,"mat-form-field",72)(371,"mat-label"),d(372),n(),i(373,"input",80,11),u("ngModelChange",function(t){return g(o),f(e.formattedNumberModel.rangeCirclesDistance,t)||(e.formattedNumberModel.rangeCirclesDistance=t),m(t)}),p("change",function(){g(o);let t=M(374);return m(e.parseFormattedNumber(t))}),n(),V(375,ni,2,0,"mat-error"),n()()()()()()(),D(376,"br"),i(377,"mat-card",32)(378,"mat-card-content")(379,"div",33)(380,"fieldset")(381,"legend")(382,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trail,t)||(e.facade.settings.vessels.trail=t),m(t)}),p("change",function(){return g(o),m(e.persistModel("vesselTrail"))}),d(383," Display Vessel Track "),n()(),i(384,"div",33)(385,"div",34)(386,"mat-checkbox",81),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trailFromServer,t)||(e.facade.settings.vessels.trailFromServer=t),m(t)}),p("change",function(){return g(o),m(e.persistModel("trailFromServer"))}),d(387," Get Track from server "),n(),d(388," \xA0\xA0 "),i(389,"mat-slider",82)(390,"input",83),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trailDuration,t)||(e.facade.settings.vessels.trailDuration=t),m(t)}),p("valueChange",function(){return g(o),m(e.deferPersist())}),n()(),d(391),n()(),i(392,"div",33)(393,"div",34)(394,"mat-form-field",35)(395,"mat-label"),d(396,"Resolution: Last hour"),n(),i(397,"mat-select",78),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trailResolution.lastHour,t)||(e.facade.settings.vessels.trailResolution.lastHour=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(398,ai,2,2,"mat-option",37,v),n()()(),i(400,"div",34)(401,"mat-form-field",35)(402,"mat-label"),d(403,"Resolution: 1 hr -> 24 hrs"),n(),i(404,"mat-select",78),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trailResolution.next23,t)||(e.facade.settings.vessels.trailResolution.next23=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(405,oi,2,2,"mat-option",37,v),n()()(),i(407,"div",34)(408,"mat-form-field",35)(409,"mat-label"),d(410,"Resolution: > 24 hrs"),n(),i(411,"mat-select",78),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.trailResolution.beyond24,t)||(e.facade.settings.vessels.trailResolution.beyond24=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(412,ri,2,2,"mat-option",37,v),n()()()()()()()(),i(414,"div",31),d(415,"OTHER VESSELS"),n(),i(416,"mat-card",32)(417,"mat-card-content")(418,"div",33)(419,"div",34)(420,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisShowTrack,t)||(e.facade.settings.vessels.aisShowTrack=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(421," Show Track "),n(),d(422," \xA0 "),i(423,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.aisStateFilter.moored,t)||(e.aisStateFilter.moored=t),m(t)}),p("change",function(){return g(o),m(e.onAisStateFilter())}),d(424," Hide Moored "),n(),d(425," \xA0 "),i(426,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.aisStateFilter.anchored,t)||(e.aisStateFilter.anchored=t),m(t)}),p("change",function(){return g(o),m(e.onAisStateFilter())}),d(427," Hide Anchored "),n()()(),i(428,"div",33)(429,"div",34)(430,"mat-form-field",35)(431,"mat-label"),d(432,"Mark AIS target inactive after"),n(),i(433,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisStaleAge,t)||(e.facade.settings.vessels.aisStaleAge=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(434,si,2,2,"mat-option",37,v),n()()(),i(436,"div",34)(437,"mat-form-field",35)(438,"mat-label"),d(439,"Remove AIS target after"),n(),i(440,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisMaxAge,t)||(e.facade.settings.vessels.aisMaxAge=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(441,li,2,2,"mat-option",37,v),n()()(),i(443,"div",34)(444,"mat-form-field",35)(445,"mat-label"),d(446,"Wind Vector Value"),n(),i(447,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisWindApparent,t)||(e.facade.settings.vessels.aisWindApparent=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(448,di,2,2,"mat-option",37,v),n()()(),i(450,"div",34)(451,"mat-form-field",35)(452,"mat-label"),d(453,"Wind / Track Zoom Level"),n(),i(454,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisWindMinZoom,t)||(e.facade.settings.vessels.aisWindMinZoom=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(455,gi,2,2,"mat-option",37,b),n()()(),i(457,"div",34)(458,"mat-form-field",35)(459,"mat-label"),d(460,"COG Line"),n(),i(461,"mat-select",52),u("ngModelChange",function(t){return g(o),f(e.facade.settings.vessels.aisCogLine,t)||(e.facade.settings.vessels.aisCogLine=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(462,mi,2,2,"mat-option",37,v),n()()()()()()()()()(),i(464,"mat-tab",84)(465,"div",28)(466,"div",29)(467,"div",85)(468,"div",31),d(469,"NOTES"),n(),i(470,"mat-card",32)(471,"mat-card-content")(472,"div",41)(473,"div",34)(474,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.ui.showNotes,t)||(e.facade.settings.ui.showNotes=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(475," Display Notes on Map "),n()(),i(476,"div",34)(477,"mat-form-field",35)(478,"mat-label"),d(479,"Notes Zoom Level"),n(),i(480,"mat-select",86),u("valueChange",function(t){return g(o),f(e.facade.settings.resources.notes.minZoom,t)||(e.facade.settings.resources.notes.minZoom=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel("fetchNotes"))}),S(481,ci,2,2,"mat-option",37,b),n()()()(),i(483,"div",41)(484,"div",34)(485,"mat-form-field",35)(486,"mat-label"),d(487),n(),i(488,"mat-select",48),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.notes.getRadius,t)||(e.facade.settings.resources.notes.getRadius=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel("fetchNotes"))}),S(489,pi,2,2,"mat-option",37,b),n()()()(),i(491,"div",41)(492,"div",34)(493,"mat-form-field",87)(494,"mat-label"),d(495,"Notes fetch filter:"),n(),i(496,"input",88,12),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.notes.rootFilter,t)||(e.facade.settings.resources.notes.rootFilter=t),m(t)}),p("change",function(){return g(o),m(e.persistModel("fetchNotes"))}),n(),V(498,_i,3,0,"button",89),n()()(),i(499,"div",41)(500,"div",34)(501,"mat-checkbox",90),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.notes.groupNameEdit,t)||(e.facade.settings.resources.notes.groupNameEdit=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(502," Edit Group Names "),n()(),i(503,"div",34)(504,"mat-checkbox",91),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.notes.groupRequiresPosition,t)||(e.facade.settings.resources.notes.groupRequiresPosition=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(505," Position Group Note "),n()()()()()(),i(506,"div",92)(507,"div",31),d(508,"CUSTOM RESOURCES"),n(),i(509,"mat-card",32)(510,"mat-card-content")(511,"div",41)(512,"div",34)(513,"div",93),d(514," Select custom resource types (./resources/<name>) "),n(),i(515,"mat-selection-list",94,13),p("selectionChange",function(){g(o);let t=M(516);return m(e.onResPathSelected(t))}),S(517,fi,2,3,"mat-list-option",95,b),n()()()()()()()()(),V(519,hi,21,2,"mat-tab",96),i(520,"mat-tab",97)(521,"div",28)(522,"div",29)(523,"div",98)(524,"div",31),d(525,"SIGNAL K: CONNECTION"),n(),i(526,"mat-card",32)(527,"mat-card-content")(528,"div",41)(529,"fieldset")(530,"legend"),d(531,"Filter Stream data:"),n(),i(532,"span",99),d(533," Check to include Signal K schema groups on display."),D(534,"br"),i(535,"i"),d(536,"Use to manage display performance."),n()(),i(537,"div",34)(538,"mat-checkbox",100),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.vessels,t)||(e.facade.settings.signalk.vessels=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(539," Vessels (other than Self) "),n()(),i(540,"div",34)(541,"mat-checkbox",101),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.atons,t)||(e.facade.settings.signalk.atons=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(542," Aids to Navigation (AtoN) "),n()(),i(543,"div",34)(544,"mat-checkbox",102),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.aircraft,t)||(e.facade.settings.signalk.aircraft=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(545," Aircraft "),n()(),i(546,"div",34)(547,"mat-checkbox",103),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.sar,t)||(e.facade.settings.signalk.sar=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(548," Search and Rescue (SaR) "),n()(),i(549,"div",34)(550,"mat-checkbox",104),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.meteo,t)||(e.facade.settings.signalk.meteo=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(551," Weather (Meteo) "),n()(),i(552,"div",34),D(553,"br"),i(554,"mat-form-field",35)(555,"mat-label"),d(556,"Max. distance from vessel"),n(),i(557,"mat-select",105,14),u("ngModelChange",function(t){return g(o),f(e.facade.settings.signalk.maxRadius,t)||(e.facade.settings.signalk.maxRadius=t),m(t)}),p("selectionChange",function(){return g(o),m(e.persistModel())}),S(559,Si,2,2,"mat-option",37,v),n()()()()(),i(561,"div",41)(562,"div",34)(563,"button",106),p("click",function(){return g(o),m(e.clearAuthToken())}),i(564,"mat-icon"),d(565,"key_off"),n()()()()()()()()()(),i(566,"mat-tab",107)(567,"div",28)(568,"div",29)(569,"div",108)(570,"div",31),d(571,"EXPERIMENTS"),n(),i(572,"mat-card",32)(573,"mat-card-content")(574,"div",41)(575,"div",34)(576,"mat-checkbox",43),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.video.enable,t)||(e.facade.settings.resources.video.enable=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),d(577," Enable Video "),n()(),i(578,"div",34)(579,"mat-form-field",87)(580,"mat-label"),d(581,"url:"),n(),i(582,"input",109,15),u("ngModelChange",function(t){return g(o),f(e.facade.settings.resources.video.url,t)||(e.facade.settings.resources.video.url=t),m(t)}),p("change",function(){return g(o),m(e.persistModel("videoUrl"))}),n(),V(584,wi,2,0,"mat-error"),n()()(),i(585,"div",41)(586,"div",34)(587,"mat-checkbox",110,16),u("ngModelChange",function(t){return g(o),f(e.facade.settings.experiments,t)||(e.facade.settings.experiments=t),m(t)}),p("change",function(){return g(o),m(e.persistModel())}),i(589,"mat-icon"),d(590,"science"),n(),d(591," Experimental Features "),n()()()()()()()()()()()}if(a&2){let o=M(87),r=M(197),t=M(206),ne=M(215),ae=M(240),le=M(247),de=M(287),oe=M(295),re=M(301),se=M(374),st=M(497),lt=M(583);s(25),_("ngModel",e.facade.settings.display.darkMode.source),s(),w(e.options.darkMode),s(3),_("ngModel",e.facade.settings.display.nightMode),s(6),_("ngModel",e.facade.settings.display.fab),s(),w(e.options.buttons.fab),s(3),h("disabled",!e.wakeLock.isAvailable),_("ngModel",e.facade.settings.display.disableWakelock),s(5),T(e.facade.applicationList.length>1?44:-1),s(),T(e.show.favourites()?45:-1),s(9),_("ngModel",e.facade.settings.display.muteSound),s(3),_("ngModel",e.facade.settings.display.depthAlarm.enabled),s(6),_("ngModel",e.facade.settings.display.depthAlarm.smoothing),h("disabled",!e.facade.settings.display.depthAlarm.enabled),s(),w(e.options.alarm.smoothing),s(14),h("disabled",!e.app.serverConfig.unitPreferences()),_("ngModel",e.facade.settings.units.useServerPrefs),s(8),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.distance),s(2),w(e.options.availableUnits.distance),s(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.depth),s(),w(e.options.availableUnits.depth),s(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.length),s(),w(e.options.availableUnits.length),s(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.temperature),s(),w(e.options.availableUnits.temperature),s(6),h("disabled",e.facade.settings.units.useServerPrefs),_("ngModel",e.facade.settings.units.speed),s(),w(e.options.availableUnits.speed),s(3),T(e.options.preferredValues.coords.length!==0?119:-1),s(),T(e.options.preferredValues.heading.length!==0?120:-1),s(16),_("ngModel",e.facade.settings.map.labelsMinZoom),s(),w(e.options.zoomLevels),s(6),_("ngModel",e.facade.settings.map.centerOffset),s(),w(e.options.map.centerOffset),s(3),_("ngModel",e.facade.settings.map.popoverMulti),s(3),_("ngModel",e.facade.settings.map.doubleClickZoom),s(3),_("ngModel",e.facade.settings.map.overZoomTiles),s(3),_("ngModel",e.facade.settings.map.lockMoveMap),s(11),_("ngModel",e.facade.settings.map.s57Options.graphicsStyle),s(),w(e.options.map.s57.graphicsStyle),s(6),_("ngModel",e.facade.settings.map.s57Options.boundaries),s(),w(e.options.map.s57.boundaries),s(6),_("ngModel",e.facade.settings.map.s57Options.colorTable),s(),w(e.options.map.s57.colorTables),s(6),_("ngModel",e.facade.settings.map.s57Options.colors),s(),w(e.options.map.s57.colors),s(7),_("ngModel",e.facade.settings.map.s57Options.shallowDepth),s(2),T(r.invalid&&(r.dirty||r.touched)?198:-1),s(7),_("ngModel",e.facade.settings.map.s57Options.safetyDepth),s(2),T(t.invalid&&(t.dirty||t.touched)?207:-1),s(7),_("ngModel",e.facade.settings.map.s57Options.deepDepth),s(2),T(ne.invalid&&(ne.dirty||ne.touched)?216:-1),s(7),_("ngModel",e.facade.settings.map.s57Options.otherLayers),s(),w(e.options.map.s57.otherLayers),s(15),_("ngModel",e.facade.settings.course.arrivalCircle),s(2),T(ae.invalid&&(ae.dirty||ae.touched)?241:-1),s(5),_("ngModel",e.facade.settings.course.autoNextPointOnArrival),s(8),h("disabled",le.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointTrigger),s(2),w(e.options.course.nextPointTrigger),s(6),h("disabled",le.checked===!1),_("ngModel",e.facade.settings.course.autoNextPointDelay),s(),w(e.options.course.nextPointDelay),s(17),_("ngModel",e.facade.settings.vessels.iconScale),s(),w(e.options.vessel.selfIconScale),s(5),_("ngModel",e.facade.settings.vessels.fixedLocationMode),s(8),_("ngModel",e.facade.fixedPosition[1]),h("disabled",!de.checked),s(2),T(oe.invalid&&(oe.dirty||oe.touched)?296:-1),s(4),_("ngModel",e.facade.fixedPosition[0]),h("disabled",!de.checked),s(2),T(re.invalid&&(re.dirty||re.touched)?302:-1),s(9),_("ngModel",e.facade.settings.vessels.windVectors),s(2),_("ngModel",e.facade.settings.vessels.laylines),s(12),_("ngModel",e.facade.settings.vessels.selfLines.heading.length),s(),w(e.options.vessel.headingLine),s(3),h("color",e.facade.settings.vessels.selfLines.heading.color)("dash",e.facade.settings.vessels.selfLines.heading.dash)("weight",e.facade.settings.vessels.selfLines.heading.weight),s(11),_("ngModel",e.facade.settings.vessels.selfLines.cog.length),s(),w(e.options.vessel.cogLine),s(3),h("color",e.facade.settings.vessels.selfLines.cog.color)("dash",e.facade.settings.vessels.selfLines.cog.dash)("weight",e.facade.settings.vessels.selfLines.cog.weight),s(4),_("ngModel",e.facade.settings.vessels.rangeCircles),s(7),_("ngModel",e.facade.settings.vessels.rangeCircleCount),h("disabled",!e.facade.settings.vessels.rangeCircles),s(),w(e.options.rangeCircles.count),s(6),_("ngModel",e.facade.settings.vessels.rangeCircleMinZoom),h("disabled",!e.facade.settings.vessels.rangeCircles),s(),w(e.options.rangeCircles.zoomLevels),s(4),_("ngModel",e.facade.settings.vessels.rangeCirclesFixed),h("disabled",!e.facade.settings.vessels.rangeCircles),s(5),k(" Distance between circles (",e.renderSymbol(e.facade.settings.units.distance),") "),s(),_("ngModel",e.formattedNumberModel.rangeCirclesDistance),h("disabled",!e.facade.settings.vessels.rangeCircles||!e.facade.settings.vessels.rangeCirclesFixed),s(2),T(se.invalid&&(se.dirty||se.touched)?375:-1),s(7),_("ngModel",e.facade.settings.vessels.trail),s(4),h("disabled",!e.facade.settings.vessels.trail),_("ngModel",e.facade.settings.vessels.trailFromServer),s(3),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),s(),_("ngModel",e.facade.settings.vessels.trailDuration),s(),k(" Length (",e.facade.settings.vessels.trailDuration," hrs) "),s(6),_("ngModel",e.facade.settings.vessels.trailResolution.lastHour),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),s(),w(e.options.trailIntervals.highResolution),s(6),_("ngModel",e.facade.settings.vessels.trailResolution.next23),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),s(),w(e.options.trailIntervals.highResolution),s(6),_("ngModel",e.facade.settings.vessels.trailResolution.beyond24),h("disabled",!e.facade.settings.vessels.trailFromServer||!e.facade.settings.vessels.trail),s(),w(e.options.trailIntervals.mediumResolution),s(8),_("ngModel",e.facade.settings.vessels.aisShowTrack),s(3),_("ngModel",e.aisStateFilter.moored),s(3),_("ngModel",e.aisStateFilter.anchored),s(7),_("ngModel",e.facade.settings.vessels.aisStaleAge),s(),w(e.options.vessel.aisTimeouts),s(6),_("ngModel",e.facade.settings.vessels.aisMaxAge),s(),w(e.options.vessel.aisTimeouts),s(6),_("ngModel",e.facade.settings.vessels.aisWindApparent),s(),w(e.options.preferredValues.wind),s(6),_("ngModel",e.facade.settings.vessels.aisWindMinZoom),s(),w(e.options.zoomLevels),s(6),_("ngModel",e.facade.settings.vessels.aisCogLine),s(),w(e.options.vessel.aisCogLine),s(12),_("ngModel",e.facade.settings.ui.showNotes),s(6),h("disabled",!e.facade.settings.ui.showNotes),_("value",e.facade.settings.resources.notes.minZoom),s(),w(e.options.zoomLevels),s(6),C("Fetch Notes radius: ("+e.options.availableUnits.distance.get(o.value)+")"),s(),h("disabled",!e.facade.settings.ui.showNotes),_("ngModel",e.facade.settings.resources.notes.getRadius),s(),w(e.options.resources.noteRadius),s(7),_("ngModel",e.facade.settings.resources.notes.rootFilter),s(2),T(st.value?498:-1),s(3),_("ngModel",e.facade.settings.resources.notes.groupNameEdit),s(3),_("ngModel",e.facade.settings.resources.notes.groupRequiresPosition),s(13),w(e.facade.resourcePathList),s(2),T(e.app.featureFlags().radarApi?519:-1),s(19),_("ngModel",e.facade.settings.signalk.vessels),s(3),_("ngModel",e.facade.settings.signalk.atons),s(3),_("ngModel",e.facade.settings.signalk.aircraft),s(3),_("ngModel",e.facade.settings.signalk.sar),s(3),_("ngModel",e.facade.settings.signalk.meteo),s(7),_("ngModel",e.facade.settings.signalk.maxRadius),s(2),w(e.options.vessel.aisMaxRadius),s(17),_("ngModel",e.facade.settings.resources.video.enable),s(6),h("disabled",!e.facade.settings.resources.video.enable),_("ngModel",e.facade.settings.resources.video.url),s(2),T(lt.invalid?584:-1),s(3),_("ngModel",e.facade.settings.experiments)}},dependencies:[Z,R,ve,U,Te,De,Ve,be,G,Se,he,Be,Ie,ee,Qe,$,Fe,xe,Oe,ke,We,Ee,Me,A,Ce,we,N,ye,H,Le,tt,$e,et,je,J,z,K,Ae,Ne,Y,X,Re,j,q,Pe,Ze,Ge,Je,Xe,Ye,ie,te],styles:["[_nghost-%COMP%] .mat-dialog-content{padding:0 4px}.settings[_ngcontent-%COMP%] .setting-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}.setting-card-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.settings[_ngcontent-%COMP%] .setting-card-row-item[_ngcontent-%COMP%]{padding-right:15px;flex:1 1 auto}@media only screen and (max-width:599px){.settings[_ngcontent-%COMP%] .setting-group[_ngcontent-%COMP%]{padding:5px 5%}}@media only screen and (min-width:600px)and (max-width:959px),screen and (min-width:960px)and (max-width:1279px),screen and (min-width:1280px)and (max-width:1919px),screen and (min-width:1920px)and (max-width:5000px){.settings[_ngcontent-%COMP%] .setting-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{rt as SettingsDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as Z,
|
|
1
|
+
import{E as Z,Ja as $,m as N,u as Q,v as X,y as Y}from"./chunk-XWAJLSAM.js";import{i as K,k as W}from"./chunk-TQPGRJVE.js";import{e as B,f as J,g as U,i as q}from"./chunk-HQSHA6SH.js";import{Aa as u,Ba as g,Da as y,Ea as M,Ed as V,Fa as I,Ga as _,Gd as A,Ha as i,Ia as t,Ja as h,Jd as F,Ld as O,M as d,Md as j,N as p,Qa as b,Sa as f,Ua as c,ce as L,fa as r,ge as H,hb as o,ib as w,jb as v,ka as m,lb as D,mb as S,me as z,na as C,nb as E,rd as P,sd as R,se as G,vd as k,xd as T}from"./chunk-QPQHN5VS.js";import"./chunk-EQVTEUXC.js";function te(a,n){if(a&1&&(i(0,"mat-option",10),o(1),t()),a&2){let e=n.$implicit;_("value",e),r(),w(e)}}function ie(a,n){if(a&1){let e=b();i(0,"div")(1,"ap-file-input",17),f("chosen",function(l){d(e);let x=c(2);return p(x.parseFile(l))}),i(2,"div",18)(3,"div",19),o(4," Click or Drop file "),t()()()()}a&2&&(r(),_("astext",!0))}function oe(a,n){if(a&1){let e=b();i(0,"div")(1,"div")(2,"b"),o(3,"Invalid Resource Data:"),t(),h(4,"br")(5,"br"),i(6,"i"),o(7,"Selected file does not contain valid data. "),t(),h(8,"br"),t(),i(9,"div",20)(10,"button",21),f("click",function(){d(e);let l=c(2);return p(l.app.showHelp("resource"))}),i(11,"mat-icon"),o(12,"help"),t(),o(13," Help "),t()()()}}function ae(a,n){a&1&&(i(0,"div",16),o(1," Note: Data will not be validated when uploaded to server! "),t())}function ne(a,n){if(a&1){let e=b();i(0,"div",7)(1,"div")(2,"mat-form-field",8)(3,"mat-label"),o(4,"Select Destination Path"),t(),i(5,"mat-select",9,0),E("valueChange",function(l){d(e);let x=c();return S(x.targetPath,l)||(x.targetPath=l),p(l)}),M(7,te,2,2,"mat-option",10,y),t()()(),u(9,ie,5,1,"div"),u(10,oe,14,0,"div"),i(11,"div")(12,"div",11)(13,"div",12)(14,"div")(15,"span",13),o(16,"Name:"),t(),o(17),t(),i(18,"div")(19,"span",13),o(20,"Type:"),t(),o(21),t()()(),i(22,"div",14)(23,"button",15),f("click",function(){d(e);let l=c();return p(l.load())}),i(24,"mat-icon"),o(25,"file_upload"),t(),o(26," \xA0Load\xA0 "),t(),h(27,"br"),o(28,"\xA0 "),u(29,ae,2,0,"div",16),t()()()}if(a&2){let e=c();r(5),_("disabled",!e.resPaths),D("value",e.targetPath),r(2),I(e.resPaths),r(2),g(e.source.name?-1:9),r(),g(e.display.notValid?10:-1),r(7),v(" ",e.source.name," "),r(4),v(" ",e.source.type," "),r(2),_("disabled",!e.targetPath||!e.source.name),r(6),g(e.targetPath&&e.source.name?29:-1)}}var ee=class a{constructor(n,e,s,l){this.app=n;this.skclient=e;this.dialogRef=s;this.data=l}resPaths=[];targetPath=null;source={type:null,name:null,data:null};display={notValid:!1};unsubscribe=[];ngOnInit(){this.skclient.api.get(this.app.skApiVersion,"/resources").subscribe(n=>{this.resPaths=[],this.targetPath=null,this.resPaths=Object.keys(n).filter(e=>!["routes","waypoints","notes","regions","charts","tracks"].includes(e))},()=>{this.resPaths=[],this.targetPath=null})}ngOnDestroy(){this.unsubscribe.forEach(n=>n.unsubscribe())}load(){this.dialogRef.close({path:this.targetPath,data:this.source.data})}parseFile(n){this.source=n,this.source.type="Unknown";try{let e=JSON.parse(n.data);this.source.type=e.type?e.type:this.source.type}catch{console.log("Error parsing resource file!")}}static \u0275fac=function(e){return new(e||a)(m(Z),m(Y),m(P),m(R))};static \u0275cmp=C({type:a,selectors:[["resource-upload-dialog"]],decls:13,vars:1,consts:[["respaths",""],[1,"resourceload-dialog"],[2,"background-color","transparent"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content",""],[1,"card-group"],["floatLabel","always",2,"width","100%"],["id","respaths",3,"valueChange","disabled","value"],[3,"value"],[2,"display","flex","flex-wrap","wrap"],[2,"flex","1 1 auto","padding","5px","font-size","smaller"],[2,"font-weight","bold"],[2,"text-align","center","padding-top","15px"],["mat-raised-button","","matTooltip","Load features","matTooltipPosition","below",3,"click","disabled"],[2,"padding","10px","border","gray 1px dashed","font-style","italic"],[3,"chosen","astext"],[2,"width","200px"],[2,"padding","25%","border","gray 1px dashed"],[2,"width","100%","text-align","center"],["mat-raised-button","",3,"click"]],template:function(e,s){e&1&&(i(0,"div",1)(1,"mat-toolbar",2)(2,"span")(3,"mat-icon"),o(4,"category"),t()(),i(5,"span",3),o(6,"Load Resource"),t(),i(7,"span",4)(8,"button",5),f("click",function(){return s.dialogRef.close()}),i(9,"mat-icon"),o(10,"close"),t()()()(),i(11,"div",6),u(12,ne,30,8,"div",7),t()()),e&2&&(r(12),g(s.display.notValid?-1:12))},dependencies:[L,G,z,H,q,U,J,N,B,j,O,K,F,A,V,X,Q,W,T,k,$],styles:[".resourceload-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative;width:100%}.card-group[_ngcontent-%COMP%]{padding:5px 5%}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{ee as ResourceImportDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fa as a}from"./chunk-XWAJLSAM.js";import"./chunk-TQPGRJVE.js";import"./chunk-HQSHA6SH.js";import"./chunk-QPQHN5VS.js";import"./chunk-EQVTEUXC.js";export{a as Trail2RouteDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ea as a}from"./chunk-XWAJLSAM.js";import"./chunk-TQPGRJVE.js";import"./chunk-HQSHA6SH.js";import"./chunk-QPQHN5VS.js";import"./chunk-EQVTEUXC.js";export{a as GeoJSONImportDialog};
|
|
@@ -10,4 +10,4 @@ import{$c as Ce,Aa as N,Ac as O,Ba as Y,Bc as pa,Bd as xa,C as _e,D as mt,Da as
|
|
|
10
10
|
`],encapsulation:2,changeDetection:0})}return n})();function Lt(n){return n?.nodeName==="TD"}function Nt(n){let o;return Lt(n)?o=n:Lt(n.parentNode)?o=n.parentNode:Lt(n.parentNode?.parentNode)&&(o=n.parentNode.parentNode),o?.getAttribute("data-mat-row")!=null?o:null}function Yt(n,o,e){return e!==null&&o!==e&&n<e&&n===o}function Bt(n,o,e){return o!==null&&o!==e&&n>=o&&n===e}function Ht(n,o,e,t){return t&&o!==null&&e!==null&&o!==e&&n>=o&&n<=e}function ri(n){let o=n.changedTouches[0];return document.elementFromPoint(o.clientX,o.clientY)}var H=class{start;end;_disableStructuralEquivalency;constructor(o,e){this.start=o,this.end=e}},ze=(()=>{class n{selection;_adapter;_selectionChanged=new C;selectionChanged=this._selectionChanged;constructor(e,t){this.selection=e,this._adapter=t,this.selection=e}updateSelection(e,t){let a=this.selection;this.selection=e,this._selectionChanged.next({selection:e,source:t,oldValue:a})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(e){return this._adapter.isDateInstance(e)&&this._adapter.isValid(e)}static \u0275fac=function(t){ea()};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})(),vn=(()=>{class n extends ze{constructor(e){super(null,e)}add(e){super.updateSelection(e,this)}isValid(){return this.selection!=null&&this._isValidDateInstance(this.selection)}isComplete(){return this.selection!=null}clone(){let e=new n(this._adapter);return e.updateSelection(this.selection,this),e}static \u0275fac=function(t){return new(t||n)(Zt(I))};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();var hi={provide:ze,useFactory:()=>s(ze,{optional:!0,skipSelf:!0})||new vn(s(I))};var pi=new x("MAT_DATE_RANGE_SELECTION_STRATEGY");var zt=7,Dn=0,oi=(()=>{class n{_changeDetectorRef=s(T);_dateFormats=s(me,{optional:!0});_dateAdapter=s(I,{optional:!0});_dir=s(ne,{optional:!0});_rangeStrategy=s(pi,{optional:!0});_rerenderSubscription=j.EMPTY;_selectionKeyPressed;get activeDate(){return this._activeDate}set activeDate(e){let t=this._activeDate,a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._hasSameMonthAndYear(t,this._activeDate)||this._init()}_activeDate;get selected(){return this._selected}set selected(e){e instanceof H?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setRanges(this._selected)}_selected;get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_minDate;get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_maxDate;dateFilter;dateClass;comparisonStart;comparisonEnd;startDateAccessibleName;endDateAccessibleName;activeDrag=null;selectedChange=new m;_userSelection=new m;dragStarted=new m;dragEnded=new m;activeDateChange=new m;_matCalendarBody;_monthLabel=y("");_weeks=y([]);_firstWeekOffset=y(0);_rangeStart=y(null);_rangeEnd=y(null);_comparisonRangeStart=y(null);_comparisonRangeEnd=y(null);_previewStart=y(null);_previewEnd=y(null);_isRange=y(!1);_todayDate=y(null);_weekdays=y([]);constructor(){s(be).load(De),this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(_e(null)).subscribe(()=>this._init())}ngOnChanges(e){let t=e.comparisonStart||e.comparisonEnd;t&&!t.firstChange&&this._setRanges(this.selected),e.activeDrag&&!this.activeDrag&&this._clearPreview()}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(e){let t=e.value,a=this._getDateFromDayOfMonth(t),i,r;this._selected instanceof H?(i=this._getDateInCurrentMonth(this._selected.start),r=this._getDateInCurrentMonth(this._selected.end)):i=r=this._getDateInCurrentMonth(this._selected),(i!==t||r!==t)&&this.selectedChange.emit(a),this._userSelection.emit({value:a,event:e.event}),this._clearPreview(),this._changeDetectorRef.markForCheck()}_updateActiveDate(e){let t=e.value,a=this._activeDate;this.activeDate=this._getDateFromDayOfMonth(t),this._dateAdapter.compareDate(a,this.activeDate)&&this.activeDateChange.emit(this._activeDate)}_handleCalendarBodyKeydown(e){let t=this._activeDate,a=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,a?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case 40:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case 36:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=e.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case 13:case 32:this._selectionKeyPressed=!0,this._canSelect(this._activeDate)&&e.preventDefault();return;case 27:this._previewEnd()!=null&&!O(e)&&(this._clearPreview(),this.activeDrag?this.dragEnded.emit({value:null,event:e}):(this.selectedChange.emit(null),this._userSelection.emit({value:null,event:e})),e.preventDefault(),e.stopPropagation());return;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._canSelect(this._activeDate)&&this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setRanges(this.selected),this._todayDate.set(this._getCellCompareValue(this._dateAdapter.today())),this._monthLabel.set(this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase());let e=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset.set((zt+this._dateAdapter.getDayOfWeek(e)-this._dateAdapter.getFirstDayOfWeek())%zt),this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(e){this._matCalendarBody._focusActiveCell(e)}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_previewChanged({event:e,value:t}){if(this._rangeStrategy){let a=t?t.rawValue:null,i=this._rangeStrategy.createPreview(a,this.selected,e);if(this._previewStart.set(this._getCellCompareValue(i.start)),this._previewEnd.set(this._getCellCompareValue(i.end)),this.activeDrag&&a){let r=this._rangeStrategy.createDrag?.(this.activeDrag.value,this.selected,a,e);r&&(this._previewStart.set(this._getCellCompareValue(r.start)),this._previewEnd.set(this._getCellCompareValue(r.end)))}}}_dragEnded(e){if(this.activeDrag)if(e.value){let t=this._rangeStrategy?.createDrag?.(this.activeDrag.value,this.selected,e.value,e.event);this.dragEnded.emit({value:t??null,event:e.event})}else this.dragEnded.emit({value:null,event:e.event})}_getDateFromDayOfMonth(e){return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),e)}_initWeekdays(){let e=this._dateAdapter.getFirstDayOfWeek(),t=this._dateAdapter.getDayOfWeekNames("narrow"),i=this._dateAdapter.getDayOfWeekNames("long").map((r,u)=>({long:r,narrow:t[u],id:Dn++}));this._weekdays.set(i.slice(e).concat(i.slice(0,e)))}_createWeekCells(){let e=this._dateAdapter.getNumDaysInMonth(this.activeDate),t=this._dateAdapter.getDateNames(),a=[[]];for(let i=0,r=this._firstWeekOffset();i<e;i++,r++){r==zt&&(a.push([]),r=0);let u=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),V=this._shouldEnableDate(u),Di=this._dateAdapter.format(u,this._dateFormats.display.dateA11yLabel),Ci=this.dateClass?this.dateClass(u,"month"):void 0;a[a.length-1].push(new He(i+1,t[i],Di,V,Ci,this._getCellCompareValue(u),u))}this._weeks.set(a)}_shouldEnableDate(e){return!!e&&(!this.minDate||this._dateAdapter.compareDate(e,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(e,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(e))}_getDateInCurrentMonth(e){return e&&this._hasSameMonthAndYear(e,this.activeDate)?this._dateAdapter.getDate(e):null}_hasSameMonthAndYear(e,t){return!!(e&&t&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(t)&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t))}_getCellCompareValue(e){if(e){let t=this._dateAdapter.getYear(e),a=this._dateAdapter.getMonth(e),i=this._dateAdapter.getDate(e);return new Date(t,a,i).getTime()}return null}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setRanges(e){e instanceof H?(this._rangeStart.set(this._getCellCompareValue(e.start)),this._rangeEnd.set(this._getCellCompareValue(e.end)),this._isRange.set(!0)):(this._rangeStart.set(this._getCellCompareValue(e)),this._rangeEnd.set(this._rangeStart()),this._isRange.set(!1)),this._comparisonRangeStart.set(this._getCellCompareValue(this.comparisonStart)),this._comparisonRangeEnd.set(this._getCellCompareValue(this.comparisonEnd))}_canSelect(e){return!this.dateFilter||this.dateFilter(e)}_clearPreview(){this._previewStart.set(null),this._previewEnd.set(null)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-month-view"]],viewQuery:function(t,a){if(t&1&&P(Ee,5),t&2){let i;v(i=D())&&(a._matCalendarBody=i.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName",activeDrag:"activeDrag"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",dragStarted:"dragStarted",dragEnded:"dragEnded",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[Z],decls:8,vars:14,consts:[["role","grid",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col"],["aria-hidden","true"],["colspan","7",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","previewChange","dragStarted","dragEnded","keyup","keydown","label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","startDateAccessibleName","endDateAccessibleName"],[1,"cdk-visually-hidden"]],template:function(t,a){t&1&&(l(0,"table",0)(1,"thead",1)(2,"tr"),te(3,sn,5,2,"th",2,ci),c(),l(5,"tr",3),k(6,"th",4),c()(),l(7,"tbody",5),b("selectedValueChange",function(r){return a._dateSelected(r)})("activeDateChange",function(r){return a._updateActiveDate(r)})("previewChange",function(r){return a._previewChanged(r)})("dragStarted",function(r){return a.dragStarted.emit(r)})("dragEnded",function(r){return a._dragEnded(r)})("keyup",function(r){return a._handleCalendarBodyKeyup(r)})("keydown",function(r){return a._handleCalendarBodyKeydown(r)}),c()()),t&2&&(d(3),ae(a._weekdays()),d(4),h("label",a._monthLabel())("rows",a._weeks())("todayValue",a._todayDate())("startValue",a._rangeStart())("endValue",a._rangeEnd())("comparisonStart",a._comparisonRangeStart())("comparisonEnd",a._comparisonRangeEnd())("previewStart",a._previewStart())("previewEnd",a._previewEnd())("isRange",a._isRange())("labelMinRequiredCells",3)("activeCell",a._dateAdapter.getDate(a.activeDate)-1)("startDateAccessibleName",a.startDateAccessibleName)("endDateAccessibleName",a.endDateAccessibleName))},dependencies:[Ee],encapsulation:2,changeDetection:0})}return n})(),L=24,Wt=4,si=(()=>{class n{_changeDetectorRef=s(T);_dateAdapter=s(I,{optional:!0});_dir=s(ne,{optional:!0});_rerenderSubscription=j.EMPTY;_selectionKeyPressed;get activeDate(){return this._activeDate}set activeDate(e){let t=this._activeDate,a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),mi(this._dateAdapter,t,this._activeDate,this.minDate,this.maxDate)||this._init()}_activeDate;get selected(){return this._selected}set selected(e){e instanceof H?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedYear(e)}_selected;get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_minDate;get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_maxDate;dateFilter;dateClass;selectedChange=new m;yearSelected=new m;activeDateChange=new m;_matCalendarBody;_years=y([]);_todayYear=y(0);_selectedYear=y(null);constructor(){this._dateAdapter,this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(_e(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear.set(this._dateAdapter.getYear(this._dateAdapter.today()));let t=this._dateAdapter.getYear(this._activeDate)-Be(this._dateAdapter,this.activeDate,this.minDate,this.maxDate),a=[];for(let i=0,r=[];i<L;i++)r.push(t+i),r.length==Wt&&(a.push(r.map(u=>this._createCellForYear(u))),r=[]);this._years.set(a),this._changeDetectorRef.markForCheck()}_yearSelected(e){let t=e.value,a=this._dateAdapter.createDate(t,0,1),i=this._getDateFromYear(t);this.yearSelected.emit(a),this.selectedChange.emit(i)}_updateActiveDate(e){let t=e.value,a=this._activeDate;this.activeDate=this._getDateFromYear(t),this._dateAdapter.compareDate(a,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let t=this._activeDate,a=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,a?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Wt);break;case 40:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,Wt);break;case 36:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-Be(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,L-Be(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-L*10:-L);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?L*10:L);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked(),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_getActiveCell(){return Be(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getDateFromYear(e){let t=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,t,1));return this._dateAdapter.createDate(e,t,Math.min(this._dateAdapter.getDate(this.activeDate),a))}_createCellForYear(e){let t=this._dateAdapter.createDate(e,0,1),a=this._dateAdapter.getYearName(t),i=this.dateClass?this.dateClass(t,"multi-year"):void 0;return new He(e,a,a,this._shouldEnableYear(e),i)}_shouldEnableYear(e){if(e==null||this.maxDate&&e>this._dateAdapter.getYear(this.maxDate)||this.minDate&&e<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;let t=this._dateAdapter.createDate(e,0,1);for(let a=t;this._dateAdapter.getYear(a)==e;a=this._dateAdapter.addCalendarDays(a,1))if(this.dateFilter(a))return!0;return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedYear(e){if(this._selectedYear.set(null),e instanceof H){let t=e.start||e.end;t&&this._selectedYear.set(this._dateAdapter.getYear(t))}else e&&this._selectedYear.set(this._dateAdapter.getYear(e))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-multi-year-view"]],viewQuery:function(t,a){if(t&1&&P(Ee,5),t&2){let i;v(i=D())&&(a._matCalendarBody=i.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell"]],template:function(t,a){t&1&&(l(0,"table",0)(1,"thead",1)(2,"tr"),k(3,"th",2),c()(),l(4,"tbody",3),b("selectedValueChange",function(r){return a._yearSelected(r)})("activeDateChange",function(r){return a._updateActiveDate(r)})("keyup",function(r){return a._handleCalendarBodyKeyup(r)})("keydown",function(r){return a._handleCalendarBodyKeydown(r)}),c()()),t&2&&(d(4),h("rows",a._years())("todayValue",a._todayYear())("startValue",a._selectedYear())("endValue",a._selectedYear())("numCols",4)("cellAspectRatio",4/7)("activeCell",a._getActiveCell()))},dependencies:[Ee],encapsulation:2,changeDetection:0})}return n})();function mi(n,o,e,t,a){let i=n.getYear(o),r=n.getYear(e),u=ui(n,t,a);return Math.floor((i-u)/L)===Math.floor((r-u)/L)}function Be(n,o,e,t){let a=n.getYear(o);return Cn(a-ui(n,e,t),L)}function ui(n,o,e){let t=0;return e?t=n.getYear(e)-L+1:o&&(t=n.getYear(o)),t}function Cn(n,o){return(n%o+o)%o}var li=(()=>{class n{_changeDetectorRef=s(T);_dateFormats=s(me,{optional:!0});_dateAdapter=s(I,{optional:!0});_dir=s(ne,{optional:!0});_rerenderSubscription=j.EMPTY;_selectionKeyPressed;get activeDate(){return this._activeDate}set activeDate(e){let t=this._activeDate,a=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(a,this.minDate,this.maxDate),this._dateAdapter.getYear(t)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}_activeDate;get selected(){return this._selected}set selected(e){e instanceof H?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)),this._setSelectedMonth(e)}_selected;get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_minDate;get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_maxDate;dateFilter;dateClass;selectedChange=new m;monthSelected=new m;activeDateChange=new m;_matCalendarBody;_months=y([]);_yearLabel=y("");_todayMonth=y(null);_selectedMonth=y(null);constructor(){this._activeDate=this._dateAdapter.today()}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(_e(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(e){let t=e.value,a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1);this.monthSelected.emit(a);let i=this._getDateFromMonth(t);this.selectedChange.emit(i)}_updateActiveDate(e){let t=e.value,a=this._activeDate;this.activeDate=this._getDateFromMonth(t),this._dateAdapter.compareDate(a,this.activeDate)&&this.activeDateChange.emit(this.activeDate)}_handleCalendarBodyKeydown(e){let t=this._activeDate,a=this._isRtl();switch(e.keyCode){case 37:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?1:-1);break;case 39:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,a?-1:1);break;case 38:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case 40:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case 36:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case 35:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case 33:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?-10:-1);break;case 34:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,e.altKey?10:1);break;case 13:case 32:this._selectionKeyPressed=!0;break;default:return}this._dateAdapter.compareDate(t,this.activeDate)&&(this.activeDateChange.emit(this.activeDate),this._focusActiveCellAfterViewChecked()),e.preventDefault()}_handleCalendarBodyKeyup(e){(e.keyCode===32||e.keyCode===13)&&(this._selectionKeyPressed&&this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:e}),this._selectionKeyPressed=!1)}_init(){this._setSelectedMonth(this.selected),this._todayMonth.set(this._getMonthInCurrentYear(this._dateAdapter.today())),this._yearLabel.set(this._dateAdapter.getYearName(this.activeDate));let e=this._dateAdapter.getMonthNames("short");this._months.set([[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(t=>t.map(a=>this._createCellForMonth(a,e[a])))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_focusActiveCellAfterViewChecked(){this._matCalendarBody._scheduleFocusActiveCellAfterViewChecked()}_getMonthInCurrentYear(e){return e&&this._dateAdapter.getYear(e)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(e):null}_getDateFromMonth(e){let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),a=this._dateAdapter.getNumDaysInMonth(t);return this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),a))}_createCellForMonth(e,t){let a=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1),i=this._dateAdapter.format(a,this._dateFormats.display.monthYearA11yLabel),r=this.dateClass?this.dateClass(a,"year"):void 0;return new He(e,t.toLocaleUpperCase(),i,this._shouldEnableMonth(e),r)}_shouldEnableMonth(e){let t=this._dateAdapter.getYear(this.activeDate);if(e==null||this._isYearAndMonthAfterMaxDate(t,e)||this._isYearAndMonthBeforeMinDate(t,e))return!1;if(!this.dateFilter)return!0;let a=this._dateAdapter.createDate(t,e,1);for(let i=a;this._dateAdapter.getMonth(i)==e;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(e,t){if(this.maxDate){let a=this._dateAdapter.getYear(this.maxDate),i=this._dateAdapter.getMonth(this.maxDate);return e>a||e===a&&t>i}return!1}_isYearAndMonthBeforeMinDate(e,t){if(this.minDate){let a=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return e<a||e===a&&t<i}return!1}_isRtl(){return this._dir&&this._dir.value==="rtl"}_setSelectedMonth(e){e instanceof H?this._selectedMonth.set(this._getMonthInCurrentYear(e.start)||this._getMonthInCurrentYear(e.end)):this._selectedMonth.set(this._getMonthInCurrentYear(e))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-year-view"]],viewQuery:function(t,a){if(t&1&&P(Ee,5),t&2){let i;v(i=D())&&(a._matCalendarBody=i.first)}},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","grid",1,"mat-calendar-table"],["aria-hidden","true",1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"selectedValueChange","activeDateChange","keyup","keydown","label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell"]],template:function(t,a){t&1&&(l(0,"table",0)(1,"thead",1)(2,"tr"),k(3,"th",2),c()(),l(4,"tbody",3),b("selectedValueChange",function(r){return a._monthSelected(r)})("activeDateChange",function(r){return a._updateActiveDate(r)})("keyup",function(r){return a._handleCalendarBodyKeyup(r)})("keydown",function(r){return a._handleCalendarBodyKeydown(r)}),c()()),t&2&&(d(4),h("label",a._yearLabel())("rows",a._months())("todayValue",a._todayMonth())("startValue",a._selectedMonth())("endValue",a._selectedMonth())("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",a._dateAdapter.getMonth(a.activeDate)))},dependencies:[Ee],encapsulation:2,changeDetection:0})}return n})(),_i=(()=>{class n{_intl=s(Ie);calendar=s(jt);_dateAdapter=s(I,{optional:!0});_dateFormats=s(me,{optional:!0});_periodButtonText;_periodButtonDescription;_periodButtonLabel;_prevButtonLabel;_nextButtonLabel;constructor(){s(be).load(De);let e=s(T);this._updateLabels(),this.calendar.stateChanges.subscribe(()=>{this._updateLabels(),e.markForCheck()})}get periodButtonText(){return this._periodButtonText}get periodButtonDescription(){return this._periodButtonDescription}get periodButtonLabel(){return this._periodButtonLabel}get prevButtonLabel(){return this._prevButtonLabel}get nextButtonLabel(){return this._nextButtonLabel}currentPeriodClicked(){this.calendar.currentView=this.calendar.currentView=="month"?"multi-year":"month"}previousClicked(){this.previousEnabled()&&(this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?-1:-L))}nextClicked(){this.nextEnabled()&&(this.calendar.activeDate=this.calendar.currentView=="month"?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,this.calendar.currentView=="year"?1:L))}previousEnabled(){return this.calendar.minDate?!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate):!0}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_updateLabels(){let e=this.calendar,t=this._intl,a=this._dateAdapter;e.currentView==="month"?(this._periodButtonText=a.format(e.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase(),this._periodButtonDescription=a.format(e.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase(),this._periodButtonLabel=t.switchToMultiYearViewLabel,this._prevButtonLabel=t.prevMonthLabel,this._nextButtonLabel=t.nextMonthLabel):e.currentView==="year"?(this._periodButtonText=a.getYearName(e.activeDate),this._periodButtonDescription=a.getYearName(e.activeDate),this._periodButtonLabel=t.switchToMonthViewLabel,this._prevButtonLabel=t.prevYearLabel,this._nextButtonLabel=t.nextYearLabel):(this._periodButtonText=t.formatYearRange(...this._formatMinAndMaxYearLabels()),this._periodButtonDescription=t.formatYearRangeLabel(...this._formatMinAndMaxYearLabels()),this._periodButtonLabel=t.switchToMonthViewLabel,this._prevButtonLabel=t.prevMultiYearLabel,this._nextButtonLabel=t.nextMultiYearLabel)}_isSameView(e,t){return this.calendar.currentView=="month"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t)&&this._dateAdapter.getMonth(e)==this._dateAdapter.getMonth(t):this.calendar.currentView=="year"?this._dateAdapter.getYear(e)==this._dateAdapter.getYear(t):mi(this._dateAdapter,e,t,this.calendar.minDate,this.calendar.maxDate)}_formatMinAndMaxYearLabels(){let t=this._dateAdapter.getYear(this.calendar.activeDate)-Be(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),a=t+L-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),r=this._dateAdapter.getYearName(this._dateAdapter.createDate(a,0,1));return[i,r]}_periodButtonLabelId=s(de).getId("mat-calendar-period-label-");static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:ln,decls:17,vars:13,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["aria-live","polite",1,"cdk-visually-hidden",3,"id"],["matButton","","type","button",1,"mat-calendar-period-button",3,"click"],["aria-hidden","true"],["viewBox","0 0 10 5","focusable","false","aria-hidden","true",1,"mat-calendar-arrow"],["points","0,0 5,5 10,0"],[1,"mat-calendar-spacer"],["matIconButton","","type","button","disabledInteractive","",1,"mat-calendar-previous-button",3,"click","disabled","matTooltip"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["matIconButton","","type","button","disabledInteractive","",1,"mat-calendar-next-button",3,"click","disabled","matTooltip"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"]],template:function(t,a){t&1&&(fe(),l(0,"div",0)(1,"div",1)(2,"span",2),p(3),c(),l(4,"button",3),b("click",function(){return a.currentPeriodClicked()}),l(5,"span",4),p(6),c(),ge(),l(7,"svg",5),k(8,"polygon",6),c()(),_t(),k(9,"div",7),ie(10),l(11,"button",8),b("click",function(){return a.previousClicked()}),ge(),l(12,"svg",9),k(13,"path",10),c()(),_t(),l(14,"button",11),b("click",function(){return a.nextClicked()}),ge(),l(15,"svg",9),k(16,"path",12),c()()()()),t&2&&(d(2),h("id",a._periodButtonLabelId),d(),E(a.periodButtonDescription),d(),M("aria-label",a.periodButtonLabel)("aria-describedby",a._periodButtonLabelId),d(2),E(a.periodButtonText),d(),A("mat-calendar-invert",a.calendar.currentView!=="month"),d(4),h("disabled",!a.previousEnabled())("matTooltip",a.prevButtonLabel),M("aria-label",a.prevButtonLabel),d(3),h("disabled",!a.nextEnabled())("matTooltip",a.nextButtonLabel),M("aria-label",a.nextButtonLabel))},dependencies:[Ne,At,ii],encapsulation:2,changeDetection:0})}return n})(),jt=(()=>{class n{_dateAdapter=s(I,{optional:!0});_dateFormats=s(me,{optional:!0});_changeDetectorRef=s(T);_elementRef=s(F);headerComponent;_calendarHeaderPortal;_intlChanges;_moveFocusOnNextTick=!1;get startAt(){return this._startAt}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_startAt;startView="month";get selected(){return this._selected}set selected(e){e instanceof H?this._selected=e:this._selected=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_selected;get minDate(){return this._minDate}set minDate(e){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_minDate;get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_maxDate;dateFilter;dateClass;comparisonStart;comparisonEnd;startDateAccessibleName;endDateAccessibleName;selectedChange=new m;yearSelected=new m;monthSelected=new m;viewChanged=new m(!0);_userSelection=new m;_userDragDrop=new m;monthView;yearView;multiYearView;get activeDate(){return this._clampedActiveDate}set activeDate(e){this._clampedActiveDate=this._dateAdapter.clampDate(e,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}_clampedActiveDate;get currentView(){return this._currentView}set currentView(e){let t=this._currentView!==e?e:null;this._currentView=e,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck(),t&&(this.stateChanges.next(),this.viewChanged.emit(t))}_currentView;_activeDrag=null;stateChanges=new C;constructor(){this._intlChanges=s(Ie).changes.subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}ngAfterContentInit(){this._calendarHeaderPortal=new Le(this.headerComponent||_i),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(e){let t=e.minDate&&!this._dateAdapter.sameDate(e.minDate.previousValue,e.minDate.currentValue)?e.minDate:void 0,a=e.maxDate&&!this._dateAdapter.sameDate(e.maxDate.previousValue,e.maxDate.currentValue)?e.maxDate:void 0,i=t||a||e.dateFilter;if(i&&!i.firstChange){let r=this._getCurrentViewComponent();r&&(this._elementRef.nativeElement.contains(yt())&&(this._moveFocusOnNextTick=!0),this._changeDetectorRef.detectChanges(),r._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){this._getCurrentViewComponent()._init()}_dateSelected(e){let t=e.value;(this.selected instanceof H||t&&!this._dateAdapter.sameDate(t,this.selected))&&this.selectedChange.emit(t),this._userSelection.emit(e)}_yearSelectedInMultiYearView(e){this.yearSelected.emit(e)}_monthSelectedInYearView(e){this.monthSelected.emit(e)}_goToDateInView(e,t){this.activeDate=e,this.currentView=t}_dragStarted(e){this._activeDrag=e}_dragEnded(e){this._activeDrag&&(e.value&&this._userDragDrop.emit(e),this._activeDrag=null)}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-calendar"]],viewQuery:function(t,a){if(t&1&&P(oi,5)(li,5)(si,5),t&2){let i;v(i=D())&&(a.monthView=i.first),v(i=D())&&(a.yearView=i.first),v(i=D())&&(a.multiYearView=i.first)}},hostAttrs:[1,"mat-calendar"],inputs:{headerComponent:"headerComponent",startAt:"startAt",startView:"startView",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",_userSelection:"_userSelection",_userDragDrop:"_userDragDrop"},exportAs:["matCalendar"],features:[Q([hi]),Z],decls:5,vars:2,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","_userSelection","dragStarted","dragEnded","activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName","activeDrag"],[3,"activeDateChange","monthSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"],[3,"activeDateChange","yearSelected","selectedChange","activeDate","selected","dateFilter","maxDate","minDate","dateClass"]],template:function(t,a){if(t&1&&(Re(0,dn,0,0,"ng-template",0),l(1,"div",1),N(2,cn,1,11,"mat-month-view",2)(3,hn,1,6,"mat-year-view",3)(4,pn,1,6,"mat-multi-year-view",3),c()),t&2){let i;h("cdkPortalOutlet",a._calendarHeaderPortal),d(2),Y((i=a.currentView)==="month"?2:i==="year"?3:i==="multi-year"?4:-1)}},dependencies:[Ct,la,oi,li,si],styles:[`.mat-calendar{display:block;line-height:normal;font-family:var(--mat-datepicker-calendar-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-datepicker-calendar-text-size, var(--mat-sys-body-medium-size))}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;align-items:center;margin:5% calc(4.7142857143% - 16px)}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0;margin:0 8px;font-size:var(--mat-datepicker-calendar-period-button-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-period-button-text-weight, var(--mat-sys-title-small-weight));--mat-button-text-label-text-color: var(--mat-datepicker-calendar-period-button-text-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow{display:inline-block;width:10px;height:5px;margin:0 0 0 5px;vertical-align:middle;fill:var(--mat-datepicker-calendar-period-button-icon-color, var(--mat-sys-on-surface-variant))}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}@media(forced-colors: active){.mat-calendar-arrow{fill:CanvasText}}.mat-datepicker-content .mat-calendar-previous-button:not(.mat-mdc-button-disabled),.mat-datepicker-content .mat-calendar-next-button:not(.mat-mdc-button-disabled){color:var(--mat-datepicker-calendar-navigation-button-icon-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0;color:var(--mat-datepicker-calendar-header-text-color, var(--mat-sys-on-surface-variant));font-size:var(--mat-datepicker-calendar-header-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-datepicker-calendar-header-text-weight, var(--mat-sys-title-small-weight))}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px;background:var(--mat-datepicker-calendar-header-divider-color, transparent)}.mat-calendar-body-cell-content::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}.mat-calendar-body-cell:focus .mat-focus-indicator::before{content:""}
|
|
11
11
|
`],encapsulation:2,changeDetection:0})}return n})(),wn=new x("mat-datepicker-scroll-strategy",{providedIn:"root",factory:()=>{let n=s($);return()=>Ce(n)}}),gi=(()=>{class n{_elementRef=s(F);_animationsDisabled=U();_changeDetectorRef=s(T);_globalModel=s(ze);_dateAdapter=s(I);_ngZone=s(Te);_rangeSelectionStrategy=s(pi,{optional:!0});_stateChanges;_model;_eventCleanups;_animationFallback;_calendar;color;datepicker;comparisonStart;comparisonEnd;startDateAccessibleName;endDateAccessibleName;_isAbove;_animationDone=new C;_isAnimating=!1;_closeButtonText;_closeButtonFocused;_actionsPortal=null;_dialogLabelId;constructor(){if(s(be).load(De),this._closeButtonText=s(Ie).closeCalendarLabel,!this._animationsDisabled){let e=this._elementRef.nativeElement,t=s(Oe);this._eventCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(e,"animationstart",this._handleAnimationEvent),t.listen(e,"animationend",this._handleAnimationEvent),t.listen(e,"animationcancel",this._handleAnimationEvent)])}}ngAfterViewInit(){this._stateChanges=this.datepicker.stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()}),this._calendar.focusActiveCell()}ngOnDestroy(){clearTimeout(this._animationFallback),this._eventCleanups?.forEach(e=>e()),this._stateChanges?.unsubscribe(),this._animationDone.complete()}_handleUserSelection(e){let t=this._model.selection,a=e.value,i=t instanceof H;if(i&&this._rangeSelectionStrategy){let r=this._rangeSelectionStrategy.selectionFinished(a,t,e.event);this._model.updateSelection(r,this)}else a&&(i||!this._dateAdapter.sameDate(a,t))&&this._model.add(a);(!this._model||this._model.isComplete())&&!this._actionsPortal&&this.datepicker.close()}_handleUserDragDrop(e){this._model.updateSelection(e.value,this)}_startExitAnimation(){this._elementRef.nativeElement.classList.add("mat-datepicker-content-exit"),this._animationsDisabled?this._animationDone.next():(clearTimeout(this._animationFallback),this._animationFallback=setTimeout(()=>{this._isAnimating||this._animationDone.next()},200))}_handleAnimationEvent=e=>{let t=this._elementRef.nativeElement;e.target!==t||!e.animationName.startsWith("_mat-datepicker-content")||(clearTimeout(this._animationFallback),this._isAnimating=e.type==="animationstart",t.classList.toggle("mat-datepicker-content-animating",this._isAnimating),this._isAnimating||this._animationDone.next())};_getSelected(){return this._model.selection}_applyPendingSelection(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}_assignActions(e,t){this._model=e?this._globalModel.clone():this._globalModel,this._actionsPortal=e,t&&this._changeDetectorRef.detectChanges()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-datepicker-content"]],viewQuery:function(t,a){if(t&1&&P(jt,5),t&2){let i;v(i=D())&&(a._calendar=i.first)}},hostAttrs:[1,"mat-datepicker-content"],hostVars:6,hostBindings:function(t,a){t&2&&(Pe(a.color?"mat-"+a.color:""),A("mat-datepicker-content-touch",a.datepicker.touchUi)("mat-datepicker-content-animations-enabled",!a._animationsDisabled))},inputs:{color:"color"},exportAs:["matDatepickerContent"],decls:5,vars:26,consts:[["cdkTrapFocus","","role","dialog",1,"mat-datepicker-content-container"],[3,"yearSelected","monthSelected","viewChanged","_userSelection","_userDragDrop","id","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","startDateAccessibleName","endDateAccessibleName"],[3,"cdkPortalOutlet"],["type","button","matButton","elevated",1,"mat-datepicker-close-button",3,"focus","blur","click","color"]],template:function(t,a){t&1&&(l(0,"div",0)(1,"mat-calendar",1),b("yearSelected",function(r){return a.datepicker._selectYear(r)})("monthSelected",function(r){return a.datepicker._selectMonth(r)})("viewChanged",function(r){return a.datepicker._viewChanged(r)})("_userSelection",function(r){return a._handleUserSelection(r)})("_userDragDrop",function(r){return a._handleUserDragDrop(r)}),c(),Re(2,mn,0,0,"ng-template",2),l(3,"button",3),b("focus",function(){return a._closeButtonFocused=!0})("blur",function(){return a._closeButtonFocused=!1})("click",function(){return a.datepicker.close()}),p(4),c()()),t&2&&(A("mat-datepicker-content-container-with-custom-header",a.datepicker.calendarHeaderComponent)("mat-datepicker-content-container-with-actions",a._actionsPortal),M("aria-modal",!0)("aria-labelledby",a._dialogLabelId??void 0),d(),Pe(a.datepicker.panelClass),h("id",a.datepicker.id)("startAt",a.datepicker.startAt)("startView",a.datepicker.startView)("minDate",a.datepicker._getMinDate())("maxDate",a.datepicker._getMaxDate())("dateFilter",a.datepicker._getDateFilter())("headerComponent",a.datepicker.calendarHeaderComponent)("selected",a._getSelected())("dateClass",a.datepicker.dateClass)("comparisonStart",a.comparisonStart)("comparisonEnd",a.comparisonEnd)("startDateAccessibleName",a.startDateAccessibleName)("endDateAccessibleName",a.endDateAccessibleName),d(),h("cdkPortalOutlet",a._actionsPortal),d(),A("cdk-visually-hidden",!a._closeButtonFocused),h("color",a.color||"primary"),d(),E(a._closeButtonText))},dependencies:[da,jt,Ct,Ne],styles:[`@keyframes _mat-datepicker-content-dropdown-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-dialog-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-datepicker-content-exit{from{opacity:1}to{opacity:0}}.mat-datepicker-content{display:block;background-color:var(--mat-datepicker-calendar-container-background-color, var(--mat-sys-surface-container-high));color:var(--mat-datepicker-calendar-container-text-color, var(--mat-sys-on-surface));box-shadow:var(--mat-datepicker-calendar-container-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-shape, var(--mat-sys-corner-large))}.mat-datepicker-content.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dropdown-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-content-container-with-custom-header .mat-calendar{height:auto}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.mat-datepicker-content-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;box-shadow:var(--mat-datepicker-calendar-container-touch-elevation-shadow, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));border-radius:var(--mat-datepicker-calendar-container-touch-shape, var(--mat-sys-corner-extra-large));position:relative;overflow:visible}.mat-datepicker-content-touch.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-dialog-enter 150ms cubic-bezier(0, 0, 0.2, 1)}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}.mat-datepicker-content-exit.mat-datepicker-content-animations-enabled{animation:_mat-datepicker-content-exit 100ms linear}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}
|
|
12
12
|
`],encapsulation:2,changeDetection:0})}return n})(),di=(()=>{class n{_injector=s($);_viewContainerRef=s(Ge);_dateAdapter=s(I,{optional:!0});_dir=s(ne,{optional:!0});_model=s(ze);_animationsDisabled=U();_scrollStrategy=s(wn);_inputStateChanges=j.EMPTY;_document=s(Ke);calendarHeaderComponent;get startAt(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)}set startAt(e){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e))}_startAt;startView="month";get color(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)}set color(e){this._color=e}_color;touchUi=!1;get disabled(){return this._disabled===void 0&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled}set disabled(e){e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}_disabled;xPosition="start";yPosition="below";restoreFocus=!0;yearSelected=new m;monthSelected=new m;viewChanged=new m(!0);dateClass;openedStream=new m;closedStream=new m;get panelClass(){return this._panelClass}set panelClass(e){this._panelClass=Ca(e)}_panelClass;get opened(){return this._opened}set opened(e){e?this.open():this.close()}_opened=!1;id=s(de).getId("mat-datepicker-");_getMinDate(){return this.datepickerInput&&this.datepickerInput.min}_getMaxDate(){return this.datepickerInput&&this.datepickerInput.max}_getDateFilter(){return this.datepickerInput&&this.datepickerInput.dateFilter}_overlayRef;_componentRef;_focusedElementBeforeOpen=null;_backdropHarnessClass=`${this.id}-backdrop`;_actionsPortal;datepickerInput;stateChanges=new C;_changeDetectorRef=s(T);constructor(){this._dateAdapter,this._model.selectionChanged.subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnChanges(e){let t=e.xPosition||e.yPosition;if(t&&!t.firstChange&&this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;a instanceof va&&(this._setConnectedPositions(a),this.opened&&this._overlayRef.updatePosition())}this.stateChanges.next(void 0)}ngOnDestroy(){this._destroyOverlay(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}select(e){this._model.add(e)}_selectYear(e){this.yearSelected.emit(e)}_selectMonth(e){this.monthSelected.emit(e)}_viewChanged(e){this.viewChanged.emit(e)}registerInput(e){return this.datepickerInput,this._inputStateChanges.unsubscribe(),this.datepickerInput=e,this._inputStateChanges=e.stateChanges.subscribe(()=>this.stateChanges.next(void 0)),this._model}registerActions(e){this._actionsPortal,this._actionsPortal=e,this._componentRef?.instance._assignActions(e,!0)}removeActions(e){e===this._actionsPortal&&(this._actionsPortal=null,this._componentRef?.instance._assignActions(null,!0))}open(){this._opened||this.disabled||this._componentRef?.instance._isAnimating||(this.datepickerInput,this._focusedElementBeforeOpen=yt(),this._openOverlay(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened||this._componentRef?.instance._isAnimating)return;let e=this.restoreFocus&&this._focusedElementBeforeOpen&&typeof this._focusedElementBeforeOpen.focus=="function",t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit())};if(this._componentRef){let{instance:a,location:i}=this._componentRef;a._animationDone.pipe(je(1)).subscribe(()=>{let r=this._document.activeElement;e&&(!r||r===this._document.activeElement||i.nativeElement.contains(r))&&this._focusedElementBeforeOpen.focus(),this._focusedElementBeforeOpen=null,this._destroyOverlay()}),a._startExitAnimation()}e?setTimeout(t):t()}_applyPendingSelection(){this._componentRef?.instance?._applyPendingSelection()}_forwardContentValues(e){e.datepicker=this,e.color=this.color,e._dialogLabelId=this.datepickerInput.getOverlayLabelId(),e._assignActions(this._actionsPortal,!1)}_openOverlay(){this._destroyOverlay();let e=this.touchUi,t=new Le(gi,this._viewContainerRef),a=this._overlayRef=tt(this._injector,new ya({positionStrategy:e?this._getDialogStrategy():this._getDropdownStrategy(),hasBackdrop:!0,backdropClass:[e?"cdk-overlay-dark-backdrop":"mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir||"ltr",scrollStrategy:e?ba(this._injector):this._scrollStrategy(),panelClass:`mat-datepicker-${e?"dialog":"popup"}`,disableAnimations:this._animationsDisabled}));this._getCloseStream(a).subscribe(i=>{i&&i.preventDefault(),this.close()}),a.keydownEvents().subscribe(i=>{let r=i.keyCode;(r===38||r===40||r===37||r===39||r===33||r===34)&&i.preventDefault()}),this._componentRef=a.attach(t),this._forwardContentValues(this._componentRef.instance),e||ye(()=>{a.updatePosition()},{injector:this._injector})}_destroyOverlay(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=this._componentRef=null)}_getDialogStrategy(){return Da(this._injector).centerHorizontally().centerVertically()}_getDropdownStrategy(){let e=et(this._injector,this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition();return this._setConnectedPositions(e)}_setConnectedPositions(e){let t=this.xPosition==="end"?"end":"start",a=t==="start"?"end":"start",i=this.yPosition==="above"?"bottom":"top",r=i==="top"?"bottom":"top";return e.withPositions([{originX:t,originY:r,overlayX:t,overlayY:i},{originX:t,originY:i,overlayX:t,overlayY:r},{originX:a,originY:r,overlayX:a,overlayY:i},{originX:a,originY:i,overlayX:a,overlayY:r}])}_getCloseStream(e){let t=["ctrlKey","shiftKey","metaKey"];return oe(e.backdropClick(),e.detachments(),e.keydownEvents().pipe(Ve(a=>a.keyCode===27&&!O(a)||this.datepickerInput&&O(a,"altKey")&&a.keyCode===38&&t.every(i=>!O(a,i)))))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ee({type:n,inputs:{calendarHeaderComponent:"calendarHeaderComponent",startAt:"startAt",startView:"startView",color:"color",touchUi:[2,"touchUi","touchUi",S],disabled:[2,"disabled","disabled",S],xPosition:"xPosition",yPosition:"yPosition",restoreFocus:[2,"restoreFocus","restoreFocus",S],dateClass:"dateClass",panelClass:"panelClass",opened:[2,"opened","opened",S]},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[Z]})}return n})(),fi=(()=>{class n extends di{static \u0275fac=(()=>{let e;return function(a){return(e||(e=Jt(n)))(a||n)}})();static \u0275cmp=w({type:n,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[Q([hi,{provide:di,useExisting:n}]),gt],decls:0,vars:0,template:function(t,a){},encapsulation:2,changeDetection:0})}return n})(),xe=class{target;targetElement;value;constructor(o,e){this.target=o,this.targetElement=e,this.value=this.target.value}},kn=(()=>{class n{_elementRef=s(F);_dateAdapter=s(I,{optional:!0});_dateFormats=s(me,{optional:!0});_isInitialized;get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(e){this._assignValueProgrammatically(e,!0)}_model;get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(e){let t=e,a=this._elementRef.nativeElement;this._disabled!==t&&(this._disabled=t,this.stateChanges.next(void 0)),t&&this._isInitialized&&a.blur&&a.blur()}_disabled;dateChange=new m;dateInput=new m;stateChanges=new C;_onTouched=()=>{};_validatorOnChange=()=>{};_cvaOnChange=()=>{};_valueChangesSubscription=j.EMPTY;_localeSubscription=j.EMPTY;_pendingValue;_parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}};_filterValidator=e=>{let t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value));return!t||this._matchesFilter(t)?null:{matDatepickerFilter:!0}};_minValidator=e=>{let t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)),a=this._getMinDate();return!a||!t||this._dateAdapter.compareDate(a,t)<=0?null:{matDatepickerMin:{min:a,actual:t}}};_maxValidator=e=>{let t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e.value)),a=this._getMaxDate();return!a||!t||this._dateAdapter.compareDate(a,t)>=0?null:{matDatepickerMax:{max:a,actual:t}}};_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(e){this._model=e,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(t=>{if(this._shouldHandleChangeEvent(t)){let a=this._getValueFromModel(t.selection);this._lastValueValid=this._isValidValue(a),this._cvaOnChange(a),this._onTouched(),this._formatValue(a),this.dateInput.emit(new xe(this,this._elementRef.nativeElement)),this.dateChange.emit(new xe(this,this._elementRef.nativeElement))}})}_lastValueValid=!1;constructor(){this._localeSubscription=this._dateAdapter.localeChanges.subscribe(()=>{this._assignValueProgrammatically(this.value,!0)})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(e){Mn(e,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this.stateChanges.complete()}registerOnValidatorChange(e){this._validatorOnChange=e}validate(e){return this._validator?this._validator(e):null}writeValue(e){this._assignValueProgrammatically(e,e!==this.value)}registerOnChange(e){this._cvaOnChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_onKeydown(e){let t=["ctrlKey","shiftKey","metaKey"];O(e,"altKey")&&e.keyCode===40&&t.every(i=>!O(e,i))&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),e.preventDefault())}_onInput(e){let t=e.target.value,a=this._lastValueValid,i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i);let r=!this._dateAdapter.sameDate(i,this.value);!i||r?this._cvaOnChange(i):(t&&!this.value&&this._cvaOnChange(i),a!==this._lastValueValid&&this._validatorOnChange()),r&&(this._assignValue(i),this.dateInput.emit(new xe(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new xe(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(e){this._elementRef.nativeElement.value=e!=null?this._dateAdapter.format(e,this._dateFormats.display.dateInput):""}_assignValue(e){this._model?(this._assignValueToModel(e),this._pendingValue=null):this._pendingValue=e}_isValidValue(e){return!e||this._dateAdapter.isValid(e)}_parentDisabled(){return!1}_assignValueProgrammatically(e,t){e=this._dateAdapter.deserialize(e),this._lastValueValid=this._isValidValue(e),e=this._dateAdapter.getValidDateOrNull(e),this._assignValue(e),t&&this._formatValue(e)}_matchesFilter(e){let t=this._getDateFilter();return!t||t(e)}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ee({type:n,inputs:{value:"value",disabled:[2,"disabled","disabled",S]},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[Z]})}return n})();function Mn(n,o){let e=Object.keys(n);for(let t of e){let{previousValue:a,currentValue:i}=n[t];if(o.isDateInstance(a)&&o.isDateInstance(i)){if(!o.sameDate(a,i))return!0}else return!0}return!1}var An={provide:Ta,useExisting:ut(()=>ht),multi:!0},Sn={provide:Ra,useExisting:ut(()=>ht),multi:!0},ht=(()=>{class n extends kn{_formField=s(ot,{optional:!0});_closedSubscription=j.EMPTY;_openedSubscription=j.EMPTY;set matDatepicker(e){e&&(this._datepicker=e,this._ariaOwns.set(e.opened?e.id:null),this._closedSubscription=e.closedStream.subscribe(()=>{this._onTouched(),this._ariaOwns.set(null)}),this._openedSubscription=e.openedStream.subscribe(()=>{this._ariaOwns.set(e.id)}),this._registerModel(e.registerInput(this)))}_datepicker;_ariaOwns=y(null);get min(){return this._min}set min(e){let t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._min)||(this._min=t,this._validatorOnChange())}_min;get max(){return this._max}set max(e){let t=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));this._dateAdapter.sameDate(t,this._max)||(this._max=t,this._validatorOnChange())}_max;get dateFilter(){return this._dateFilter}set dateFilter(e){let t=this._matchesFilter(this.value);this._dateFilter=e,this._matchesFilter(this.value)!==t&&this._validatorOnChange()}_dateFilter;_validator;constructor(){super(),this._validator=rt.compose(super._getValidators())}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getOverlayLabelId(){return this._formField?this._formField.getLabelId():this._elementRef.nativeElement.getAttribute("aria-labelledby")}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}ngOnDestroy(){super.ngOnDestroy(),this._closedSubscription.unsubscribe(),this._openedSubscription.unsubscribe()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(e){return e}_assignValueToModel(e){this._model&&this._model.updateSelection(e,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_shouldHandleChangeEvent(e){return e.source!==this}static \u0275fac=function(t){return new(t||n)};static \u0275dir=ee({type:n,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,a){t&1&&b("input",function(r){return a._onInput(r)})("change",function(){return a._onChange()})("blur",function(){return a._onBlur()})("keydown",function(r){return a._onKeydown(r)}),t&2&&(qe("disabled",a.disabled),M("aria-haspopup",a._datepicker?"dialog":null)("aria-owns",a._ariaOwns())("min",a.min?a._dateAdapter.toIso8601(a.min):null)("max",a.max?a._dateAdapter.toIso8601(a.max):null)("data-mat-calendar",a._datepicker?a._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:[0,"matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[Q([An,Sn,{provide:Wa,useExisting:n}]),gt]})}return n})(),xn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275dir=ee({type:n,selectors:[["","matDatepickerToggleIcon",""]]})}return n})(),qt=(()=>{class n{_intl=s(Ie);_changeDetectorRef=s(T);_stateChanges=j.EMPTY;datepicker;tabIndex;ariaLabel;get disabled(){return this._disabled===void 0&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(e){this._disabled=e}_disabled;disableRipple;_customIcon;_button;constructor(){let e=s(new $e("tabindex"),{optional:!0}),t=Number(e);this.tabIndex=t||t===0?t:null}ngOnChanges(e){e.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(e){this.datepicker&&!this.disabled&&(this.datepicker.open(),e.stopPropagation())}_watchStateChanges(){let e=this.datepicker?this.datepicker.stateChanges:We(),t=this.datepicker&&this.datepicker.datepickerInput?this.datepicker.datepickerInput.stateChanges:We(),a=this.datepicker?oe(this.datepicker.openedStream,this.datepicker.closedStream):We();this._stateChanges.unsubscribe(),this._stateChanges=oe(this._intl.changes,e,t,a).subscribe(()=>this._changeDetectorRef.markForCheck())}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=w({type:n,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,a,i){if(t&1&&Qe(i,xn,5),t&2){let r;v(r=D())&&(a._customIcon=r.first)}},viewQuery:function(t,a){if(t&1&&P(un,5),t&2){let i;v(i=D())&&(a._button=i.first)}},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,a){t&1&&b("click",function(r){return a._open(r)}),t&2&&(M("tabindex",null)("data-mat-calendar",a.datepicker?a.datepicker.id:null),A("mat-datepicker-toggle-active",a.datepicker&&a.datepicker.opened)("mat-accent",a.datepicker&&a.datepicker.color==="accent")("mat-warn",a.datepicker&&a.datepicker.color==="warn"))},inputs:{datepicker:[0,"for","datepicker"],tabIndex:"tabIndex",ariaLabel:[0,"aria-label","ariaLabel"],disabled:[2,"disabled","disabled",S],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[Z],ngContentSelectors:gn,decls:4,vars:7,consts:[["button",""],["matIconButton","","type","button",3,"tabIndex","disabled","disableRipple"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false","aria-hidden","true",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,a){t&1&&(fe(_n),l(0,"button",1,0),N(2,fn,2,0,":svg:svg",2),ie(3),c()),t&2&&(h("tabIndex",a.disabled?-1:a.tabIndex)("disabled",a.disabled)("disableRipple",a.disableRipple),M("aria-haspopup",a.datepicker?"dialog":null)("aria-label",a.ariaLabel||a._intl.openCalendarLabel)("aria-expanded",a.datepicker?a.datepicker.opened:null),d(2),Y(a._customIcon?-1:2))},dependencies:[At],styles:[`.mat-datepicker-toggle{pointer-events:auto;color:var(--mat-datepicker-toggle-icon-color, var(--mat-sys-on-surface-variant))}.mat-datepicker-toggle button{color:inherit}.mat-datepicker-toggle-active{color:var(--mat-datepicker-toggle-active-state-icon-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-datepicker-toggle-default-icon{color:CanvasText}}
|
|
13
|
-
`],encapsulation:2,changeDetection:0})}return n})();var bi=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=X({providers:[Ie],imports:[nt,at,ha,fa,gi,qt,_i,ce,Je]})}return n})();var In=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,Vn=/^(\d?\d)[:.](\d?\d)(?:[:.](\d?\d))?\s*(AM|PM)?$/i;function Qt(n,o){let e=Array(n);for(let t=0;t<n;t++)e[t]=o(t);return e}var Tn=(()=>{class n extends I{_matDateLocale=s(Pt,{optional:!0});constructor(){super();let e=s(Pt,{optional:!0});e!==void 0&&(this._matDateLocale=e),super.setLocale(this._matDateLocale)}getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getMonthNames(e){let t=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return Qt(12,a=>this._format(t,new Date(2017,a,1)))}getDateNames(){let e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Qt(31,t=>this._format(e,new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return Qt(7,a=>this._format(t,new Date(2017,0,a+1)))}getYearName(e){let t=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(t,e)}getFirstDayOfWeek(){if(typeof Intl<"u"&&Intl.Locale){let e=new Intl.Locale(this.locale),t=(e.getWeekInfo?.()||e.weekInfo)?.firstDay??0;return t===7?0:t}return 0}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}clone(e){return new Date(e.getTime())}createDate(e,t,a){let i=this._createDateWithOverflow(e,t,a);return i.getMonth()!=t,i}today(){return new Date}parse(e,t){return typeof e=="number"?new Date(e):e?new Date(Date.parse(e)):null}format(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");let a=new Intl.DateTimeFormat(this.locale,Xt(ue({},t),{timeZone:"utc"}));return this._format(a,e)}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let a=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(a)!=((this.getMonth(e)+t)%12+12)%12&&(a=this._createDateWithOverflow(this.getYear(a),this.getMonth(a),0)),a}addCalendarDays(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)}toIso8601(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}deserialize(e){if(typeof e=="string"){if(!e)return null;if(In.test(e)){let t=new Date(e);if(this.isValid(t))return t}}return super.deserialize(e)}isDateInstance(e){return e instanceof Date}isValid(e){return!isNaN(e.getTime())}invalid(){return new Date(NaN)}setTime(e,t,a,i){let r=this.clone(e);return r.setHours(t,a,i,0),r}getHours(e){return e.getHours()}getMinutes(e){return e.getMinutes()}getSeconds(e){return e.getSeconds()}parseTime(e,t){if(typeof e!="string")return e instanceof Date?new Date(e.getTime()):null;let a=e.trim();if(a.length===0)return null;let i=this._parseTimeString(a);if(i===null){let r=a.replace(/[^0-9:(AM|PM)]/gi,"").trim();r.length>0&&(i=this._parseTimeString(r))}return i||this.invalid()}addSeconds(e,t){return new Date(e.getTime()+t*1e3)}_createDateWithOverflow(e,t,a){let i=new Date;return i.setFullYear(e,t,a),i.setHours(0,0,0,0),i}_2digit(e){return("00"+e).slice(-2)}_format(e,t){let a=new Date;return a.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),a.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e.format(a)}_parseTimeString(e){let t=e.toUpperCase().match(Vn);if(t){let a=parseInt(t[1]),i=parseInt(t[2]),r=t[3]==null?void 0:parseInt(t[3]),u=t[4];if(a===12?a=u==="AM"?0:a:u==="PM"&&(a+=12),Ut(a,0,23)&&Ut(i,0,59)&&(r==null||Ut(r,0,59)))return this.setTime(this.today(),a,i,r||0)}return null}static \u0275fac=function(t){return new(t||n)};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();function Ut(n,o,e){return!isNaN(n)&&n>=o&&n<=e}var On={parse:{dateInput:null,timeInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},timeInput:{hour:"numeric",minute:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"},timeOptionLabel:{hour:"numeric",minute:"numeric"}}};function yi(n=On){return[{provide:I,useClass:Tn},{provide:me,useValue:n}]}var Rn=()=>["self","all"];function Fn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Pn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Ln(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Nn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}var vi=class n{hour;minute;formData={context:"all",startTimeHr:"00",startTimeMin:"00",startDate:null,playbackRate:1};maxDate=new Date;dialogRef=s(wa);constructor(){}submit(o=!1){let e={},t="";o||(this.formData.startDate.setHours(parseInt(this.formData.startTimeHr)),this.formData.startDate.setMinutes(parseInt(this.formData.startTimeMin)),t=this.formData.startDate.toISOString(),t=t.slice(0,t.indexOf("."))+"Z",e={subscribe:this.formData.context,startTime:t,playbackRate:this.formData.playbackRate}),this.dialogRef.close({result:!o,query:e,startTime:t})}hrValues(){let o=[];for(let e=0;e<24;e++)o.push(("00"+e).slice(-2));return o}minValues(){let o=[];for(let e=0;e<59;e++)o.push(("00"+e).slice(-2));return o}rateValues(){return[.5,1,2,5,10]}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=w({type:n,selectors:[["ap-playbackdialog"]],features:[Q([yi()])],decls:57,vars:10,consts:[["picker",""],[1,"_ap-playback"],["mat-dialog-title",""],[2,"display","flex"],[3,"ngModelChange","ngModel"],[3,"value"],["floatLabel","always"],["matInput","","required","",3,"ngModelChange","max","matDatepicker","ngModel"],["matSuffix","",3,"for"],[2,"font-size","10pt"],[2,"width","100px"],["matTooltip","Advance stream the selected number of seconds for every second of playback",2,"width","150px"],[2,"text-align","center","width","100%"],["mat-raised-button","",3,"click","disabled"],["mat-raised-button","",3,"click"]],template:function(e,t){if(e&1){let a=B();l(0,"div",1)(1,"div")(2,"h1",2)(3,"mat-icon"),p(4,"history"),c(),p(5,"\xA0 \xA0\xA0History Playback "),c()(),l(6,"mat-dialog-content")(7,"div",3)(8,"div")(9,"div")(10,"mat-form-field")(11,"mat-label"),p(12,"Context"),c(),l(13,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.context,r)||(t.formData.context=r),f(r)}),te(14,Fn,2,2,"mat-option",5,Fe),c()()(),l(16,"div")(17,"mat-form-field",6)(18,"mat-label"),p(19,"Start date"),c(),l(20,"input",7),q("ngModelChange",function(r){return g(a),G(t.formData.startDate,r)||(t.formData.startDate=r),f(r)}),c(),l(21,"mat-hint"),p(22,"MM/DD/YYYY"),c(),k(23,"mat-datepicker-toggle",8)(24,"mat-datepicker",null,0),c()(),l(26,"div",9)(27,"b"),p(28,"Start Time:"),c(),k(29,"br"),l(30,"mat-form-field",10)(31,"mat-label"),p(32,"Hour"),c(),l(33,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.startTimeHr,r)||(t.formData.startTimeHr=r),f(r)}),te(34,Pn,2,2,"mat-option",5,Fe),c()(),l(36,"b"),p(37,": "),c(),l(38,"mat-form-field",10)(39,"mat-label"),p(40,"Minutes"),c(),l(41,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.startTimeMin,r)||(t.formData.startTimeMin=r),f(r)}),te(42,Ln,2,2,"mat-option",5,Fe),c()()(),l(44,"div")(45,"mat-form-field",11)(46,"mat-label"),p(47,"Playback Rate"),c(),l(48,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.playbackRate,r)||(t.formData.playbackRate=r),f(r)}),te(49,Nn,2,2,"mat-option",5,Fe),c()()()()()(),l(51,"mat-dialog-actions")(52,"div",12)(53,"button",13),b("click",function(){return g(a),f(t.submit())}),p(54," START "),c(),l(55,"button",14),b("click",function(){return g(a),f(t.submit(!0))}),p(56,"CANCEL"),c()()()()}if(e&2){let a=Ue(25);d(13),K("ngModel",t.formData.context),d(),ae(ia(9,Rn)),d(6),h("max",t.maxDate)("matDatepicker",a),K("ngModel",t.formData.startDate),d(3),h("for",a),d(10),K("ngModel",t.formData.startTimeHr),d(),ae(t.hrValues()),d(7),K("ngModel",t.formData.startTimeMin),d(),ae(t.minValues()),d(6),K("ngModel",t.formData.playbackRate),d(),ae(t.rateValues()),d(4),h("disabled",!t.formData.startDate)}},dependencies:[Na,Oa,Fa,La,Pa,Sa,ka,Aa,Ma,Va,Ia,nt,Ne,st,za,Ya,Ba,Ha,ei,Ja,we,qa,Ga,bi,fi,ht,qt],styles:["._ap-playback[_ngcontent-%COMP%]{font-family:arial;min-width:300px}"]})};export{Vi as a,Ye as b,$a as
|
|
13
|
+
`],encapsulation:2,changeDetection:0})}return n})();var bi=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=J({type:n});static \u0275inj=X({providers:[Ie],imports:[nt,at,ha,fa,gi,qt,_i,ce,Je]})}return n})();var In=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/,Vn=/^(\d?\d)[:.](\d?\d)(?:[:.](\d?\d))?\s*(AM|PM)?$/i;function Qt(n,o){let e=Array(n);for(let t=0;t<n;t++)e[t]=o(t);return e}var Tn=(()=>{class n extends I{_matDateLocale=s(Pt,{optional:!0});constructor(){super();let e=s(Pt,{optional:!0});e!==void 0&&(this._matDateLocale=e),super.setLocale(this._matDateLocale)}getYear(e){return e.getFullYear()}getMonth(e){return e.getMonth()}getDate(e){return e.getDate()}getDayOfWeek(e){return e.getDay()}getMonthNames(e){let t=new Intl.DateTimeFormat(this.locale,{month:e,timeZone:"utc"});return Qt(12,a=>this._format(t,new Date(2017,a,1)))}getDateNames(){let e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return Qt(31,t=>this._format(e,new Date(2017,0,t+1)))}getDayOfWeekNames(e){let t=new Intl.DateTimeFormat(this.locale,{weekday:e,timeZone:"utc"});return Qt(7,a=>this._format(t,new Date(2017,0,a+1)))}getYearName(e){let t=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._format(t,e)}getFirstDayOfWeek(){if(typeof Intl<"u"&&Intl.Locale){let e=new Intl.Locale(this.locale),t=(e.getWeekInfo?.()||e.weekInfo)?.firstDay??0;return t===7?0:t}return 0}getNumDaysInMonth(e){return this.getDate(this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+1,0))}clone(e){return new Date(e.getTime())}createDate(e,t,a){let i=this._createDateWithOverflow(e,t,a);return i.getMonth()!=t,i}today(){return new Date}parse(e,t){return typeof e=="number"?new Date(e):e?new Date(Date.parse(e)):null}format(e,t){if(!this.isValid(e))throw Error("NativeDateAdapter: Cannot format invalid date.");let a=new Intl.DateTimeFormat(this.locale,Xt(ue({},t),{timeZone:"utc"}));return this._format(a,e)}addCalendarYears(e,t){return this.addCalendarMonths(e,t*12)}addCalendarMonths(e,t){let a=this._createDateWithOverflow(this.getYear(e),this.getMonth(e)+t,this.getDate(e));return this.getMonth(a)!=((this.getMonth(e)+t)%12+12)%12&&(a=this._createDateWithOverflow(this.getYear(a),this.getMonth(a),0)),a}addCalendarDays(e,t){return this._createDateWithOverflow(this.getYear(e),this.getMonth(e),this.getDate(e)+t)}toIso8601(e){return[e.getUTCFullYear(),this._2digit(e.getUTCMonth()+1),this._2digit(e.getUTCDate())].join("-")}deserialize(e){if(typeof e=="string"){if(!e)return null;if(In.test(e)){let t=new Date(e);if(this.isValid(t))return t}}return super.deserialize(e)}isDateInstance(e){return e instanceof Date}isValid(e){return!isNaN(e.getTime())}invalid(){return new Date(NaN)}setTime(e,t,a,i){let r=this.clone(e);return r.setHours(t,a,i,0),r}getHours(e){return e.getHours()}getMinutes(e){return e.getMinutes()}getSeconds(e){return e.getSeconds()}parseTime(e,t){if(typeof e!="string")return e instanceof Date?new Date(e.getTime()):null;let a=e.trim();if(a.length===0)return null;let i=this._parseTimeString(a);if(i===null){let r=a.replace(/[^0-9:(AM|PM)]/gi,"").trim();r.length>0&&(i=this._parseTimeString(r))}return i||this.invalid()}addSeconds(e,t){return new Date(e.getTime()+t*1e3)}_createDateWithOverflow(e,t,a){let i=new Date;return i.setFullYear(e,t,a),i.setHours(0,0,0,0),i}_2digit(e){return("00"+e).slice(-2)}_format(e,t){let a=new Date;return a.setUTCFullYear(t.getFullYear(),t.getMonth(),t.getDate()),a.setUTCHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),e.format(a)}_parseTimeString(e){let t=e.toUpperCase().match(Vn);if(t){let a=parseInt(t[1]),i=parseInt(t[2]),r=t[3]==null?void 0:parseInt(t[3]),u=t[4];if(a===12?a=u==="AM"?0:a:u==="PM"&&(a+=12),Ut(a,0,23)&&Ut(i,0,59)&&(r==null||Ut(r,0,59)))return this.setTime(this.today(),a,i,r||0)}return null}static \u0275fac=function(t){return new(t||n)};static \u0275prov=se({token:n,factory:n.\u0275fac})}return n})();function Ut(n,o,e){return!isNaN(n)&&n>=o&&n<=e}var On={parse:{dateInput:null,timeInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},timeInput:{hour:"numeric",minute:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"},timeOptionLabel:{hour:"numeric",minute:"numeric"}}};function yi(n=On){return[{provide:I,useClass:Tn},{provide:me,useValue:n}]}var Rn=()=>["self","all"];function Fn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Pn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Ln(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}function Nn(n,o){if(n&1&&(l(0,"mat-option",5),p(1),c()),n&2){let e=o.$implicit;h("value",e),d(),E(e)}}var vi=class n{hour;minute;formData={context:"all",startTimeHr:"00",startTimeMin:"00",startDate:null,playbackRate:1};maxDate=new Date;dialogRef=s(wa);constructor(){}submit(o=!1){let e={},t="";o||(this.formData.startDate.setHours(parseInt(this.formData.startTimeHr)),this.formData.startDate.setMinutes(parseInt(this.formData.startTimeMin)),t=this.formData.startDate.toISOString(),t=t.slice(0,t.indexOf("."))+"Z",e={subscribe:this.formData.context,startTime:t,playbackRate:this.formData.playbackRate}),this.dialogRef.close({result:!o,query:e,startTime:t})}hrValues(){let o=[];for(let e=0;e<24;e++)o.push(("00"+e).slice(-2));return o}minValues(){let o=[];for(let e=0;e<59;e++)o.push(("00"+e).slice(-2));return o}rateValues(){return[.5,1,2,5,10]}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=w({type:n,selectors:[["ap-playbackdialog"]],features:[Q([yi()])],decls:57,vars:10,consts:[["picker",""],[1,"_ap-playback"],["mat-dialog-title",""],[2,"display","flex"],[3,"ngModelChange","ngModel"],[3,"value"],["floatLabel","always"],["matInput","","required","",3,"ngModelChange","max","matDatepicker","ngModel"],["matSuffix","",3,"for"],[2,"font-size","10pt"],[2,"width","100px"],["matTooltip","Advance stream the selected number of seconds for every second of playback",2,"width","150px"],[2,"text-align","center","width","100%"],["mat-raised-button","",3,"click","disabled"],["mat-raised-button","",3,"click"]],template:function(e,t){if(e&1){let a=B();l(0,"div",1)(1,"div")(2,"h1",2)(3,"mat-icon"),p(4,"history"),c(),p(5,"\xA0 \xA0\xA0History Playback "),c()(),l(6,"mat-dialog-content")(7,"div",3)(8,"div")(9,"div")(10,"mat-form-field")(11,"mat-label"),p(12,"Context"),c(),l(13,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.context,r)||(t.formData.context=r),f(r)}),te(14,Fn,2,2,"mat-option",5,Fe),c()()(),l(16,"div")(17,"mat-form-field",6)(18,"mat-label"),p(19,"Start date"),c(),l(20,"input",7),q("ngModelChange",function(r){return g(a),G(t.formData.startDate,r)||(t.formData.startDate=r),f(r)}),c(),l(21,"mat-hint"),p(22,"MM/DD/YYYY"),c(),k(23,"mat-datepicker-toggle",8)(24,"mat-datepicker",null,0),c()(),l(26,"div",9)(27,"b"),p(28,"Start Time:"),c(),k(29,"br"),l(30,"mat-form-field",10)(31,"mat-label"),p(32,"Hour"),c(),l(33,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.startTimeHr,r)||(t.formData.startTimeHr=r),f(r)}),te(34,Pn,2,2,"mat-option",5,Fe),c()(),l(36,"b"),p(37,": "),c(),l(38,"mat-form-field",10)(39,"mat-label"),p(40,"Minutes"),c(),l(41,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.startTimeMin,r)||(t.formData.startTimeMin=r),f(r)}),te(42,Ln,2,2,"mat-option",5,Fe),c()()(),l(44,"div")(45,"mat-form-field",11)(46,"mat-label"),p(47,"Playback Rate"),c(),l(48,"mat-select",4),q("ngModelChange",function(r){return g(a),G(t.formData.playbackRate,r)||(t.formData.playbackRate=r),f(r)}),te(49,Nn,2,2,"mat-option",5,Fe),c()()()()()(),l(51,"mat-dialog-actions")(52,"div",12)(53,"button",13),b("click",function(){return g(a),f(t.submit())}),p(54," START "),c(),l(55,"button",14),b("click",function(){return g(a),f(t.submit(!0))}),p(56,"CANCEL"),c()()()()}if(e&2){let a=Ue(25);d(13),K("ngModel",t.formData.context),d(),ae(ia(9,Rn)),d(6),h("max",t.maxDate)("matDatepicker",a),K("ngModel",t.formData.startDate),d(3),h("for",a),d(10),K("ngModel",t.formData.startTimeHr),d(),ae(t.hrValues()),d(7),K("ngModel",t.formData.startTimeMin),d(),ae(t.minValues()),d(6),K("ngModel",t.formData.playbackRate),d(),ae(t.rateValues()),d(4),h("disabled",!t.formData.startDate)}},dependencies:[Na,Oa,Fa,La,Pa,Sa,ka,Aa,Ma,Va,Ia,nt,Ne,st,za,Ya,Ba,Ha,ei,Ja,we,qa,Ga,bi,fi,ht,qt],styles:["._ap-playback[_ngcontent-%COMP%]{font-family:arial;min-width:300px}"]})};export{Vi as a,Ye as b,Qa as c,$a as d,ii as e,we as f,Ja as g,Gr as h,ei as i,fi as j,ht as k,qt as l,bi as m,yi as n,vi as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as de,b as T,c as ue,d as he,e as me}from"./chunk-A7QJNGJ7.js";import{E as le,G as ce,H as pe,c as L,m as N,o as z,p as ee,q as te,r as ie,s as ae,t as ne,u as se,v as oe,y as re}from"./chunk-PVMR7EP7.js";import{i as q,j as J,k as Q}from"./chunk-TQPGRJVE.js";import{d as U}from"./chunk-QI5ICQLG.js";import{Aa as y,Ba as k,Da as v,Ea as C,Ed as I,Fa as b,Ga as f,Gd as B,H as R,Ha as s,Ia as r,Jd as $,L as D,Ld as A,M as u,Md as j,N as h,Qa as g,Sa as x,Ua as d,c as M,cb as w,ce as H,fa as c,hb as p,ib as W,jb as X,ka as _,na as O,ne as Y,rd as F,sd as G,se as Z,vd as V,xd as K}from"./chunk-QPQHN5VS.js";import{f as E}from"./chunk-EQVTEUXC.js";var P=class{gpx;constructor(){this.init()}init(){this.gpx=new de,this.gpx.metadata.name="Signal K Resource Export",this.gpx.metadata.desc="Freeboard export of Signal K resources"}toXML(){return this.gpx.toXML()}setRoutes(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.rte.push(this.packageRoute(e,i[e]))});else for(let e in i)this.gpx.rte.push(this.packageRoute(e,i[e]))}packageRoute(i,t){let e=new ue;e.extensions=e.extensions??{},e.extensions.signalk={},e.extensions.signalk.uuid=i,t.distance&&(e.extensions.signalk.distance=t.distance),e.name=t.name||null,e.desc=t.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new T;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,e.rtept.push(n),this.gpx.updateBounds(n)}return e}setWaypoints(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.wpt.push(this.packageWaypoint(e,i[e]))});else for(let e in i)this.gpx.wpt.push(this.packageWaypoint(e,i[e]))}packageWaypoint(i,t){let e=new T;return e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.name||"",e.desc=t.description||"",e.cmt=t.feature.properties.cmt||null,e.geoidHeight=t.feature.properties.geoidHeight||null,e.src=t.feature.properties.src||null,e.sym=t.feature.properties.sym||null,e.type=t.feature.properties.type||null,e.fix=t.feature.properties.fix||null,e.sat=t.feature.properties.sat||null,e.hdop=t.feature.properties.hdop||null,e.vdop=t.feature.properties.vdop||null,e.pdop=t.feature.properties.pdop||null,e.ageOfGpsData=t.feature.properties.ageOfGpsData||null,e.dgpsid=t.feature.properties.dgpsid||null,e.lat=t.feature.geometry.coordinates[1],e.lon=t.feature.geometry.coordinates[0],e.ele=t.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(e),e}setTracks(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.trk.push(this.packageTrack(e,i[e]))});else for(let e in i)this.gpx.trk.push(this.packageTrack(e,i[e]))}packageTrack(i,t){let e=new he;e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.feature.properties.name||null,e.desc=t.feature.properties.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new me;for(let o of a){let m=new T;m.lon=o[0],m.lat=o[1],m.ele=o[2]||null,n.trkpt.push(m),this.gpx.updateBounds(m)}e.trkseg.push(n)}return e}};var S=class l{resultSource;result$;sk2gpx;hasFSA;signalk=D(re);constructor(){this.resultSource=new M,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let t={routes:[],waypoints:[],tracks:[]},e=1;return t.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),e=1,t.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${e}`,e++,n}),t.tracks=i.tracks,t}saveToFile(i,t){this.sk2gpx=new P;let e={},a={},n={};for(let o=0;o<t.rte.selected.length;o++)t.rte.selected[o]&&(e[i.routes[o].feature.id]=i.routes[o]);this.sk2gpx.setRoutes(e);for(let o=0;o<t.wpt.selected.length;o++)t.wpt.selected[o]&&(a[i.waypoints[o].feature.id]=i.waypoints[o]);this.sk2gpx.setWaypoints(a);for(let o=0;o<t.trk.selected.length;o++)if(t.trk.selected[o]){let m=this.signalk.uuid;n[m]=new ce,n[m].feature.id=m,n[m].feature.properties.name=`Vessel trail: ${Date().toString()}`,n[m].feature.geometry.coordinates.push(i.tracks[o])}this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download="fb_export.gpx",t.click(),URL.revokeObjectURL(t.href),t.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(t=>{let e=new Blob([this.sk2gpx.toXML()]);t.write(e).then(()=>{t.close(),this.resultSource.next(0)})}).catch(t=>{console.warn(t),this.resultSource.next(1)})}).catch(()=>{this.resultSource.next(-1)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=R({token:l,factory:l.\u0275fac,providedIn:"root"})};function _e(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19),p(2),r(),s(3,"div",20)(4,"mat-checkbox",21,0),x("change",function(){let a=u(t).$index,n=w(5),o=d(2);return h(o.checkWpt(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);c(2),W(t.name),c(2),f("checked",a.selWaypoints[e])}}function ye(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",12),x("opened",function(){u(t);let a=d();return h(a.display.expand.waypoints=!0)})("closed",function(){u(t);let a=d();return h(a.display.expand.waypoints=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",14),p(5,"place"),r(),p(6," \xA0"),s(7,"b"),p(8,"Waypoints:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",16),x("change",function(a){u(t);let n=d();return h(n.checkWpt(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,_e,6,2,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",t.display.expand.waypoints),c(10),f("indeterminate",t.display.someWptChecked)("checked",t.display.allWaypointsChecked)("disabled",t.resData.waypoints.length===0),c(2),b(t.resData.waypoints)}}function ke(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19)(2,"mat-icon",22),p(3,"directions"),r(),p(4),r(),s(5,"div",20)(6,"mat-checkbox",24,1),x("change",function(){let a=u(t).$index,n=w(7),o=d(2);return h(o.checkRte(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);c(4),X(" ",t.name," "),c(2),f("checked",a.selRoutes[e])}}function ve(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",12),x("opened",function(){u(t);let a=d();return h(a.display.expand.routes=!0)})("closed",function(){u(t);let a=d();return h(a.display.expand.routes=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",22),p(5,"directions"),r(),p(6," \xA0"),s(7,"b"),p(8,"Routes:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",23),x("change",function(a){u(t);let n=d();return h(n.checkRte(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,ke,8,2,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",t.display.expand.routes),c(10),f("indeterminate",t.display.someRteChecked)("checked",t.display.allRoutesChecked)("disabled",t.resData.routes.length==0),c(2),b(t.resData.routes)}}function Ce(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19)(2,"mat-icon",26),p(3,"directions_boat"),r(),p(4," Vessel Trail "),r(),s(5,"div",20)(6,"mat-checkbox",28,2),x("change",function(){let a=u(t).$index,n=w(7),o=d(2);return h(o.checkTrk(n.checked,a))}),r()()()}if(l&2){let t=i.$index,e=d(2);c(6),f("checked",e.selTracks[t])}}function be(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",25)(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",26),p(5,"show_chart"),r(),p(6," \xA0"),s(7,"b"),p(8,"Tracks:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",27),x("change",function(a){u(t);let n=d();return h(n.checkTrk(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,Ce,8,1,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",!1),c(10),f("indeterminate",!1)("checked",t.display.allTracksChecked)("disabled",t.resData.tracks.length==0),c(2),b(t.resData.tracks)}}var fe=class l{constructor(i,t,e,a,n){this.app=i;this.skres=t;this.facade=e;this.dialogRef=a;this.data=n}resData={routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,saveRoutesOK:!1,saveWaypointsOK:!1,saveTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};unsubscribe=[];ngOnInit(){this.loadResources(),this.unsubscribe.push(this.facade.result$.subscribe(i=>{this.dialogRef.close(i)}))}ngOnDestroy(){this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return E(this,null,function*(){this.data.routes.sort((i,t)=>i[1].name.localeCompare(t[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((t,e)=>t[1].name.localeCompare(e[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch{this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}save(){this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseResourceData(){this.display.allRoutesChecked=!1,this.display.saveRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.saveWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.saveTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.resData=this.facade.prepData(this.data),this.resData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.saveRoutesOK=!0),this.resData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selTracks.push(!1)}checkRte(i,t=-1){let e=0;if(t!==-1){this.selRoutes[t]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&e++;this.display.saveRoutesOK=e!==0,this.display.selCount.routes=e,this.display.allRoutesChecked=e===this.selRoutes.length}else{for(let a=0;a<this.selRoutes.length;a++)this.selRoutes[a]=i,this.display.saveRoutesOK=i,this.display.allRoutesChecked=i;this.display.selCount.routes=i?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||e===0)}checkWpt(i,t=-1){let e=0;if(t!==-1){this.selWaypoints[t]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&e++;this.display.saveWaypointsOK=e!==0,this.display.selCount.waypoints=e,this.display.allWaypointsChecked=e===this.selWaypoints.length}else{for(let a=0;a<this.selWaypoints.length;a++)this.selWaypoints[a]=i,this.display.saveWaypointsOK=i,this.display.allWaypointsChecked=i;this.display.selCount.waypoints=i?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||e===0)}checkTrk(i,t=-1){let e=0;if(t!==-1){this.selTracks[t]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&e++;this.display.saveTracksOK=e!==0,this.display.selCount.tracks=e,this.display.allTracksChecked=e===this.selTracks.length}else{for(let a=0;a<this.selTracks.length;a++)this.selTracks[a]=i,this.display.saveTracksOK=i,this.display.allTracksChecked=i;this.display.selCount.tracks=i?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||e===0)}static \u0275fac=function(t){return new(t||l)(_(le),_(pe),_(S),_(F),_(G))};static \u0275cmp=O({type:l,selectors:[["gpxsave-dialog"]],decls:18,vars:4,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxsave-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Save selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content","",2,"padding","2px"],[1,"card-group"],[3,"opened","closed","expanded"],[1,"panel-header"],[1,"icon-waypoint"],[1,"panel-description"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[3,"expanded"],[1,"icon-track"],["matTooltip","Vessel Trail to Track","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(t,e){t&1&&(s(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),x("click",function(){return e.save()}),s(5,"mat-icon"),p(6,"save"),r(),p(7,"\xA0Save\xA0 "),r()(),s(8,"div",7),p(9,"Export to GPX"),r(),s(10,"div",8)(11,"button",9),x("click",function(){return e.dialogRef.close(-1)}),s(12,"mat-icon"),p(13,"close"),r()()()()(),s(14,"div",10),y(15,ye,15,4,"div",11),y(16,ve,15,4,"div",11),y(17,be,15,4,"div",11),r()()),t&2&&(c(4),f("disabled",!e.display.saveRoutesOK&&!e.display.saveWaypointsOK&&!e.display.saveTracksOK),c(11),k(e.resData.waypoints.length!==0?15:-1),c(),k(e.resData.routes.length!==0?16:-1),c(),k(!e.app.data.serverTrail&&e.resData.tracks.length!==0?17:-1))},dependencies:[oe,se,z,K,V,j,A,$,B,I,q,Y,Z,L,ne,ee,te,ae,ie,Q,J,N,U,H],styles:[".gpxsave-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.dialog-content[_ngcontent-%COMP%]{position:relative;min-height:300px;max-height:400px;width:100%;min-width:240px;overflow-y:auto}.dialog-icon[_ngcontent-%COMP%]{display:none}.card-group[_ngcontent-%COMP%]{padding:5px 5%}.card-group[_ngcontent-%COMP%] .panel-header[_ngcontent-%COMP%]{padding:0 5px}.card-group[_ngcontent-%COMP%] .panel-description[_ngcontent-%COMP%]{text-align:right;width:100%;padding-right:10px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}@media only screen and (min-width:475px){button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}.dialog-content[_ngcontent-%COMP%]{min-width:400px}.dialog-icon[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{fe as GPXExportDialog};
|
|
1
|
+
import{a as de,b as T,c as ue,d as he,e as me}from"./chunk-A7QJNGJ7.js";import{E as le,G as ce,H as pe,c as L,m as N,o as z,p as ee,q as te,r as ie,s as ae,t as ne,u as se,v as oe,y as re}from"./chunk-XWAJLSAM.js";import{i as q,j as J,k as Q}from"./chunk-TQPGRJVE.js";import{e as U}from"./chunk-HQSHA6SH.js";import{Aa as y,Ba as k,Da as v,Ea as C,Ed as I,Fa as b,Ga as f,Gd as B,H as R,Ha as s,Ia as r,Jd as $,L as D,Ld as A,M as u,Md as j,N as h,Qa as g,Sa as x,Ua as d,c as M,cb as w,ce as H,fa as c,hb as p,ib as W,jb as X,ka as _,na as O,ne as Y,rd as F,sd as G,se as Z,vd as V,xd as K}from"./chunk-QPQHN5VS.js";import{f as E}from"./chunk-EQVTEUXC.js";var P=class{gpx;constructor(){this.init()}init(){this.gpx=new de,this.gpx.metadata.name="Signal K Resource Export",this.gpx.metadata.desc="Freeboard export of Signal K resources"}toXML(){return this.gpx.toXML()}setRoutes(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.rte.push(this.packageRoute(e,i[e]))});else for(let e in i)this.gpx.rte.push(this.packageRoute(e,i[e]))}packageRoute(i,t){let e=new ue;e.extensions=e.extensions??{},e.extensions.signalk={},e.extensions.signalk.uuid=i,t.distance&&(e.extensions.signalk.distance=t.distance),e.name=t.name||null,e.desc=t.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new T;n.lon=a[0],n.lat=a[1],n.ele=a[2]||null,e.rtept.push(n),this.gpx.updateBounds(n)}return e}setWaypoints(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.wpt.push(this.packageWaypoint(e,i[e]))});else for(let e in i)this.gpx.wpt.push(this.packageWaypoint(e,i[e]))}packageWaypoint(i,t){let e=new T;return e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.name||"",e.desc=t.description||"",e.cmt=t.feature.properties.cmt||null,e.geoidHeight=t.feature.properties.geoidHeight||null,e.src=t.feature.properties.src||null,e.sym=t.feature.properties.sym||null,e.type=t.feature.properties.type||null,e.fix=t.feature.properties.fix||null,e.sat=t.feature.properties.sat||null,e.hdop=t.feature.properties.hdop||null,e.vdop=t.feature.properties.vdop||null,e.pdop=t.feature.properties.pdop||null,e.ageOfGpsData=t.feature.properties.ageOfGpsData||null,e.dgpsid=t.feature.properties.dgpsid||null,e.lat=t.feature.geometry.coordinates[1],e.lon=t.feature.geometry.coordinates[0],e.ele=t.feature.geometry.coordinates[2]||null,this.gpx.updateBounds(e),e}setTracks(i,t){if(t)t.forEach(e=>{i[e]&&this.gpx.trk.push(this.packageTrack(e,i[e]))});else for(let e in i)this.gpx.trk.push(this.packageTrack(e,i[e]))}packageTrack(i,t){let e=new he;e.extensions=e.extensions||{},e.extensions.signalk={},e.extensions.signalk.uuid=i,e.name=t.feature.properties.name||null,e.desc=t.feature.properties.description||null,e.cmt=t.feature.properties.cmt||null,e.src=t.feature.properties.src||null,e.number=t.feature.properties.number||null,e.type=t.feature.properties.type||null;for(let a of t.feature.geometry.coordinates){let n=new me;for(let o of a){let m=new T;m.lon=o[0],m.lat=o[1],m.ele=o[2]||null,n.trkpt.push(m),this.gpx.updateBounds(m)}e.trkseg.push(n)}return e}};var S=class l{resultSource;result$;sk2gpx;hasFSA;signalk=D(re);constructor(){this.resultSource=new M,this.result$=this.resultSource.asObservable(),this.hasFSA="showOpenFilePicker"in window}clear(){this.sk2gpx=null}prepData(i){let t={routes:[],waypoints:[],tracks:[]},e=1;return t.routes=i.routes.map(a=>{let n=a[1];return n.feature.id=a[0],n}),e=1,t.waypoints=i.waypoints.map(a=>{let n=a[1];return n.feature.id=a[0],n.name=n.name??`Wpt: ${e}`,e++,n}),t.tracks=i.tracks,t}saveToFile(i,t){this.sk2gpx=new P;let e={},a={},n={};for(let o=0;o<t.rte.selected.length;o++)t.rte.selected[o]&&(e[i.routes[o].feature.id]=i.routes[o]);this.sk2gpx.setRoutes(e);for(let o=0;o<t.wpt.selected.length;o++)t.wpt.selected[o]&&(a[i.waypoints[o].feature.id]=i.waypoints[o]);this.sk2gpx.setWaypoints(a);for(let o=0;o<t.trk.selected.length;o++)if(t.trk.selected[o]){let m=this.signalk.uuid;n[m]=new ce,n[m].feature.id=m,n[m].feature.properties.name=`Vessel trail: ${Date().toString()}`,n[m].feature.geometry.coordinates.push(i.tracks[o])}this.sk2gpx.setTracks(n),this.hasFSA?this.fsaSaveFile():this.legacySaveToFile()}legacySaveToFile(){let i=new Blob([this.sk2gpx.toXML()],{type:"text/xml"}),t=document.createElement("a");t.href=URL.createObjectURL(i),t.download="fb_export.gpx",t.click(),URL.revokeObjectURL(t.href),t.remove(),this.resultSource.next(-1)}fsaSaveFile(){window.showSaveFilePicker({types:[{description:"GPX file",accept:{"text/xml":[".gpx"]}}]}).then(i=>{i.createWritable().then(t=>{let e=new Blob([this.sk2gpx.toXML()]);t.write(e).then(()=>{t.close(),this.resultSource.next(0)})}).catch(t=>{console.warn(t),this.resultSource.next(1)})}).catch(()=>{this.resultSource.next(-1)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=R({token:l,factory:l.\u0275fac,providedIn:"root"})};function _e(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19),p(2),r(),s(3,"div",20)(4,"mat-checkbox",21,0),x("change",function(){let a=u(t).$index,n=w(5),o=d(2);return h(o.checkWpt(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);c(2),W(t.name),c(2),f("checked",a.selWaypoints[e])}}function ye(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",12),x("opened",function(){u(t);let a=d();return h(a.display.expand.waypoints=!0)})("closed",function(){u(t);let a=d();return h(a.display.expand.waypoints=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",14),p(5,"place"),r(),p(6," \xA0"),s(7,"b"),p(8,"Waypoints:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",16),x("change",function(a){u(t);let n=d();return h(n.checkWpt(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,_e,6,2,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",t.display.expand.waypoints),c(10),f("indeterminate",t.display.someWptChecked)("checked",t.display.allWaypointsChecked)("disabled",t.resData.waypoints.length===0),c(2),b(t.resData.waypoints)}}function ke(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19)(2,"mat-icon",22),p(3,"directions"),r(),p(4),r(),s(5,"div",20)(6,"mat-checkbox",24,1),x("change",function(){let a=u(t).$index,n=w(7),o=d(2);return h(o.checkRte(n.checked,a))}),r()()()}if(l&2){let t=i.$implicit,e=i.$index,a=d(2);c(4),X(" ",t.name," "),c(2),f("checked",a.selRoutes[e])}}function ve(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",12),x("opened",function(){u(t);let a=d();return h(a.display.expand.routes=!0)})("closed",function(){u(t);let a=d();return h(a.display.expand.routes=!1)}),s(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",22),p(5,"directions"),r(),p(6," \xA0"),s(7,"b"),p(8,"Routes:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",23),x("change",function(a){u(t);let n=d();return h(n.checkRte(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,ke,8,2,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",t.display.expand.routes),c(10),f("indeterminate",t.display.someRteChecked)("checked",t.display.allRoutesChecked)("disabled",t.resData.routes.length==0),c(2),b(t.resData.routes)}}function Ce(l,i){if(l&1){let t=g();s(0,"div",18)(1,"div",19)(2,"mat-icon",26),p(3,"directions_boat"),r(),p(4," Vessel Trail "),r(),s(5,"div",20)(6,"mat-checkbox",28,2),x("change",function(){let a=u(t).$index,n=w(7),o=d(2);return h(o.checkTrk(n.checked,a))}),r()()()}if(l&2){let t=i.$index,e=d(2);c(6),f("checked",e.selTracks[t])}}function be(l,i){if(l&1){let t=g();s(0,"div",11)(1,"mat-expansion-panel",25)(2,"mat-expansion-panel-header",13)(3,"mat-panel-title")(4,"mat-icon",26),p(5,"show_chart"),r(),p(6," \xA0"),s(7,"b"),p(8,"Tracks:"),r()(),s(9,"mat-panel-description")(10,"div",15)(11,"mat-checkbox",27),x("change",function(a){u(t);let n=d();return h(n.checkTrk(a.checked,-1))})("click",function(a){return u(t),h(a.cancelBubble=!0)}),r()()()(),s(12,"div",17),C(13,Ce,8,1,"div",18,v),r()()()}if(l&2){let t=d();c(),f("expanded",!1),c(10),f("indeterminate",!1)("checked",t.display.allTracksChecked)("disabled",t.resData.tracks.length==0),c(2),b(t.resData.tracks)}}var fe=class l{constructor(i,t,e,a,n){this.app=i;this.skres=t;this.facade=e;this.dialogRef=a;this.data=n}resData={routes:[],waypoints:[],tracks:[]};selRoutes=[];selectedRoute=null;selWaypoints=[];selTracks=[];display={notValid:!1,allRoutesChecked:!1,allWaypointsChecked:!1,allTracksChecked:!1,someWptChecked:!1,someRteChecked:!1,someTrkChecked:!1,saveRoutesOK:!1,saveWaypointsOK:!1,saveTracksOK:!1,routeViewer:!1,selCount:{routes:0,waypoints:0,tracks:0},expand:{routes:!1,waypoints:!1,tracks:!1}};unsubscribe=[];ngOnInit(){this.loadResources(),this.unsubscribe.push(this.facade.result$.subscribe(i=>{this.dialogRef.close(i)}))}ngOnDestroy(){this.unsubscribe.forEach(i=>i.unsubscribe()),this.facade.clear()}loadResources(){return E(this,null,function*(){this.data.routes.sort((i,t)=>i[1].name.localeCompare(t[1].name));try{this.app.sIsFetching.set(!0);let i=yield this.skres.listFromServer("waypoints");i.sort((t,e)=>t[1].name.localeCompare(e[1].name)),this.data.waypoints=i,this.app.sIsFetching.set(!1)}catch{this.app.sIsFetching.set(!1),this.resData.waypoints=[]}this.parseResourceData()})}save(){this.facade.saveToFile(this.resData,{rte:{selected:this.selRoutes},wpt:{selected:this.selWaypoints},trk:{selected:this.selTracks}})}parseResourceData(){this.display.allRoutesChecked=!1,this.display.saveRoutesOK=!1,this.selRoutes=[],this.display.allWaypointsChecked=!1,this.display.saveWaypointsOK=!1,this.selWaypoints=[],this.display.allTracksChecked=!1,this.display.saveTracksOK=!1,this.selTracks=[],this.display.selCount={routes:0,waypoints:0,tracks:0},this.display.expand={routes:!1,waypoints:!1,tracks:!1},this.display.notValid=!1,this.resData=this.facade.prepData(this.data),this.resData.routes.forEach(()=>{this.selRoutes.push(!1)}),this.selRoutes.length===1&&(this.selRoutes[0]=!0,this.display.allRoutesChecked=!0,this.display.expand.routes=!0,this.display.saveRoutesOK=!0),this.resData.waypoints.forEach(()=>{this.selWaypoints.push(!1)}),this.selTracks.push(!1)}checkRte(i,t=-1){let e=0;if(t!==-1){this.selRoutes[t]=i,this.display.saveRoutesOK=i;for(let a of this.selRoutes)a&&e++;this.display.saveRoutesOK=e!==0,this.display.selCount.routes=e,this.display.allRoutesChecked=e===this.selRoutes.length}else{for(let a=0;a<this.selRoutes.length;a++)this.selRoutes[a]=i,this.display.saveRoutesOK=i,this.display.allRoutesChecked=i;this.display.selCount.routes=i?this.selRoutes.length:0}this.display.someRteChecked=!(this.display.allRoutesChecked||e===0)}checkWpt(i,t=-1){let e=0;if(t!==-1){this.selWaypoints[t]=i,this.display.saveWaypointsOK=i;for(let a of this.selWaypoints)a&&e++;this.display.saveWaypointsOK=e!==0,this.display.selCount.waypoints=e,this.display.allWaypointsChecked=e===this.selWaypoints.length}else{for(let a=0;a<this.selWaypoints.length;a++)this.selWaypoints[a]=i,this.display.saveWaypointsOK=i,this.display.allWaypointsChecked=i;this.display.selCount.waypoints=i?this.selWaypoints.length:0}this.display.someWptChecked=!(this.display.allWaypointsChecked||e===0)}checkTrk(i,t=-1){let e=0;if(t!==-1){this.selTracks[t]=i,this.display.saveTracksOK=i;for(let a of this.selTracks)a&&e++;this.display.saveTracksOK=e!==0,this.display.selCount.tracks=e,this.display.allTracksChecked=e===this.selTracks.length}else{for(let a=0;a<this.selTracks.length;a++)this.selTracks[a]=i,this.display.saveTracksOK=i,this.display.allTracksChecked=i;this.display.selCount.tracks=i?this.selTracks.length:0}this.display.someTrkChecked=!(this.display.allTracksChecked||e===0)}static \u0275fac=function(t){return new(t||l)(_(le),_(pe),_(S),_(F),_(G))};static \u0275cmp=O({type:l,selectors:[["gpxsave-dialog"]],decls:18,vars:4,consts:[["wval",""],["rval",""],["tval",""],[1,"gpxsave-dialog"],[2,"background-color","transparent"],[2,"display","flex","width","100%"],["mat-raised-button","","matTooltip","Save selected resources","matTooltipPosition","right",2,"width","85px",3,"click","disabled"],[2,"flex","1 1 auto","text-align","center"],[2,"text-align","right"],["mat-icon-button","",3,"click"],["mat-dialog-content","",2,"padding","2px"],[1,"card-group"],[3,"opened","closed","expanded"],[1,"panel-header"],[1,"icon-waypoint"],[1,"panel-description"],["matTooltip","Select all Waypoints","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],[1,"list-container-scrollable"],[1,"item-row"],[1,"name"],[1,"check"],["matTooltip","Select Waypoint","matTooltipPosition","below",3,"change","checked"],[1,"icon-route"],["matTooltip","Select all Routes","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Route","matTooltipPosition","below",3,"change","checked"],[3,"expanded"],[1,"icon-track"],["matTooltip","Vessel Trail to Track","matTooltipPosition","before",3,"change","click","indeterminate","checked","disabled"],["matTooltip","Select this Track","matTooltipPosition","below",3,"change","checked"]],template:function(t,e){t&1&&(s(0,"div",3)(1,"mat-toolbar",4)(2,"div",5)(3,"div")(4,"button",6),x("click",function(){return e.save()}),s(5,"mat-icon"),p(6,"save"),r(),p(7,"\xA0Save\xA0 "),r()(),s(8,"div",7),p(9,"Export to GPX"),r(),s(10,"div",8)(11,"button",9),x("click",function(){return e.dialogRef.close(-1)}),s(12,"mat-icon"),p(13,"close"),r()()()()(),s(14,"div",10),y(15,ye,15,4,"div",11),y(16,ve,15,4,"div",11),y(17,be,15,4,"div",11),r()()),t&2&&(c(4),f("disabled",!e.display.saveRoutesOK&&!e.display.saveWaypointsOK&&!e.display.saveTracksOK),c(11),k(e.resData.waypoints.length!==0?15:-1),c(),k(e.resData.routes.length!==0?16:-1),c(),k(!e.app.data.serverTrail&&e.resData.tracks.length!==0?17:-1))},dependencies:[oe,se,z,K,V,j,A,$,B,I,q,Y,Z,L,ne,ee,te,ae,ie,Q,J,N,U,H],styles:[".gpxsave-dialog[_ngcontent-%COMP%]{font-family:roboto;position:relative}.dialog-content[_ngcontent-%COMP%]{position:relative;min-height:300px;max-height:400px;width:100%;min-width:240px;overflow-y:auto}.dialog-icon[_ngcontent-%COMP%]{display:none}.card-group[_ngcontent-%COMP%]{padding:5px 5%}.card-group[_ngcontent-%COMP%] .panel-header[_ngcontent-%COMP%]{padding:0 5px}.card-group[_ngcontent-%COMP%] .panel-description[_ngcontent-%COMP%]{text-align:right;width:100%;padding-right:10px}.card-group-title[_ngcontent-%COMP%]{font-weight:700;font-size:10pt;font-family:Arial,Helvetica,sans-serif;padding:10px 0}button[_ngcontent-%COMP%]{min-width:unset;padding:unset}.item-row[_ngcontent-%COMP%]{display:flex;width:100%;padding:2px 0}.item-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-overflow:ellipsis;line-height:2.5em}.item-row[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{text-align:right;padding-right:15px}@media only screen and (min-width:475px){button[_ngcontent-%COMP%]{min-width:inherit;padding:inherit}.dialog-content[_ngcontent-%COMP%]{min-width:400px}.dialog-icon[_ngcontent-%COMP%]{display:inline}}@media only screen and (min-width:800px){.card-group[_ngcontent-%COMP%]{padding:5px 5%}}"]})};export{fe as GPXExportDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as a}from"./chunk-HQSHA6SH.js";import"./chunk-QPQHN5VS.js";import"./chunk-EQVTEUXC.js";export{a as PlaybackDialog};
|