PageSourceSearch

https://www.getpromonight.com/_next/static/chunks/5780-62c548e22ce…?dpl=dpl_Gr3DPw8bTDB9hPJq4xScRdJZby4e

js getpromonight.com collected 2026-09-24 14:14:01 UTC 13,083 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5780],{381:(e,t,r)=>{r.d(t,{StarredTeamsProvider:()=>u,hd:()=>m,sS:()=>l,tj:()=>c});var n=r(5155),i=r(2115),a=r(80);let s="promonight:starred_teams",o="promonight:has_seen_my_teams_intro",l="promonight:show-star-toast",d=(0,i.createContext)(null);function u(e){let{children:t}=e,[r,u]=(0,i.useState)([]),[c,m]=(0,i.useState)(!1),f=(0,i.useRef)(r);(0,i.useEffect)(()=>{f.current=r},[r]),(0,i.useEffect)(()=>{let e=function(){try{let e=window.localStorage.getItem(s);if(!e)return[];let t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e))return t;return window.localStorage.removeItem(s),[]}catch(e){return[]}}();f.current=e,u(e),m(!0)},[]),(0,i.useEffect)(()=>{function e(e){if(e.key===s){if(null==e.newValue){f.current=[],u([]);return}try{let t=JSON.parse(e.newValue);Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(f.current=t,u(t))}catch(e){}}}return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);let p=(0,i.useCallback)((e,t,r,n)=>{let i=f.current,d=i.includes(e),c=d?i.filter(t=>t!==e):[...i,e];f.current=c,u(c);try{window.localStorage.setItem(s,JSON.stringify(c))}catch(e){}if((0,a.track)(d?"team_unstarred":"team_starred",{team_slug:e,team_name:t.name,league:t.league,sport:(0,a.normalizeSport)(t.sport),placement:r}),!d&&!(null==n?void 0:n.suppressIntroToast))try{window.localStorage.getItem(o)||(window.localStorage.setItem(o,"1"),window.dispatchEvent(new CustomEvent(l,{detail:{teamName:t.name,placement:r}})))}catch(e){}},[]),h=(0,i.useCallback)(e=>r.includes(e),[r]),g=(0,i.useMemo)(()=>({starred:r,toggleStar:p,isStarred:h,isHydrated:c,count:r.length}),[r,p,h,c]);return(0,n.jsx)(d.Provider,{value:g,children:t})}function c(){let e=(0,i.useContext)(d);if(!e)throw Error("useStarredTeams must be used inside <StarredTeamsProvider>");return e}function m(){return(0,i.useContext)(d)}},1650:(e,t,r)=>{r.d(t,{GU:()=>i,Yv:()=>n});let n={opponents:[],venueCity:[]};function i(e){let{pool:t,expandedOpponentIds:r,excludeIds:n}=e,i=new Map(t.opponents.map(e=>[e.id,e])),a=new Set(n),s=new Set,o=[],l=(e,t)=>{!(!e||a.has(e.id)||s.has(e.id))&&(o.length>=3||(s.add(e.id),o.push({...e,source:t})))};for(let e of r)l(i.get(e),"opponent");for(let e of t.venueCity)l(e,"venue_city");return o}},5780:(e,t,r)=>{r.d(t,{n:()=>g});var n=r(5155),i=r(2115),a=r(80),s=r(6149),o=r(381),l=r(1650);let d=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,u={validation:"That address is missing something after the @.",network:"That did not go through. Try again."};function c(e){return!function(e){let t=e.trim();return t.length<=254&&d.test(t)}(e.email)?"validation":!1===e.requestOk?"invalid_email"===e.serverError?"validation":"network":null}var m=r(5868),f=r(6606);function p(){return null!==document.querySelector("dialog[open]")}function h(e){let{open:t,onDismiss:r,labelledBy:a,children:s}=e,o=(0,i.useRef)(null),l=(0,i.useRef)(!1),[d,u]=(0,i.useState)(t),[c,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(t){u(!0),m(!1),l.current=!1;return}if(!d)return;m(!0);let e=window.setTimeout(()=>{u(!1),m(!1)},180);return()=>window.clearTimeout(e)},[t,d]);let f=(0,i.useCallback)(e=>{l.current||(l.current=!0,r(e))},[r]);return((0,i.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&(p()||f("escape"))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t,f]),(0,i.useEffect)(()=>{if(!t)return;let e=e=>{var t;if("function"==typeof window.matchMedia&&window.matchMedia("(min-width: 640px)").matches||p())return;let r=e.target;!(r&&(null==(t=o.current)?void 0:t.contains(r)))&&(r instanceof Element&&r.closest('a, button, input, select, textarea, label, summary, dialog, [role="button"], [role="link"], [role="tab"], [contenteditable="true"]')||f("backdrop"))},r=window.setTimeout(()=>{document.addEventListener("click",e)},0);return()=>{window.clearTimeout(r),document.removeEventListener("click",e)}},[t,f]),d)?(0,n.jsxs)("div",{ref:o,role:"dialog","aria-modal":"false","aria-labelledby":a,className:"".concat(c?"capture-panel-out":"capture-panel"," fixed bottom-0 left-0 right-0 z-[90] flex max-h-[max(34vh,240px)] flex-col overflow-hidden rounded-t-3xl border border-rd-line bg-rd-card pb-[calc(env(safe-area-inset-bottom)+1.25rem)] pt-2 text-left shadow-2xl sm:bottom-6 sm:left-auto sm:right-6 sm:max-h-[70vh] sm:w-[330px] sm:rou
1nded-2xl sm:pb-5"),children:[(0,n.jsx)("button",{type:"button","aria-hidden":"true",tabIndex:-1,onClick:()=>f("handle"),className:"mx-auto mb-1 flex h-8 w-14 shrink-0 items-center justify-center rounded-full",children:(0,n.jsx)("span",{className:"h-1 w-9 rounded-full bg-rd-ink-decor"})}),(0,n.jsx)("button",{type:"button","aria-label":"Close",onClick:()=>f("x"),className:"absolute right-3 top-1.5 flex h-11 w-11 items-center justify-center rounded-full text-rd-ink-decor transition-colors hover:bg-rd-ink/[0.06] hover:text-rd-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-rd-red focus-visible:ring-offset-2 focus-visible:ring-offset-rd-card",children:(0,n.jsx)("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 pb-1",children:s})]}):null}function g(e){let{context:t,team:r,pool:d,expandedOpponentIds:u}=e,p=(0,o.hd)(),[g,v]=(0,i.useState)(!0),[y,w]=(0,i.useState)(""),[k,_]=(0,i.useState)("prompt"),[S,j]=(0,i.useState)(null),[N,C]=(0,i.useState)("confident"),[E,T]=(0,i.useState)([]),[I,L]=(0,i.useState)(null),O=(0,i.useRef)(null),A="capture-sheet-heading",F=(0,i.useCallback)(e=>{"prompt"===k&&((0,m.gr)("local").set(m.at,String(Date.now())),(0,a.track)("capture_prompt_dismissed",{...t,dismiss_method:e})),v(!1)},[t,k]),M=async e=>{var n,i,o,h;if(e.preventDefault(),"submitting"===k)return;let g=y.trim(),b=c({email:g,requestOk:null});if(b)return void j(b);_("submitting"),j(null);let x=r?[r.id]:[],v=null,w=!1;try{let e=await fetch("/api/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:g,teams:x,source:t.surface})});v=await e.json().catch(()=>null),w=e.ok&&(null==v?void 0:v.ok)===!0}catch(e){w=!1}if(!w){_("prompt"),j(c({email:g,requestOk:!1,serverError:null!=(i=null==v?void 0:v.error)?i:null}));return}L(null!=(o=null==(n=O.current)?void 0:n.offsetHeight)?o:null),(0,m.gr)("local").set(m.Bu,String(Date.now())),(0,f.GI)((0,m.gr)("session"));let S=p?(0,l.GU)({pool:d,expandedOpponentIds:u,excludeIds:[...r?[r.id]:[],...p.starred]}):[],N=g.lastIndexOf("@");(0,a.track)("capture_prompt_submitted",{...t,email_domain:g.slice(N+1).toLowerCase(),chip_count:S.length,chip_sources:S.map(e=>e.source).join(",")}),(0,a.track)("newsletter_signup",(h=x.length,{surface:t.surface,team_count:h,variant:t.variant,page_type:t.page_type})),r&&p&&!p.isStarred(r.id)&&p.toggleStar(r.id,{name:r.displayName,league:r.league,sport:r.sportSlug},"capture_sheet_context",{suppressIntroToast:!0}),T(S),C((0,s.F)(null==v?void 0:v.confirmation,null==v?void 0:v.status)),_("success")},G="success"===k?(0,n.jsx)(x,{headingId:A,variant:N,email:y.trim(),team:r,chips:E,isStarred:e=>{var t;return null!=(t=null==p?void 0:p.isStarred(e))&&t},onChipTap:(e,r)=>{if(!p)return;let n=p.isStarred(e.id);p.toggleStar(e.id,{name:e.displayName,league:e.league,sport:e.sportSlug},"capture_sheet_chip",{suppressIntroToast:!0}),n||(0,a.track)("capture_prompt_team_added",{...t,added_team_id:e.id,chip_position:r,source_team_id:t.team_id,chip_source:e.source})}}):(0,n.jsx)(b,{headingId:A,team:r,email:y,submitting:"submitting"===k,errorKind:S,onEmailChange:e=>{w(e),S&&j(null)},onSubmit:M});return(0,n.jsx)(h,{open:g,onDismiss:F,labelledBy:A,children:(0,n.jsx)("div",{ref:O,"aria-live":"polite",className:"flex flex-col",style:null!==I?{height:I}:void 0,children:G})})}function b(e){var t;let{headingId:r,team:i,email:a,submitting:s,errorKind:o,onEmailChange:l,onSubmit:d}=e,c=(t=i?i.displayName:null)?{heading:"Get ".concat(t," promos every week"),body:"Bobbleheads, theme nights and giveaways, straight to your inbox. One email a week."}:{heading:"Never miss a giveaway",body:"Every bobblehead, jersey night and theme night across the leagues you follow. One email a week."};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{id:r,className:"pr-12 font-rd text-[15px] font-semibold leading-snug text-rd-ink",children:c.heading}),(0,n.jsx)("p",{className:"mt-1.5 font-rd text-[12.5px] leading-relaxed text-rd-ink-soft",children:c.body}),(0,n.jsxs)("form",{onSubmit:d,noValidate:!0,className:"mt-3 flex gap-2",children:[(0,n.jsx)("label",{htmlFor:"capture-sheet-email",className:"sr-only",children:"Your email"}),(0,n.jsx)("input",{id:"capture-sheet-email",type:"email",inputMode:"email",autoComplete:"email",value:a,onChange:e=>l(e.target.value),disabled:s,placeholder:"[email protected]",className:"min-w-0 flex-1 rounded-lg border border-rd-line-strong bg-white px-3 py-2.5 font-rd text-[16px] text-rd-ink placeholder:text-rd-ink-faint focus:border-rd-red focus:outline-none focus:ring-2 focus:ring-rd-red/20 disabled:opacity-60"}),(0,n.jsx)("button",{type:"submit",disabled:s,className:"shrink-0 rounded-lg bg-rd-red px-3.5 py-2.5 font-rd text-[13px] font-semibold text-white transition-colors hover:bg-rd-red-dark focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-rd-red focus-visible:ring-offset-2 focus-visible:ring-offset-rd-card disabled:cursor-not-allowed disabled:opacity-60",children:s?"Sending":"Get promos"})]}),(0,n.jsx)("p",{role:"alert",className:"mt-1.5 min-h-[1.05rem] font-rd text-[11.5px] leading-tight text-rd-red",children:o?u[o]:""})]})}function x(e){let{headingId:t,variant:r,email:i,team:a,chips:s,isStarred:o,onChipTap:l}=e,d=[...a?[a.name]:[],...s.filter(e=>o(e.id)).map(e=>e.name)],u=function(e){let{variant:t,email:r,teamName:n,starredNames:i}=e,a=i.length>0?"We've added the ".concat(function(e){if(0===e.length)return"";if(1===e.length)return e[0];if(2===e.length)return"".concat(e[0]," and ").concat(e[1]);let t=e.slice(0,2).join(", ");return"".concat(t," and ").concat(e.length-2," more")}(i)," to your teams here."):null;return"failed"===t?{heading:"Almost in",body:"Your link for ".concat(r," may take a minute. If it does not arrive, submit again."),starredLine:a}:"already_subscribed"===t?{heading:"You're already subscribed",body:"We've got your teams saved. Your next promo email is on its way as usual.",starredLine:a}:n?{heading:"Almost in",body:"Tap the link we just sent you to start getting ".concat(n," promos."),starredLine:a}:{heading:"Almost in",body:"Tap the link we just sent you. You can pick y
1our teams from there.",starredLine:a}}({variant:r,email:i,teamName:a?a.displayName:null,starredNames:d});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[(0,n.jsx)("h2",{id:t,className:"pr-12 font-rd text-[15px] font-semibold leading-snug text-rd-ink",children:u.heading}),(0,n.jsx)("p",{className:"ph-no-capture mt-1.5 font-rd text-[12.5px] leading-relaxed text-rd-ink-soft",children:u.body}),u.starredLine&&(0,n.jsx)("p",{className:"mt-1.5 font-rd text-[12.5px] leading-relaxed text-rd-ink-soft",children:u.starredLine})]}),s.length>0&&(0,n.jsx)("div",{className:"mt-3 flex gap-1.5",children:s.map((e,t)=>{let r=o(e.id);return(0,n.jsxs)("button",{type:"button","aria-pressed":r,onClick:()=>l(e,t),className:"min-w-0 flex-1 truncate rounded-full border px-2.5 py-2 font-rd text-[12px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-rd-red focus-visible:ring-offset-2 focus-visible:ring-offset-rd-card ".concat(r?"border-rd-red bg-rd-red text-white":"border-rd-line-strong bg-rd-card text-rd-ink hover:border-rd-red"),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:r?"✓ ":"+ "}),e.name]},e.id)})})]})}},6149:(e,t,r)=>{r.d(t,{F:()=>n});function n(e,t){return"failed"===e?"failed":"not_needed"===e&&"confirmed"===t?"already_subscribed":"confident"}},6606:(e,t,r)=>{r.d(t,{F4:()=>u,GI:()=>d,Lx:()=>l});var n=r(5868);let i=["/follow","/preferences","/download","/privacy","/terms","/about"],a={shown:!1,signup:!1};function s(e){let t=e.get(n.vs);if(!t)return{...a};try{let e=JSON.parse(t);if("object"!=typeof e||null===e)return{...a};return{shown:!0===e.shown,signup:!0===e.signup}}catch(e){return{...a}}}function o(e,t){e.set(n.vs,JSON.stringify(t))}function l(e){o(e,{...s(e),shown:!0})}function d(e){o(e,{...s(e),signup:!0})}function u(e){let{pathname:t,local:r,session:a,now:o}=e;if(i.some(e=>t===e||t.startsWith("".concat(e,"/"))))return"excluded_path";if(!r.available||!a.available)return"storage_unavailable";if(function(e){let t=e.get(n.Bu);return"string"==typeof t&&t.length>0}(r))return"already_subscribed";if(function(e,t){let r=e.get(n.at);if(!r)return!1;let i=Number.parseInt(r,10);return!!Number.isFinite(i)&&t-i<2592e6}(r,o))return"recently_dismissed";let l=s(a);return l.signup?"session_signup":l.shown?"session_already_shown":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.