@streamlayer/react 0.29.4 → 0.29.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/masters.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/index-bee6e4ec.cjs +1 -0
- package/lib/dist/{index-660952d7.js → index-c9c374fc.js} +550 -433
- package/lib/dist/index.d.ts +17 -0
- package/lib/dist/{masters-8c4e7068.js → masters-55ee878f.js} +379 -367
- package/lib/dist/{masters-7ea5d23e.cjs → masters-cbaf9f64.cjs} +8 -8
- package/lib/dist/style.css +14 -0
- package/lib/es/masters.js +1 -1
- package/lib/index-097ba5f5.cjs +6 -0
- package/lib/{index-efde52fd.js → index-aa64b1f2.js} +778 -661
- package/lib/{masters-05fe9e78.cjs → masters-541db712.cjs} +1 -1
- package/lib/{masters-e142c21e.js → masters-e3fde211.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +7 -7
- package/lib/dist/index-72e4d21b.cjs +0 -1
- package/lib/index-eb5039cd.cjs +0 -6
package/lib/index-eb5039cd.cjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),y=require("./index-b0206045.cjs"),ne=require("@nanostores/react"),J=require("./masters-05fe9e78.cjs"),$=require("react"),C=require("@streamlayer/sdk-web-types"),ie=require("./common-f34b9d88.cjs"),Ot=require("react-countdown-circle-timer"),de=require("./index-89c19a6e.cjs");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("./cjs/useStreamLayerApp.js");require("@streamlayer/sdk-web");const Bt=()=>y.C1,Rt=()=>y.C1,Lt=y.styled_default("div")({name:"a",class:"acysrl1",propsAsIs:!1}),kt=y.styled_default("div")({name:"l",class:"lo57cjm",propsAsIs:!1}),Ut=y.styled_default(Bt())({name:"p",class:"p14kwh4y",propsAsIs:!0}),Ft=y.styled_default("span")({name:"s",class:"sxun7sq",propsAsIs:!1}),$t=y.styled_default("button")({name:"c",class:"c1i8ida8",propsAsIs:!1}),Qt=y.styled_default(Rt())({name:"g",class:"g1m0xfmw",propsAsIs:!0}),mt=({type:i,close:n,label:a})=>{const u=i?J.o[i]:{label:a,iconName:void 0};return c.jsxs(Lt,{children:[c.jsxs(kt,{children:[(u==null?void 0:u.iconName)&&c.jsx(Ut,{name:u.iconName}),(u==null?void 0:u.label)&&c.jsx(Ft,{children:u.label})]}),c.jsx($t,{onClick:n,children:c.jsx(Qt,{name:"icon-cross"})})]})};const qt=y.styled_default("div")({name:"t",class:"taj61ja",propsAsIs:!1}),Pt=y.styled_default("div")({name:"r",class:"r19fxewd",propsAsIs:!1}),Yt=y.styled_default("div")({name:"i",class:"i1whkbqh",propsAsIs:!1}),Ke=({indicator:i,title:n})=>c.jsxs(qt,{children:[c.jsx(Pt,{children:n}),c.jsx(Yt,{children:i})]});const Wt=y.styled_default("div")({name:"i",class:"i4lbhzs",propsAsIs:!1}),Vt=y.styled_default("div")({name:"o",class:"ordquhq",propsAsIs:!1}),Ht=y.styled_default("div")({name:"n",class:"nwzed99",propsAsIs:!1}),Ee=({indicator:i,title:n})=>c.jsxs(Wt,{children:[c.jsx(Vt,{children:i}),c.jsx(Ht,{children:n})]});const Gt=y.styled_default("div")({name:"o",class:"o15y0waw",propsAsIs:!1}),Zt=y.styled_default("div")({name:"i",class:"ihjewwf",propsAsIs:!1}),Jt=y.styled_default("div")({name:"n",class:"n10e9lv8",propsAsIs:!1}),Kt=y.styled_default("div")({name:"r",class:"r13bxv",propsAsIs:!1}),Xt=y.styled_default("img")({name:"a",class:"a1fi59c9",propsAsIs:!1}),er=y.styled_default("div")({name:"s",class:"s1kkihge",propsAsIs:!1}),tr=y.styled_default("div")({name:"c",class:"cy4f4t",propsAsIs:!1}),rr=y.styled_default("div")({name:"p",class:"p18cnlx1",propsAsIs:!1}),ir=y.styled_default("img")({name:"l",class:"lboqgs5",propsAsIs:!1}),nr=y.styled_default("div")({name:"d",class:"d1oaal4",propsAsIs:!1}),sr=y.styled_default("div")({name:"x",class:"x1yzgo0u",propsAsIs:!1}),or=y.styled_default("div")({name:"f",class:"f1l9i8s8",propsAsIs:!1}),ar=y.styled_default("div")({name:"g",class:"g4cgl4u",propsAsIs:!1}),lr=y.styled_default("div")({name:"h",class:"h1qn1tmd",propsAsIs:!1}),cr=y.styled_default("div")({name:"u",class:"u1gsbhq4",propsAsIs:!1}),ur=y.styled_default("div")({name:"m",class:"mvj8oco",propsAsIs:!1}),dr=y.styled_default("button")({name:"v",class:"viqiaf2",propsAsIs:!1}),fr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",yt=({avatar:i,name:n,points:a,friendsRank:u,rank:f,streak:g,correct:m,incorrect:o,inTop:x,average:A})=>c.jsxs(Gt,{children:[c.jsx(Zt,{children:c.jsxs(Kt,{children:[c.jsxs(dr,{children:[i&&c.jsx(Xt,{alt:"avatar",src:i}),!i&&c.jsx(ur,{children:ie.o(n||"")})]}),c.jsxs(er,{children:[c.jsx(tr,{children:n}),c.jsxs(rr,{children:[c.jsxs(nr,{children:[c.jsx(ir,{alt:"rank-icon",src:fr}),c.jsxs(sr,{children:[ie.i(a),c.jsx(or,{children:"PTS"})]})]}),c.jsx(ar,{}),c.jsxs("div",{children:["TOP ",x||0,"%"]})]})]})]})}),c.jsxs(Jt,{children:[c.jsxs(lr,{children:[c.jsx(Ke,{indicator:u||0,title:"Friends rank"}),c.jsx(Ke,{indicator:f||0,title:"Global rank"})]}),c.jsxs(cr,{children:[c.jsx(Ee,{indicator:g||0,title:"Win streak"}),c.jsx(Ee,{indicator:m||0,title:"Correct"}),c.jsx(Ee,{indicator:o||0,title:"Incorrect"}),c.jsx(Ee,{indicator:`${A||0}%`,title:"Succ. rate"})]})]})]});const hr=()=>y.C1,pr=y.styled_default("div")({name:"c",class:"ciyeb68",propsAsIs:!1}),mr=y.styled_default(hr())({name:"n",class:"nfic4xc",propsAsIs:!0}),Xe=y.styled_default("div")({name:"d",class:"d1pd1p66",propsAsIs:!1}),et=y.styled_default("div")({name:"p",class:"p132yxcv",propsAsIs:!1}),yr=y.styled_default("span")({name:"l",class:"l4a8aw",propsAsIs:!1}),Ce=y.styled_default("span")({name:"g",class:"gzdx7pk",propsAsIs:!1}),gr=y.styled_default("div")({name:"s",class:"smnc4zm",propsAsIs:!1}),xr=({feedbackMessages:i,questionVotedCorrectly:n,questionVoted:a,questionType:u,hasCorrectAnswer:f,questionStatus:g})=>{const m=a&&(u===C.QuestionType.TRIVIA||u===C.QuestionType.PREDICTION);if(!m&&g!==C.QuestionStatus.RESOLVED)return null;const o=u===C.QuestionType.PREDICTION&&!f,x=n?"correct":"incorrect",A=n?i.correctFeedback:i.incorrectFeedback;return c.jsxs(pr,{"data-isPrediction":o,children:[g===C.QuestionStatus.RESOLVED&&u===C.QuestionType.TRIVIA&&!a&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{children:c.jsx(y.C1,{name:"questionExpired"})}),c.jsxs("div",{children:[c.jsx(et,{children:c.jsx(Ce,{children:"Question Expired"})}),c.jsx(gr,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),m&&o&&c.jsxs(c.Fragment,{children:[c.jsx(mr,{name:"icon-prediction"}),c.jsx(Ce,{children:"Stay tuned to see if your prediction was correct."})]}),m&&f&&c.jsxs(c.Fragment,{children:[c.jsx(Xe,{"data-feedbackType":x,children:c.jsx(y.C1,{name:x})}),c.jsx("div",{children:c.jsxs(et,{children:[c.jsx(yr,{"data-feedbackType":x,children:A==null?void 0:A.title}),c.jsx(Ce,{children:A==null?void 0:A.description})]})})]})]})};const Ir=y.styled_default("div")({name:"o",class:"olc1eph",propsAsIs:!1}),wr=y.styled_default("div")({name:"n",class:"n1yoh29a",propsAsIs:!1}),_r=y.styled_default("div")({name:"p",class:"pjkr5mb",propsAsIs:!1}),Mr=y.styled_default("div")({name:"r",class:"r82wnnx",propsAsIs:!1});const Er=()=>gt,Ar=()=>gt,Tr=()=>y.C1,jr=y.styled_default("button")({name:"c",class:"cpm4u8k",propsAsIs:!1}),Nr=y.styled_default("div")({name:"l",class:"lwfomc3",propsAsIs:!1}),Sr=y.styled_default("span")({name:"d",class:"dmltvg2",propsAsIs:!1}),vr=y.styled_default("div")({name:"s",class:"stfjpqz",propsAsIs:!1}),zr=y.styled_default("div")({name:"p",class:"p198m24r",propsAsIs:!1}),gt=y.styled_default("img")({name:"r",class:"rbq5eu7",propsAsIs:!1}),Dr=y.styled_default(Er())({name:"g",class:"g1iv6oeb",propsAsIs:!0}),br=y.styled_default(Ar())({name:"h",class:"h1qtxlqc",propsAsIs:!0}),Cr=y.styled_default("span")({name:"u",class:"udm736q",propsAsIs:!1}),Or=y.styled_default("span")({name:"b",class:"b1da34tx",propsAsIs:!1}),Br=y.styled_default("span")({name:"x",class:"x1dqwq83",propsAsIs:!1}),Rr=y.styled_default(Tr())({name:"v",class:"v10s9my2",propsAsIs:!0}),tt={[C.QuestionImages.CENTERED]:i=>c.jsx(Dr,{alt:"option-icon",src:i}),[C.QuestionImages.TRANSPARENT]:i=>c.jsx(vr,{children:c.jsx(zr,{style:{backgroundImage:`url(${i})`}})}),[C.QuestionImages.ROUNDED]:i=>c.jsx(br,{alt:"option-icon",src:i}),[C.QuestionImages.NONE]:()=>null,[C.QuestionImages.UNSET]:()=>null},Lr=({questionType:i,hasCorrectAnswer:n,correct:a,youVoted:u,questionVoted:f})=>{if(i===C.QuestionType.POLL&&u)return"correct";if(i===C.QuestionType.PREDICTION){if(n&&f)return u?a?"correct":"incorrect":a?"correct":"unset";if(u)return"correct"}return i===C.QuestionType.TRIVIA&&f?u?a?"correct":"incorrect":a?"correct":"unset":"unset"},kr=({questionType:i,questionVoted:n,correct:a,hasCorrectAnswer:u,questionStatus:f})=>i===C.QuestionType.TRIVIA?n&&a:i===C.QuestionType.PREDICTION?n&&a&&u||f===C.QuestionStatus.RESOLVED&&a:!1,Ur=i=>{var n;const{id:a,icon:u,text:f,percentageDecimal:g,onVote:m,youSelected:o,questionVoted:x,imageMode:A=C.QuestionImages.ROUNDED,answerTimeExpired:j,questionStatus:N,isLoading:I,questionType:E,correct:T,hasCorrectAnswer:h}=i,_=Lr(i),w=kr({questionType:E,questionVoted:x,correct:T,hasCorrectAnswer:h,questionStatus:N}),M=x||N===C.QuestionStatus.RESOLVED&&E===C.QuestionType.PREDICTION;return c.jsxs(jr,{value:a,"data-selected":o,"data-answerState":_,disabled:x||I||j,onClick:m,children:[M&&c.jsx(Nr,{"data-answerState":_,style:{width:`${g}%`}}),c.jsxs(Sr,{children:[u&&((n=tt[A])==null?void 0:n.call(tt,u)),c.jsx(Cr,{children:f}),M&&c.jsxs(Or,{children:[w&&c.jsx(Rr,{name:"selected"}),c.jsxs(Br,{children:[g,"%"]})]})]})]})};const Fr=[de.E.PRIMARY_GREEN1,de.E.SECONDARY_RED1,de.E.SECONDARY_RED1],$r=[10,10,0],Qr=y.styled_default("div")({name:"A",class:"a1f928zy",propsAsIs:!1}),qr=de.E.SECONDARY_GREEN6,rt=de.E.SECONDARY_RED3,Pr=de.E.NEUTRALS_GRAY3,Yr=({isPlaying:i=!0,duration:n=30,onTimerExpired:a})=>{const[u,f]=$.useState(n>10?qr:rt),g=({remainingTime:x})=>c.jsx(Qr,{children:x}),m=$.useCallback(()=>{a==null||a(),f(Pr)},[a,f]),o=$.useCallback(x=>{x===10&&f(rt)},[f]);return c.jsx(Ot.CountdownCircleTimer,{isPlaying:i,duration:n,colors:Fr,colorsTime:$r,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:u,onComplete:m,onUpdate:o,children:g})};const Wr=()=>y.C1,Vr=y.styled_default("div")({name:"a",class:"a1r7f3z4",propsAsIs:!1}),Hr=y.styled_default("div")({name:"s",class:"sblndl",propsAsIs:!1}),Gr=y.styled_default("div")({name:"l",class:"l7ka1tv",propsAsIs:!1}),Zr=y.styled_default(Wr())({name:"p",class:"p1edlxt3",propsAsIs:!0}),Jr=y.styled_default("div")({name:"g",class:"ghm08u2",propsAsIs:!1}),Kr=y.styled_default("span")({name:"c",class:"c12nsh46",propsAsIs:!1}),Xr=y.styled_default("span")({name:"d",class:"dlr9eoc",propsAsIs:!1}),ei=({title:i,points:n,isPlayingTimer:a,isTimer:u,onTimerExpired:f})=>c.jsxs(Vr,{children:[c.jsxs(Hr,{children:[i&&c.jsx(Gr,{children:i}),n!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx(Zr,{name:"icon-trophy"}),c.jsxs(Jr,{children:[c.jsx(Kr,{children:n}),c.jsx(Xr,{children:"PTS"})]})]})]}),u&&c.jsx(Yr,{isPlaying:a,onTimerExpired:f})]}),ti=({openedQuestion:i,vote:n})=>{var a;const u=i.subject,f=i.type,g=(a=i.options)==null?void 0:a.options,[m,o]=$.useState(!1),[x,A]=$.useState(!1),[j,N]=$.useState(""),I=i==null?void 0:i.id,E=$.useCallback(async M=>{if(I){const S=M.currentTarget.value;N(S),A(!0),await n(I,S),A(!1)}},[I,N,n]),T=$.useMemo(()=>i==null?void 0:i.answers.find(M=>M.youVoted===!0),[i]),h=$.useMemo(()=>!!(i!=null&&i.answers.find(M=>M.correct===!0)),[i]),_=$.useMemo(()=>i?i.answers.map(M=>({...M,questionVoted:!!T,youSelected:j===M.id,isLoading:x,hasCorrectAnswer:h,questionType:i.type,answerTimeExpired:m,questionStatus:i.status,onVote:E})):[],[h,m,x,i,T,E,j]),w=g&&(g.case==="trivia"||g.case==="prediction")?g.value:void 0;return c.jsx(J.r,{"data-question-header":"true",children:c.jsx(Ir,{children:c.jsxs(wr,{children:[w&&c.jsx(xr,{feedbackMessages:w,questionVoted:!!T,questionVotedCorrectly:T==null?void 0:T.correct,questionType:f,hasCorrectAnswer:h,questionStatus:i.status}),c.jsx(ei,{title:m?"Expired":"To win",points:m?void 0:100,onTimerExpired:()=>o(!0),isTimer:!0}),c.jsx(_r,{children:u}),c.jsx(Mr,{children:_.map(M=>c.jsx(Ur,{...M},M.id))})]})})})};const ri=y.styled_default("div")({name:"e",class:"e1eio0mt",propsAsIs:!1}),ii=y.styled_default("div")({name:"i",class:"iigl87b",propsAsIs:!1}),ni=y.styled_default("h3")({name:"n",class:"n1o2cwub",propsAsIs:!1}),si=y.styled_default("div")({name:"r",class:"r3uxe45",propsAsIs:!1}),oi=y.styled_default("div")({name:"l",class:"lrqius",propsAsIs:!1}),xt=({created:i,title:n,instantView:a})=>{const u=$.useMemo(()=>{if(i){const f=new Date(i);if(ie.r(f))return{date:ie.a(f),time:ie.n(f)}}return null},[i]);return c.jsxs(ri,{children:[u&&c.jsxs(oi,{children:[u.date," · ",u.time]}),(a==null?void 0:a.video)&&c.jsx(J.w,{source:a.video.url,poster:a.video.thumbnailUrl}),c.jsxs(ii,{children:[c.jsx(ni,{children:(a==null?void 0:a.heading)||n}),c.jsx(si,{children:a==null?void 0:a.body})]})]})};const ai=y.styled_default("div")({name:"o",class:"o18unvw4",propsAsIs:!1}),li=y.styled_default("a")({name:"n",class:"ns0uvk8",propsAsIs:!1}),ci=({instantView:i,...n})=>c.jsxs(ai,{children:[c.jsx(xt,{instantView:i,...n}),(i==null?void 0:i.webLink)&&c.jsxs(li,{href:i==null?void 0:i.webLink.url,target:"_blank",children:["Explore more of the Masters History",c.jsx(y.C1,{name:"icon-external-link"})]})]});const ui=y.styled_default("div")({name:"d",class:"dk8r1eq",propsAsIs:!1}),di=({openedQuestion:i})=>{var n;return((n=i==null?void 0:i.attributes)==null?void 0:n.attributes.case)==="insight"?c.jsx(ci,{created:i.attributes.created,...i.attributes.attributes.value}):null},fi=({extendedQuestion:i,vote:n})=>{const{loading:a,data:u}=i;return!a&&u?c.jsx(ti,{vote:n,openedQuestion:u}):null},hi=({gamification:i})=>{var n;const a=ne.useStore(i.openedQuestion.$store),u=ne.useStore(i.openedQuestion.$extendedStore);if(!a)return null;const f=a.type;return c.jsxs(ui,{children:[c.jsx(mt,{close:i.closeQuestion,type:((n=a.attributes)==null?void 0:n.type)||C.QuestionType.UNSET}),f==="question"&&c.jsx(fi,{vote:i.submitAnswer,extendedQuestion:u}),f!=="question"&&c.jsx(di,{openedQuestion:a})]})};const pi=y.styled_default("div")({name:"t",class:"tcim9sm",propsAsIs:!1}),mi=y.styled_default("div")({name:"e",class:"e8wco6o",propsAsIs:!1}),yi=y.styled_default("button")({name:"n",class:"n1ardwzl",propsAsIs:!1}),gi=y.styled_default("span")({name:"i",class:"i1vk8ojx",propsAsIs:!1});var ge=(i=>(i.HOME="home",i.LEADERBOARD="leaderboard",i))(ge||{});const it=({title:i,active:n,onClick:a})=>c.jsx(yi,{onClick:a,"data-selected":n,children:c.jsx(gi,{children:i})}),xi=({activePage:i="home",toggleActivePage:n})=>c.jsx(pi,{children:c.jsxs(mi,{"data-position":i==="home"?"left":"right",children:[c.jsx(it,{title:"Home",active:i==="home",onClick:()=>n("home")}),c.jsx(it,{title:"Leader Board",active:i==="leaderboard",onClick:()=>n("leaderboard")})]})});var It={},wt={},Te={};Te.byteLength=_i;Te.toByteArray=Ei;Te.fromByteArray=ji;var Z=[],q=[],Ii=typeof Uint8Array<"u"?Uint8Array:Array,Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ce=0,wi=Oe.length;ce<wi;++ce)Z[ce]=Oe[ce],q[Oe.charCodeAt(ce)]=ce;q["-".charCodeAt(0)]=62;q["_".charCodeAt(0)]=63;function _t(i){var n=i.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var a=i.indexOf("=");a===-1&&(a=n);var u=a===n?0:4-a%4;return[a,u]}function _i(i){var n=_t(i),a=n[0],u=n[1];return(a+u)*3/4-u}function Mi(i,n,a){return(n+a)*3/4-a}function Ei(i){var n,a=_t(i),u=a[0],f=a[1],g=new Ii(Mi(i,u,f)),m=0,o=f>0?u-4:u,x;for(x=0;x<o;x+=4)n=q[i.charCodeAt(x)]<<18|q[i.charCodeAt(x+1)]<<12|q[i.charCodeAt(x+2)]<<6|q[i.charCodeAt(x+3)],g[m++]=n>>16&255,g[m++]=n>>8&255,g[m++]=n&255;return f===2&&(n=q[i.charCodeAt(x)]<<2|q[i.charCodeAt(x+1)]>>4,g[m++]=n&255),f===1&&(n=q[i.charCodeAt(x)]<<10|q[i.charCodeAt(x+1)]<<4|q[i.charCodeAt(x+2)]>>2,g[m++]=n>>8&255,g[m++]=n&255),g}function Ai(i){return Z[i>>18&63]+Z[i>>12&63]+Z[i>>6&63]+Z[i&63]}function Ti(i,n,a){for(var u,f=[],g=n;g<a;g+=3)u=(i[g]<<16&16711680)+(i[g+1]<<8&65280)+(i[g+2]&255),f.push(Ai(u));return f.join("")}function ji(i){for(var n,a=i.length,u=a%3,f=[],g=16383,m=0,o=a-u;m<o;m+=g)f.push(Ti(i,m,m+g>o?o:m+g));return u===1?(n=i[a-1],f.push(Z[n>>2]+Z[n<<4&63]+"==")):u===2&&(n=(i[a-2]<<8)+i[a-1],f.push(Z[n>>10]+Z[n>>4&63]+Z[n<<2&63]+"=")),f.join("")}var We={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */We.read=function(i,n,a,u,f){var g,m,o=f*8-u-1,x=(1<<o)-1,A=x>>1,j=-7,N=a?f-1:0,I=a?-1:1,E=i[n+N];for(N+=I,g=E&(1<<-j)-1,E>>=-j,j+=o;j>0;g=g*256+i[n+N],N+=I,j-=8);for(m=g&(1<<-j)-1,g>>=-j,j+=u;j>0;m=m*256+i[n+N],N+=I,j-=8);if(g===0)g=1-A;else{if(g===x)return m?NaN:(E?-1:1)*(1/0);m=m+Math.pow(2,u),g=g-A}return(E?-1:1)*m*Math.pow(2,g-u)};We.write=function(i,n,a,u,f,g){var m,o,x,A=g*8-f-1,j=(1<<A)-1,N=j>>1,I=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=u?0:g-1,T=u?1:-1,h=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(o=isNaN(n)?1:0,m=j):(m=Math.floor(Math.log(n)/Math.LN2),n*(x=Math.pow(2,-m))<1&&(m--,x*=2),m+N>=1?n+=I/x:n+=I*Math.pow(2,1-N),n*x>=2&&(m++,x/=2),m+N>=j?(o=0,m=j):m+N>=1?(o=(n*x-1)*Math.pow(2,f),m=m+N):(o=n*Math.pow(2,N-1)*Math.pow(2,f),m=0));f>=8;i[a+E]=o&255,E+=T,o/=256,f-=8);for(m=m<<f|o,A+=f;A>0;i[a+E]=m&255,E+=T,m/=256,A-=8);i[a+E-T]|=h*128};/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/(function(i){const n=Te,a=We,u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=o,i.SlowBuffer=M,i.INSPECT_MAX_BYTES=50;const f=2147483647;i.kMaxLength=f,o.TYPED_ARRAY_SUPPORT=g(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function m(r){if(r>f)throw new RangeError('The value "'+r+'" is invalid for option "size"');const e=new Uint8Array(r);return Object.setPrototypeOf(e,o.prototype),e}function o(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(r)}return x(r,e,t)}o.poolSize=8192;function x(r,e,t){if(typeof r=="string")return I(r,e);if(ArrayBuffer.isView(r))return T(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(V(r,ArrayBuffer)||r&&V(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(r,SharedArrayBuffer)||r&&V(r.buffer,SharedArrayBuffer)))return h(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const s=r.valueOf&&r.valueOf();if(s!=null&&s!==r)return o.from(s,e,t);const l=_(r);if(l)return l;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return o.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}o.from=function(r,e,t){return x(r,e,t)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function A(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function j(r,e,t){return A(r),r<=0?m(r):e!==void 0?typeof t=="string"?m(r).fill(e,t):m(r).fill(e):m(r)}o.alloc=function(r,e,t){return j(r,e,t)};function N(r){return A(r),m(r<0?0:w(r)|0)}o.allocUnsafe=function(r){return N(r)},o.allocUnsafeSlow=function(r){return N(r)};function I(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!o.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=S(r,e)|0;let s=m(t);const l=s.write(r,e);return l!==t&&(s=s.slice(0,l)),s}function E(r){const e=r.length<0?0:w(r.length)|0,t=m(e);for(let s=0;s<e;s+=1)t[s]=r[s]&255;return t}function T(r){if(V(r,Uint8Array)){const e=new Uint8Array(r);return h(e.buffer,e.byteOffset,e.byteLength)}return E(r)}function h(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let s;return e===void 0&&t===void 0?s=new Uint8Array(r):t===void 0?s=new Uint8Array(r,e):s=new Uint8Array(r,e,t),Object.setPrototypeOf(s,o.prototype),s}function _(r){if(o.isBuffer(r)){const e=w(r.length)|0,t=m(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||be(r.length)?m(0):E(r);if(r.type==="Buffer"&&Array.isArray(r.data))return E(r.data)}function w(r){if(r>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return r|0}function M(r){return+r!=r&&(r=0),o.alloc(+r)}o.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==o.prototype},o.compare=function(e,t){if(V(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let s=e.length,l=t.length;for(let d=0,p=Math.min(s,l);d<p;++d)if(e[d]!==t[d]){s=e[d],l=t[d];break}return s<l?-1:l<s?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);let s;if(t===void 0)for(t=0,s=0;s<e.length;++s)t+=e[s].length;const l=o.allocUnsafe(t);let d=0;for(s=0;s<e.length;++s){let p=e[s];if(V(p,Uint8Array))d+p.length>l.length?(o.isBuffer(p)||(p=o.from(p)),p.copy(l,d)):Uint8Array.prototype.set.call(l,p,d);else if(o.isBuffer(p))p.copy(l,d);else throw new TypeError('"list" argument must be an Array of Buffers');d+=p.length}return l};function S(r,e){if(o.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||V(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const t=r.length,s=arguments.length>2&&arguments[2]===!0;if(!s&&t===0)return 0;let l=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return De(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Je(r).length;default:if(l)return s?-1:De(r).length;e=(""+e).toLowerCase(),l=!0}}o.byteLength=S;function D(r,e,t){let s=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return ve(this,e,t);case"utf8":case"utf-8":return xe(this,e,t);case"ascii":return we(this,e,t);case"latin1":case"binary":return he(this,e,t);case"base64":return Ne(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,e,t);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),s=!0}}o.prototype._isBuffer=!0;function v(r,e,t){const s=r[e];r[e]=r[t],r[t]=s}o.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},o.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},o.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},o.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?xe(this,0,e):D.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:o.compare(this,e)===0},o.prototype.inspect=function(){let e="";const t=i.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},u&&(o.prototype[u]=o.prototype.inspect),o.prototype.compare=function(e,t,s,l,d){if(V(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),s===void 0&&(s=e?e.length:0),l===void 0&&(l=0),d===void 0&&(d=this.length),t<0||s>e.length||l<0||d>this.length)throw new RangeError("out of range index");if(l>=d&&t>=s)return 0;if(l>=d)return-1;if(t>=s)return 1;if(t>>>=0,s>>>=0,l>>>=0,d>>>=0,this===e)return 0;let p=d-l,z=s-t;const R=Math.min(p,z),B=this.slice(l,d),L=e.slice(t,s);for(let b=0;b<R;++b)if(B[b]!==L[b]){p=B[b],z=L[b];break}return p<z?-1:z<p?1:0};function O(r,e,t,s,l){if(r.length===0)return-1;if(typeof t=="string"?(s=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,be(t)&&(t=l?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(l)return-1;t=r.length-1}else if(t<0)if(l)t=0;else return-1;if(typeof e=="string"&&(e=o.from(e,s)),o.isBuffer(e))return e.length===0?-1:U(r,e,t,s,l);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?l?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):U(r,[e],t,s,l);throw new TypeError("val must be string, number or Buffer")}function U(r,e,t,s,l){let d=1,p=r.length,z=e.length;if(s!==void 0&&(s=String(s).toLowerCase(),s==="ucs2"||s==="ucs-2"||s==="utf16le"||s==="utf-16le")){if(r.length<2||e.length<2)return-1;d=2,p/=2,z/=2,t/=2}function R(L,b){return d===1?L[b]:L.readUInt16BE(b*d)}let B;if(l){let L=-1;for(B=t;B<p;B++)if(R(r,B)===R(e,L===-1?0:B-L)){if(L===-1&&(L=B),B-L+1===z)return L*d}else L!==-1&&(B-=B-L),L=-1}else for(t+z>p&&(t=p-z),B=t;B>=0;B--){let L=!0;for(let b=0;b<z;b++)if(R(r,B+b)!==R(e,b)){L=!1;break}if(L)return B}return-1}o.prototype.includes=function(e,t,s){return this.indexOf(e,t,s)!==-1},o.prototype.indexOf=function(e,t,s){return O(this,e,t,s,!0)},o.prototype.lastIndexOf=function(e,t,s){return O(this,e,t,s,!1)};function Y(r,e,t,s){t=Number(t)||0;const l=r.length-t;s?(s=Number(s),s>l&&(s=l)):s=l;const d=e.length;s>d/2&&(s=d/2);let p;for(p=0;p<s;++p){const z=parseInt(e.substr(p*2,2),16);if(be(z))return p;r[t+p]=z}return p}function W(r,e,t,s){return Me(De(e,r.length-t),r,t,s)}function se(r,e,t,s){return Me(zt(e),r,t,s)}function oe(r,e,t,s){return Me(Je(e),r,t,s)}function je(r,e,t,s){return Me(Dt(e,r.length-t),r,t,s)}o.prototype.write=function(e,t,s,l){if(t===void 0)l="utf8",s=this.length,t=0;else if(s===void 0&&typeof t=="string")l=t,s=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(s)?(s=s>>>0,l===void 0&&(l="utf8")):(l=s,s=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const d=this.length-t;if((s===void 0||s>d)&&(s=d),e.length>0&&(s<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let p=!1;for(;;)switch(l){case"hex":return Y(this,e,t,s);case"utf8":case"utf-8":return W(this,e,t,s);case"ascii":case"latin1":case"binary":return se(this,e,t,s);case"base64":return oe(this,e,t,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return je(this,e,t,s);default:if(p)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),p=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ne(r,e,t){return e===0&&t===r.length?n.fromByteArray(r):n.fromByteArray(r.slice(e,t))}function xe(r,e,t){t=Math.min(r.length,t);const s=[];let l=e;for(;l<t;){const d=r[l];let p=null,z=d>239?4:d>223?3:d>191?2:1;if(l+z<=t){let R,B,L,b;switch(z){case 1:d<128&&(p=d);break;case 2:R=r[l+1],(R&192)===128&&(b=(d&31)<<6|R&63,b>127&&(p=b));break;case 3:R=r[l+1],B=r[l+2],(R&192)===128&&(B&192)===128&&(b=(d&15)<<12|(R&63)<<6|B&63,b>2047&&(b<55296||b>57343)&&(p=b));break;case 4:R=r[l+1],B=r[l+2],L=r[l+3],(R&192)===128&&(B&192)===128&&(L&192)===128&&(b=(d&15)<<18|(R&63)<<12|(B&63)<<6|L&63,b>65535&&b<1114112&&(p=b))}}p===null?(p=65533,z=1):p>65535&&(p-=65536,s.push(p>>>10&1023|55296),p=56320|p&1023),s.push(p),l+=z}return Se(s)}const Ie=4096;function Se(r){const e=r.length;if(e<=Ie)return String.fromCharCode.apply(String,r);let t="",s=0;for(;s<e;)t+=String.fromCharCode.apply(String,r.slice(s,s+=Ie));return t}function we(r,e,t){let s="";t=Math.min(r.length,t);for(let l=e;l<t;++l)s+=String.fromCharCode(r[l]&127);return s}function he(r,e,t){let s="";t=Math.min(r.length,t);for(let l=e;l<t;++l)s+=String.fromCharCode(r[l]);return s}function ve(r,e,t){const s=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>s)&&(t=s);let l="";for(let d=e;d<t;++d)l+=bt[r[d]];return l}function _e(r,e,t){const s=r.slice(e,t);let l="";for(let d=0;d<s.length-1;d+=2)l+=String.fromCharCode(s[d]+s[d+1]*256);return l}o.prototype.slice=function(e,t){const s=this.length;e=~~e,t=t===void 0?s:~~t,e<0?(e+=s,e<0&&(e=0)):e>s&&(e=s),t<0?(t+=s,t<0&&(t=0)):t>s&&(t=s),t<e&&(t=e);const l=this.subarray(e,t);return Object.setPrototypeOf(l,o.prototype),l};function F(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||F(e,t,this.length);let l=this[e],d=1,p=0;for(;++p<t&&(d*=256);)l+=this[e+p]*d;return l},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,s){e=e>>>0,t=t>>>0,s||F(e,t,this.length);let l=this[e+--t],d=1;for(;t>0&&(d*=256);)l+=this[e+--t]*d;return l},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e=e>>>0,t||F(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||F(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||F(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||F(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=te(function(e){e=e>>>0,le(e,"offset");const t=this[e],s=this[e+7];(t===void 0||s===void 0)&&ye(e,this.length-8);const l=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,d=this[++e]+this[++e]*2**8+this[++e]*2**16+s*2**24;return BigInt(l)+(BigInt(d)<<BigInt(32))}),o.prototype.readBigUInt64BE=te(function(e){e=e>>>0,le(e,"offset");const t=this[e],s=this[e+7];(t===void 0||s===void 0)&&ye(e,this.length-8);const l=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],d=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+s;return(BigInt(l)<<BigInt(32))+BigInt(d)}),o.prototype.readIntLE=function(e,t,s){e=e>>>0,t=t>>>0,s||F(e,t,this.length);let l=this[e],d=1,p=0;for(;++p<t&&(d*=256);)l+=this[e+p]*d;return d*=128,l>=d&&(l-=Math.pow(2,8*t)),l},o.prototype.readIntBE=function(e,t,s){e=e>>>0,t=t>>>0,s||F(e,t,this.length);let l=t,d=1,p=this[e+--l];for(;l>0&&(d*=256);)p+=this[e+--l]*d;return d*=128,p>=d&&(p-=Math.pow(2,8*t)),p},o.prototype.readInt8=function(e,t){return e=e>>>0,t||F(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){e=e>>>0,t||F(e,2,this.length);const s=this[e]|this[e+1]<<8;return s&32768?s|4294901760:s},o.prototype.readInt16BE=function(e,t){e=e>>>0,t||F(e,2,this.length);const s=this[e+1]|this[e]<<8;return s&32768?s|4294901760:s},o.prototype.readInt32LE=function(e,t){return e=e>>>0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e=e>>>0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=te(function(e){e=e>>>0,le(e,"offset");const t=this[e],s=this[e+7];(t===void 0||s===void 0)&&ye(e,this.length-8);const l=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(s<<24);return(BigInt(l)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),o.prototype.readBigInt64BE=te(function(e){e=e>>>0,le(e,"offset");const t=this[e],s=this[e+7];(t===void 0||s===void 0)&&ye(e,this.length-8);const l=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(l)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+s)}),o.prototype.readFloatLE=function(e,t){return e=e>>>0,t||F(e,4,this.length),a.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e=e>>>0,t||F(e,4,this.length),a.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||F(e,8,this.length),a.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||F(e,8,this.length),a.read(this,e,!1,52,8)};function Q(r,e,t,s,l,d){if(!o.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>l||e<d)throw new RangeError('"value" argument is out of bounds');if(t+s>r.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,s,l){if(e=+e,t=t>>>0,s=s>>>0,!l){const z=Math.pow(2,8*s)-1;Q(this,e,t,s,z,0)}let d=1,p=0;for(this[t]=e&255;++p<s&&(d*=256);)this[t+p]=e/d&255;return t+s},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,s,l){if(e=+e,t=t>>>0,s=s>>>0,!l){const z=Math.pow(2,8*s)-1;Q(this,e,t,s,z,0)}let d=s-1,p=1;for(this[t+d]=e&255;--d>=0&&(p*=256);)this[t+d]=e/p&255;return t+s},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,1,255,0),this[t]=e&255,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function pe(r,e,t,s,l){Ze(e,s,l,r,t,7);let d=Number(e&BigInt(4294967295));r[t++]=d,d=d>>8,r[t++]=d,d=d>>8,r[t++]=d,d=d>>8,r[t++]=d;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,t}function ee(r,e,t,s,l){Ze(e,s,l,r,t,7);let d=Number(e&BigInt(4294967295));r[t+7]=d,d=d>>8,r[t+6]=d,d=d>>8,r[t+5]=d,d=d>>8,r[t+4]=d;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=p,p=p>>8,r[t+2]=p,p=p>>8,r[t+1]=p,p=p>>8,r[t]=p,t+8}o.prototype.writeBigUInt64LE=te(function(e,t=0){return pe(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=te(function(e,t=0){return ee(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(e,t,s,l){if(e=+e,t=t>>>0,!l){const R=Math.pow(2,8*s-1);Q(this,e,t,s,R-1,-R)}let d=0,p=1,z=0;for(this[t]=e&255;++d<s&&(p*=256);)e<0&&z===0&&this[t+d-1]!==0&&(z=1),this[t+d]=(e/p>>0)-z&255;return t+s},o.prototype.writeIntBE=function(e,t,s,l){if(e=+e,t=t>>>0,!l){const R=Math.pow(2,8*s-1);Q(this,e,t,s,R-1,-R)}let d=s-1,p=1,z=0;for(this[t+d]=e&255;--d>=0&&(p*=256);)e<0&&z===0&&this[t+d+1]!==0&&(z=1),this[t+d]=(e/p>>0)-z&255;return t+s},o.prototype.writeInt8=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},o.prototype.writeInt16LE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},o.prototype.writeInt32LE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,s){return e=+e,t=t>>>0,s||Q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},o.prototype.writeBigInt64LE=te(function(e,t=0){return pe(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=te(function(e,t=0){return ee(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function me(r,e,t,s,l,d){if(t+s>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ve(r,e,t,s,l){return e=+e,t=t>>>0,l||me(r,e,t,4),a.write(r,e,t,s,23,4),t+4}o.prototype.writeFloatLE=function(e,t,s){return Ve(this,e,t,!0,s)},o.prototype.writeFloatBE=function(e,t,s){return Ve(this,e,t,!1,s)};function He(r,e,t,s,l){return e=+e,t=t>>>0,l||me(r,e,t,8),a.write(r,e,t,s,52,8),t+8}o.prototype.writeDoubleLE=function(e,t,s){return He(this,e,t,!0,s)},o.prototype.writeDoubleBE=function(e,t,s){return He(this,e,t,!1,s)},o.prototype.copy=function(e,t,s,l){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(s||(s=0),!l&&l!==0&&(l=this.length),t>=e.length&&(t=e.length),t||(t=0),l>0&&l<s&&(l=s),l===s||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(s<0||s>=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),e.length-t<l-s&&(l=e.length-t+s);const d=l-s;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,s,l):Uint8Array.prototype.set.call(e,this.subarray(s,l),t),d},o.prototype.fill=function(e,t,s,l){if(typeof e=="string"){if(typeof t=="string"?(l=t,t=0,s=this.length):typeof s=="string"&&(l=s,s=this.length),l!==void 0&&typeof l!="string")throw new TypeError("encoding must be a string");if(typeof l=="string"&&!o.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(e.length===1){const p=e.charCodeAt(0);(l==="utf8"&&p<128||l==="latin1")&&(e=p)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<s)throw new RangeError("Out of range index");if(s<=t)return this;t=t>>>0,s=s===void 0?this.length:s>>>0,e||(e=0);let d;if(typeof e=="number")for(d=t;d<s;++d)this[d]=e;else{const p=o.isBuffer(e)?e:o.from(e,l),z=p.length;if(z===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(d=0;d<s-t;++d)this[d+t]=p[d%z]}return this};const ae={};function ze(r,e,t){ae[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}ze("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ze("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),ze("ERR_OUT_OF_RANGE",function(r,e,t){let s=`The value of "${r}" is out of range.`,l=t;return Number.isInteger(t)&&Math.abs(t)>2**32?l=Ge(String(t)):typeof t=="bigint"&&(l=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(l=Ge(l)),l+="n"),s+=` It must be ${e}. Received ${l}`,s},RangeError);function Ge(r){let e="",t=r.length;const s=r[0]==="-"?1:0;for(;t>=s+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function Nt(r,e,t){le(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&ye(e,r.length-(t+1))}function Ze(r,e,t,s,l,d){if(r>t||r<e){const p=typeof e=="bigint"?"n":"";let z;throw d>3?e===0||e===BigInt(0)?z=`>= 0${p} and < 2${p} ** ${(d+1)*8}${p}`:z=`>= -(2${p} ** ${(d+1)*8-1}${p}) and < 2 ** ${(d+1)*8-1}${p}`:z=`>= ${e}${p} and <= ${t}${p}`,new ae.ERR_OUT_OF_RANGE("value",z,r)}Nt(s,l,d)}function le(r,e){if(typeof r!="number")throw new ae.ERR_INVALID_ARG_TYPE(e,"number",r)}function ye(r,e,t){throw Math.floor(r)!==r?(le(r,t),new ae.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ae.ERR_BUFFER_OUT_OF_BOUNDS:new ae.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}const St=/[^+/0-9A-Za-z-_]/g;function vt(r){if(r=r.split("=")[0],r=r.trim().replace(St,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function De(r,e){e=e||1/0;let t;const s=r.length;let l=null;const d=[];for(let p=0;p<s;++p){if(t=r.charCodeAt(p),t>55295&&t<57344){if(!l){if(t>56319){(e-=3)>-1&&d.push(239,191,189);continue}else if(p+1===s){(e-=3)>-1&&d.push(239,191,189);continue}l=t;continue}if(t<56320){(e-=3)>-1&&d.push(239,191,189),l=t;continue}t=(l-55296<<10|t-56320)+65536}else l&&(e-=3)>-1&&d.push(239,191,189);if(l=null,t<128){if((e-=1)<0)break;d.push(t)}else if(t<2048){if((e-=2)<0)break;d.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;d.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;d.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return d}function zt(r){const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function Dt(r,e){let t,s,l;const d=[];for(let p=0;p<r.length&&!((e-=2)<0);++p)t=r.charCodeAt(p),s=t>>8,l=t%256,d.push(l),d.push(s);return d}function Je(r){return n.toByteArray(vt(r))}function Me(r,e,t,s){let l;for(l=0;l<s&&!(l+t>=e.length||l>=r.length);++l)e[l+t]=r[l];return l}function V(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function be(r){return r!==r}const bt=function(){const r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const s=t*16;for(let l=0;l<16;++l)e[s+l]=r[t]+r[l]}return e}();function te(r){return typeof BigInt>"u"?Ct:r}function Ct(){throw new Error("BigInt not supported")}})(wt);var Mt={exports:{}},k=Mt.exports={},H,G;function Fe(){throw new Error("setTimeout has not been defined")}function $e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?H=setTimeout:H=Fe}catch{H=Fe}try{typeof clearTimeout=="function"?G=clearTimeout:G=$e}catch{G=$e}})();function Et(i){if(H===setTimeout)return setTimeout(i,0);if((H===Fe||!H)&&setTimeout)return H=setTimeout,setTimeout(i,0);try{return H(i,0)}catch{try{return H.call(null,i,0)}catch{return H.call(this,i,0)}}}function Ni(i){if(G===clearTimeout)return clearTimeout(i);if((G===$e||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(i);try{return G(i)}catch{try{return G.call(null,i)}catch{return G.call(this,i)}}}var K=[],fe=!1,re,Ae=-1;function Si(){!fe||!re||(fe=!1,re.length?K=re.concat(K):Ae=-1,K.length&&At())}function At(){if(!fe){var i=Et(Si);fe=!0;for(var n=K.length;n;){for(re=K,K=[];++Ae<n;)re&&re[Ae].run();Ae=-1,n=K.length}re=null,fe=!1,Ni(i)}}k.nextTick=function(i){var n=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)n[a-1]=arguments[a];K.push(new Tt(i,n)),K.length===1&&!fe&&Et(At)};function Tt(i,n){this.fun=i,this.array=n}Tt.prototype.run=function(){this.fun.apply(null,this.array)};k.title="browser";k.browser=!0;k.env={};k.argv=[];k.version="";k.versions={};function X(){}k.on=X;k.addListener=X;k.once=X;k.off=X;k.removeListener=X;k.removeAllListeners=X;k.emit=X;k.prependListener=X;k.prependOnceListener=X;k.listeners=function(i){return[]};k.binding=function(i){throw new Error("process.binding is not supported")};k.cwd=function(){return"/"};k.chdir=function(i){throw new Error("process.chdir is not supported")};k.umask=function(){return 0};var vi=Mt.exports;(function(i){Object.defineProperty(i,Symbol.toStringTag,{value:"Module"});const n=wt,a=vi,u=m=>m&&m.__esModule?m:{default:m},f=u(a),g=globalThis||void 0||self;Object.defineProperty(i,"Buffer",{enumerable:!0,get:()=>n.Buffer}),Object.defineProperty(i,"process",{enumerable:!0,get:()=>f.default}),i.global=g})(It);let P;typeof window<"u"?P=window:typeof self<"u"?P=self:P=It.global;let Qe=null,qe=null;const nt=20,Be=P.clearTimeout,st=P.setTimeout,Re=P.cancelAnimationFrame||P.mozCancelAnimationFrame||P.webkitCancelAnimationFrame,ot=P.requestAnimationFrame||P.mozRequestAnimationFrame||P.webkitRequestAnimationFrame;Re==null||ot==null?(Qe=Be,qe=function(n){return st(n,nt)}):(Qe=function([n,a]){Re(n),Be(a)},qe=function(n){const a=ot(function(){Be(u),n()}),u=st(function(){Re(a),n()},nt);return[a,u]});function zi(i){let n,a,u,f,g,m,o;const x=typeof document<"u"&&document.attachEvent;if(!x){m=function(w){const M=w.__resizeTriggers__,S=M.firstElementChild,D=M.lastElementChild,v=S.firstElementChild;D.scrollLeft=D.scrollWidth,D.scrollTop=D.scrollHeight,v.style.width=S.offsetWidth+1+"px",v.style.height=S.offsetHeight+1+"px",S.scrollLeft=S.scrollWidth,S.scrollTop=S.scrollHeight},g=function(w){return w.offsetWidth!==w.__resizeLast__.width||w.offsetHeight!==w.__resizeLast__.height},o=function(w){if(w.target.className&&typeof w.target.className.indexOf=="function"&&w.target.className.indexOf("contract-trigger")<0&&w.target.className.indexOf("expand-trigger")<0)return;const M=this;m(this),this.__resizeRAF__&&Qe(this.__resizeRAF__),this.__resizeRAF__=qe(function(){g(M)&&(M.__resizeLast__.width=M.offsetWidth,M.__resizeLast__.height=M.offsetHeight,M.__resizeListeners__.forEach(function(v){v.call(M,w)}))})};let I=!1,E="";u="animationstart";const T="Webkit Moz O ms".split(" ");let h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),_="";{const w=document.createElement("fakeelement");if(w.style.animationName!==void 0&&(I=!0),I===!1){for(let M=0;M<T.length;M++)if(w.style[T[M]+"AnimationName"]!==void 0){_=T[M],E="-"+_.toLowerCase()+"-",u=h[M],I=!0;break}}}a="resizeanim",n="@"+E+"keyframes "+a+" { from { opacity: 0; } to { opacity: 0; } } ",f=E+"animation: 1ms "+a+"; "}const A=function(I){if(!I.getElementById("detectElementResize")){const E=(n||"")+".resize-triggers { "+(f||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',T=I.head||I.getElementsByTagName("head")[0],h=I.createElement("style");h.id="detectElementResize",h.type="text/css",i!=null&&h.setAttribute("nonce",i),h.styleSheet?h.styleSheet.cssText=E:h.appendChild(I.createTextNode(E)),T.appendChild(h)}};return{addResizeListener:function(I,E){if(x)I.attachEvent("onresize",E);else{if(!I.__resizeTriggers__){const T=I.ownerDocument,h=P.getComputedStyle(I);h&&h.position==="static"&&(I.style.position="relative"),A(T),I.__resizeLast__={},I.__resizeListeners__=[],(I.__resizeTriggers__=T.createElement("div")).className="resize-triggers";const _=T.createElement("div");_.className="expand-trigger",_.appendChild(T.createElement("div"));const w=T.createElement("div");w.className="contract-trigger",I.__resizeTriggers__.appendChild(_),I.__resizeTriggers__.appendChild(w),I.appendChild(I.__resizeTriggers__),m(I),I.addEventListener("scroll",o,!0),u&&(I.__resizeTriggers__.__animationListener__=function(S){S.animationName===a&&m(I)},I.__resizeTriggers__.addEventListener(u,I.__resizeTriggers__.__animationListener__))}I.__resizeListeners__.push(E)}},removeResizeListener:function(I,E){if(x)I.detachEvent("onresize",E);else if(I.__resizeListeners__.splice(I.__resizeListeners__.indexOf(E),1),!I.__resizeListeners__.length){I.removeEventListener("scroll",o,!0),I.__resizeTriggers__.__animationListener__&&(I.__resizeTriggers__.removeEventListener(u,I.__resizeTriggers__.__animationListener__),I.__resizeTriggers__.__animationListener__=null);try{I.__resizeTriggers__=!I.removeChild(I.__resizeTriggers__)}catch{}}}}}class Di extends $.Component{constructor(...n){super(...n),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:a,disableWidth:u,onResize:f}=this.props;if(this._parentNode){var g,m,o,x;const A=window.getComputedStyle(this._parentNode)||{},j=parseFloat((g=A.paddingLeft)!==null&&g!==void 0?g:"0"),N=parseFloat((m=A.paddingRight)!==null&&m!==void 0?m:"0"),I=parseFloat((o=A.paddingTop)!==null&&o!==void 0?o:"0"),E=parseFloat((x=A.paddingBottom)!==null&&x!==void 0?x:"0"),T=this._parentNode.getBoundingClientRect(),h=T.height-I-E,_=T.width-j-N,w=this._parentNode.offsetHeight-I-E,M=this._parentNode.offsetWidth-j-N;(!a&&(this.state.height!==w||this.state.scaledHeight!==h)||!u&&(this.state.width!==M||this.state.scaledWidth!==_))&&(this.setState({height:w,width:M,scaledHeight:h,scaledWidth:_}),typeof f=="function"&&f({height:w,scaledHeight:h,scaledWidth:_,width:M}))}},this._setRef=a=>{this._autoSizer=a}}componentDidMount(){const{nonce:n}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=zi(n),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:n,defaultHeight:a,defaultWidth:u,disableHeight:f=!1,disableWidth:g=!1,nonce:m,onResize:o,style:x={},tagName:A="div",...j}=this.props,{height:N,scaledHeight:I,scaledWidth:E,width:T}=this.state,h={overflow:"visible"},_={};let w=!1;return f||(N===0&&(w=!0),h.height=0,_.height=N,_.scaledHeight=I),g||(T===0&&(w=!0),h.width=0,_.width=T,_.scaledWidth=E),$.createElement(A,{ref:this._setRef,style:{...h,...x},...j},!w&&n(_))}}function Pe(){return Pe=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},Pe.apply(this,arguments)}function at(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ye(i,n){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,f){return u.__proto__=f,u},Ye(i,n)}function bi(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,Ye(i,n)}var lt=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function Ci(i,n){return!!(i===n||lt(i)&<(n))}function Oi(i,n){if(i.length!==n.length)return!1;for(var a=0;a<i.length;a++)if(!Ci(i[a],n[a]))return!1;return!0}function Le(i,n){n===void 0&&(n=Oi);var a,u=[],f,g=!1;function m(){for(var o=[],x=0;x<arguments.length;x++)o[x]=arguments[x];return g&&a===this&&n(o,u)||(f=i.apply(this,o),g=!0,a=this,u=o),f}return m}var Bi=typeof performance=="object"&&typeof performance.now=="function",ct=Bi?function(){return performance.now()}:function(){return Date.now()};function ut(i){cancelAnimationFrame(i.id)}function Ri(i,n){var a=ct();function u(){ct()-a>=n?i.call(null):f.id=requestAnimationFrame(u)}var f={id:requestAnimationFrame(u)};return f}var ke=-1;function dt(i){if(i===void 0&&(i=!1),ke===-1||i){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",document.body.appendChild(n),ke=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return ke}var ue=null;function ft(i){if(i===void 0&&(i=!1),ue===null||i){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",a.direction="rtl";var u=document.createElement("div"),f=u.style;return f.width="100px",f.height="100px",n.appendChild(u),document.body.appendChild(n),n.scrollLeft>0?ue="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?ue="negative":ue="positive-ascending"),document.body.removeChild(n),ue}return ue}var Li=150,ki=function(n,a){return n};function Ui(i){var n,a=i.getItemOffset,u=i.getEstimatedTotalSize,f=i.getItemSize,g=i.getOffsetForIndexAndAlignment,m=i.getStartIndexForOffset,o=i.getStopIndexForStartIndex,x=i.initInstanceProps,A=i.shouldResetStyleCacheOnItemSizeChange,j=i.validateProps;return n=function(N){bi(I,N);function I(T){var h;return h=N.call(this,T)||this,h._instanceProps=x(h.props,at(h)),h._outerRef=void 0,h._resetIsScrollingTimeoutId=null,h.state={instance:at(h),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof h.props.initialScrollOffset=="number"?h.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},h._callOnItemsRendered=void 0,h._callOnItemsRendered=Le(function(_,w,M,S){return h.props.onItemsRendered({overscanStartIndex:_,overscanStopIndex:w,visibleStartIndex:M,visibleStopIndex:S})}),h._callOnScroll=void 0,h._callOnScroll=Le(function(_,w,M){return h.props.onScroll({scrollDirection:_,scrollOffset:w,scrollUpdateWasRequested:M})}),h._getItemStyle=void 0,h._getItemStyle=function(_){var w=h.props,M=w.direction,S=w.itemSize,D=w.layout,v=h._getItemStyleCache(A&&S,A&&D,A&&M),O;if(v.hasOwnProperty(_))O=v[_];else{var U=a(h.props,_,h._instanceProps),Y=f(h.props,_,h._instanceProps),W=M==="horizontal"||D==="horizontal",se=M==="rtl",oe=W?U:0;v[_]=O={position:"absolute",left:se?void 0:oe,right:se?oe:void 0,top:W?0:U,height:W?"100%":Y,width:W?Y:"100%"}}return O},h._getItemStyleCache=void 0,h._getItemStyleCache=Le(function(_,w,M){return{}}),h._onScrollHorizontal=function(_){var w=_.currentTarget,M=w.clientWidth,S=w.scrollLeft,D=w.scrollWidth;h.setState(function(v){if(v.scrollOffset===S)return null;var O=h.props.direction,U=S;if(O==="rtl")switch(ft()){case"negative":U=-S;break;case"positive-descending":U=D-M-S;break}return U=Math.max(0,Math.min(U,D-M)),{isScrolling:!0,scrollDirection:v.scrollOffset<S?"forward":"backward",scrollOffset:U,scrollUpdateWasRequested:!1}},h._resetIsScrollingDebounced)},h._onScrollVertical=function(_){var w=_.currentTarget,M=w.clientHeight,S=w.scrollHeight,D=w.scrollTop;h.setState(function(v){if(v.scrollOffset===D)return null;var O=Math.max(0,Math.min(D,S-M));return{isScrolling:!0,scrollDirection:v.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},h._resetIsScrollingDebounced)},h._outerRefSetter=function(_){var w=h.props.outerRef;h._outerRef=_,typeof w=="function"?w(_):w!=null&&typeof w=="object"&&w.hasOwnProperty("current")&&(w.current=_)},h._resetIsScrollingDebounced=function(){h._resetIsScrollingTimeoutId!==null&&ut(h._resetIsScrollingTimeoutId),h._resetIsScrollingTimeoutId=Ri(h._resetIsScrolling,Li)},h._resetIsScrolling=function(){h._resetIsScrollingTimeoutId=null,h.setState({isScrolling:!1},function(){h._getItemStyleCache(-1,null)})},h}I.getDerivedStateFromProps=function(h,_){return Fi(h,_),j(h),null};var E=I.prototype;return E.scrollTo=function(h){h=Math.max(0,h),this.setState(function(_){return _.scrollOffset===h?null:{scrollDirection:_.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},E.scrollToItem=function(h,_){_===void 0&&(_="auto");var w=this.props,M=w.itemCount,S=w.layout,D=this.state.scrollOffset;h=Math.max(0,Math.min(h,M-1));var v=0;if(this._outerRef){var O=this._outerRef;S==="vertical"?v=O.scrollWidth>O.clientWidth?dt():0:v=O.scrollHeight>O.clientHeight?dt():0}this.scrollTo(g(this.props,h,_,D,this._instanceProps,v))},E.componentDidMount=function(){var h=this.props,_=h.direction,w=h.initialScrollOffset,M=h.layout;if(typeof w=="number"&&this._outerRef!=null){var S=this._outerRef;_==="horizontal"||M==="horizontal"?S.scrollLeft=w:S.scrollTop=w}this._callPropsCallbacks()},E.componentDidUpdate=function(){var h=this.props,_=h.direction,w=h.layout,M=this.state,S=M.scrollOffset,D=M.scrollUpdateWasRequested;if(D&&this._outerRef!=null){var v=this._outerRef;if(_==="horizontal"||w==="horizontal")if(_==="rtl")switch(ft()){case"negative":v.scrollLeft=-S;break;case"positive-ascending":v.scrollLeft=S;break;default:var O=v.clientWidth,U=v.scrollWidth;v.scrollLeft=U-O-S;break}else v.scrollLeft=S;else v.scrollTop=S}this._callPropsCallbacks()},E.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ut(this._resetIsScrollingTimeoutId)},E.render=function(){var h=this.props,_=h.children,w=h.className,M=h.direction,S=h.height,D=h.innerRef,v=h.innerElementType,O=h.innerTagName,U=h.itemCount,Y=h.itemData,W=h.itemKey,se=W===void 0?ki:W,oe=h.layout,je=h.outerElementType,Ne=h.outerTagName,xe=h.style,Ie=h.useIsScrolling,Se=h.width,we=this.state.isScrolling,he=M==="horizontal"||oe==="horizontal",ve=he?this._onScrollHorizontal:this._onScrollVertical,_e=this._getRangeToRender(),F=_e[0],Q=_e[1],pe=[];if(U>0)for(var ee=F;ee<=Q;ee++)pe.push($.createElement(_,{data:Y,key:se(ee,Y),index:ee,isScrolling:Ie?we:void 0,style:this._getItemStyle(ee)}));var me=u(this.props,this._instanceProps);return $.createElement(je||Ne||"div",{className:w,onScroll:ve,ref:this._outerRefSetter,style:Pe({position:"relative",height:S,width:Se,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:M},xe)},$.createElement(v||O||"div",{children:pe,ref:D,style:{height:he?"100%":me,pointerEvents:we?"none":void 0,width:he?me:"100%"}}))},E._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var h=this.props.itemCount;if(h>0){var _=this._getRangeToRender(),w=_[0],M=_[1],S=_[2],D=_[3];this._callOnItemsRendered(w,M,S,D)}}if(typeof this.props.onScroll=="function"){var v=this.state,O=v.scrollDirection,U=v.scrollOffset,Y=v.scrollUpdateWasRequested;this._callOnScroll(O,U,Y)}},E._getRangeToRender=function(){var h=this.props,_=h.itemCount,w=h.overscanCount,M=this.state,S=M.isScrolling,D=M.scrollDirection,v=M.scrollOffset;if(_===0)return[0,0,0,0];var O=m(this.props,v,this._instanceProps),U=o(this.props,O,v,this._instanceProps),Y=!S||D==="backward"?Math.max(1,w):1,W=!S||D==="forward"?Math.max(1,w):1;return[Math.max(0,O-Y),Math.max(0,Math.min(_-1,U+W)),O,U]},I}($.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var Fi=function(n,a){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,a.instance},$i=Ui({getItemOffset:function(n,a){var u=n.itemSize;return a*u},getItemSize:function(n,a){var u=n.itemSize;return u},getEstimatedTotalSize:function(n){var a=n.itemCount,u=n.itemSize;return u*a},getOffsetForIndexAndAlignment:function(n,a,u,f,g,m){var o=n.direction,x=n.height,A=n.itemCount,j=n.itemSize,N=n.layout,I=n.width,E=o==="horizontal"||N==="horizontal",T=E?I:x,h=Math.max(0,A*j-T),_=Math.min(h,a*j),w=Math.max(0,a*j-T+j+m);switch(u==="smart"&&(f>=w-T&&f<=_+T?u="auto":u="center"),u){case"start":return _;case"end":return w;case"center":{var M=Math.round(w+(_-w)/2);return M<Math.ceil(T/2)?0:M>h+Math.floor(T/2)?h:M}case"auto":default:return f>=w&&f<=_?f:f<w?w:_}},getStartIndexForOffset:function(n,a){var u=n.itemCount,f=n.itemSize;return Math.max(0,Math.min(u-1,Math.floor(a/f)))},getStopIndexForStartIndex:function(n,a,u){var f=n.direction,g=n.height,m=n.itemCount,o=n.itemSize,x=n.layout,A=n.width,j=f==="horizontal"||x==="horizontal",N=a*o,I=j?A:g,E=Math.ceil((I+u-N)/o);return Math.max(0,Math.min(m-1,a+E-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});function Qi(i){var n=i.lastRenderedStartIndex,a=i.lastRenderedStopIndex,u=i.startIndex,f=i.stopIndex;return!(u>a||f<n)}function qi(i){for(var n=i.isItemLoaded,a=i.itemCount,u=i.minimumBatchSize,f=i.startIndex,g=i.stopIndex,m=[],o=null,x=null,A=f;A<=g;A++){var j=n(A);j?x!==null&&(m.push(o,x),o=x=null):(x=A,o===null&&(o=A))}if(x!==null){for(var N=Math.min(Math.max(x,o+u-1),a-1),I=x+1;I<=N&&!n(I);I++)x=I;m.push(o,x)}if(m.length)for(;m[1]-m[0]+1<u&&m[0]>0;){var E=m[0]-1;if(!n(E))m[0]=E;else break}return m}var Pi=function(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")},Yi=function(){function i(n,a){for(var u=0;u<a.length;u++){var f=a[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}return function(n,a,u){return a&&i(n.prototype,a),u&&i(n,u),n}}(),Wi=function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);i.prototype=Object.create(n&&n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(i,n):i.__proto__=n)},ht=function(i,n){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:i},Vi=function(i){Wi(n,i);function n(){var a,u,f,g;Pi(this,n);for(var m=arguments.length,o=Array(m),x=0;x<m;x++)o[x]=arguments[x];return g=(u=(f=ht(this,(a=n.__proto__||Object.getPrototypeOf(n)).call.apply(a,[this].concat(o))),f),f._lastRenderedStartIndex=-1,f._lastRenderedStopIndex=-1,f._memoizedUnloadedRanges=[],f._onItemsRendered=function(A){var j=A.visibleStartIndex,N=A.visibleStopIndex;f._lastRenderedStartIndex=j,f._lastRenderedStopIndex=N,f._ensureRowsLoaded(j,N)},f._setRef=function(A){f._listRef=A},u),ht(f,g)}return Yi(n,[{key:"resetloadMoreItemsCache",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],u&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var u=this.props.children;return u({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(u,f){var g=this.props,m=g.isItemLoaded,o=g.itemCount,x=g.minimumBatchSize,A=x===void 0?10:x,j=g.threshold,N=j===void 0?15:j,I=qi({isItemLoaded:m,itemCount:o,minimumBatchSize:A,startIndex:Math.max(0,u-N),stopIndex:Math.min(o-1,f+N)});(this._memoizedUnloadedRanges.length!==I.length||this._memoizedUnloadedRanges.some(function(E,T){return I[T]!==E}))&&(this._memoizedUnloadedRanges=I,this._loadUnloadedRanges(I))}},{key:"_loadUnloadedRanges",value:function(u){for(var f=this,g=this.props.loadMoreItems||this.props.loadMoreRows,m=function(A){var j=u[A],N=u[A+1],I=g(j,N);I!=null&&I.then(function(){if(Qi({lastRenderedStartIndex:f._lastRenderedStartIndex,lastRenderedStopIndex:f._lastRenderedStopIndex,startIndex:j,stopIndex:N})){if(f._listRef==null)return;typeof f._listRef.resetAfterIndex=="function"?f._listRef.resetAfterIndex(j,!0):(typeof f._listRef._getItemStyleCache=="function"&&f._listRef._getItemStyleCache(-1),f._listRef.forceUpdate())}})},o=0;o<u.length;o+=2)m(o)}}]),n}($.PureComponent);const Hi=()=>y.C1,Gi=y.styled_default("div")({name:"a",class:"a1w9zony",propsAsIs:!1}),Zi=y.styled_default("div")({name:"l",class:"l16qcfv8",propsAsIs:!1}),Ji=y.styled_default("img")({name:"p",class:"p1gmcc5f",propsAsIs:!1}),Ki=y.styled_default("div")({name:"s",class:"s1doddh0",propsAsIs:!1}),Xi=y.styled_default("div")({name:"c",class:"c1js9xhe",propsAsIs:!1}),en=y.styled_default("div")({name:"d",class:"d1tmnqsh",propsAsIs:!1}),tn=y.styled_default("span")({name:"g",class:"gi9h87j",propsAsIs:!1}),rn=y.styled_default(Hi())({name:"x",class:"x13mk3z6",propsAsIs:!0}),nn=({rank:i,avatar:n,name:a,points:u,isCurrentUser:f,openItemDetail:g,style:m})=>c.jsxs(Gi,{onClick:g,style:m,children:[c.jsx(Zi,{children:i||0}),c.jsxs(Xi,{children:[n?c.jsx(Ji,{alt:"leaderboard-item-avatar",src:n}):c.jsx(Ki,{children:ie.o(a||"")}),c.jsxs(en,{children:[c.jsx(tn,{children:a||""}),f&&c.jsx(rn,{name:"icon-star"})]})]}),c.jsx("div",{children:ie.i(u)})]}),sn=({items:i,openItemDetail:n,fetchMore:a})=>c.jsx(Di,{children:({width:u,height:f})=>c.jsx(Vi,{isItemLoaded:g=>g<i.length,itemCount:i.length+1,loadMoreItems:a,children:({onItemsRendered:g,ref:m})=>c.jsx($i,{itemSize:56,onItemsRendered:g,ref:m,itemCount:i.length,width:u,height:f,children:({index:o,style:x})=>c.jsx(nn,{style:{...x,maxHeight:48},...i[o],openItemDetail:()=>n(i[o].userId)},i[o].userId)})})}),on=({leaderboardList:i,openUser:n})=>{const{data:a}=ne.useStore(i.$store);return c.jsx(sn,{fetchMore:i.fetchMore,items:a,openItemDetail:n})};const an=y.styled_default("button")({name:"a",class:"akly9h2",propsAsIs:!1}),ln=y.styled_default("span")({name:"e",class:"eptoiz9",propsAsIs:!1}),cn=({disabled:i,variant:n="primary",onClick:a,children:u,...f})=>c.jsx(an,{onClick:a,disabled:i,"data-variant":n,...f,children:c.jsx(ln,{children:u})});const un=()=>y.C1,dn=()=>y.C1,fn=y.styled_default("div")({name:"s",class:"s1lblda3",propsAsIs:!1}),hn=y.styled_default("div")({name:"a",class:"ascvb2g",propsAsIs:!1}),pn=y.styled_default("div")({name:"p",class:"p17rl8zy",propsAsIs:!1}),mn=y.styled_default("div")({name:"l",class:"l1vvttbn",propsAsIs:!1}),Ue=y.styled_default(un())({name:"c",class:"c6fk2ph",propsAsIs:!0}),yn=y.styled_default(dn())({name:"d",class:"d1rdm136",propsAsIs:!0}),gn=y.styled_default("div")({name:"f",class:"fwqnnel",propsAsIs:!1}),xn=y.styled_default("div")({name:"u",class:"ucyxnlg",propsAsIs:!1}),In={[C.PickHistoryStatus.LOST]:c.jsx(Ue,{name:"icon-cross"}),[C.PickHistoryStatus.WON]:c.jsx(Ue,{name:"icon-check"}),[C.PickHistoryStatus.UNSET]:void 0,[C.PickHistoryStatus.DNP]:c.jsx(Ue,{name:"icon-arrow"})},wn=({questionId:i,questionType:n,questionStatus:a,subject:u,openForVoting:f,openQuestion:g,status:m})=>{const o=J.o[n],x=In[m];return o?c.jsxs(fn,{onClick:()=>g==null?void 0:g(i),children:[c.jsxs(xn,{children:[c.jsxs(hn,{children:[c.jsx(yn,{name:o.iconName}),c.jsxs(gn,{children:[o.label,n===C.QuestionType.TRIVIA&&a===C.QuestionStatus.RESOLVED&&" • Expired"]})]}),c.jsx(pn,{children:u||""})]}),c.jsx(mn,{children:x||(f?c.jsx(cn,{children:"Play"}):null)})]}):null};const _n=y.styled_default("div")({name:"n",class:"n1jcgove",propsAsIs:!1}),Mn=y.styled_default("button")({name:"l",class:"l1bwp7hh",propsAsIs:!1}),En=({openInsight:i,questionId:n,...a})=>c.jsxs(_n,{children:[c.jsx(xt,{questionId:n,...a}),i&&c.jsx(Mn,{onClick:()=>i(n),children:"View Insight"})]});const An=y.styled_default("div")({name:"t",class:"t19vr3p1",propsAsIs:!1}),Tn=({questions:i,openQuestion:n})=>c.jsx(An,{children:i==null?void 0:i.map(a=>{var u,f;if(a.type==="question"&&((u=a.attributes)==null?void 0:u.attributes.case)==="question"){const g=a.attributes.attributes.value;return c.jsx(wn,{openQuestion:n,...g},g.questionId)}if(a.type==="insight"&&((f=a.attributes)==null?void 0:f.attributes.case)==="insight"){const g=a.attributes.attributes.value;return c.jsx(En,{openInsight:n,...g},g.questionId)}return null})}),jn=({store:i,openQuestion:n})=>{const a=ne.useStore(i);return a!=null&&a.data?c.jsx(Tn,{openQuestion:n,questions:a.data}):c.jsx("div",{children:"wait questions..."})},Nn=({userSummary:i})=>{var n;const a=ne.useStore(i.getStore());return(n=a.data)!=null&&n.summary?c.jsx(yt,{...a.data.summary,...a.data.percentage}):c.jsx("div",{children:"wait user..."})},Sn=({gamification:i})=>{const[n,a]=$.useState(ge.HOME);return c.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[c.jsxs(J.e,{children:[c.jsx(xi,{activePage:n,toggleActivePage:a}),n===ge.HOME&&c.jsx(Nn,{userSummary:i.userSummary})]}),n===ge.HOME&&c.jsx(J.n,{children:c.jsx(jn,{openQuestion:i.openQuestion,store:i.feedList.getStore()})}),n===ge.LEADERBOARD&&c.jsx(J.n,{style:{flex:"1 1 auto",paddingTop:0,paddingBottom:0},children:c.jsx(on,{openUser:i.openUser,leaderboardList:i.leaderboardList})})]})};const vn=()=>J.f,pt=y.styled_default(vn())({name:"e",class:"e1ph66cs",propsAsIs:!0}),zn=y.styled_default("div")({name:"x",class:"xorme7i",propsAsIs:!1}),jt=({gamification:i,className:n})=>{const a=ne.useStore(i.openedQuestion.$store),u=ne.useStore(i.openedUser);return c.jsxs(c.Fragment,{children:[a&&c.jsx(pt,{className:n,children:c.jsx(hi,{gamification:i})}),u&&c.jsx(pt,{className:n,children:c.jsxs(zn,{children:[c.jsx(mt,{label:"Friend's Rank",close:i.closeUser}),c.jsx(J.e,{children:c.jsx(yt,{...u})})]})}),c.jsx(J.r,{className:n,"data-nav":"true",children:c.jsx(Sn,{gamification:i})})]})};exports.GamificationOverlay=jt;exports.default=jt;
|