PageSourceSearch

https://gamegeek.in.th/_next/static/chunks/pages/game-dfd0273f2e892cda.js

js gamegeek.in.th collected 2026-10-08 06:20:23 UTC 7,523 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5910],{688:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/game",function(){return t(789)}])},789:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>j});var a=t(7876),l=t(2337),i=t(2253),c=t(4232);t(1616);var r=t(9099),n=t(2538),d=t(1777),o=t(7069),m=t(9488),x=t(7240),h=t(4752),u=t(4781),p=t(7354);let f={title:"สุ่มของรางวัล",bc:["สุ่มของรางวัล"]},j=(0,u.A)(e=>{let[s,t]=(0,c.useState)(),[u,j]=(0,c.useState)(0),g=(0,r.useRouter)(),N=(0,d.d4)(o.h),b=(e,s)=>{let t=s/e*100;return t>100?100:t};(0,c.useEffect)(()=>{(async()=>{try{let e=await (0,m.Jt)("/me/getBox");t(e.data.results),j(e.data.point)}catch(e){}})()},[]);let w=(0,d.d4)(o.h),[v,y]=(0,c.useState)(!1),[_,k]=(0,c.useState)(!1),[A,S]=(0,c.useState)(),[E,C]=(0,c.useState)(""),R=(0,d.wA)(),P=async e=>{try{let s=await (0,m.Jt)("/me/openBox/".concat(e));if(s.data.status){let t=new Audio("loot.mp3");t.volume=.2,t.play(),k(!0),y(!1);let a=await (0,m.Jt)("/auth/front/profile");if(a.data.status){let e={islogin:!0,...a.data.data,inbox:a.data.inbox};localStorage.setItem("user",JSON.stringify(e)),R((0,x.g)(e))}setTimeout(()=>{y(!0),C(e),S(s.data)},2e3)}else n.oR.error(s.data.message)}catch(e){n.oR.error("กรุณาเข้าสู่ระบบก่อนทำรายการ")}};return(0,a.jsxs)("div",{children:[(0,a.jsx)(h.A,{title:f.title,data:f.bc,website:e.website}),(0,a.jsxs)("div",{className:"container mx-auto mt-6 mb-12",children:[(0,a.jsxs)("p",{className:"mb-3 flex text-xl font-bold",style:{color:"var(--gamegeek-text-white)"},children:[(0,a.jsx)(l.A,{className:"mr-2 w-5"}),"สุ่มของรางวัล"]}),(0,a.jsxs)("div",{className:"grid grid-cols-12 gap-8",children:[(0,a.jsx)("div",{className:"col-span-12 md:col-span-7",children:_?(0,a.jsxs)("div",{className:"mb-6 flex place-content-center gap-4 roun
1ded-md bg-white p-10 shadow-md",children:[!v&&(0,a.jsx)("img",{src:(e=>{let t=s.filter(s=>s._id===e);return t?t[0]:""})(E).image,className:"".concat(v?"puff-out-center":"vibrate-1"," w-56")}),v&&(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)("div",{className:"",children:(null==A?void 0:A.win)?(0,a.jsxs)("div",{className:"col scale-in-center flex flex-col place-items-center",children:[(0,a.jsx)("img",{src:null==A?void 0:A.item.image,className:"mb-4 w-36"}),(0,a.jsxs)("p",{className:"rounded-md bg-gray-200 px-5 py-1.5 font-bold text-gray-900",children:["คุณได้รับ ",null==A?void 0:A.item.name," ",A.item.amount,"x"]})]}):(0,a.jsxs)("div",{className:"scale-in-center bg-red-400 p-2 text-center text-white rounded-md flex-col flex place-content-center place-items-center gap-2",children:[(0,a.jsx)(i.A,{className:"w-12"}),(0,a.jsx)("p",{children:"คุณไม่ได้รับรางวัล"})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsx)("button",{className:"btn green",onClick:()=>{g.reload()},children:"รับของรางวัล"}),(0,a.jsx)("button",{className:"btn gray",onClick:()=>{P(E)},children:"เปิดกล่องต่อไป"})]})]})]}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:s&&s.map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4 rounded-md bg-white p-5 shadow-md",children:[(0,a.jsx)("div",{className:"col-span-1",children:(0,a.jsx)("img",{src:e.image,className:"w-full"})}),(0,a.jsxs)("div",{className:"col-span-3",children:[(0,a.jsx)("span",{className:"text-lg font-bold",children:e.name}),(0,a.jsxs)("div",{className:"mb-1 flex justify-between",children:[(0,a.jsx)("span",{className:"text-base font-bold text-primary",children:"แต้มสะสม"}),(0,a.jsxs)("span",{className:"text-sm font-medium text-primary",children:[N.rp,"/",e.rp]})]}),(0,a.jsx)("div",{className:"h-2.5 w-full rounded-full bg-gray-200",children:(0,a.jsx)("div",{className:"h-2.5 rounded-full duration-1000 primary",style:{width:"".concat(b(e.rp,N.rp),"%")}})}),(0,a.jsx)("button",{type:"button",onClick:()=>{P(e._id)},className:"btn w-full mt-3",children:"เปิดกล่องสุ่ม"})]}),(0,a.jsxs)("div",{className:"col-span-4",children:[(0,a.jsx)("p",{className:"text-base font-bold",children:"ของที่มีโอกาสได้รับ"}),(0,a.jsx)("div",{className:"flex gap-3",children:e.prize.map(e=>(0,a.jsx)(p.Tooltip,{title:"".concat(e.name,"  ").concat(e.amount,"x"),position:"top-start",trigger:"mouseenter",followCursor:!0,children:(0,a.jsx)("img",{className:"h-12 w-12 object-contain duration-150 hover:scale-125",src:e.image})}))})]})]}))})}),(0,a.jsxs)("div",{className:"col-span-12  md:col-span-5",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1 rounded-md primary mb-5 place-items-center p-5 text-white shadow-md",children:[(0,a.jsx)("p",{className:"text-lg",children:"แต้มสะสมของคุณ"}),(0,a.jsxs)("p",{className:"text-3xl font-bold",children:[w.rp," แต้ม"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 rounded-md p-5 shadow-md box-bg-dark",children:[(0,a.jsx)("p",{className:"text-lg font-bold",children:"วิธีการได้รับแต้ม"}),(0,a.jsxs)("p",{children:["ในการเติมเงิน ",u," บาท จะได้รับ 1 แต้มสะสม"]}),(0,a.jsxs)("p",{children:["ของรางวัลในกล่องมีทั้ง ",(0,a.jsx)("b",{children:"บัตรเงินสด"}),", ",(0,a.jsx)("b",{children:"พ้อย"}),",",(0,a.jsx)("b",{children:"บัตรส่วนลด"})]})]})]})]})]})]})})},4752:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var a=t(7876);t(4232);var l=t(7332),i=t(5495),c=t(8230),r=t.n(c);let n=function(e){var s;return(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"header color-white grid h-56 place-items-center sm:h-72 ".concat(e.website?null==(s=e.website)?void 0:s.website_firstcolor:"gray"),children:(0,a.jsxs)("div",{className:"text-center w-full flex flex-col place-items-center",children:[(0,a.jsx)("p",{className:"mb-4 text-2xl font-bold text-white",children:e.title}),(0,a.jsx)("nav",{className:"flex","aria-label":"Breadcrumb",children:(0,a.jsxs)("ol",{className:"inline-flex items-center space-x-1 md:space-x-3",children:[(0,a.jsx)("li",{className:"inline-flex items-center",children:(0,a.jsxs)(r(),{href:"/",className:"inline-flex items-center text-sm font-medium text-white hover:text-gray-300 dark:text-white dark:hover:text-white",children:[(0,a.jsx)(l.A,{className:"mr-2 h-4 w-4"}),"หน้าแรก"]})}),e.data.map((e,s)=>(0,a.jsx)("li",{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(i.A,{className:"mr-2 h-4 w-4 text-white"}),(0,a.jsx)("a",{className:"ml-1 text-sm font-medium text-white hover:text-gray-300 dark:text-white dark:hover:text-white md:ml-2",children:e})]})},s))]})})]})})})}},4781:(e,s,t)=>{"use strict";t.d(s,{A:()=>o});var a=t(7876),l=t(9099),i=t.n(l),c=t(4232),r=t(1777),n=t(7069),d=t(2728);let o=function(e){let s=s=>{(0,r.d4)(n.h);let t=(0,l.useRouter)();return(0,c.useEffect)(()=>{(0,d.oC)(i())&&(0,d.ts)(t)},[]),(0,a.jsx)(e,{...s})};return e.getInitialProps&&(s.getInitialProps=e.getInitialProps),s}},7069:(e,s,t)=>{"use strict";function a(e){return e.todoReducer}t.d(s,{h:()=>a})},7240:(e,s,t)=>{"use strict";t.d(s,{g:()=>l});var a=t(9266);function l(e){return{type:a.X.SET_USER,payload:e}}}},e=>{var s=s=>e(e.s=s);e.O(0,[7796,803,636,6593,8792],()=>s(688)),_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.