https://www.diakonie-katastrophenhilfe.de/_assets/ae55d6236701f0e7…/Dist/chunks/ceIframe-BMG6l8Yy.js
1import{acceptUcService as p,getUcService as m}from"./usercentrics-Cyuobn39.js";const h=(r,i)=>{const{sandbox:o,parameter:s}=r.dataset;if(o){const n=o.split(",").map(e=>e.trim()),t=n.filter(e=>e.startsWith("allow-")),l=n.filter(e=>!e.startsWith("allow-"));if(t.length){const e=["allow-scripts","allow-same-origin"].filter(c=>!t.includes(c));if(i.setAttribute("sandbox",t.join(" ")),e.length)return"Sandbox fehlt ".concat(e.join(" und ")," â viele Embeds funktionieren ohne nicht.")}for(const e of l)i.hasAttribute(e)||i.setAttribute(e,"")}if(s&&s.trim()!=="*"){const n=i.getAttribute("src");if(n)try{const t=new URL(n);for(const l of s.split(",")){const e=l.indexOf("=");e>0&&t.searchParams.set(l.substring(0,e).trim(),l.substring(e+1).trim())}i.setAttribute("src",t.toString())}catch(t){}}},g=r=>{if(typeof r=="object"&&r!==null){if(r["datawrapper-height"]){const i=r["datawrapper-height"],o=Object.keys(i)[0];return o?i[o]:null}return r.height||r.iframeHeight||r.frameHeight||null}if(typeof r=="string"){const i=r.match(/\[iFrameSizer]\w*:(\d+)/);if(i)return parseInt(i[1])}return null},y=(r,i)=>{i&&i.abort();const o=new AbortController;return window.addEventListener("message",s=>{if(!r.contentWindow||s.source!==r.contentWindow)return;const n=g(s.data);n&&n>0&&(r.style.height="".concat(n,"px"))},{signal:o.signal}),o},w=()=>{const r=document.querySelectorAll(".ctype-ce_iframe");if(!r.length)return;const i=[...r].map(s=>{const n=s.querySelector("[data-hl]");if(!n)return null;const t=n.dataset.hl;if(!t)return null;const l=n.querySelector(".shown-iframe"),e=n.querySelector(".hidden-iframe"),c=e==null?void 0:e.querySelector("template");if(!l||!e||!c)return null;const a=s.querySelector(".accept-iframe");if(a&&a.addEventListener("click",()=>p(a.dataset.id)),s.dataset.iframeHeight==="iframe_resizer"){let f=null,u=null;new MutationObserver(()=>{const d=e.querySelector("iframe");d&&d!==f&&(f=d,u=y(d,u))}).observe(e,{childList:!0,subtree:!0})}return{shown:l,hidden:e,tpl:c,templateId:t}}).filter(Boolean),o=()=>{var s;for(const{shown:n,hidden:t,tpl:l,templateId:e}of i){const c=m(e);if(c!=null)if(c){if(!t.querySelector("iframe")){const a=l.content.cloneNode(!0),f=a.querySelector("iframe");if(!f){t.innerHTML='<p style="color:red;padding:1em;border:2px solid red;background:#fff0f0;">Kein <iframe> im Template gefunden. Möglicherweise enthält der Code ungültiges HTML (z.B. </template>).</p>',n.style.display="none",t.style.display="";continue}const u=h(l,f);t.appendChild(a),u&&t.insertAdjacentHTML("afterend",'<p style="color:#856404;padding:.5em;border:2px solid #856404;background:#fff3cd;margin-top:.5em;">'.concat(u,"</p>"))}n.style.display="none",t.style.display=""}else(s=t.querySelector("iframe"))==null||s.remove(),n.style.display="",t.style.display="none"}};o(),document.addEventListener("asuc-updated",o)};export{w as init};
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.