PageSourceSearch

https://www.lovetoknow.com/_sites/be94ff46ee6a79aa249cfbf2f90d6c369f1abae4/_nuxt/Cj9xSIPp.js

js lovetoknow.com collected 2026-09-24 08:41:41 UTC 3,057 bytes, 1 lines download raw bytes

1import{d as U,al as V,aa as M,af as z,D as P,C as K,aN as O,N as q,P as F,ab as j,aq as G,B as E,aL as L,k as u,b as f,e as _,j as r,E as v,ac as H,h as S,ad as W,q as i,c as Z,aO as $,u as J,aP as Q,V as X,aM as Y,an as h,at as ee,a6 as te,a7 as ae,_ as se}from"./C8_Tehsm.js";import{_ as oe}from"./-SK0KeQB.js";import"./B7Dqdayt.js";const re={key:0,class:"prompt"},ne={class:"dialog"},ce={class:"actions"},ie=["href"],ue={key:1,class:"direct-page"},le={key:0,class:"creative-container"},de="comm-creative",me="Commerce",pe="Commerce",fe=U({__name:"[type]-[id]",async setup(_e){let l,y;V().setTheme(M.COMMERCE);const g=z();h(ee,i(pe)),h(te,i(de)),h(ae,i(me));const d=g.params.id;if(g.params.type!=="creative"||!d||typeof d!="string")throw console.error("[Direct] Invalid type or id"),P({message:"bad params",statusCode:404});const{data:{value:a}}=([l,y]=K(async()=>J(`creative-${d}`,async()=>{try{return await Q.fetchCreative(d)}catch(n){return console.error("[Direct] Error loading creative",n),null}})),l=await l,y(),l);if(!a)throw P({message:"no creative",statusCode:404});const b=a.product?.offers?.[0]?.variant||a.product?.offers?.[0]?.linkAsin,C=a.product?.offers?.[0]?.url,x=a.product?.offers?.[0]?.seller,R=a.product?.offers?.[0]?.id;O("commerce:cohort:asin",()=>b);const{publish:I}=q(F.AMAZON_LINK_CLICKED),m=i(!1),e=i(),N=Z(()=>m.value&&e.value),k=i(!1),A=()=>{e.value&&(L(new URL(e.value))&&I({href:e.value.href}),X({creative:{click:{count:1,url:e.value?.href||""},product:{id:R||C,seller:x,variant:b||C},source:"direct"}}))},T=async()=>{if(!e.value)return;const{searchParams:n}=E(),t=Y()?.dataLayer();if(t&&Array.isArray(t)){const s=()=>t.some(o=>o.event==="gtm.dom");for(let o=0;o<15&&!s();o++)await new Promise(D=>setTimeout(D,1e3))}if(n.has("fbclid"))for(let s=0;s<15&&!$("_fbc");s++)await new Promise(o=>setTimeout(o,1e3));if(A(),/android/i.test(navigator.userAgent)){const s=e.value.href;setTimeout(()=>location.href=s,500),e.value=new URL(e.value.href.replace(/^https?/i,"intent")+"#Intent;scheme=https;end")}location.href=e.value.href},p=()=>{m.value=!1,k.value=!0},B=()=>{A(),p()},w=j();return G().hook("page:finish",async()=>{await w.initClient();const{searchParams:n}=E(),c=n.get("r");if(c){const t=new URL(c);L(t)&&t.searchParams.set("tag",w.commerce.amazonTag.main),e.value=t,/iphone|ipad|ios/i.test(navigator.userAgent)&&/\bfbios|instagram\b/i.test(navigator.userAgent)?m.value=!0:await T()}else p()}),(n,c)=>{const t=H,s=oe,o=W;return u(N)?(f(),_("div",re,[r("div",ne,[c[0]||(c[0]=r("div",{class:"content"},[r("h2",{class:"heading"},"View in Amazon?"),r("p",{class:"message"},"Would you like to view this product in the Amazon Shopping app?")],-1)),r("div",ce,[r("button",{type:"button",class:"button button--cancel",onClick:p},"Cancel"),r("a",{href:u(e)?.href,class:"button button--open",onClickPassive:B},"Open app",40,ie)])])])):u(k)?(f(),_("div",ue,[v(t),u(a)?(f(),_("div",le,[v(s,{creative:u(a),index:0},null,8,["creative"])])):S("",!0),v(o)])):S("",!0)}}}),be=se(fe,[["__scopeId","data-v-a105ebb2"]]);export{be as default};

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.