1(function(){try{var l=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},d=new l.Error().stack;d&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[d]="8e64649b-8720-4a40-9f1d-2811fb102cbe",l._sentryDebugIdIdentifier="sentry-dbid-8e64649b-8720-4a40-9f1d-2811fb102cbe")}catch(r){}})(),(self.webpackChunkmysterious_monoceros=self.webpackChunkmysterious_monoceros||[]).push([[7746],{10789:(l,d,r)=>{r.d(d,{A:()=>g});var p=function(){var h=this,w=h._self._c;return w(h.href?"a":"span",{tag:"component",staticClass:"shadow-button",class:[h.classes,{"shadow-button--dark":h.dark}],attrs:{href:h.href},on:{click:function(W){return h.$emit("click")}}},[h._t("default"),h._v(" "),h.showIcon?w("div",{staticClass:"icon",style:`background-image: url('${r(7274)(`./arrow-down${h.dark?"-white":""}.svg`)}')`}):h._e()],2)},x=[];p._withStripped=!0;var v={name:"ShadowButton",props:{href:{type:String,default:null},state:{type:[Array,String],default:()=>[]},showIcon:{type:Boolean,default:!1},dark:{type:Boolean,default:!1}},computed:{classes(){return typeof this.state=="string"?["shadow-button--"+this.state]:this.state.length?this.state.map(n=>"shadow-button--"+n):null}}},f=v,y=r(14486),k=(0,y.A)(f,p,x,!1,null,"aa3bbae8",null),g=k.exports},11072:(l,d,r)=>{l.exports=r.p+"assets/temp-white-a5fc3c44827dc0767965.svg"},14030:(l,d,r)=>{r.d(d,{A:()=>k});var p=function(){var n=this,h=n._self._c;return h("img",{staticClass:"loader",attrs:{src:r(16751),alt:""}})},x=[];p._withStripped=!0;var v=r(14486),f={},y=(0,v.A)(f,p,x,!1,null,"1c0335aa",null),k=y.exports},16751:(l,d,r)=>{l.exports=r.p+"assets/loader-70be172057568a7f47a5.svg"},28630:(l,d,r)=>{r.d(d,{A:()=>T});var p=function(){var e=this,t=e._self._c;return t("section",[e.isError?t("Error",{attrs:{language:e.language,country:e.country}}):[e.currentWeatherData?t("div",{staticClass:"weather-header-small",class:{"weather-header--dark":e.dark}},[t("Autocomplete",{staticClass:"flex--equal-width",attrs:{language:e.language,country:e.country,placeholder:e.translate("Otsi ilma"),dark:e.dark},on:{locationChange:e.extendedForecastRedirect}}),e._v(" "),t("div",{ref:"summary",attrs:{tabindex:"-1"}},[t("ShadowButton",{staticClass:"weather-header__summary shadow-button--rect",class:"weather-header__summary--"+e.selectedWeatherType,attrs:{dark:e.dark}},[t("div",{staticClass:"weather-header__current"},[t("div",{staticClass:"weather-header__place-name"},[e._v(e._s(e.forecast.name))]),e._v(" "),t("div",{staticClass:"weather-header__current-time"},[e._v(` 2 `+e._s(e.parseZone(e.currentWeatherData.dateTime).format("dddd,"))+` 3 `),t("span",{staticStyle:{color:"#b7b7b7"}},[e._v(e._s(e.parseZone(e.currentWeatherData.dateTime).format("HH:mm")))])]),e._v(" "),t("div",{staticClass:"flex flex--align-items-center flex--justify-content-center"},[t("div",[t("div",{staticClass:"flex flex--align-items-center flex--justify-content-center weather-header__icon-cnt"},[t("img",{attrs:{src:e.weatherIcon(e.currentWeatherData.icon,e.dark,!0),width:"71",height:Math.round(71/e.weatherIconRatio(e.currentWeatherData.icon)),alt:e.currentWeatherData.summary}}),e._v(" "),e.selectedWeatherType==="hourly"?t("div",{staticClass:"weather-header__current-temp"},[e._v(` 4 `+e._s(Math.round(e.currentWeatherData.temperature))+`\xB0 5 `)]):e.selectedWeatherType==="daily"?t("div",{staticClass:"weather-header__current-temp"},[e._v(` 6 `+e._s(Math.round(e.currentWeatherData.temperatureLow))+` 7 .. 8 `+e._s(Math.round(e.currentWeatherData.temperatureHigh))+`\xB0 9 `)]):e._e()]),e._v(" "),e.selectedWeatherType==="hourly"?t("div",{staticClass:"weather-header__apparent-temp"},[e._v(` 10 `+e._s(e.translate("Tajutav"))+" "+e._s(e._f("round")(e.currentWeatherData.apparentTemperature))+` \xB0C 11 `)]):e.selectedWeatherType==="daily"?t("div",{staticClass:"weather-header__apparent-temp"},[e._v(` 12 `+e._s(e.translate("Tajutav"))+" "+e._s(e._f("round")(e.currentWeatherData.apparentTemperatureLow))+` .. 13 `+e._s(e._f("round")(e.currentWeatherData.apparentTemperatureHigh))+` \xB0C
14 `)]):e._e()]),e._v(" "),t("div",{staticClass:"weather-header__sun"},[t("div",[t("img",{attrs:{src:r(92039)(`./${e.dark?"white":"black"}/clear-day.svg`),alt:e.translate("P\xE4ike t\xF5useb"),width:"16",height:Math.round(16/e.weatherIconRatio("clear-day"))}}),e._v(" "+e._s(e.formatTime(e.sunData.sunrise))+` 15 `)]),e._v(" "),t("div",[t("img",{attrs:{src:r(69138)(`./${e.dark?"white":"black"}/clear.svg`),alt:e.translate("P\xE4ike loojub"),width:"16",height:Math.round(16/e.weatherIconRatio("clear"))}}),e._v(" "+e._s(e.formatTime(e.sunData.sunset))+` 16 `)])])])]),e._v(" "),t("div",{staticClass:"flex--equal-width weather-header__forecast"},e._l(e.currentDataFields,function(a){return t("div",{staticClass:"flex flex--align-items-center flex--justify-content-space-between weather-header__forecast-field",attrs:{"aria-label":`${a.title} ${a.property==="-"?e.translate("unknown"):a.property}`,role:"group",tabindex:"0"}},[t("span",{staticClass:"weather-header__forecast-field-title",attrs:{"aria-hidden":"true"}},[e._v(e._s(a.title))]),e._v(" "),t("span",{staticClass:"weather-header__forecast-field-value",attrs:{"aria-hidden":"true"}},[a.id==="wind"?t("img",{staticClass:"weather__wind-dir",style:`transform: rotate(${e.currentWeatherData.windBearing}deg)`,attrs:{src:r(32337)(`./arrow${e.dark?"":"-black"}.svg`),width:"7",alt:""}}):e._e(),e._v(` 17 `+e._s(a.property)+` 18 `)])])}),0)])],1),e._v(" "),t("ul",{staticClass:"flex flex--align-items-stretch weather-header__days-cnt"},e._l(e.hourlyList,function(a,m){return t("li",{key:m,staticClass:"flex flex--align-items-stretch"},[t("ShadowButton",{staticClass:"flex--align-items-stretch shadow-button--rect weather-header__day-cnt",class:{"shadow-button--active":e.selectedWeatherTime.format("HH:mm")===e.parseZone(a.dateTime).format("HH:mm")},attrs:{dark:e.dark,role:"button","aria-current":e.selectedWeatherTime.format("HH:mm")===e.parseZone(a.dateTime).format("HH:mm")},on:{click:function(c){return e.setSelectedWeatherTime(a.dateTime)}}},[t("div",{staticClass:"weather-header__day-name"},[e._v(e._s(e.parseZone(a.dateTime).format("HH:mm")))]),e._v(" "),t("div",{staticStyle:{height:"40px","margin-top":"11px"}},[t("img",{attrs:{src:e.weatherIcon(a.icon,e.dark,!0),width:"30",height:Math.round(30/e.weatherIconRatio(a.icon)),alt:a.summary}})]),e._v(" "),t("div",[e._v(e._s(Math.round(a.temperature))+"\xB0")])])],1)}),0),e._v(" "),e.forecast.forecast&&e.forecast.forecast.daily?t("table",{staticClass:"weather-table weather-table--daily weather-table--small-header",class:{"weather-table--dark":e.dark}},[t("thead",[t("tr",[t("th"),e._v(" "),t("th"),e._v(" "),t("th",[t("img",{attrs:{src:r(98908)(`./temp${e.dark?"-white":""}.svg`),width:"18",height:"15",alt:e.translate("Temperatuur")}})]),e._v(" "),t("th",[t("img",{attrs:{src:r(80980)(`./${e.dark?"white":"black"}/precipitation.svg`),width:"10",height:"15",alt:e.translate("Sademed")}})])])]),e._v(" "),t("tbody",e._l(e.forecast.forecast.daily,function(a,m){return t("tr",{key:m,attrs:{role:"button"},on:{click:function(c){return e.setSelectedWeatherDate(a.dateTime)}}},[t("td",{staticClass:"weather-table__link"},[e._v(` 19 `+e._s(e.getDayName(a.dateTime,"dddd")))]),e._v(" "),t("td",[t("img",{attrs:{src:e.weatherIcon(a.icon,e.dark,!0),width:"22",height:Math.round(22/e.weatherIconRatio(a.icon)),alt:a.summary}})]),e._v(" "),t("td",[e._v(e._s(Math.round(a.temperatureLow))+"\xB0.."+e._s(Math.round(a.temperatureHigh))+`\xB0 20 `)]),e._v(" "),t("td",[e._v(e._s(e.replaceWithDot(e.round(a.precipIntensity)))+" "),t("span",{staticClass:"weather-table__unit"},[e._v("mm")])])])}),0)]):e._e()],1):t("Loader")]],2)},x=[];p._withStripped=!0;var v=r(10789),f=r(53949),y=r(59726),k=r(44707),g=r.n(k),n=r(20194),h=r(89447),w=r(28939),W=r(14030),i=(s,e,t)=>new Promise((a,m)=>{var c=_=>{try{C(t.next(_))}catch(L){m(L)}},S=_=>{try{C(t.throw(_))}catch(L){m(L)}},C=_=>_.done?a(_.value):Promise.resolve(_.value).then(c,S);C((t=t.apply(s,e)).next())}),o={name:"WeatherHeaderSmall",data(){return{selectedWeatherTime:null,selectedWeatherType:"hourly",forecast:null,isHourlyListVisible:!1,isError:!1}},props:{country:{type:String,default:"ee"},language:{type:String,default:"et"},location:{type:String,default:"ChIJvxZW35mUkkYRcGL8GG2zAAQ"},nameOverride:{type:String},loadFromCookie:{type:Boolean,default:!0},dark:{type:Boolean,default:!1}},created(){return i(this,null,function*(){g().locale(this.language),f.A.
20setLocale(this.country,this.language);const s=()=>i(this,null,function*(){try{this.forecast=yield(0,n.bG)(e,this.language),this.forecast.name=t||this.forecast.name}catch(m){this.isError=!0}});let e=this.location,t=this.nameOverride,a=(0,n.tG)();if(this.loadFromCookie&&a.length)try{this.forecast=yield(0,n.bG)(a[0],this.language)}catch(m){yield s()}else yield s();this.selectedWeatherTime=(0,n.Cd)(this.forecast.forecast.currently[0].dateTime)})},methods:{formatTime:n.fU,parseZone:n.Cd,weatherIcon:n.u7,round:n.LI,weatherIconRatio:n.bl,moment:g(),getDayName:n.AD,replaceWithDot(s){return s.replace(",",".")},getForecastByPlaceId(s){return i(this,null,function*(){return yield n.rK.get(`/place/${s}/forecast?type=currently,hourly,daily&language=${this.language}`)})},translate(s){return f.A.translate(s)},scrollToSummary(){const s=this.$refs.summary.offsetTop;window.scrollTo({top:s,behavior:"smooth"})},setSelectedWeatherDate(s){const e=(0,n.Cd)(s);e.set({hour:this.selectedWeatherTime.get("hour"),minute:this.selectedWeatherTime.get("minute")}),this.selectedWeatherTime=e,this.scrollToSummary(),this.$refs.summary.focus()},setSelectedWeatherTime(s){this.selectedWeatherTime=(0,n.Cd)(s),this.isHourlyListVisible=!1,this.scrollToSummary()},setSelectedWeatherToCurrent(){this.selectedWeatherTime=(0,n.Cd)(this.forecast.forecast.currently[0].dateTime)},batch(s,e){let t=[];for(let a=0;a<s.length;a+=e)t.push(s.slice(a,a+e));return t},extendedForecastRedirect(s){window.location.href="/forecast/"+s.id}},computed:{currentDataFields(){return[{id:"wind",title:this.translate("Tuul"),property:(0,n.eQ)(this.currentWeatherData.windSpeed)&&`${Math.round(this.currentWeatherData.windSpeed)} ${this.translate("m/s")}`||"-"},{id:"pressure",title:this.translate("\xD5hur\xF5hk"),property:(0,n.eQ)(this.currentWeatherData.pressure)&&this.round(this.currentWeatherData.pressure)+" "+this.translate("hPa")||"-"},{id:"humidity",title:this.translate("\xD5huniiskus"),property:(0,n.eQ)(this.currentWeatherData.humidity)&&Math.round(this.currentWeatherData.humidity*100)+"%"||"-"},{id:"precipIntensity",title:this.translate("Sademed"),property:(0,n.eQ)(this.currentWeatherData.precipIntensity)&&this.replaceWithDot(this.round(this.currentWeatherData.precipIntensity))+""+this.translate("mm")||"-"},{id:"precipProbability",title:this.translate("Sademete t\xF5en\xE4osus"),property:(0,n.eQ)(this.currentWeatherData.precipProbability)&&Math.round(this.currentWeatherData.precipProbability*100)+"%"||"-"}]},currentWeatherData(){if(!this.selectedWeatherTime||!this.forecast)return null;if(this.selectedWeatherTime.isSame(this.forecast.forecast.currently[0].dateTime,"minute"))return this.selectedWeatherType="hourly",this.forecast.forecast.currently[0];let s=this.forecast.forecast.hourly.find(t=>this.selectedWeatherTime.isSame(t.dateTime,"hour"));if(s)return this.selectedWeatherType="hourly",s;const e=this.forecast.forecast.daily.find(t=>this.selectedWeatherTime.isSame(t.dateTime,"day"));if(e){const t=(0,n.Cd)(e.dateTime);return s=this.forecast.forecast.hourly.find(a=>t.isSame(a.dateTime,"day")),s?(this.selectedWeatherType="hourly",s):(this.selectedWeatherType="daily",e)}return null},hourlyList(){return this.forecast.forecast.hourly.filter(s=>this.selectedWeatherTime.isSame(s.dateTime,"day"))},sunData(){const s=this.forecast.forecast.daily.find(e=>this.selectedWeatherTime.isSame(e.dateTime,"day"));return s?{sunrise:s.sunrise,sunset:s.sunset}:{}}},filters:{round:n.LI,replaceWithDot:n.q7},components:{Loader:W.A,Error:w.A,HourListItem:h.A,Autocomplete:y.A,ShadowButton:v.A}},u=o,D=r(14486),b=(0,D.A)(u,p,x,!1,null,"432e0ba8",null),T=b.exports},28939:(l,d,r)=>{r.d(d,{A:()=>n});var p=function(){var w=this,W=w._self._c;return W("div",{staticClass:"weather-error-view flex flex--direction-column flex flex--align-items-center flex--justify-content-center"},[W("img",{staticClass:"weather-error-view__icon",attrs:{src:r(45708),width:"60",height:"51"}}),w._v(" "),W("p",{staticClass:"weather-error-view__text",domProps:{innerHTML:w._s(w.translate("Ilmaandmete kuvamisel tekkis viga.<br>Palun v\xE4rskenda lehte."))}})])},x=[];p._withStripped=!0;var v=r(53949),f={name:"error",props:{language:{type:String,default:"et"},country:{type:String,default:"ee"}},created(){v.A.setLocale(this.country,this.language)},methods:{translate(h){return v.A.translate(h)}}},y=f,k=r(14486),g=(0,k.A)(y,p,x,!1,null,"30912c87",null),n=g.exports},31717:(l,d,r)=>{l.exports=r.p+"assets/arrow-385d02b59f574045b04f.svg"},32051:(l,d,r)=>{l.exports=r.p+"assets/arrow-black-eed320084d991df7d61e.svg"},40082:(l,d,r)=>{l.exports=r.p+"assets/arrow-down-abfbafe3f6dc01b258d5.svg"},45708:(l,d,r)=>{l.exports=r.p+"assets/error-35024857c7ae11a5375d.svg"},59726:(l,d,r)=>{r.d(d,{A:()=>W});var p=function(){var o=this,u=o._self._c;return u("div",{staticClass:"weather-header__search"},[u("div",{staticClass:"hidden",attrs:{role:"none","aria-live":"polite"}},[o._v(o._s(o.message))]),o._v(" "),u("input",{ref:"input",staticClass:"shadow-button shadow-button--active shadow-button--input",class:{"shadow-button--dark":o.dark},attrs:{type:"text",tabindex:"0",placeholder:o.placeholder,name:"location-search"},on:{click:function(D){o.isAutocompleteVisible=!0},keydown:o.onSearchKeydown,input:o.findLocations}}),o._v(" "),u("div",{directives:[{name:"show",rawName:"v-show",value:o.isAutocompleteVisible&&o.autocompleteData.length,expression:"isAutocompleteVisible && autocompleteData.length"}],staticClass:"shadow-button shadow-button__autocomplete-list-cnt",class:{"shadow-button--dark":o.dark},attrs:{id:"forecast-search-results"}},[u("ul",{ref:"results",staticClass:"shadow-button__autocomplete-list",attrs:{role:"listbox",tabindex:"0","aria-label":o.translate("Otsingutulemused")}},o._l(o.autocompleteData,function(D,b){return u("li",{staticClass:"shadow-button__autocomplete-list-item",attrs:{role:"option",tabindex:"0","aria-setsize":o.autocompleteData.length,"aria-posinset":b+1},on:{click:function(T){return o.setLocation(b)},keydown:function(T){return!T.type.indexOf("key")&&o._k(T.keyCode,"enter",13,T.key,"Enter")?null:o.setLocation(b)}}},[o._v(` 21 `+o._s(D.description)+` 22 `)])}),0)]),o._v(" "),u("div",{staticClass:"weather-header__search-btn",style:`background-image: url('${r(62844)(`./magnifier${o.dark?"-white":""}.svg`)}')`,on:{click:function(D){return o.setLocation(0)}}})])},x=[];p._withStripped=!0;var v=r(20194),f=r(53949),y=r(43131),k=(i,o,u)=>new Promise((D,b)=>{var T=t=>{try{e(u.next(t))}catch(a){b(a)}},s=t=>{try{e(u.throw(t))}catch(a){b(a)}},e=t=>t.done?D(t.value):Promise.resolve(t.value).then(T,s);e((u=u.apply(i,o)).next())}),g={name:"autocomplete",data(){return{locationFinderTimeout:null,autocompleteData:[],isAutocompleteVisible:!1,message:""}},props:{language:{type:String,default:"et"},debug:{type:Boolean,default:!1},country:{type:String,default:"ee"},placeholder:{type:String},dark:{type:Boolean,default:!1}},created(){f.A.setLocale(this.country,this.language)},mounted(){window.addEventListener("click",this.clickHandler)},beforeDestroy:function(){window.removeEventListener("click",this.clickHandler)},watch:{isAutocompleteVisible(i){i?window.addEventListener("keydown",this.closeOnEsc):i||window.removeEventListener("keydown",this.closeOnEsc)}},methods:{onSearchKeydown(i){const o=["ArrowDown","ArrowUp","Enter"];document.activeElement===this.$refs.input&&o.includes(i.key)&&(this.isAutocompleteVisible=!0,i.key==="Enter"&&(i.preventDefault(),document.activeElement.blur(),this.$nextTick(()=>{this.$refs.results.focus()})))},closeOnEsc(i){var o;i.key==="Escape"&&((o=document.activeElement)==null||o.blur(),this.$refs.input.focus(),this.$nextTick(()=>{this.isAutocompleteVisible=!1}))},translate(i){return f.A.translate(i)},setLocation(i){if(!this.autocompleteData.length)return;let o=(0,v.tG)();o=o.filter(T=>T!==this.autocompleteData[i].id),o.unshift(this.autocompleteData[i].id),o=o.slice(0,10);
22let u=new Date,D=location.host,b=D.split(".");u.setFullYear(u.getFullYear()+2),b.length===1?document.cookie=y.COOKIE_NAME+"="+JSON.stringify(o)+"; expires="+u.toGMTString()+"; path=/":(b.shift(),document.cookie=y.COOKIE_NAME+"="+JSON.stringify(o)+"; expires="+u.toGMTString()+"; path=/; domain="+b.join(".")),this.$emit("locationChange",this.autocompleteData[i]),this.isAutocompleteVisible=!1},findLocations(i){let o=i.target.value;if(clearTimeout(this.locationFinderTimeout),this.locationFinderTimeout=null,i.key==="Enter"){this.setLocation(0);return}o.length<2||(this.locationFinderTimeout=setTimeout(()=>k(this,null,function*(){try{this.autocompleteData=yield v.rK.get(`https://services.postimees.ee/places/v1/autocomplete/${o}?language=${this.language}`),this.message=this.translate("Found %s results").replace("%s",this.autocompleteData.length),this.isAutocompleteVisible=!!this.autocompleteData.length}catch(u){this.autocompleteData=[]}}),250))},clickHandler(i){this.$refs.input.contains(i.target)||(this.isAutocompleteVisible=!1)}}},n=g,h=r(14486),w=(0,h.A)(n,p,x,!1,null,"6284957a",null),W=w.exports},75226:(l,d,r)=>{r.d(d,{A:()=>T});var p=function(){var e=this,t=e._self._c;return t("section",{staticClass:"weather-header",class:{"weather-header--dark":e.dark}},[e.isError?t("Error",{attrs:{language:e.language,country:e.country}}):[e.currentWeatherData?[t("div",{staticClass:"flex flex--align-items-center flex--justify-content-space-between weather-header-cnt"},[t("ShadowButton",{class:{"shadow-button--active":e.currentWeatherData.dateTime===e.forecast.forecast.currently[0].dateTime},attrs:{dark:e.dark,"aria-current":e.currentWeatherData.dateTime===e.forecast.forecast.currently[0].dateTime},on:{click:function(a){return e.setSelectedWeatherToCurrent()}}},[e._v(` 23 `+e._s(e.translate("HETKEILM"))+` 24 `)]),e._v(" "),t("Autocomplete",{staticClass:"flex--equal-width",attrs:{language:e.language,country:e.country,placeholder:e.translate("Otsi ilma Eestis ja mujal"),dark:e.dark},on:{locationChange:e.extendedForecastRedirect}}),e._v(" "),e.placesList.length?t("div",{ref:"placesBtn",staticClass:"weather-header__list"},[t("ShadowButton",{staticClass:"weather-header__list-btn weather-header__list-btn--places",attrs:{"show-icon":"",dark:e.dark,"aria-expanded":String(e.isPlacesListVisible),"aria-controls":"places-listbox","aria-haspopup":"listbox",role:"button",tabindex:"0"},on:{click:function(a){e.isPlacesListVisible=!e.isPlacesListVisible},keydown:function(a){if(!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter"))return null;e.isPlacesListVisible=!e.isPlacesListVisible}}},[e._v(` 25 `+e._s(e.forecast.name)+` 26 `)]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isPlacesListVisible,expression:"isPlacesListVisible"}],staticClass:"shadow-button shadow-button__autocomplete-list-cnt",class:{"shadow-button--dark":e.dark},attrs:{role:"listbox",id:"places-listbox"}},[t("ul",{staticClass:"shadow-button__autocomplete-list",on:{keydown:function(a){if(!a.type.indexOf("key")&&e._k(a.keyCode,"esc",27,a.key,["Esc","Escape"]))return null;e.isPlacesListVisible=!1}}},[e._l(e.placesList,function(a,m){return[a?t("li",{key:m,staticClass:"shadow-button__autocomplete-list-item",attrs:{role:"button","aria-current":e.forecast.name===a.name},on:{click:function(c){return e.extendedForecastRedirect(a)},keydown:function(c){return!c.type.indexOf("key")&&e._k(c.keyCode,"enter",13,c.key,"Enter")?null:e.extendedForecastRedirect(a)}}},[e._v(` 27 `+e._s(a.name)+` 28 `)]):e._e()]})],2)])],1):e._e(),e._v(" "),t("div",{ref:"hourlyBtn",staticClass:"weather-header__list"},[t("ShadowButton",{staticClass:"weather-header__list-btn weather-header__list-btn--hourly",attrs:{state:e.hourlyList.length?[]:["disabled"],"show-icon":"",dark:e.dark,"aria-disabled":!e.hourlyList.length,"aria-expanded":String(e.isHourlyListVisible),"aria-controls":"hourly-listbox","aria-haspopup":"listbox",role:"button",tabindex:"0"},on:{click:function(a){e.isHourlyListVisible=!e.isHourlyListVisible},keydown:function(a){if(!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter"))return null;e.isHourlyListVisible=!e.isHourlyListVisible}}},[t("HourListItem",{attrs:{forecast:e.currentWeatherData,"selected-weather-type":e.selectedWeatherType,"weather-icon-white-color":e.dark}})],1),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.isHourlyListVisible&&e.hourlyList.length,expression:"isHourlyListVisible && hourlyList.length"}],staticClass:"shadow-button shadow-button__autocomplete-list-cnt",class:{"shadow-button--dark":e.dark},attrs:{id:"hourly-listbox",role:"listbox"}}
28,[t("ul",{staticClass:"shadow-button__autocomplete-list",on:{keydown:function(a){if(!a.type.indexOf("key")&&e._k(a.keyCode,"esc",27,a.key,["Esc","Escape"]))return null;e.isHourlyListVisible=!1}}},e._l(e.hourlyList,function(a,m){return t("li",{key:m,staticClass:"shadow-button__autocomplete-list-item",attrs:{role:"button"},on:{click:function(c){return e.setSelectedWeatherTime(a.dateTime)},keydown:function(c){return!c.type.indexOf("key")&&e._k(c.keyCode,"enter",13,c.key,"Enter")?null:e.setSelectedWeatherTime(a.dateTime)}}},[t("HourListItem",{attrs:{forecast:a,"weather-icon-white-color":e.dark}})],1)}),0)])],1)],1),e._v(" "),t("div",{staticClass:"flex",staticStyle:{margin:"30px -15px 0 -10px"}},[t("div",{staticClass:"flex shadow-button flex--equal-width flex--align-items-stretch flex--justify-content-start weather-header__summary shadow-button--rect",class:["weather-header__summary--"+e.selectedWeatherType,{"shadow-button--dark":e.dark}]},[t("div",{staticClass:"weather-header__current"},[t("div",{staticClass:"weather-header__place-name"},[e._v(e._s(e.forecast.name))]),e._v(" "),t("div",{staticClass:"weather-header__current-time"},[e._v(` 29 `+e._s(e.parseZone(e.currentWeatherData.dateTime).format("dddd,"))+` 30 `),t("span",{staticStyle:{color:"#b7b7b7"}},[e._v(e._s(e.parseZone(e.currentWeatherData.dateTime).format("HH:mm")))])]),e._v(" "),t("div",{staticClass:"flex flex--align-items-center flex--justify-content-center weather-header__icon-cnt"},[t("img",{attrs:{src:e.weatherIcon(e.currentWeatherData.icon,e.dark,!0),width:"71",height:Math.round(71/e.weatherIconRatio(e.currentWeatherData.icon)),alt:e.currentWeatherData.summary}}),e._v(" "),e.selectedWeatherType==="hourly"?t("div",{staticClass:"weather-header__current-temp"},[e._v(` 31 `+e._s(Math.round(e.currentWeatherData.temperature))+`\xB0 32 `)]):e.selectedWeatherType==="daily"?t("div",{staticClass:"weather-header__current-temp"},[e._v(` 33 `+e._s(Math.round(e.currentWeatherData.temperatureLow))+` 34 .. 35 `+e._s(Math.round(e.currentWeatherData.temperatureHigh))+`\xB0 36 `)]):e._e()]),e._v(" "),e.selectedWeatherType==="hourly"?t("div",{staticClass:"weather-header__apparent-temp"},[e._v(` 37 `+e._s(e.translate("Tajutav"))+" "+e._s(e._f("round")(e.currentWeatherData.apparentTemperature))+` \xB0C 38 `)]):e.selectedWeatherType==="daily"?t("div",{staticClass:"weather-header__apparent-temp"},[e._v(` 39 `+e._s(e.translate("Tajutav"))+" "+e._s(e._f("round")(e.currentWeatherData.apparentTemperatureLow))+` .. 40 `+e._s(e._f("round")(e.currentWeatherData.apparentTemperatureHigh))+` \xB0C 41 `)]):e._e(),e._v(" "),t("div",{staticClass:"flex flex--align-items-center flex--justify-content-space-between weather-header__sun"},[t("div",[t("img",{attrs:{src:r(92039)(`./${e.dark?"white":"black"}/clear-day.svg`),alt:e.translate("P\xE4ike t\xF5useb"),width:"16",height:Math.round(16/e.weatherIconRatio("clear-day"))}}),e._v(" "+e._s(e.formatTime(e.sunData.sunrise))+` 42 `)]),e._v(" "),t("div",[t("img",{attrs:{src:r(69138)(`./${e.dark?"white":"black"}/clear.svg`),alt:e.translate("P\xE4ike loojub"),width:"16",height:Math.round(16/e.weatherIconRatio("clear"))}}),e._v(" "+e._s(e.formatTime(e.sunData.sunset))+` 43 `)])])]),e._v(" "),t("ul",{staticClass:"flex--equal-width weather-header__forecast"},e._l(e.currentDataFields,function(a){return t("li",{key:a.id,staticClass:"flex flex--align-items-center flex--justify-content-space-between weather-header__forecast-field",attrs:{"aria-label":`${a.title} ${a.property==="-"?e.translate("unknown"):a.property}`,role:"presentation"}},[t("div",{staticClass:"weather-header__forecast-field-title",attrs:{"aria-hidden":"true"}},[e._v(e._s(a.title))]),e._v(" "),t("div",{staticClass:"weather-header__forecast-field-value",attrs:{"aria-hidden":"true"}},[a.id==="wind"?t("img",{staticClass:"weather__wind-dir",style:`transform: rotate(${e.currentWeatherData.windBearing}deg)`,attrs:{src:r(32337)(`./arrow${e.dark?"":"-black"}.svg`),width:"7",alt:""}}
43):e._e(),e._v(" "),t("span",[e._v(` 44 `+e._s(a.property)+` 45 `)])])])}),0)]),e._v(" "),t("div",{staticClass:"flex flex--direction-column flex--align-items-stretch flex--justify-content-space-between weather-header__days-cnt"},e._l(e.batch(e.forecast.forecast.daily.slice(0,6),3),function(a,m){return t("div",{key:m,staticClass:"flex flex--align-items-stretch"},e._l(a,function(c,S){return t("ShadowButton",{key:S,staticClass:"flex--align-items-stretch shadow-button--rect weather-header__day-cnt",class:{"shadow-button--active":e.selectedWeatherTime.format("YYYY-MM-DD")===e.parseZone(c.dateTime).format("YYYY-MM-DD")},attrs:{role:"button",tabindex:"0",dark:e.dark,"aria-current":e.selectedWeatherTime.format("YYYY-MM-DD")===e.parseZone(c.dateTime).format("YYYY-MM-DD")},on:{click:function(C){return e.setSelectedWeatherDate(c.dateTime)}}},[t("div",{staticClass:"weather-header__day-name"},[e._v(e._s(e.getDayName(c.dateTime)))]),e._v(" "),t("div",{staticStyle:{height:"40px","margin-top":"11px"}},[t("img",{attrs:{src:e.weatherIcon(c.icon,e.dark,!0),width:"30",height:Math.round(30/e.weatherIconRatio(c.icon)),alt:c.summary}})]),e._v(" "),t("div",[e._v(` 46 `+e._s(Math.round(c.temperatureLow))+" .. "+e._s(Math.round(c.temperatureHigh))+` 47 `)])])}),1)}),0)])]:t("Loader")]],2)},x=[];p._withStripped=!0;var v=r(10789),f=r(53949),y=r(59726),k=r(44707),g=r.n(k),n=r(20194),h=r(89447),w=r(28939),W=r(14030),i=(s,e,t)=>new Promise((a,m)=>{var c=_=>{try{C(t.next(_))}catch(L){m(L)}},S=_=>{try{C(t.throw(_))}catch(L){m(L)}},C=_=>_.done?a(_.value):Promise.resolve(_.value).then(c,S);C((t=t.apply(s,e)).next())}),o={name:"WeatherHeader",data(){return{selectedWeatherTime:null,selectedWeatherType:"hourly",forecast:null,isHourlyListVisible:!1,isPlacesListVisible:!1,placesList:[],isError:!1}},props:{country:{type:String,default:"ee"},language:{type:String,default:"et"},location:{type:String,default:"ChIJvxZW35mUkkYRcGL8GG2zAAQ"},nameOverride:{type:String},loadFromCookie:{type:Boolean,default:!0},dark:{type:Boolean,default:!1}},mounted(){window.addEventListener("click",this.clickHandler)},beforeDestroy:function(){window.removeEventListener("click",this.clickHandler)},created(){return i(this,null,function*(){g().locale(this.language),f.A.setLocale(this.country,this.language);const s=()=>i(this,null,function*(){try{this.forecast=yield(0,n.bG)(e,this.language),this.forecast.name=t||this.forecast.name}catch(c){this.isError=!0}});let e=this.location,t=this.nameOverride,a=(0,n.tG)();if(this.loadFromCookie&&a.length)try{this.forecast=yield(0,n.bG)(a[0],this.language),a=a.slice(1)}catch(c){yield s()}else yield s();let m=[];try{const c=this.country==="ee"?"estonia":"latvija";m=yield n.rK.get(`/groups/${c}/forecast?type=none&language=${this.language}`)}catch(c){}try{m=(yield Promise.all(a.map(S=>n.rK.get(`place/${S}/forecast?type=none&language=${this.language}`).catch(()=>null)))).concat(m)}catch(c){}this.placesList=m,this.selectedWeatherTime=(0,n.Cd)(this.forecast.forecast.currently[0].dateTime)})},methods:{formatTime:n.fU,parseZone:n.Cd,weatherIcon:n.u7,round:n.LI,weatherIconRatio:n.bl,moment:g(),getDayName:n.AD,replaceWithDot(s){return s.replace(",",".")},translate(s){return f.A.translate(s)},setSelectedWeatherDate(s){const e=(0,n.Cd)(s);e.set({hour:this.selectedWeatherTime.get("hour"),minute:this.selectedWeatherTime.get("minute")}),this.selectedWeatherTime=e},setSelectedWeatherTime(s){this.selectedWeatherTime=(0,n.Cd)(s),this.isHourlyListVisible=!1},setSelectedWeatherToCurrent(){this.selectedWeatherTime=(0,n.Cd)(this.forecast.forecast.currently[0].dateTime)},batch(s,e){let t=[];for(let a=0;a<s.length;a+=e)t.push(s.slice(a,a+e));return t},clickHandler(s){this.$refs.hourlyBtn&&!this.$refs.hourlyBtn.contains(s.target)&&(this.isHourlyListVisible=!1),this.$refs.placesBtn&&!this.$refs.placesBtn.contains(s.target)&&(this.isPlacesListVisible=!1)},extendedForecastRedirect(s){window.location.href="/forecast/"+s.id}},computed:{currentDataFields(){return[{id:"wind",title:this.translate("Tuul"),property:(0,n.eQ)(this.currentWeatherData.windSpeed)&&Math.round(this.currentWeatherData.windSpeed)+" "+this.translate("m/s")||"
47-"},{id:"pressure",title:this.translate("\xD5hur\xF5hk"),property:(0,n.eQ)(this.currentWeatherData.pressure)&&this.round(this.currentWeatherData.pressure)+" "+this.translate("hPa")||"-"},{id:"humidity",title:this.translate("\xD5huniiskus"),property:(0,n.eQ)(this.currentWeatherData.humidity)&&Math.round(this.currentWeatherData.humidity*100)+"%"||"-"},{id:"precipIntensity",title:this.translate("Sademed"),property:(0,n.eQ)(this.currentWeatherData.precipIntensity)&&this.replaceWithDot(this.round(this.currentWeatherData.precipIntensity))+""+this.translate("mm")||"-"},{id:"precipProbability",title:this.translate("Sademete t\xF5en\xE4osus"),property:(0,n.eQ)(this.currentWeatherData.precipProbability)&&Math.round(this.currentWeatherData.precipProbability*100)+"%"||"-"}]},currentWeatherData(){if(!this.selectedWeatherTime||!this.forecast)return null;if(this.selectedWeatherTime.isSame(this.forecast.forecast.currently[0].dateTime,"minute"))return this.selectedWeatherType="hourly",this.forecast.forecast.currently[0];let s=this.forecast.forecast.hourly.find(t=>this.selectedWeatherTime.isSame(t.dateTime,"hour"));if(s)return this.selectedWeatherType="hourly",s;const e=this.forecast.forecast.daily.find(t=>this.selectedWeatherTime.isSame(t.dateTime,"day"));if(e){const t=(0,n.Cd)(e.dateTime);return s=this.forecast.forecast.hourly.find(a=>t.isSame(a.dateTime,"day")),s?(this.selectedWeatherType="hourly",s):(this.selectedWeatherType="daily",e)}return null},hourlyList(){return this.forecast.forecast.hourly.filter(s=>this.selectedWeatherTime.isSame(s.dateTime,"day"))},sunData(){const s=this.forecast.forecast.daily.find(e=>this.selectedWeatherTime.isSame(e.dateTime,"day"));return s?{sunrise:s.sunrise,sunset:s.sunset}:{}}},filters:{round:n.LI,replaceWithDot:n.q7},components:{Loader:W.A,Error:w.A,HourListItem:h.A,Autocomplete:y.A,ShadowButton:v.A}},u=o,D=r(14486),b=(0,D.A)(u,p,x,!1,null,"2e0d8a56",null),T=b.exports},84688:(l,d,r)=>{l.exports=r.p+"assets/temp-281171c4f7224650d751.svg"},85154:(l,d,r)=>{l.exports=r.p+"assets/magnifier-addae208e2c680e5672b.svg"},89447:(l,d,r)=>{r.d(d,{A:()=>w});var p=function(){var i=this,o=i._self._c;return o("div",{attrs:{role:"group"}},[o("time",{staticClass:"weather-header__hour-list-time",attrs:{"aria-label":i.formatTime(i.forecast.dateTime,"HH:mm")}},[o("span",{attrs:{"aria-hidden":"true"}},[i._v(i._s(i.formatTime(i.forecast.dateTime,i.format)))])]),i._v(" "),i.selectedWeatherType==="hourly"?o("img",{staticClass:"weather-header__hour-list-img",attrs:{src:i.weatherIcon(i.forecast.icon,i.weatherIconWhiteColor,i.forecast.isDayTime),width:i.weatherIconWidth,height:i.weatherIconHeightOverride?i.weatherIconWidth:Math.round(i.weatherIconWidth/i.weatherIconRatio(i.forecast.icon)),alt:i.forecast.summary}}):i._e(),i._v(" "),i.selectedWeatherType==="hourly"?o("span",{staticClass:"weather-header__hour-list-temp"},[i._v(` 48 `+i._s(Math.round(i.forecast.temperature))+`\xB0 49 `)]):i._e()])},x=[];p._withStripped=!0;var v=r(44707),f=r.n(v),y=r(20194),k={name:"HourListItem",props:{forecast:{type:Object,required:!0},selectedWeatherType:{type:String,default:"hourly"},format:{type:String,default:"HH:mm"},weatherIconWhiteColor:{type:Boolean,default:!1},weatherIconWidth:{type:Number,default:18},weatherIconHeightOverride:{type:Boolean,default:!1}},methods:{weatherIcon:y.u7,weatherIconRatio:y.bl,moment:f(),formatTime:y.fU}},g=k,n=r(14486),h=(0,n.A)(g,p,x,!1,null,"d8b2fb12",null),w=h.exports},90526:(l,d,r)=>{l.exports=r.p+"assets/arrow-down-white-c2295eaa2a39c054960d.svg"},91643:(l,d,r)=>{l.exports=r.p+"assets/arrow-down-disabled-9484e0acea8ef85dfac3.svg"},97038:(l,d,r)=>{l.exports=r.p+"assets/magnifier-white-fc9cbe53f83e15250003.svg"}}]); 50 51//# sourceMappingURL=bundle-e378e7179733dfa427a0.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.