1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36498,e=>{"use strict";var t=e.i(38821),r=e.i(9010);function s({children:e,delay:s=0,className:i}){let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=a.current;if(!e)return;let t=new IntersectionObserver(([r])=>{r.isIntersecting&&(e.style.transitionDelay=`${s}ms`,e.classList.add("fade-up-visible"),t.disconnect())},{threshold:.1});return t.observe(e),()=>t.disconnect()},[s]),(0,t.jsx)("div",{ref:a,className:`fade-up${i?` ${i}`:""}`,children:e})}e.s(["default",()=>s])},37105,e=>{"use strict";var t=e.i(38821),r=e.i(37993),s=e.i(9010);function i({src:e,alt:i}){let[a,n]=(0,s.useState)(!1);return!e||a?(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-full bg-gray-modern-800/60",children:(0,t.jsx)(r.default,{src:"/assets/chimps-aqua-marine.svg",alt:i,width:48,height:48,className:"w-1/2 h-1/2"})}):(0,t.jsx)(r.default,{src:e,alt:i,fill:!0,className:"object-cover",unoptimized:!0,onError:()=>n(!0)})}e.s(["default",()=>i])},86206,63899,e=>{"use strict";var t=e.i(38821),r=e.i(9010),s=e.i(37993);function i({value:e,onChange:i,options:a,icon:n,placeholder:l="Select...",containerClassName:o}){let[c,u]=(0,r.useState)(!1),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{function e(e){h.current&&!h.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let d=e||a[0];return(0,t.jsxs)("div",{ref:h,className:o??"relative w-full xl:w-87.5",children:[(0,t.jsx)(s.default,{src:n,alt:"",width:20,height:20,className:"pointer-events-none absolute left-4 top-1/2 size-4 -translate-y-1/2 z-10"}),(0,t.jsx)("button",{type:"button",onClick:()=>u(!c),className:"w-full cursor-pointer appearance-none rounded-sm border border-gray-modern-800 bg-gray-modern-950 pl-10 pr-10 py-4 text-xl text-white text-left outline-none focus:border-gray-modern-600 transition-colors",children:d}),(0,t.jsx)(s.default,{src:"/assets/select.svg",alt:"",width:20,height:20,className:"pointer-events-none absolute right-4 top-1/2 size-4 -translate-y-1/2"}),c&&(0,t.jsx)("div",{className:"absolute z-50 w-full mt-1 rounded-sm border border-gray-modern-800 bg-gray-modern-950 shadow-lg max-h-60 overflow-auto",children:a.map((e,r)=>(0,t.jsx)("button",{type:"button",onClick:()=>{i(0===r?"":e),u(!1)},className:"w-full cursor-pointer px-4 py-3 text-xl text-white text-left hover:bg-gray-modern-800 transition-colors",children:e},e))})]})}function a(){return(0,t.jsxs)("div",{className:"rounded-md border flex flex-col gap-4 border-gray-modern-600 bg-rich-black-900 p-4 shadow-[0_0_18px_rgba(0,0,0,0.25)] animate-pulse",children:[(0,t.jsx)("div",{className:"h-3 bg-gray-modern-800 rounded w-3/4"}),(0,t.jsx)("div",{className:"relative w-full aspect-square overflow-hidden rounded-sm border border-gray-modern-800 bg-gray-modern-950",children:(0,t.jsx)("div",{className:"absolute inset-0 bg-linear-to-br from-gray-modern-900 to-gray-modern-950"})}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:[1,2,3,4,5].map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"size-5 bg-gray-modern-800 rounded"}),(0,t.jsx)("div",{className:"h-3 bg-gray-modern-800 rounded w-12"})]}),(0,t.jsx)("div",{className:"h-3 bg-gray-modern-800 rounded w-16"})]},e))})]})}e.s(["default",()=>i],86206),e.s(["default",()=>a],63899)},34609,e=>{"use strict";let t;var r=e.i(38821),s=e.i(9010),i=e.i(37993),a=e.i(86206);let n=["All Tribes","Old World Cult","Planeswalkers","Future War Pack","Proletariat"];function l({filters:e,onFiltersChange:t}){return(0,r.jsxs)("div",{className:"text-center flex flex-col gap-8 xl:gap-24",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("h1",{className:"text-white font-title leading-11 text-[40px] xs:text-[50px] sm:leading-12",children:["You've entered the hallowed halls of",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"animate-gradient-flow",style:{background:"linear-gradient(90deg, #B411EE 0%, #11EEB4 25%, #B411EE 50%, #11EEB4 75%, #B411EE 100%)",backgroundSize:"200% 100%",backgroundClip:"text",WebkitBackgroun
1dClip:"text",color:"transparent",WebkitTextFillColor:"transparent"},children:"Chimpianity"})]}),(0,r.jsxs)("p",{className:" text-gray-modern-400 text-xl leading-5 max-w-5xl mx-auto",children:["Here before you lies the collective history of Chimpions past, present, and future."," ",(0,r.jsx)("span",{className:"md:block",children:"Tread with care. Each of the 222 unique, hand-drawn, animated NFTs tells a story."})]})]}),(0,r.jsxs)("div",{className:"flex flex-col xl:flex-row xl:justify-between gap-6 sm:gap-4 text-left",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-6 sm:gap-4 w-full lg:w-auto",children:[(0,r.jsx)(a.default,{value:e.tribe||"",onChange:r=>{t({...e,tribe:r||void 0})},options:n,icon:"/assets/tribe.svg"}),(0,r.jsxs)("label",{className:"flex w-full cursor-pointer select-none items-center gap-3 rounded-sm border border-gray-modern-800 bg-gray-modern-950 px-4 py-4 text-xl text-white transition-colors hover:border-gray-modern-600 sm:w-auto",children:[(0,r.jsx)("input",{type:"checkbox",checked:!!e.heldSinceMint,onChange:r=>{t({...e,heldSinceMint:r.target.checked||void 0})},className:"size-5 shrink-0 cursor-pointer accent-aqua-marine-400"}),"Held Since Mint"]})]}),(0,r.jsxs)("div",{className:"relative w-full xl:w-125 flex flex-row items-center",children:[(0,r.jsx)("input",{type:"text",placeholder:"Search",value:e.search||"",onChange:r=>{t({...e,search:r.target.value||void 0})},className:"w-full rounded-sm border border-gray-modern-800 bg-gray-modern-950 p-4 text-xl text-white placeholder:text-gray-modern-500 outline-none focus:border-gray-modern-600"}),(0,r.jsx)(i.default,{src:"/assets/search.svg",alt:"",width:20,height:20,className:"pointer-events-none absolute right-4 top-1/2 size-4 -translate-y-1/2"})]})]})]})}var o=e.i(42768),c=e.i(19587),u=e.i(65496),h=e.i(40139),d=e.i(98542),f=e.i(7014),p=e.i(13458),m=e.i(93957),x=class extends d.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,f.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#i=void 0;#a=void 0;#n;#l;#r;#t;#o;#c;#u;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),g(this.#s,this.options)?this.#m():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#v(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,p.resolveQueryBoolean)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#y(),this.#s.setOptions(this.options),t._defaulted&&!(0,p.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&y(this.#s,r,this.options,t)&&this.#m(),this.updateResult(),s&&(this.#s!==r||(0,p.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,p.resolveQueryBoolean)(t.enabled,this.#s)||(0,p.resolveStaleTime)(this.options.staleTime,this.#s)!==(0,p.resolveStaleTime)(t.staleTime,this.#s))&&this.#b();let i=this.#w();s&&(this.#s!==r||(0,p.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,p.resolveQueryBoolean)(t.enabled,this.#s)||i!==this.#f)&&this.#j(i)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(s,e);return t=this,r=i,(0,p.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#a=i,this.#l=this.options,this.#n=this.#s.state),i}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#y();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(p.noop)),t}#b(){this.#g();let e=(0,p.resolveStaleTime)(this.options.staleTime,this.#s);if(c.environmentManager.isServer()||this.#a.isStale||!(0,p.isValidTimeout)(e))return;let t=(0,p.timeUntilStale)(this.#a.dataUpdatedAt,e);this.#h=m.timeoutManager.setTimeout(()=>{this.#a.isStale||this.updateResult()},t+1)}#w(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#j(e){this.#v(),this.#f=e,!c.environmentManager.isServer()&&!1!==(0,p.resolveQueryBoolean)(this.options.enabled,this.#s)&&(0,p.isValidTimeout)(this.#f)&&0!==this.#f&&(this.#d=m.timeoutManager.setInterval(()=>
1{(this.options.refetchIntervalInBackground||o.focusManager.isFocused())&&this.#m()},this.#f))}#x(){this.#b(),this.#j(this.#w())}#g(){void 0!==this.#h&&(m.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#v(){void 0!==this.#d&&(m.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r,s=this.#s,i=this.options,a=this.#a,n=this.#n,l=this.#l,o=e!==s?e.state:this.#i,{state:c}=e,u={...c},d=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&g(e,t),n=r&&y(e,s,t,i);(a||n)&&(u={...u,...(0,h.fetchState)(c.data,e.options)}),"isRestoring"===t._optimisticResults&&(u.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:v}=u;r=u.data;let w=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===v){let e;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(e=a.data,w=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(v="success",r=(0,p.replaceData)(a?.data,e,t),d=!0)}if(t.select&&void 0!==r&&!w)if(a&&r===n?.data&&t.select===this.#o)r=this.#c;else try{this.#o=t.select,r=t.select(r),r=(0,p.replaceData)(a?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}this.#t&&(m=this.#t,r=this.#c,x=Date.now(),v="error");let j="fetching"===u.fetchStatus,N="pending"===v,R="error"===v,k=N&&j,Q=void 0!==r,S={status:v,fetchStatus:u.fetchStatus,isPending:N,isSuccess:"success"===v,isError:R,isInitialLoading:k,isLoading:k,data:r,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>o.dataUpdateCount||u.errorUpdateCount>o.errorUpdateCount,isFetching:j,isRefetching:j&&!N,isLoadingError:R&&!Q,isPaused:"paused"===u.fetchStatus,isPlaceholderData:d,isRefetchError:R&&Q,isStale:b(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,p.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==S.data,r="error"===S.status&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#r=S.promise=(0,f.pendingThenable)())},n=this.#r;switch(n.status){case"pending":e.queryHash===s.queryHash&&i(n);break;case"fulfilled":(r||S.data!==n.value)&&a();break;case"rejected":r&&S.error===n.reason||a()}}return S}updateResult(){let e=this.#a,t=this.createResult(this.#s,this.options);if(this.#n=this.#s.state,this.#l=this.options,void 0!==this.#n.data&&(this.#u=this.#s),(0,p.shallowEqualObjects)(t,e))return;this.#a=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#a).some(t=>this.#a[t]!==e[t]&&s.has(t))};this.#N({listeners:r()})}#y(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#N(e){u.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#a)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function g(e,t){return!1!==(0,p.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,p.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&v(e,t,t.refetchOnMount)}function v(e,t,r){if(!1!==(0,p.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,p.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&b(e,t)}return!1}function y(e,t,r,s){return(e!==t||!1===(0,p.resolveQueryBoolean)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&b(e,r)}function b(e,t){return!1!==(0,p.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,p.resolveStaleTime)(t.staleTime,e))}var w=e.i(17532),j=class extends x{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}
1fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,s=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:n,isRefetchError:l}=s,o=r.fetchMeta?.fetchMore?.direction,c=n&&"forward"===o,u=i&&"forward"===o,h=n&&"backward"===o,d=i&&"backward"===o;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,w.hasNextPage)(t,r.data),hasPreviousPage:(0,w.hasPreviousPage)(t,r.data),isFetchNextPageError:c,isFetchingNextPage:u,isFetchPreviousPageError:h,isFetchingPreviousPage:d,isRefetchError:l&&!c&&!h,isRefetching:a&&!u&&!d}}};e.i(2803);var N=e.i(74203),R=s.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),k=s.createContext(!1);k.Provider;var Q=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});let S="chimpions-nft-cache",T="v11-collection-group";class I{static getKey(e,t){return`${S}-${t||"all"}-page-${e}`}static set(e,t,r){try{let s={data:t,timestamp:Date.now(),version:T};localStorage.setItem(this.getKey(e,r),JSON.stringify(s))}catch(e){console.warn("Failed to cache NFT data:",e)}}static get(e,t){try{let r=localStorage.getItem(this.getKey(e,t));if(!r)return null;let s=JSON.parse(r);if(s.version!==T||Date.now()-s.timestamp>864e5)return this.clear(e,t),null;return s.data}catch(e){return console.warn("Failed to read NFT cache:",e),null}}static clear(e,t){try{void 0!==e?localStorage.removeItem(this.getKey(e,t)):Object.keys(localStorage).forEach(e=>{e.startsWith(S)&&localStorage.removeItem(e)})}catch(e){console.warn("Failed to clear NFT cache:",e)}}static clearAll(){this.clear()}}var E=e.i(75157);async function O(e,t){let r=(0,E.getFilterHash)(t),s=I.get(e,r);if(s&&s.length>0)return{nfts:s,hasMore:!0,nextPage:e+1,total:222};let i=new URLSearchParams({page:e.toString(),...t.tribe&&{tribe:t.tribe},...t.heldSinceMint&&{heldSinceMint:"true"},...t.search&&{search:t.search}}),a=await fetch(`/api/nfts?${i}`);if(!a.ok)throw Error("Failed to fetch NFTs");let n=await a.json();return I.set(e,n.nfts,r),n}let C={Df7VuBkasBXHyEYUsuqQnEpDvLyZmfoxDnk932CUak2c:"Chiao"};function P(e){return e?C[e]??null:null}var M=e.i(37105);let F=[{label:"Tribe",value:"tribe",icon:"/assets/tribe.svg"},{label:"Holder",value:"holder",icon:"/assets/holder.svg"},{label:"Artist",value:"artist",icon:"/assets/artist.svg"}];function D(e){e.stopPropagation()}function _({className:e}){return(0,r.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:e,children:(0,r.jsx)("path",{d:"M3 7.5l4 3 5-6 5 6 4-3-1.6 10.5H4.6L3 7.5zM4.9 19.5h14.2v1.7H4.9z"})})}function B({nft:e}
1){let[t,a]=(0,s.useState)(!1),n=e.provenance??[],l=1===n.length;return(0,r.jsx)("div",{className:"[perspective:1200px] transition-transform duration-300 hover:-translate-y-1",children:(0,r.jsxs)("div",{role:"button",tabIndex:0,"aria-pressed":t,"aria-label":`${e.name} â ${t?"show details":"show provenance"}`,onClick:()=>a(e=>!e),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),a(e=>!e))},className:"relative h-full cursor-pointer rounded-md outline-none transition-transform duration-500 [transform-style:preserve-3d] focus-visible:ring-2 focus-visible:ring-electric-purple-400",style:{transform:t?"rotateY(180deg)":void 0},children:[(0,r.jsxs)("div",{className:"group flex h-full flex-col gap-4 rounded-md border border-gray-modern-600 bg-rich-black-900 p-4 shadow-[0_0_18px_rgba(0,0,0,0.25)] transition-colors duration-300 [backface-visibility:hidden] hover:border-gray-modern-400 hover:shadow-[0_0_28px_rgba(180,17,238,0.18)]",children:[(0,r.jsx)("h3",{className:"text-white font-semibold text-xl",children:e.name}),(0,r.jsx)("div",{className:"relative w-full aspect-square overflow-hidden rounded-sm border border-gray-modern-800 bg-gray-modern-950",children:(0,r.jsx)(i.default,{src:e.image,alt:e.name,fill:!0,sizes:"(min-width: 1900px) 17vw, (min-width: 1600px) 20vw, (min-width: 1280px) 25vw, (min-width: 1024px) 33vw, (min-width: 768px) 50vw, 100vw",className:"object-cover [image-rendering:pixelated] transition-transform duration-500 group-hover:scale-[1.04]",loading:"lazy",unoptimized:!0})}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:F.map(t=>{let s=String(e[t.value]||"Unknown");if("holder"===t.value){let t=P(e.holder);s=e.listing?"Listed":t||(e.holderName?`@${e.holderName}`:(0,E.truncateAddress)(e.holder))}let a="artist"===t.value?s.split(",").map(e=>e.trim()).filter(Boolean):null,n=a?a[0]:s,o=a&&a.length>1?a.slice(1).join(", "):null,c=null;"holder"===t.value&&(e.listing?c=e.listing.url:e.holderTwitter&&(c=`https://x.com/${e.holderTwitter}`));let u=c?(0,r.jsx)("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:D,className:"text-white text-xl truncate max-w-full text-right hover:underline",title:n,children:n}):(0,r.jsx)("span",{className:"text-white text-xl truncate max-w-full text-right",title:n,children:n});return(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,r.jsx)(i.default,{src:t.icon,alt:"",width:20,height:20,className:"size-5"}),(0,r.jsxs)("span",{className:"text-white text-xl",children:[t.label,":"]})]}),(0,r.jsxs)("div",{className:"flex flex-col items-end min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 min-w-0 max-w-full",children:["holder"===t.value&&l&&(0,r.jsx)("span",{title:"Held since mint",className:"flex shrink-0",children:(0,r.jsx)(_,{className:"size-4 text-gold-400"})}),u]}),o&&(0,r.jsx)("span",{className:"text-white text-xl truncate max-w-full text-right",title:o,children:o})]})]},`${e.tokenId}-${t.label}`)})}),(0,r.jsxs)("div",{className:"mt-auto flex items-center justify-end gap-1.5 pt-1 text-sm text-gray-modern-400 transition-colors group-hover:text-electric-purple-300",children:[(0,r.jsx)("span",{children:"Provenance"}),(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9"}),(0,r.jsx)("path",{d:"M3 4v5h5"})]})]})]}),(0,r.jsxs)("div",{className:"absolute inset-0 flex h-full flex-col gap-3 rounded-md border border-gray-modern-600 bg-rich-black-900 p-4 shadow-[0_0_18px_rgba(0,0,0,0.25)] [backface-visibility:hidden] [transform:rotateY(180deg)]",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"truncate text-white font-semibold text-xl",children:"Provenance"}),(0,r.jsx)("p",{className:"truncate text-sm text-gray-modern-400",title:e.name,children:e.name})]}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-sm text-gray-modern-400",children:[(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M9 14 4 9l5-5"}),(0,r.jsx)("path",{d:"M4 9h11a5 5 0 0 1 0 10h-1"})]}),"Flip back"]})]}),0===n.length?(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center text-center text-sm text-gray-modern-400",children:"Ownership history isn't available yet."}):(0,r.jsx)("ol",{className:"-mr-1 flex flex-1 flex-col gap-2 overflow-y-auto pr-1",children:n.map((e,t)=>{var s;let i=P(e.wallet),a=i??(e.username?`@${e.username}`:(0,E.truncateAddress)(e.wallet)),n=!i&&e.username?`https://matrica.io/user/${e.username}`:(0,E.orbAddressUrl)(e.wallet),o=(s=e.acquiredAt)?new Date(1e3*s).toLocaleDateString(void 0,{month:"short",year:"numeric"}):null;return(0,r.jsxs)("li",{className:"flex items-center gap-3 rounded-sm border border-gray-modern-800 bg-gray-modern-950/60 p-2",children:[(0,r.jsx)("div",{className:"relative size-9 shrink-0 overflow-hidden rounded-full border border-gray-modern-700",children:(0,r.jsx)(M.default,{src:e.pfp,alt:a})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,r.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",onClick:D,className:"truncate text-white hover:underline",title:e.username?a:e.wallet,children:a}),o&&(0,r.jsx)("span",{className:"text-xs text-gray-modern-400",children:o})]}),e.current&&(l?(0,r.jsxs)("span",{title:"Held since mint",className:"flex shrink-0 items-center gap-1 rounded-full bg-gold-500/20 px-2 py-0.5 text-xs font-medium text-gold-300",children:[(0,r.jsx)(_,{className:"size-3"}),"Since mint"]}):(0,r.jsx)("span",{className:"shrink-0 rounded-full bg-electric-purple-500/20 px-2 py-0.5 text-xs font-medium text-electric-purple-300",children:"Current"}))]},`${e.wallet}-${t}`)})})]})]})})}var z=e.i(63899),L=e.i(36498);function U({filters:e}){let{data:t,fetchNextPage:i,hasNextPage:a,isFetchingNextPage:n,isLoading:l,isError:o}=function(e={}){return function(e,t,r){let i,a=s.useContext(k),n=s.useContext(R),l=(0,N.useQueryClient)(r),o=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let h=l.getQueryCache().get(o.queryHash);if(o._optimisticResults=a?"isRestoring":"optimistic",o.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=o.staleTime;o.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof o.gcTime&&(o.gcTime=Math.max(o.gcTime,1e3))}i=h?.state.error&&"function"==typeof o.throwOnError?(0,p.shouldThrowError)(o.throwOnError,[h.state.error,h]):o.throwOnError,(o.suspense||o.experimental_prefetchInRender||i)&&!n.isReset()&&(o.retryOnMount=!1),s.useEffect(()=>{n.clearReset()},[n]);let d=!l.getQueryCache().get(o.queryHash),[f]=s.useState(()=>new t(l,o)),m=f.getOptimisticResult(o),x=!a&&!1!==e.subscribed;if(s.useSyncExternalStore(s.useCallback(e=>{let t=x?f.subscribe(u.notifyManager.batchCalls(e)):p.noop;return f.updateResult(),t},[f,x]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),s.useEffect(()=>{f.setOptions(o)},[o,f]),o?.suspense&&m.isPending)throw Q(o,f,n);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,p.shouldThrowError)(r,[e.error,s])))({result:m,errorResetBoundary:n,throwOnError:o.throwOnError,query:h,suspense:o.suspense}))throw m.error;if(l.getDefaultOptions().queries?._experimental_afterQuery?.(o,m),o.experimental_prefetchInRender&&!c.environmentManager.isServer()&&m.isLoading&&m.isFetching&&!a){let e=d?Q(o,f,n):h?.promise;e?.catch(p.noop).finally(()=>{f.updateResult()})}return o.notifyOnChangeProps?m:f.trackResult(m)}({queryKey:["nfts",e],queryFn:({pageParam:t=1})=>O(t,e),getNextPageParam:e=>e.hasMore?e.nextPage:void 0,initialPageParam:1,staleTime:3e5},j,void 0)}(e),h=(0,s.useRef)(null);if((0,s.useEffect)(()=>{let e=h.current;if(!e||!a)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&a&&!n&&i()},{rootMargin:"600px 0px"});return t.observe(e),()=>t.disconnect()},[a,n,i]),l)return(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 4xl:grid-cols-6 gap-6",children:Array.from({length:12}).map((e,t)=>(0,r.jsx)(z.default,{},t))});if(o)return(0,r.jsx)("div",{className:"flex justify-center items-center py-20",children:(0,r.jsx)("div",{className:"text-red-400 text-sm",children:"Error loading NFTs. Please try again."})});let d=t?.pages.flatMap(e=>e.nfts)??[];return 0===d.length?(0,r.jsx)("div",{className:"flex justify-center items-center py-20",children:(0,r.jsx)("div",{className:"text-gray-modern-400 text-xl",children:"No Chimpions foun
1d with these filters."})}):(0,r.jsxs)("div",{className:"",children:[(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5 4xl:grid-cols-6 gap-6",children:d.map((e,t)=>(0,r.jsx)(L.default,{delay:t%4*80,children:(0,r.jsx)(B,{nft:e})},e.tokenId))}),a&&(0,r.jsx)("div",{ref:h,className:"flex justify-center mt-8 xl:mt-18 min-h-12",children:n&&(0,r.jsxs)("span",{className:"text-xl text-gray-modern-300 flex flex-row items-center gap-2",children:["Loading",(0,r.jsx)("span",{className:"animate-pulse",children:"..."})]})})]})}function q(){let[e,t]=(0,s.useState)({}),a={...e,search:function(e,t=500){let[r,i]=(0,s.useState)(e);return(0,s.useEffect)(()=>{let r=setTimeout(()=>{i(e)},t);return()=>{clearTimeout(r)}},[e,t]),r}(e.search,500)};return(0,r.jsxs)("section",{className:"relative overflow-hidden bg-gray-modern-950",children:[(0,r.jsxs)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-0 overflow-hidden",children:[(0,r.jsx)(i.default,{src:"/assets/texture_bottom-mobile.png",alt:"",width:390,height:740,priority:!0,className:"block w-full h-auto [image-rendering:pixelated] lg:hidden"}),(0,r.jsx)(i.default,{src:"/assets/texture-the-dao.png",alt:"",width:1440,height:946,priority:!0,className:"hidden w-full h-auto [image-rendering:pixelated] lg:block"}),(0,r.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-20 sm:h-28 lg:h-36",style:{background:"linear-gradient(to bottom, rgba(13, 18, 28, 0) 0%, rgba(13, 18, 28, 0.7) 55%, rgba(13, 18, 28, 1) 100%)"}})]}),(0,r.jsxs)("div",{className:"relative z-10 max-w-480 mx-auto px-4 3xl:px-20 pt-16 pb-24 lg:pt-24 lg:pb-28 flex flex-col gap-10",children:[(0,r.jsx)(l,{filters:e,onFiltersChange:t}),(0,r.jsx)(U,{filters:a})]})]})}e.s(["default",()=>q],34609)}]);
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.