PageSourceSearch

https://pull.gacha.game/assets/page-Cm-Gm_yS.js

js gacha.game collected 2026-09-30 14:03:56 UTC 16,428 bytes, 1 lines download raw bytes

1import{df as ie,db as t,dv as le,dc as O,dn as Y,dh as h,dH as Ee,dg as Te,dt as Me}from"./index-ByIcGKUX.js";import{r as p,Y as Fe,f as Ue,i as Ve,j as _e,u as He,Z as $e,X as Ge,_ as Qe,V as ze,$ as D,d as de,G as qe,a0 as Ke,B as oe,s as Z}from"./versionProvider-BLaKWEOB.js";import{u as We,S as Ye,B as Ze}from"./BuybackBanner-DPsXeOEq.js";import{u as Xe,a as Je,G as et,C as tt,B as at,P as X,O as J,F as st,L as rt,b as nt,c as ee,D as it,d as lt}from"./useCardDetailModel-Nssp79Xb.js";import{b as dt,S as ot}from"./cardDetailItems-SH3_Szyj.js";import{C as te,a as ct}from"./CollapsibleDetails-Dd5rjEEm.js";import{U as ut,u as mt}from"./StorefrontRoot-D71SJSus.js";import{A as ft}from"./shared-DxjqqMQm.js";import{C as pt,e as xt,u as kt,bD as yt,G as ae,bE as se,bF as gt}from"./user-CGO6qNct.js";import"./index-rfwHk5oe.js";import{u as bt}from"./useAcceptOffer-odhZsu-5.js";import{C as ht}from"./chevron-right-zEj-AxBq.js";import{P as wt}from"./ProfileLayout-IbI2UUNZ.js";import{u as vt}from"./productsCatalogue-CdhJZ2PV.js";import{u as St}from"./redemption-B2GxesYT.js";import{e as Ct,i as Ot}from"./useDeadlineExpiry-D6COtgBv.js";import{u as jt}from"./useDocumentHead-DNrwBozO.js";import"./dialog-BZgb3TVt.js";import"./products-CYzceBxF.js";import"./usePreloadImages-CMPlD1ht.js";import"./useIsScreen-D-4_6aVj.js";import"./check-DMJTZdTc.js";import"./download-BSblNyUs.js";import"./cardOwnership-BVxQVUhn.js";import"./modalUtils-DtuPd_v7.js";import"./resolveApiErrorMessage-BInnpMnV.js";import"./FMVChart-BYEXT2su.js";import"./adminMetrics-Czbd4ldu.js";import"./useQuery-DGVh7Xho.js";import"./LineChart-Rz51jjQy.js";import"./objectWithoutPropertiesLoose-BGUBVdDR.js";import"./assertThisInitialized-DIFuz7Pv.js";import"./with-selector-nhXHLSfA.js";import"./favorites-DzXoBzVs.js";import"./logger-BXS9jkLT.js";import"./gradeSelectorModel-BX8cO0n8.js";import"./ImageWithFallback-DtZfQEqZ.js";import"./CardImageWithGloss-CmMgovQY.js";import"./external-link-ZISQTI0T.js";import"./select-vH_7AOji.js";import"./x-B1VVXcwM.js";import"./browser-CYAfahY6.js";import"./dijkstra-D_NXgYpA.js";import"./unit-BrLjPYbF.js";import"./CoinflowCardFormV2-wUCfml6Q.js";import"./copy-BOSy771x.js";import"./popover-Cakz3dqx.js";import"./useCoinflowCustomer-DvH41G-z.js";import"./trash-2-Z9ctlBoK.js";import"./codes-D2UxDkcV.js";import"./CoinflowPurchase-CT_n0wZa.js";import"./CopyIcon-C8lC9AK1.js";import"./useCopyText-B51vYgUW.js";import"./globe-q6PX2PaH.js";import"./isHash-DIXVqSrn.js";function Bt(s){return s?new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"-"}function Nt({transferredAt:s,transferredTo:d,amount:o}){const{t:c}=p("common"),l=d?.trim()??"",{data:u}=pt(l||void 0),f=bt(l),x=l?ie(le.MARKETPLACE_SELLER,{sellerAddress:l}):null;
1return t.jsxs("div",{className:"w-full flex flex-col gap-4 rounded-lg bg-grey-90 p-6",children:[t.jsx("div",{className:"text-sm font-medium text-white",children:c("cardTransferred.sectionTitle")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{className:"text-xs text-grey-30",children:c("cardTransferred.transferredOn")}),t.jsx("span",{className:"text-sm font-medium text-white",children:Bt(s)})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{className:"text-xs text-grey-30",children:c("cardTransferred.amount")}),t.jsx("span",{className:"text-sm font-medium text-white",children:o!=null?xt(o):"—"})]}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsx("span",{className:"text-xs text-grey-30",children:c("cardTransferred.transferredTo")}),l?t.jsxs("a",{href:x??void 0,className:"flex min-w-0 items-center gap-2 hover:opacity-90",onClick:n=>{x||n.preventDefault()},children:[t.jsx(ut,{tier:u?.tier,size:"sm"}),t.jsx("span",{className:"truncate text-sm font-medium text-white",children:f}),t.jsx(ht,{className:"size-4 shrink-0 text-grey-30"})]}):t.jsx("span",{className:"text-sm font-medium text-white",children:"—"})]})]})}function re(s){const d=s?.trim();return d?d.toLowerCase():null}function It(s,d){const o=s.purchasePresetId!=null?d.getBuybackRate(s.purchasePresetId):9500;return{value:Number(Ee(s.value).times(o).div(1e4).toFixed(2)),percentage:o/100}}function ne(){const{t:s}=p("profile");return t.jsxs("div",{className:"w-full h-full flex text-white items-center justify-center",children:[t.jsx(de,{className:"w-4 h-4 animate-spin shrink-0 mr-2"}),s("cardDetailLoading")]})}function P(){const{t:s}=p("profile");return t.jsx("div",{className:"w-full h-full flex text-white items-center justify-center",children:t.jsx("p",{className:"text-sm text-grey-40",children:s("cardNotFound")})})}function At(){const{t:s}=p("profile");return t.jsx("div",{className:"w-full h-full flex text-white items-center justify-center",children:t.jsx("p",{className:"text-sm text-grey-40",children:s("editProfile.toastGenericError")})})}function Pa(){const{t:s}=p("common");jt({title:`${s("seo.profile.title")} | ${s("seo.siteName")}`,noindex:!0});const d=Fe(),o=vt(),c=Ue(),l=Ve(),[u,f]=_e(),[x]=O.useState(()=>u.get("soldBack")==="1"),{t:n}=p("redemption"),{address:y,authenticated:ce}=kt(),E=re(y),[ue,me]=O.useState(!1),[fe,T]=O.useState(!1),pe=mt({address:y,token:Me}),k=yt(y??"",l.nftId??""),j=He();O.useEffect(()=>{if(u.get("soldBack")===null)return;const r=new URLSearchParams(u);r.delete("soldBack"),f(r,{replace:!0})},[u,f]);const{enabled:B}=ae(Y.marketplace),{enabled:xe}=ae(Y.cgcMarketplace),ke=se(r=>r.buyNow),ye=se(r=>r.makeCatalogOffer),ge=async()=>{h.success(n("play:sell.cardSoldToast")),me(!0);const r=[k.refetch(),pe.refetch(),j.invalidateQueries({queryKey:["profileInventoryOrPulls"]}),j.invalidateQueries({queryKey:["marketplace-inventory"]})];e.resolvedSku&&r.push(j.invalidateQueries({queryKey:["marketplace-inventory-sku",e.resolvedSku]})),await Promise.all(r)},{handleBuyBack:w,loading:v,soldNftIds:S}=We({onSuccess:ge}),a=k.data?.data,be=Ct(a?.buybackDeadlineAt??null),he=a?.details?.name||"-",we=typeof l.nftId=="string"&&/^\d+$/.test(l.nftId)&&Number(l.nftId)>0,M=k.error instanceof ft?k.error.status:null,ve=M===400||M===404,N=!!(a?.isBuyback||ue||x),Se=!!a?.transferTxHash&&!a?.isBuyback,F=re(a?.owner??null),I=!!E&&!!F&&E===F,U=xe&&$e(a?.details?.gradingService),Ce=!!a?.sku?.trim(),A=B&&I&&!N&&Ce,e=Xe({sku:a?.sku??void 0,selectedNftId:a?.nftId!=null?String(a.nftId):null,context:"profile",marketplaceEnabled:B,enabled:A}),Oe=A&&!e.isSkuLoading&&!e.selectedEntryUnavailable&&!!e.productData,je=Je({wallet:y,nftId:a?.nftId??null}),Be=St(y).isSuccess,V=!!je,g=e.cardDetailActionState==="ownedUnlisted"&&!!e.ownedBuybackOffer?.visible,i=B?A&&e.isSkuLoading?"loading":!I||N?"market-not-owned":Oe?"market-owned-valid-sku":"market-owned-invalid-sku":"default";if(!we)return t.jsx(P,{});if(k.isLoading||!ce)return t.jsx(ne,{});if(k.isError)return ve?t.jsx(P,{}):t.jsx(At,{});if(!a)return t.jsx(P,{});const _=()=>c(Te.REDEMPTION_CREATE,{state:{shipUuids:[a.uuid],from:"card-detail"}}),Ne=[{label:"Inventory",link:"/profile/"},{label:he,link:"",active:!0,className:"capitalize overflow-x-hidden whitespace-nowrap text-ellipsis"}],H=i==="market-owned-valid-sku"&&e.productData?.packType==="sealed-product",m=H||a.cardId==="sealed_product",L=m?a.details.name||n("profile:cardDetail
1s.sealedProduct"):`${a.details.year||""} ${a.details.setName||""} ${a.details.name||""} ${a.details.cardNumber?`#${a.details.cardNumber}`:""}`.trim(),Ie=H?e.productName||L:e.cardTitle||e.productName||L,$=i==="market-owned-valid-sku"?Ie:L,G=!m&&(i==="market-owned-valid-sku"?e.isAuthenticated:a.value>Ge),Ae=m?qe:Ke,Q=[{id:"front",src:Qe(a.details)||Ae,alt:a.details.name??"unknown card",amount:a.value},...!m&&a.details.backImg?[{id:"back",src:a.details.backImg,alt:`${a.details.name} back`,amount:a.value}]:[]],Le=i==="market-owned-valid-sku"&&e.marketplaceCardImages.length>0?e.marketplaceCardImages:Q,z=dt(a,{isSealedProduct:m,t:n}),q=It(a,o),C=a.buybackValue??q.value,K=a.value>0?C/a.value*100:q.percentage,R=a.buybackEligible!==!1&&!Ot(a.buybackDeadlineAt,be),Re=i==="market-owned-invalid-sku"&&R?{nftId:String(a.nftId),value:C,percentage:K,deadlineAt:a.buybackDeadlineAt??null,visible:!0}:null,W=e.selectedOwnerAddressRaw&&e.resolvedSku?ie(le.MARKETPLACE_CARD_SELLER,{sku:e.resolvedSku,sellerAddress:e.selectedOwnerAddressRaw}):null,De=i!=="market-owned-valid-sku"&&i!=="market-owned-invalid-sku",Pe=t.jsxs(oe,{variant:"outline",onClick:()=>T(!0),className:"w-full h-14 md:h-10 md:w-auto",children:["Flex",t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:t.jsx("path",{d:"M13.162 5.16618C13.1643 4.52449 12.646 4.00241 12.0043 4.00001C11.3627 3.99761 10.8405 4.51616 10.838 5.15784C10.8303 7.29435 10.2722 8.6392 9.41312 9.46896C8.54452 10.3079 7.17369 10.8093 5.14552 10.8381C4.50704 10.8472 3.9955 11.3697 4.00003 12.0082C4.00456 12.6468 4.52347 13.162 5.16201 13.162C7.41493 13.162 8.75315 13.7571 9.55245 14.6215C10.3696 15.5051 10.8204 16.8805 10.838 18.8484C10.8437 19.4768 11.3478 19.9868 11.9761 19.9998C12.6043 20.0127 13.1291 19.5238 13.1605 18.8962C13.2649 16.8166 13.8178 15.4208 14.6764 14.5454C15.5208 13.6845 16.8312 13.1544 18.8336 13.162C19.4714 13.1644 19.9919 12.6523 19.9999 12.0146C20.0079 11.3769 19.5005 10.8519 18.8628 10.8383C16.6658 10.7913 15.2956 10.2103 14.4651 9.34778C13.6321 8.48262 13.1543 7.13902 13.162 5.16618Z",fill:"white"})})]});return t.jsx(wt,{links:Ne,collapsedLink:d,className:"h-screen overflow-y-scroll scrollbar-thin scrollbar-track-transparent scrollbar-thumb-black ",children:i==="loading"?t.jsx(ne,{}):t.jsxs("div",{className:"w-full my-8 px-4 flex flex-col md:flex-row gap-4 lg:gap-8 text-white mb-40 lg:mb-10",translate:"no",children:[t.jsx("div",{className:"md:hidden",children:t.jsx(te,{cardTitle:$,isCardAuthenticatedAndVaulted:G})}),t.jsx(ct,{images:Le,mediaType:m?"sealed":"card",action:Pe,children:t.jsx(Ye,{card:a,open:fe,setOpen:T})},i==="market-owned-valid-sku"?e.selectedSkuCard?.nftId??a.uuid:a.uuid),t.jsxs("div",{className:"flex flex-col w-full gap-6",children:[t.jsx("div",{className:"hidden md:block",children:t.jsx(te,{cardTitle:$,isCardAuthenticatedAndVaulted:G})}),a.cardId==="mystery"&&t.jsx(ot,{}),i==="default"&&I&&!N&&R?t.jsx(Lt,{value:C,percentage:K,hidePercentage:U,onAccept:()=>w(String(a.nftId)),loading:v,disabled:S.has(String(a.nftId))}):null,i==="market-owned-valid-sku"&&t.jsxs(t.Fragment,{children:[t.jsx(Ze,{offer:g?null:e.ownedBuybackOffer}),t.jsx(et,{graderOptions:e.graderOptions,gradeOptions:e.gradeOptions,selectedCardOptions:e.selectedCardOptions,selectedCardSummaryLabel:e.selectedCardSummaryLabel,canReset:e.canReset,resetHref:e.resetHref}),t.jsx(tt,{product:e.productData,selectedInstance:e.selectedInstance,viewerOwnsSelectedInstance:e.viewerOwnsSelectedCard,selectedVariantLabel:e.selectedVariantLabel,fairMarketValue:e.latestFairMarketValue,topOffer:e.topOfferForSummary,currentBalance:e.usdcBalance,viewerOffer:e.viewerOffer,showViewerOffer:e.showViewerOffer,buyNow:ke,createOffer:ye,offerPhase:e.offerPhase,listCard:e.handleListInstance,cancelListing:e.handleCancelListing,pendingRedemptionOrderUuid:e.pendingRedemptionOrderUuid,onCancelRedemption:e.handleCancelRedemption,ownedBuybackOffer:e.ownedBuybackOffer,hideListForSale:g}),g&&e.ownedBuybackOffer?t.jsx(at,{offer:e.ownedBuybackOffer,hidePercentage:e.hideDerivedPrice,loading:v,disabled:S.has(e.ownedBuybackOffer.nftId),onAccept:()=>{const r=e.ownedBuybackOffer?.nftId;if(!r){h.error(n("play:sell.cannotSellBackToast"));return}w(r)}}
1):null,t.jsx(X,{actionState:e.cardDetailActionState,displayMode:e.priceOfferSummaryMode,listedPrice:e.liquidityBestAsk,topOffer:e.topOfferForSummary,offerCount:e.offerCountForSummary,ownedListingPrice:e.viewerOwnsSelectedCard?e.selectedInstance?.askPrice??null:null,listingExpiresAt:e.selectedInstance?.listingExpiresAt??null,pulledAt:a.loggedAt,vaultLocation:a.location,onRedeem:_}),t.jsx(J,{actionState:e.cardDetailActionState,displayMode:e.offersListMode,offers:e.publicOffersForList,ownerOffers:e.ownerOffersForList,ownedBuybackOffer:g?null:e.ownedBuybackOffer,onCancelViewerOffer:async r=>{const b=await e.cancelCatalogOffer(r);b.success||h.error(b.error??n("order.toastCancelOfferError"))},onAcceptOffer:async r=>{const b=await e.acceptCatalogOffer(r);b.success||h.error(b.error??n("order.toastAcceptOfferError"))},onAcceptOwnedBuyback:()=>{const r=e.ownedBuybackOffer?.nftId;if(!r){h.error(n("play:sell.cannotSellBackToast"));return}w(r)},onRejectOwnedBuyback:e.dismissOwnedBuybackOffer,ownedBuybackLoading:v,ownedBuybackDisabled:e.ownedBuybackOffer?.nftId?S.has(e.ownedBuybackOffer.nftId):!1}),e.fmvEnabled?!e.hideDerivedPrice&&e.priceHistory&&e.priceHistory.length>0&&t.jsx(st,{cardId:e.selectedInventoryUuidForQuery??void 0,certNumber:e.certNumber,displayFmv:e.displayFmv,priceRange:e.priceRange,pop:e.selectedSkuCard?.totalPopulation??null,priceHistory:e.priceHistory}):null,g?t.jsx(rt,{fixed:!1,product:e.productData,selectedInstance:e.selectedInstance,selectedVariantLabel:e.selectedVariantLabel,fairMarketValue:e.latestFairMarketValue,listCard:e.handleListInstance,ownedBuybackOffer:e.ownedBuybackOffer,pendingRedemptionOrderUuid:e.pendingRedemptionOrderUuid,onCancelRedemption:e.handleCancelRedemption}):null,t.jsx("a",{href:W??void 0,className:"w-fit text-left hover:opacity-90",onClick:r=>{W||r.preventDefault()},children:t.jsx(nt,{ownerAddress:e.selectedOwnerAddressRaw||"",viewerOwnsCard:e.viewerOwnsSelectedCard})})]}),i==="market-owned-invalid-sku"?t.jsxs(t.Fragment,{children:[V?t.jsxs("div",{className:"flex flex-col gap-0.5 rounded bg-grey-90 px-3 py-2",children:[t.jsx("span",{className:"text-sm font-medium text-white",children:n("form.pendingRedemptionBlock.label")}),t.jsx("span",{className:"text-xs text-grey-30",children:n("form.pendingRedemptionBlock.hint")})]}):null,t.jsx(X,{actionState:"ownedUnlisted",displayMode:"owned-only",listedPrice:null,topOffer:R?C:null,offerCount:1,ownedListingPrice:null,listingExpiresAt:null,pulledAt:a.loggedAt,vaultLocation:a.location,onRedeem:V||!Be?void 0:_}),t.jsx(J,{actionState:"ownedUnlisted",displayMode:"buyback-only",offers:[],ownedBuybackOffer:Re,onAcceptOwnedBuyback:()=>{w(String(a.nftId))},ownedBuybackLoading:v,ownedBuybackDisabled:S.has(String(a.nftId))})]}):null,Se&&t.jsx(Nt,{transferredAt:a.transferLoggedAt,transferredTo:a.transferTo,amount:a.transferSalePriceUsdc!=null?gt(a.transferSalePriceUsdc):null}),De&&t.jsxs("div",{className:"flex flex-col gap-3 text-sm",children:[!U&&t.jsxs("div",{className:"text-grey-30",children:["Market value"," ",t.jsx("span",{className:"font-medium text-white",children:ze(a.value)})]}),a.loggedAt?t.jsxs("div",{className:"text-grey-30",children:["Pulled on ",D(a.loggedAt)]}):null,a.isRedeemed&&a.buybackLoggedAt?t.jsxs("div",{className:"text-grey-30",children:["Redeemed on ",D(a.buybackLoggedAt)]}):!a.isRedeemed&&a.buybackLoggedAt?t.jsxs("div",{className:"text-grey-30",children:["Sold on ",D(a.buybackLoggedAt)]}):null]}),i==="market-owned-valid-sku"&&e.selectedSkuCard?m?t.jsx(ee,{items:z,title:n("profile:cardDetails.productTitle")}):t.jsx(it,{selectedSkuCard:e.selectedSkuCard}):t.jsx(ee,{items:z,title:m?n("profile:cardDetails.productTitle"):void 0}),t.jsx(lt,{tokenId:i==="market-owned-valid-sku"?e.selectedSkuCard?.nftId:a.nftId})]})]})})}const Lt=({value:s,percentage:d,hidePercentage:o,onAccept:c,loading:l,disabled:u})=>{const{t:f}=p("profile"),x=Z(s),n=Z(d);return t.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center gap-4 p-6 border-[1px] border-[#717171] rounded-xl  bg-gradient-grey-3 ",children:[t.jsxs("div",{className:"flex md:flex-col justify-between items-center md:items-start",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"text-xs text-grey-30",children:f("buyBackOffer.title")}),!o&&t.jsx("div",{className:"md:hidden rounded bg-grey-60 py-[2px] px-1 text-primary-10 text-xs",children:f("buyBackOffer.percentOfMarketValue",{percent:n})})]}),t.jsxs("div",{className:"bm-text !text-[32px]  font-bold",children:["$",x]}),!o&&t.jsx("div",{className:"hidden md:block rounded bg-grey-60 py-[2px] px-1 text-primary-10 text-xs",children:`${n}% of market value`})]}),t.jsxs(oe,{variant:"primary",className:"w-full md:w-[260px]",size:"lg",onClick:c,disabled:l||u,children:[l&&t.jsx(de,{className:"w-4 h-4 animate-spin shrink-0 mr-2"}),"Accept & Sell"]})]})};export{Pa as default};

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.