PageSourceSearch

https://pro.sport.fun/static/assets/ccip-jTiAKW2T.js

js sport.fun collected 2026-09-29 14:37:04 UTC 2,902 bytes, 1 lines download raw bytes

1import{iZ as m,lX as w,le as b,kZ as R,lL as x,lY as M,lZ as $,l_ as S,l6 as A,lF as T,l$ as p,m0 as k,m1 as g,i8 as C}from"./index-BSx329UM.js";class G extends m{constructor({callbackSelector:e,cause:t,data:l,extraData:r,sender:c,urls:s}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&["  Gateway URL(s):",...s.map(o=>`    ${w(o)}`)],`  Sender: ${c}`,`  Data: ${l}`,`  Callback selector: ${e}`,`  Extra data: ${r}`].flat(),name:"OffchainLookupError"})}}class D extends m{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${b(e)}`],name:"OffchainLookupResponseMalformedError"})}}class O extends m{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}const B="0x556f1830",P={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function Z(i,{blockNumber:e,blockTag:t,data:l,requestOptions:r,to:c}){const{args:s}=R({data:l,abi:[P]}),[o,d,h,a,n]=s,{ccipRead:u}=i,y=u&&typeof u?.request=="function"?u.request:U;try{if(!x(c,o))throw new O({sender:o,to:c});const f=d.includes(M)?await $({data:h,ccipRequest:L=>y({...L,requestOptions:r})}):await y({data:h,requestOptions:r,sender:o,urls:d}),{data:E}=await S(i,{blockNumber:e,blockTag:t,data:A([a,T([{type:"bytes"},{type:"bytes"}],[f,n])]),requestOptions:r,to:c});return E}catch(f){throw r?.signal?.aborted?p(r.signal):k(f)?f:new G({callbackSelector:a,cause:f,data:l,extraData:n,sender:o,urls:d})}}async function U({data:i,requestOptions:e,sender:t,urls:l}){let r=new Error("An unknown error occurred.");for(let c=0;c<l.length;c++){if(e?.signal?.aborted)throw p(e.signal);const s=l[c],o=s.includes("{data}")?"GET":"POST",d=o==="POST"?{data:i,sender:t}:void 0,h=o==="POST"?{"Content-Type":"application/json"}:{};try{const a=await fetch(s.replace("{sender}",t.toLowerCase()).replace("{data}",i),{body:JSON.stringify(d),headers:h,method:o,...e?.signal?{signal:e.signal}:{}});let n;if(a.headers.get("Content-Type")?.startsWith("application/json")?n=(await a.json()).data:n=await a.text(),!a.ok){r=new g({body:d,details:n?.error?b(n.error):a.statusText,headers:a.headers,status:a.status,url:s});continue}if(!C(n)){r=new D({result:n,url:s});continue}return n}catch(a){if(e?.signal?.aborted)throw p(e.signal);if(k(a))throw a;r=new g({body:d,details:a.message,url:s})}}throw r}export{U as ccipRequest,Z as offchainLookup,P as offchainLookupAbiItem,B as offchainLookupSignature};

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.