1import{a as u}from"./typeOf-30163564.js";class m{static createNode(r,t){const s=document.createElement(r);return t&&(s.id=t.id,t.classes&&s.classList.add(t.classes)),s}static removeClass(r,t){t?r.classList.remove(t):r.classList.value=""}static addClass(r,t){Array.isArray(t)?t.forEach(s=>{r.classList.add(s)}):r.classList.add(t)}static addListener(r,t,s,o){Array.isArray(t)?t.forEach(c=>{r.addEventListener(c,s,o)}):r.addEventListener(t,s,o)}}function p(n,r={}){r={strict:!1,replace:!1,append:!0,element:document.head,...r};let t="";if(n instanceof HTMLScriptElement?t=String(n.src||""):u(n)&&(t=n),t.length===0)throw new Error("Invalid scripts URL.");return new Promise((s,o)=>{var i,f;const c=r.element.getElementsByTagName("script"),a=Array.from(c).filter(e=>{var l;return String((l=e.src)!=null?l:"")===t});if(a.length){if(r.strict)throw new Error(`Script already exists (${a.length} found total).`);if(a.length>1)throw new Error(`Unexpected multiple scripts found (${a.length} total).`);const e=a[0];if(!r.replace){const l=e.getAttribute("data-loaded");if(l===null||l==="true"){s(e);return}e.addEventListener("load",()=>{s(e)});return}}for(let e=a.length-1;e>=0;e--)a[e].remove(),a.splice(e,1);const d=document.createElement("script");if(d.setAttribute("data-loaded","false"),d.onload=()=>{d.setAttribute("data-loaded","true"),s(d)},fetch(t).then(e=>{if((e==null?void 0:e.status)===200)return e.blob();throw new Error(`Unexpected fetch status (expected 200): ${e.status}.`)}).then(e=>{d.src=URL.createObjectURL(e)}).catch(e=>{o(new Error("Failed to load script data: "+e))}),r.append){const e=Array.from(c).pop();((i=e==null?void 0:e.parentNode)!=null?i:r.element).appendChild(d)}else{const e=Array.from(c).shift();((f=e==null?void 0:e.parentNode)!=null?f:r.element).insertBefore(d,e!=null?e:null)}})}export{m as D,p as a};
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.