PageSourceSearch

https://pauper-cube-polling.netlify.app/_next/static/chunks/7344-4bae7cc49b927479.js

js pauper-cube-polling.netlify.app collected 2026-10-03 11:16:14 UTC 10,863 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7344],{43957:function(e,a,r){"use strict";r.d(a,{Z:function(){return f}});var n=r(85893),l=r(11537),i=r(51015),t=r(93967),s=r.n(t),c=r(25675),d=r.n(c),o=r(41664),u=r.n(o),h=r(67294),x=r(93178),g=r(19017),v=r.n(g),m=e=>{var a;let{card:r}=e;console.log(r);let l={W:"bg-[#f5f5f5]",U:"bg-[#a5b5f5]",B:"bg-[#b5b5d5]",R:"bg-[#f5c5c5]",G:"bg-[#c5f5c5]",C:"bg-[#a5a5a5]",M:"bg-[#f5f5c5]",BU:"bg-[#f5f5c5]",BR:"bg-[#f5f5c5]",RG:"bg-[#f5f5c5]",GW:"bg-[#f5f5c5]",WB:"bg-[#c5c5c5]",RU:"bg-[#f5f5c5]",BG:"bg-[#f5f5c5]",WR:"bg-[#f5f5c5]",GU:"bg-[#f5f5c5]",L:"bg-[#964327]"},i=(null==r?void 0:null===(a=r.colors)||void 0===a?void 0:a.length)>0?r.colors.length>1?"M":r.colors[0]:r.type.includes("Land")?"L":"C";return console.log(i,l[i]),(0,n.jsx)("div",{className:"aspect-[63/88] w-full py-2 px-2 bg-black rounded-lg text-black text-xs ",children:(0,n.jsxs)("div",{className:"".concat(l[i]," w-full h-full rounded-lg p-2"),children:[(0,n.jsxs)("div",{className:"flex justify-between items-center border border-black p-2 bg-[rgba(255,255,255,0.5)]",children:[(0,n.jsx)("p",{children:r.name}),(0,n.jsx)("div",{children:(0,n.jsx)("p",{children:r.manaCost})})]}),(0,n.jsx)("div",{className:"aspect-[4/1.5] w-full border border-black flex align-middle justify-center bg-[rgba(255,255,255,0.5)]",children:(0,n.jsx)("p",{children:"Art Placeholder"})}),(0,n.jsx)("div",{className:"border border-black p-2 bg-[rgba(255,255,255,0.5)]",children:(0,n.jsx)("p",{children:r.type})}),(0,n.jsx)("div",{className:"border border-black p-2 bg-[rgba(255,255,255,0.5)]",style:{whiteSpace:"pre-wrap"},children:(0,n.jsx)("p",{children:r.oracleText})}),r.power&&r.toughness&&(0,n.jsx)("div",{className:"flex items-end w-full",children:(0,n.jsxs)("div",{className:"border border-black p-2 bg-[rgba(255,255,255,0.5)]",children:[r.power,"/",r.toughness]})})]})})};let j=e=>{let{href:a,children:r}=e;return a?(0,n.jsx)(u(),{href:a,children:r}):r},b=()=>(0,n.jsx)("div",{className:"absolute top-20 right-4 z-10 size-[30px] bg-white rounded-full",children:(0,n.jsx)(d(),{src:"https://i.imgur.com/FPRhJQX.png",alt:"card is in the cube",height:30,width:30,unoptimized:!0})});var f=e=>{let{card:a,hoverEffect:r=!1,localFunc:t}=e,[c,o]=(0,h.useState)(0),{textOnly:u}=(0,x.zC)();if(u)return(0,n.jsx)(m,{card:a});if(a.imageURI&&"string"==typeof a.imageURI){let e=t?void 0:"/cards/".concat(a.normalizedName);return(0,n.jsx)(j,{href:e,children:(0,n.jsxs)("div",{style:{position:"relative"},children:[a.inCube&&(0,n.jsx)(b,{}),(0,n.jsx)(d(),{src:a.imageURI,className:s()(v()["card-image"],v().hover,{[v()["card-hover"]]:r},"w-full"),alt:a.name,width:480,height:680,unoptimized:!0,onClick:t||void 0})]})})}if(a.imageURI&&"object"==typeof a.imageURI){let e=t?void 0:"/cards/".concat(a.normalizedName);return(0,n.jsxs)("div",{style:{position:"relative"},children:[a.inCube&&(0,n.jsx)("div",{style:{position:"absolute",width:"30px",height:"30px",top:"20%",right:"20px",background:"#fff",zIndex:"10",borderRadius:"15px"},children:(0,n.jsx)(d(),{src:"https://i.imgur.com/FPRhJQX.png",alt:"card is in the cube",height:30,width:30,unoptimized:!0,onClick:t||void 0})}),(0,n.jsx)(j,{href:e,children:(0,n.jsx)(d(),{src:a.imageURI[c],className:s()(v()["card-image"],v().hover,{[v()["card-hover"]]:r}),alt:a.name,width:480,height:680,unoptimized:!0})}),(0,n.jsx)(i.Z,{onClick:()=>{1===c?o(0):o(1)},className:"!absolute z-10 bottom-[10px] left-[10px] !min-w-[0px] px-2 ",variant:"contained",color:1===c?"secondary":"primary",children:(0,n.jsx)(l.Z,{})})]})}return null}},86819:function(e,a,r){"use strict";var n=r(85893),l=r(96216),i=r(78731),t=r(95411),s=r(81104),c=r(85871),d=r(51015),o=r(49986),u=r(11163),h=r(33299),x=r(67294),g=r(19017),v=r.n(g),m=r(9563);let j=e=>{let{children:a,chosen:r,name:l,...i}=e,t=r?"".concat(l,".contrastText"):"".concat(l,".main"),s=r?"".concat(l,".main"):"white",c=r?"".concat(l,".contrastText"):"".concat(l,".main");return(0,n.jsx)(d.Z,{...i,className:"!min-w-[0px] px-2 w-[21%]",variant:"outlined",sx:{borderColor:t,backgroundColor:s,color:c},color:l,children:a})};a.Z=e=>{let{card:a,noRefresh:r,localFunc:d,stale:g=!1}=e,{data:b}=(0,h.useSession)(),f=(0,u.useRouter)(),[p,_]=(0,x.useState)(""),Z=async(e,a,n)=>{let l=await fetch("/api/voting/vote",{method:"POST",body:JSON.stringify({id:e,vote:a,cardName:n}),headers:{"Content-Type":"application/json"}}),i=await l.json();if(l.ok){if(r){if(!d)return;d(i.newCardData),(0,m.B)("Voted","Voted","Voted",a),_(a)}else f.replace(f.asPath,void 0,{scroll:!1})}else throw Error(i.message||"Something went wrong!")};if(!b||!b.user||!b.user.id)return null;let y=[{name:"negative",icon:(0,n.jsx)(l.Z,{})},{name:"slightNegative",icon:(0,n.jsx)(i.Z,{})},{name:"neutral",icon:(0,n.jsx)(t.Z,{})},{name:"slightPositive",icon:(0,n.jsx)(s.Z,{})},{name:"positive",icon:(0,n.jsx)(c.Z,{})}];return(0,n.jsx)("div",{className:v()["vote-container"],children:(0,n.jsx)(o.Z,{className:"bg-white w-full",children:y.map(e=>{var r;return(0,n.jsx)(j,{onClick:()=>{b&&b.user&&b.user.id&&Z(b.user.id,e.name,a.normalizedName)},chosen:!!(g?e.name===p:(null==b?void 0:null===(r=b.user)||void 0===r?void 0:r.id)&&a.votes[e.name].some(e=>e.id===b.user.id)),title:"Voted ".concat(e.name),name:e.name,children:e.icon},e.name)})})})}},42858:function(e,a,r){"use strict";r.d(a,{Z:function(){return y}});var n=r(85893),l=r(85413),i=r(15821),t=r(67233),s=r(96788),c=r(59591),d=r(24022),o=r(29204),u=r(84166),h=r(29346),x=r(12703),g=r(26541),v=r(51015),m=r(11163),j=r(33299),b=r(67294),f=r(93178),p=r(65806),_=r(20607),Z=e=>{let{func:a,hide:r,unvotedFunc:l,unvotedHide:i,lowQualityFunc:t,lowQualityHide:s,inCubeFunc:c,inCubeHide:d,showRetiredFunc:o,showRetired:h,hideVotesfunc:x,hideVotes:g,oracleTextFunc:v,oracleText:m,textOnlyFunc:b,textOnly:f}=e,{data:Z}
1=(0,j.useSession)();return Z?(0,n.jsxs)(u.Z,{children:[(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:a,checked:r,readOnly:!0}),label:"Hide Cards I've Already Voted On"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:l,checked:i,readOnly:!0}),label:"Hide cards I haven't already voted on"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:t,checked:s,readOnly:!0}),label:"Hide Low Quality Cards"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:o,checked:h,readOnly:!0}),label:"Show Retired Cards"}),c&&(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:c,checked:!!d,readOnly:!0}),label:"Hide cards in the cube"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:x,checked:!!g,readOnly:!0}),label:"Hide community opinions"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:v,checked:!!m,readOnly:!0}),label:"Show Oracle Text"}),(0,n.jsx)(p.Z,{control:(0,n.jsx)(_.Z,{onClick:b,checked:!!f,readOnly:!0}),label:"Show Text Only versions of cards"})]}):null},y=e=>{let{cardCount:a,hide:r=[]}=e,p=(0,m.useRouter)(),{data:_}=(0,j.useSession)(),{hideVoted:y,hideUnvoted:w,sortType:C,sortDirection:k,hideLowQuality:N,hideInCube:S,viewType:R,showRetired:O,hideVotes:z,oracleText:T,textOnly:F}=(0,f.zC)(),[I,U]=(0,b.useState)("name"),[V,B]=(0,b.useState)(1),[P,H]=(0,b.useState)("images"),{setHideVoted:L,setHideUnvoted:A,setSortType:Q,setSortDirection:E,setHideLowQuality:W,setHideInCube:G,setViewType:J,setShowRetired:D,setHideVotes:X,setOracleText:q,setTextOnly:M}=(0,f.Lb)();(0,b.useEffect)(()=>{U(C),B(k),H(R)},[]);let Y=(0,b.useRef)(null),{query:K}=p;(0,b.useEffect)(()=>{p.push({query:{...K}})},[y,C,k,w,N,S,R,O,z]);let[$,ee]=(0,b.useState)(K.search?K.search:"");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.Z,{container:!0,children:(0,n.jsxs)(s.Z,{variant:"h4",className:"pb-6",children:[a||0," Cards"]})}),(0,n.jsx)(t.Z,{container:!0,children:(0,n.jsxs)(c.Z,{className:"w-full",children:[(0,n.jsxs)(d.Z,{expandIcon:(0,n.jsx)(l.Z,{}),children:[(0,n.jsx)(i.Z,{fontSize:"medium",style:{marginRight:"10px"}})," ","Filters"]}),(0,n.jsx)(o.Z,{children:(0,n.jsxs)(t.Z,{container:!0,className:" gy-4",children:[_&&(0,n.jsx)(t.Z,{size:{lg:4},children:(0,n.jsx)(Z,{func:()=>{L(!y)},hide:y,unvotedFunc:()=>{A(!w)},unvotedHide:w,lowQualityFunc:()=>{W(!N)},lowQualityHide:N,inCubeFunc:r.includes("cube")?null:()=>{G(!S)},inCubeHide:r.includes("cube")?null:S,showRetiredFunc:()=>{D(!O)},showRetired:O,hideVotesfunc:()=>{X(!z)},hideVotes:z,oracleTextFunc:()=>{q(!T)},oracleText:T,textOnlyFunc:()=>{M(!F)},textOnly:F})}),(0,n.jsxs)(n.Fragment,{children:[!r.includes("sort")&&(0,n.jsxs)(t.Z,{size:{lg:4},children:[(0,n.jsx)(s.Z,{variant:"h6",children:"Sort Cards By"}),(0,n.jsxs)(u.Z,{direction:"row",gap:2,children:[(0,n.jsxs)(h.Z,{variant:"filled",value:I,onChange:e=>{U(e.target.value),Q(e.target.value)},children:[(0,n.jsx)(x.Z,{value:"name",children:"Name (Alphabetic)"}),(0,n.jsx)(x.Z,{value:"numOfVotes",children:"Vote Count"}),(0,n.jsx)(x.Z,{value:"nps",children:"NPS"}),(0,n.jsx)(x.Z,{value:"elo",children:"Elo"}),(0,n.jsx)(x.Z,{value:"dateLastVotedOn",children:"Last Voted On"}),(0,n.jsx)(x.Z,{value:"deckCount",children:"Number of Decks"}),(0,n.jsx)(x.Z,{value:"winRate",children:"Win rate"})]}),(0,n.jsxs)(h.Z,{variant:"filled",value:V,onChange:e=>{B(Number(e.target.value)),E(Number(e.target.value))},children:[(0,n.jsx)(x.Z,{value:"1",children:"Ascending"}),(0,n.jsx)(x.Z,{value:"-1",children:"Descending"})]})]})]}),(0,n.jsxs)(t.Z,{size:{lg:4},children:[(0,n.jsx)(s.Z,{variant:"h6",children:"View Cards As"}),(0,n.jsxs)(h.Z,{value:P,onChange:e=>{H(e.target.value),J(e.target.value)},fullWidth:!0,variant:"filled",children:[(0,n.jsx)(x.Z,{value:"images",children:"Images"}),(0,n.jsx)(x.Z,{value:"table",children:"Table"})]}),(0,n.jsx)(s.Z,{variant:"h6",children:"Search"}),(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p.push({query:{...K,page:0,search:$}})},className:"flex",children:[(0,n.jsx)(g.Z,{label:"Search",ref:Y,value:$,onChange:e=>ee(e.target.value),variant:"filled"}),(0,n.jsx)(v.Z,{variant:"contained",type:"submit",children:"Submit"})]}),$&&(0,n.jsxs)(s.Z,{variant:"body1",children:["Search Query: ",(0,n.jsx)("b",{children:$})]})]})]})]})})]})})]})}},19017:function(e){e.exports={layout:"card_layout__SXsF9","layout-vertical":"card_layout-vertical__RTACQ",nav:"card_nav__kdBf1","sets-layout":"card_sets-layout__Pu55O",chart:"card_chart__NRcGv","card-holder":"card_card-holder__AU3_B","oracle-text":"card_oracle-text__63Oaw","vote-container":"card_vote-container__UPiE9",button:"card_button__xR3_S",negative:"card_negative__Nbftl",neutral:"card_neutral__xUY5L",positive:"card_positive__LfY_z",voted:"card_voted___0KaX","card-detail
1s":"card_card-details__nS1PZ","card-image":"card_card-image__nJF6D","card-image-small":"card_card-image-small__HdOpr","card-image-negative":"card_card-image-negative__u8AJV","card-image-neutral":"card_card-image-neutral__WmTIT","card-image-positive":"card_card-image-positive__9zxdm",hover:"card_hover__yicTf","card-hover":"card_card-hover__IZJsC","set-icons":"card_set-icons__emXjQ","responsive-flex":"card_responsive-flex__wfpBo"}}}]);

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.