chunk-etwbtewg.js
Constructs a Blob from dataExactly one line exceeds 1000 bytes
SHA-2562f00ae9428e9f702f5378eb8d680c9f3e81ef6502227ea17031c627c8b60407d
MaleculeH(Db)Md
Evidence
1// @bun @bytecode
2import{$H,kO,$2,Fo,xce,sH}from"/$bunfs/root/chunk-sj6twx68.js";import{u,p,Oa,L,y,il}from"/$bunfs/root/chunk-041a2png.js";var nO=(r,n)=>{if(n.source.type==="bytes")return u(n.source.data);let e=n.inline();if(!e)return p(xce(r,n));return Oa(il(e.base64)).pipe(y((i)=>sH(`${r} media contains invalid base64 data`,i)))},rO=(r,n)=>{let e=new ArrayBuffer(r.byteLength);return new Uint8Array(e).set(r),new Blob([e],{type:n})},a=(r)=>typeof r==="string"||typeof r==="number"||typeof r==="boolean";var HJ=(r,n)=>r.source.type==="ref"&&r.source.provider===n?r.source.id:void 0,yU=(r,n,e,i,t)=>Oa(il(e)).pipe(y((o)=>r(`${n} contains invalid base64 data`,o)),L((o)=>kO(o,i,t))),iJ=(r,n,e,i,t)=>{if(e.b64_json)return yU(r,n,e.b64_json,i,t);if(e.url)return u($2(e.url,{...t,mediaType:i}));return p(r(`${n} has neither image data nor a URL`))},aJ=(r,n,e)=>{let i=Object.entries(e.overlay??{}).filter(([t])=>!e.reserved.has(t));Object.entries($H(n,Object.fromEntries(i))??{}).forEach(([t,o])=>{if(Array.isArray(o)&&o.every(a)&&e.repeatArrays!==void 0)return o.forEach((s)=>r.append(e.repeatArrays==="key[]"?`${t}[]`:t,String(s)));r.append(t,typeof o==="string"?o:Fo(o))})};
3export{nO,rO,HJ,yU,iJ,aJ};