PageSourceSearch

https://www.fanzo.com/_next/static/chunks/pages/games/[game_id]/redeem/[redemption_code]-fd02b341b1f4926b.js

js fanzo.com collected 2026-09-24 20:02:36 UTC 12,658 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7791],{37376:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});var i=a(36739),l=a(89365),n={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function r(e,t,a){(0,l.A)(2,arguments);var r,o=function(e,t){return(0,l.A)(2,arguments),(0,i.A)(e).getTime()-(0,i.A)(t).getTime()}(e,t)/1e3;return((r=null==a?void 0:a.roundingMethod)?n[r]:n.trunc)(o)}},46668:(e,t,a)=>{"use strict";a.r(t),a.d(t,{HAS_SEEN_LOCATION_LS:()=>F,SCREEN_STATES:()=>P,__N_SSP:()=>M,default:()=>V});var i=a(37876),l=a(14232),n=a(24755),r=a(47039),o=a(40090),s=a(66956),d=a(2462),c=a(16810),u=a(44948);let x=()=>(0,i.jsxs)("svg",{width:"96",height:"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M79.4356 47.5093C76.3125 65.3122 59.1282 79.7443 41.0535 79.7443C22.9787 79.7443 10.858 65.3122 13.9811 47.5093C17.1042 29.7064 34.2885 15.2743 52.3633 15.2743C70.438 15.2743 82.5588 29.7064 79.4356 47.5093Z",fill:"white"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M51.7978 18.4978C35.5305 18.4978 20.0646 31.4867 17.2538 47.5093C14.443 63.5319 25.3517 76.5208 41.6189 76.5208C57.8862 76.5208 73.3521 63.5319 76.1629 47.5093C78.9737 31.4867 68.0651 18.4978 51.7978 18.4978ZM10.7084 47.5093C14.1438 27.9261 33.0465 12.0508 52.9288 12.0508C72.811 12.0508 86.1438 27.9261 82.7084 47.5093C79.2729 67.0925 60.3702 82.9678 40.488 82.9678C20.6057 82.9678 7.27293 67.0925 10.7084 47.5093Z",fill:"white"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M42.1289 49.658L45.8988 28.168L54.6261 28.168L50.8562 49.658H42.1289Z",fill:"black"}),(0,i.jsx)("path",{d:"M38.0619 60.4001C38.6866 56.8395 42.1234 53.9531 45.7384 53.9531C49.3533 53.9531 51.7775 56.8395 51.1529 60.4001C50.5282 63.9607 47.0914 66.8471 43.4764 66.8471C39.8615 66.8471 37.4373 63.9607 38.0619 60.4001Z",fill:"black"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.3614 56.1021C42.9514 56.1021 40.6602 58.0264 40.2438 60.4001C39.8273 62.7739 41.4434 64.6981 43.8534 64.6981C46.2634 64.6981 48.5546 62.7739 48.971 60.4001C49.3874 58.0264 47.7714 56.1021 45.3614 56.1021ZM45.7384 53.9531C42.1234 53.9531 38.6866 56.8395 38.0619 60.4001C37.4373 63.9607 39.8615 66.8471 43.4764 66.8471C47.0914 66.8471 50.5282 63.9607 51.1529 60.4001C51.7775 56.8395 49.3533 53.9531 45.7384 53.9531Z",fill:"black"})]}),m=({className:e="h-16 w-16 text-white"})=>(0,i.jsxs)("svg",{className:`fill-current ${e}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:"none",children:[(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.9952 8.02869H51.9952L44.0977 55.3745H31.1993L31.7526 52.0573C32.0344 50.3677 30.8743 48.998 29.1613 48.998C27.4483 48.998 25.8312 50.3677 25.5494 52.0573L24.9961 55.3745H12.0977L19.9952 8.02869ZM23.6408 12.3329L17.1792 51.0704H21.4168C22.5063 47.4703 26.0956 44.6938 29.8792 44.6938C33.6629 44.6938 36.326 47.4703 36.2144 51.0704H40.452L46.9136 12.3329H23.6408Z"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.6643 23.0935C19.7965 22.3012 20.5549 21.6588 21.3582 21.6588H24.4491C25.2524 21.6588 25.7965 22.3012 25.6643 23.0935C25.5321 23.8859 24.7738 24.5283 23.9705 24.5283H20.8795C20.0762 24.5283 19.5321 23.8859 19.6643 23.0935ZM28.937 23.0935C29.0692 22.3012 29.8276 21.6588 30.6309 21.6588H36.8127C37.616 21.6588 38.1601 22.3012 38.028 23.0935C37.8958 23.8859 37.1374 24.5283 36.3341 24.5283H30.1523C29.3489 24.5283 28.8049 23.8859 28.937 23.0935ZM41.3007 23.0935C41.4328 22.3012 42.1912 21.6588 42.9945 21.6588H46.0854C46.8888 21.6588 47.4329 22.3012 47.3007 23.0935C47.1685 23.8859 46.4101 24.5283 45.6068 24.5283H42.5159C41.7126 24.5283 41.1685 23.8859 41.3007 23.0935Z"})]});var h=a(36640),g=a(64956),p=a(89440),f=a(13519),v=a(73425),j=a(74359),C=a(89099),b=a(40097),N=a(89944),_=a(88833),w=a(89365),y=a(37376),A=a(42135),E=a(46926),L=a(85018),S=a(69241),I=a(743),R=a(17029),O=a(78824),M=!0;let F="HAS_SEEN_LOCATION_LS",H="/games/redeem-bg.png",P={none:"none",initialLocation:"initialLocation",initial:"initial",bartenderReady:"bartenderReady",venueSearch:"venueSearch",badLocation:"badLocation",claim:"claim",claimed:"claimed"},k=({children:e,...t})=>
1(0,i.jsx)(d.A,{...t,buttonStyle:(0,S.A)("rounded-lg w-full text-white bg-gameSecondary py-4 text-center font-semibold",t.className),children:e}),D=()=>{let{i18n:e,t}=(0,n.Bd)(),a=(0,C.useRouter)().query.redemption_code,[d,c]=(0,l.useState)(P.none),[u,g]=(0,l.useState)(null),[p,b]=(0,l.useState)(!1),[N,_]=(0,l.useState)(null),[w,y]=(0,l.useState)(null),A=w?`${w.latitude},${w.longitude}`:null,{onOpen:S}=(0,L.q)(),{data:M,isLoading:D,isError:V}=(0,j.I)({queryKey:["gamePrizeMemberOffer",a,e.language],queryFn:()=>(0,v.A)(`games/game-prize-member/${a}`,e.language),enabled:!!a,select:e=>e?.gamePrizeMember}),$=M?.offer,G=(0,f.Hq)({latLong:A,offerId:M?.offer?.id}),{venues:U,isLoading:Y}=G;(0,l.useEffect)(()=>{U?.[0]&&!N&&(U[0]?.direction?.withinRadius?(_(U[0]),c(P.initial)):c(P.venueSearch))},[U,N]);let q=D||Y||d===P.none,B=(0,l.useCallback)(()=>(b(!0),navigator.geolocation.getCurrentPosition(e=>{y({latitude:e.coords.latitude,longitude:e.coords.longitude}),b(!1),c(P.initial)},e=>{3===e.code?c(P.initial):c(P.badLocation),b(!1)},{timeout:1e4})),[]);if((0,l.useEffect)(()=>{"true"===localStorage.getItem(F)?B():c(P.initialLocation)},[B]),u)return(0,i.jsx)(R.A,{title:u});if(V){let{title:e,text:a}=(0,E.S)(E.h.VOUCHER_INVALID);return(0,i.jsx)(R.A,{title:t(e),text:t(a)})}return q?(0,i.jsx)(r.tn,{open:!0,bgImage:H,children:(0,i.jsx)(o.A,{white:!0,className:"mx-auto w-16"})}):(0,i.jsxs)(i.Fragment,{children:[(d===P.badLocation||d===P.initialLocation)&&(0,i.jsx)(T,{loadingLocation:p,onContinue:()=>B(()=>c(P.initial)),modalState:d}),d===P.venueSearch&&(0,i.jsx)(r.QP,{venuesQuery:G,latLong:A,updateLatLong:y}),d===P.initial&&(0,i.jsxs)(r.tn,{open:!0,bgImage:H,children:[(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)(m,{})}),(0,i.jsx)("h3",{className:"headingFont py-8 text-center text-5xl",children:"Voucher generated!"}),(0,i.jsx)("p",{className:"whitespace-pre-line pb-8 text-center text-xl",children:"If you’re already at your chosen venue, you can claim your voucher right here."}),(0,i.jsx)(k,{loading:p,onClick:()=>c(P.bartenderReady),text:"Claim voucher now"}),(0,i.jsxs)("div",{className:"flex items-center py-8",children:[(0,i.jsx)("div",{className:"flex-grow border-t border-white opacity-60"}),(0,i.jsx)("span",{className:"bg-transparent px-3 font-medium uppercase",children:"OR"}),(0,i.jsx)("div",{className:"flex-grow border-t border-white opacity-60"})]}),(0,i.jsx)("p",{className:"text-center",children:"We've also sent an email to [email protected] so you can access your voucher at any time from there."})]}),d===P.bartenderReady&&(0,i.jsxs)(r.tn,{open:!0,bgImage:H,onClose:()=>c(P.initial),children:[(0,i.jsx)("div",{className:"flex justify-center",children:(0,i.jsx)(x,{})}),(0,i.jsx)("h3",{className:"headingFont py-8 text-center text-5xl",children:"Is the bartender ready?"}),(0,i.jsx)("p",{className:"whitespace-pre-line pb-8 text-center text-xl",children:"Your voucher will be generated on the next screen and you'll have to show it to the bartender."}),(0,i.jsx)(k,{loading:p,onClick:()=>c(P.claim),text:"Bartender is ready"})]}),d===P.claim&&!!M&&(0,i.jsx)(Z,{updateStatus:c,onClaimError:g,open:!0,offer:$,venue:N,redemption:M}),d===P.claimed&&(0,i.jsxs)(r.tn,{hideHelp:!0,open:!0,bgImage:"/games/redeem-bg.png",children:[(0,i.jsx)(h.A,{className:"mx-auto h-16 text-white",bold:!0}),(0,i.jsx)("p",{className:"pt-8 text-center text-lg opacity-60",children:"You've now claimed your"}),(0,i.jsx)("p",{className:"headingFont pb-20 pt-1 text-center text-5xl",children:$?.title||"GEllo"}),(0,i.jsxs)(s.A,{onClick:()=>S(),className:"mx-auto flex max-w-[311px] items-center justify-center gap-2 rounded-lg bg-primary px-4 py-2 pl-6 pr-4 font-semibold text-black",children:[(0,i.jsx)(O.A,{className:"h-8 w-8"}),"Play more games on FANZO"]}),(0,i.jsx)(I.A,{isDark:!0,className:"mx-auto mt-4"})]}),(0,i.jsx)(L.A,{})]})},T=({modalState:e,onContinue:t,loadingLocation:a})=>(0,i.jsxs)(c.A,{hideHeader:!0,open:!0,className:"h-dvh w-dvw overflow-auto bg-white px-8 pt-4",children:[(0,i.jsx)(g.A,{className:"mx-auto h-20 w-20"}),(0,i.jsx)("h3",{className:"headingFont py-8 text-center text-5xl",children:"enable location services"}),(0,i.jsxs)("p",{className:"whitespace-pre-line pb-10 text-center text-xl",children:["To claim your voucher we need to know y
1ou’re inside the venue.",`
2
3`,"Please enable location services to continue."]}),e===P.initialLocation&&(0,i.jsx)(k,{loading:a,text:"Continue",onClick:()=>{localStorage.setItem(F,"true"),t()}}),e===P.badLocation&&(0,i.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg bg-[#FEEFE8] p-4 text-xs text-[#61280A]",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[(0,i.jsx)(u.A,{className:"h-6 w-6"}),(0,i.jsx)("p",{className:"font-bold uppercase",children:"enabling location help"})]}),(0,i.jsxs)("ul",{className:"list-disc pl-4",children:[(0,i.jsx)("li",{children:"On android, you may have to enable location services on your device and then refresh the page."}),(0,i.jsx)("li",{children:"On IOS, simply refresh the page."})]})]})]}),Z=({open:e,offer:t,venue:a,redemption:s,updateStatus:d,onClaimError:c})=>{let{timeRemaining:u,onClaim:x,isClaiming:m}=(({updateStatus:e,onClaimError:t,venue:a,redemption:i})=>{let{i18n:r,t:o}=(0,n.Bd)(),[{authenticatedMember:s}]=(0,f.Us)(),[d,c]=(0,l.useState)(0),[u,x]=(0,l.useState)(null),[m,h]=(0,l.useState)(null),g=e=>t?.(e?.message||o((0,E.S)(E.h.GENERIC).title)),{mutate:p}=(0,b.n)({mutationFn:e=>(e.timeoutOverride||h({latitude:e.latitude,longitude:e.longitude}),(0,v.A)(`offers/${i?.offer?.id}/pre-claim`,r.language,{},{method:"POST",body:{...e,venueId:a.id,expiresIn:5}})),onSuccess:()=>x(function(e,t){(0,w.A)(2,arguments);var a=(0,N.A)(t);return(0,_.A)(e,1e3*a)}(new Date,300)),onError:g}),j=(0,b.n)({mutationFn:()=>(0,v.A)("offers/claim",r.language,{},{method:"POST",body:{...m||{timeoutOverride:1},venueId:a.id,offerId:i?.offer?.id,memberId:s?.id}}),onSuccess:()=>e(P.claimed),onError:g});return(0,l.useEffect)(()=>{a.id&&i&&navigator.geolocation.getCurrentPosition(e=>{p({latitude:e.coords.latitude,longitude:e.coords.longitude})},t=>{3===t.code?p({timeoutOverride:1}):e(P.badLocation)},{timeout:1e4})},[p,e,a,i]),(0,A.$$)(()=>{u&&c((0,y.A)(u,new Date))},1e3),{timeRemaining:d,onClaim:j.mutate,isClaiming:j.isPending}})({updateStatus:d,onClaimError:c,venue:a,redemption:s}),h=0===u,g=u<0;return(0,i.jsx)(r.tn,{open:e,showOverlay:!0,bgImage:a?.profilePicture?.original,children:h?(0,i.jsx)("div",{className:"w-full",children:(0,i.jsx)(o.A,{white:!0,className:"mx-auto w-16 pt-32"})}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col items-center pt-8",children:[(0,i.jsx)("p",{className:"font-bold uppercase opacity-60",children:"Voucher"}),(0,i.jsx)("p",{className:"headingFont py-3 text-center text-5xl",children:t?.title}),(0,i.jsxs)("p",{className:"text-center text-lg",children:["at ",a.name]}),(0,i.jsxs)("div",{className:`mb-8 mt-6 max-w-52 rounded-lg p-4 text-center ${!g?"bg-white text-black":"bg-[#FFD6D3] text-[#CC291E]"}`,children:[(0,i.jsx)("p",{className:"pb-8 font-semibold",children:g?"Voucher has expired.":"Show this voucher to bar staff."}),(0,i.jsx)("p",{className:`headingFont pb-2 text-7xl ${u>0&&u<60?"animate-pulse":""}`,style:{animationDuration:"1s"},children:(0,p.zM)(g?0:u)}),(0,i.jsx)("p",{className:"opacity-60",children:"Time remaining"})]})]}),u>0&&(0,i.jsxs)("div",{className:"mb-12 flex flex-col px-8",children:[(0,i.jsx)("p",{className:"pb-4 text-center",children:"Once claimed, tap offer received"}),(0,i.jsx)(k,{text:"Offer received",loading:m,onClick:()=>x()})]})]})})};D.simpleRender=!0;let V=D},46926:(e,t,a)=>{"use strict";a.d(t,{S:()=>n,h:()=>i});let i={ALREADY_PLAYED:"alreadyPlayed",GAME_NOT_FOUND:"gameNotFound",VOUCHER_INVALID:"voucherInvalid",GENERIC:"generic"},l={[i.ALREADY_PLAYED]:{title:"game_error_alreadyPlayed_title",text:"game_error_alreadyPlayed_text"},[i.GAME_NOT_FOUND]:{title:"game_error_gameNotFound_title",text:"game_error_gameNotFound_text"},[i.VOUCHER_INVALID]:{title:"game_error_voucherInvalid_title",text:"game_error_voucherInvalid_text"},[i.GENERIC]:{title:"game_error_generic_title",text:"game_error_generic_text"}},n=e=>l[e]||l[i.GENERIC]},52056:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/games/[game_id]/redeem/[redemption_code]",function(){return a(46668)}])}},e=>{e.O(0,[8121,2284,6700,8697,3306,7029,7039,636,6593,8792],()=>e(e.s=52056)),_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.