PageSourceSearch

https://mixtiles.com/static/js/useOneLinkUrl.CPR1NITw.chunk.js

js mixtiles.com collected 2026-09-24 09:32:02 UTC 1,347 bytes, 2 lines download raw bytes

1import{r as u}from"./vendor.DwGDxu32.chunk.js";import{l as p}from"./ApiUtils.CxIoqZF_.chunk.js";const L="https://onelinksmartscript.appsflyer.com/onelink-smart-script-latest.js";let l=null;const d=new Map;function S(){return l||(l=new Promise((c,a)=>{const e=document.createElement("script");e.src=L,e.onload=()=>c(),e.onerror=()=>{l=null,a(new Error("Failed to load AppsFlyer smart script"))},document.head.appendChild(e)})),l}function U(c,a=!0){const{oneLinkUrl:e,mediaSource:o="web",campaign:t,deepLinkValue:n}=c,i=u.useMemo(()=>JSON.stringify({oneLinkUrl:e,mediaSource:o,campaign:t,deepLinkValue:n}),[e,o,t,n]),[m,R]=u.useState(()=>d.get(i)??null);return u.useEffect(()=>{if(!a||d.has(i))return;let f=!1;return S().then(()=>{if(f)return;if(!window.AF_SMART_SCRIPT){p.warning("AF_SMART_SCRIPT not found on window");return}const r=window.AF_SMART_SCRIPT.generateOneLinkURL({oneLinkURL:e,afParameters:{mediaSource:{defaultValue:o},afCustom:[{paramKey:"af_ss_ui",defaultValue:"true"}],...t&&{campaign:{defaultValue:t}},...n&&{deepLinkValue:{defaultValue:n}}}}),s=r==null?void 0:r.clickURL;s?(d.set(i,s),R(s)):p.error("No clickURL found in result",new Error("Empty clickURL"),{result:r})}).catch(r=>{p.error("Failed to generate OneLink URL",r)}),()=>{f=!0}},[a,i,e,o,t,n]),m}export{U as u};
2//# sourceMappingURL=useOneLinkUrl.CPR1NITw.chunk.js.map

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.