(this.webpackJsonpwebapp=this.webpackJsonpwebapp||[]).push([[64,3],{1317:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var c=n(75),r=(n(6),n(17)),s=n(3),a=function(e){var t=e.date,n=e.className,a=Object(r.useSelector)((function(e){return e.i18nState.lang}));if(!t)return null;var o=c.DateTime.fromISO(t).setLocale(a);return Object(s.jsx)("time",{className:n,dateTime:t,children:o.toRelative()})}},1323:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var c=n(22),r=n.n(c),s=n(5),a=n.n(s),o=(n(6),n(1349)),i=n(1310),l=n(3),d=function(e,t){var n=e.className;return Object(l.jsxs)(i.a,{color:"primary",pill:!0,className:r()("z-index-3 mb-1",n),children:[Object(l.jsx)(o.a,{className:"mr-2"}),Object(l.jsx)("span",{children:t.t("Pinned to top")})]})};d.defaultProps={className:""},d.contextTypes={t:a.a.func};var u=d},1343:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(17),r=n(100),s=function(){var e,t,n,s,a=null!==(e=null===(t=Object(r.a)().modules.nfts)||void 0===t?void 0:t.tradeAcceptDailyLimit)&&void 0!==e?e:0,o=Object(c.useSelector)((function(e){return e.account.currentUser})),i=null===o||void 0===o||null===(n=o.nft_trade_info)||void 0===n?void 0:n.daily_trade_count,l=a+(null!==(s=null===o||void 0===o?void 0:o.extra_daily_trades)&&void 0!==s?s:0);return{limit:l,limitReached:l>0&&i>=l}}},1348:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var c={duration:1500,fill:"forwards",easing:"ease-in-out"},r=function(e,t){var n=e.getClientRects()[0],r=t.getClientRects()[0],s=r.x-n.x,a=r.y-n.y,o=s>a?"horizontal":"vertical",i="horizontal"===o?s:a;!function(e,t,n){var r="horizontal"===n?"translateX":"translateY";e.animate([{offset:0,opacity:.5},{offset:.05,transform:"scale(1.1)"},{offset:.3,transform:"".concat(r,"(").concat(t/2,"px) scale(1.1)"),opacity:.65},{offset:.5,transform:"".concat(r,"(").concat(t,"px) scale(1.1)"),opacity:.8},{offset:.7,transform:"".concat(r,"(").concat(t,"px) scale(1.2)"),opacity:1},{offset:1,transform:"".concat(r,"(").concat(t,"px) scale(1.25)"),opacity:1}],c)}(e,i,o),function(e,t,n){var r="horizontal"===n?"translateX":"translateY";e.animate([{offset:0,opacity:1},{offset:.05,transform:"scale(1.1)"},{offset:.3,transform:"".concat(r,"(").concat(t/2,"px) scale(1.1)"),opacity:.8},{offset:.5,transform:"".concat(r,"(").concat(t,"px) scale(1.1)"),opacity:.6},{offset:.55,transform:"".concat(r,"(").concat(t,"px) scale(1)")},{offset:1,transform:"".concat(r,"(").concat(t,"px) scale(0.75)"),opacity:.5}],c)}(t,-i,o)}},1351:function(e,t,n){"use strict";var c=n(20),r=n(22),s=n.n(r),a=n(5),o=n.n(a),i=n(6),l=n(17),d=n(1329),u=n(738),f=n(736),j=n(737),b=n(1280),m=n(1346),O=n(1347),h=n(38),x=n(159),p=n(503),g=n(1380),v=n(1361),y=n(1358),_=n(3),N=function(e){var t=e.modalNft,n=e.nftIds,r=e.setModalNft,a=e.loadMore,o=e.loadMyNfts,N=Object(i.useState)(t?n.indexOf("".concat(t)):0),w=Object(c.a)(N,2),S=w[0],C=w[1],I=Object(i.useState)(!1),L=Object(c.a)(I,2),k=L[0],T=L[1],F=Object(i.useState)(!1),M=Object(c.a)(F,2),E=M[0],z=M[1],P=Object(i.useState)(!1),R=Object(c.a)(P,2),A=R[0],D=R[1],Y=Object(i.useState)(!1),V=Object(c.a)(Y,2),G=V[0],W=V[1],q=Object(l.useDispatch)(),H=n.length>1,U=function(){r(!1),z(!0)},B=function(){r(!1),D(!0)},J=function(){r(!1),W(!0)},X=Object(l.useSelector)((function(e){return e.nftTransfers.transfering})),Z=Object(l.useSelector)((function(e){return Object(h.e)(e,n)})),K=Z[S],Q=K&&K.user_amount>0,$=function(){if(!k){var e=S===Z.length-1?0:S+1;C(e),r(Z[e].id)}},ee=function(){if(!k){var e=0===S?Z.length-1:S-1;C(e),r(Z[e].id)}},te=function(){r(!1),q(Object(x.d)())};Object(i.useEffect)((function(){if(t){q(Object(h.l)({id:t,by_current_user:o}));var e=n.indexOf("".concat(t));e>=0&&(S!==e&&C(e),e===Z.length-1&&a&&a())}}),[t]);var ne=Z.map((function(e){return Object(_.jsx)(d.a,{onExiting:function(){return T(!0)},onExited:function(){return T(!1)},children:Object(_.jsx)(g.default,{nftId:e.id,inModal:!0,onSwap:U,onCreateOffer:H?B:void 0,onGift:J,goToPrevious:H?ee:void 0,goToNext:$,onClose:te,hidden:parseInt(t,10)!==parseInt(e.id,10)})},e.id)}));return Object(_.jsxs)(_.Fragment,{children:[Object(_.jsxs)(u.a,{isOpen:!!t,toggle:X?function(){}:te,className:s()("nftcard__modal",(null===K||void 0===K?void 0:K.rarity)?"rarity--".concat(K.rarity):""),centered:!0,size:"lg",children:[Object(_.jsx)(f.a,{toggle:X?function(){}:te}),Object(_.jsx)(j.a,{children:Object(_.jsx)(b.a,{className:s()("nftcard card--feed h-100",(null===K||void 0===K?void 0:K.rarity)?"rarity--".concat(K.rarity):""),children:Object(_.jsxs)(m.a,{activeIndex:S,next:$,previous:ee,interval:!1,className:"nft-carousel-modal",children:[Object(_.jsx)(O.a,{items:Z,activeIndex:S,onClickHandler:function(e){k||(C(e),r(Z[e].id))}}),ne]})})})]}),K&&Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(y.a,{isOpen:E,toggle:function(){return z((function(e){return!e}))},nftId:K.id,onCreateOffer:function(){z(!1),D(!0)},swappingDuplicate:Q}),Object(_.jsx)(v.a,{isOpen:A,toggle:function(){return D((function(e){return!e}))},nftId:K.id}),Object(_.jsx)(p.a,{isOpen:G,toggle:function(){return W((function(e){return!e}))},nftId:K.id.toString()})]})]})};N.contextTypes={t:o.a.func},t.a=N},1352:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(40),r=n(20),s=n(5),a=n.n(s),o=n(6),i=n(3),l=function(e,t){var n=e.filter((function(e){return!t.includes(e)}));return 0===n.length&&(n=e),n[Math.floor(Math.random()*n.length)]},d=function(e,t){var n={nfts:t.t("NFTs"),nft:t.t("NFT")},s=function(e){var t=Object(o.useState)([]),n=Object(r.a)(t,2),s=n[0],a=n[1],i=Object(o.useState)(l(e,s)),d=Object(r.a)(i,2),u=d[0],f=d[1];return Object(o.useEffect)((function(){var t=setInterval((function(){var t=l(e,s);f(t),a((function(e){return[].concat(Object(c.a)(e),[t])}))}),3500);return function(){return clearInterval(t)}}),[e,s]),u}([t.t("Rounding up digital unicorns to power your trade\u2026 \ud83e\udd84",n),t.t("Consulting with the internet elves for the best trade\u2026 \ud83e\udddd",n),t.t("Our digital hamsters are spinning the wheels of trade! Go, hamsters, go! \ud83d\udc39",n),t.t("Brewing a potion of swiftness for your {nfts}\u2026 \ud83e\uddea",n),t.t("Teaching your {nfts} to fly to their new home\u2026 \ud83d\ude80",n),t.t("Beaming your {nfts} through the cyberspace tunnel\u2026 \ud83c\udf0c",n),t.t("Engaging warp drive for hyper-speed trading\u2026 \ud83d\udcab",n),t.t("Juggling digital bits and bytes to get your trade done\u2026 \ud83e\udd39\u200d\u2642\ufe0f",n),t.t("Playing hide and seek with your {nfts} Found one! \ud83d\ude48",n),t.t("Assembling a team of digital ants to carry your trade\u2026 \ud83d\udc1c",n),t.t("{nfts} are lining up for the catwalk to their new showcase\u2026 \ud83d\udc60",n),t.t("Whispering sweet nothings to convince your {nfts} to move\u2026 \ud83d\udc8c",n),t.t("We're on a coffee break. Just kidding, finalizing your trade! \u2615",n),t.t("Rolling out the red carpet for your {nfts} grand exit\u2026 \ud83d\udcf8",n)]);return Object(i.jsx)(i.Fragment,{children:s})};d.contextTypes={t:a.a.func}},1356:function(e,t,n){"use strict";var c=n(22),r=n.n(c),s=n(5),a=n.n(s),o=(n(6),n(17)),i=n(726),l=n(235),d=n(100),u=n(3),f=function(e,t){var n=e.className,c=Object(d.a)().options.encourageFanIdWalletCreation,s=Object(o.useSelector)((function(e){return e.account.currentUser})),a=Object(l.b)(),f=a.setOperator,j=a.startCreateWallet;return s?s.uses_hotwallet&&c?Object(u.jsx)(i.a,{color:"primary",onClick:function(){return j()},className:r()("btn",n),children:t.t("Own your FanID Wallet")}):s.uses_hotwallet?null:Object(u.jsx)(i.a,{color:"primary",onClick:function(){return f()},className:r()("btn",n),children:t.t("Manage FanID Wallet Access")}):null};f.contextTypes={t:a.a.func},t.a=f},1358:function(e,t,n){"use strict";n.d(t,"a",(function(){return z}));var c=n(2),r=n.n(c),s=n(24),a=n(20),o=n(4),i=n(22),l=n.n(i),d=n(5),u=n.n(d),f=n(6),j=n(77),b=n(491),m=n(492),O=n(17),h=n(738),x=n(736),p=n(737),g=n(1301),v=n(1279),y=n(726),_=n(3),N=function(e){return Object(_.jsxs)("svg",Object(o.a)(Object(o.a)({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[Object(_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.4 8L23.6 12.2L18.4 16.4V13.4L6.20003 13.4L6.20002 26.2L19.4 26.2V25C19.4 24.2268 20.0268 23.6 20.8 23.6C21.5732 23.6 22.2 24.2268 22.2 25V26.8C22.2 28.015 21.2151 29 20 29L5.60002 29C4.385 29 3.40002 28.015 3.40002 26.8L3.40003 12.8C3.40003 11.585 4.385 10.6 5.60003 10.6H18.4V8Z",fill:"currentColor"}),Object(_.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.6 7V5.8H25.8V18.6H13.6L13.6 15.6L8.40002 20.2L13.6 24.8L13.6 21.4H26.4C27.615 21.4 28.6 20.415 28.6 19.2V5.2C28.6 3.98497 27.615 3 26.4 3H12C10.785 3 9.80002 3.98497 9.80002 5.2V7C9.80002 7.7732 10.4268 8.4 11.2 8.4C11.9732 8.4 12.6 7.7732 12.6 7Z",fill:"currentColor"})]}))},w=n(235),S=n(394),C=n(100),I=n(1343),L=n(38),k=n(78),T=n(494),F=n(318),M=n(1348),E=n(1352),z=function(e,t){var n,c=e.isOpen,i=e.toggle,d=e.onSuccess,u=e.nftId,z=e.onCreateOffer,P=e.swappingDuplicate,R=Object(I.a)(),A=R.limit,D=R.limitReached,Y=Object(f.useState)("choice"),V=Object(a.a)(Y,2),G=V[0],W=V[1],q=Object(f.useState)(""),H=Object(a.a)(q,2),U=H[0],B=H[1],J=Object(O.useDispatch)(),X=Object(f.useState)({confirming:!1,success:!1,error:!1}),Z=Object(a.a)(X,2),K=Z[0],Q=Z[1],$=Object(w.b)().setApprovalForAll,ee=function(){var e=Object(O.useDispatch)(),t=Object(O.useSelector)((function(e){return e.nfts.listFilters})),n=Object(O.useSelector)((function(e){return e.nfts.tradableListFilters})),c=Object(O.useSelector)((function(e){return e.nftTradeRequests.listFilters}));return Object(f.useCallback)((function(){e(Object(L.h)(t?Object(o.a)({},t):{})),e(Object(k.g)(c?Object(o.a)({},c):{})),e(Object(L.i)(c?Object(o.a)({},n):{}))}),[e,t,n,c])}(),te=Object(O.useSelector)((function(e){return Object(L.c)(e,u)})),ne=Object(C.a)().modules.nfts.tradeAcceptDailyLimit,ce=Object(O.useSelector)((function(e){var t;return null===e||void 0===e||null===(t=e.nfts)||void 0===t?void 0:t.dailyTradeCount})),re=Object(O.useSelector)((function(e){return e.nfts.tradableIdsList})),se=Object(O.useSelector)((function(e){return e.nfts.loadingTradableList})),ae=Object(O.useSelector)((function(e){return e.nfts.tradableListPage})),oe=ne+(Object(O.useSelector)((function(e){var t;return null===(t=e.account.currentUser)||void 0===t?void 0:t.extra_daily_trades}))||0)-ce===1,ie=Object(f.useMemo)((function(){return 1===ae&&se}),[ae,se]),le=Object(S.b)((function(e){var t=e.nfts;return{loading:t.loadingTradableList,filters:t.tradableListFilters,totalCount:t.tradableListTotalCount,page:t.tradableListPage,list:t.tradableIdsList}}),L.i),de=null!==(n=Object(S.a)("#divider","#alerts"))&&void 0!==n?n:0,ue=Object(O.useSelector)((function(e){return e.nftTradeRequests})),fe=ue.tradingNfts,je=ue.tradedNfts,be=ue.tradeNftsError,me=Object(O.useSelector)((function(e){var t;return null===(t=Object(L.c)(e,u))||void 0===t?void 0:t.name})),Oe=Object(O.useSelector)((function(e){var t;return null===(t=Object(L.c)(e,U))||void 0===t?void 0:t.name}));Object(f.useEffect)((function(){1===re.length&&B(re[0])}),[re]);var he=Object(f.useRef)(!0);Object(f.useEffect)((function(){he.current?he.current=!1:Q({confirming:fe,success:je,error:!!be})}),[fe,je,be]),Object(f.useEffect)((function(){c&&J(Object(L.i)({tradable_for_nft_id:u}))}),[c,J,u]),Object(f.useEffect)((function(){if(K.success){var e=Array.from(document.querySelectorAll(".nft-".concat(u))).filter((function(e){return e.clientHeight>0}))[0],t=Array.from(document.querySelectorAll(".nft-".concat(U))).filter((function(e){return e.clientHeight>0}))[0];e&&t&&(P?Object(M.a)(t,e):Object(M.a)(e,t))}}),[u,ee,U,P,K.success]);var xe=function(){if(!K.confirming){if(c){W("choice"),B("");var e=K.success;Q({confirming:!1,success:!1,error:!1}),e&&ee()}i()}},pe=Object(_.jsxs)("div",{className:"d-flex flex-column flex-md-row w-full",style:{gap:"1em",maxHeight:400},children:[Object(_.jsxs)("div",{className:"d-flex justify-content-center align-items-center",children:[Object(_.jsx)(F.a,{className:"d-md-none",nftId:u,size:"lg"}),Object(_.jsx)(F.a,{className:"d-none d-md-flex",nftId:u,size:"xl"})]}),Object(_.jsxs)("div",{className:"d-flex flex-row flex-md-column justify-content-center align-items-center text-muted",style:{gap:"1em"},id:"divider",children:[Object(_.jsx)("div",{className:"d-none d-md-block bg-muted h-100",style:{width:"1px"}}),Object(_.jsx)("div",{className:"d-md-none bg-muted w-100",style:{height:"1px"}}),Object(_.jsx)(N,{width:50,height:50}),Object(_.jsx)("div",{className:"d-none d-md-block bg-muted h-100",style:{width:"1px"}}),Object(_.jsx)("div",{className:"d-md-none bg-muted w-100",style:{height:"1px"}})]}),ie&&Object(_.jsx)(T.a,{layout:"nfts-sm"}),!ie&&Object(_.jsx)(b.a,Object(o.a)(Object(o.a)({},le),{},{height:de<100?350:de,loader:Object(_.jsx)("p",{className:"pb-3 text-center text-muted",children:t.t("Loading")}),endMessage:ae>1&&Object(_.jsx)("p",{className:"pb-3 text-center text-muted",children:se?t.t("Loading"):t.t("Yay! You have seen it all")}),children:Object(_.jsx)(m.a,{breakpointCols:{default:3,767:3},className:"nftslist__grid pr-3",columnClassName:"nftslist__grid__column",children:null===re||void 0===re?void 0:re.map((function(e){return Object(_.jsx)(F.a,{nftId:e,size:"external",selected:U===e,onSelect:function(){return B(e)}},"nfts_".concat(e))}))})}))]}),ge=function(){var e=Object(s.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:J(k.a.tradeNfts({requested_nft:P?u:U,traded_nft:P?U:u}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ve=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Object(_.jsx)(F.a,{className:l()(e,"nft-".concat(P?U:u).concat(n),{"swap-nft-modal__swapping-nft":K.confirming}),nftId:P?U:u,size:t,style:{opacity:.5}})},ye=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return Object(_.jsx)(F.a,{className:l()(e,"nft-".concat(P?u:U).concat(n),{"swap-nft-modal__swapping-nft":K.confirming}),nftId:P?u:U,size:t})},_e=Object(_.jsxs)("div",{className:"d-flex flex-column align-items-center mt-3",style:{gap:"2rem"},children:[Object(_.jsxs)("div",{className:"d-flex flex-column flex-md-row justify-content-center align-items-center",children:[Object(_.jsxs)("div",{className:"d-flex justify-content-center",children:[ve("d-none d-md-flex","lg"),ve("d-md-none","md")]}),Object(_.jsxs)("div",{className:"d-none d-md-flex flex-column mx-5",children:[Object(_.jsx)(j.c,{width:40,height:30}),Object(_.jsx)(j.d,{width:40,height:30})]}),Object(_.jsxs)("div",{className:"d-flex d-md-none flex-row my-5",children:[Object(_.jsx)(j.e,{width:40,height:30}),Object(_.jsx)(j.a,{width:40,height:30})]}),Object(_.jsxs)("div",{className:"d-flex justify-content-center",children:[ye("d-none d-md-flex","lg"),ye("d-md-none","md")]})]}),Object(_.jsx)("p",{className:"mt-5",children:t.t("You will receive {receivedNft} and give away {tradedNft}",{receivedNft:Object(_.jsx)("span",{className:"font-weight-bold",children:P?Oe:me}),tradedNft:Object(_.jsx)("span",{className:"font-weight-bold",children:P?me:Oe})})})]});return te?Object(_.jsxs)(h.a,{isOpen:c,toggle:xe,className:"nftcard__modal swap-nft-modal",centered:!0,size:"lg",children:[Object(_.jsxs)(x.a,{toggle:xe,children:["choice"===G&&t.t("Swap {nft}",{nft:t.t("NFT")}),"confirm-swap"===G&&t.t("Confirm swap")]}),Object(_.jsx)(p.a,{className:"d-flex d-md-block w-100",children:Object(_.jsxs)("div",{className:"d-flex d-md-block flex-column w-100",children:["choice"===G&&!P&&Object(_.jsx)("p",{id:"text",children:t.t("Select one of your duplicate {nfts} to swap for {nftName}.",{nfts:t.t("NFTs"),nftName:Object(_.jsx)("span",{className:"font-weight-bold",children:te.name})})}),"choice"===G&&P&&Object(_.jsx)("p",{id:"text",children:t.t("Select an {nft} that you would like to trade your duplicate {nftName} for.",{nft:t.t("NFT"),nftName:Object(_.jsx)("span",{className:"font-weight-bold",children:te.name})})}),Object(_.jsxs)("div",{className:"d-flex d-md-block flex-column justify-content-between",style:{flexGrow:1},children:[Object(_.jsxs)("div",{className:"d-flex d-md-block flex-column",style:{flexGrow:1},children:["choice"===G&&pe,"confirm-swap"===G&&_e]}),Object(_.jsxs)("div",{id:"alerts",children:[K.confirming&&Object(_.jsx)(g.a,{className:"text-center mt-5",color:"info",children:Object(_.jsx)(E.a,{})}),K.success&&Object(_.jsx)(g.a,{className:"text-center mt-5",color:"success",children:t.t("Swap successful!")}),K.error&&Object(_.jsx)(g.a,{className:"text-center mt-5",color:"danger",children:t.t("Error while swapping. Someone else might have been faster.")}),oe&&!K.confirming&&!K.success&&!K.error&&Object(_.jsx)(g.a,{className:"text-center mt-5",color:"warning",children:t.t("This is the last swap you can do for today. More will unlock tomorrow.")}),D&&Object(_.jsx)(g.a,{color:"warning",className:"text-center mt-5",children:t.t("You reached your maximum of {limit} trades for today. Check back later.",{limit:A})})]})]})]})}),Object(_.jsxs)(v.a,{className:D?"":"px-4",children:["choice"===G&&!D&&Object(_.jsxs)(_.Fragment,{children:[z&&!P&&Object(_.jsx)(y.a,{color:"primary",outline:!0,onClick:z,children:t.t("Make an offer")}),Object(_.jsx)(y.a,{color:"primary",onClick:function(){return W("confirm-swap")},disabled:!U,children:t.t("Swap now")})]}),D&&Object(_.jsx)(y.a,{color:"primary",outline:!0,onClick:xe,children:t.t("Close")}),"confirm-swap"===G&&!D&&Object(_.jsxs)(_.Fragment,{children:[!K.success&&Object(_.jsx)(y.a,{color:"primary",outline:!0,onClick:function(){return W("choice")},disabled:K.confirming,children:t.t("Back")}),K.success?Object(_.jsx)(y.a,{color:"primary",onClick:function(){xe(),null===d||void 0===d||d()},children:t.t("Close")}):Object(_.jsx)(y.a,{color:"primary",onClick:ge,disabled:K.confirming,children:t.t("Confirm")})]})]})]}):null};z.contextTypes={t:u.a.func}},1361:function(e,t,n){"use strict";var c=n(2),r=n.n(c),s=n(24),a=n(20),o=n(40),i=n(4),l=n(22),d=n.n(l),u=n(5),f=n.n(u),j=n(6),b=n(77),m=n(491),O=n(492),h=n(17),x=n(1290),p=n(1292),g=n(1301),v=n(726),y=n(738),_=n(736),N=n(737),w=n(1279),S=n(235),C=n(394),I=n(38),L=n(78),k=n(494),T=n(318),F=n(502),M=n(3),E=function(e){return{stepIndex:e?1:0,wantedNftId:e,stepValid:!1,offeredNftIds:[]}},z=function(e){switch(e.stepIndex){case 0:return!!e.wantedNftId;case 1:return e.offeredNftIds.length>0;default:return!1}},P=function(e,t){switch(t.type){case"next-step":return Object(i.a)(Object(i.a)({},e),{},{stepIndex:e.stepIndex+1});case"previous-step":return Object(i.a)(Object(i.a)({},e),{},{stepIndex:e.stepIndex-1});case"select-wanted":return Object(i.a)(Object(i.a)({},e),{},{wantedNftId:t.wantedNftId});case"toggle-offered":return function(e,t){return e.offeredNftIds.includes(t)?Object(i.a)(Object(i.a)({},e),{},{offeredNftIds:e.offeredNftIds.filter((function(e){return e!==t}))}):e.offeredNftIds.length<5?Object(i.a)(Object(i.a)({},e),{},{offeredNftIds:[].concat(Object(o.a)(e.offeredNftIds),[t])}):e}(e,t.offeredNftId);case"set-create-error":return Object(i.a)(Object(i.a)({},e),{},{createErrorMsg:t.createErrorMsg});case"reset":return E(t.wantedNftId);default:return e}},R=function(e,t){var n=e.state,c=e.dispatch,r=Object(h.useSelector)((function(e){return e.nfts.tradableIdsList})),s=Object(h.useSelector)((function(e){return e.nfts.loadingTradableList})),a=Object(h.useSelector)((function(e){return e.nfts.tradableListPage})),o=Object(h.useSelector)((function(e){return e.nfts.tradableListFilters})),l=o&&o.search?o.search:null,d=Object(j.useMemo)((function(){return 1===a&&s}),[a,s]),u=Object(C.b)((function(e){var t=e.nfts;return{loading:t.loadingTradableList,filters:t.tradableListFilters,totalCount:t.tradableListTotalCount,page:t.tradableListPage,list:t.tradableIdsList}}),I.i),f=Object(h.useDispatch)(),b=Object(C.a)("#form",".modal-footer",40);Object(j.useEffect)((function(){f(Object(I.i)({sort_by:o.sort_by,sort_direction:o.sort_direction,tradable_unowned_by_current_user:!0}))}),[f]);return Object(M.jsxs)("div",{children:[Object(M.jsx)("h4",{id:"text",children:t.t("Select {nft} you want to receive",{nft:t.t("NFT")})}),Object(M.jsx)("p",{children:t.t("Select the {nft} you want to receive in exchange for one of you duplicate {nfts}.",{nft:t.t("NFT"),nfts:t.t("NFTs")})}),Object(M.jsxs)(x.a,{className:"d-flex flex-column flex-md-row align-items-end align-items-md-center",id:"form",style:{rowGap:"0.75rem"},children:[Object(M.jsx)(p.a,{className:"mr-md-3",type:"text",placeholder:t.t("Search"),onChange:function(e){var t=e.target.value;(null===t||void 0===t?void 0:t.length)&&(null===t||void 0===t?void 0:t.length)>1?f(Object(I.i)({sort_by:o.sort_by,sort_direction:o.sort_direction,page:1,search:t,tradable_unowned_by_current_user:!0})):l&&f(Object(I.i)({sort_by:o.sort_by,sort_direction:o.sort_direction,page:1,tradable_unowned_by_current_user:!0}))}}),Object(M.jsx)(F.a,{filters:o,onChange:function(e){return f(Object(I.i)(e))}})]}),d&&Object(M.jsx)(k.a,{layout:"nfts"}),void 0!==b&&!d&&Object(M.jsx)(m.a,Object(i.a)(Object(i.a)({},u),{},{loader:Object(M.jsx)("p",{className:"pb-3 text-center text-muted",children:t.t("Loading")}),endMessage:(a>1||!r.length)&&Object(M.jsx)("p",{className:"pb-3 text-center text-muted",children:s?t.t("Loading"):t.t("Yay! You have seen it all")}),height:b,children:Object(M.jsx)(O.a,{breakpointCols:{default:3,767:2},className:"nftslist__grid pr-3",columnClassName:"nftslist__grid__column",children:null===r||void 0===r?void 0:r.map((function(e){return Object(M.jsx)(T.a,{nftId:e,size:"external",selected:n.wantedNftId===e,onSelect:function(){return c({type:"select-wanted",wantedNftId:e})}},"nfts_".concat(e))}))})}))]})};R.contextTypes={t:f.a.func};var A=function(e,t){var n=e.state,c=e.dispatch,r=Object(h.useDispatch)(),s=Object(h.useSelector)((function(e){return e.nfts.tradableIdsList})),a=Object(h.useSelector)((function(e){return Object(I.c)(e,n.wantedNftId)})),o=Object(h.useSelector)((function(e){return e.nfts.loadingTradableList})),l=Object(h.useSelector)((function(e){return e.nfts.tradableListPage})),d=Object(h.useSelector)((function(e){return e.nfts.tradableListFilters})),u=d&&d.search?d.search:null,f=Object(j.useMemo)((function(){return 1===l&&o}),[l,o]);Object(j.useEffect)((function(){var e="copies"===d.sort_by?"collection":d.sort_by;r(Object(I.i)({tradable_duplicates_of_current_user:!0,sort_by:e,sort_direction:d.sort_direction}))}),[r]);var b=Object(C.b)((function(e){var t=e.nfts;return{loading:t.loadingTradableList,filters:t.tradableListFilters,totalCount:t.tradableListTotalCount,page:t.tradableListPage,list:t.tradableIdsList}}),I.i),v=Object(C.a)("#text",".modal-footer",50);return Object(M.jsxs)("div",{className:"px-3",children:[Object(M.jsx)("h4",{id:"text",children:t.t("Select {nfts} you want to give away",{nfts:t.t("NFTs")})}),Object(M.jsx)("p",{children:t.t("Select the {nfts} you would give away in exchange for {requestedName}. Others can choose one of those to trade with.",{nfts:t.t("NFTs"),requestedName:Object(M.jsx)("span",{className:"font-weight-bold",children:null===a||void 0===a?void 0:a.name})})}),Object(M.jsxs)(x.a,{className:"d-flex flex-column flex-md-row align-items-end align-items-md-center",id:"form",style:{rowGap:"0.75rem"},children:[Object(M.jsx)(p.a,{className:"mr-md-3",type:"text",placeholder:t.t("Search"),onChange:function(e){var t=e.target.value;(null===t||void 0===t?void 0:t.length)&&(null===t||void 0===t?void 0:t.length)>1?r(Object(I.i)({sort_by:d.sort_by,sort_direction:d.sort_direction,page:1,search:t,tradable_duplicates_of_current_user:!0})):u&&r(Object(I.i)({sort_by:d.sort_by,sort_direction:d.sort_direction,page:1,tradable_duplicates_of_current_user:!0}))}}),Object(M.jsx)(F.a,{showCopiesOption:!0,filters:d,onChange:function(e){return r(Object(I.i)(e))}})]}),f&&Object(M.jsx)(k.a,{layout:"nfts"}),void 0!==v&&!f&&Object(M.jsxs)(m.a,Object(i.a)(Object(i.a)({},b),{},{height:v,loader:Object(M.jsx)("p",{className:"pb-3 text-center text-muted",children:t.t("Loading")}),endMessage:(l>1||!s.length)&&Object(M.jsx)("p",{className:"pb-3 text-center text-muted",children:o?t.t("Loading"):t.t("Yay! You have seen it all")}),children:[!u&&0===s.length&&Object(M.jsx)(g.a,{className:"text-center",color:"warning",children:t.t("You have no duplicate {nfts} to trade away.",{nfts:t.t("NFTs")})}),Object(M.jsx)(O.a,{breakpointCols:{default:3,767:2},className:"nftslist__grid pr-3",columnClassName:"nftslist__grid__column",children:null===s||void 0===s?void 0:s.map((function(e){return Object(M.jsx)(T.a,{nftId:e,size:"external",selected:n.offeredNftIds.includes(e),onSelect:function(){return c({type:"toggle-offered",offeredNftId:e})},showUserAmount:!0},"nfts_".concat(e))}))})]}))]})};A.contextTypes={t:f.a.func};var D=function(e,t){var n=e.state,c=Object(h.useSelector)((function(e){var t;return null===(t=Object(I.c)(e,n.wantedNftId))||void 0===t?void 0:t.name})),r=Object(h.useSelector)((function(e){return n.offeredNftIds.map((function(t){var n;return null===(n=Object(I.c)(e,t))||void 0===n?void 0:n.name}))}));return Object(M.jsxs)("div",{children:[Object(M.jsx)("h4",{className:"mb-3",children:t.t("Confirm your offer")}),Object(M.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center",children:[Object(M.jsx)("div",{className:"d-flex justify-content-center",children:n.wantedNftId&&Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)(T.a,{className:"d-none d-md-flex",nftId:n.wantedNftId,size:"xl",style:{opacity:.5}}),Object(M.jsx)(T.a,{className:"d-md-none",nftId:n.wantedNftId,size:"lg",style:{opacity:.5}})]})}),Object(M.jsxs)("div",{className:"d-flex flex-row my-5",children:[Object(M.jsx)(b.e,{width:40,height:30}),Object(M.jsx)(b.a,{width:40,height:30})]}),Object(M.jsx)("div",{className:"d-flex justify-content-center flex-wrap",style:{gap:"1rem"},children:n.offeredNftIds.map((function(e){return Object(M.jsxs)(M.Fragment,{children:[Object(M.jsx)(T.a,{className:"d-none d-md-flex",nftId:e,size:"md"},e),Object(M.jsx)(T.a,{className:"d-md-none",nftId:e,size:"sm"},e)]})}))}),Object(M.jsx)("p",{className:"mt-5",children:t.t("Others can give you their {nftName} in exchange for one of your duplicate {nfts}:",{nfts:t.t("NFTs"),nftName:Object(M.jsx)("span",{className:"font-weight-bold",children:c})})}),Object(M.jsx)("ul",{children:r.map((function(e){return Object(M.jsx)("li",{className:"font-weight-bold",children:e},e)}))})]})]})};D.contextTypes={t:f.a.func};var Y=function(e){var t=e.step,n=e.titles;return Object(M.jsx)("div",{className:"d-flex flex-row px-5 py-3 align-items-center",style:{gap:"0.25rem"},children:n.map((function(e,c){return Object(M.jsxs)(M.Fragment,{children:[Object(M.jsxs)("div",{className:"d-flex flex-column justify-content-center align-items-center position-relative",children:[Object(M.jsx)("span",{className:"position-absolute small",style:{top:-25,whiteSpace:"nowrap"},children:e}),Object(M.jsx)("div",{className:d()("rounded-circle",{"border-primary":c===t,"border-dark":c!==t}),style:{height:"25px",width:"25px",borderWidth:"5px",borderStyle:"solid"}})]}),c<n.length-1&&Object(M.jsx)("hr",{className:"border-muted",style:{flexGrow:1}})]})}))})},V=function(e,t){var n=e.state,c=e.dispatch,r=e.onConfirm,s=e.isConfirming,a=e.errorMsg;return Object(M.jsxs)("div",{className:"d-flex flex-row align-items-center justify-content-end w-100 px-3",style:{gap:"1rem"},children:[a&&2===n.stepIndex&&Object(M.jsx)("span",{className:"text-danger",style:{flexGrow:1},children:t.t("Could not create the trade offer. Please refresh and try again.")}),1===n.stepIndex&&Object(M.jsx)("span",{style:{flexGrow:1},children:t.t("Selected {count} / {max}",{count:Object(M.jsx)("span",{className:"font-weight-bold",children:n.offeredNftIds.length}),max:5})}),n.stepIndex>0&&Object(M.jsx)(v.a,{color:"primary",outline:!0,onClick:function(){return c({type:"previous-step"})},children:t.t("Back")}),n.stepIndex<2&&Object(M.jsx)(v.a,{color:"primary",onClick:function(){return c({type:"next-step"})},disabled:!z(n),children:t.t("Next")}),2===n.stepIndex&&Object(M.jsx)(v.a,{color:"primary",onClick:r,disabled:s,children:t.t("Confirm")})]})};V.contextTypes={t:f.a.func};var G=function(e,t){var n=e.nftId,c=e.isOpen,o=e.toggle,l=Object(j.useReducer)(P,E(n)),d=Object(a.a)(l,2),u=d[0],f=d[1],b=Object(S.b)().setApprovalForAll,m={state:u,dispatch:f},O=Object(h.useDispatch)();Object(j.useEffect)((function(){c&&f({type:"reset",wantedNftId:n})}),[c,n]);var x=function(){var e=Object(s.a)(r.a.mark((function e(){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:O(Object(L.b)({nftTradeRequest:{requested_nft_id:u.wantedNftId?parseInt(u.wantedNftId,10):void 0,nft_ids:u.offeredNftIds}}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=Object(h.useSelector)((function(e){return e.nftTradeRequests})),g=p.creating,v=p.created,C=p.createError;return Object(j.useEffect)((function(){C&&f({type:"set-create-error",createErrorMsg:JSON.stringify(C,null,2)})}),[C]),Object(j.useEffect)((function(){v&&c&&o()}),[v]),Object(M.jsxs)(y.a,{isOpen:c,toggle:o,className:"create-offer-modal",centered:!0,size:"lg",children:[Object(M.jsx)(_.a,{toggle:o,tag:"div",className:"w-100",children:Object(M.jsx)(Y,{step:u.stepIndex,titles:[t.t("What you want"),t.t("Your offer"),t.t("Confirm")]})}),Object(M.jsxs)(N.a,{children:[0===u.stepIndex&&Object(M.jsx)(R,Object(i.a)({},m)),1===u.stepIndex&&Object(M.jsx)(A,Object(i.a)({},m)),2===u.stepIndex&&Object(M.jsx)(D,Object(i.a)({},m))]}),Object(M.jsx)(w.a,{children:Object(M.jsx)(V,{state:u,dispatch:f,onConfirm:x,isConfirming:g,errorMsg:u.createErrorMsg})})]})};G.contextTypes={t:f.a.func},t.a=G},1367:function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return O}));var c=n(22),r=n.n(c),s=(n(6),n(17)),a=n(5),o=n.n(a),i=n(99),l=n(1310),d=n(3),u=function(e,t){var n=e.to,c=e.isActive;return e.isEnhanced?Object(d.jsx)(i.a,{to:n,className:r()("enhanced-categories--link text-uppercase",c&&"enhanced-categories--link__active"),children:Object(d.jsx)("span",{children:t.t("Show all")})}):Object(d.jsx)(i.a,{to:n,className:"mr-1",children:Object(d.jsx)(l.a,{color:c?"primary":"light",pill:!0,tag:"span",role:"button",children:t.t("Show all")})})};u.contextTypes={t:o.a.func};var f=function(e){var t,n,c=e.to,s=e.isActive,a=e.category;return e.isEnhanced?Object(d.jsxs)(i.a,{to:c,className:r()("enhanced-categories--link",s&&"enhanced-categories--link__active"),style:{"--enhanced-categories--link__bg":a.bg_color,"--enhanced-categories--link__text":a.text_color},children:[a.category_medium&&Object(d.jsx)("img",{src:a.category_medium.original_tiny,alt:a.title,width:null!==(t=a.category_medium.dimensions.width)&&void 0!==t?t:void 0,height:null!==(n=a.category_medium.dimensions.height)&&void 0!==n?n:void 0,className:"enhanced-categories--image"}),Object(d.jsx)("span",{children:a.title})]}):Object(d.jsx)(i.a,{to:c,className:"mr-1",children:Object(d.jsx)(l.a,{color:s?"primary":"light",tag:"span",role:"button",pill:!0,children:a.title})})},j=function(e){var t=e.basePath,n=e.categorySlug,c=Object(s.useSelector)((function(e){return e.feeditems.availableCategories})),a=function(e){return n===e||!n&&"all"===e};if(!(null===c||void 0===c?void 0:c.length))return null;var o=c.some((function(e){return e.category_medium}));return Object(d.jsxs)("div",{className:r()("my-3",o&&"enhanced-categories"),children:[Object(d.jsx)(u,{to:t,isActive:a("all"),isEnhanced:o}),c.map((function(e){return Object(d.jsx)(f,{to:"".concat(t,"/").concat(e.slug),category:e,isActive:a(e.slug),isEnhanced:o},e.id)}))]})},b=n(40),m=n(1299),O=function(e){var t=e.excludedEntities,n=e.basePath,c=e.categorySlug,a=Object(s.useSelector)((function(e){return e.shopproducts.availableCategories})),o=Object(s.useSelector)((function(e){return e.nftCollections.availableCategories})),i=Object(s.useSelector)((function(e){return e.nfts.availableCategories})),l=Object(s.useSelector)((function(e){return e.routes})),j=[].concat(Object(b.a)((null===t||void 0===t?void 0:t.includes("nftPacks"))?[]:a||[]),Object(b.a)((null===t||void 0===t?void 0:t.includes("nftCollections"))?[]:o||[]),Object(b.a)((null===t||void 0===t?void 0:t.includes("nfts"))?[]:i||[])).reduce((function(e,t){return e.find((function(e){return e.id===t.id}))?e:[].concat(Object(b.a)(e),[t])}),[]),O=function(e){return c===e||!c&&"all"===e};if(!(null===j||void 0===j?void 0:j.length))return null;var h=j.some((function(e){return e.category_medium}));return Object(d.jsxs)(m.a,{className:r()("mb-3",h&&"enhanced-categories"),children:[Object(d.jsx)(u,{to:n,isActive:O("all"),isEnhanced:h}),j.map((function(e){return Object(d.jsx)(f,{to:"".concat(n).concat(l.category,"/").concat(e.slug),category:e,isActive:O(e.slug),isEnhanced:h},e.id)}))]})}},1384:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));n(1356);var c=n(22),r=n.n(c),s=n(5),a=n.n(s),o=(n(6),n(17)),i=n(726),l=n(235),d=n(100),u=n(3),f=function(e,t){var n=e.className,c=e.wrapperClassName,s=Object(d.a)().options.encourageFanIdWalletCreation,a=Object(o.useSelector)((function(e){return e.account.currentUser})),f=Object(l.b)().startCreateWallet,j=function(){return Object(u.jsx)(i.a,{color:"primary",onClick:function(){return f()},className:r()("btn",n),children:t.t("Own your FanID Wallet")})};return(null===a||void 0===a?void 0:a.uses_hotwallet)&&s?c?Object(u.jsx)("div",{className:c,children:j()}):j():null};f.contextTypes={t:a.a.func};var j=f},1397:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var c=n(22),r=n.n(c),s=n(5),a=n.n(s),o=(n(6),n(36)),i=n.n(o),l=n(17),d=n(99),u=n(1280),f=n(1293),j=n(1294),b=n(1311),m=n(1295),O=n(1310),h=n(1297),x=n(316),p=n(105),g=n(136),v=n(1323),y=n(1318),_=n(3),N=i()({loader:function(){return n.e(26).then(n.bind(null,1394))},loading:function(){return null},modules:["ContentMedia"]}),w=function(e,t){var n,c,s=e.nftCollectionId,a=e.handleShowCollection,o=e.homeFeed,i=e.skipLazyLoading,w=Object(l.useSelector)((function(e){return e.constants})),S=Object(l.useSelector)((function(e){return e.routes})),C=Object(l.useSelector)((function(e){return e.i18nState.lang})),I=Object(l.useSelector)((function(e){return Object(p.d)(e,s)})),L=Object(l.useSelector)((function(e){return Object(p.e)(e,s)})),k=Object(l.useSelector)((function(e){var t,n;return Object(x.d)(e,null===L||void 0===L||null===(t=L.hero_medium)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id)})),T=null===I||void 0===I?void 0:I.is_pinned,F=(null===I||void 0===I?void 0:I.total_nfts_amount)&&(null===I||void 0===I?void 0:I.total_nfts_amount_left)?100-Math.trunc(100/I.total_nfts_amount*I.total_nfts_amount_left):0===(null===I||void 0===I?void 0:I.total_nfts_amount_left)&&100,M=null===L||void 0===L||null===(n=L.sponsor)||void 0===n||null===(c=n.data)||void 0===c?void 0:c.id;return Object(_.jsx)(u.a,{className:r()("nftcollectioncard card--feed mb-3 cursor-pointer overflow-hidden"),"data-testid":"nft-collection-card",children:Object(_.jsxs)(f.a,{noGutters:!0,children:[Object(_.jsxs)(j.a,{md:12,children:[Object(_.jsx)(d.a,{to:"/".concat(C,"/").concat(S.nfts,"/").concat(S.showroom,"/").concat(null===I||void 0===I?void 0:I.slug,"/"),children:Object(_.jsxs)("div",{className:"nftcollectioncard__imagewrapper",children:[k&&Object(_.jsx)(N,{heroMedium:k,availableForUser:!0,resourceId:s,resourceType:w.resourceTypes.nftCollection,isPreview:!0,isListEntry:!0,noAspectRatio:!0,skipLazyLoading:i}),!!(null===I||void 0===I?void 0:I.nfts_count)&&Object(_.jsx)("span",{className:"nftcollectioncard__collected",children:Object(_.jsxs)("span",{className:"nftcard__amount d-flex align-items-center",children:[(null===I||void 0===I?void 0:I.collected_by_user)>0&&(null===I||void 0===I?void 0:I.collected_by_user)<(null===I||void 0===I?void 0:I.nfts_count)&&Object(_.jsx)(g.a,{type:"icon-checkbox-fill",className:"mr-1"}),(null===I||void 0===I?void 0:I.collected_by_user)===(null===I||void 0===I?void 0:I.nfts_count)&&Object(_.jsx)(g.a,{type:"icon-verified",className:"mr-1"}),!!(null===I||void 0===I?void 0:I.collected_by_user)&&(null===I||void 0===I?void 0:I.collected_by_user)>0&&Object(_.jsxs)("span",{children:[Object(_.jsxs)("strong",{children:[null===I||void 0===I?void 0:I.collected_by_user,"\xa0"]}),Object(_.jsxs)("span",{children:[t.t("of"),"\xa0"]})]}),Object(_.jsxs)("span",{children:[null===I||void 0===I?void 0:I.nfts_count,"\xa0"]}),(null===I||void 0===I?void 0:I.collected_by_user)&&(null===I||void 0===I?void 0:I.collected_by_user)>0?Object(_.jsx)("span",{children:t.t("collected")}):Object(_.jsx)("span",{children:t.t("items")})]})}),!!(null===I||void 0===I?void 0:I.total_nfts_amount)&&Object(_.jsx)("span",{className:"nftcollectioncard__amount",children:Object(_.jsxs)("span",{className:"nftcard__amount d-flex align-items-center",children:[!!(null===I||void 0===I?void 0:I.total_nfts_amount_left)&&Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)("b",{children:null===I||void 0===I?void 0:I.total_nfts_amount_left}),"\xa0",t.t("of")," "]}),0===(null===I||void 0===I?void 0:I.total_nfts_amount_left)&&Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)("b",{children:"0"})," ",t.t("of")," "]}),null===I||void 0===I?void 0:I.total_nfts_amount," ",(!!(null===I||void 0===I?void 0:I.total_nfts_amount_left)||0===(null===I||void 0===I?void 0:I.total_nfts_amount_left))&&t.t("left")]})}),!!F&&!!(null===I||void 0===I?void 0:I.total_nfts_amount)&&Object(_.jsx)("span",{className:"nftcollectioncard__amountgone",children:Object(_.jsx)("span",{className:r()("nftcard__amount d-flex align-items-center",{"text-primary":F>=80}),children:Object(_.jsx)("b",{children:"".concat(F,"% ").concat(t.t("gone"))})})}),!!(null===I||void 0===I?void 0:I.complete_users_count)&&Object(_.jsx)("span",{className:"nftcollectioncard__completioncount",children:Object(_.jsxs)("span",{className:"nftcard__amount d-flex align-items-center",children:[Object(_.jsx)("b",{children:null===I||void 0===I?void 0:I.complete_users_count}),"\xa0",t.t("times completed")]})})]})}),(null===I||void 0===I?void 0:I.collected_by_user)>0&&Object(_.jsx)(b.a,{color:"primary",className:"position-absolute z-index-2",style:{left:0,right:0,top:0,borderRadius:0,height:"8px"},value:100/(null===I||void 0===I?void 0:I.nfts_count)*(null===I||void 0===I?void 0:I.collected_by_user)}),Object(_.jsx)("div",{className:"position-absolute d-flex justify-content-center",style:{left:0,right:0,bottom:"-20px"},children:Object(_.jsxs)(d.a,{to:"/".concat(C,"/").concat(S.nfts,"/").concat(S.showroom,"/").concat(null===I||void 0===I?void 0:I.slug,"/"),className:"btn btn-primary fw-bold rounded-pill mt-3",children:[Object(_.jsx)(g.a,{type:"icon-nft",className:"mr-1"}),Object(_.jsx)("strong",{children:t.t("{nft} Collection",{nft:t.t("NFT")})})]})})]}),Object(_.jsx)(j.a,{md:12,onClick:function(){return a(null===I||void 0===I?void 0:I.slug)},children:Object(_.jsxs)(m.a,{className:"mt-3",children:[Object(_.jsx)(_.Fragment,{children:M&&Object(_.jsx)("div",{className:"d-flex mb-2",children:Object(_.jsx)(y.a,{sponsorId:M})})}),Object(_.jsx)("div",{className:"h3 mb-1",children:null===I||void 0===I?void 0:I.title}),o&&T&&Object(_.jsx)(v.a,{}),(null===I||void 0===I?void 0:I.content_category)&&Object(_.jsx)("span",{children:Object(_.jsx)(O.a,{color:"primary",pill:!0,className:"mb-2 mr-1",children:I.content_category})}),!o&&Object(_.jsx)(h.a,{className:"text-medium",children:null===I||void 0===I?void 0:I.preview})]})})]})})};w.defaultProps={homeFeed:!1,skipLazyLoading:!1},w.contextTypes={t:a.a.func};var S=w},1422:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var c=n(22),r=n.n(c),s=n(5),a=n.n(s),o=(n(6),n(36)),i=n.n(o),l=n(17),d=n(99),u=n(1280),f=n(1295),j=n(1310),b=n(1297),m=n(316),O=n(113),h=n(3),x=i()({loader:function(){return n.e(26).then(n.bind(null,1394))},loading:function(){return null},modules:["ContentMedia"]}),p=function(e,t){var n=e.shopproductId,c=e.skipLazyLoading,s=Object(l.useSelector)((function(e){return e.constants})),a=Object(l.useSelector)((function(e){return e.routes})),o=Object(l.useSelector)((function(e){return e.i18nState.lang})),i=Object(l.useSelector)((function(e){return Object(O.d)(e,n)})),p=Object(l.useSelector)((function(e){return Object(O.e)(e,n)})),g=Object(l.useSelector)((function(e){var t,n;return Object(m.d)(e,null===p||void 0===p||null===(t=p.product_medium)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.id)}));return Object(h.jsxs)(u.a,{className:r()("nftpackcard card--feed mb-3 cursor-pointer"),children:[Object(h.jsxs)("div",{className:"position-relative",children:[g&&Object(h.jsx)(x,{heroMedium:g,availableForUser:!0,resourceId:n,resourceType:s.resourceTypes.shopProduct,isPreview:!0,isListEntry:!0,noAspectRatio:!0,skipLazyLoading:c,className:"card-img-top"}),!!i.total_nfts_per_month&&Object(h.jsx)("span",{className:"nftpackcard__packsize z-index-2",children:Object(h.jsxs)("span",{className:"nftcard__amount ml-auto mb-2 py-1",children:[t.t("Pack of"),"\xa0",i.total_nfts_per_month]})})]}),Object(h.jsxs)(f.a,{children:[Object(h.jsx)("div",{className:"text-heading mb-1",children:null===i||void 0===i?void 0:i.title}),(null===i||void 0===i?void 0:i.category_title)&&Object(h.jsx)("div",{className:"mb-1",children:Object(h.jsx)(j.a,{color:"primary",pill:!0,children:i.category_title})}),Object(h.jsx)(b.a,{className:"text-medium",children:null===i||void 0===i?void 0:i.description}),Object(h.jsx)(d.a,{to:"/".concat(o,"/").concat(a.nfts,"/").concat(a.packs,"/").concat(n,"/"),className:"btn btn-primary btn-block stretched-link",children:t.t("View Details")})]})]})};p.defaultProps={skipLazyLoading:!1},p.contextTypes={t:a.a.func};var g=p},1487:function(e,t,n){"use strict";n.r(t),n.d(t,"NftShowroom",(function(){return R}));var c=n(4),r=n(20),s=n(2),a=n.n(s),o=n(24),i=n(117),l=n(5),d=n.n(l),u=n(6),f=n(315),j=n(491),b=n(36),m=n.n(b),O=n(492),h=n(196),x=n.n(h),p=n(17),g=n(99),v=n(1299),y=n(104),_=n(1367),N=n(1351),w=n(1397),S=n(1422),C=n(314),I=n(1384),L=n(499),k=n(105),T=n(38),F=n(113),M=n(25),E=n(3),z=m()({loader:function(){return n.e(57).then(n.bind(null,1389))},loading:function(){return null},modules:["NftCard"]}),P=function(){var e=Object(o.a)(a.a.mark((function e(t){var n,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=null===(n=t.match.params)||void 0===n?void 0:n.categorySlug,e.next=3,t.listNftCollections({content_category_slug:c});case 3:return e.next=5,t.listNfts({page:1,by_collection:0,content_category_slug:c});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function R(e,t){var n=e.listNfts,s=e.listNftCollections,i=e.match.params.categorySlug,l=Object(u.useState)({contentCategorySlug:i}),d=Object(r.a)(l,2),f=d[0],b=d[1],m=Object(p.useSelector)((function(e){return e.routes})),h=Object(p.useSelector)((function(e){return e.i18nState.lang})),y=Object(p.useSelector)((function(e){return Object(F.h)(e,f)})),L=Object(p.useSelector)((function(e){return e.nftCollections.idsList})),k=Object(p.useSelector)((function(e){return e.nfts.idsList})),T=Object(p.useSelector)((function(e){return e.nfts.listPage})),P=Object(p.useSelector)((function(e){return e.nfts.loadingList})),R=Object(p.useSelector)((function(e){return e.nfts.loadedList})),A=Object(p.useSelector)((function(e){return e.nfts.listTotalCount})),D=Object(p.useSelector)((function(e){return e.nfts.listFilters})),Y=Object(u.useState)(!1),V=Object(r.a)(Y,2),G=V[0],W=V[1],q=k.length<A,H=Object(p.useSelector)((function(e){return Object(F.c)(e)})).map((function(e){return e.sku})),U=Object(u.useState)([]),B=Object(r.a)(U,2),J=B[0],X=B[1],Z=Object(u.useState)(!1),K=Object(r.a)(Z,2),Q=K[0],$=K[1],ee=Object(u.useState)(0),te=Object(r.a)(ee,2),ne=te[0],ce=te[1],re=function(){var t=Object(o.a)(a.a.mark((function t(n){var c,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=x.a.bind("onGetProducts"),ce(n.length),t.next=4,c(n);case 4:(r=t.sent)&&(X(r),e.storeNativeProducts(r)),$(!0);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();Object(u.useEffect)((function(){var e=H.length>0;M.f&&R&&!P&&e&&!Q&&re(H)}),[J,H,Q,R,P]),Object(u.useEffect)((function(){R&&ne<H.length&&$(!1)}),[ne,R,H]);var se=function(t){(0,e.navigateTo)("/".concat(h,"/").concat(m.nfts,"/").concat(m.showroom,"/").concat(t,"/"))};return Object(u.useEffect)((function(){n({by_collection:0,page:1,content_category_slug:i}),s({content_category_slug:i}),b({contentCategorySlug:i})}),[i]),Object(E.jsxs)(C.a,{id:"nfts",title:t.t("Showroom"),children:[Object(E.jsx)(_.b,{categorySlug:i,basePath:"/".concat(h,"/").concat(m.nfts,"/").concat(m.showroom,"/")}),Object(E.jsx)(I.a,{wrapperClassName:"text-center my-4"}),!!(null===y||void 0===y?void 0:y.length)&&Object(E.jsxs)(v.a,{children:[Object(E.jsx)("h2",{children:t.t("Packs")}),Object(E.jsx)(O.a,{breakpointCols:{default:1,767:1,9999:2},className:"nftslist__grid",columnClassName:"nftslist__grid__column",children:y.slice(0,4).map((function(e){return Object(E.jsx)(S.a,{shopproductId:e})}))}),Object(E.jsx)("div",{className:"text-center mt-3 mb-4",children:Object(E.jsx)(g.a,{to:"/".concat(h,"/").concat(m.nfts,"/").concat(m.packs,"/"),className:"btn btn-outline-secondary",children:t.t("View all Packs")})})]}),!!(null===L||void 0===L?void 0:L.length)&&Object(E.jsxs)(v.a,{children:[Object(E.jsx)("h2",{children:t.t("Collections")}),L.slice(0,2).map((function(e,t){return Object(E.jsx)(w.a,{nftCollectionId:e,handleShowCollection:se,skipLazyLoading:t<2},e)})),Object(E.jsx)("div",{className:"text-center mt-3 mb-4",children:Object(E.jsx)(g.a,{to:"/".concat(h,"/").concat(m.nfts,"/").concat(m.collections,"/"),className:"btn btn-outline-secondary",children:t.t("View all Collections")})})]}),!!(null===k||void 0===k?void 0:k.length)&&Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)(v.a,{children:Object(E.jsx)("h2",{children:t.t("Single {nfts}",{nfts:t.t("NFTs")})})}),Object(E.jsx)(j.a,{dataLength:k.length,next:P?function(){}:function(){return n(Object(c.a)(Object(c.a)({},D),{},{page:T+1}))},hasMore:k.length<A,loader:Object(E.jsx)("p",{className:"pb-3 text-center text-muted",children:t.t("Loading")}),endMessage:Object(E.jsx)("p",{className:"pb-3 text-center text-muted",children:P?t.t("Loading"):t.t("Yay! You have seen it all")}),refreshFunction:P?function(){}:function(){return n(Object(c.a)(Object(c.a)({},D),{},{page:1}))},pullDownToRefresh:!0,pullDownToRefreshThreshold:50,pullDownToRefreshContent:Object(E.jsxs)("p",{className:"pb-3 text-center",children:["\u2193",t.t("Pull down to refresh")]}),releaseToRefreshContent:Object(E.jsxs)("p",{className:"pb-3 text-center",children:["\u2191",t.t("Release to refresh")]}),children:Object(E.jsx)(v.a,{children:Object(E.jsx)(O.a,{breakpointCols:{default:3,767:2},className:"nftslist__grid",columnClassName:"nftslist__grid__column",children:k.map((function(e,t){return Object(E.jsx)(z,{nftId:e,skipLazyLoading:t<2,setModalNft:W},"nfts_".concat(e))}))})})}),Object(E.jsx)(N.a,{nftIds:k,modalNft:G,setModalNft:W,loadMore:q&&!P?function(){return n(Object(c.a)(Object(c.a)({},D),{},{page:1}))}:function(){}})]})]})}R.contextTypes={t:d.a.func},t.default=Object(p.connect)(null,(function(e){return Object(y.bindActionCreators)({listNfts:T.h,listNftCollections:k.g,navigateTo:i.e,storeNativeProducts:L.a},e)}))(Object(f.frontloadConnect)(P,{onMount:!0,onUpdate:!1})(R))}}]);