PageSourceSearch

https://www.habsburg.ch/static/js/global/helper/menu/entireAjax.min.js?v=0.0.5

js habsburg.ch collected 2026-09-25 00:58:02 UTC 3,480 bytes, 1 lines download raw bytes

1(()=>{"use strict";function e(e,n,s){const{input:o,init:i}=t(e,n);fetch(o,i).then((e=>e.text())).then(s)}const t=(e,t)=>{const n={method:e.method||"POST",headers:{"Content-type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest"}};let o=e.url;if(t){const e=s(t);"POST"==n.method?n.body=e:o+="&"+e}return{input:o,init:n}},n=e=>{let t=e;var n;return"object"!=typeof(n=e)||null==n||Array.isArray(e)||(t=JSON.stringify(e)),null===t?"":t},s=e=>{const t=[];for(let s in e)e.hasOwnProperty(s)&&t.push(encodeURIComponent(s)+"="+encodeURIComponent(n(e[s])));return t.join("&")};function o(e){const t=document.createElement("div");return t.innerHTML=e,t.firstChild}(t=>{var n,s;if((s=(n=t.govis||(t.govis={})).module||(n.module={})).menu||(s.menu={}),!t.govis.module.menu.hasOwnProperty("entireAjax")){const n=(e,t)=>{e.style.display="block",e.style.position="absolute",e.style.left=t+"px"},s=(e,t)=>{e.style.left="",e.style.position="",e.style.display=t},i=(e,t,n,s)=>{if(2==s){const s=t.fromLeftToRight?'[id^="item-"][id$="-'+t.pageId+'"] .'+e.classes.controller:"."+e.classes.header,o=n.querySelector(s);o&&o.focus()}},l=(e,t,o,l,a)=>{const r=o.clientWidth,c=-1*r,d=t.fromLeftToRight;let u=0;l.style.position="absolute",n(a,d?c:r),o.appendChild(a);const p=Math.max(l.clientHeight,a.clientHeight);o.style.height=p+"px",l.classList.remove(e.classes.active),l.animate([{left:"0px"},{left:(d?r:c)+"px"}],{duration:e.animateDuration,easing:"linear",fill:"forwards"}).onfinish=()=>{s(l,"none"),l.innerHTML="",function(e){const t=window.pageYOffset,n=0-t;let s=0;const o=function(){s+=1/60;const i=(l=s/e)<.5?2*l*l:(4-2*l)*l-1;var l;window.scrollTo(0,t+n*i),s<e&&requestAnimationFrame(o)};requestAnimationFrame(o)}(e.animateDuration/1e3),t.element.style.display="none",i(e,t,a,++u)};var f=l.getBoundingClientRect().left;a.style.position="absolute",a.style.left=f+"px",a.animate([{left:(d?c:r)+"px"},{left:"0px"}],e.animateDuration).onfinish=()=>{o.style.height="",s(a,"block"),a.classList.add(e.classes.active),t.loading=!1,i(e,t,a,++u)}},a=(e,t,n)=>{const s=t.getAttribute("id").split("item-").join("");e.loading=!0,e.nodeId=s,e.fromLeftToRight=n,e.fromLeftToRight&&(e.pageId=t.dataset.pageId)},r=(e,t,n)=>{setTimeout((function(){if(t.hasOwnProperty("nodeId")){delete t.nodeId,n.classList.add(e.classes.loading);const s=n.querySelector("."+e.classes.jsIndicator);s&&s.parentNode.replaceChild(t.element,s),t.element.style.display="block"}}),e.spinnerDelay)},c=(t,s,o)=>{const i=o.querySelectorAll("."+t.classes.container),a=i[0].classList.contains(t.classes.active)?[0,1]:[1,0],r=i[a[0]],c=i[a[1]];c.innerHTML="",n(c,(s.fromLeftToRight?-1:1)*o.clientWidth),e({url:t.urls.load},{nodeId:s.nodeId},(e=>{delete s.nodeId;const n=function(e){let t={response:e,json:null,type:"json"};try{t.json=JSON.parse(e)}catch(e){t.type="text"}return t}(e),i="json"===n.type?(n.json.content||"").trim():t.translations.loading_error;c.innerHTML=i,l(t,s,o,r,c)}))};t.govis.module.menu.entireAjax={init:function(e){const t={loading:!1,element:o(e.translations.loading),fromLeftToRight:!1},n=document.querySelector("."+e.classes.block);n.addEventListener("click",(s=>{const o=(i=s.target,l=e.classes.controller,i.classList.contains(l)?i:i.closest("."+l));var i,l;let d=null;if(o&&(d=o.closest("."+e.classes.nodeItem)),d&&(s.preventDefault(),s.stopPropagation(),!t.loading)){const s=d.classList.contains(e.classes.parentNodeItem);a(t,d,s),r(e,t,o),c(e,t,n)}}))}}}})(globalThis)})();

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.