PageSourceSearch

https://climate-action.heigit.org/chunk-KANMP76K.js

js heigit.org collected 2026-10-02 03:05:24 UTC 15,797 bytes, 1 lines download raw bytes

1import{Aa as E,Bb as ae,D as X,G as ee,O as te,R as ne,U as M,V as se,X as ie,_ as F,c as W,ca as b,d as Y,da as re,dd as $,e as Z,fa as g,ga as h,h as N,ha as S,i as I,ia as v,j as R,md as P,q as y,r as Q,sb as C,ta as T,w as x,zb as oe}from"./chunk-2BXZIDPO.js";import{a as d,b as m,d as J}from"./chunk-5JJ6SBZ6.js";function ce(t){t||(t=S(T));let r=new W(e=>{if(t.destroyed){e.next();return}return t.onDestroy(e.next.bind(e))});return e=>e.pipe(se(r))}function le(t,r){let n=!r?.manualCleanup?r?.injector?.get(T)??S(T):null,s=Ae(r?.equal),i;r?.requireSync?i=E({kind:0},{equal:s}):i=E({kind:1,value:r?.initialValue},{equal:s});let o,a=t.subscribe({next:c=>i.set({kind:1,value:c}),error:c=>{i.set({kind:2,error:c}),o?.()},complete:()=>{o?.()}});if(r?.requireSync&&i().kind===0)throw new F(601,!1);return o=n?.onDestroy(a.unsubscribe.bind(a)),$(()=>{let c=i();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new F(601,!1)}},{equal:r?.equal})}function Ae(t=Object.is){return(r,e)=>r.kind===1&&e.kind===1&&t(r.value,e.value)}function ue(t){return typeof t=="function"}function L(t){return typeof t=="string"}function D(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function j(t){return t==null}function k(t){return!j(t)}function _(t){return t?Array.isArray(t)||L(t)?t.length:D(t)?Object.keys(t).length:0:0}function de(t){return _(t)===0}function V(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(r,e)=>e==0?r.toLowerCase():r.toUpperCase()).replace(/\s+|_|-|\//g,"")}var q=class{translations;constructor(r){this.translations=r}getTranslation(r){return R(this.translations.get(r)||{})}},ge=new g(""),A=new g("",{factory:()=>O}),O={defaultLang:"en",reRenderOnLangChange:!1,prodMode:!1,failedRetries:2,fallbackLang:[],availableLangs:[],missingHandler:{logMissingKey:!0,useFallbackTranslation:!1,allowEmpty:!1},flatten:{aot:!1},interpolation:["{{","}}"],scopes:{keepCasing:!1,autoPrefixKeys:!0}};function Me(t={}){return m(d(d({},O),t),{missingHandler:d(d({},O.missingHandler),t.missingHandler),flatten:d(d({},O.flatten),t.flatten),scopes:d(d({},O.scopes),t.scopes)})}function K(t,r){return t&&(Object.prototype.hasOwnProperty.call(t,r)?t[r]:r.split(".").reduce((e,n)=>e?.[n],t))}function Ce(t,r,e){t=d({},t);let n=r.split("."),s=n.length-1;return n.reduce((i,o,a)=>(a===s?i[o]=e:i[o]=Array.isArray(i[o])?i[o].slice():d({},i[o]),i&&i[o]),t),t}function De(t){return`[transloco]:${t}`}var he=new g(""),we=(()=>{class t{config=S(A,{optional:!0})??O;get interpolationMatcher(){return Re(this.config)}transpile({value:e,params:n={},translation:s,key:i}){if(L(e)){let o,a=e;for(;(o=this.interpolationMatcher.exec(a))!==null;){let[c,l]=o;a=a.replace(c,()=>{let u=l.trim(),f=K(n,u);return k(f)?f:k(s[u])?this.transpile({params:n,translation:s,key:i,value:s[u]}):""})}return a}else n&&(D(e)?e=this.handleObject({value:e,params:n,translation:s,key:i}):Array.isArray(e)&&(e=this.handleArray({value:e,params:n,translation:s,key:i})));return e}handleObject({value:e,params:n={},translation:s,key:i}){let o=e;return Object.keys(n).forEach(a=>{let c=this.transpile({value:K(o,a),params:K(n,a),translation:s,key:i});o=Ce(o,a,c)}),o}handleArray(s){var i=s,{value:e}=i,n=J(i,["value"]);return e.map(o=>this.transpile(d({value:o},n)))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function Re(t){let[r,e]=t.interpolation;return new RegExp(`${r}([^${r}${e}]*?)${e}`,"g")}var pe=new g(""),je=(()=>{class t{handle(e,n){return e}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),ve=new g(""),Ne=(()=>{class t{preSaveTranslation(e){return e}preSaveTranslationKey(e,n){return n}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),Le=new g(""),Ie=(()=>{class t{userConfig;constructor(e){this.userConfig=e}getNextLangs(){let e=this.userConfig.fallbackLang;if(!e){let n;throw n=De(4),new Error(n)}return Array.isArray(e)?e:[e]}static \u0275fac=function(n){return new(n||t)(h(A))};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function me(t){let{path:r,inlineLoader:e,mainLoader:n,data:s}=t;if(e){let i=e[r];if(ue(i)===!1)throw`You're using an inline loader but didn't provide a loader for ${r}`;return e[r]().then(o=>o.default?o.default:o)}return n.getTranslation(r,s)}function xe({mainLoader:t,path:r,data:e,fallbackPath:n,inlineLoader:s}){return(n?[r,n]:[r]).map(o=>{let a=me({path:o,mainLoader:t,inlineLoader:s,data:e});return I(a).pipe(y(c=>({translation:c,lang:o})))})}function fe(t){let r={};
1function e(n,s){if(n===null)r[s]=null;else if(D(n))for(let[i,o]of Object.entries(n))e(o,s?`${s}.${i}`:i);else r[s]=n}return e(t,""),r}function Fe(t){let r={};for(let[e,n]of Object.entries(t)){let s=e.split("."),i=r;s.forEach((o,a)=>{a===s.length-1?i[o]=n:(i[o]??={},i=i[o])})}return r}function w(t){if(!t)return"";let r=t.split("/");return r.pop(),r.join("/")}function p(t){return t?t.split("/").pop():""}function Ee(t,r){return Object.keys(t).reduce((e,n)=>(e[`${r}/${n}`]=t[n],e),{})}function ye(t){return typeof t?.scope=="string"}function $e(t){return t?.loader&&D(t.loader)}function be(t,r){return $e(t)?Ee(t.loader,r):void 0}function H(t){return{scope:w(t)||null,langName:p(t)}}var Pe;var B=class t extends Error{lang;fallbackLangs;isScope;name="TranslationLoadError";constructor(r,e,n){super(""),this.lang=r,this.fallbackLangs=e,this.isScope=n,Object.setPrototypeOf(this,t.prototype)}},ke=(()=>{class t{loader;parser;missingHandler;interceptor;fallbackStrategy;langChanges$;translations=new Map;cache=new Map;firstFallbackLang;defaultLang="";availableLangs=[];isResolvedMissingOnce=!1;lang;failedLangs=new Set;events=new Y;events$=this.events.asObservable();config;activeLang;destroyRef=S(T);destroyed=!1;constructor(e,n,s,i,o,a){this.loader=e,this.parser=n,this.missingHandler=s,this.interceptor=i,this.fallbackStrategy=a,this.loader||(this.loader=new q(this.translations)),Pe=this,this.config=JSON.parse(JSON.stringify(o)),this.setAvailableLangs(this.config.availableLangs||[]),this.setFallbackLangForMissingTranslation(this.config),this.setDefaultLang(this.config.defaultLang),this.lang=new Z(this.getDefaultLang()),this.langChanges$=this.lang.asObservable(),this.activeLang=le(this.lang,{requireSync:!0}),this.events$.subscribe(c=>{c.type==="translationLoadSuccess"&&c.wasFailure&&this.setActiveLang(c.payload.langName)}),this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.lang.complete(),this.events.complete(),this.cache.clear()})}getDefaultLang(){return this.defaultLang}setDefaultLang(e){this.defaultLang=e}getActiveLang(){return this.lang.getValue()}setActiveLang(e){return this.parser.onLangChanged?.(e),this.lang.next(e),this.events.next({type:"langChanged",payload:H(e)}),this}setAvailableLangs(e){this.availableLangs=e}getAvailableLangs(){return this.availableLangs}load(e,n={}){if(this.destroyed)return N;let s=this.cache.get(e);if(s)return s;let i,o=this._isLangScoped(e),a;o&&(a=w(e));let c={path:e,mainLoader:this.loader,inlineLoader:n.inlineLoader,data:o?{scope:a}:void 0};if(this.useFallbackTranslation(e)){let u=o?`${a}/${this.firstFallbackLang}`:this.firstFallbackLang,f=xe(m(d({},c),{fallbackPath:u}));i=x(f)}else{let u=me(c);i=I(u)}let l=i.pipe(te(this.config.failedRetries),ie(u=>{if(Array.isArray(u)){u.forEach(f=>{this.handleSuccess(f.lang,f.translation),f.lang!==e&&this.cache.set(f.lang,R({}))});return}this.handleSuccess(e,u)}),X(u=>this.handleFailure(e,n)),ne(1),ce(this.destroyRef));return this.cache.set(e,l),l}translate(e,n={},s=this.getActiveLang()){if(!e)return e;let{scope:i,resolveLang:o}=this.resolveLangAndScope(s);if(Array.isArray(e))return e.map(l=>this.translate(this.config.scopes.autoPrefixKeys&&i?`${i}.${l}`:l,n,o));e=this.config.scopes.autoPrefixKeys&&i?`${i}.${e}`:e;let a=this.getTranslation(o),c=a[e];return c?this.parser.transpile({value:c,params:n,translation:a,key:e}):this._handleMissingKey(e,c,n)}selectTranslate(e,n,s,i=!1){let o,a=(l,u)=>this.load(l,u).pipe(y(()=>i?this.translateObject(e,n,l):this.translate(e,n,l)));if(j(s))return this.langChanges$.pipe(M(l=>a(l)));if(s=Array.isArray(s)?s[s.length-1]:s,ye(s)){let l=s;s=l.scope,o=be(l,l.scope)}if(s=s,this.isLang(s)||this.isScopeWithLang(s))return a(s);let c=s;return this.langChanges$.pipe(M(l=>a(`${c}/${l}`,{inlineLoader:o})))}isScopeWithLang(e){return this.isLang(p(e))}translateObject(e,n={},s=this.getActiveLang()){if(L(e)||Array.isArray(e)){let{resolveLang:o,scope:a}=this.resolveLangAndScope(s);if(Array.isArray(e))return e.map(u=>this.translateObject(this.config.scopes.autoPrefixKeys&&a?`${a}.${u}`:u,n,o));let c=this.getTranslation(o);e=this.config.scopes.autoPrefixKeys&&a?`${a}.${e}`:e;let l=Fe(this.getObjectByKey(c,e));return de(l)?this.translate(e,n,s):this.parser.transpile({value:l,params:n,translation:c,key:e})}let i=[];
1for(let[o,a]of this.getEntries(e))i.push(this.translateObject(o,a,s));return i}selectTranslateObject(e,n,s){if(L(e)||Array.isArray(e))return this.selectTranslate(e,n,s,!0);let[[i,o],...a]=this.getEntries(e);return this.selectTranslateObject(i,o,s).pipe(y(c=>{let l=[c];for(let[u,f]of a)l.push(this.translateObject(u,f,s));return l}))}getTranslation(e){if(e){if(this.isLang(e))return this.translations.get(e)||{};{let{scope:n,resolveLang:s}=this.resolveLangAndScope(e),i=this.translations.get(s)||{};return this.getObjectByKey(i,n)}}return this.translations}selectTranslation(e){let n=this.langChanges$;if(e){let s=p(e)!==e;this.isLang(e)||s?n=R(e):n=this.langChanges$.pipe(y(i=>`${e}/${i}`))}return n.pipe(M(s=>this.load(s).pipe(y(()=>this.getTranslation(s)))))}setTranslation(e,n=this.getActiveLang(),s={}){let o=d(d({},{merge:!0,emitChange:!0}),s),a=w(n),c=e;if(a){let Te=this.getMappedScope(a);c=fe({[Te]:e})}let l=a?p(n):n,u=d(d({},o.merge&&this.getTranslation(l)),c),f=this.config.flatten.aot?u:fe(u),Se=this.interceptor.preSaveTranslation(f,l);this.translations.set(l,Se),o.emitChange&&this.setActiveLang(this.getActiveLang())}setTranslationKey(e,n,s={}){let i=s.lang||this.getActiveLang(),o=this.interceptor.preSaveTranslationKey(e,n,i),a={[e]:o};this.setTranslation(a,i,m(d({},s),{merge:!0}))}setFallbackLangForMissingTranslation({fallbackLang:e}){let n=Array.isArray(e)?e[0]:e;e&&this.useFallbackTranslation(n)&&(this.firstFallbackLang=n)}_handleMissingKey(e,n,s){if(this.config.missingHandler.allowEmpty&&n==="")return"";if(!this.isResolvedMissingOnce&&this.useFallbackTranslation()){this.isResolvedMissingOnce=!0;let i=this.translate(e,s,this.firstFallbackLang);return this.isResolvedMissingOnce=!1,i}return this.missingHandler.handle(e,this.getMissingHandlerData(),s)}_isLangScoped(e){return this.getAvailableLangsIds().indexOf(e)===-1}isLang(e){return this.getAvailableLangsIds().indexOf(e)!==-1}_loadDependencies(e,n){let s=p(e);return this._isLangScoped(e)&&!this.isLoadedTranslation(s)?Q([this.load(s),this.load(e,{inlineLoader:n})]):this.load(e,{inlineLoader:n})}_completeScopeWithLang(e){return this._isLangScoped(e)&&!this.isLang(p(e))?`${e}/${this.getActiveLang()}`:e}_setScopeAlias(e,n){this.config.scopeMapping||(this.config.scopeMapping={}),this.config.scopeMapping[e]=n}isLoadedTranslation(e){return _(this.getTranslation(e))}getAvailableLangsIds(){let e=this.getAvailableLangs()[0];return L(e)?this.getAvailableLangs():this.getAvailableLangs().map(n=>n.id)}getMissingHandlerData(){return m(d({},this.config),{activeLang:this.getActiveLang(),availableLangs:this.availableLangs,defaultLang:this.defaultLang})}useFallbackTranslation(e){return this.config.missingHandler.useFallbackTranslation&&e!==this.firstFallbackLang}handleSuccess(e,n){this.setTranslation(n,e,{emitChange:!1}),this.events.next({wasFailure:!!this.failedLangs.size,type:"translationLoadSuccess",payload:H(e)}),this.failedLangs.forEach(s=>this.cache.delete(s)),this.failedLangs.clear()}handleFailure(e,n){j(n.failedCounter)&&(n.failedCounter=0,n.fallbackLangs||(n.fallbackLangs=this.fallbackStrategy.getNextLangs(e)));let s=e.split("/"),i=n.fallbackLangs,o=i[n.failedCounter];if(this.failedLangs.add(e),this.cache.has(o))return this.handleSuccess(o,this.getTranslation(o)),N;let a=o===s[s.length-1];if(!o||a)throw new B(e,i??[],s.length>1);let c=o;return s.length>1&&(s[s.length-1]=o,c=s.join("/")),n.failedCounter++,this.events.next({type:"translationLoadFailure",payload:H(e)}),this.load(c,n)}getMappedScope(e){let{scopeMapping:n={},scopes:s={keepCasing:!1}}=this.config;return n[e]||(s.keepCasing?e:V(e))}resolveLangAndScope(e){let n=e,s;if(this._isLangScoped(e)){let i=p(e),o=this.isLang(i);n=o?i:this.getActiveLang(),s=this.getMappedScope(o?w(e):e)}return{scope:s,resolveLang:n}}getObjectByKey(e,n){let s={},i=`${n}.`;for(let o in e)o.startsWith(i)&&(s[o.replace(i,"")]=e[o]);return s}getEntries(e){return e instanceof Map?e.entries():Object.entries(e)}static \u0275fac=function(n){return new(n||t)(h(ge,8),h(he),h(pe),h(ve),h(A),h(Le))};static \u0275prov=b({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var _e=new g("");var Ve=new g("");function G(t,r,e="|"){if(L(t)){let n=t.split(e),s=n.pop();return s===r?[!0,n.toString()]:[!1,s]}return[!1,""]}
1function Ke(t,r){let[e]=G(r,"static");return e?!1:!!t.config.reRenderOnLangChange}function He(t){return t?r=>r:ee(1)}var z=class{initialized=!1;resolve({inline:r,provider:e,active:n}){let s=n;if(this.initialized)return s=n,s;if(e){let[,i]=G(e,"static");s=i}if(r){let[,i]=G(r,"static");s=i}return this.initialized=!0,s}resolveLangBasedOnScope(r){return w(r)?p(r):r}resolveLangPath(r,e){return e?`${e}/${r}`:r}},U=class{service;constructor(r){this.service=r}resolve(r){let{inline:e,provider:n}=r;if(e)return e;if(n){if(ye(n)){let{scope:s,alias:i=this.service.config.scopes.keepCasing?s:V(s)}=n;return this.service._setScopeAlias(s,i),s}return n}}};var Vt=(()=>{class t{service;providerScope;providerLang;cdr;subscription=null;lastValue="";lastKey;path;langResolver=new z;scopeResolver;constructor(e,n,s,i){this.service=e,this.providerScope=n,this.providerLang=s,this.cdr=i,this.scopeResolver=new U(this.service)}transform(e,n,s){if(!e)return e;let i=n?`${e}${JSON.stringify(n)}`:e;if(i===this.lastKey)return this.lastValue;this.lastKey=i,this.subscription?.unsubscribe();let o=Ke(this.service,this.providerLang||s);return this.subscription=this.service.langChanges$.pipe(M(a=>{let c=this.langResolver.resolve({inline:s,provider:this.providerLang,active:a});return Array.isArray(this.providerScope)?x(this.providerScope.map(l=>this.resolveScope(c,l))):this.resolveScope(c,this.providerScope)}),He(o)).subscribe(()=>this.updateValue(e,n)),this.lastValue}ngOnDestroy(){this.subscription?.unsubscribe(),this.subscription=null}updateValue(e,n){let s=this.langResolver.resolveLangBasedOnScope(this.path);this.lastValue=this.service.translate(e,n,s),this.cdr.markForCheck()}resolveScope(e,n){let s=this.scopeResolver.resolve({inline:void 0,provider:n});this.path=this.langResolver.resolveLangPath(e,s);let i=be(n,s);return this.service._loadDependencies(this.path,i)}static \u0275fac=function(n){return new(n||t)(C(ke,16),C(Ve,24),C(_e,24),C(P,16))};static \u0275pipe=ae({name:"transloco",type:t,pure:!1})}return t})();var Kt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=oe({type:t});static \u0275inj=re({})}return t})();function Ht(t){let r=[Ge(we),Ue(je),Je(Ne),ze(Ie)];return t.config&&r.push(qe(t.config)),t.loader&&r.push(Be(t.loader)),r}function qe(t){return v([{provide:A,useValue:Me(t)}])}function Be(t){return v([{provide:ge,useClass:t}])}function Ge(t){return v([{provide:he,useClass:t,deps:[A]}])}function ze(t){return v([{provide:Le,useClass:t,deps:[A]}])}function Ue(t){return v([{provide:pe,useClass:t}])}function Je(t){return v([{provide:ve,useClass:t}])}export{ce as a,le as b,D as c,K as d,Ce as e,he as f,we as g,ke as h,Vt as i,Kt as j,Ht as k};

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.