From 1d909c32aa59d7a239c4b1cd591d57299bb50cce Mon Sep 17 00:00:00 2001 From: jakobst1n Date: Thu, 28 Apr 2022 10:52:04 +0200 Subject: Updates --- client/legacy/index.87fbe324.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 client/legacy/index.87fbe324.js (limited to 'client/legacy/index.87fbe324.js') diff --git a/client/legacy/index.87fbe324.js b/client/legacy/index.87fbe324.js new file mode 100644 index 0000000..2781b06 --- /dev/null +++ b/client/legacy/index.87fbe324.js @@ -0,0 +1 @@ +import{_ as t,a as n,b as e,c as a,i as r,s as c,d as i,e as o,S as s,f as u,g as l,h as f,j as h,k as d,l as v,m as p,n as m,w as g,o as y,t as _,p as b,q as w,r as E,u as $,v as k,x as D,y as O,z as R,A as I,B as x,C as P,D as V,E as j,F as M,G as T,H as B,I as S,J as N,K as C,L as q,M as H,N as A,O as J,P as z}from"./client.9db787ae.js";function K(t){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(a){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return e(this,r)}}function F(t){var n,e,a,r,c,i,o,s,g;return{c:function(){n=u("div"),e=u("div"),a=u("div"),r=u("div"),c=u("div"),i=u("div"),o=u("div"),s=u("div"),g=u("div"),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var u=f(n);e=l(u,"DIV",{class:!0}),f(e).forEach(h),a=l(u,"DIV",{class:!0}),f(a).forEach(h),r=l(u,"DIV",{class:!0}),f(r).forEach(h),c=l(u,"DIV",{class:!0}),f(c).forEach(h),i=l(u,"DIV",{class:!0}),f(i).forEach(h),o=l(u,"DIV",{class:!0}),f(o).forEach(h),s=l(u,"DIV",{class:!0}),f(s).forEach(h),g=l(u,"DIV",{class:!0}),f(g).forEach(h),u.forEach(h),this.h()},h:function(){d(e,"class","svelte-7k6qu0"),d(a,"class","svelte-7k6qu0"),d(r,"class","svelte-7k6qu0"),d(c,"class","svelte-7k6qu0"),d(i,"class","svelte-7k6qu0"),d(o,"class","svelte-7k6qu0"),d(s,"class","svelte-7k6qu0"),d(g,"class","svelte-7k6qu0"),d(n,"class","lds-roller svelte-7k6qu0")},m:function(t,u){v(t,n,u),p(n,e),p(n,a),p(n,r),p(n,c),p(n,i),p(n,o),p(n,s),p(n,g)},p:m,i:m,o:m,d:function(t){t&&h(n)}}}var L=function(n){t(u,s);var e=K(u);function u(t){var n;return a(this,u),n=e.call(this),r(i(n),t,null,F,c,{}),n}return o(u)}();const U={updated:!1,updating:!0},Z=g(Object.assign(Object.assign({},U),{available:!1,longitude:null,latitude:null,city:null})),G=g(Object.assign(Object.assign({},U),{available:!1})),Q=g(Object.assign({},U));function W(t,n=!1){let e=n?{}:{updated:new Date};t.update((t=>Object.assign(Object.assign(Object.assign({},t),e),{updating:n})))}function X(t){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,c=n(t);if(a){var i=n(this).constructor;r=Reflect.construct(c,arguments,i)}else r=c.apply(this,arguments);return e(this,r)}}function Y(t){var n,e,a,r,c=t[0].city+"";return{c:function(){n=u("i"),e=y(),a=u("h1"),r=_(c),this.h()},l:function(t){n=l(t,"I",{class:!0}),f(n).forEach(h),e=b(t),a=l(t,"H1",{class:!0});var i=f(a);r=w(i,c),i.forEach(h),this.h()},h:function(){d(n,"class","symbol fas fa-map-marker-alt svelte-9kdo4s"),d(a,"class","svelte-9kdo4s")},m:function(t,c){v(t,n,c),v(t,e,c),v(t,a,c),p(a,r)},p:function(t,n){1&n&&c!==(c=t[0].city+"")&&E(r,c)},d:function(t){t&&h(n),t&&h(e),t&&h(a)}}}function tt(t){var n,e;function a(t,e){return 6&e&&(n=null),null==n&&(n=!!(Math.abs(t[1].updated-t[2].updated)>6e5)),n?et:nt}var r=a(t,-1),c=r(t);return{c:function(){c.c(),e=$()},l:function(t){c.l(t),e=$()},m:function(t,n){c.m(t,n),v(t,e,n)},p:function(t,n){r===(r=a(t,n))&&c?c.p(t,n):(c.d(1),(c=r(t))&&(c.c(),c.m(e.parentNode,e)))},d:function(t){c.d(t),t&&h(e)}}}function nt(t){var n,e,a=t[1].updated.toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"";return{c:function(){n=u("p"),e=_(a)},l:function(t){n=l(t,"P",{});var r=f(n);e=w(r,a),r.forEach(h)},m:function(t,a){v(t,n,a),p(n,e)},p:function(t,n){2&n&&a!==(a=t[1].updated.toLocaleString("no-NO",{dateStyle:"medium",timeStyle:"short"})+"")&&E(e,a)},d:function(t){t&&h(n)}}}function et(t){var n,e;return{c:function(){n=u("p"),e=_("There is more than 10 minutes difference between data updates")},l:function(t){n=l(t,"P",{});var a=f(n);e=w(a,"There is more than 10 minutes difference between data updates"),a.forEach(h)},m:function(t,a){v(t,n,a),p(n,e)},p:m,d:function(t){t&&h(n)}}}function at(t){var n,e,a,r,c,i,o,s,g,$,k,D,O=t[2].now.kp+"",R=t[2].now.kp_max+"",I=t[2].now.kp_min+"";return{c:function(){n=u("h2"),e=_("KP "),a=_(O),r=y(),c=u("p"),i=u("span"),o=_("↑ KP "),s=_(R),g=y(),$=u("span"),k=_("↓ KP "),D=_(I),this.h()},l:function(t){n=l(t,"H2",{class:!0});var u=f(n);e=w(u,"KP "),a=w(u,O),u.forEach(h),r=b(t),c=l(t,"P",{});var d=f(c);i=l(d,"SPAN",{classname:!0});var v=f(i);o=w(v,"↑ KP "),s=w(v,R),v.forEach(h),g=b(d),$=l(d,"SPAN",{classname:!0});var p=f($);k=w(p,"↓ KP "),D=w(p,I),p.forEach(h),d.forEach(h),this.h()},h:function(){d(n,"class","svelte-9kdo4s"),d(i,"classname","pr-2"),d($,"classname","pl-2")},m:function(t,u){v(t,n,u),p(n,e),p(n,a),v(t,r,u),v(t,c,u),p(c,i),p(i,o),p(i,s),p(c,g),p(c,$),p($,k),p($,D)},p:function(t,n){4&n&&O!==(O=t[2].now.kp+"")&&E(a,O),4&n&&R!==(R=t[2].now.kp_max+"")&&E(s,R),4&n&&I!==(I=t[2].now.kp_min+"")&&E(D,I)},i:m,o:m,d:function(t){t&&h(n),t&&h(r),t&&h(c)}}}function rt(t){var n,e;return n=new L({}),{c:function(){P(n.$$.fragment)},l:function(t){V(n.$$.fragment,t)},m:function(t,a){j(n,t,a),e=!0},p:m,i:function(t){e||(I(n.$$.fragment,t),e=!0)},o:function(t){O(n.$$.fragment,t),e=!1},d:function(t){M(n,t)}}}function ct(t){var n,e,a,r,c,i,o,s,m,g,k,D,O,R,I,x=t[2].now.bz+"",P=t[2].now.bt+"",V=t[1].available&&it(t);return{c:function(){n=u("div"),e=u("p"),a=_("BZ"),r=y(),c=u("p"),i=_(x),o=y(),s=u("div"),m=u("p"),g=_("BT"),k=y(),D=u("p"),O=_(P),R=y(),V&&V.c(),I=$(),this.h()},l:function(t){n=l(t,"DIV",{});var u=f(n);e=l(u,"P",{class:!0});var d=f(e);a=w(d,"BZ"),d.forEach(h),r=b(u),c=l(u,"P",{class:!0});var v=f(c);i=w(v,x),v.forEach(h),u.forEach(h),o=b(t),s=l(t,"DIV",{});var p=f(s);m=l(p,"P",{class:!0});var y=f(m);g=w(y,"BT"),y.forEach(h),k=b(p),D=l(p,"P",{class:!0});var _=f(D);O=w(_,P),_.forEach(h),p.forEach(h),R=b(t),V&&V.l(t),I=$(),this.h()},h:function(){d(e,"class","svelte-9kdo4s"),d(c,"class","svelte-9kdo4s"),d(m,"class","svelte-9kdo4s"),d(D,"class","svelte-9kdo4s")},m:function(t,u){v(t,n,u),p(n,e),p(e,a),p(n,r),p(n,c),p(c,i),v(t,o,u),v(t,s,u),p(s,m),p(m,g),p(s,k),p(s,D),p(D,O),v(t,R,u),V&&V.m(t,u),v(t,I,u)},p:function(t,n){4&n&&x!==(x=t[2].now.bz+"")&&E(i,x),4&n&&P!==(P=t[2].now.bt+"")&&E(O,P),t[1].available?V?V.p(t,n):((V=it(t)).c(),V.m(I.parentNode,I)):V&&(V.d(1),V=null)},d:function(t){t&&h(n),t&&h(o),t&&h(s),t&&h(R),V&&V.d(t),t&&h(I)}}}function it(t){var n,e,a,r,c,i,o,s,m,g,$,k,D,O,R,I=t[1].now.temp+"",x=t[1].now.clouds+"";return{c:function(){n=u("div"),e=u("p"),a=_("Temp"),r=y(),c=u("p"),i=_(I),o=_("°C"),s=y(),m=u("div"),g=u("p"),$=_("Clouds"),k=y(),D=u("p"),O=_(x),R=_("%"),this.h()},l:function(t){n=l(t,"DIV",{});var u=f(n);e=l(u,"P",{class:!0});var d=f(e);a=w(d,"Temp"),d.forEach(h),r=b(u),c=l(u,"P",{class:!0});var v=f(c);i=w(v,I),o=w(v,"°C"),v.forEach(h),u.forEach(h),s=b(t),m=l(t,"DIV",{});var p=f(m);g=l(p,"P",{class:!0});var y=f(g);$=w(y,"Clouds"),y.forEach(h),k=b(p),D=l(p,"P",{class:!0});var _=f(D);O=w(_,x),R=w(_,"%"),_.forEach(h),p.forEach(h),this.h()},h:function(){d(e,"class","svelte-9kdo4s"),d(c,"class","svelte-9kdo4s"),d(g,"class","svelte-9kdo4s"),d(D,"class","svelte-9kdo4s")},m:function(t,u){v(t,n,u),p(n,e),p(e,a),p(n,r),p(n,c),p(c,i),p(c,o),v(t,s,u),v(t,m,u),p(m,g),p(g,$),p(m,k),p(m,D),p(D,O),p(D,R)},p:function(t,n){2&n&&I!==(I=t[1].now.temp+"")&&E(i,I),2&n&&x!==(x=t[1].now.clouds+"")&&E(O,x)},d:function(t){t&&h(n),t&&h(s),t&&h(m)}}}function ot(t){var n,e,a,r,c,i,o,s,m,g,_,w,E=!t[0].updating&&t[0].available&&!t[1].updating&&!t[2].updating&&Y(t),$=!t[1].updating&&!t[2].updating&&tt(t),x=[rt,at],P=[];function V(t,n){return t[2].updating||t[1].updating?0:1}s=V(t),m=P[s]=x[s](t);var j=!t[2].updating&&!t[1].updating&&ct(t);return{c:function(){n=u("div"),e=u("div"),a=u("div"),E&&E.c(),r=y(),c=u("div"),$&&$.c(),i=y(),o=u("div"),m.c(),g=y(),_=u("div"),j&&j.c(),this.h()},l:function(t){n=l(t,"DIV",{class:!0});var s=f(n);e=l(s,"DIV",{class:!0});var u=f(e);a=l(u,"DIV",{class:!0});var d=f(a);E&&E.l(d),d.forEach(h),r=b(u),c=l(u,"DIV",{class:!0});var v=f(c);$&&$.l(v),v.forEach(h),i=b(u),o=l(u,"DIV",{class:!0});var p=f(o);m.l(p),p.forEach(h),g=b(u),_=l(u,"DIV",{class:!0});var y=f(_);j&&j.l(y),y.forEach(h),u.forEach(h),s.forEach(h),this.h()},h:function(){d(a,"class","weatherCurrent-data-location svelte-9kdo4s"),d(c,"class","weatherCurrent-data-date"),d(o,"class","weatherCurrent-data-kp svelte-9kdo4s"),d(_,"class","current-details svelte-9kdo4s"),d(e,"class","weatherCurrent-data svelte-9kdo4s"),d(n,"class","weatherCurrent-wrapper svelte-9kdo4s")},m:function(t,u){v(t,n,u),p(n,e),p(e,a),E&&E.m(a,null),p(e,r),p(e,c),$&&$.m(c,null),p(e,i),p(e,o),P[s].m(o,null),p(e,g),p(e,_),j&&j.m(_,null),w=!0},p:function(t,n){var e=k(n,1)[0];t[0].updating||!t[0].available||t[1].updating||t[2].updating?E&&(E.d(1),E=null):E?E.p(t,e):((E=Y(t)).c(),E.m(a,null)),t[1].updating||t[2].updating?$&&($.d(1),$=null):$?$.p(t,e):(($=tt(t)).c(),$.m(c,null));var r=s;(s=V(t))===r?P[s].p(t,e):(D(),O(P[r],1,1,(function(){P[r]=null})),R(),(m=P[s])?m.p(t,e):(m=P[s]=x[s](t)).c(),I(m,1),m.m(o,null)),t[2].updating||t[1].updating?j&&(j.d(1),j=null):j?j.p(t,e):((j=ct(t)).c(),j.m(_,null))},i:function(t){w||(I(m),w=!0)},o:function(t){O(m),w=!1},d:function(t){t&&h(n),E&&E.d(),$&&$.d(),P[s].d(),j&&j.d()}}}function st(t,n,e){var a,r,c;return x(t,Z,(function(t){return e(0,a=t)})),x(t,G,(function(t){return e(1,r=t)})),x(t,Q,(function(t){return e(2,c=t)})),[a,r,c]}!async function(){if("undefined"==typeof window)return;let t;W(Z,!0);try{t=await async function(){return new Promise(((t,n)=>{"undefined"!=typeof navigator?navigator.geolocation.getCurrentPosition((n=>{t({longitude:n.coords.longitude,latitude:n.coords.latitude})}),(t=>{n(t)})):n(Error())}))}()}catch(t){return console.log(t),Z.update((t=>Object.assign(Object.assign({},t),{available:!1,city:null,longitude:null,latitude:null}))),void W(Z,!1)}let n=await fetch(`https://geocode.xyz/${t.latitude},${t.longitude}?geoit=json`),e=await n.json();Z.update((n=>Object.assign(Object.assign(Object.assign({},n),{available:!0,city:e.city}),t))),W(Z,!1)}(),Z.subscribe((async function(t=null){if("undefined"==typeof window)return;if(null===t)return;if(t.updating)return;if(!t.available)return G.update((t=>Object.assign(Object.assign({},t),{available:!1}))),void W(G,!1);W(G,!0);let n=await fetch(`https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=${t.latitude}&lon=${t.longitude}`),e=await n.json(),a={clouds:null,temp:null};try{a.clouds=e.properties.timeseries[0].data.instant.details.cloud_area_fraction,a.temp=e.properties.timeseries[0].data.instant.details.air_temperature,e.properties.timeseries=e.properties.timeseries.map((t=>Object.assign(Object.assign({},t),{time:new Date(t.time)})))}catch(t){}G.update((t=>Object.assign(Object.assign({},t),{yr_data_raw:e,now:a,available:!0}))),W(G,!1)})),async function(){if("undefined"==typeof window)return;W(Q,!0);let t=await async function(){let t,n={now:{bz:"-",bt:"-",kp:"-",kp_min:"-",kp_max:"-"},usnoaa_data_raw:{solar_wind_mag_field:!1,noaa_planetary_k_index_forecast:!1,geospace_pred_est_kp_1_hour:!1,outlook_27_day:!1}},e=await fetch("https://services.swpc.noaa.gov/products/summary/solar-wind-mag-field.json");n.usnoaa_data_raw.solar_wind_mag_field=await e.json(),n.usnoaa_data_raw.solar_wind_mag_field.TimeStamp=new Date(n.usnoaa_data_raw.solar_wind_mag_field.TimeStamp+" UTC"),n.now.bz=n.usnoaa_data_raw.solar_wind_mag_field.Bz,n.now.bt=n.usnoaa_data_raw.solar_wind_mag_field.Bt,e=await fetch("https://services.swpc.noaa.gov/json/geospace/geospace_pred_est_kp_1_hour.json"),t=await e.json(),t=t.map((t=>Object.assign(Object.assign({},t),{model_prediction_time:new Date(t.model_prediction_time)}))),n.usnoaa_data_raw.geospace_pred_est_kp_1_hour=t,e=await fetch("https://services.swpc.noaa.gov/text/27-day-outlook.txt"),t=await e.text(),t=[...t.matchAll(/^(?