1"use strict";(self.webpackChunkthe_gist_website=self.webpackChunkthe_gist_website||[]).push([[6913],{8774:function(e,t,r){r.d(t,{A:function(){return h}});var n={};r.r(n),r.d(n,{grid:function(){return l},grid__1:function(){return u},grid__2:function(){return c},grid__3:function(){return s},grid__4:function(){return d},grid__5:function(){return m},grid__nowrap:function(){return p},grid__tight:function(){return g},spin:function(){return _}});var a=r(6540),i=r(5556),o=r.n(i),l="grid-module--grid--e815d",u="grid-module--grid__1--9a5e8",c="grid-module--grid__2--418e2",s="grid-module--grid__3--c91cf",d="grid-module--grid__4--8b5db",m="grid-module--grid__5--49013",p="grid-module--grid__nowrap--9cae9",g="grid-module--grid__tight--81fdb",_="grid-module--spin--56878";const f=({children:e,tight:t,col:r,className:i,nowrap:o})=>a.createElement("div",{className:`${i} ${l} ${t?g:""} ${n[`grid__${r}`]} ${o?p:""}`},e);var h=f;f.propTypes={children:o().node,tight:o().bool,className:o().string,col:o().number.isRequired,nowrap:o().bool},f.defaultProps={children:null,tight:!1,className:"",nowrap:!1}},8972:function(e,t,r){r.d(t,{A:function(){return S}});var n={};r.r(n),r.d(n,{spin:function(){return u},tag:function(){return c},tag__active:function(){return s},tag__black:function(){return d},tag__bloodorange:function(){return m},tag__chartruse:function(){return p},tag__click:function(){return g},tag__cobalt:function(){return _},tag__emerald:function(){return f},tag__light:function(){return h},tag__noLink:function(){return v},tag__paper:function(){return w},tag__partner:function(){return b},tag__partnerLink:function(){return $},tag__pink:function(){return y},tag__sky:function(){return k},tag__white:function(){return A}});var a=r(6540),i=r(4810),o=r(5556),l=r.n(o),u="tag-module--spin--e9e57",c="tag-module--tag--c446d",s="tag-module--tag__active--8b800",d="tag-module--tag__black--3c824",m="tag-module--tag__bloodorange--088d9",p="tag-module--tag__chartruse--2f6dd",g="tag-module--tag__click--fe80e",_="tag-module--tag__cobalt--6b1b5",f="tag-module--tag__emerald--9c272",h="tag-module--tag__light--282e4",v="tag-module--tag__noLink--3657f",w="tag-module--tag__paper--5e459",b="tag-module--tag__partner--a02d0",$="tag-module--tag__partnerLink--2805c",y="tag-module--tag__pink--bc588",k="tag-module--tag__sky--a292a",A="tag-module--tag__white--d1831";const E=({children:e,active:t,url:r,color:o,light:l,partner:u,onClick:d})=>d?a.createElement("button",{type:"button",onClick:d,onKeyPress:d,className:`${c} ${g} ${t?s:""} ${n[`tag__${null==o?void 0:o.replaceAll("-","")}`]} ${l?h:""} ${u?b:""}`},e):t||!r?a.createElement("div",{className:`${c} ${v} ${t?s:""} ${n[`tag__${null==o?void 0:o.replaceAll("-","")}`]} ${l?h:""} ${u?b:""}`},e):a.createElement(i.Link,{to:r,className:`${c} ${n[`tag__${null==o?void 0:o.replaceAll("-","")}`]} ${l?h:""} ${u?`${b} ${$}`:""} `},e);var S=E;E.propTypes={children:l().node.isRequired,onClick:l().func,active:l().bool,url:l().string,color:l().string,light:l().bool,partner:l().bool},E.defaultProps={onClick:null,active:!1,url:"",color:"",light:!1,partner:!1}},609:function(e,t,r){r.d(t,{A:function(){return q}});var n={};r.r(n),r.d(n,{spin:function(){return l},title:function(){return u},title__black:function(){return c},title__bloodorange:function(){return s},title__chartruse:function(){return d},title__cobalt:function(){return m},title__dark:function(){return p},title__emerald:function(){return g},title__paper:function(){return _},title__pink:function(){return f},title__sky:function(){return h},title__white:function(){return v},wrapper:function(){return w},wrapper__black:function(){return b},wrapper__bloodorange:function(){return $},wrapper__chartruse:function(){return y},wrapper__cobalt:function(){return k},wrapper__emerald:function(){return A},wrapper__paper:function(){return E},wrapper__pink:function(){return S},wrapper__sky:function(){return N},wrapper__white:function(){return P}});var a=r(6540),i=r(5556),o=r.n(i),l="title-module--spin--05128",u="title-module--title--854a7",c="title-module--title__black--cc8ce",s="title-module--title__bloodorange--9d4b7",d="title-module--title__chartruse--adfc4",m="title-module--title__cobalt--15cf1",p="title-module--title__dark--afeef",g="title-module--title__emerald--f5fb7",_="title-module--title__paper--0f50b",f="title-module--title__pink--7f83e",h="title-module--title__sky--46d6f",v="title-module--title__white--6750d",w="title-module--wrapper--d3cf3",b="title-module--wrapper__black--3b889",$="title-module--wrapper__bloodorange--bc11f",y="title-module--wrapper__chartruse--8f1e0",k="title-module--wrapper__cobalt--a9f05",A="title-module--wrapper__emerald--46756",E="title-module--wrapper__paper--3825e",S="title-module--wrapper__pink--b49fe",N="title-module--wrapper__sky--1c554",P="title-module--wrapper__white--700e1",C=r(5422),x=r(8089);const T=({color:e,children:t})=>a.createElement("div",{className:`${u} ${n[`title__${e}`]} ${(0,C.A)(e)?p:""}`},a.createElement(x.A,{container:!0,className:`${w} ${n[`wrapper__${e}`]}`},t));var q=T;T.propTypes={color:o().string.isRequired,children:o().node.isRequired}},6761:function(e,t,r){r.d(t,{A:function(){return l}});var n=r(6540),a=r(5556),i=r.n(a);const o=({children:e,condition:t,error:r,className:a,flex:i})=>n.createElement("div",{className:`form-screen ${a} form-state-module--state--dca79 ${r?"form-state-module--state__error--68b0a":""} ${t?"form-state-module--state__show--96015":"form-state-module--state__hide--aa4e0"} ${i?"form-state-module--state__flex--1f24e":""}`},e);var l=o;o.propTypes={children:i().node.isRequired,condition:i().bool.isRequired,error:i().bool,className:i().string,flex:i().bool},o.defaultProps={error:!1,className:"",flex:!1}},3415:function(e,t,r){r.d(t,{A:function(){return d}});var n=r(6540),a=r(5556),i=r.n(a),o=r(7940),l=r(8507),u=r(41),c=r(6
1761);const s=({children:e,handleSubmit:t,errorMessage:r,submitText:a,formState:i,className:s,buttonVariant:d,trackSubscribe:m})=>n.createElement("form",{className:`form-module--form--f471a ${s}`,onSubmit:t},n.createElement(c.A,{condition:"error"===i,error:!0},n.createElement(l.A,{content:"object"==typeof r?r:null},"string"==typeof r?r:null)),n.createElement("div",{className:"form-module--content--df859"},e),"none"===d?"":n.createElement(o.A,{variant:d,className:(m?"subscribe_submit":"")+" form-module--submit--75176",submit:!0,disabled:"pending"===i},"pending"===i?n.createElement(u.A,{icon:"autorenew",spin:!0}):a));var d=s;s.propTypes={children:i().node.isRequired,handleSubmit:i().func.isRequired,errorMessage:i().string,submitText:i().string,formState:i().string,className:i().string,buttonVariant:i().string,trackSubscribe:i().bool},s.defaultProps={errorMessage:"Error, please try again.",submitText:"Submit",formState:"",className:"",buttonVariant:"primary",trackSubscribe:!1}},1121:function(e,t,r){r.d(t,{A:function(){return h}});var n=r(6540),a=r(4810),i=r(5556),o=r.n(i),l="login-module--link--afde6",u="login-module--link__light--aac88",c=r(6),s=r(8974),d=r(203),m=r(8507),p=r(9426),g=r(202),_=r(3415);const f=({initialMode:e,currentEmail:t,currentFirstName:r,currentLastName:i,currentCountry:o,currentPhone:f,currentZipcode:h,light:v,standalone:w,anonymous:b,conversionSource:$,conversionName:y})=>{var k,A,E,S,N,P,C,x,T;const{site:q,sanityLogin:R,allSanityDictionary:D,allSanityCountry:L,sanitySubscribe:F}=(0,a.useStaticQuery)("888975339"),[I,M]=(0,n.useState)(e),[O,Z]=(0,n.useState)(t),[K,U]=(0,n.useState)(""),[j,z]=(0,n.useState)(""),[V,Y]=(0,n.useState)(r),[H,Q]=(0,n.useState)(i),[W,X]=(0,n.useState)(f),[B,G]=(0,n.useState)(h),[J,ee]=(0,n.use
1State)(o),[te,re]=(0,n.useState)(""),[ne,ae]=(0,n.useState)(""),[ie,oe]=(0,n.useState)(""),[le,ue]=(0,n.useState)(null===(k=D.nodes.find((e=>"error_message"===e.key.current)))||void 0===k?void 0:k.value),ce=(0,n.useCallback)((async t=>{if(t.preventDefault(),"create"!==I||b||K===j){ae("pending");const t=async()=>{if("create"===I)return b?(0,c.Nx)(O,J,$,y,F.vertical.cio_id):(0,c.Oh)(O,K,j,V,H,J,$,y,F.vertical.cio_id);if("edit"===I)return(0,c.$t)(O,K,j,V,H,J,W,B);if("reset-password"===I)return(0,c.T4)(O,q.siteMetadata.siteUrl);if(I.includes("confirm-password")){const t=e.split("/")[1],r=e.split("/")[2];return(0,c.am)(K,j,t,r)}return(0,c.mg)(O,K)};try{const e=await t();!0===e?(ae("success"),"reset-password"===I?oe(R._rawResetPassword):I.includes("confirm-password")?oe(R._rawConfirmPassword):"edit"===I?(K&&j&&((0,s.Yj)("isAuthenticated"),localStorage.removeItem("isAuthenticated")),window.location.reload()):w?(0,a.navigate)("/account/profile"):window.location.reload()):("string"==typeof e&&ue(e),ae("error"))}catch(n){ae("error")}}else{var r;ue(null===(r=D.nodes.find((e=>"password_error"===e.key.current)))||void 0===r?void 0:r.value),ae("error")}})),se=()=>{const e="login"===I?"create":"login";M(e),w&&(0,a.navigate)(`/account/${e}`)},de=()=>{M("reset-password"),w&&(0,a.navigate)("/account/reset-password")};(0,n.useEffect)((()=>{w&&(0,c.M3)()&&(0,a.navigate)("/account/profile")}),[]),(0,n.useEffect)((()=>{M(e),oe("");const t=["create","login"];t.includes(d.A.getParams().loginmode)&&t.includes(I)&&M(d.A.getParams().loginmode)}),[e]);const me=()=>{var e;let t="login";return("reset-password"===I||I.includes("confirm-password"))&&(t="reset_password"),"edit"===I?t="account_submit":"create"===I&&(t="create_account"),null===(e=D.nodes.find((e=>e.key.current===t)))||void 0===e?void 0:e.value},pe="create"===I&&b;return n.createElement("div",{className:"login-module--login--416b6"},"edit"!==I&&w?n.createElement(g.A,null,me()):"",n.createElement(_.A,{handleSubmit:ce,submitText:me(),formState:ne,errorMessage:le},I.includes("confirm-password")?"":n.createElement(p.A,{label:null===(A=D.nodes.find((e=>"email"===e.key.current)))||void 0===A?void 0:A.value,form:"login",field:"email",type:"email",value:O,readOnly:"edit"===I,changeEvent:e=>{Z(e.target.value)},required:!0,light:v}),pe?"":n.createElement(n.Fragment,null,"reset-password"!==I?n.createElement(p.A,{label:null===(E=D.nodes.find((e=>"password"===e.key.current)))||void 0===E?void 0:E.value,form:"login",field:"password",type:"password",value:K,changeEvent:e=>{U(e.target.value)},required:"edit"!==I||j,light:v}):"","login"!==I&&"reset-password"!==I?n.createElement(p.A,{label:null===(S=D.nodes.find((e=>"repeat_password"===e.key.current)))||void 0===S?void 0:S.value,form:"login",field:"repeatPassword",type:"password",value:j,changeEvent:e=>{z(e.target.value)},required:"edit"!==I||K,light:v}):"","create"===I||"edit"===I?n.createElement(n.Fragment,null,n.createElement(p.A,{label:null===(N=D.nodes.find((e=>"first_name"===e.key.current)))||void 0===N?void 0:N.value,form:"login",field:"firstName",type:"text",value:V,changeEvent:e=>{Y(e.target.value)},required:!0,light:v}),n.createElement(p.A,{label:null===(P=D.nodes.find((e=>"last_name"===e.key.current)))||void 0===P?void 0:P.value,form:"login",field:"lastName",type:"text",value:H,changeEvent:e=>{Q(e.target.value)},required:!0,light:v}),"edit"===I?n.createElement(n.Fragment,null,n.createElement(p.A,{label:null===(C=D.nodes.find((e=>"country"===e.key.current)))||void 0===C?void 0:C.value,form:"login",field:"country",value:J,type:"select",changeEvent:e=>{ee(e.target.value)},options:L.nodes.map((e=>({name:e.name,value:e.abbreviation}))),required:!0,light:v}),n.createElement(p.A,{label:null===(x=D.nodes.find((e=>"phone"===e.key.current)))||void 0===x?void 0:x.value,form:"login",field:"phone",type:"tel",value:W,changeEvent:e=>{X(e.target.value)},required:f,light:v}),n.createElement(p.A,{label:null===(T=D.nodes.find((e=>"zipcode"===e.key.current)))||void 0===T?void 0:T.value,form:"login",field:"zipcode",type:"text",value:B,changeEvent:e=>{G(e.target.value)},required:h,light:v})):"","create"===I?n.createElement(p.A,{labelHtml:R._rawConsent,form:"contest",field:"consent",value:"consent",type:"checkbox",changeEvent:()=>{re(!te)},checked:te,required:!0,light:v}):""):"")),"login"===I||"create"===I?n.createElement(m.A,null,n.createElement("div",null,"create"===I?n.createElement("span",{role:"button",tabIndex:"0",onClick:se,onKeyPress:se,className:`${l} ${v?u:""}`},R.login_message):n.createElement(m.A,null,n.createElement("span",{role:"button",tabIndex:"0",onClick:se,onKeyPress:se,className:`${l} ${v?u:""}`},R.create_message),n.createElement("br",null),n.createElement("span",{role:"button",tabIndex:"0",onClick:de,onKeyPress:de,className:`${l} ${v?u:""}`},R.forgot_password)))):"",ie?n.createElement(m.A,{content:ie}):"")};var h=f;
1f.propTypes={initialMode:o().string,currentEmail:o().string,currentFirstName:o().string,currentLastName:o().string,currentCountry:o().string,currentPhone:o().string,currentZipcode:o().string,light:o().bool,standalone:o().bool,conversionName:o().string,conversionSource:o().string,anonymous:o().bool},f.defaultProps={initialMode:"login",currentCountry:"",currentEmail:"",currentFirstName:"",currentLastName:"",currentPhone:"",currentZipcode:"",light:!1,standalone:!0,conversionName:"",conversionSource:"",anonymous:!1}},9901:function(e,t,r){r.d(t,{EA:function(){return d},Ee:function(){return h},OU:function(){return s},X1:function(){return y},ZN:function(){return g},ar:function(){return w},bE:function(){return b},f:function(){return _},hx:function(){return $},nS:function(){return v},uZ:function(){return f},uh:function(){return p},xw:function(){return m}});var n=r(6540),a=r(1083),i=r(6),o=r(8974),l=r(6057);const u=e=>`https://api.thegistsports.com/api/tournaments/${e?e.replace("drafts.",""):""}`,c=(e,t)=>new Promise((r=>{a.A.get(`${u(e)}/${t}/`,{withCredentials:!0}).then((e=>{r(e.data)})).catch((()=>!1))})),s=e=>new Promise((t=>{a.A.get(`${u(e)}/`,{withCredentials:!0}).then((e=>t(e.data))).catch((()=>!1))})),d=e=>new Promise((t=>{(0,i.M3)()?e?s(e).then((e=>a.A.get(`https://api.thegistsports.com/api/brackets/?tournament_id=${e.id}`,{withCredentials:!0}).then((e=>{t(e.data)})).catch((()=>{(0,o.Yj)("isAuthenticated"),localStorage.removeItem("isAuthenticated"),window.location.reload()})))):new Promise((e=>{a.A.get(`${u()}`,{withCredentials:!0}).then((t=>e(t.data))).catch((()=>!1))})).then((e=>a.A.get("https://api.thegistsports.com/api/brackets/",{withCredentials:!0}).then((r=>{const n=r.data.filter((t=>e.find((e=>e.id===t.tournament_id)))).map((t=>({...t,tournament_content_id:e.find((e=>e.id===t.tournament_id)).content_id})));t(n)})).catch((()=>{(0,o.Yj)("isAuthenticated"),localStorage.removeItem("isAuthenticated"),window.location.reload()})))):t([])})),m=(e,t)=>e?new Promise((r=>{a.A.get(`https://api.thegistsports.com/api/brackets/${e}/`,{withCredentials:!0}).then((e=>{r(e.data)})).catch((()=>t()))})):null,p=e=>c(e,"matchups"),g=e=>c(e,"teams"),_=e=>c(e,"groups"),f=e=>c(e,"rounds"),h=e=>c(e,"leaderboards"),v=(e,t,r,n)=>a.A.put(`https://api.thegistsports.com/api/brackets/${e}/`,{...t,t:{...(0,l.A)(window)}},(0,i.OR)()).then((()=>{r(e)})).catch((e=>{var t;return n(null===(t=e.response)||void 0===t?void 0:t.data.non_field_errors[0])})),w=(e,t,r)=>a.A.delete(`https://api.thegistsports.com/api/brackets/${e}/`,(0,i.OR)()).then((()=>{t()})).catch((()=>r())),b=(e,t,r,n,o)=>{a.A.post("https://api.thegistsports.com/api/brackets/",{...e,t:{...(0,l.A)(window),p:{tags:{sport:n?[n.slug.current]:[],sport_gender:o?[o.gender]:[],sport_league:o?[o.abbreviation.current]:[]}}}},(0,i.OR)()).then((n=>{n.data.id&&v(n.data.id,e,t,r)})).catch((e=>{var t;return r(null===(t=e.response)||void 0===t?void 0:t.data.non_field_errors[0])}))},$=e=>new Date(null==e?void 0:e.entry_started_at)>new Date?"early":new Date(null==e?void 0:e.entry_ended_at)<new Date&&"late",y=(e,t)=>{const r=t.includes("${start_date}")?"start_date":"end_date";return t.split(`\${${r}}`).map(((a,i)=>{var o;return n.createElement(n.Fragment,null,a,t.split(`\${${r}}`).length!==i+1?null===(o=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"numeric",minute:"numeric",timeZone:"America/Toronto",timeZoneName:"short"}))||void 0===o?void 0:o.format(new Date(`${e[r]}`)):"")}))}},919:function(e,t,r){r.d(t,{Ee:function(){return m},KN:function(){return c},Lk:function(){return s},Lz:function(){return l},WT:function(){return d},ZN:function(){return o},gh:function(){return u}});var n=r(1083),a=r(6),i=r(6057);const o=e=>new Promise((t=>{n.A.get(`https://api.thegistsports.com/api/leagues/${e}/teams`,{withCredentials:!0}).then((e=>{t(e.data)})).catch((()=>!1))})),l=()=>new Promise(((e,t)=>{n.A.get("https://api.thegistsports.com/api/pickems/",{withCredentials:!0}).then((t=>{e(t.data)})).catch((e=>t(e)))})),u=e=>new Promise(((t,r)=>{n.A.get(`https://api.thegistsports.com/api/pickems/${e}/`,{withCredentials:!0}).then((e=>{t(e.data)})).catch((e=>r(e)))})),c=(e,t,r)=>new Promise((a=>{n.A.get(`https://api.thegistsports.com/api/pickems/${e}/sheets/${t}/`,{withCredentials:!0}).then((e=>{a(e.data)})).catch((()=>r()))}
1)),s=e=>new Promise(((t,r)=>{n.A.get(`https://api.thegistsports.com/api/pickems/${e}/sheets/current/`,{withCredentials:!0}).then((e=>{t(e.data)})).catch((e=>r(e)))})),d=(e,t,r,o)=>new Promise(((l,u)=>{n.A.put(`https://api.thegistsports.com/api/pickems/${e}/sheets/current/`,{...t,t:{...(0,i.A)(window),p:{tags:{sport:r?[r.slug.current]:[],sport_gender:o?[o.gender]:[],sport_league:o?[o.abbreviation.current]:[]}}}},(0,a.OR)()).then((e=>{l(e.data)})).catch((e=>u(e)))})),m=(e,t)=>new Promise(((r,a)=>{n.A.get(`https://api.thegistsports.com/api/pickems/${e}/${t?`sheets/${t}/`:""}leaderboards/`,{withCredentials:!0}).then((e=>{r(e.data)})).catch((e=>a(e)))}))},180:function(e,t,r){r.d(t,{O2:function(){return n},r3:function(){return a}});const n=(e,t)=>new Intl.DateTimeFormat("en-US",{year:"numeric",month:t?"short":"long",day:"2-digit"}).format(new Date(e.includes("T")?e:`${e}T00:00:00.000`)),a=e=>new Intl.DateTimeFormat("en-US",{dateStyle:"long",timeStyle:"short",timeZone:"America/Toronto"}).format(new Date(e));t.Ay=(e,t)=>e.map((e=>{const r=e;return r.children=e.children.map((e=>{const r=e;return r.text=e.text.replace(/\${([^}]+)}/g,((e,r)=>t[r])),r})),r}))},8639:function(e,t,r){r.d(t,{O:function(){return n},w:function(){return a}});const n=e=>1===e?"point":"points",a=e=>{const t=parseInt(e,10),r=["th","st","nd","rd"],n=t%100;return t+(r[(n-20)%10]||r[n]||r[0])}}}]); 2//# sourceMappingURL=393902eaf3fa1755a997c6a5b06633fb8c76050d-8978ac5c4de9d50b30a8.js.map
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.