PageSourceSearch

https://cashbackstacks.com/_nuxt/DRUslr8m.js

js cashbackstacks.com collected 2026-10-02 00:51:27 UTC 7,652 bytes, 1 lines download raw bytes

1import{d as O,o as s,h as a,g as d,t as _,f as e,a as v,I as M,b as x,G as $,J as m,e as l,c as i,at as z,bO as S,H as E,F as N,j,bP as F,A as G,as as J,u as Q,m as Z,aB as q,b0 as K,n as W,S as X,r as Y,bQ as ee}from"./B03Hv0XP.js";import te from"./30DwVNS6.js";import oe from"./CdJtzFoN.js";import{d as D,p as B,b as re}from"./B_DA8d3V.js";import{g as C}from"./Bp5nYeb8.js";import se from"./BchB0sfX.js";import ne from"./BtRjvkMM.js";import{_ as ae}from"./CvWF1vbH.js";import ie from"./sVKLN2S_.js";import ce from"./Ca6Mni8F.js";import{u as fe}from"./DJ14UlFx.js";import{N as de}from"./CUK5xEBI.js";import{u as me}from"./oV4sh_uo.js";import{e as le,a as ue,B as _e}from"./CaTqJTMz.js";import"./CHAzYxxx.js";import"./smvbeAeL.js";import"./CPqUvwen.js";import"./DTpc2MRj.js";import"./CMBweDAm.js";import"./BCtfhdjq.js";import"./DZeXCjMw.js";import"./CDJZ_TkZ.js";import"./BwnmOcie.js";import"./CSUhsg0Z.js";import"./DGbwkVPd.js";import"./CgSr4kdc.js";import"./C83IEKOy.js";import"./BA-6w_tE.js";import"./CrL9SBzO.js";import"./KjVnwuUB.js";import"./CNZFoi2r.js";import"./BiTA7Ir4.js";const pe={class:"min-w-0 text-start"},xe={class:"flex items-center gap-1.5"},he={class:"text-sm font-medium text-highlighted break-words"},ge={class:"flex items-center gap-1.5 mt-0.5 flex-wrap"},ye={key:0,class:"text-xs text-muted"},be={key:1,class:"text-xs text-muted"},ve={key:2,class:"text-xs text-muted"},ke=O({__name:"AccordionLabel",props:{offer:{}},setup(t){const r=t,n=i(()=>z(r.offer.sourceId)),c=i(()=>r.offer.title?r.offer.title:`${S(r.offer.rateValue,r.offer.rateType)} off`),o=i(()=>
1{if(!r.offer.addedDate)return null;const f=-D(B(r.offer.addedDate));return f<=0?"Added today":`Added ${f}d ago`}),h=i(()=>{if(!r.offer.lastSeenAt)return null;const f=-D(B(r.offer.lastSeenAt));return f<=0?"Last seen today":`Last seen ${f}d ago`}),g=i(()=>r.offer.expiresDate?`Expires ${re(r.offer.expiresDate,!0)}`:null);return(f,y)=>{const u=M;return s(),a("div",pe,[d("div",xe,[d("p",he,_(e(c)),1),t.offer.isExpired?(s(),v(u,{key:0,color:"error",variant:"soft",size:"xs"},{default:x(()=>[...y[0]||(y[0]=[$(" Expired ",-1)])]),_:1})):m("",!0)]),d("div",ge,[l(u,{color:e(C)(t.offer.sourceId).color,variant:e(C)(t.offer.sourceId).variant,size:"sm"},{default:x(()=>[$(_(e(n)),1)]),_:1},8,["color","variant"]),e(o)?(s(),a("span",ye," · "+_(e(o)),1)):m("",!0),e(h)?(s(),a("span",be," · "+_(e(h)),1)):m("",!0),e(g)?(s(),a("span",ve," · "+_(e(g)),1)):m("",!0)])])}}}),$e=Object.assign(ke,{__name:"OfferHistoryAccordionLabel"}),Oe={class:"flex items-center gap-1.5 ms-auto shrink-0"},Le=O({__name:"AccordionMeta",props:{offer:{}},setup(t){return(r,n)=>{const c=se,o=E;return s(),a("div",Oe,[l(c,{layer:"offer",title:t.offer.title||void 0},{default:x(()=>[$(_(e(S)(t.offer.rateValue,t.offer.rateType)),1)]),_:1},8,["title"]),l(o,{name:"i-lucide-chevron-down",class:"shrink-0 size-5 ms-1 group-data-[state=open]:rotate-180 transition-transform duration-200"})])}}}),Ae=Object.assign(Le,{__name:"OfferHistoryAccordionMeta"}),Se={class:"space-y-4 text-sm"},Te={key:0,class:"text-muted"},De={key:1},Be=["innerHTML"],Ce={key:2},Ee=["innerHTML"],Ne={key:3},we={class:"flex gap-2 flex-wrap"},He=O({__name:"ExpandedBody",props:{offer:{}},setup(t){return(r,n)=>{const c=ne;return s(),a("div",Se,[t.offer.spendThreshold?(s(),a("p",Te,[n[0]||(n[0]=d("span",{class:"font-medium text-default"},"Min. spend:",-1)),$(" $"+_(t.offer.spendThreshold)+"+ ",1)])):m("",!0),t.offer.details?(s(),a("div",De,[n[1]||(n[1]=d("p",{class:"text-xs font-medium text-muted mb-2"}," Description ",-1)),d("div",{class:"prose prose-sm max-w-none text-muted",innerHTML:t.offer.details},null,8,Be)])):m("",!0),t.offer.terms?(s(),a("div",Ce,[n[2]||(n[2]=d("p",{class:"text-xs font-medium text-muted mb-2"}," Terms & Conditions ",-1)),d("div",{class:"prose prose-sm max-w-none text-muted",innerHTML:t.offer.terms},null,8,Ee)])):m("",!0),t.offer.cardIds.length>0?(s(),a("div",Ne,[n[3]||(n[3]=d("p",{class:"text-xs font-medium text-muted mb-2"}," Seen on ",-1)),d("div",we,[(s(!0),a(N,null,j(t.offer.cardIds,o=>(s(),a("div",{key:o,class:"w-16 h-10 rounded overflow-hidden bg-elevated shadow-sm"},[l(c,{"card-id":o},null,8,["card-id"])]))),128))])])):m("",!0)])}}}),Ie=Object.assign(He,{__name:"OfferHistoryExpandedBody"}),Pe=O({__name:"OfferAccordionList",props:{offers:{}},setup(t){const r=t,n=i(()=>r.offers.map(c=>({value:c.id})));return(c,o)=>{const h=$e,g=Ae,f=Ie,y=ae;return s(),v(y,{items:e(n),type:"single",collapsible:"","unmount-on-hide":!1,class:"space-y-2"},{default:x(({index:u})=>[l(h,{offer:t.offers[u]},null,8,["offer"])]),trailing:x(({index:u})=>[l(g,{offer:t.offers[u]},null,8,["offer"])]),body:x(({index:u})=>[l(f,{offer:t.offers[u]},null,8,["offer"])]),_:1},8,["items"])}}}),Re=Object.assign(Pe,{__name:"OfferHistoryOfferAccordionList"});function Ue(t){const r=i(()=>J(t)),{authTrigger:n}=fe(),{data:c,pending:o,error:h,refresh:g}=F(i(()=>G.offerHistoryDetail(r.value)),{key:i(()=>`offer-history-detail-${n.value}-${r.value}`),watch:[r,n]},"$4Z2TRiT4B5"),f=i(()=>c.value?.merchant??null),y=i(()=>c.value?.generatedAt??null);return{merchant:f,generatedAt:y,pending:o,error:h,refresh:g}}const Ve={class:"flex items-center gap-4 mb-4"},Me={key:0,class:"text-sm text-muted"},ze={key:0},je={key:1,class:"mt-8"},$t=O({__name:"[slug]",setup(t){const{isPremium:r}=me(),n=Q(),c=i(()=>n.params.slug),{merchant:o,generatedAt:h,pending:g,error:f,refresh:y}=Ue(c);le("Card-Linked Offer Details","View card-linked offer history and rate trends.");const u=ue(i(()=>_e.cardLinkedOffers(o.value?.merchantName))),k=i(()=>o.value?.offers.filter(p=>!p.isExpired)??[]),L=i(()=>o.value?.offers.filter(p=>p.isExpired)??[]),A=Y(!1),w=i(()=>{if(!o.value)return[];const p=[{value:String(k.value.length),label:"Current"},{value:String(L.value.length),label:"Expired"}],b=ee(k.value);return b&&b.rateValue>0&&p.push({value:S(b.rateValue,b.rateType,{compact:!0}),label:"Best Rate"}),p});return(p,b)=>{const H=q,I=te,P=oe,T=Re,R=E,U=ie,V=ce;return s(),v(V,Z({pending:e(g),entity:e(o),error:e(f)?.message},e(de).cardLinkedOffer,{"loading-card-count":4,onRetry:e(y)}),{default:x(()=>[l(I,{breadcrumbs:e(u),stats:e(r)?e(w):[],"updated-at":e(r)?e(h):void 0},{header:x(()=>[d("div",Ve,[l(H,{"store-name":e(o).merchantName,"store-domain":e(o).extractedDomain,size:"lg","show-identity":"","name-tag":"h1","name-class":"text-2xl font-bold",to:e(o).cbmSlug?("storePath"in p?p.storePath:e(K))(e(o).cbmSlug):void 0},{subtitle:x(()=>[e(o).extractedDomain?(s(),a("p",Me,_(e(o).extractedDomain),1)):m("",!0)]),_:1},8,["store-name","store-domain","to"])])]),_:1},8,["breadcrumbs","stats","updated-at"]),e(r)?(s(),a(N,{key:1},[e(k).length>0?(s(),a("section",ze,[d("h2",{class:W([e(X),"mb-4"])}," Current Offers ("+_(e(k).length)+") ",3),l(T,{offers:e(k)},null,8,["offers"])])):m("",!0),e(L).length>0?(s(),a("section",je,[d("button",{class:"flex items-center gap-2 text-lg font-semibold text-muted hover:text-highlighted transition-colors mb-4",onClick:b[0]||(b[0]=Fe=>A.value=!e(A))},[l(R,{name:e(A)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-5"},null,8,["name"]),$(" Past Offers ("+_(e(L).length)+") ",1)]),e(A)?(s(),v(T,{key:0,offers:e(L)},null,8,["offers"])):m("",!0)])):m("",!0),e(o)&&e(o).offers.length===0?(s(),v(U,{key:2,title:"No offers found",description:"No card-linked offers have been recorded for this merchant.",icon:"inbox"})):m("",!0)],64)):(s(),v(P,{key:0,title:"Card-Linked Offer Details",description:`Upgrade to Premium to see offer sources, rates, and terms for ${e(o)?.merchantName??"this merchant"}.`},null,8,["description"]))]),_:1},16,["pending","entity","error","onRetry"])}}});
1export{$t 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.