1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1053],{14983:(e,s,t)=>{"use strict";t.d(s,{A:()=>p,m:()=>i.mC});var r=t(37876),a=t(14232),l=t(48230),n=t.n(l),o=t(30905),i=t(39650),c=t(54901),d=t.n(c);let h=[{key:"store",legend:"Store",all:"All stores",base:"/coupons/store/",field:"stores"},{key:"category",legend:"Category",all:"All categories",base:"/coupons/category/",field:"categories"},{key:"type",legend:"Offer type",all:"All offer types",base:"/coupons/type/",field:"types"}];function u({href:e,active:s,label:t,count:a}){return(0,r.jsxs)(n(),{prefetch:!1,href:e,className:`${d().chip} ${s?d().chipActive:""}`,"aria-current":s?"page":void 0,children:[t,"number"==typeof a?(0,r.jsx)("span",{className:d().chipCount,children:a}):null]})}function p({data:e,activeStore:s,activeCategory:t,activeType:l,heading:c,lede:p}){let[f,m]=(0,a.useState)(""),[x,j]=(0,a.useState)(!1),y={store:s,category:t,type:l},v=(0,a.useMemo)(()=>e.items.filter(e=>h.every(({key:s})=>!y[s]||e[s]?.slug===y[s])),[e.items,s,t,l]),N=v.filter(e=>!e.expired).length,b=v.length-N,w=x?e.items:e.items.filter(e=>!e.expired),S=(0,a.useMemo)(()=>{let e=f.trim().toLowerCase();return v.filter(e=>x||!e.expired).filter(s=>!e||`${s.title} ${s.excerpt} ${s.discount} ${s.store?.name||""} ${s.category?.name||""}`.toLowerCase().includes(e)).sort(g)},[v,f,x]),$=new Set(v.filter(e=>!e.expired&&e.store).map(e=>e.store?.slug)).size;return(0,r.jsx)("div",{className:d().page,children:(0,r.jsxs)("div",{className:`container ${d().wrap}`,children:[(0,r.jsxs)("header",{className:d().hero,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:d().kicker,children:"WPArena coupons"}),(0,r.jsx)("h1",{children:c}),(0,r.jsx)("p",{className:d().lede,children:p})]}),(0,r.jsxs)("div",{className:d().statRow,children:[(0,r.jsxs)("div",{className:d().stat,children:[(0,r.jsx)("strong",{children:N}),(0,r.jsx)("span",{children:1===N?"Live offer":"Live offers"})]}),(0,r.jsxs)("div",{className:d().stat,children:[(0,r.jsx)("strong",{children:$}),(0,r.jsx)("span",{children:1===$?"Store":"Stores"})]})]})]}),(0,r.jsxs)("section",{className:d().filters,"aria-label":"Filter coupons",children:[(0,r.jsxs)("div",{className:`${d().filterRow} ${d().filterHead}`,children:[(0,r.jsx)("input",{className:d().search,type:"search",value:f,onChange:e=>m(e.target.value),placeholder:"Search a store, plugin, or host","aria-label":"Search coupons"}),b?(0,r.jsxs)("button",{type:"button",className:d().toggle,"aria-pressed":x,onClick:()=>j(e=>!e),children:[x?"Hide":"Show"," ",b," expired"]}):null]}),h.map(({key:s,legend:t,all:a,base:l,field:n})=>{let o=function(e,s,t,r){let a=(0,i.nD)(e,s,t);if(r&&!a.some(e=>e.slug===r)){let l=e.find(e=>e.slug===r);l&&a.push({...l,count:(0,i.Tr)(s,t,r)})}return a}(e[n],w,s,y[s]);return o.length?(0,r.jsxs)("div",{className:d().filterRow,children:[(0,r.jsx)("span",{className:d().legend,id:`facet-${s}`,children:t}),(0,r.jsxs)("div",{className:d().chips,role:"group","aria-labelledby":`facet-${s}`,children:[(0,r.jsx)(u,{href:"/coupons/",active:!y[s],label:a}),o.map(e=>(0,r.jsx)(u,{href:`${l}${e.slug}/`,active:y[s]===e.slug,label:e.name,count:e.count},e.slug))]})]},s):null})]}),S.length?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:d().resultCount,children:["Showing ",S.length," of ",v.length," ",1===v.length?"listing":"listings"]}),(0,r.jsx)("div",{className:d().grid,children:S.map(e=>(0,r.jsx)(o.A,{coupon:e},e.id))})]}):(0,r.jsxs)("div",{className:d().empty,children:[(0,r.jsx)("h2",{children:f?"Nothing matched that search":"No live offers here yet"}),(0,r.jsx)("p",{children:f?"Try a shorter term, or clear the search to see everything we are tracking.":"We only list an offer once we can point at the vendor page that honours it. Seasonal Black Friday and Christmas deals live on their own campaign pages."}),(0,r.jsxs)("div",{className:d().actions,style:{justifyContent:"center"},children:[f?(0,r.jsx)("button",{type:"button",className:d().btn,onClick:()=>m(""),children:"Clear search"}):(0,r.jsx)(n(),{prefetch:!1,className:d().btn,href:"/coupons/",children:"See every coupon"}),b&&!x?(0,r.jsxs)("button",{type:"button",className:d().btnGhost,onClick:()=>j(!0),children:["Show ",b," expired"]}):null]})]})]})})}function g(e,s){return e.expired!==s.expired?e.expired?1:-1:e.featured!==s.featured?e.featured?-1:1:e.title.localeCompare(s.title)}},18708:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSG:()=>d,default:()=>h});var r=t(37876),a=t(13315),l=t(47835),n=t(91669),o=t(14983),i=t(35035);let c=e=>{let s=e.coupons||i.Tg,t=(0,o.m)(s.stores,e.storeSlug);return(0,r.jsx)(l.A,{headerMenuItems:e.data?.primaryMenuItems?.nodes||[],footerMenuItems:e.data?.footerMenuItems?.nodes||[],pageTitle:`${t} coupons`,pageDescription:`Current ${t} coupons and offers for WordPress site owners, with the code and expiry shown before you click through.`,generalSettings:e.data?.generalSettings,children:(0,r.jsx)(o.A,{data:s,activeStore:e.storeSlug,heading:`${t} coupons`,lede:`Everything we currently list for ${t}. Reveal the code, then confirm the total on ${t}'s own checkout before you pay.`})})};c.variables=()=>({headerLocation:n.j,footerLocation:n.G}),c.query=a.B3;var d=!0;let h=c},35035:(e,s,t)=>{"use strict";t.d(s,{Tg:()=>r});let r={items:[],stores:[],categories:[],types:[]}},64850:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/coupons/store/[slug]",function(){return t(18708)}])}},e=>{e.O(0,[6701,4587,5836,2407,3516,5886,7422,7098,7835,2787,636,6593,8792],()=>e(e.s=64850)),_N_E=e.O()}]);
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.