PageSourceSearch

https://www.alltop.com/_next/static/chunks/3722.b860231491cd1984.js

js alltop.com collected 2026-09-24 08:26:53 UTC 12,939 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3722],{54517:(e,r,t)=>{t.d(r,{G:()=>o,u:()=>l});let o=["price_above","price_below","price_moves","spread_above","resolving_soon","arb_appears"],l={price_above:{label:"Price above",icon:"^",color:"var(--t-green)"},price_below:{label:"Price below",icon:"v",color:"var(--t-red)"},price_moves:{label:"Price moves",icon:"+/-",color:"var(--t-indigo)"},price_crosses_above:{label:"Price crosses above",icon:"^ x",color:"var(--t-green)"},price_crosses_below:{label:"Price crosses below",icon:"v x",color:"var(--t-red)"},spread_above:{label:"Spread widens",icon:"<>",color:"var(--t-indigo)"},spread_below:{label:"Spread narrows",icon:"><",color:"var(--t-indigo)"},spread_crosses_above:{label:"Spread crosses above",icon:"<> x",color:"var(--t-indigo)"},spread_crosses_below:{label:"Spread crosses below",icon:">< x",color:"var(--t-indigo)"},open_interest_above:{label:"Open interest above",icon:"OI ^",color:"var(--t-green)"},open_interest_below:{label:"Open interest below",icon:"OI v",color:"var(--t-red)"},open_interest_crosses_above:{label:"Open interest crosses above",icon:"OI ^x",color:"var(--t-green)"},open_interest_crosses_below:{label:"Open interest crosses below",icon:"OI vx",color:"var(--t-red)"},volume_24h_above:{label:"24h volume above",icon:"Vol ^",color:"var(--t-green)"},volume_24h_below:{label:"24h volume below",icon:"Vol v",color:"var(--t-red)"},volume_24h_crosses_above:{label:"24h volume crosses above",icon:"Vol ^x",color:"var(--t-green)"},volume_24h_crosses_below:{label:"24h volume crosses below",icon:"Vol vx",color:"var(--t-red)"},resolving_soon:{label:"Resolving soon",icon:"Soon",color:"#e8920a"},arb_appears:{label:"ARB appears",icon:"ARB",color:"#7c3aed"}}},93722:(e,r,t)=>{t.r(r),t.d(r,{AlertCreator:()=>u});var o=t(97506),l=t(74602),i=t(62487),n=t(17562),a=t(94892),s=t(97214),d=t(54517);function c(e){return!!(e&&d.G.includes(e))}let p=[{type:"price_above",icon:"↑",label:"Price above",desc:"Fires when YES price crosses a ceiling",thresholdLabel:"Target price",thresholdUnit:"%",thresholdMin:1,thresholdMax:99,thresholdDefault:70,thresholdStep:1},{type:"price_below",icon:"↓",label:"Price below",desc:"Fires when YES price drops under a floor",thresholdLabel:"Target price",thresholdUnit:"%",thresholdMin:1,thresholdMax:99,thresholdDefault:30,thresholdStep:1},{type:"price_moves",icon:"↕",label:"Price moves",desc:"Fires on any move larger than X percentage points",thresholdLabel:"Move size",thresholdUnit:"pp",thresholdMin:1,thresholdMax:50,thresholdDefault:5,thresholdStep:1},{type:"spread_above",icon:"⇔",label:"Spread widens",desc:"Fires when cross-venue spread exceeds threshold",thresholdLabel:"Spread size",thresholdUnit:"pp",thresholdMin:1,thresholdMax:30,thresholdDefault:5,thresholdStep:1},{type:"resolving_soon",icon:"⏳",label:"Resolving soon",desc:"Fires when resolution date is within N days",thresholdLabel:"Days out",thresholdUnit:"d",thresholdMin:1,thresholdMax:90,thresholdDefault:7,thresholdStep:1},{type:"arb_appears",icon:"⚡",label:"ARB appears",desc:"Fires when a cross-venue arbitrage opportunity appears",thresholdLabel:"Min ARB size",thresholdUnit:"pp",thresholdMin:1,thresholdMax:20,thresholdDefault:2,thresholdStep:.5}],h=Object.fromEntries(p.map(e=>[e.type,e]));function u(){let{alertCreatorOpen:e,alertCreatorOpts:r,closeAlertCreator:t,alerts:d,createAlert:u,deleteAlert:b,signedIn:g}=(0,n.nm)(),{showToast:m}=(0,a.d)(),f=r?.editAlertId?d.find(e=>e.id===r.editAlertId):void 0,[y,w]=(0,l.useState)(""),[S,_]=(0,l.useState)(r?.marketSlug??f?.marketSlug??""),[k,j]=(0,l.useState)(null),[C,M]=(0,l.useState)([]),[z,A]=(0,l.useState)("idle"),[N,R]=(0,l.useState)(c(f?.type)?f.type:"price_above"),D=h[N],[$,F]=(0,l.useState)(f?.threshold??D.thresholdDefault);(0,l.useEffect)(()=>{if(!e)return;let t=r?.marketSlug??f?.marketSlug??"",o=c(f?.type)?f.type:"price_above",l=h[o];_(t),j(null),M([]),A("idle"),R(o),F(f?.threshold??l.thresholdDefault),w("")},[e]),(0,l.useEffect)(()=>{f||F(h[N].thresholdDefault)},[N,f]),(0,l.useEffect)(()=>{if(!e||S||r?.marketSlug)return;let t=(0,s.QQ)();if(!t.configured()){A("error"),M([]);return}let o=!1;A("loading");let l=window.setTimeout(()=>{t.markets({q:y.trim()||void 0,limit:8}).then(e=>{o||(M(e.items.map(v)),A("ready"))}).catch(()=>{o||(M([]),A("error"))})},150*!!y.trim());return()=>{o=!0,window.clearTimeout(l)}}
1,[e,r?.marketSlug,y,S]),(0,l.useEffect)(()=>{if(!e||!S||k?.slug===S)return;let r=(0,s.QQ)();if(!r.configured())return;let t=!1;return r.market(S).then(e=>{t||j(v(e))}).catch(()=>{}),()=>{t=!0}},[e,k?.slug,S]);let T=S&&k?.slug===S?k:null,I=T?.price??r?.currentPrice??f?.lastValue,B=h[N],E=(0,l.useRef)(null);return e&&g?(0,i.createPortal)((0,o.jsx)("div",{ref:E,onClick:function(e){e.target===E.current&&t()},style:{position:"fixed",inset:0,background:"rgba(10,12,16,.55)",backdropFilter:"blur(3px)",zIndex:300,display:"flex",alignItems:"center",justifyContent:"center",padding:"20px 16px"},children:(0,o.jsxs)("div",{style:{background:"var(--paper)",border:"1px solid var(--t-hairline)",borderRadius:"calc(var(--t-r) * 2)",boxShadow:"0 24px 64px rgba(10,12,16,.32)",width:"100%",maxWidth:560,maxHeight:"90vh",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,o.jsxs)("div",{style:{padding:"16px 20px",borderBottom:"1px solid var(--t-hairline)",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"eyebrow",style:{marginBottom:2},children:f?"Edit alert":"Create alert"}),(0,o.jsx)("h2",{style:{fontSize:16,fontWeight:700,color:"var(--t-ink)",margin:0},children:f?"Update your alert settings":"Get notified when markets move"})]}),(0,o.jsx)("button",{onClick:t,style:{background:"none",border:"none",cursor:"pointer",color:"var(--t-muted)",fontSize:18,padding:"4px 8px",lineHeight:1,borderRadius:"var(--t-r)"},children:"✕"})]}),(0,o.jsxs)("div",{style:{flex:1,overflowY:"auto",padding:"18px 20px",display:"flex",flexDirection:"column",gap:20},children:[!r?.marketSlug&&(0,o.jsxs)("section",{children:[(0,o.jsx)("div",{className:"eyebrow",style:{marginBottom:8},children:"Market"}),T?(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",background:"var(--paper-2)",borderRadius:"var(--t-r)",border:"1px solid var(--t-hairline)"},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{style:{fontSize:13,fontWeight:600,color:"var(--t-ink)"},children:T.title}),(0,o.jsx)("div",{style:{fontSize:11,color:"var(--t-muted)",marginTop:2},children:x(T)})]}),(0,o.jsx)("button",{onClick:()=>{_(""),w("")},style:{background:"none",border:"none",cursor:"pointer",color:"var(--t-muted)",fontSize:12,padding:"4px 8px"},children:"Change"})]}):(0,o.jsxs)("div",{style:{position:"relative"},children:[(0,o.jsx)("input",{type:"text",placeholder:"Search markets…",value:y,onChange:e=>w(e.target.value),autoFocus:!0,style:{width:"100%",boxSizing:"border-box",padding:"9px 12px",fontSize:13,border:"1px solid var(--t-hairline)",borderRadius:"var(--t-r)",background:"var(--paper)",color:"var(--t-ink)"}}),(0,o.jsxs)("div",{style:{marginTop:4,border:"1px solid var(--t-hairline)",borderRadius:"var(--t-r)",overflow:"hidden",background:"var(--paper)"},children:[C.map(e=>(0,o.jsxs)("button",{onClick:()=>{_(e.slug),j(e),w("")},style:{display:"block",width:"100%",textAlign:"left",padding:"9px 12px",background:"none",border:"none",borderBottom:"1px solid var(--t-hairline)",cursor:"pointer",color:"var(--t-ink)"},className:"hover-row",children:[(0,o.jsx)("div",{style:{fontSize:13,fontWeight:500},children:e.title}),(0,o.jsx)("div",{style:{fontSize:11,color:"var(--t-muted)",marginTop:1},children:x(e)})]},e.slug)),"loading"===z&&0===C.length&&(0,o.jsx)("div",{style:{padding:"12px",fontSize:12,color:"var(--t-muted)",textAlign:"center"},children:"Searching markets…"}),"loading"!==z&&0===C.length&&(0,o.jsx)("div",{style:{padding:"12px",fontSize:12,color:"var(--t-muted)",textAlign:"center"},children:"No markets found"})]})]})]}),r?.marketSlug&&T&&(0,o.jsxs)("section",{children:[(0,o.jsx)("div",{className:"eyebrow",style:{marginBottom:8},children:"Market"}),(0,o.jsxs)("div",{style:{padding:"10px 12px",background:"var(--paper-2)",borderRadius:"var(--t-r)",border:"1px solid var(--t-hairline)"},children:[(0,o.jsx)("div",{style:{fontSize:13,fontWeight:600,color:"var(--t-ink)"},children:T.title}),(0,o.jsxs)("div",{style:{fontSize:11,color:"var(--t-muted)",marginTop:2},children:[x(T),r.outcomeLabel&&` \xb7 Outcome: ${r.outcomeLabel}`]})]})]}),(0,o.jsxs)("section",{children:[(0,o.jsx)("div",{className:"eyebrow",style:{marginBottom:8},children:"Alert type"}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:p.map(e=>{let r=e.type===N;return(0,o.jsxs)("button",{onClick:()=>R(e.type),style:{display:"flex",flexDirection:"column",gap:4,padding:"10px 12px",borderRadius:"var(--t-r)",border:`1.5px solid ${r?"var(--t-indigo)":"var(--t-hairline)"}`,background:r?"var(--t-indigo-soft)":"var(--paper)",cursor:"pointer",textAlign:"left",transition:"all .12s"},children:[(0,o.jsx)("span",{style:{fontSize:18,lineHeight:1},children:e.icon}),(0,o.jsx)("span",{style:{fontSize:12,fontWeight:700,color:r?"var(--t-indigo)":"var(--t-ink)"},children:e.label}),(0,o.jsx)("span",{style:{fontSize:11,color:"var(--t-muted)",lineHeight:1.3},children:e.desc})]},e.type)})})]}),(0,o.jsxs)("section",{children:[(0,o.jsx)("div",{className:"eyebrow",style:{marginBottom:8},children:B.thresholdLabel}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,o.jsx)("input",{type:"range",min:B.thresholdMin,max:B.thresholdMax,step:B.thresholdStep,value:$,onChange:e=>F(parseFloat(e.target.value)),style:{flex:1,accentColor:"var(--t-indigo)"}}),(0,o.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:4,padding:"5px 10px",background:"var(--paper-2)",border:"1px solid var(--t-hairline)",borderRadius:"var(--t-r)",minWidth:64,justifyContent:"center"},children:[(0,o.jsx)("input",{type:"number",min:B.thresholdMin,max:B.thresholdMax,step:B.thresholdStep,value:$,onChange:e=>{let r=parseFloat(e.target.value);isNaN(r)||F(Math.max(B.thresholdMin,Math.min(B.thresholdMax,r)))},style:{width:44,fontSize:14,fontWeight:700,background:"none",border:"none",color:"var(--t-ink)",textAlign:"right",outline:"none",fontFamily:"var(--font-mono, monospace)"}}),(0,o.jsx)("span",{style:{fontSize:12,color:"var(--t-muted)"},children:B.thresholdUnit})]})]}),(0,o.jsxs)("div",{style:{fontSize:11,color:"var(--t-muted)",marginTop:6},children:["price_above"===N&&void 0!==I&&($>I?`Current price is ${I}% — alert fires when it rises to ${$}%`:`⚠️ Current price ${I}% already exceeds threshold — alert will fire immediately`),"price_below"===N&&void 0!==I&&($<I?`Current price is ${I}% — alert fires when it drops to ${$}%`:`⚠️ Current price ${I}% already below threshold — alert will fire immediately`),"price_moves"===N&&`Alert fires on any move of ${$}pp or more in either direction`,"spread_above"===N&&`Alert fires when cross-venue spread exceeds ${$}pp`,"resolving_soon"===N&&`Alert fires when resolution date is within ${$} day${1!==$?"s":""}`,"arb_appears"===N&&`Alert fires when an arbitrage opportunity of ${$}pp+ appears`]})]})]}),(0,o.jsxs)("div",{style:{padding:"14px 20px",borderTop:"1px solid var(--t-hairline)",display:"flex",gap:8,flexShrink:0,background:"var(--paper-2)"},children:[f&&(0,o.jsx)("button",{onClick:function(){f&&(b(f.id),m({message:"Alert deleted",variant:"info"}),t())},className:"btn",style:{color:"var(--t-red)",borderColor:"var(--t-red-soft)",marginRight:"auto"},children:"Delete alert"}),(0,o.jsx)("button",{onClick:t,className:"btn",style:{marginLeft:f?0:"auto"},children:"Cancel"}),(0,o.jsx)("button",{onClick:function(){S&&(f&&b(f.id),u({marketSlug:S,outcomeKey:r?.outcomeKey,type:N,threshold:$,lastValue:I}),m({message:f?"Alert updated":"Alert created",variant:"success",link:{label:"View all alerts →",href:"/terminal/alerts"}}),t())},className:"btn btn-primary",disabled:!S,style:{opacity:S?1:.5,cursor:S?"pointer":"not-allowed"}
1,children:f?"Save changes":"Create alert"})]})]})}),document.body):null}function v(e){return{slug:e.slug||e.id,title:e.title||e.slug||e.id,price:b(e.bestYes)??function(e){let r=e.prices.map(e=>b(e.yes)).filter(e=>void 0!==e);if(0!==r.length)return Math.max(...r)}(e),resolution:function(e){if(!e)return;let r=new Date(e);return Number.isNaN(r.getTime())?e:new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}).format(r)}(e.resolvesAt)||e.subtitle}}function b(e){if(void 0===e||""===e)return;let r=Number(e);if(Number.isFinite(r))return+Math.max(0,1>=Math.abs(r)?100*r:r).toFixed(2)}function x(e){let r=[];return void 0!==e.price&&r.push(`${e.price}% YES`),e.resolution&&r.push(`Resolves ${e.resolution}`),r.join(" \xb7 ")||"Market data"}}}]);

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.