1import{j as y}from"./index-BouzMMrT.js";import{u as b}from"./types-DeuYkvwC.js";const P="https://wsrv.nl/",N=[320,480,640,768,1024,1280,1536,1920],x=t=>{if(typeof t=="number")return!Number.isFinite(t)||t<=0?void 0:Math.round(t);const i=t.trim();if(!i)return;const r=Number.parseInt(i,10);if(!(Number.isNaN(r)||r<=0))return r},S=t=>{if(Array.isArray(t)){for(let r=t.length-1;r>=0;r-=1){const o=S(t[r]);if(o!==void 0)return o}return}if(t===void 0)return;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number")return Number.isFinite(t)?String(t):void 0;const i=t.trim();return i===""?void 0:i},g=t=>{if(t!==void 0){if(Array.isArray(t)){for(let i=t.length-1;i>=0;i-=1){const r=g(t[i]);if(r!==void 0)return r}return}if(typeof t=="number"||typeof t=="string")return x(t)}},h=(t,i,r)=>{const o=new URL(P);if(o.searchParams.set("url",t),!i)return r!==void 0&&o.searchParams.set("w",String(r)),o.toString();for(const[e,s]of Object.entries(i)){if(s===void 0||e==="w")continue;const f=S(s);f!==void 0&&o.searchParams.set(e,f)}if(r!==void 0)o.searchParams.set("w",String(r));else{const e=S(i.w);e!==void 0&&o.searchParams.set("w",e)}return o.toString()},U=({src:t,proxy:i=!0,wsrv:r,enableSrcSet:o=!1,...e})=>{const{srcSet:s,...f}=e,{DOMAIN:l}=b()??{};let p=t,d;if(typeof t=="string"){const u=/^https:\/\//.test(t),m=t.startsWith("/"),a=i&&(u||m);let n;if(a&&(u?n=t:m&&l&&(n=new URL(t,l).toString())),o&&a&&n!==void 0&&n&&(d=N.map(c=>`${h(n,r,c)} ${c}w`).join(", ")),!d&&a&&n!==void 0&&(u||m&&r)&&n){const c=g(r?.w);p=h(n,r,c)}}return y.jsx("img",{src:p,srcSet:s??d,...f})};export{U as I};
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.