1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9677],{77855:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/brokenapes",function(){return n(59098)}])},59098:function(e,t,n){"use strict";n.r(t);var s=n(30137),r=n(76341),i=n(67462),a=n(98732),o=n(97582),l=n(85893),c=n(81458),u=n(67294),d=n(48528),f=n(65908),h=n(35222),m=n(14503),y=n(8163),p=n(32747),v=n(70416),x=n(49785);t.default=function(e){var t,n,j=(0,a._)((0,x.Oc)(),3),_=j[0],w=j[2].login,N=null==_?void 0:_.activeUser,b=(null==N?void 0:N.accountName)?null==_?void 0:_.activeUser.accountName:null,g=(0,a._)((0,u.useState)(!1),2),k=g[0],I=g[1],A=(0,a._)((0,u.useState)(!1),2),C=A[0],S=A[1],P=(0,a._)((0,u.useState)(null),2),q=P[0],E=P[1],T=(0,a._)((0,u.useState)(null),2),z=T[0],F=T[1],R=(0,a._)((0,u.useState)(null),2),Z=R[0],O=R[1],B=(t=(0,s._)(function(){var e,t,n,s,r,i,a,l,c,u,d,f,h,y;return(0,o.Jh)(this,function(o){switch(o.label){case 0:return e="search?owner=".concat(b,"&search_type=fucked&author=warcxbananas&verified=all&limit=100000"),I(!0),[4,(0,m.ZP)(e)];case 1:t=o.sent(),n=[],s=!0,r=!1,i=void 0;try{for(a=t[Symbol.iterator]();!(s=(l=a.next()).done);s=!0)u=(c=l.value).assetId,d=c.resultId,f=c.name,h=c.image,y={assetId:u,resultId:d,name:f,image:h},n.push(y)}catch(e){r=!0,i=e}finally{try{s||null==a.return||a.return()}finally{if(r)throw i}}return O(n),I(!1),[2]}})}),function(){return t.apply(this,arguments)});(0,u.useEffect)(function(){b&&B()},[b]);var D=(n=(0,s._)(function(e){var t,n,s,r,i,a,l,c;return(0,o.Jh)(this,function(o){switch(o.label){case 0:F(null),E(null),S(!0),t=[(0,p.vH)(N)],n={authorized_account:b,asset_ids:[e.assetId],from:b,to:"nfthivecraft",memo:"craft"},s={account:"atomicassets",name:"transfer",authorization:[{actor:b,permission:N.requestPermission?N.requestPermission:"active"}],data:n},t.push(s),r={owner:b,asset_id:e.assetId,result_id:e.resultId},i={account:"nfthivecraft",name:"swappfp",authorization:[{actor:b,permission:N.requestPermission?N.requestPermission:"active"}],data:r},t.push(i),a=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,N.session.transact({actions:t},{expireSeconds:300,blocksBehind:0})];case 2:return a=null===(c=o.sent())||void 0===c?void 0:null===(l=c.response)||void 0===l?void 0:l.transaction_id,[3,4];case 3:return F(o.sent().message),[3,4];case 4:return E(a),[4,(0,y._v)(2e3)];case 5:return o.sent(),S(!1),B(),[2]}})}),function(e){return n.apply(this,arguments)});return(0,l.jsxs)(v.Z,(0,i._)((0,r._)({banners:!1,id:"BrokenApesPage",title:"Replace your broken Apes"},e),{children:[(0,l.jsx)("div",{className:"text-2xl text-center my-10",children:"Replace a broken NFT from the Astral Apes Collection"}),(0,l.jsxs)(d.C,{className:"flex justify-center",severity:"error",title:"Please Log In",condition:!b,children:["You need to be logged in so we can display any Apes from your inventory."," ",(0,l.jsx)("span",{className:"text-primary hover:underline cursor-pointer",onClick:function(){return w()},children:"Click here to log in"})]}),(0,l.jsx)(d.C,{className:"flex justify-center",condition:b&&k,severity:"info",title:"Searching for broken Astral Apes Assets in your inventory...",children:(0,l.jsx)(c.Z,{})}),(0,l.jsx)(d.C,{className:"flex justify-center",condition:b&&C,severity:"info",title:"Swapping your Ape for a new one...",children:(0,l.jsx)(c.Z,{})}),(0,l.jsxs)(d.C,{className:"flex justify-center",condition:b&&!C&&!k&&(null==Z?void 0:Z.length)>0,severity:"info",title:"We found some broken Astral Apes Assets in your inventory!",children:["If you received an NFT with a broken image from the Astral Apes Mirror Craft, you can request to get a new, correct one here. Doing so will",(0,l.jsx)("b",{children:"burn your existing NFT"}),", and we will mint a new one for you ( with ",(0,l.jsx)("b",{children:"the same traits"})," as before)."]}),(0,l.jsx)(d.C,{className:"flex justify-center",condition:b&&!k&&(null==Z?void 0:Z.length)===0,severity:"info",title:"We couldn't find any broken Astral Apes Assets in your inventory!",children:"If you think this is a mistake, please reach out to us on telegram or discord."}
1),(0,l.jsx)(d.C,{className:"flex justify-center",severity:"success",condition:q,transactionId:q,title:"Swap successful!",children:"It can take a while for the new NFT to be minted and to appear in your inventory"}),(0,l.jsx)(d.C,{className:"flex justify-center",severity:"error",condition:z,title:"An error occured!",children:z}),(0,l.jsx)("div",{className:"flex flex-wrap justify-center",children:b&&!C&&!k&&(null==Z?void 0:Z.length)>0?Z.map(function(e,t){return(0,l.jsxs)("div",{id:"bull_"+t,className:"m-3 p-3 border border-primary rounded-md",children:[(0,l.jsx)("img",{src:e.image,className:"h-48 w-48"}),(0,l.jsx)("div",{className:"text-center mt-3 font-bold",children:e.name}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(h.D,{href:"/asset/".concat(e.assetId),external:!0,className:"text-sm text-primary hover:underline",children:e.assetId})}),(0,l.jsx)("div",{className:"text-center mt-3 italic text-sm",children:e.resultId?"resultId: "+e.resultId:"Missing resultId!"}),(0,l.jsx)(f.h,{size:"small",className:"flex justify-center mt-3",disabled:!e.resultId,onClick:function(){return D(e)},children:"Request Replacement"})]})}):null})]}))}}},function(e){e.O(0,[5733,8802,7470,8426,9774,2888,179],function(){return e(e.s=77855)}),_N_E=e.O()}]); 2//# sourceMappingURL=brokenapes-5b65283c608b106e.js.map
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.