PageSourceSearch

https://www.ruedersdorf.de/:res/modules/common/common/ionas/core/web-components/api.system.js?fp=7fcfff52e06c

js ruedersdorf.de collected 2026-10-01 13:00:26 UTC 12,709 bytes, 443 lines download raw bytes

1System.register([],(function(exports){
2'use strict';
3return{
4execute:(function(){
5exports({
6debounced:debounced,
7delayedAsync:delayedAsync,
8delayedAsyncRestart:delayedAsyncRestart,
9determineCaptchaIsNecessary:determineCaptchaIsNecessary,
10eventually:eventually,
11findElement:findElement,
12forgotPassword:forgotPassword,
13getBackendBaseUrl:getBackendBaseUrl,
14getBaseUrl:getBaseUrl,
15getCoreCookieInfo:getCoreCookieInfo,
16getCsrfHeaders:getCsrfHeaders,
17getCsrfToken:getCsrfToken,
18isBadCaptchaResponseError:isBadCaptchaResponseError,
19isBadCredentialsError:isBadCredentialsError,
20isCommunicationError:isCommunicationError,
21isCookieConsentInfoUnavailableError:isCookieConsentInfoUnavailableError,
22isLacksCookieSupportError:isLacksCookieSupportError,
23isPasswordExpiredResponseError:isPasswordExpiredResponseError,
24loadCurrentSessionInfo:loadCurrentSessionInfo,
25loadLoginOptions:loadLoginOptions,
26login:login,
27logout:logout,
28logoutCurrentWindow:logoutCurrentWindow,
29ngAppInvoke:ngAppInvoke,
30once:once,
31whenReadyState:whenReadyState
32});
33const COMMUNICATION_ERROR_MESSAGE=exports('COMMUNICATION_ERROR_MESSAGE',"Communication with server failed");
34const COMMUNICATION_ERROR_CODE=exports('COMMUNICATION_ERROR_CODE',"communication_error");
35const COOKIES_NOT_SUPPORT_MESSAGE=exports('COOKIES_NOT_SUPPORT_MESSAGE',"Cookies must be permitted");
36const COOKIES_NOT_SUPPORT_CODE=exports('COOKIES_NOT_SUPPORT_CODE',"cookies_not_supported");
37const BAD_CAPTCHA_RESPONSE_MESSAGE=exports('BAD_CAPTCHA_RESPONSE_MESSAGE',"Bad captcha response");
38const BAD_CAPTCHA_RESPONSE_CODE=exports('BAD_CAPTCHA_RESPONSE_CODE',"bad_captcha_response");
39const PASSWORD_EXPIRED_RESPONSE_MESSAGE=exports('PASSWORD_EXPIRED_RESPONSE_MESSAGE',"Password expired response");
40const PASSWORD_EXPIRED_RESPONSE_CODE=exports('PASSWORD_EXPIRED_RESPONSE_CODE',"password_expired_response");
41const VERIFICATION_CODE_NEEDED_RESPONSE_CODE=exports('VERIFICATION_CODE_NEEDED_RESPONSE_CODE',"verification_code_needed");
42const BAD_CREDENTIALS_MESSAGE=exports('BAD_CREDENTIALS_MESSAGE',"Bad credentials");
43const BAD_CREDENTIALS_CODE=exports('BAD_CREDENTIALS_CODE',"bad_credentials");
44const COOKIE_CONSENT_INFO_UNAVAILABLE_MESSAGE=exports('COOKIE_CONSENT_INFO_UNAVAILABLE_MESSAGE',"Cookie consent information unavailable");
45const COOKIE_CONSENT_INFO_UNAVAILABLE_CODE=exports('COOKIE_CONSENT_INFO_UNAVAILABLE_CODE',"cookies_consent_information_unavailable");
46const CUSTOM_ERROR_CODE=exports('CUSTOM_ERROR_CODE',"custom_error");
47class XhrError extends Error{
48statusText;
49status;
50constructor(message,statusText,status){
51super(message);
52this.statusText=statusText;
53this.status=status;
54}
55}exports('XhrError',XhrError);
56class SessionError extends Error{
57code;
58constructor(message,code){
59super(message);
60this.code=code;
61}
62}exports('SessionError',SessionError);
63function isCommunicationError(error){
64return error
65&&(error instanceof SessionError||("code"in error))
66&&COMMUNICATION_ERROR_CODE===error.code;
67}
68function isLacksCookieSupportError(error){
69return error
70&&(error instanceof SessionError||("code"in error))
71&&COOKIES_NOT_SUPPORT_CODE===error.code;
72}
73function isBadCaptchaResponseError(error){
74return error
75&&(error instanceof SessionError||("code"in error))
76&&BAD_CAPTCHA_RESPONSE_CODE===error.code;
77}
78function isPasswordExpiredResponseError(error){
79return error
80&&(error instanceof SessionError||("code"in error))
81&&PASSWORD_EXPIRED_RESPONSE_CODE===error.code;
82}
83function isBadCredentialsError(error){
84return error
85&&(error instanceof SessionError||("code"in error))
86&&BAD_CREDENTIALS_CODE===error.code;
87}
88function isCookieConsentInfoUnavailableError(error){
89return error
90&&(error instanceof SessionError||("code"in error))
91&&COOKIE_CONSENT_INFO_UNAVAILABLE_CODE===error.code;
92}
93let ionasInfoElement=document.getElementById('ionasInfo');
94var ionasInfo=exports('ionasInfo',ionasInfoElement?JSON.parse(ionasInfoElement.innerText):undefined);
95function getBaseUrl(){
96if(ionasInfo?.context){
97return ionasInfo.context;
98}
99const ionas4=window.ionas4;
100if(ionas4?.contextPath){
101return"";
102}
103if(document.head.dataset.contextPath!==undefined){
104return document.head.dataset.contextPath;
105}
106const baseLink=document.head.querySelector("link[rel='base']");
107if(baseLink&&baseLink.href){
108return baseLink.href;
109}
110return"";
111}
112function getBackendBaseUrl(){
113if(ionasInfo?.backend){
114return ionasInfo.backend;
115}
116const baseLink=document.head.querySelector("link[rel='base']");
117if(baseLink&&baseLink.href){
118return baseLink.href;
119}
120return"";
121}
122let coreCookieInfo=null;
123async function requestCoreCookieInfo(){
124let response=await fetch(getBaseUrl()+'/:ionasinfo/coreCookieConsent',{headers:{'Accept':'application/json'}});
125if(response.ok){
126return response.json();
127}
128throw new SessionError(COOKIE_CONSENT_INFO_UNAVAILABLE_MESSAGE,COOKIE_CONSENT_INFO_UNAVAILABLE_CODE);
129}
130function getCoreCookieInfo(){
131return coreCookieInfo=(coreCookieInfo||requestCoreCookieInfo());
132}
133window.addEventListener('cookie-consent-issued',()=>{
134window.IONAS_CSRF_TOKEN=undefined;
135window.IONAS_CSRF_TOKEN_PERMITTED_COOKIES=undefined;
136});
137async function requestCsrfToken(permitCookies){
138let url=new URL(getBaseUrl()+'/:ionasinfo/csrfToken',location.href);
139if(permitCookies){
140let coreCookieInfo=await getCoreCookieInfo();
141url.searchParams.append(coreCookieInfo.cookieName,coreCookieInfo.cookieValue);
142}
143let response=await fetch(url.href,{headers:{'Accept':'application/json'}});
144if(response.ok){
145return response.json();
146}
147throw new Error("Cannot fetch CSRF token. "+response.statusText);
148}
149function getCsrfToken(permitCookies){
150if(permitCookies){
151window.IONAS_CSRF_TOKEN_PERMITTED_COOKIES??=requestCsrfToken(permitCookies).finally(()=>{
152window.IONAS_CSRF_TOKEN_PERMITTED_COOKIES=undefined;
153});
154return window.IONAS_CSRF_TOKEN_PERMITTED_COOKIES;
155}
156else{
157window.IONAS_CSRF_TOKEN??=requestCsrfToken(permitCookies).finally(()=>{
158window.IONAS_CSRF_TOKEN=undefined;
159});
160return window.IONAS_CSRF_TOKEN;
161}
162}
163async function getCsrfHeaders(permitCookies){
164let csrfToken=await getCsrfToken(permitCookies);
165const csrfHeaders=new Headers();
166csrfHeaders.append(csrfToken.headerName,csrfToken.token);
167return csrfHeaders;
168}
169async function loadLoginOptions(targetUri){
170const url=getBaseUrl()+'/:users/login/options?targetUri='+encodeURIComponent(targetUri||"");
171return fetch(url,{headers:{'Accept':'application/json'}})
172.then(response=>{
173if(response.ok){
174return response.json();
175}
176else{
177throw new SessionError(`${response.status} ${response.statusText}`,COMMUNICATION_ERROR_CODE);
178}
179});
180}
181async function determineCaptchaIsNecessary(){
182return fetch(getBaseUrl()+'/:users/login/displayCaptcha',{headers:{'Accept':'application/json'}})
183.then(response=>{
184if(response.ok){
185return response.json();
186}
187else{
188throw new SessionError(`${response.status} ${response.statusText}`,COMMUNICATION_ERROR_CODE);
189}
190})
191.then(answer=>{
192return{
193type:answer.type,
194display:answer.display,
195until:answer.until?new Date(answer.until):null
196};
197});
198}
199async function login(username,password,optionsOrCaptcha){
200document.cookie="menu-slide-in=false; path=/";
201if(!(";"+document.cookie+";").match(/;\s*menu-slide-in=false;/)){
202return Promise.reject(new SessionError(COOKIES_NOT_SUPPORT_MESSAGE,COOKIES_NOT_SUPPORT_CODE));
203}
204const data=new FormData();
205data.append("login",username);
206data.append("password",password);
207data.append("dologin","true");
208let contextPath=getBaseUrl().match(/^(?:https?:\/\/[^\/]+)?(\/[^\/]+)$/)?.[1];
209data.append("deviceId",localStorage.getItem("ionas-device-id"+contextPath)||localStorage.getItem("ionas-device-id")||"");
210return getCoreCookieInfo().then(cookieInfo=>{
211let captcha;
212let verificationCode;
213if(typeof optionsOrCaptcha==="string"){
214captcha=optionsOrCaptcha;
215}
216else if(optionsOrCaptcha!==undefined){
217captcha=optionsOrCaptcha.captcha;
218verificationCode=optionsOrCaptcha.verificationCode;
219}
220data.append(cookieInfo.cookieName,cookieInfo.cookieValue);
221if(captcha){
222data.append("g-recaptcha-response",captcha);
223}
224if(verificationCode){
225data.append("verificationCode",verificationCode);
226}
227return getCsrfHeaders(true)
228.then(csrfHeaders=>{
229let headers=new Headers(csrfHeaders);
230headers.set("Accept","application/json");
231return fetch(getBaseUrl()+'/:users/login/checkSession',{
232method:'POST',
233body:data,
234headers:headers
235});
236})
237.then(response=>{
238if(response.ok){
239return response.json();
240}
241else{
242throw new SessionError(`${response.status} ${response.statusText}`,COMMUNICATION_ERROR_CODE);
243}
244})
245.then(answer=>{
246if(answer.__errorNo&&answer.__errorNo===42){
247throw new SessionError(BAD_CAPTCHA_RESPONSE_MESSAGE,BAD_CAPTCHA_RESPONSE_CODE);
248}
249else if(answer.__errorNo&&answer.__errorNo===46){
250throw new SessionError(PASSWORD_EXPIRED_RESPONSE_MESSAGE,PASSWORD_EXPIRED_RESPONSE_CODE);
251}
252else if(answer.__errorNo&&answer.__errorNo===47){
253throw new SessionError(answer.__error,VERIFICATION_CODE_NEEDED_RESPONSE_CODE);
254}
255else if(answer.__error){
256throw new SessionError(answer.__error,CUSTOM_ERROR_CODE);
257}
258else if(answer!==false){
259let result=answer;
260if(result.deviceId!=null){
261localStorage.setItem("ionas-device-id"+contextPath,result.deviceId);
262}
263return result;
264}
265else{
266throw new SessionError(BAD_CREDENTIALS_MESSAGE,BAD_CREDENTIALS_CODE);
267}
268});
269});
270}
271async function loadCurrentSessionInfo(){
272return fetch(getBaseUrl()+'/:users/login/sessionInfo',{headers:{'Accept':'application/json'}})
273.then(response=>{
274if(response.ok){
275return response.json();
276}
277else{
278throw new SessionError(`${response.status} ${response.statusText}`,COMMUNICATION_ERROR_CODE);
279}
280});
281}
282function getLogoutUrl(){
283return ionasInfo?.logoutRoot||getBaseUrl()+'/:logout';
284}
285async function logout(){
286return logoutCurrentWindow('/');
287}
288async function logoutCurrentWindow(logoutSuccessPath){
289let csrfHeaders=await getCsrfHeaders();
290let headers=new Headers(csrfHeaders);
291headers.set("Accept","application/json");
292return fetch(getLogoutUrl()+(logoutSuccessPath||"/"),{
293method:'POST',
294headers:headers
295});
296}
297async function forgotPassword(email){
298return getCsrfHeaders()
299.then(csrfHeaders=>{
300let headers=new Headers(csrfHeaders);
301headers.set("Accept","application/json");
302const data=new FormData();
303data.append("email",email);
304return fetch(getBaseUrl()+'/:users/login/forgotPassword',{
305method:'POST',
306body:data,
307headers:headers
308});
309})
310.then(response=>{
311if(response.ok){
312return response.json();
313}
314else{
315throw new SessionError(`${response.status} ${response.statusText}`,COMMUNICATION_ERROR_CODE);
316}
317})
318.then(response=>{
319return response;
320});
321}
322function eventually(func,timeout,immediate){
323let timeoutHandle=undefined;
324if(immediate){
325return function(...args){
326if(!timeoutHandle){
327func.apply(this,args);
328timeoutHandle=setTimeout(function(){
329timeoutHandle=undefined;
330},timeout||0);
331}
332};
333}
334else{
335return function(...args){
336if(timeoutHandle){
337clearTimeout(timeoutHandle);
338}
339timeoutHandle=setTimeout((function(){
340timeoutHandle=undefined;
341func.apply(this,args);
342}).bind(this),timeout||0);
343};
344}
345}
346function once(func){
347let called=false;
348return function(...args){
349if(!called){
350called=true;
351return func.apply(this,args);
352}
353};
354}
355function debounced(func,immediate){
356return eventually(func,300,immediate);
357}
358function delayedAsync(func,delay,restartDelay){
359let active=false;
360let retrigger=false;
361let timeout=null;
362let timeoutTime=0;
363let finish=function(){
364active=false;
365if(retrigger){
366retrigger=false;
367executeNow();
368}
369};
370let executeNow=function(){
371active=true;
372try{
373func().catch(function(error){throw error;});
374}
375finally{
376finish();
377}
378};
379let trigger=function(){
380timeout=null;
381if(active){
382retrigger=true;
383}
384else{
385executeNow();
386}
387};
388return function(customDelay){
389let actualDelay=customDelay!=null?customDelay:delay;
390let newTimeoutTime=Date.now()+actualDelay;
391if(timeout!=null){
392if(restartDelay||actualDelay<0||newTimeoutTime<timeoutTime){
393clearTimeout(timeout);
394timeout=null;
395}
396else{
397return;
398}
399}
400if(actualDelay<0){
401trigger();
402}
403else{
404timeout=setTimeout(trigger,actualDelay);
405timeoutTime=newTimeoutTime;
406}
407};
408}
409function delayedAsyncRestart(func,delay){
410return delayedAsync(func,delay,true);
411}
412function findElement(elementList,predicate,thisArg){
413if(elementList){
414for(let i=0,n=elementList.length;i<n;i++){
415if(predicate.call(thisArg,elementList[i],i,elementList)){
416return elementList[i];
417}
418}
419}
420return null;
421}
422async function whenReadyState(state,document){
423return new Promise(function(resolve){
424let effectiveState=state||'complete';
425let effectiveDocument=document||window.document;
426function onReadyStateChange(){
427if(effectiveDocument.readyState===effectiveState){
428resolve(effectiveDocument);
429effectiveDocument.removeEventListener('readystatechange',onReadyStateChange);
430}
431}
432effectiveDocument.addEventListener('readystatechange',onReadyStateChange);
433onReadyStateChange();
434});
435}
436function ngAppInvoke(){
437let $rootElement=jQuery('[ng-app]');
438let $injector=$rootElement.injector();
439return $injector.invoke.apply($injector,arguments);
440}
441})
442};
443}));

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.