text: (this["webpackJsonpcandy-machine-mint"]=this["webpackJsonpcandy-machine-mint"]||[]).push([[0],{129:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return O}));var c=n(2),r=n.n(c),i=n(3),a=n(31),s=n(62),o=new a.d.PublicKey("cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ"),u=new a.d.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),l=new a.d.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"),d=function(){var e=Object(i.a)(r.a.mark((function e(t,n,c){var a,s,o,u,l,d=arguments;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>3&&void 0!==d[3]?d[3]:"recent",s=d.length>4&&void 0!==d[4]&&d[4],o=!1,u={slot:0,confirmations:0,err:null},l=0,e.next=7,new Promise(function(){var e=Object(i.a)(r.a.mark((function e(d,b){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){o||(o=!0,console.log("Rejecting for timeout..."),b({timeout:!0}))}),n);try{l=c.onSignature(t,(function(e,t){o=!0,u={err:e.err,slot:t.slot,confirmations:0},e.err?(console.log("Rejected via websocket",e.err),b(u)):(console.log("Resolved via websocket",e),d(u))}),a)}catch(j){o=!0,console.error("WS error in setup",t,j)}case 2:if(o||!s){e.next=8;break}return Object(i.a)(r.a.mark((function e(){var n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.getSignatureStatuses([t]);case 3:n=e.sent,u=n&&n.value[0],o||(u?u.err?(console.log("REST error for",t,u),o=!0,b(u.err)):u.confirmations?(console.log("REST confirmation for",t,u),o=!0,d(u)):console.log("REST no confirmations for",t,u):console.log("REST null result for",t,u)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o||console.log("REST connection error: txid",t,e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))(),e.next=6,h(2e3);case 6:e.next=2;break;case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());case 7:return u=e.sent,c._signatureSubscriptions[l]&&c.removeSignatureListener(l),o=!0,console.log("Returning status",u),e.abrupt("return",u);case 12:case"end":return e.stop()}}),e)})));return function(t,n,c){return e.apply(this,arguments)}}(),b=function(t,n,c,r){var i=[{pubkey:n,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:a.d.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:s.b,isSigner:!1,isWritable:!1},{pubkey:a.d.SYSVAR_RENT_PUBKEY,isSigner:!1,isWritable:!1}];return new a.d.TransactionInstruction({keys:i,programId:u,data:e.from([])})},j=function(){var e=Object(i.a)(r.a.mark((function e(t,n,c){var i,s,u,l,d,b,j,f,m;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new a.b(c,t,{preflightCommitment:"recent"}),e.next=3,a.a.fetchIdl(o,i);case 3:return s=e.sent,u=new a.a(s,o,i),l={id:n,connection:c,program:u},e.next=8,u.account.candyMachine.fetch(n);case 8:return d=e.sent,b=d.data.itemsAvailable.toNumber(),j=d.itemsRedeemed.toNumber(),f=b-j,m=d.data.goLiveDate.toNumber(),m=new Date(1e3*m),e.abrupt("return",{candyMachine:l,itemsAvailable:b,itemsRedeemed:j,itemsRemaining:f,goLiveDate:m});case 15:case"end":return e.stop()}}),e)})));return function(t,n,c){return e.apply(this,arguments)}}(),f=function(){var t=Object(i.a)(r.a.mark((function t(n){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.d.PublicKey.findProgramAddress([e.from("metadata"),l.toBuffer(),n.toBuffer(),e.from("edition")],l);case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=Object(i.a)(r.a.mark((function t(n){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.d.PublicKey.findProgramAddress([e.from("metadata"),l.toBuffer(),n.toBuffer()],l);case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var e=Object(i.a)(r.a.mark((function e(t,n){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.d.PublicKey.findProgramAddress([t.toBuffer(),s.b.toBuffer(),n.toBuffer()],u);case 2:return e.abrupt("return",e.sent[0]);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),x=function(){var e=Object(i.a)(r.a.mark((function e(t,n,c,i){var o,u,d,j,x,O,h;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=a.d.Keypair.generate(),e.next=3,p(c,o.publicKey);case 3:return u=e.sent,d=t.connection,j=t.program,e.next=7,m(o.publicKey);case 7:return x=e.sent,e.next=10,f(o.publicKey);case 10:return O=e.sent,e.next=13,d.getMinimumBalanceForRentExemption(s.a.span);case 13:return h=e.sent,e.next=16,j.rpc.mintNft({accounts:{config:n,candyMachine:t.id,payer:c,wallet:i,mint:o.publicKey,metadata:x,masterEdition:O,mintAuthority:c,updateAuthority:c,tokenMetadataProgram:l,tokenProgram:s.b,systemProgram:a.d.SystemProgram.programId,rent:a.d.SYSVAR_RENT_PUBKEY,clock:a.d.SYSVAR_CLOCK_PUBKEY},signers:[o],instructions:[a.d.SystemProgram.createAccount({fromPubkey:c,newAccountPubkey:o.publicKey,space:s.a.span,lamports:h,programId:s.b}),s.c.createInitMintInstruction(s.b,o.publicKey,0,c,c),b(u,c,c,o.publicKey),s.c.createMintToInstruction(s.b,o.publicKey,u,c,[],1)]});case 16:return e.abrupt("return",e.sent);case 17:case"end":return e.stop()}}),e)})));return function(t,n,c,r){return e.apply(this,arguments)}}(),O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;return"".concat(e.slice(0,t),"...").concat(e.slice(-t))},h=function(e){return new Promise((function(t){return setTimeout(t,e)}))}}).call(this,n(8).Buffer)},349:function(e,t,n){},352:function(e,t){},354:function(e,t){},361:function(e,t){},372:function(e,t){},373:function(e,t){},398:function(e,t){},401:function(e,t){},407:function(e,t){},408:function(e,t,n){},410:function(e,t,n){},411:function(e,t,n){},412:function(e,t,n){},413:function(e,t,n){},414:function(e,t,n){},415:function(e,t,n){},416:function(e,t,n){},417:function(e,t,n){},418:function(e,t,n){},419:function(e,t,n){},420:function(e,t,n){},421:function(e,t,n){},476:function(e,t){},478:function(e,t){},492:function(e,t){},496:function(e,t){},498:function(e,t){},508:function(e,t){},510:function(e,t){},541:function(e,t){},543:function(e,t){},550:function(e,t){},551:function(e,t){},576:function(e,t){},577:function(e,t,n){"use strict";n.r(t);var c,r,i,a,s=n(0),o=n.n(s),u=n(28),l=n.n(u),d=(n(349),n(17)),b=n(2),j=n.n(b),f=n(3),m=n(14),p=n(128),x=n(130),O=n(306),h=n(604),g=n(609),v=n(613),y=n(612),w=n(6),S=n(51),k=n(168),N=n(129),P=(n(408),n(9)),T=function(e){return Object(P.jsx)("p",{children:e.children})},R=(n(410),function(e){var t=e.shadowDirection;return t?Object(P.jsxs)("div",{direction:t,className:"three-d-shadow",children:[Object(P.jsx)("div",{className:"skew-container skew-top-container",children:Object(P.jsx)("div",{className:"skew-top"})}),Object(P.jsx)("div",{className:"skew-container skew-bottom-container",children:Object(P.jsx)("div",{className:"skew-bottom"})})]}):null}),K=(n(411),function(e){var t=e.iconSrc,n=e.iconAlt,c=e.text,r=e.shadowDirection;return Object(P.jsxs)("div",{className:"defi-comp-box",children:[Object(P.jsx)(R,{shadowDirection:r}),Object(P.jsx)("div",{className:"icon-container",children:Object(P.jsx)("img",{alt:n,src:t})}),Object(P.jsx)(T,{children:c})]})}),B=(n(412),function(e){return Object(P.jsx)("div",{className:"section-padding",children:e.children})}),A=(n(413),function(e){return Object(P.jsx)("h2",{small:e.small?"true":"false",children:e.children})}),M=(n(414),n.p+"static/media/yieldIcon.771a052e.png"),D=n.p+"static/media/solanaIcon.abdf3810.png",L=n.p+"static/media/stakingIcon.60d000c8.png",E=function(e){return Object(P.jsx)("div",{className:"defi-section",children:Object(P.jsxs)(B,{children:[Object(P.jsx)(A,{small:!0,children:"Honey\u2019s DeFi NFTs"}),Object(P.jsx)(T,{children:"Our NFTs allow you to receive $HONEY, the utility token which powers our DeFi ecosystem"}),Object(P.jsxs)("div",{className:"boxes-container",children:[Object(P.jsx)(K,{iconSrc:L,iconAlt:"Staking icon",text:"NFT staking",shadowDirection:"right"}),Object(P.jsx)(K,{iconSrc:D,iconAlt:"Solana icon",text:"NFT collateral"}),Object(P.jsx)(K,{iconSrc:M,iconAlt:"Yield graph",text:"NFT yield",shadowDirection:"left"})]})]})})},F=(n(415),function(e){return Object(P.jsx)("div",{className:"hero-section",children:Object(P.jsxs)(B,{children:[Object(P.jsx)(A,{children:"Solana\u2019s most powerful NFTs"}),Object(P.jsx)(T,{children:"Liquidity mining NFTs"})]})})}),I=(n(416),function(e){var t=Object(s.useState)(!1),n=Object(m.a)(t,2),c=n[0],r=n[1],i=e.src,a=e.aspectRatio,o=e.alt;return Object(P.jsx)("div",{style:{paddingTop:"".concat(1/a*100,"%"),backgroundColor:c?"transparent":"#9D9D9D"},className:"image-with-Bg",children:Object(P.jsx)("div",{className:"image",children:Object(P.jsx)("img",{onLoad:function(){r(!0)},src:i,alt:o})})})}),C=(n(417),function(e){var t=e.number,n=e.text;return Object(P.jsxs)("div",{className:"step-box",children:[Object(P.jsx)("div",{className:"number",children:Object(P.jsx)(T,{children:t})}),Object(P.jsx)(T,{children:n})]})}),H=(n(418),n.p+"static/media/nft.dab5b576.png"),W=function(e){return Object(P.jsx)("div",{className:"nft-steps-section",children:Object(P.jsx)(B,{children:Object(P.jsxs)("div",{className:"container",children:[Object(P.jsxs)("div",{className:"boxes-container",children:[Object(P.jsx)(C,{number:"01",text:"Mint our Honey NFT"}),Object(P.jsx)(C,{number:"02",text:"Hold the NFT in your wallet"}),Object(P.jsx)(C,{number:"03",text:"Earn passive rewards"})]}),Object(P.jsxs)("div",{className:"image-container",children:[Object(P.jsx)("div",{className:"image-inner",children:Object(P.jsx)(I,{src:H,aspectRatio:1.1,alt:""})}),Object(P.jsx)("div",{className:"image-inner",children:Object(P.jsx)(I,{src:H,aspectRatio:1.1,alt:""})}),Object(P.jsx)("div",{className:"image-inner",children:Object(P.jsx)(I,{src:H,aspectRatio:1.1,alt:""})})]})]})})})},Y=(n(419),["Launch  mint and generate NFTs","Raise liquidity for our SOL/HONEY pool","Raise liquidity for our Solana bridge","Build NFT DAO","NFT lending platform on Solana"]),_=function(e){return Object(P.jsxs)("div",{className:"roadmap-section",children:[Object(P.jsx)(A,{small:!0,children:"Roadmap"}),Object(P.jsxs)("div",{className:"map-container",children:[Object(P.jsx)("div",{className:"line"}),Y.map((function(e){return Object(P.jsx)("div",{className:"text-container",children:Object(P.jsx)(T,{children:e})},e)}))]})]})},q=(n(420),n(421),function(e){return Object(P.jsx)(B,{children:Object(P.jsxs)("footer",{children:["Built with \u2764\ufe0f by ",Object(P.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://raincloud.me",children:"raincloud.me"})]})})}),U=Object(x.a)(k.a)(c||(c=Object(p.a)([""]))),z=x.a.span(r||(r=Object(p.a)([""]))),X=x.a.div(i||(i=Object(p.a)([""]))),G=Object(x.a)(h.a)(a||(a=Object(p.a)([""]))),J=function(e){e.days;var t=e.hours,n=e.minutes,c=e.seconds;e.completed;return Object(P.jsxs)(z,{children:[t," hours, ",n," minutes, ",c," seconds"]})},Q=function(e){var t=Object(s.useState)(),n=Object(m.a)(t,2),c=n[0],r=n[1],i=Object(s.useState)(!1),a=Object(m.a)(i,2),o=a[0],u=a[1],l=Object(s.useState)(!1),b=Object(m.a)(l,2),p=b[0],x=b[1],h=Object(s.useState)(!1),k=Object(m.a)(h,2),T=k[0],R=k[1],K=Object(s.useState)({open:!1,message:"",severity:void 0}),B=Object(m.a)(K,2),A=B[0],M=B[1],D=Object(s.useState)(new Date(e.startDate)),L=Object(m.a)(D,2),I=L[0],C=L[1],H=Object(S.c)(),Y=Object(s.useState)(),z=Object(m.a)(Y,2),Q=z[0],V=z[1],Z=function(){var t=Object(f.a)(j.a.mark((function t(){var n,c,i,a;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,R(!0),!H||!(null===Q||void 0===Q?void 0:Q.program)){t.next=10;break}return t.next=5,Object(N.c)(Q,e.config,H.publicKey,e.treasury);case 5:return n=t.sent,t.next=8,Object(N.a)(n,e.txTimeout,e.connection,"singleGossip",!1);case 8:(null===(c=t.sent)||void 0===c?void 0:c.err)?M({open:!0,message:"Mint failed! Please try again!",severity:"error"}):M({open:!0,message:"Congratulations! Mint succeeded!",severity:"success"});case 10:t.next=17;break;case 12:t.prev=12,t.t0=t.catch(0),i=t.t0.msg||"Minting failed! Please try again!",t.t0.msg?311===t.t0.code?(i="SOLD OUT!",x(!0)):312===t.t0.code&&(i="Minting period hasn't started yet."):t.t0.message.indexOf("0x138")||(t.t0.message.indexOf("0x137")?i="SOLD OUT!":t.t0.message.indexOf("0x135")&&(i="Insufficient funds to mint. Please fund your wallet.")),M({open:!0,message:i,severity:"error"});case 17:if(t.prev=17,!H){t.next=23;break}return t.next=21,e.connection.getBalance(H.publicKey);case 21:a=t.sent,r(a/w.LAMPORTS_PER_SOL);case 23:return R(!1),t.finish(17);case 25:case"end":return t.stop()}}),t,null,[[0,12,17,25]])})));return function(){return t.apply(this,arguments)}}();return Object(s.useEffect)((function(){Object(f.a)(j.a.mark((function t(){var n;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!H){t.next=5;break}return t.next=3,e.connection.getBalance(H.publicKey);case 3:n=t.sent,r(n/w.LAMPORTS_PER_SOL);case 5:case"end":return t.stop()}}),t)})))()}),[H,e.connection]),Object(s.useEffect)((function(){Object(f.a)(j.a.mark((function t(){var n,c,r,i;return j.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(H){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,Object(N.b)(H,e.candyMachineId,e.connection);case 4:n=t.sent,c=n.candyMachine,r=n.goLiveDate,i=n.itemsRemaining,x(0===i),C(r),V(c);case 11:case"end":return t.stop()}}),t)})))()}),[H,e.candyMachineId,e.connection]),Object(P.jsxs)("main",{children:[H&&Object(P.jsxs)("p",{className:"subtext",children:["Address: ",Object(N.d)(H.publicKey.toBase58()||"")]}),H&&Object(P.jsxs)("p",{className:"subtext",children:["Balance: ",(c||0).toLocaleString()," SOL"]}),Object(P.jsxs)("div",{className:"App",children:[Object(P.jsx)(F,{}),Object(P.jsx)(X,{children:H?Object(P.jsx)(G,{disabled:p||T||!o,onClick:Z,variant:"contained",children:p?"Sold Out :(":o?T?Object(P.jsx)(g.a,{}):"Mint  \u26cf":Object(P.jsx)(O.a,{date:I,onMount:function(e){return e.completed&&u(!0)},onComplete:function(){return u(!0)},renderer:J})}):Object(P.jsx)(U,{children:"Connect Wallet"})}),Object(P.jsx)(W,{}),Object(P.jsx)(E,{}),Object(P.jsx)(_,{}),Object(P.jsx)(q,{})]}),Object(P.jsx)(v.a,{open:A.open,autoHideDuration:6e3,onClose:function(){return M(Object(d.a)(Object(d.a)({},A),{},{open:!1}))},children:Object(P.jsx)(y.a,{onClose:function(){return M(Object(d.a)(Object(d.a)({},A),{},{open:!1}))},severity:A.severity,children:A.message})})]})},V=n(31),Z=n(111),$=n(336),ee=n(610),te=new V.d.PublicKey("utQRhHbp76VRS2KbKaMwxCHFnkEQzJ9HXi5TSDGdqes"),ne=new V.d.PublicKey("7vBywzdZqYCfukoib8ahBz1xH5SZKTiFwPGqHDuXrJpM"),ce=new V.d.PublicKey("A6YcmQBXu6Sbgtgq3ruPu88QocmXnhX9CBzKrjB62cpu"),re="devnet",ie=new V.d.Connection("https://explorer-api.devnet.solana.com"),ae=parseInt("1632779100",10),se=Object($.a)({palette:{type:"dark"},overrides:{MuiButtonBase:{root:{justifyContent:"flex-start"}},MuiButton:{root:{textTransform:void 0,padding:"12px 16px"},startIcon:{marginRight:8},endIcon:{marginLeft:8}}}}),oe=function(){var e=Object(s.useMemo)((function(){return Object(w.clusterApiUrl)(re)}),[]),t=Object(s.useMemo)((function(){return[Object(Z.a)(),Object(Z.b)(),Object(Z.c)(),Object(Z.e)({network:re}),Object(Z.d)({network:re})]}),[]);return Object(P.jsx)(ee.a,{theme:se,children:Object(P.jsx)(S.a,{endpoint:e,children:Object(P.jsx)(S.b,{wallets:t,autoConnect:!0,children:Object(P.jsx)(k.b,{children:Object(P.jsx)(Q,{candyMachineId:ce,config:ne,connection:ie,startDate:ae,treasury:te,txTimeout:3e4})})})})})},ue=function(e){e&&e instanceof Function&&n.e(3).then(n.bind(null,614)).then((function(t){var n=t.getCLS,c=t.getFID,r=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),c(e),r(e),i(e),a(e)}))};l.a.render(Object(P.jsx)(o.a.StrictMode,{children:Object(P.jsx)(oe,{})}),document.getElementById("root")),ue()}},[[577,1,2]]]);
  //# sourceMappingURL=main.7171add1.chunk.js.map