PageSourceSearch

https://www.skaraborgsbygden.se/assets/rev/js/content-broker-module-2HS7GJ7C.js

js skaraborgsbygden.se collected 2026-10-02 10:24:01 UTC 1,722 bytes, 2 lines download raw bytes

1import{a as s}from"./chunk-RKBMPTEH.js";import{h as i}from"./chunk-XJLSI5BW.js";import"./chunk-ZOYOJ6FT.js";import"./chunk-6KHOHYTW.js";var o=class{constructor(e){this.element=e,this._path=this.element.getAttribute("path");let t=this.element.getAttribute("withConsentString");this._blockContainer=this.element.closest(".block"),this._blockType=this._blockContainer.dataset.presentation||"",this._blockName=this._blockContainer.dataset.name||"",this.element.style.display="none",t?i().then(n=>{let a=n.getCurrentUserStatus();this._consentString=a.consent_string||"",this._load()}).catch(n=>{console.warn("Failed to initialize Content Broker Widget due to Didomi error:",n),this._blockContainer.remove()}):this._load()}async _load(){let e=new URLSearchParams({path:window.location.pathname,blockType:this._blockType,blockName:this._blockName,consentString:this._consentString,pageViewId:s});fetch(`/api/content-broker/${this._path}?${e.toString()}`).then(t=>{if(t.status===404)this._blockContainer.remove();else if(!t.ok)throw new Error(`Bad response from Content Broker: HTTP ${t.status}`);return t.json()}).then(({html:t,isPlusAllt:n})=>{this._plusAlltBlockSettings(n),this._render(t)}).catch(t=>{console.error(t),this._blockContainer.remove()})}_render(e){let t=document.createRange().createContextualFragment(e);this._blockContainer.querySelector(".block__main").appendChild(t),this._blockContainer.classList.add("loaded")}_plusAlltBlockSettings(e){this._blockContainer.classList.add(e?"block--content-broker--plusallt":"block--content-broker--internal"),this._blockContainer.classList.add(e?"block--j2--plusallt":"block--j2--internal")}};export{o as default};
2//# sourceMappingURL=content-broker-module-2HS7GJ7C.js.map

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.