1import{a as L,b as W}from"./chunk-N7TQLE77.js";import{a as z}from"./chunk-GRHEF4BH.js";import{a as H}from"./chunk-YHQCWGPY.js";import"./chunk-T7E4NWSG.js";import{a as E}from"./chunk-RJAQINZE.js";import{a as j}from"./chunk-5VWIYV7A.js";import"./chunk-C4ICBDDG.js";import"./chunk-VGXV6ATU.js";import"./chunk-ADVV5ONN.js";import{n as g}from"./chunk-47ZOTNDE.js";import{f as q}from"./chunk-Z3ATNGTR.js";import{b as Q}from"./chunk-7TOLEIK7.js";import{a as N}from"./chunk-TKOTFYQR.js";import"./chunk-IEHBLZGY.js";import{k as G}from"./chunk-UFPWKMEN.js";import"./chunk-GCCEWEET.js";import{a as V}from"./chunk-NFIAYGHJ.js";import{b as U,e as A}from"./chunk-PAM3RPUJ.js";import{b as B}from"./chunk-GCTRA7JF.js";import"./chunk-3UF247RB.js";import{u as F,w as D}from"./chunk-VJGCODMT.js";import{$b as h,Cb as f,Fc as y,Ga as M,Gc as R,Hb as O,Mc as p,Nc as b,Oc as T,ac as _,dd as d,ed as m,gc as u,hc as c,ic as P,ma as o,qc as S,r as v,sa as w,ta as x,tb as s,ud as I,vc as k,xc as C}from"./chunk-HBQGYQK3.js";import"./chunk-PCOOZPAX.js";var X=["debug"];function Y(e,r){if(e&1&&(u(0,"div",2),p(1),d(2,"translate"),c()),e&2){let l=C();s(),b(m(2,1,l.subtitle))}}function Z(e,r){if(e&1){let l=S();u(0,"wo-button",4),k("click",function(){w(l);let t=C();return x(t.reload())}),p(1),d(2,"translate"),c()}e&2&&(s(),T(" ",m(2,1,"error_default_button_title")," "))}var i=(function(e){return e[e.notFound=0]="notFound",e[e.error=1]="error",e[e.offline=2]="offline",e[e.eaqi=3]="eaqi",e[e.warningMap=4]="warningMap",e[e.gone=5]="gone",e})(i||{}),K=(()=>{let r=class r{constructor(){this.router=o(g),this.win=o(V),this.connectionState=o(E),this.debugSvc=o(H),this.response=o(z,{optional:!0}),this.debugEl=I.required("debug",{read:f});let n=this.getReason(this.router);switch(n){case i.error:this.title="error_default_title",this.subtitle="error_default_subtitle",this.showReload=!0;break;case i.notFound:this.title="page_not_found";break;case i.offline:this.title="error_network_offline",this.showReload=!0,this.connectionState.whenOnline().then(()=>this.reload());break;case i.eaqi:this.title="air_quality_error",this.showReload=!0;break;case i.warningMap:this.title="warnings_maps_error",this.showReload=!0;break;case i.gone:this.title="error_default_title";break}this.response!=null&&this.response.status(n===i.gone?410:n===i.notFound?404:500)}getReason(n){if(!this.connectionState.isOnline())return i.offline;let t=G.constantOnly(),a=n.url.includes(t.build({recipe:"error"}).path);return a&&n.url.includes("source=warningMap")?i.warningMap:a&&n.url.includes("source=eaqi")?i.eaqi:a?i.error:n.url.includes("/gone")?i.gone:i.notFound}ngOnInit(){this.debugSvc.isDebugFlagSet()&&(this.debugEl().createComponent(W),this.debugEl().createComponent(L))}reload(){this.router.navigateByUrl(this.win.location.pathname)}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=O({type:r,selectors:[["wo-error-route"]],viewQuery:function(t,a){t&1&&y(a.debugEl,X,5,f),t&2&&R()},decls:8,vars:5,consts:[["debug",""],[1,"title"],[1,"subtitle"],["ngSrc","assets/error/ic_error_default.svg","alt","","width","150","height","180",1,"image"],[3,"click"]],template:function(t,a){t&1&&(u(0,"div",1),p(1),d(2,"translate"),c(),h(3,Y,3,3,"div",2),h(4,Z,3,3,"wo-button"),P(5,"img",3)(6,"div",null,0)),t&2&&(s(),b(m(2,3,a.title)),s(2),_(a.subtitle?3:-1),s(),_(a.showReload?4:-1))},dependencies:[A,N,D,U],styles:["html[data-device=desktop] [_nghost-%COMP%]{margin-top:-8px}[data-device=desktop][_nghost-%COMP%]{margin-top:-8px}[_nghost-%COMP%]{position:absolute;inset:0;color:#fff;background:linear-gradient(180deg,#10658e,#00537f);text-align:center;display:flex;flex-direction:column;align-items:center}.title[_ngcontent-%COMP%], .image[_ngcontent-%COMP%]{margin-top:64px}.title[_ngcontent-%COMP%]{font-size:16px;font-weight:300;white-space:pre-line;padding:8px}.subtitle[_ngcontent-%COMP%], wo-button[_ngcontent-%COMP%]{margin-top:16px;font-size:13px}wo-button[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.image[_ngcontent-%COMP%]{max-height:180px}wo-button[_ngcontent-%COMP%]{background-color:#00537f}@media(max-height:580px){.title[_ngcontent-%COMP%], .image[_ngcontent-%COMP%]{margin-top:32px}}@media(max-height:460px){.title[_ngcontent-%COMP%], .image[_ngcontent-%COMP%]{margin-top:16px}.image[_ngcontent-%COMP%]{max-height:100px}}"]});let e=r;return e})();var J=async(e,r)=>{if(F(o(M)))return!0;
1try{let l=o(Q),n=o(g),t=await v(o(q).get("/api/redirect",{params:{from:r.url,locale:l.locale.full}}));if(t!=null&&t.redirectTo!=null)return n.createUrlTree([t.redirectTo===""?"/":t.redirectTo])}catch(l){B().makeChild("[errorRouteGuard]").debug(l)}return!0};var Me=[{path:"",canActivate:[J],component:K,data:{fullscreen:!0,headerState:[8,4],collapseFooterItems:!0,preventBackfill:!0,seoConfig:{pageTitle:j.fromTranslationKey("notfound_pagetitle")}},runGuardsAndResolvers:"always"}];export{Me as errorRouteRoutes};
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.