1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4516],{11451:(e,r,t)=>{t.d(r,{W:()=>a,s:()=>i});var n=t(53491);function a(e,r){let t=URL.createObjectURL(e),n=document.createElement("a");n.setAttribute("href",t),n.setAttribute("download",r),n.click(),n.remove(),URL.revokeObjectURL(t)}function i(e,r){a(new Blob([(0,n.unparse)(e)],{type:"text/csv;charset=utf-8;"}),r)}},14184:(e,r,t)=>{t.d(r,{A:()=>i});var n=t(39121),a=t(44896);function i({list:e,isEnabled:r,step:t=10,minItemsNum:o=20,resetKey:l}){let s=e?.length??0,[c,d]=a.useState(o),[m,u]=a.useState(l);l!==m&&(u(l),d(o));let p=a.useRef(null),h=a.useCallback(e=>{p.current=e},[]),f=c<s;return a.useEffect(()=>{if(!r||!f)return;let e=null,a=()=>{e=null;let r=p.current;(!r||r.getBoundingClientRect().top<=window.innerHeight+300)&&d(e=>(0,n.q)(e+t,0,s))},i=()=>{null===e&&(e=window.requestAnimationFrame(a))};return i(),window.addEventListener("scroll",i,{capture:!0,passive:!0}),window.addEventListener("resize",i,{passive:!0}),()=>{null!==e&&window.cancelAnimationFrame(e),window.removeEventListener("scroll",i,{capture:!0}),window.removeEventListener("resize",i)}},[r,f,c,s,t]),{cutRef:h,renderedItemsNum:c}}},17531:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(33164),a=t(32003),i=t(26099),o=t(44896),l=t(15140),s=t(67152),c=t(22900),d=t(97316),m=t(63127);let u=o.memo(e=>{let r=(0,l.Mp)(),t=r?.timeFormat||"relative",u=o.useCallback(()=>{r?.toggleTimeFormat(),s.$s(s.wf.BUTTON_CLICK,{Content:"Switch time format",Source:"Table header"})},[r]),p="relative"===t?null:(0,n.jsx)(a.B.span,{color:"icon.secondary",children:r?.isLocalTime?"Local":"UTC"});return(0,n.jsxs)(i.z,{display:"inline-flex",gap:1,ml:2,verticalAlign:"bottom",...e,children:[(0,n.jsx)(m.m,{content:"Toggle time format",children:(0,n.jsx)(d.K,{"aria-label":"Toggle time format",variant:"icon_secondary",onClick:u,boxSize:5,selected:"absolute"===t,borderRadius:"sm",verticalAlign:"bottom",children:(0,n.jsx)(c.A,{name:"clock-light",boxSize:"14px"})})}),p]})})},26561:(e,r,t)=>{t.d(r,{A:()=>d});var n=t(33164),a=t(44896),i=t(22900),o=t(51586),l=t(64226),s=t(63127),c=t(12581);let d=a.memo(({data:e,boxSize:r=5,borderRadius:t="none",isLoading:a,noTooltip:d,...m})=>{if(a)return(0,n.jsx)(l.EA,{boxSize:r,borderRadius:"none"===t?"full":t,...m,loading:!0});let u=(0,n.jsx)(i.A,{name:"networks/icon-placeholder",boxSize:r,color:"icon.primary"}),p=(0,n.jsx)(o._,{src:e?.logo,boxSize:r,borderRadius:t,fallback:u,alt:`${e?.name||"Unknown"} chain icon`,...m});return d?p:(0,n.jsx)(s.m,{content:(0,c.A)(e),children:p})})},46420:(e,r,t)=>{t.d(r,{A:()=>u});var n=t(33164),a=t(32003),i=t(44896),o=t(15140),l=t(97402),s=t(36889),c=t(64226),d=t(63127);let m=({timestamp:e,isLocalTime:r})=>r?(0,l.A)(e).format("llll"):(0,l.A)(e).utc().format("llll"),u=(0,a.B)(({timestamp:e,fallbackText:r,isLoading:t,enableIncrement:a,className:u,timeFormat:p})=>{let h=(0,o.Mp)(),f=p||h?.timeFormat||"relative",x=function(e,r){let[t,n]=i.useState(e?(0,l.A)(e).fromNow():null);return i.useEffect(()=>{if(null!==e){let t=[],a=[],i=()=>{let r,{startTimeout:o,interval:c,endTimeout:d}=function(e){let r=Date.now()-new Date(e).getTime(),[t,n]=r<s.pY?[s.Z2,s.pY]:r<s.dp?[s.pY,s.dp]:r<s.d_?[s.dp,s.d_]:[s.d_,2*s.d_];if(t===s.d_)return{interval:s.d_};let a=t-r%t;return{startTimeout:t===s.Z2?0:(a<t/2?a+t/2:a-t/2)+s.Z2,endTimeout:n-r+s.Z2,interval:t}}(e);if(!o&&!d)return;let m=window.setTimeout(()=>{n((0,l.A)(e).fromNow()),r=window.setInterval(()=>{n((0,l.A)(e).fromNow())},c),a.push(r)},o),u=window.setTimeout(()=>{window.clearInterval(r),i()},d);t.push(m),t.push(u)};return n((0,l.A)(e).fromNow()),r&&i(),r||n((0,l.A)(e).fromNow()),()=>{t.forEach(window.clearTimeout),a.forEach(window.clearInterval)}}},[r,e]),t}(e||"",a&&!t&&"relative"===f);if(!e&&!r)return null;let w=(()=>{if(!e)return r;if("relative"===f){let r=(0,n.jsx)(m,{timestamp:e,isLocalTime:h?.isLocalTime});return(0,n.jsx)(d.m,{content:r,children:(0,n.jsx)("span",{children:x})})}return(0,n.jsx)(d.m,{content:x,children:(0,n.jsx)("span",{children:(0,l.A)(e).utc(h?.isLocalTime).format("lll")})})})();return(0,n.jsx)(c.EA,{loading:t,className:u,children:w})})},61838:(e,r,t)=>{t.d(r,{A:()=>c});var n=t(33164),a=t(48855),i=t(16299),o=t(32003);t(44896);
1var l=t(4318),s=t(79624);let c=(0,o.B)(e=>e.isError?e.showActionBarIfError?(0,n.jsxs)(a.a,{className:e.className,children:[e.actionBar,(0,n.jsx)(l.A,{})]}):(0,n.jsx)(l.A,{className:e.className}):e.hasActiveFilters&&!e.itemsNum?(0,n.jsxs)(a.a,{className:e.className,children:[e.actionBar,(0,n.jsx)(s.p,{...e.emptyStateProps})]}):e.itemsNum?(0,n.jsxs)(a.a,{className:e.className,children:[e.actionBar,e.children]}):(0,n.jsxs)(n.Fragment,{children:[e.showActionBarIfEmpty&&e.actionBar,e.emptyText&&(0,n.jsx)(i.E,{className:e.className,children:e.emptyText})]}))},94667:(e,r,t)=>{t.d(r,{A:()=>q});var n=t(33164),a=t(48855),i=t(40263),o=t(92307),l=t(28526),s=t(44896),c=t(5937),d=t(11095),m=t(92741),u=t(91075),p=t(29357),h=t(74228),f=t(4828),x=t(1862),w=t(97402),g=t(59995),_=t(39e3),A=t(1008),j=t(84121),b=t(22900),v=t(97316),C=t(24049),y=t(63127),S=t(39017),k=t(11451),E=t(81627),T=t(58608),L=t(32003),N=t(39090),B=t(86550),Y=t(64996),D=t(70064),I=t(3319),O=t(27291);let R=s.memo(({formApi:e,name:r})=>{let{formState:t,getValues:a,trigger:i}=e,o=s.useCallback(e=>{if("from_period"===r){let r=a("to_period");if(r&&(0,w.A)(e)>(0,w.A)(r))return"Incorrect date";t.errors.to_period&&i("to_period")}else{let r=a("from_period");if(r&&(0,w.A)(r)>(0,w.A)(e))return"Incorrect date";t.errors.from_period&&i("from_period")}},[t.errors.from_period,t.errors.to_period,a,r,i]);return(0,n.jsx)(O.m,{name:r,inputProps:{type:"datetime-local",max:(0,w.A)().format("YYYY-MM-DDTHH:mm")},placeholder:(0,I.Z)(r.replace("_period","")),required:!0,rules:{validate:o}})}),z=s.memo(({open:e,onOpenChange:r,onFormSubmit:t,onCancel:a,children:i,isAsyncDownload:o})=>{let l=(0,B.mN)({mode:"onBlur",defaultValues:{from_period:(0,w.A)().subtract(1,"day").format("YYYY-MM-DDTHH:mm"),to_period:(0,w.A)().format("YYYY-MM-DDTHH:mm")}}),{handleSubmit:c,formState:d}=l,m=s.useCallback(({open:e})=>{if(d.isSubmitting&&!e){if(!window.confirm("Are you sure you want to close the dialog? The export will be cancelled."))return;a()}r({open:e})},[r,d.isSubmitting,a]);return(0,n.jsx)(D.Dz,{open:e,onOpenChange:m,size:{lgDown:"full",lg:"md"},children:(0,n.jsx)(D.Cf,{children:(0,n.jsx)(B.Op,{...l,children:(0,n.jsxs)(L.B.form,{noValidate:!0,onSubmit:c(t),children:[(0,n.jsx)(D.c7,{children:"Export data to CSV file"}),(0,n.jsxs)(D.R4,{children:[i,(0,n.jsxs)(N.s,{columnGap:3,rowGap:3,mt:6,flexDir:{base:"column",lg:"row"},alignItems:{base:"flex-start",lg:"center"},w:"100%",children:[(0,n.jsx)(R,{name:"from_period",formApi:l}),(0,n.jsx)(R,{name:"to_period",formApi:l})]}),(0,n.jsx)(Y.$n,{variant:"solid",type:"submit",mt:6,loading:d.isSubmitting,disabled:!!(d.errors.from_period||d.errors.to_period),children:o?"Generate CSV":"Download"})]})]})})})})});var M=t(16299),H=t(26561),F=t(53274);let P=s.memo(({type:e,params:r,chainInfo:t,recordsLimit:a})=>{let i=t?(0,n.jsxs)(N.s,{display:"inline-flex",alignItems:"center",whiteSpace:"pre",children:[(0,n.jsx)("span",{children:" on "}),(0,n.jsx)(H.A,{data:t,mr:1}),(0,n.jsx)("span",{children:t.app_config.chain.name})]}):null,o=a.toLocaleString(void 0,{maximumFractionDigits:3,notation:"compact"});if("token_holders"===e)return(0,n.jsxs)(M.E,{children:[(0,n.jsx)("span",{children:"Export holders for token "}),r?.token_name&&(0,n.jsx)(L.B.span,{fontWeight:"700",children:r.token_name}),i,(0,n.jsx)("span",{children:" to CSV file. "}),(0,n.jsxs)("span",{children:["Limited to the top ",o," holders by amount held."]})]});if(e.startsWith("address_")){let t=e.replace("address_","").replace("_"," "),a=(0,T.A)(r?.filter_type,r?.filter_value);return(0,n.jsxs)(M.E,{as:"div",children:[(0,n.jsxs)("span",{children:["Export ",a?`${a} `:"",t," for address "]}),r?.hash&&(0,n.jsx)(L.B.span,{fontWeight:"700",children:(0,F.A)(r.hash)}),i,(0,n.jsx)("span",{children:" to CSV file. "}),(0,n.jsxs)("span",{children:["Limited to the last ",o," ",t,"."]})]})}return null}),q=s.memo(({chainData:e,loadingInitial:r,loadingSkeleton:t,type:L,resourceName:N,pathParams:B,queryParams:Y,extraParams:D,periodFilter:I=!0,...O})=>{let[R,M]=s.useState(!1),H=s.useRef(null),F=(0,A.A)(r),q=(0,p.HX)(),U=(0,S.j)(),V=(0,x.A)(),W=(0,E.BU)(),$=(0,c.A)(),Z=e||q?.chain,X=(0,d.A)("core:config_csv_export",{queryOptions:{refetchOnMount:!1},chain:Z}),G=Z?.app_config||h.A,K=X.data?.limit||1e4,J=X.data?.async_enabled,Q=s.useMemo(()=>({...B,...(0,i.L)(Y||{},e=>(0,j.A)(e??void 0)),...D}),[B,Y,D]),ee=s.useCallback(e=>async r=>{let t=(0,m.A)(N,B,{...(0,i.L)(e||{},e=>(0,w.A)(e).toISOString()),...Y},void 0,Z);
1H.current=new AbortController;let n=await fetch(t,{headers:{"content-type":"application/octet-stream",...r&&{"recaptcha-v2-response":r},...(0,u.A)()&&Z?{"x-endpoint":Z.app_config.apis.core?.endpoint}:{}},signal:H.current?.signal});if(!n.ok)throw Error(n.statusText,{cause:{status:n.status}});return n},[N,B,Y,Z]),er=s.useCallback(e=>async r=>(H.current=new AbortController,$(N,{pathParams:B,queryParams:{...(0,i.L)(e||{},e=>(0,w.A)(e).toISOString()),...Y},chain:Z,fetchParams:{headers:{...r&&{"recaptcha-v2-response":r}},signal:H.current?.signal}})),[$,Z,B,Y,N]),et=s.useCallback(async e=>{try{M(!0);let r=await V.fetchProtectedResource(ee(e)),t=await r.blob();return(0,k.W)(t,function({type:e,params:r,chainConfig:t}){let n=t?.chain.name?`${t.chain.name.replace(" ","_").toLowerCase()}`:"";if("token_holders"===e)return[n,"token_holders",r.hash].filter(Boolean).join("_")+".csv";if(e.startsWith("address_")){let t=r.from_period&&r.to_period?`from_${r.from_period}_to_${r.to_period}`:"";return[n,(0,T.A)(r?.filter_type,r?.filter_value),e,r.hash,t].filter(Boolean).join("_")+".csv"}return"advanced_filters"===e?[n,"filtered_txs",(0,w.A)().format("YYYY-MM-DD-HH-mm-ss")].filter(Boolean).join("_")+".csv":"data.csv"}({type:L,params:{...Q,...e},chainConfig:G})),!0}catch(e){C.X.error({title:"Error",description:e?.message||"Something went wrong. Try again later."})}finally{M(!1)}},[G,ee,Q,V,L]),en=s.useCallback(async e=>{try{M(!0);let r=await V.fetchProtectedResource(er(e));if(r&&"request_id"in r){let t={request_id:r.request_id,file_id:null,expires_at:null,status:"pending",type:L,params:(0,o.f)({...(0,i.L)(e||{},e=>(0,w.A)(e).toISOString()),...Q,chain_id:Z?.id},e=>""!==e&&null!=e),is_highlighted:!1};return W.addItems([t]),await (0,l.c)(200),W.onDialogOpenChange({open:!0}),!0}throw Error("Something went wrong. Try again later.")}catch(e){if(409===(0,_.A)(e))return void C.X.warning({description:"You cannot start a new export, please wait until the current exports finish."});C.X.error({title:"Error",description:(0,g.A)(e)||"Something went wrong. Try again later."})}finally{M(!1)}},[Z,W,er,Q,V,L]),ea=s.useCallback(()=>{I?U.onOpen():(J?en:et)()},[J,I,U,en,et]),ei=s.useCallback(async e=>{let r=J?en:et;await r(e)&&U.onClose()},[J,en,et,U]),eo=s.useCallback(()=>{H.current?.abort(),H.current=null},[]);return G.features.csvExport.isEnabled?(0,n.jsxs)(a.a,{...O,children:[(0,n.jsx)(y.m,{content:"This feature is not available due to a reCAPTCHA initialization error. Please contact the project team on Discord to report this issue.",disabled:!V.isInitError,children:(0,n.jsx)(v.K,{size:"md",variant:"dropdown","aria-label":"Download CSV",loading:R,loadingSkeleton:F||t||X.isPending,onClick:ea,disabled:V.isInitError,children:(0,n.jsx)(b.A,{name:"files/csv"})})}),(0,n.jsx)(z,{open:U.open,onOpenChange:U.onOpenChange,onFormSubmit:ei,onCancel:eo,isAsyncDownload:J,children:(0,n.jsx)(P,{type:L,params:Q,chainInfo:Z,recordsLimit:K})}),(0,n.jsx)(f.A,{...V,hideWarning:!0})]}):null})}}]);
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.