PageSourceSearch

https://nightwatch-v1-frontend.onrender.com/_next/static/chunks/2053.e6aced13410d9d0f.js

js nightwatch-v1-frontend.onrender.com collected 2026-10-03 11:43:11 UTC 9,018 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2053],{42053:function(e,t,n){n.r(t),n.d(t,{default:function(){return c}});var o=n(57437),r=n(2265);let i=n(40257).env.NEXT_PUBLIC_API_URL||"https://nightwatch-v1-api.onrender.com",a={accent:"#4f8eff",text:"#e2e8f0",muted:"#94a3b8",faint:"#64748b",border:"rgba(255,255,255,0.08)",card:"#131a24",surface:"rgba(255,255,255,0.03)",green:"#22c55e",amber:"#f59e0b",red:"#ef4444",gold:"#fbbf24"};function l(e){let{pct:t}=e,n=t<30?a.red:t<70?a.amber:a.green;return(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,o.jsx)("div",{style:{flex:1,height:6,borderRadius:4,background:"rgba(255,255,255,0.06)",overflow:"hidden"},children:(0,o.jsx)("div",{style:{width:"".concat(Math.min(100,Math.max(0,t)),"%"),height:"100%",background:n}})}),(0,o.jsxs)("span",{style:{fontSize:11,fontWeight:800,color:n,minWidth:34,textAlign:"right"},children:[t,"%"]})]})}function s(e){let{exchange:t,symbol:n}=e,[l,s]=(0,r.useState)({loading:!0,error:null,data:null});(0,r.useEffect)(()=>{let e=!0;return s({loading:!0,error:null,data:null}),(async()=>{try{let o=encodeURIComponent(n),r=await fetch("".concat(i,"/steward/tasks/").concat(t,"/").concat(o));if(!r.ok)throw Error("HTTP ".concat(r.status));let a=await r.json();e&&s({loading:!1,error:null,data:a})}catch(t){e&&s({loading:!1,error:t.message||"Failed to load",data:null})}})(),()=>{e=!1}},[t,n]);let{loading:d,error:c,data:p}=l,g=(null==p?void 0:p.tasks)||[],u=g.filter(e=>"mining"!==e.status),x=g.filter(e=>"mining"===e.status);return(0,o.jsxs)("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid ".concat(a.border)},children:[d&&(0,o.jsx)("div",{style:{fontSize:12,color:a.muted,padding:"8px 0"},children:"Loading tasks…"}),c&&!d&&(0,o.jsxs)("div",{style:{fontSize:12,color:a.red,padding:"8px 0"},children:["Couldn't load tasks (",c,")."]}),!d&&!c&&(0,o.jsxs)(o.Fragment,{children:[0===g.length?(0,o.jsx)("div",{style:{fontSize:12,color:a.muted,padding:"4px 0 10px"},children:"No open task fields — this asset looks complete."}):(0,o.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:12},children:[...u,...x].slice(0,12).map((e,t)=>(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:8,background:a.surface,border:"1px solid ".concat(a.border),opacity:"mining"===e.status?.6:1},children:[(0,o.jsxs)("div",{style:{minWidth:0},children:[(0,o.jsx)("div",{style:{fontSize:12,fontWeight:700,color:a.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.field_label||e.field_name}),(0,o.jsxs)("div",{style:{fontSize:10,color:a.faint},children:[e.group_label||e.group,"mining"===e.status?" \xb7 pending":""]})]}),(0,o.jsxs)("span",{style:{fontSize:11,fontWeight:800,color:a.gold,whiteSpace:"nowrap"},children:[e.cherry," \uD83C\uDF52"]})]},"".concat(e.field_name,"-").concat(t)))}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[(0,o.jsx)("a",{href:"/token/".concat(t,"/").concat(String(n).replace(/\//g,"~")),style:{padding:"8px 16px",borderRadius:8,textDecoration:"none",background:a.accent,color:"#fff",fontSize:12,fontWeight:800},children:"Open token portal →"}),(0,o.jsx)("span",{style:{fontSize:11,color:a.faint},children:"Fill fields via the token page's Mine section."})]})]})]})}function d(e){var t,n,r;let{item:i,expanded:d,onToggle:c}=e,p=null!==(t=i.pct)&&void 0!==t?t:0,g=null!==(n=i.mined)&&void 0!==n?n:0,u=i.empty_groups||[];return(0,o.jsxs)("div",{style:{background:a.card,border:"1px solid ".concat(d?a.accent:a.border),borderRadius:12,padding:14,transition:"border-color 0.15s",gridColumn:d?"1 / -1":"auto"},children:[(0,o.jsxs)("button",{onClick:c,"aria-expanded":d,style:{all:"unset",cursor:"pointer",display:"block",width:"100%"},children:[(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:8,marginBottom:10},children:[(0,o.jsx)("span",{style:{fontSize:15,fontWeight:900,color:a.text},children:i.symbol}),(0,o.jsx)("span",{style:{fontSize:10,fontWeight:700,color:a.muted,background:"rgba(255,255,255,0.05)",border:"1px solid ".concat(a.border),padding:"2px 8px",borderRadius:6},children:String(i.exchange||"").toUpperCase()})]}),(0,o.jsx)(l,{pct:p}),(0,o.jsxs)("div",{style:{fontSize:12,color:a.muted,marginTop:10},children:[(0,o.jsx)("span",{style:{color:a.text,fontWeight:700},children:Math.max(0,25-g)})," open tasks"," \xb7 ",(0,o.jsxs)("span",{style:{color:a.gold,fontWeight:700},children:[null!==(r=i.cherry_available)&&void 0!==r?r:0," \uD83C\uDF52"]})," available"]}),u.length>0&&(0,o.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:8},children:u.slice(0,6).map(e=>
1(0,o.jsx)("span",{style:{fontSize:10,color:a.faint,background:"rgba(255,255,255,0.04)",border:"1px solid ".concat(a.border),padding:"1px 7px",borderRadius:5},children:e},e))})]}),d&&(0,o.jsx)(s,{exchange:i.exchange,symbol:i.symbol})]})}function c(){let[e,t]=(0,r.useState)("importance"),[n,l]=(0,r.useState)({loading:!0,error:null,items:[]}),[s,c]=(0,r.useState)(null),[p,g]=(0,r.useState)(null),u=(0,r.useCallback)(async()=>{l(e=>({...e,loading:!0,error:null}));try{let t=await fetch("".concat(i,"/steward/gaps?sort=").concat(e,"&limit=30"));if(!t.ok)throw Error("HTTP ".concat(t.status));let n=await t.json();l({loading:!1,error:null,items:n.items||[]})}catch(e){l({loading:!1,error:e.message||"Failed to load",items:[]})}},[e]);(0,r.useEffect)(()=>{u()},[u]),(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("".concat(i,"/steward/pipeline"));if(!t.ok)return;let n=await t.json();e&&g(n)}catch(e){}})(),()=>{e=!1}},[]);let{loading:x,error:h,items:f}=n;return(0,o.jsxs)("div",{style:{maxWidth:1200,margin:"0 auto"},children:[(0,o.jsxs)("div",{style:{marginBottom:16},children:[(0,o.jsx)("h2",{style:{fontSize:20,fontWeight:900,color:a.text,margin:"0 0 6px"},children:"Steward Board"}),(0,o.jsx)("p",{style:{fontSize:13,color:a.muted,margin:0},children:"Fill an asset's missing intelligence. Every empty node is a task — Cherry values shown are posted rewards; settlement ships with P5."}),p&&(0,o.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:["number"==typeof p.open_distribution_bounties&&(0,o.jsxs)("span",{style:{fontSize:11,fontWeight:700,color:a.accent,background:"".concat(a.accent,"15"),border:"1px solid ".concat(a.accent,"30"),padding:"3px 10px",borderRadius:8},children:[p.open_distribution_bounties," open distribution bounties"]}),"number"==typeof p.gap_tokens_over_60pct&&(0,o.jsxs)("span",{style:{fontSize:11,fontWeight:700,color:a.green,background:"".concat(a.green,"15"),border:"1px solid ".concat(a.green,"30"),padding:"3px 10px",borderRadius:8},children:[p.gap_tokens_over_60pct," assets 60%+ complete"]})]})]}),(0,o.jsx)("div",{style:{display:"flex",gap:6,marginBottom:16,flexWrap:"wrap"},children:[{key:"importance",label:"Most important"},{key:"opportunity",label:"Top opportunity"},{key:"incomplete",label:"Most incomplete"}].map(n=>(0,o.jsx)("button",{onClick:()=>t(n.key),style:{padding:"7px 16px",borderRadius:8,border:"1px solid",borderColor:e===n.key?a.accent:a.border,background:e===n.key?"".concat(a.accent,"18"):"transparent",color:e===n.key?a.accent:a.muted,fontSize:12,fontWeight:700,cursor:"pointer"},children:n.label},n.key))}),x?(0,o.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:12},children:[[...Array(6)].map((e,t)=>(0,o.jsx)("div",{style:{height:128,borderRadius:12,background:a.card,border:"1px solid ".concat(a.border),opacity:.5,animation:"pulse 1.5s ease-in-out infinite"}},t)),(0,o.jsx)("style",{children:"@keyframes pulse { 0%,100% { opacity: 0.35 } 50% { opacity: 0.65 } }"})]}):h?(0,o.jsxs)("div",{style:{background:a.card,border:"1px solid ".concat(a.border),borderRadius:12,padding:32,textAlign:"center"},children:[(0,o.jsx)("div",{style:{fontSize:14,color:a.text,marginBottom:8},children:"Couldn't load the board"}),(0,o.jsx)("div",{style:{fontSize:12,color:a.muted,marginBottom:16},children:h}),(0,o.jsx)("button",{onClick:u,style:{padding:"8px 20px",borderRadius:8,border:"1px solid ".concat(a.accent),background:"".concat(a.accent,"18"),color:a.accent,fontSize:12,fontWeight:700,cursor:"pointer"},children:"Retry"})]}):0===f.length?(0,o.jsxs)("div",{style:{background:a.card,border:"1px solid ".concat(a.border),borderRadius:12,padding:40,textAlign:"center"},children:[(0,o.jsx)("div",{style:{fontSize:14,color:a.text,marginBottom:8},children:"No assets need work right now"}),(0,o.jsx)("div",{style:{fontSize:12,color:a.muted},children:"Every tracked asset is fully enriched. New gaps appear as tokens are added."})]}):(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:12},children:f.map(e=>{let t="".concat(e.exchange,"/").concat(e.symbol);return(0,o.jsx)(d,{item:e,expanded:s===t,onToggle:()=>c(s===t?null:t)},t)})})]})}}}]);

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.