1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2400],{8349:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a=(e,t,n)=>{var a;let r="annual"===t||"one-time"===t?e.annualPrice:e.monthlyPrice;return{item_id:(null==e||null==(a=e.id)?void 0:a.toString())||null,item_name:null==e?void 0:e.name,item_variant:t,currency:n,price:parseFloat(r),quantity:1}}},18273:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[siteSlug]/gift/payment/complete",function(){return n(53218)}])},53218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>S,default:()=>y});var a=n(37876),r=n(8349),i=n(79757),l=n(40880),c=n(14232),s=n(89099),u=n(33939),o=n(88876),p=n(77585),_=n(12277),m=n(20884),d=n(54734),h=n(90131),f=n.n(h);let g=async(e,t)=>{try{let n=new URLSearchParams({siteSlug:e,sessionId:t});return(await fetch("/api/checkout/verify?".concat(n.toString()))).json()}catch(t){(0,l.v)(t,{siteSlug:e})}return null};var S=!0;let y=e=>{let{globalData:t}=e,{siteTitle:n,publisherCurrency:l,metaPixelId:h}=t,{query:{siteSlug:S,session_id:y}}=(0,s.useRouter)(),{userData:{hydrated:v,productCart:P},updateUserData:N}=(0,u.u)(),j=(0,p.A)(),E=(0,o.A)("add_payment_info"),k=(0,o.A)("gift_purchase"),[w,x]=(0,c.useState)(!1),[A,b]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{v&&y&&S&&!A&&g(S,y).then(e=>{if((null==e?void 0:e.status)==="success"){b(!0);let t=e.amount||((null==P?void 0:P.annualPrice)?parseFloat(P.annualPrice.toString()):0),n={currency:(l||"USD").toLowerCase(),value:t,items:P?[(0,r.A)(P,"one-time",l)]:[],customer_id:e.customerId,customer_email:e.customerEmail};E(n),k({...n,transaction_id:e.subscriptionId||y}),N({productCart:null,gift:{recipient:null,code:null}}),h&&!w&&P&&(x(!0),i.f("Purchase",{content_ids:[P.name],contents:[{id:P.name,quantity:1}],currency:l,value:t}))}})},[v,y,S,A,P,E,k,l,N,h,w]),(0,c.useEffect)(()=>{v&&P&&!y&&(k({currency:l.toLowerCase(),value:parseFloat(P.annualPrice.toString()),transaction_id:P.id.toString(),items:[(0,r.A)(P,"one-time",l)]}),N({productCart:null,gift:{recipient:null,code:null}}),h&&!w&&(x(!0),i.f("Purchase",{content_ids:[P.name],contents:[{id:P.name,quantity:1}],currency:l,value:parseFloat(P.annualPrice.toString())})))},[v,y,P,k,l,N,h,w]),(0,c.useEffect)(()=>{v&&j(null)},[v,j]),(0,a.jsx)(_.A,{...t,title:"".concat(n," | Gift Purchase Complete"),headerTheme:"simple",footerTheme:"simple",hideAds:!0,children:(0,a.jsxs)("div",{className:f().pageWrapper,children:[(0,a.jsxs)("h1",{className:f().pageTitle,children:[(0,a.jsx)("span",{className:f().icon,children:(0,a.jsx)(d.A,{})}),"Success"]}),(0,a.jsxs)("div",{className:f().inner,children:[(0,a.jsx)("h2",{className:f().pageSubtitle,children:"Your gift purchase is complete â thank you for your support!"}),(0,a.jsx)("div",{className:f().contentWrapper,children:(0,a.jsx)(m.A,{href:"/",className:f().link,children:"Check out the homepage"})})]})]})})}},90131:e=>{e.exports={pageWrapper:"complete_pageWrapper__MruJr",pageTitle:"complete_pageTitle__jy3sK",pageSubtitle:"complete_pageSubtitle___bIr7",link:"complete_link__VfP3o",productDetails:"complete_productDetails__gljeR",productDetailsHeading:"complete_productDetailsHeading__Y8EEO",contentWrapper:"complete_contentWrapper__ST8BK",subtitle:"complete_subtitle__28tJT",icon:"complete_icon__BKOE_"}}},e=>{e.O(0,[1596,6511,2277,636,6593,8792],()=>e(e.s=18273)),_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.