oraculo-ui 0.1.67 → 0.1.68
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/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +215 -224
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),F=require("@mui/material"),I=require("react"),Oe=require("@splidejs/react-splide"),nt=require("@mui/material/Box"),at=require("@mui/material/Skeleton"),st=require("@mui/material/Typography"),rt=require("@mui/material/Stack"),Z=require("@mui/icons-material"),it=require("@mui/icons-material/ChevronLeftRounded"),ct=require("@mui/icons-material/ChevronRightRounded"),lt=require("@mui/material/useMediaQuery"),ve=require("firebase/firestore"),X=t=>t&&t.__esModule?t:{default:t},dt=X(I),E=X(nt),L=X(at),H=X(st),T=X(rt),ke=X(it),Ie=X(ct),ut=X(lt);function W({children:t,onClick:o,href:s,target:r,rel:l,type:n="button",disabled:a=!1,variant:u="primary",size:d,fullWidth:m=!1,fullHeight:h=!1,className:C="",ariaLabel:i,leftIcon:c,rightIcon:f,iconOnly:k}){const g=!!t&&t!==!0,x=(!!c?1:0)+(!!f?1:0)==1,v=k!=null?k:x&&!g,$=["orc-btn",u==="secondary"?"orc-btn--secondary":u==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",d?`orc-btn--${d}`:"",m?"orc-btn--full":"",h?"orc-btn--fullHeight":"",v?"orc-btn--iconOnly":"",C].filter(Boolean).join(" "),B=e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:"orc-btn__icon",children:c}),!v&&e.jsx("span",{className:"orc-btn__label",children:t}),f&&e.jsx("span",{className:"orc-btn__icon",children:f})]}),j=a?!0:void 0;return s?e.jsx(F.Link,{href:s,target:r,rel:l,"aria-label":i,"aria-disabled":j,tabIndex:j?-1:void 0,className:$,onClick:j?R=>R.preventDefault():o,children:B}):e.jsx("button",{type:n,onClick:o,disabled:!!j,"aria-label":i,className:$,children:B})}function q({title:t,iconUrl:o,size:s="md",className:r=""}){const n=["orc-section-title",s?`orc-section-title--${s}`:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:n,children:[o&&e.jsx("img",{src:o,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const pe=({total:t,active:o,onSelect:s,className:r=""})=>{if(t<=1)return null;const l=["orc-dots",r].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((n,a)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":a===o,"aria-label":`Ir al slide ${a+1}`,className:"orc-dots__dot"+(a===o?" orc-dots__dot--active":""),onClick:()=>s==null?void 0:s(a)})},a))})};function D({children:t,minWidth:o=32,spacing:s=2,justify:r="stretch",columns:l=null}){const n=l||`repeat(auto-fit, minmax(${o}px, 1fr))`,a=typeof s=="number"?`${s*8}px`:s;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:n,justifyItems:r,gap:a,height:"inherit"},children:t})}function de({src:t,alt:o}){return e.jsx(F.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(F.Box,{component:"img",src:t,alt:o,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}const pt="oraculo__OraculoEventTitle-module__contenedor___rg1vw",mt="oraculo__OraculoEventTitle-module__flexGroup___jMLFO",xt="oraculo__OraculoEventTitle-module__subtitle___TmHna",re={contenedor:pt,flexGroup:mt,subtitle:xt};function ft({title:t,subtitle:o}){return e.jsxs("div",{className:re.contenedor,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),o&&e.jsxs("div",{className:re.flexGroup,children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{className:re.subtitle,children:o}),e.jsx("div",{})]})]})}function Ne({text:t,color:o="#ff3b3b",textColor:s="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:o,color:s,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function $e({live:t,time:o}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(Ne,{text:"En vivo"}),o&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:o})]})}function Be({title:t,subtitle:o,live:s=!1,time:r=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(ft,{title:t,subtitle:o}),e.jsx($e,{live:s,time:r})]})}const ht="oraculo__OraculoEventLabel-module__label___c64Xw",gt={label:ht};function me({text:t}){return e.jsx("span",{className:gt.label,children:t})}const bt="oraculo__OraculoEventLeague-module__container___rdk4F",_t={container:bt};function xe({title:t}){return e.jsx("div",{className:_t.container,children:t.toUpperCase()})}const jt="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",vt="oraculo__OraculoEventScore-module__name___r4uL6",yt="oraculo__OraculoEventScore-module__score___Xl03M",wt="oraculo__OraculoEventScore-module__normal___cCNFz",St="oraculo__OraculoEventScore-module__small___fVt8E",Y={scoreWrapper:jt,name:vt,score:yt,normal:wt,small:St};function fe({text:t,name:o,size:s="normal"}){return e.jsxs("div",{className:`${Y.scoreWrapper} ${Y[s]}`,children:[e.jsx("div",{className:`${Y.score} ${Y[s]}`,children:t}),o&&e.jsx("span",{className:`${Y.name} ${Y[s]}`,children:o})]})}const Ct="oraculo__OraculoEventTeamInfo-module__team___UfpUs",Et="oraculo__OraculoEventTeamInfo-module__regular___ag826",Ot="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",kt="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",It="oraculo__OraculoEventTeamInfo-module__name___4ikm-",oe={team:Ct,regular:Et,compact:Ot,logo:kt,name:It};function te({name:t,logo:o,size:s="regular"}){return e.jsxs("div",{className:`oli-font ${oe.team} ${oe[s]}`,children:[e.jsx("img",{loading:"lazy",src:o,alt:t,className:oe.logo}),e.jsx("span",{className:oe.name,children:t})]})}const Nt=Oe.Splide,$t=Oe.SplideSlide,K=I.forwardRef(({items:t=[],renderItem:o,perPage:s=1,gap:r="0px",breakpoints:l,options:n={},className:a="",onMove:u,useIndexAsKey:d=!1},m)=>{const h=I.useRef(null);I.useImperativeHandle(m,()=>({next:()=>{var f;return(f=h.current)==null?void 0:f.go(">")},prev:()=>{var f;return(f=h.current)==null?void 0:f.go("<")},go:f=>{var k;return(k=h.current)==null?void 0:k.go(f)}}));const C=I.useCallback(f=>{const k=f.Components.Controller,g=k.getIndex(),y=k.getEnd(),w=g===0,x=g>=y,v=f.Components.Slides.getLength();u==null||u({index:g,isStart:w,isEnd:x,total:v})},[u]),i=I.useCallback(f=>{C(f)},[C]),c={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:s,gap:r,breakpoints:l,...n};return e.jsx("div",{className:a,style:{width:"100%"},children:e.jsx(Nt,{ref:h,options:c,onMove:C,onMounted:i,children:t.map((f,k)=>{var g;return e.jsx($t,{children:o(f,k)},d?k:(g=f.id)!=null?g:k)})})})}),ee=({imageUrl:t,onClick:o,size:s="sm",fillParent:r=!1})=>{const l=s==="lg"?{w:280,h:352}:{w:152,h:168},n=u=>{u.stopPropagation(),o==null||o()},a=r?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(E.default,{onClick:o,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...a,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(E.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(E.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(W,{variant:"primary",size:"md",onClick:n,children:"Jugar"})})]})};function Re({imageUrl:t,orden:o=1,onClick:s,loading:r=!1,sizes:l={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var C,i,c,f;const n=(k,g)=>{var y,w,x,v;return{xs:(w=(y=l.xs)==null?void 0:y[k])!=null?w:g,md:(v=(x=l.md)==null?void 0:x[k])!=null?v:g}},a=n("w",186),u=n("h",264),d=n("r",22.6),m=n("font",64),h={xs:Math.round(((i=(C=l.xs)==null?void 0:C.font)!=null?i:64)*.28),md:Math.round(((f=(c=l.md)==null?void 0:c.font)!=null?f:64)*.28)};return e.jsxs(E.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${a.xs}px`,md:`${a.md}px`},aspectRatio:{xs:`${a.xs}/${u.xs}`,md:`${a.md}/${u.md}`},borderRadius:{xs:`${d.xs}px`,md:`${d.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${h.xs}px`,md:`${h.md}px`},"&::before":{content:'""',position:"absolute",inset:0,borderRadius:"inherit",pointerEvents:"none",zIndex:2,background:"linear-gradient(21.29deg, #0B0D1B -1.16%, rgba(255,255,255,0) 51.92%, rgba(255,255,255,0) 127.62%)",backgroundBlendMode:"multiply"}},children:[e.jsx(E.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:r?e.jsx(L.default,{variant:"rectangular",width:"100%",height:"100%",sx:{bgcolor:"rgba(255,255,255,0.10)","&::after":{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent)"}}}):e.jsx(ee,{imageUrl:t,onClick:s,size:"lg",fillParent:!0})}),e.jsx(E.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${h.xs}px`,md:`-${h.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:o})]})}const Te=({logo:t,provider:o,providerName:s,machine:r,onClick:l})=>{var n;return e.jsxs(E.default,{onClick:l,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(E.default,{component:"img",src:t,alt:`Juego ${r!=null?r:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(E.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(H.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(n=o!=null?o:s)!=null?n:""})})]})},ie=12,ce=({r:t=16})=>e.jsx(E.default,{sx:{width:"100%",height:"100%",borderRadius:t,overflow:"hidden"},children:e.jsx(L.default,{variant:"rectangular",width:"100%",height:"100%",sx:{bgcolor:"rgba(255,255,255,0.10)","&::after":{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent)"}}})}),he=({items:t,layout:o="grid",onClick:s,loading:r=!1,gridSkeletonCount:l=4})=>{var n,a;if(o==="mosaic"){const u=t[0];console.log("big: ",u);const d=t.slice(1,5);return e.jsxs(E.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${ie}px`,rowGap:`${ie}px`,alignItems:"stretch",justifyItems:"stretch"},children:[e.jsx(E.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):u&&e.jsx(ee,{imageUrl:`https://olimpo.bet${(a=(n=u.background)!=null?n:u.imageUrl)!=null?a:""}`,size:"lg",fillParent:!0,onClick:()=>s==null?void 0:s(u,0)})}),(r?Array.from({length:4}):d).map((m,h)=>{var C,i;return e.jsx(E.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):e.jsx(ee,{imageUrl:`https://olimpo.bet${(i=(C=m.background)!=null?C:m.imageUrl)!=null?i:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(m,h+1)})},r?`sk-${h}`:m.id)})]})}return e.jsx(E.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${ie}px`,gridAutoFlow:"column"},children:(r?Array.from({length:l}):t).map((u,d)=>{var m,h,C;return e.jsx(E.default,{sx:{overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):e.jsx(ee,{imageUrl:`https://olimpo.bet${(h=(m=u.background)!=null?m:u.imageUrl)!=null?h:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(u,d)})},r?`sk-${d}`:(C=u.id)!=null?C:d)})})},ue=({title:t,amount:o,subtitle:s,buttonText:r,onButtonClick:l,backgroundImage:n,alt:a,className:u="",variant:d="small"})=>{const m=o?o.slice(0,2):"",h=o?o.slice(2):"",C=d==="large";return e.jsxs(E.default,{className:u,sx:{position:"relative",width:"100%",maxWidth:{xs:328,md:C?618:456},mx:"auto"},children:[n&&e.jsx(E.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",md:C?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(E.default,{component:"img",src:n,alt:a!=null?a:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",md:"45% 0%"},display:"block"}})}),e.jsx(E.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(E.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(H.default,{sx:{fontSize:{xs:12,md:20},fontWeight:400,color:"#e7f8ff"},children:t}),o&&e.jsxs(E.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(E.default,{component:"span",sx:{fontSize:{xs:35,md:48},mr:.5},children:m}),e.jsx(E.default,{component:"span",sx:{fontSize:{xs:52,md:77}},children:h})]}),s&&e.jsx(H.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:s}),r&&e.jsx(W,{onClick:l,children:r})]})})]})},Me=({text:t,buttonLabel:o="Conoce más",onClick:s,imgAlt:r="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:n,imgSrcDesktopLogo:a})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:r,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[n&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:n,alt:`${r} fondo`,className:"orc-co-bgDesktopImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[a&&e.jsx("img",{src:a,alt:`${r} logo`,className:"orc-co-logoImg"}),e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(W,{onClick:s,variant:"primary",size:"md",children:o})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(W,{onClick:s,variant:"primary",size:"md",children:o})]})]}),Bt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",Rt="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",Tt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",Mt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",Pt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",Lt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",Ft="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",Wt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",J={card:Bt,combinadas:Rt,apuestaItem:Tt,lineContainer:Mt,circle:Pt,line:Lt,apuestaText:Ft,cuotaTotal:Wt};function ge(t){const o=Array.isArray(t)?t:[t];sessionStorage.setItem("landingOutcomes",JSON.stringify(o)),window.location.href="/deportes#in-play"}function zt(){window.location.href="/deportes#in-play"}function At(){window.location.href="/deportes#sports-hub/football"}function Gt(){window.location.href="/deportes#specials"}function Pe({event:t}){var r;function o(l){var h;const n=(h=l.betoffers)!=null?h:[],a=l.homeName,u=l.awayName,d=n.map(C=>{var k,g,y,w,x;let i=C.outcomes[0],c="",f=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(c=`Más de ${f}`,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(c=`Menos de ${f}`,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["Sí","No"].includes(i==null?void 0:i.label)?(c=i==null?void 0:i.label,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?c=`${a} o Empate`:i.label==="12"?c=`${a} o ${u}`:i.label==="X2"&&(c=`${u} o Empate`):(i!=null&&i.participant?c=i.participant:c=(k=i==null?void 0:i.label)!=null?k:"",f!==""&&c===i.label&&(c=`${i.label} ${f}`)),{id:(g=i==null?void 0:i.id)!=null?g:0,value:c,label:C.criterion.label,odds:(y=i==null?void 0:i.odds)!=null?y:0,bl:(w=i==null?void 0:i.label)!=null?w:0,position:(x=i==null?void 0:i.position)!=null?x:0}}),m=d.reduce((C,i)=>C+i.odds,0)/1e3;return{outcomes:d,total:m.toFixed(2)}}const s=o(t);return e.jsxs("div",{className:J.card,children:[e.jsx("div",{className:J.combinadas,children:e.jsxs(T.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(q,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{loading:"lazy",src:"/assets/img/home/Combinadas/line.png"}),e.jsx(T.default,{direction:"column",spacing:.5,useFlexGap:!0,children:s.outcomes.sort((l,n)=>l.position-n.position).map((l,n)=>e.jsxs("div",{className:J.apuestaItem,children:[e.jsxs("div",{className:J.lineContainer,children:[e.jsx("div",{className:J.circle}),n<s.outcomes.length-1&&e.jsx("div",{className:J.line})]}),e.jsxs("div",{className:J.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},n))})]})}),e.jsxs("button",{onClick:()=>{var l,n;return ge((n=(l=s==null?void 0:s.outcomes)==null?void 0:l.map(a=>a==null?void 0:a.id))!=null?n:[])},className:J.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((r=t.combinadoTotal)!=null?r:0)/1e3).toFixed(2)})]}),e.jsx("img",{loading:"lazy",src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}const V={"orc-btn":"oraculo__OraculoButtonBet-module__orc-btn___jakza","orc-btn__label":"oraculo__OraculoButtonBet-module__orc-btn__label___zNFEH","orc-btn__icon":"oraculo__OraculoButtonBet-module__orc-btn__icon___5Rhyd","orc-btn--primary":"oraculo__OraculoButtonBet-module__orc-btn--primary___7TlJB","orc-btn--secondary":"oraculo__OraculoButtonBet-module__orc-btn--secondary___X4kJt","orc-btn--tertiary":"oraculo__OraculoButtonBet-module__orc-btn--tertiary___iS6eD","orc-btn--sm":"oraculo__OraculoButtonBet-module__orc-btn--sm___lIF2e","orc-btn--md":"oraculo__OraculoButtonBet-module__orc-btn--md___x4SI7","orc-btn--lg":"oraculo__OraculoButtonBet-module__orc-btn--lg___0BQNI","orc-btn--iconOnly":"oraculo__OraculoButtonBet-module__orc-btn--iconOnly___hQGwI","orc-btn--full":"oraculo__OraculoButtonBet-module__orc-btn--full___z-Myo","orc-btn--fullHeight":"oraculo__OraculoButtonBet-module__orc-btn--fullHeight___pCxq1"};function Ut({children:t,onClick:o,href:s,target:r,rel:l,type:n="button",disabled:a=!1,variant:u="primary",size:d,fullWidth:m=!1,fullHeight:h=!1,className:C="",ariaLabel:i,leftIcon:c,rightIcon:f,iconOnly:k}){const g=!!t&&t!==!0,x=(!!c?1:0)+(!!f?1:0)==1,v=k!=null?k:x&&!g,$=[V["orc-btn"],V[`orc-btn--${u}`],d?V[`orc-btn--${d}`]:"",m?V["orc-btn--full"]:"",h?V["orc-btn--fullHeight"]:"",v?V["orc-btn--iconOnly"]:"",C].filter(Boolean).join(" "),B=e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:V["orc-btn__icon"],children:c}),!v&&e.jsx("span",{className:V["orc-btn__label"],children:t}),f&&e.jsx("span",{className:V["orc-btn__icon"],children:f})]}),j=a?!0:void 0;return s?e.jsx(F.Link,{href:s,target:r,rel:l,"aria-label":i,"aria-disabled":j,tabIndex:j?-1:void 0,className:$,onClick:j?R=>R.preventDefault():o,children:B}):e.jsx("button",{type:n,onClick:o,disabled:!!j,"aria-label":i,className:$,children:B})}const Dt="oraculo__OraculoEventEnVivoCard-module__cardWrapper___6b-cT",Le={cardWrapper:Dt};function Fe({event:t,liveData:o,betOffers:s}){var l,n,a,u,d,m,h,C;const r=s==null?void 0:s.find(i=>{var c;return((c=i.betOfferType)==null?void 0:c.id)===2});return e.jsx("div",{className:Le.cardWrapper,children:e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(Be,{title:(l=t.path[0].name)!=null?l:"",subtitle:t.group,live:!0,time:((n=o==null?void 0:o.matchClock)==null?void 0:n.minute)!=null?`${o.matchClock.minute}'`:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(D,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(te,{name:t.homeName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/Juventus.png"}),e.jsx(fe,{text:((u=(a=o==null?void 0:o.score)==null?void 0:a.home)!=null?u:0)+":"+((m=(d=o==null?void 0:o.score)==null?void 0:d.away)!=null?m:0),name:"En vivo"}),e.jsx(te,{name:t.awayName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/Racing.png"})]})})]}),e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(D,{spacing:1,children:((h=r==null?void 0:r.outcomes)!=null?h:[]).map((i,c)=>e.jsx(me,{text:i.label.toUpperCase()},c))}),e.jsx(D,{spacing:2,children:((C=r==null?void 0:r.outcomes)!=null?C:[]).map((i,c)=>e.jsx(Ut,{variant:"primary",disabled:i.odds==null||(r==null?void 0:r.cashOutStatus)=="SUSPENDED",onClick:()=>{ge(i.id)},children:i.odds===void 0?"":(i.odds/1e3).toFixed(2)},c))})]})]})})}const Vt="oraculo__OraculoEventDate-module__date___xhIlh",Ht={date:Vt};function qt({text:t}){return e.jsx("div",{className:`oli-font ${Ht.date}`,children:t})}const Kt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",Jt="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",Xt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Qt="oraculo__OraculoEventSemanaCard-module__equipos___G5hLn",Q={cardContainer:Kt,cardBackground:Jt,jugadas:Xt,equipos:Qt};function We({event:t}){var s,r,l,n,a,u,d;function o(m){const h=new Date(m),C=h.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=h.getDate().toString().padStart(2,"0"),c=(h.getMonth()+1).toString().padStart(2,"0");let f=h.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return f=f.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${C} ${i}/${c} | ${f}`}return e.jsxs("div",{className:Q.cardContainer,children:[e.jsx(xe,{title:(s=t==null?void 0:t.group)!=null?s:""}),e.jsx("div",{className:Q.cardBackground,children:e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs("div",{className:Q.equipos,children:[e.jsx(te,{name:t.awayName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(fe,{text:"vs.",name:"",size:"small"}),e.jsx(te,{name:t.homeName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(qt,{text:o(t.start)})]}),e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(D,{spacing:1,children:((n=(l=(r=t==null?void 0:t.outcome)==null?void 0:r[0])==null?void 0:l.outcomes)!=null?n:[]).map((m,h)=>e.jsx(me,{text:m.label.toUpperCase()},h))}),e.jsx("div",{className:Q.jugadas,children:e.jsx(D,{spacing:1,children:((d=(u=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:u.outcomes)!=null?d:[]).map((m,h)=>e.jsx(W,{variant:"primary",fullHeight:!0,onClick:()=>{ge(m.id)},children:(m.odds/1e3).toFixed(2)},h))})})]})]})})]})}function ze({items:t,title:o="Destacados",iconUrl:s,onViewMore:r,className:l=""}){const n=I.useRef(null),[a,u]=I.useState({isStart:!0,isEnd:!1}),d=()=>{var c;(c=n.current)==null||c.prev()},m=()=>{var c;(c=n.current)==null||c.next(),console.log("items: ",t)},h=()=>{window.location.href="https://www.olimpo.bet/promociones"},C=c=>{if(!c||typeof window=="undefined")return;const k=`https://www.olimpo.bet/promociones/${encodeURIComponent(c)}`;window.location.href=k},i=l||void 0;return e.jsxs("section",{className:i,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:d,disabled:a.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:m,disabled:a.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:h,children:"Ver más"})]}),e.jsx(K,{ref:n,items:t,perPage:2,gap:"16px",options:{autoWidth:!0,gap:"12px",trimSpace:!0,pagination:!1,arrows:!1,drag:!0,focus:"start"},breakpoints:{768:{perPage:2,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:c=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>C(c.promotion),children:e.jsx("img",{src:`https://olimpo.bet${c.image!==""?c.image:c.summary_image}`,alt:c.title,style:{width:"100%",height:window.innerWidth<768?"80px":"137px",borderRadius:8,display:"block",objectFit:"cover"}})},`${c.title}-${c.image}`),onMove:({isStart:c,isEnd:f})=>u({isStart:c,isEnd:f})})]})}function Ae(t,{basePath:o="/casino",src:s,demo:r=!1,host:l="https://www.olimpo.bet"}={}){if(typeof window=="undefined")return;const n=t==null?void 0:t.machine;if(!n)return;const a=new URLSearchParams;a.set("machine",String(n)),r&&a.set("demo","1"),window.location.href=`${l}${o}?${a.toString()}`}function be({items:t,title:o="Top Juegos",iconUrl:s,onCardClick:r}){const l=I.useMemo(()=>(t!=null?t:[]).map((u,d)=>{var m;return{...u,orden:(m=u.orden)!=null?m:d+1,_originalIndex:d}}).sort((u,d)=>u.orden!=null&&d.orden!=null?u.orden-d.orden:u._originalIndex-d._originalIndex),[t]),n=!t||t.length===0,a=n?Array.from({length:6}):l.slice(0,6);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(T.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsx(E.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:a.map((u,d)=>{var m,h;return e.jsx(Re,{imageUrl:n?"":`https://olimpo.bet${(m=u.logo)!=null?m:""}`,orden:n?d+1:u.orden,loading:n,onClick:n?void 0:()=>{r?r(u):Ae(u,{basePath:"/casino"})}},n?`sk-${d}`:(h=u.machine)!=null?h:`${d}`)})})]})})}const Yt=(t,o)=>{var s,r;return(r=(s=t.orden)!=null?s:t.machine)!=null?r:o},Ge=({items:t,title:o="Casino en vivo",subtitle:s="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:r="",backgroundDesktopUrl:l="",onCardClick:n,onViewMore:a,className:u})=>(console.log("items: ",t),e.jsxs(E.default,{className:u,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(E.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),F=require("@mui/material"),I=require("react"),Oe=require("@splidejs/react-splide"),nt=require("@mui/material/Box"),at=require("@mui/material/Skeleton"),st=require("@mui/material/Typography"),rt=require("@mui/material/Stack"),Z=require("@mui/icons-material"),it=require("@mui/icons-material/ChevronLeftRounded"),ct=require("@mui/icons-material/ChevronRightRounded"),lt=require("@mui/material/useMediaQuery"),ve=require("firebase/firestore"),X=t=>t&&t.__esModule?t:{default:t},dt=X(I),E=X(nt),L=X(at),H=X(st),T=X(rt),ke=X(it),Ie=X(ct),ut=X(lt);function W({children:t,onClick:o,href:s,target:r,rel:l,type:n="button",disabled:a=!1,variant:u="primary",size:d,fullWidth:m=!1,fullHeight:h=!1,className:C="",ariaLabel:i,leftIcon:c,rightIcon:f,iconOnly:k}){const g=!!t&&t!==!0,x=(!!c?1:0)+(!!f?1:0)==1,j=k!=null?k:x&&!g,B=["orc-btn",u==="secondary"?"orc-btn--secondary":u==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",d?`orc-btn--${d}`:"",m?"orc-btn--full":"",h?"orc-btn--fullHeight":"",j?"orc-btn--iconOnly":"",C].filter(Boolean).join(" "),$=e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:"orc-btn__icon",children:c}),!j&&e.jsx("span",{className:"orc-btn__label",children:t}),f&&e.jsx("span",{className:"orc-btn__icon",children:f})]}),v=a?!0:void 0;return s?e.jsx(F.Link,{href:s,target:r,rel:l,"aria-label":i,"aria-disabled":v,tabIndex:v?-1:void 0,className:B,onClick:v?R=>R.preventDefault():o,children:$}):e.jsx("button",{type:n,onClick:o,disabled:!!v,"aria-label":i,className:B,children:$})}function q({title:t,iconUrl:o,size:s="md",className:r=""}){const n=["orc-section-title",s?`orc-section-title--${s}`:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:n,children:[o&&e.jsx("img",{src:o,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const pe=({total:t,active:o,onSelect:s,className:r=""})=>{if(t<=1)return null;const l=["orc-dots",r].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((n,a)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":a===o,"aria-label":`Ir al slide ${a+1}`,className:"orc-dots__dot"+(a===o?" orc-dots__dot--active":""),onClick:()=>s==null?void 0:s(a)})},a))})};function D({children:t,minWidth:o=32,spacing:s=2,justify:r="stretch",columns:l=null}){const n=l||`repeat(auto-fit, minmax(${o}px, 1fr))`,a=typeof s=="number"?`${s*8}px`:s;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:n,justifyItems:r,gap:a,height:"inherit"},children:t})}function de({src:t,alt:o}){return e.jsx(F.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(F.Box,{component:"img",src:t,alt:o,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}const pt="oraculo__OraculoEventTitle-module__contenedor___rg1vw",mt="oraculo__OraculoEventTitle-module__flexGroup___jMLFO",xt="oraculo__OraculoEventTitle-module__subtitle___TmHna",re={contenedor:pt,flexGroup:mt,subtitle:xt};function ft({title:t,subtitle:o}){return e.jsxs("div",{className:re.contenedor,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),o&&e.jsxs("div",{className:re.flexGroup,children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{className:re.subtitle,children:o}),e.jsx("div",{})]})]})}function Ne({text:t,color:o="#ff3b3b",textColor:s="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:o,color:s,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function $e({live:t,time:o}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(Ne,{text:"En vivo"}),o&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:o})]})}function Be({title:t,subtitle:o,live:s=!1,time:r=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(ft,{title:t,subtitle:o}),e.jsx($e,{live:s,time:r})]})}const ht="oraculo__OraculoEventLabel-module__label___c64Xw",gt={label:ht};function me({text:t}){return e.jsx("span",{className:gt.label,children:t})}const bt="oraculo__OraculoEventLeague-module__container___rdk4F",_t={container:bt};function xe({title:t}){return e.jsx("div",{className:_t.container,children:t.toUpperCase()})}const jt="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",vt="oraculo__OraculoEventScore-module__name___r4uL6",yt="oraculo__OraculoEventScore-module__score___Xl03M",wt="oraculo__OraculoEventScore-module__normal___cCNFz",St="oraculo__OraculoEventScore-module__small___fVt8E",Y={scoreWrapper:jt,name:vt,score:yt,normal:wt,small:St};function fe({text:t,name:o,size:s="normal"}){return e.jsxs("div",{className:`${Y.scoreWrapper} ${Y[s]}`,children:[e.jsx("div",{className:`${Y.score} ${Y[s]}`,children:t}),o&&e.jsx("span",{className:`${Y.name} ${Y[s]}`,children:o})]})}const Ct="oraculo__OraculoEventTeamInfo-module__team___UfpUs",Et="oraculo__OraculoEventTeamInfo-module__regular___ag826",Ot="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",kt="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",It="oraculo__OraculoEventTeamInfo-module__name___4ikm-",oe={team:Ct,regular:Et,compact:Ot,logo:kt,name:It};function te({name:t,logo:o,size:s="regular"}){return e.jsxs("div",{className:`oli-font ${oe.team} ${oe[s]}`,children:[e.jsx("img",{loading:"lazy",src:o,alt:t,className:oe.logo}),e.jsx("span",{className:oe.name,children:t})]})}const Nt=Oe.Splide,$t=Oe.SplideSlide,K=I.forwardRef(({items:t=[],renderItem:o,perPage:s=1,gap:r="0px",breakpoints:l,options:n={},className:a="",onMove:u,useIndexAsKey:d=!1},m)=>{const h=I.useRef(null);I.useImperativeHandle(m,()=>({next:()=>{var f;return(f=h.current)==null?void 0:f.go(">")},prev:()=>{var f;return(f=h.current)==null?void 0:f.go("<")},go:f=>{var k;return(k=h.current)==null?void 0:k.go(f)}}));const C=I.useCallback(f=>{const k=f.Components.Controller,g=k.getIndex(),y=k.getEnd(),S=g===0,x=g>=y,j=f.Components.Slides.getLength();u==null||u({index:g,isStart:S,isEnd:x,total:j})},[u]),i=I.useCallback(f=>{C(f)},[C]),c={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:s,gap:r,breakpoints:l,...n};return e.jsx("div",{className:a,style:{width:"100%"},children:e.jsx(Nt,{ref:h,options:c,onMove:C,onMounted:i,children:t.map((f,k)=>{var g;return e.jsx($t,{children:o(f,k)},d?k:(g=f.id)!=null?g:k)})})})}),ee=({imageUrl:t,onClick:o,size:s="sm",fillParent:r=!1})=>{const l=s==="lg"?{w:280,h:352}:{w:152,h:168},n=u=>{u.stopPropagation(),o==null||o()},a=r?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(E.default,{onClick:o,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...a,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(E.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(E.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(W,{variant:"primary",size:"md",onClick:n,children:"Jugar"})})]})};function Re({imageUrl:t,orden:o=1,onClick:s,loading:r=!1,sizes:l={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var C,i,c,f;const n=(k,g)=>{var y,S,x,j;return{xs:(S=(y=l.xs)==null?void 0:y[k])!=null?S:g,md:(j=(x=l.md)==null?void 0:x[k])!=null?j:g}},a=n("w",186),u=n("h",264),d=n("r",22.6),m=n("font",64),h={xs:Math.round(((i=(C=l.xs)==null?void 0:C.font)!=null?i:64)*.28),md:Math.round(((f=(c=l.md)==null?void 0:c.font)!=null?f:64)*.28)};return e.jsxs(E.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${a.xs}px`,md:`${a.md}px`},aspectRatio:{xs:`${a.xs}/${u.xs}`,md:`${a.md}/${u.md}`},borderRadius:{xs:`${d.xs}px`,md:`${d.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${h.xs}px`,md:`${h.md}px`},"&::before":{content:'""',position:"absolute",inset:0,borderRadius:"inherit",pointerEvents:"none",zIndex:2,background:"linear-gradient(21.29deg, #0B0D1B -1.16%, rgba(255,255,255,0) 51.92%, rgba(255,255,255,0) 127.62%)",backgroundBlendMode:"multiply"}},children:[e.jsx(E.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:r?e.jsx(L.default,{variant:"rectangular",width:"100%",height:"100%",sx:{bgcolor:"rgba(255,255,255,0.10)","&::after":{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent)"}}}):e.jsx(ee,{imageUrl:t,onClick:s,size:"lg",fillParent:!0})}),e.jsx(E.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${h.xs}px`,md:`-${h.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:o})]})}const Te=({logo:t,provider:o,providerName:s,machine:r,onClick:l})=>{var n;return e.jsxs(E.default,{onClick:l,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(E.default,{component:"img",src:t,alt:`Juego ${r!=null?r:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(E.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(H.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(n=o!=null?o:s)!=null?n:""})})]})},ie=12,ce=({r:t=16})=>e.jsx(E.default,{sx:{width:"100%",height:"100%",borderRadius:t,overflow:"hidden"},children:e.jsx(L.default,{variant:"rectangular",width:"100%",height:"100%",sx:{bgcolor:"rgba(255,255,255,0.10)","&::after":{background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent)"}}})}),he=({items:t,layout:o="grid",onClick:s,loading:r=!1,gridSkeletonCount:l=4})=>{var n,a;if(o==="mosaic"){const u=t[0];console.log("big: ",u);const d=t.slice(1,5);return e.jsxs(E.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${ie}px`,rowGap:`${ie}px`,alignItems:"stretch",justifyItems:"stretch"},children:[e.jsx(E.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):u&&e.jsx(ee,{imageUrl:`https://olimpo.bet${(a=(n=u.background)!=null?n:u.imageUrl)!=null?a:""}`,size:"lg",fillParent:!0,onClick:()=>s==null?void 0:s(u,0)})}),(r?Array.from({length:4}):d).map((m,h)=>{var C,i;return e.jsx(E.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):e.jsx(ee,{imageUrl:`https://olimpo.bet${(i=(C=m.background)!=null?C:m.imageUrl)!=null?i:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(m,h+1)})},r?`sk-${h}`:m.id)})]})}return e.jsx(E.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${ie}px`,gridAutoFlow:"column"},children:(r?Array.from({length:l}):t).map((u,d)=>{var m,h,C;return e.jsx(E.default,{sx:{overflow:"hidden",borderRadius:2},children:r?e.jsx(ce,{}):e.jsx(ee,{imageUrl:`https://olimpo.bet${(h=(m=u.background)!=null?m:u.imageUrl)!=null?h:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(u,d)})},r?`sk-${d}`:(C=u.id)!=null?C:d)})})},ue=({title:t,amount:o,subtitle:s,buttonText:r,onButtonClick:l,backgroundImage:n,alt:a,className:u="",variant:d="small"})=>{const m=o?o.slice(0,2):"",h=o?o.slice(2):"",C=d==="large";return e.jsxs(E.default,{className:u,sx:{position:"relative",width:"100%",maxWidth:{xs:328,md:C?618:456},mx:"auto"},children:[n&&e.jsx(E.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",md:C?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(E.default,{component:"img",src:n,alt:a!=null?a:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",md:"45% 0%"},display:"block"}})}),e.jsx(E.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(E.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(H.default,{sx:{fontSize:{xs:12,md:20},fontWeight:400,color:"#e7f8ff"},children:t}),o&&e.jsxs(E.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(E.default,{component:"span",sx:{fontSize:{xs:35,md:48},mr:.5},children:m}),e.jsx(E.default,{component:"span",sx:{fontSize:{xs:52,md:77}},children:h})]}),s&&e.jsx(H.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:s}),r&&e.jsx(W,{onClick:l,children:r})]})})]})},Me=({text:t,buttonLabel:o="Conoce más",onClick:s,imgAlt:r="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:n,imgSrcDesktopLogo:a})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:r,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[n&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:n,alt:`${r} fondo`,className:"orc-co-bgDesktopImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[a&&e.jsx("img",{src:a,alt:`${r} logo`,className:"orc-co-logoImg"}),e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(W,{onClick:s,variant:"primary",size:"md",children:o})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(W,{onClick:s,variant:"primary",size:"md",children:o})]})]}),Bt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",Rt="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",Tt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",Mt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",Pt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",Lt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",Ft="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",Wt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",J={card:Bt,combinadas:Rt,apuestaItem:Tt,lineContainer:Mt,circle:Pt,line:Lt,apuestaText:Ft,cuotaTotal:Wt};function ge(t){const o=Array.isArray(t)?t:[t];sessionStorage.setItem("landingOutcomes",JSON.stringify(o)),window.location.href="/deportes#in-play"}function zt(){window.location.href="/deportes#in-play"}function At(){window.location.href="/deportes#sports-hub/football"}function Gt(){window.location.href="/deportes#specials"}function Pe({event:t}){var r;function o(l){var h;const n=(h=l.betoffers)!=null?h:[],a=l.homeName,u=l.awayName,d=n.map(C=>{var k,g,y,S,x;let i=C.outcomes[0],c="",f=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(c=`Más de ${f}`,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(c=`Menos de ${f}`,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["Sí","No"].includes(i==null?void 0:i.label)?(c=i==null?void 0:i.label,i!=null&&i.participant&&(c=`${i.participant} - ${c}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?c=`${a} o Empate`:i.label==="12"?c=`${a} o ${u}`:i.label==="X2"&&(c=`${u} o Empate`):(i!=null&&i.participant?c=i.participant:c=(k=i==null?void 0:i.label)!=null?k:"",f!==""&&c===i.label&&(c=`${i.label} ${f}`)),{id:(g=i==null?void 0:i.id)!=null?g:0,value:c,label:C.criterion.label,odds:(y=i==null?void 0:i.odds)!=null?y:0,bl:(S=i==null?void 0:i.label)!=null?S:0,position:(x=i==null?void 0:i.position)!=null?x:0}}),m=d.reduce((C,i)=>C+i.odds,0)/1e3;return{outcomes:d,total:m.toFixed(2)}}const s=o(t);return e.jsxs("div",{className:J.card,children:[e.jsx("div",{className:J.combinadas,children:e.jsxs(T.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(q,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{loading:"lazy",src:"/assets/img/home/Combinadas/line.png"}),e.jsx(T.default,{direction:"column",spacing:.5,useFlexGap:!0,children:s.outcomes.sort((l,n)=>l.position-n.position).map((l,n)=>e.jsxs("div",{className:J.apuestaItem,children:[e.jsxs("div",{className:J.lineContainer,children:[e.jsx("div",{className:J.circle}),n<s.outcomes.length-1&&e.jsx("div",{className:J.line})]}),e.jsxs("div",{className:J.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},n))})]})}),e.jsxs("button",{onClick:()=>{var l,n;return ge((n=(l=s==null?void 0:s.outcomes)==null?void 0:l.map(a=>a==null?void 0:a.id))!=null?n:[])},className:J.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((r=t.combinadoTotal)!=null?r:0)/1e3).toFixed(2)})]}),e.jsx("img",{loading:"lazy",src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}const V={"orc-btn":"oraculo__OraculoButtonBet-module__orc-btn___jakza","orc-btn__label":"oraculo__OraculoButtonBet-module__orc-btn__label___zNFEH","orc-btn__icon":"oraculo__OraculoButtonBet-module__orc-btn__icon___5Rhyd","orc-btn--primary":"oraculo__OraculoButtonBet-module__orc-btn--primary___7TlJB","orc-btn--secondary":"oraculo__OraculoButtonBet-module__orc-btn--secondary___X4kJt","orc-btn--tertiary":"oraculo__OraculoButtonBet-module__orc-btn--tertiary___iS6eD","orc-btn--sm":"oraculo__OraculoButtonBet-module__orc-btn--sm___lIF2e","orc-btn--md":"oraculo__OraculoButtonBet-module__orc-btn--md___x4SI7","orc-btn--lg":"oraculo__OraculoButtonBet-module__orc-btn--lg___0BQNI","orc-btn--iconOnly":"oraculo__OraculoButtonBet-module__orc-btn--iconOnly___hQGwI","orc-btn--full":"oraculo__OraculoButtonBet-module__orc-btn--full___z-Myo","orc-btn--fullHeight":"oraculo__OraculoButtonBet-module__orc-btn--fullHeight___pCxq1"};function Ut({children:t,onClick:o,href:s,target:r,rel:l,type:n="button",disabled:a=!1,variant:u="primary",size:d,fullWidth:m=!1,fullHeight:h=!1,className:C="",ariaLabel:i,leftIcon:c,rightIcon:f,iconOnly:k}){const g=!!t&&t!==!0,x=(!!c?1:0)+(!!f?1:0)==1,j=k!=null?k:x&&!g,B=[V["orc-btn"],V[`orc-btn--${u}`],d?V[`orc-btn--${d}`]:"",m?V["orc-btn--full"]:"",h?V["orc-btn--fullHeight"]:"",j?V["orc-btn--iconOnly"]:"",C].filter(Boolean).join(" "),$=e.jsxs(e.Fragment,{children:[c&&e.jsx("span",{className:V["orc-btn__icon"],children:c}),!j&&e.jsx("span",{className:V["orc-btn__label"],children:t}),f&&e.jsx("span",{className:V["orc-btn__icon"],children:f})]}),v=a?!0:void 0;return s?e.jsx(F.Link,{href:s,target:r,rel:l,"aria-label":i,"aria-disabled":v,tabIndex:v?-1:void 0,className:B,onClick:v?R=>R.preventDefault():o,children:$}):e.jsx("button",{type:n,onClick:o,disabled:!!v,"aria-label":i,className:B,children:$})}const Dt="oraculo__OraculoEventEnVivoCard-module__cardWrapper___6b-cT",Le={cardWrapper:Dt};function Fe({event:t,liveData:o,betOffers:s}){var l,n,a,u,d,m,h,C;const r=s==null?void 0:s.find(i=>{var c;return((c=i.betOfferType)==null?void 0:c.id)===2});return e.jsx("div",{className:Le.cardWrapper,children:e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(Be,{title:(l=t.path[0].name)!=null?l:"",subtitle:t.group,live:!0,time:((n=o==null?void 0:o.matchClock)==null?void 0:n.minute)!=null?`${o.matchClock.minute}'`:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(D,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(te,{name:t.homeName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/Juventus.png"}),e.jsx(fe,{text:((u=(a=o==null?void 0:o.score)==null?void 0:a.home)!=null?u:0)+":"+((m=(d=o==null?void 0:o.score)==null?void 0:d.away)!=null?m:0),name:"En vivo"}),e.jsx(te,{name:t.awayName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/Racing.png"})]})})]}),e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(D,{spacing:1,children:((h=r==null?void 0:r.outcomes)!=null?h:[]).map((i,c)=>e.jsx(me,{text:i.label.toUpperCase()},c))}),e.jsx(D,{spacing:2,children:((C=r==null?void 0:r.outcomes)!=null?C:[]).map((i,c)=>e.jsx(Ut,{variant:"primary",disabled:i.odds==null||(r==null?void 0:r.cashOutStatus)=="SUSPENDED",onClick:()=>{ge(i.id)},children:i.odds===void 0?"":(i.odds/1e3).toFixed(2)},c))})]})]})})}const Vt="oraculo__OraculoEventDate-module__date___xhIlh",Ht={date:Vt};function qt({text:t}){return e.jsx("div",{className:`oli-font ${Ht.date}`,children:t})}const Kt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",Jt="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",Xt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Qt="oraculo__OraculoEventSemanaCard-module__equipos___G5hLn",Q={cardContainer:Kt,cardBackground:Jt,jugadas:Xt,equipos:Qt};function We({event:t}){var s,r,l,n,a,u,d;function o(m){const h=new Date(m),C=h.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=h.getDate().toString().padStart(2,"0"),c=(h.getMonth()+1).toString().padStart(2,"0");let f=h.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return f=f.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${C} ${i}/${c} | ${f}`}return e.jsxs("div",{className:Q.cardContainer,children:[e.jsx(xe,{title:(s=t==null?void 0:t.group)!=null?s:""}),e.jsx("div",{className:Q.cardBackground,children:e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs("div",{className:Q.equipos,children:[e.jsx(te,{name:t.awayName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(fe,{text:"vs.",name:"",size:"small"}),e.jsx(te,{name:t.homeName,logo:"https://stg-www.contodobet.com/static/img/landing/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(qt,{text:o(t.start)})]}),e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(D,{spacing:1,children:((n=(l=(r=t==null?void 0:t.outcome)==null?void 0:r[0])==null?void 0:l.outcomes)!=null?n:[]).map((m,h)=>e.jsx(me,{text:m.label.toUpperCase()},h))}),e.jsx("div",{className:Q.jugadas,children:e.jsx(D,{spacing:1,children:((d=(u=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:u.outcomes)!=null?d:[]).map((m,h)=>e.jsx(W,{variant:"primary",fullHeight:!0,onClick:()=>{ge(m.id)},children:(m.odds/1e3).toFixed(2)},h))})})]})]})})]})}function ze({items:t,title:o="Destacados",iconUrl:s,onViewMore:r,className:l=""}){const n=I.useRef(null),[a,u]=I.useState({isStart:!0,isEnd:!1}),d=()=>{var c;(c=n.current)==null||c.prev()},m=()=>{var c;(c=n.current)==null||c.next(),console.log("items: ",t)},h=()=>{window.location.href="https://www.olimpo.bet/promociones"},C=c=>{if(!c||typeof window=="undefined")return;const k=`https://www.olimpo.bet/promociones/${encodeURIComponent(c)}`;window.location.href=k},i=l||void 0;return e.jsxs("section",{className:i,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:d,disabled:a.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:m,disabled:a.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:h,children:"Ver más"})]}),e.jsx(K,{ref:n,items:t,perPage:2,gap:"16px",options:{autoWidth:!0,gap:"12px",trimSpace:!0,pagination:!1,arrows:!1,drag:!0,focus:"start"},breakpoints:{768:{perPage:2,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:c=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>C(c.promotion),children:e.jsx("img",{src:`https://olimpo.bet${c.image!==""?c.image:c.summary_image}`,alt:c.title,style:{width:"100%",height:window.innerWidth<768?"80px":"137px",borderRadius:8,display:"block",objectFit:"cover"}})},`${c.title}-${c.image}`),onMove:({isStart:c,isEnd:f})=>u({isStart:c,isEnd:f})})]})}function Ae(t,{basePath:o="/casino",src:s,demo:r=!1,host:l="https://www.olimpo.bet"}={}){if(typeof window=="undefined")return;const n=t==null?void 0:t.machine;if(!n)return;const a=new URLSearchParams;a.set("machine",String(n)),r&&a.set("demo","1"),window.location.href=`${l}${o}?${a.toString()}`}function be({items:t,title:o="Top Juegos",iconUrl:s,onCardClick:r}){const l=I.useMemo(()=>(t!=null?t:[]).map((u,d)=>{var m;return{...u,orden:(m=u.orden)!=null?m:d+1,_originalIndex:d}}).sort((u,d)=>u.orden!=null&&d.orden!=null?u.orden-d.orden:u._originalIndex-d._originalIndex),[t]),n=!t||t.length===0,a=n?Array.from({length:6}):l.slice(0,6);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(T.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsx(E.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:a.map((u,d)=>{var m,h;return e.jsx(Re,{imageUrl:n?"":`https://olimpo.bet${(m=u.logo)!=null?m:""}`,orden:n?d+1:u.orden,loading:n,onClick:n?void 0:()=>{r?r(u):Ae(u,{basePath:"/casino"})}},n?`sk-${d}`:(h=u.machine)!=null?h:`${d}`)})})]})})}const Yt=(t,o)=>{var s,r;return(r=(s=t.orden)!=null?s:t.machine)!=null?r:o},Ge=({items:t,title:o="Casino en vivo",subtitle:s="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:r="",backgroundDesktopUrl:l="",onCardClick:n,onViewMore:a,className:u})=>(console.log("items: ",t),e.jsxs(E.default,{className:u,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(E.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
|
|
2
2
|
linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
|
|
3
3
|
linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
|
|
4
4
|
url('${r}')
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
|
|
7
7
|
linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
|
|
8
8
|
url('${l}')
|
|
9
|
-
`},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(E.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(T.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(H.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:o}),e.jsx(H.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:s}),e.jsx(E.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(W,{variant:"primary",size:"md",onClick:()=>(a==null?void 0:a())||(window.location.href="https://www.olimpo.bet/casino-en-vivo"),children:"Ver más"})})]}),e.jsx(E.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((d,m)=>{var h;return e.jsx(Te,{logo:`https://olimpo.bet${(h=d.logo)!=null?h:""}`,provider:d.provider,providerName:d.web_name,machine:d.machine,onClick:()=>{Ae(d,{basePath:"/casino-en-vivo"})}},Yt(d,m))})}),e.jsx(E.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(W,{variant:"primary",size:"lg",onClick:()=>(a==null?void 0:a())||(window.location.href="https://www.olimpo.bet/casino-en-vivo"),children:"Ver más"})})]})]})),ne="__ORACULO_EXTRAS__";function Ue(){const t=globalThis;return t[ne]||(t[ne]={}),t[ne]}function Zt(t){Ue().extras=t}function ae(t){var o;return(o=Ue().extras)==null?void 0:o[t]}function eo(){delete globalThis[ne]}const De=(t,o)=>{var s,r;return(r=(s=t.orden)!=null?s:t.machine)!=null?r:o},to=(t,o=!0,s=4)=>{const r=t.map((a,u)=>{var d;return{id:De(a,u),imageUrl:(d=a.logo)!=null?d:"",...a.background?{background:a.background}:{}}});if(!r.length)return[];const l=[];let n=0;if(o){const a=Math.min(r.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:r.slice(0,a)}),n=a}for(;n<r.length;){const a=Math.min(n+s,r.length);l.push({id:`grid-${n}`,kind:"grid",items:r.slice(n,a)}),n=a}return l},Ve=({items:t,title:o="Casino",iconUrl:s="/assets/img/home/Casino/diamante.svg",onItemClick:r,onViewMore:l,mosaicFirst:n=!0,gridSize:a=4})=>{const u=I.useRef(null),[d,m]=I.useState({isStart:!0,isEnd:!1}),h=()=>{var g;(g=u.current)==null||g.prev()},C=()=>{var g;(g=u.current)==null||g.next()},i=()=>{window.location.href="https://www.olimpo.bet/casino"},c=(g=!0,y=4)=>{const
|
|
9
|
+
`},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(E.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(T.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(H.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:o}),e.jsx(H.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:s}),e.jsx(E.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(W,{variant:"primary",size:"md",onClick:()=>(a==null?void 0:a())||(window.location.href="https://www.olimpo.bet/casino-en-vivo"),children:"Ver más"})})]}),e.jsx(E.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((d,m)=>{var h;return e.jsx(Te,{logo:`https://olimpo.bet${(h=d.logo)!=null?h:""}`,provider:d.provider,providerName:d.web_name,machine:d.machine,onClick:()=>{Ae(d,{basePath:"/casino-en-vivo"})}},Yt(d,m))})}),e.jsx(E.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(W,{variant:"primary",size:"lg",onClick:()=>(a==null?void 0:a())||(window.location.href="https://www.olimpo.bet/casino-en-vivo"),children:"Ver más"})})]})]})),ne="__ORACULO_EXTRAS__";function Ue(){const t=globalThis;return t[ne]||(t[ne]={}),t[ne]}function Zt(t){Ue().extras=t}function ae(t){var o;return(o=Ue().extras)==null?void 0:o[t]}function eo(){delete globalThis[ne]}const De=(t,o)=>{var s,r;return(r=(s=t.orden)!=null?s:t.machine)!=null?r:o},to=(t,o=!0,s=4)=>{const r=t.map((a,u)=>{var d;return{id:De(a,u),imageUrl:(d=a.logo)!=null?d:"",...a.background?{background:a.background}:{}}});if(!r.length)return[];const l=[];let n=0;if(o){const a=Math.min(r.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:r.slice(0,a)}),n=a}for(;n<r.length;){const a=Math.min(n+s,r.length);l.push({id:`grid-${n}`,kind:"grid",items:r.slice(n,a)}),n=a}return l},Ve=({items:t,title:o="Casino",iconUrl:s="/assets/img/home/Casino/diamante.svg",onItemClick:r,onViewMore:l,mosaicFirst:n=!0,gridSize:a=4})=>{const u=I.useRef(null),[d,m]=I.useState({isStart:!0,isEnd:!1}),h=()=>{var g;(g=u.current)==null||g.prev()},C=()=>{var g;(g=u.current)==null||g.next()},i=()=>{window.location.href="https://www.olimpo.bet/casino"},c=(g=!0,y=4)=>{const S=j=>Array.from({length:j},(B,$)=>({id:`sk-${j}-${$}`,imageUrl:""})),x=[];return g&&x.push({id:"mosaic-loading",kind:"mosaic",items:S(5)}),x.push({id:"grid-loading",kind:"grid",items:S(y)}),x},f=!t||t.length===0,k=f?c(n,a):to(t,n,a);return e.jsx("section",{children:e.jsxs(T.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(E.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs(E.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(ke.default,{}),onClick:h,disabled:d.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Ie.default,{}),onClick:C,disabled:d.isEnd})]}),e.jsx(E.default,{sx:{justifySelf:"end"},children:e.jsx(W,{variant:"secondary",onClick:i,children:"Ver más"})})]}),e.jsx(K,{ref:u,items:k,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!0,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:g=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(he,{items:g.items,layout:g.kind==="mosaic"?"mosaic":"grid",loading:f,onClick:y=>{if(f)return;const S=t.find((B,$)=>String(De(B,$))===String(y.id));if(!S){console.warn("[casino] no se encontró game para id:",y.id);return}const x=ae("showIframe"),j=ae("loadMachine");x==null||x(),j==null||j(S,!1,"casino")}})}),onMove:({isStart:g,isEnd:y})=>m({isStart:g,isEnd:y})})]})})},He=(t,o)=>{var s,r;return(r=(s=t.orden)!=null?s:t.machine)!=null?r:o},oo=(t,o=!0,s=4)=>{const r=t.map((a,u)=>{var d;return{id:He(a,u),imageUrl:(d=a.logo)!=null?d:"",...a.background?{background:a.background}:{}}});if(!r.length)return[];const l=[];let n=0;if(o){const a=Math.min(r.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:r.slice(0,a)}),n=a}for(;n<r.length;){const a=Math.min(n+s,r.length);l.push({id:`grid-${n}`,kind:"grid",items:r.slice(n,a)}),n=a}return l},qe=({items:t,title:o="Virtuales",iconUrl:s="/assets/img/home/Virtuales/virtuales.svg",onItemClick:r,onViewMore:l,mosaicFirst:n=!0,gridSize:a=4})=>{const u=I.useRef(null),[d,m]=I.useState({isStart:!0,isEnd:!1}),h=()=>{var g;(g=u.current)==null||g.prev()},C=()=>{var g;(g=u.current)==null||g.next()},i=()=>{window.location.href="https://www.olimpo.bet/juegos-virtuales"},c=(g=!0,y=4)=>{const S=j=>Array.from({length:j},(B,$)=>({id:`sk-${j}-${$}`,imageUrl:""})),x=[];return g&&x.push({id:"mosaic-loading",kind:"mosaic",items:S(5)}),x.push({id:"grid-loading",kind:"grid",items:S(y)}),x},f=!t||t.length===0,k=f?c(n,a):oo(t,n,a);return e.jsx("section",{children:e.jsxs(T.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(E.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs(E.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(ke.default,{}),onClick:h,disabled:d.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Ie.default,{}),onClick:C,disabled:d.isEnd})]}),e.jsx(E.default,{sx:{justifySelf:"end"},children:e.jsx(W,{variant:"secondary",onClick:i,children:"Ver más"})})]}),e.jsx(K,{ref:u,items:k,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!0,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:g=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(he,{items:g.items,layout:g.kind==="mosaic"?"mosaic":"grid",loading:f,onClick:y=>{var B,$,v,R,M,z;const S=t.find((p,b)=>He(p,b)===y.id);if(f||!S)return;const x=ae("showIframe");x==null||x();const j=ae("openMachine");j==null||j(String(($=(B=S.name)!=null?B:S.titulo)!=null?$:"Juego"),(v=S.service)!=null?v:S.provider,(R=S.id)!=null?R:S.machine,(M=S.external_id)!=null?M:S.externalId,(z=S.product)!=null?z:S.type,!1,"virtuales")}})}),onMove:({isStart:g,isEnd:y})=>m({isStart:g,isEnd:y})})]})})},no=t=>({position:"relative",py:8,color:"#fff",backgroundImage:`
|
|
10
10
|
linear-gradient(to bottom,#121212 0%, rgba(18,18,18,0) 10%),
|
|
11
11
|
linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
|
|
12
12
|
linear-gradient(to left, #121212 0%, rgba(18,18,18,0) 10%),
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
0 0 2px rgba(255, 255, 255, .95),
|
|
17
17
|
0 0 6px rgba(255, 255, 255, .6),
|
|
18
18
|
0 1px 0 rgba(137, 137, 137, .85)
|
|
19
|
-
`},Ke=({headline:t,headline2:o,items:s,backgroundImageUrl:r})=>{const l=ut.default("(max-width: 767px)"),n=s.length>1,a=I.useRef(null),[u,d]=I.useState(0),m=s==null?void 0:s[u],h=I.useMemo(()=>{var c,f;return(f=(c=m==null?void 0:m.backgroundImageUrl)!=null?c:r)!=null?f:""},[m,r]),C=no(h),i=(c,f)=>{var y,w;const k=(y=c.headline)!=null?y:t,g=(w=c.headline2)!=null?w:o;return f?e.jsxs(E.default,{sx:{maxWidth:1200,mx:"auto",px:15,display:"grid",gridTemplateColumns:"260px minmax(0, 1fr)",alignItems:"center",columnGap:6},children:[(k||g)&&e.jsx(E.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(E.default,{sx:{...ye,textAlign:"left",mb:0},children:[k&&e.jsx(H.default,{component:"span",sx:we,children:k}),g&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(H.default,{component:"span",sx:Se,children:g})]})]})}),e.jsx(E.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(E.default,{sx:{width:"100%",maxWidth:600,mx:"auto"},children:e.jsx(ue,{...c,onButtonClick:c.onButtonClick,variant:"large"})})})]}):e.jsxs(E.default,{sx:{textAlign:"center"},children:[(k||g)&&e.jsxs(E.default,{sx:ye,children:[k&&e.jsx(H.default,{component:"span",sx:we,children:k}),g&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(H.default,{component:"span",sx:Se,children:g})]})]}),e.jsx(E.default,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(ue,{...c,onButtonClick:c.onButtonClick,variant:"small"})})]})};return e.jsxs(E.default,{component:"section",sx:C,children:[e.jsx(K,{ref:a,items:s,perPage:1,gap:"0px",options:{autoWidth:!1},renderItem:c=>e.jsx(E.default,{sx:{width:"100%"},children:i(c,!l)}),onMove:({index:c})=>{d(c)}}),n&&e.jsx(E.default,{sx:{mt:2,display:"flex",justifyContent:"center"},children:e.jsx(pe,{total:s.length,active:u,onSelect:c=>{var f;d(c),(f=a.current)==null||f.go(c)}})})]})},Je=({className:t="",fullBleed:o=!0,items:s,selectedIndex:r=0,ariaLabel:l})=>{const n=I.useRef(null),a=I.useRef(null);if(!s)return null;const u=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},d=Array.isArray(s)?s[r]:s;I.useLayoutEffect(()=>{if(!n.current||!a.current||typeof ResizeObserver=="undefined")return;const h=n.current,C=a.current,i=()=>{h.style.setProperty("--orc-co-bottomH",`${C.offsetHeight+16}px`)},c=new ResizeObserver(i);return c.observe(C),i(),()=>c.disconnect()},[]);const m=["orc-co-wrap",o?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:n,className:m,"aria-label":l||d.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:a,children:e.jsx(Me,{text:d.text,onClick:u,imgAlt:d.imgAlt,imgSrcMobile:d.imgMobile,imgSrcDesktopBg:d.imgDesktopBg,imgSrcDesktopLogo:d.imgDesktopLogo})})})},ao="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",so={controls:ao};function Xe({items:t,title:o="Combinadas del Olimpo",iconUrl:s="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:r,className:l=""}){const n=I.useRef(null),[a,u]=I.useState({isStart:!0,isEnd:!1}),[d,m]=I.useState([]),h="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group/prepackcoupon.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764284658793&prePackCouponTags=CUSTOM",C=()=>{var x;(x=n.current)==null||x.prev()},i=()=>{var x;(x=n.current)==null||x.next()},c=()=>{Gt()};async function f(){var x,v,$;try{const j=await(await fetch(h)).json(),R=($=(v=(x=j==null?void 0:j.group)==null?void 0:x.groups)==null?void 0:v[0])==null?void 0:$.id;if(!R){console.error("Could not extract group ID");return}const M=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${R}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,p=await(await fetch(M)).json();m(k(p.events,p.betOffers,p.prePackCoupons))}catch(B){console.error("loadDataEventSpecial error:",B)}}function k(x,v,$){const B=[];for(const j of $){const R=y([j]),M=g(j),z=v.reduce((p,b)=>{var _,S;p[b.eventId]||(p[b.eventId]=[]);const O=b.outcomes.filter(N=>R.has(N.id));if(O.length>0){const N=Array.from((S=(_=M==null?void 0:M[0])==null?void 0:_.requiredOutcomeIds)!=null?S:[]),P=O.map(A=>({...A,position:N.indexOf(A.id)}));p[b.eventId].push({...b,outcomes:P})}return p},{});x.forEach(p=>{if(p.id!==j.prePackCouponRows[0].eventId)return;const b=R;let O=null;for(const _ of M)if([..._.requiredOutcomeIds].every(N=>b.has(N))){O=_.decimal;break}B.push({...p,combinadoTotal:O,betoffers:z[p.id]||[],couponId:j.id})})}return B}function g(x){var $;const v=[];for(const B of x.prePackCouponRows)if(B.type==="BET_BUILDER"&&(($=B.group)!=null&&$.groups)){const j=new Set;B.group.groups.forEach(R=>{var M;(M=R.outcomes)==null||M.forEach(z=>j.add(z.id))}),v.push({requiredOutcomeIds:j,decimal:B.odds.decimal})}return v}function y(x){var $;const v=new Set;for(const B of x)for(const j of B.prePackCouponRows)j.type==="BET_BUILDER"&&(($=j.group)!=null&&$.groups)&&j.group.groups.forEach(R=>{var M;(M=R.outcomes)==null||M.forEach(z=>v.add(z.id))}),j.type==="SIMPLE"&&j.outcome&&v.add(j.outcome.id);return v}I.useEffect(()=>{f()},[]);const w=l||void 0;return!d||d.length===0?null:e.jsx("section",{className:w,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(D,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{className:so.controls,children:[e.jsxs(D,{spacing:1,columns:"auto auto",children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:C,disabled:a.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:i,disabled:a.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(K,{ref:n,items:d.filter(x=>x.combinadoTotal!==null),perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:x=>e.jsx(Pe,{event:x}),onMove:({isStart:x,isEnd:v})=>u({isStart:x,isEnd:v})})]})})}function ro({}){return e.jsx("div",{className:Le.cardWrapper,children:e.jsxs(T.default,{direction:"column",spacing:1,children:[e.jsxs(T.default,{spacing:1,direction:"row",children:[e.jsx(L.default,{variant:"text",width:"60%",height:24}),e.jsx(L.default,{variant:"text",width:"39%",height:24})]}),e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"circular",width:32,height:40}),e.jsx(L.default,{variant:"text",width:40,height:40}),e.jsx(L.default,{variant:"circular",width:32,height:40})]}),e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"text",width:32,height:16}),e.jsx(L.default,{variant:"text",width:40,height:16}),e.jsx(L.default,{variant:"text",width:32,height:16})]}),e.jsxs(T.default,{spacing:2,direction:"row",children:[e.jsx(L.default,{variant:"rounded",width:88,height:16}),e.jsx(L.default,{variant:"rounded",width:88,height:16}),e.jsx(L.default,{variant:"rounded",width:88,height:16})]}),e.jsxs(T.default,{spacing:2,direction:"row",children:[e.jsx(L.default,{variant:"rounded",width:88,height:32}),e.jsx(L.default,{variant:"rounded",width:88,height:32}),e.jsx(L.default,{variant:"rounded",width:88,height:32})]})]})})}const io="oraculo__FadeItemWrapper-module__fadeWrapper___kFOH4",co={fadeWrapper:io};function se({children:t}){return e.jsx("div",{className:co.fadeWrapper,children:t})}function Qe({items:t,title:o="En vivo",iconUrl:s="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:r,className:l=""}){const n="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football/all/all/all/in-play.json?channel_id=3&channel_id=3&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true",a=I.useRef(null),[u,d]=I.useState({isStart:!0,isEnd:!1}),[m,h]=I.useState([]),C=()=>{var y;(y=a.current)==null||y.prev()},i=()=>{var y;(y=a.current)==null||y.next()},c=()=>{zt()};async function f(){try{const w=await(await fetch(n)).json();h(w.events)}catch(y){console.error(y)}}I.useEffect(()=>{f();const y=setInterval(()=>{f()},2e4);return()=>clearInterval(y)},[]);const k=l||void 0,g=!m||m.length===0;return e.jsx("section",{className:k,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(D,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(D,{spacing:1,columns:"auto auto",children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:C,disabled:u.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:i,disabled:u.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(K,{ref:a,items:g?Array(4).fill({}):m==null?void 0:m.filter(y=>y.event.sport==="FOOTBALL").sort((y,w)=>new Date(w.event.start).getTime()-new Date(y.event.start).getTime()),perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{400:{gap:"4px",focus:"center"},768:{gap:"8px",focus:"center"},1024:{gap:"10px",focus:"center"}},renderItem:y=>g?e.jsx(se,{children:e.jsx(ro,{})}):e.jsx(se,{children:e.jsx(Fe,{...y})}),onMove:({isStart:y,isEnd:w})=>d({isStart:y,isEnd:w})})]})})}function lo(){return e.jsxs("div",{className:Q.cardContainer,children:[e.jsx(xe,{title:""}),e.jsx("div",{className:Q.cardBackground,children:e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"circular",width:48,height:48}),e.jsx(L.default,{variant:"circular",width:48,height:48})]}),e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"text",width:80,height:12}),e.jsx(L.default,{variant:"text",width:80,height:12})]}),e.jsx(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:e.jsx(L.default,{variant:"text",width:160,height:12})}),e.jsxs(T.default,{direction:"row",spacing:1,children:[e.jsx(L.default,{variant:"text",width:80,height:16}),e.jsx(L.default,{variant:"text",width:80,height:16}),e.jsx(L.default,{variant:"text",width:80,height:16})]}),e.jsx("div",{className:Q.jugadas,children:e.jsxs(T.default,{direction:"row",spacing:1,children:[e.jsx(L.default,{variant:"rounded",width:80,height:32}),e.jsx(L.default,{variant:"rounded",width:80,height:32}),e.jsx(L.default,{variant:"rounded",width:80,height:32})]})})]})]})})]})}const uo="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",po="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",mo="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",le={wrapper:uo,container:po,buttonWrapper:mo};function Ye({items:t,title:o="En vivo",iconUrl:s,onViewMore:r,className:l=""}){const n="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",a=I.useRef(null),[u,d]=I.useState({isStart:!0,isEnd:!1}),[m,h]=I.useState([]);function C(x){return[...x].sort((v,$)=>new Date(v.start).getTime()-new Date($.start).getTime())}function i(x){const v=new Date,$=new Date(v.getTime()+10080*60*1e3);return x.filter(B=>{if(!B.start)return!1;const j=new Date(B.start);return j>=v&&j<=$})}const c=()=>{At()};async function f(){try{const $=(await(await fetch(n)).json()).group.groups.find(z=>z.englishName==="Football");if(!$||!Array.isArray($.groups)){console.error("Football groups not found");return}const j=$.groups.slice(0,5),R=z=>{const p="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(z.groups&&z.groups.length>0){const b=z.groups[0];return[`${p}/${z.termKey}/${b.termKey}/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]}return[`${p}/${z.termKey}/all/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]},M=j.flatMap(R);k(M)}catch(x){console.error(x)}}async function k(x){try{const v=await Promise.all(x.map(R=>fetch(R).then(M=>M.json())));let $=[],B=[];v.forEach(R=>{R.events&&($.push(...R.events.map(M=>M.event)),B.push(...R.events.flatMap(M=>M.betOffers||[])))});const j=g($,B);h(C(i(j)))}catch(v){console.error("Error loading events:",v)}}function g(x,v){const B=v.filter(j=>{var R;return((R=j.betOfferType)==null?void 0:R.id)===2}).reduce((j,R)=>(j[R.eventId]||(j[R.eventId]=[]),j[R.eventId].push(R),j),{});return x.filter(j=>B[j.id]).map(j=>({...j,outcome:B[j.id]}))}I.useEffect(()=>{t&&f()},[t]);const y=l||void 0,w=!m||m.length===0;return e.jsx("section",{className:y,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs("div",{className:le.wrapper,children:[e.jsx("div",{className:le.container,children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(q,{title:"Eventos de la semana"}),e.jsx("div",{className:le.buttonWrapper,children:e.jsx(W,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{c()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:"180px"},children:e.jsx(K,{ref:a,items:w?Array(6).fill({}):m,perPage:3.5,gap:"16px",options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:x=>w?e.jsx(se,{children:e.jsx(lo,{})}):e.jsx(se,{children:e.jsx(We,{event:x})}),onMove:({isStart:x,isEnd:v})=>d({isStart:x,isEnd:v})})})]})})}function Ze({backgrounds:t,items:o}){const[s,r]=I.useState(0),l=(t==null?void 0:t.length)||1;return e.jsxs(F.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(F.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(K,{items:t,perPage:0,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:n})=>r(n),renderItem:n=>{var a;return e.jsxs(F.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(F.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:n.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:n.mobileSrc,media:"(max-width:799px)"}),e.jsx(F.Box,{component:"img",src:(a=n.fallbackSrc)!=null?a:n.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(F.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(F.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(pe,{total:l,active:s})})]}),e.jsx(F.Box,{sx:{position:"absolute",bottom:{xs:0,sm:12},left:120,right:120,"@media (max-width:1024px)":{left:24,right:24},backgroundColor:"#363636",borderRadius:2,p:1.5,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:o==null?void 0:o.map(n=>e.jsxs(F.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:n.onClick||n.href?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var a;if(n.onClick)return n.onClick();if(n.href)return window.location.href=(a=n.href)!=null?a:"/#"},children:[n.icon&&e.jsx(F.Box,{component:"img",src:n.icon,alt:n.label||`icon-${n.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(F.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:n.label})]},n.id))})]})}const xo=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function et({title:t="Medios de pago",rows:o=xo}){const s=o.flat();return e.jsxs(F.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(F.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(F.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(F.Box,{sx:{display:{xs:"block",md:"none"}},children:o.map((r,l)=>e.jsx(F.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:r.map(n=>e.jsx(de,{...n},`${n.src}-${n.alt}`))},l))}),e.jsx(F.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:s.map(r=>e.jsx(de,{...r},`${r.src}-${r.alt}`))})]})}const fo={OraculoSeccionDestacados:ze,OraculoSeccionTopJuegos:be,OraculoSeccionCasinoEnVivo:Ge,OraculoSeccionCasino:Ve,OraculoSeccionVirtuales:qe,OraculoSeccionClubOlimpo:Je,OraculoSeccionBonoBienvenida:Ke,OraculoSeccionBanners:Ze,OraculoSeccionMediosPago:et,OraculoSeccionEventoEnVivo:Qe,OraculoSeccionEventoSemana:Ye,OraculoSeccionEventoCombinadas:Xe},ho=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,go=t=>/^OraculoSeccion[A-Z]/.test(t),bo=Object.fromEntries(Object.entries(fo).filter(([t,o])=>go(t)&&ho(o))),_o=t=>{try{return Object.fromEntries(t!=null?t:[])}catch{return console.warn("[oraculo] extras inválidos. Debe ser Array<[string, unknown]>",t),{}}};class Ce extends Error{constructor(o,s,r){super(`HTTP ${o} ${r}`),this.status=o,this.url=s,this.statusText=r,this.name="HttpError"}}const Ee=["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"],tt=({sectionsOverride:t,docId:o="home",db:s,extras:r})=>{const l=I.useMemo(()=>_o(r),[r]),n=l.loader;l.openMachine,I.useMemo(()=>p=>l[p],[l]);const[a,u]=I.useState([]),[d,m]=I.useState(!1),[h,C]=I.useState({}),[i,c]=I.useState({}),[f,k]=I.useState({}),g=F.useMediaQuery("(min-width:1024px)");I.useEffect(()=>{if(t||!s)return;m(!0);const p=ve.onSnapshot(ve.doc(s,"landings",o),b=>{var O;try{let _=b.exists()?((O=b.data())==null?void 0:O.sections)||[]:[];_=_.slice().sort((S,N)=>{var P,A;return((P=S.order)!=null?P:0)-((A=N.order)!=null?A:0)}).map((S,N)=>({...S,order:N+1})),u(_),console.log("fetched: ",_)}catch(_){console.error("Error procesando landings/"+o,_)}finally{m(!1)}},b=>{console.error("Error escuchando landings/"+o,b),m(!1)});return()=>p()},[t,o,s]),I.useEffect(()=>(console.log("[oraculo preview] extras keys:",Object.keys(l)),console.log("[oraculo preview] openMachine typeof:",typeof l.openMachine),console.log("[oraculo preview] openMachine value:",l.openMachine),Zt(l),()=>eo()),[l]),I.useEffect(()=>{(t?t.slice():a.slice()).map(O=>O.componentKey).filter(O=>!!O).length},[t,a]);const y=async p=>{if(Ee.includes(p.componentKey))return{items:[],events:[],data:{}};const b=(p.apiUrl||"").trim();if(!b)return;const O=p.apiMethod||"GET",_=p.apiParams||[];let S=b,N,P;if(O==="GET"){const U=new URL(b,typeof window=="undefined"?"http://localhost":window.location.origin);for(const G of _)G.key&&U.searchParams.append(G.key,G.value);S=U.toString()}else{const U=new URLSearchParams;for(const G of _)G.key&&U.append(G.key,G.value);N=U.toString(),P={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const A=await fetch(S,{method:O,headers:P,body:N});if(!A.ok)throw new Ce(A.status,S,A.statusText);return A.json()},w=I.useMemo(()=>t?t.slice():a.slice(),[t,a]),x=dt.default.useRef(new Set);I.useEffect(()=>{const p=w.map(b=>({s:b,url:(b.apiUrl||"").trim()})).filter(({url:b})=>!!b);if(p.length)for(const{s:b,url:O}of p){const _=`${b.id}|${O}`;x.current.has(_)||(x.current.add(_),c(S=>({...S,[b.id]:!0})),k(S=>({...S,[b.id]:""})),(async()=>{try{const S=await y(b);C(N=>({...N,[b.id]:S}))}catch(S){let N="Error desconocido";S instanceof Ce?N=`Error HTTP ${S.status} (${S.statusText}) en ${S.url}`:S instanceof SyntaxError?N="Respuesta no es JSON válido":S instanceof TypeError?N="Fallo de red / CORS / conexión":typeof S=="string"&&(N=S.toString()),k(P=>({...P,[b.id]:N}))}finally{c(S=>({...S,[b.id]:!1}))}})())}},[w]);const v=I.useMemo(()=>w.filter(p=>p.visible).sort((p,b)=>p.order-b.order),[w]),$=p=>Array.isArray(p)?p.map(b=>{const O={};for(const _ of b.fields||[]){const S=(_.type||"string").toLowerCase();if(S==="number"){const N=String(_.value||"").trim();if(N!==""){const P=Number(N);Number.isNaN(P)||(O[_.name]=P)}}else if(S==="boolean")O[_.name]=String(_.value).toLowerCase()==="true";else if(S==="function"){const N=String(_.value||"").trim();if(N)try{const P=new Function(N);O[_.name]=P}catch(P){console.error(`❌ Error creando función en item '${_.name}':`,P)}}else O[_.name]=_.value}return O}):[],B=p=>{const b={};if(!Array.isArray(p))return b;for(const O of p){if(!O.name)continue;const _=(O.type||"string").toLowerCase();if(_==="number"){const S=String(O.value||"").trim();if(S!==""){const N=Number(S);Number.isNaN(N)||(b[O.name]=N)}}else if(_==="boolean")b[O.name]=String(O.value).toLowerCase()==="true";else if(_==="function"){const S=String(O.value||"").trim();if(S)try{const N=new Function(S);b[O.name]=N}catch(N){console.error(`❌ Error creando función en item '${O.name}':`,N)}}else b[O.name]=O.value}return b},j=(p,b,O)=>{const _=O?{...O}:{};if(b){const G=(b.variableName||"items").trim()||"items";return _[G]=b.arr||[],_}const S=p,N=Array.isArray(S),P=!N&&typeof S=="object"&&S!==null?S:void 0,A=P&&Array.isArray(P.lobby||P.items)?P.lobby||P.items:void 0,U=G=>N?S:A||G;return _.items=U(A||[]),_},R=p=>{var N;const b=!!((N=p.apiUrl)!=null&&N.trim()),O=b?h[p.id]:void 0;let _=p.props?{...p.props}:{};const S=B(p.manualScalarFields);if(Ee.includes(p.componentKey))return{items:O,..._,...S};if(_={..._,...S},b)_=j(O,null,_);else if(p.dataMode==="manual"){const P=$(p.manualItems);if(_=j(null,{arr:P,variableName:p.variableName},_),p.variableName2&&p.manualItems2){const A=$(p.manualItems2),U=(p.variableName2||"items2").trim()||"items2";_[U]=A}}return _},M=(p,b,O)=>{const _={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${_[b]}`,children:O},p)},z=p=>{var je;const b=p.componentKey,O=bo[b];if(!O)return console.warn(`No hay componente registrado para "${b}"`),M(p.id,"component",`Componente "${b}" no encontrado`);const _=!!((je=p.apiUrl)!=null&&je.trim()),S=_?h[p.id]:void 0,N=_?!!i[p.id]:!1,P=_?f[p.id]:"";if(_){if(N&&!S)return M(p.id,"loading",`Cargando datos desde ${p.apiUrl}...`);if(P&&!S)return M(p.id,"error",`Error cargando ${p.apiUrl}: ${P}`)}const A=R(p),G=new Set(["OraculoSeccionBanners","OraculoSeccionBonoBienvenida","OraculoSeccionCasinoEnVivo",g?"":"OraculoSeccionClubOlimpo"]).has(p.componentKey),_e=g?120:24,ot=G?{width:"100%",boxSizing:"border-box"}:{paddingLeft:_e,paddingRight:_e,width:"100%",boxSizing:"border-box"};return e.jsx("div",{style:ot,children:e.jsx(O,{...A})},p.id)};return d&&!t?n?e.jsx(n,{}):e.jsx("div",{children:"Cargando..."}):!d&&!t&&a.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(F.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(F.Stack,{direction:"column",spacing:g?8:5,useFlexGap:!0,children:v.map(z)})})};exports.OraculoButton=W;exports.OraculoCarousel=K;exports.OraculoCarouselDots=pe;exports.OraculoClubOlimpoVisual=Me;exports.OraculoEventCombinadasCard=Pe;exports.OraculoEventEnVivoCard=Fe;exports.OraculoEventHeader=Be;exports.OraculoEventLabel=me;exports.OraculoEventLeague=xe;exports.OraculoEventScore=fe;exports.OraculoEventSemanaCard=We;exports.OraculoEventStatus=$e;exports.OraculoEventStatusBadge=Ne;exports.OraculoEventTeamInfo=te;exports.OraculoGameCard=ee;exports.OraculoGameRankCard=Re;exports.OraculoGameSlide=he;exports.OraculoGridGroup=D;exports.OraculoLiveCasinoCard=Te;exports.OraculoLogoMediosPago=de;exports.OraculoPageLandingPreview=tt;exports.OraculoSeccionBanners=Ze;exports.OraculoSeccionBonoBienvenida=Ke;exports.OraculoSeccionCasino=Ve;exports.OraculoSeccionCasinoEnVivo=Ge;exports.OraculoSeccionClubOlimpo=Je;exports.OraculoSeccionDestacados=ze;exports.OraculoSeccionEventoCombinadas=Xe;exports.OraculoSeccionEventoEnVivo=Qe;exports.OraculoSeccionEventoSemana=Ye;exports.OraculoSeccionMediosPago=et;exports.OraculoSeccionTopJuegos=be;exports.OraculoSeccionVirtuales=qe;exports.OraculoSectionTitle=q;exports.OraculoTopJuegoItem=be;exports.OraculoWelcomeBanner=ue;exports.default=tt;
|
|
19
|
+
`},Ke=({headline:t,headline2:o,items:s,backgroundImageUrl:r})=>{const l=ut.default("(max-width: 767px)"),n=s.length>1,a=I.useRef(null),[u,d]=I.useState(0),m=s==null?void 0:s[u],h=I.useMemo(()=>{var c,f;return(f=(c=m==null?void 0:m.backgroundImageUrl)!=null?c:r)!=null?f:""},[m,r]),C=no(h),i=(c,f)=>{var y,S;const k=(y=c.headline)!=null?y:t,g=(S=c.headline2)!=null?S:o;return f?e.jsxs(E.default,{sx:{maxWidth:1200,mx:"auto",px:15,display:"grid",gridTemplateColumns:"260px minmax(0, 1fr)",alignItems:"center",columnGap:6},children:[(k||g)&&e.jsx(E.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(E.default,{sx:{...ye,textAlign:"left",mb:0},children:[k&&e.jsx(H.default,{component:"span",sx:we,children:k}),g&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(H.default,{component:"span",sx:Se,children:g})]})]})}),e.jsx(E.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(E.default,{sx:{width:"100%",maxWidth:600,mx:"auto"},children:e.jsx(ue,{...c,onButtonClick:c.onButtonClick,variant:"large"})})})]}):e.jsxs(E.default,{sx:{textAlign:"center"},children:[(k||g)&&e.jsxs(E.default,{sx:ye,children:[k&&e.jsx(H.default,{component:"span",sx:we,children:k}),g&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(H.default,{component:"span",sx:Se,children:g})]})]}),e.jsx(E.default,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(ue,{...c,onButtonClick:c.onButtonClick,variant:"small"})})]})};return e.jsxs(E.default,{component:"section",sx:C,children:[e.jsx(K,{ref:a,items:s,perPage:1,gap:"0px",options:{autoWidth:!1},renderItem:c=>e.jsx(E.default,{sx:{width:"100%"},children:i(c,!l)}),onMove:({index:c})=>{d(c)}}),n&&e.jsx(E.default,{sx:{mt:2,display:"flex",justifyContent:"center"},children:e.jsx(pe,{total:s.length,active:u,onSelect:c=>{var f;d(c),(f=a.current)==null||f.go(c)}})})]})},Je=({className:t="",fullBleed:o=!0,items:s,selectedIndex:r=0,ariaLabel:l})=>{const n=I.useRef(null),a=I.useRef(null);if(!s)return null;const u=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},d=Array.isArray(s)?s[r]:s;I.useLayoutEffect(()=>{if(!n.current||!a.current||typeof ResizeObserver=="undefined")return;const h=n.current,C=a.current,i=()=>{h.style.setProperty("--orc-co-bottomH",`${C.offsetHeight+16}px`)},c=new ResizeObserver(i);return c.observe(C),i(),()=>c.disconnect()},[]);const m=["orc-co-wrap",o?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:n,className:m,"aria-label":l||d.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:a,children:e.jsx(Me,{text:d.text,onClick:u,imgAlt:d.imgAlt,imgSrcMobile:d.imgMobile,imgSrcDesktopBg:d.imgDesktopBg,imgSrcDesktopLogo:d.imgDesktopLogo})})})},ao="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",so={controls:ao};function Xe({items:t,title:o="Combinadas del Olimpo",iconUrl:s="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:r,className:l=""}){const n=I.useRef(null),[a,u]=I.useState({isStart:!0,isEnd:!1}),[d,m]=I.useState([]),h="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group/prepackcoupon.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764284658793&prePackCouponTags=CUSTOM",C=()=>{var x;(x=n.current)==null||x.prev()},i=()=>{var x;(x=n.current)==null||x.next()},c=()=>{Gt()};async function f(){var x,j,B;try{const v=await(await fetch(h)).json(),R=(B=(j=(x=v==null?void 0:v.group)==null?void 0:x.groups)==null?void 0:j[0])==null?void 0:B.id;if(!R){console.error("Could not extract group ID");return}const M=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${R}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,p=await(await fetch(M)).json();m(k(p.events,p.betOffers,p.prePackCoupons))}catch($){console.error("loadDataEventSpecial error:",$)}}function k(x,j,B){const $=[];for(const v of B){const R=y([v]),M=g(v),z=j.reduce((p,b)=>{var _,w;p[b.eventId]||(p[b.eventId]=[]);const O=b.outcomes.filter(N=>R.has(N.id));if(O.length>0){const N=Array.from((w=(_=M==null?void 0:M[0])==null?void 0:_.requiredOutcomeIds)!=null?w:[]),P=O.map(A=>({...A,position:N.indexOf(A.id)}));p[b.eventId].push({...b,outcomes:P})}return p},{});x.forEach(p=>{if(p.id!==v.prePackCouponRows[0].eventId)return;const b=R;let O=null;for(const _ of M)if([..._.requiredOutcomeIds].every(N=>b.has(N))){O=_.decimal;break}$.push({...p,combinadoTotal:O,betoffers:z[p.id]||[],couponId:v.id})})}return $}function g(x){var B;const j=[];for(const $ of x.prePackCouponRows)if($.type==="BET_BUILDER"&&((B=$.group)!=null&&B.groups)){const v=new Set;$.group.groups.forEach(R=>{var M;(M=R.outcomes)==null||M.forEach(z=>v.add(z.id))}),j.push({requiredOutcomeIds:v,decimal:$.odds.decimal})}return j}function y(x){var B;const j=new Set;for(const $ of x)for(const v of $.prePackCouponRows)v.type==="BET_BUILDER"&&((B=v.group)!=null&&B.groups)&&v.group.groups.forEach(R=>{var M;(M=R.outcomes)==null||M.forEach(z=>j.add(z.id))}),v.type==="SIMPLE"&&v.outcome&&j.add(v.outcome.id);return j}I.useEffect(()=>{f()},[]);const S=l||void 0;return!d||d.length===0?null:e.jsx("section",{className:S,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(D,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{className:so.controls,children:[e.jsxs(D,{spacing:1,columns:"auto auto",children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:C,disabled:a.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:i,disabled:a.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(K,{ref:n,items:d.filter(x=>x.combinadoTotal!==null),perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:x=>e.jsx(Pe,{event:x}),onMove:({isStart:x,isEnd:j})=>u({isStart:x,isEnd:j})})]})})}function ro({}){return e.jsx("div",{className:Le.cardWrapper,children:e.jsxs(T.default,{direction:"column",spacing:1,children:[e.jsxs(T.default,{spacing:1,direction:"row",children:[e.jsx(L.default,{variant:"text",width:"60%",height:24}),e.jsx(L.default,{variant:"text",width:"39%",height:24})]}),e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"circular",width:32,height:40}),e.jsx(L.default,{variant:"text",width:40,height:40}),e.jsx(L.default,{variant:"circular",width:32,height:40})]}),e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"text",width:32,height:16}),e.jsx(L.default,{variant:"text",width:40,height:16}),e.jsx(L.default,{variant:"text",width:32,height:16})]}),e.jsxs(T.default,{spacing:2,direction:"row",children:[e.jsx(L.default,{variant:"rounded",width:88,height:16}),e.jsx(L.default,{variant:"rounded",width:88,height:16}),e.jsx(L.default,{variant:"rounded",width:88,height:16})]}),e.jsxs(T.default,{spacing:2,direction:"row",children:[e.jsx(L.default,{variant:"rounded",width:88,height:32}),e.jsx(L.default,{variant:"rounded",width:88,height:32}),e.jsx(L.default,{variant:"rounded",width:88,height:32})]})]})})}const io="oraculo__FadeItemWrapper-module__fadeWrapper___kFOH4",co={fadeWrapper:io};function se({children:t}){return e.jsx("div",{className:co.fadeWrapper,children:t})}function Qe({items:t,title:o="En vivo",iconUrl:s="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:r,className:l=""}){const n="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football/all/all/all/in-play.json?channel_id=3&channel_id=3&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true",a=I.useRef(null),[u,d]=I.useState({isStart:!0,isEnd:!1}),[m,h]=I.useState([]),C=()=>{var y;(y=a.current)==null||y.prev()},i=()=>{var y;(y=a.current)==null||y.next()},c=()=>{zt()};async function f(){try{const S=await(await fetch(n)).json();h(S.events)}catch(y){console.error(y)}}I.useEffect(()=>{f();const y=setInterval(()=>{f()},2e4);return()=>clearInterval(y)},[]);const k=l||void 0,g=!m||m.length===0;return e.jsx("section",{className:k,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(D,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(q,{title:o,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(D,{spacing:1,columns:"auto auto",children:[e.jsx(W,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(Z.ChevronLeftRounded,{}),onClick:C,disabled:u.isStart}),e.jsx(W,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(Z.ChevronRightRounded,{}),onClick:i,disabled:u.isEnd})]}),e.jsx(W,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(K,{ref:a,items:g?Array(4).fill({}):m==null?void 0:m.filter(y=>y.event.sport==="FOOTBALL").sort((y,S)=>new Date(S.event.start).getTime()-new Date(y.event.start).getTime()),perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{400:{gap:"4px",focus:"center"},768:{gap:"8px",focus:"center"},1024:{gap:"10px",focus:"center"}},renderItem:y=>g?e.jsx(se,{children:e.jsx(ro,{})}):e.jsx(se,{children:e.jsx(Fe,{...y})}),onMove:({isStart:y,isEnd:S})=>d({isStart:y,isEnd:S})})]})})}function lo(){return e.jsxs("div",{className:Q.cardContainer,children:[e.jsx(xe,{title:""}),e.jsx("div",{className:Q.cardBackground,children:e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"circular",width:48,height:48}),e.jsx(L.default,{variant:"circular",width:48,height:48})]}),e.jsxs(T.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:[e.jsx(L.default,{variant:"text",width:80,height:12}),e.jsx(L.default,{variant:"text",width:80,height:12})]}),e.jsx(T.default,{spacing:8,direction:"row",justifyContent:"center",alignItems:"center",children:e.jsx(L.default,{variant:"text",width:160,height:12})}),e.jsxs(T.default,{direction:"row",spacing:1,children:[e.jsx(L.default,{variant:"text",width:80,height:16}),e.jsx(L.default,{variant:"text",width:80,height:16}),e.jsx(L.default,{variant:"text",width:80,height:16})]}),e.jsx("div",{className:Q.jugadas,children:e.jsxs(T.default,{direction:"row",spacing:1,children:[e.jsx(L.default,{variant:"rounded",width:80,height:32}),e.jsx(L.default,{variant:"rounded",width:80,height:32}),e.jsx(L.default,{variant:"rounded",width:80,height:32})]})})]})]})})]})}const uo="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",po="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",mo="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",le={wrapper:uo,container:po,buttonWrapper:mo};function Ye({items:t,title:o="En vivo",iconUrl:s,onViewMore:r,className:l=""}){const n="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",a=I.useRef(null),[u,d]=I.useState({isStart:!0,isEnd:!1}),[m,h]=I.useState([]);function C(x){return[...x].sort((j,B)=>new Date(j.start).getTime()-new Date(B.start).getTime())}function i(x){const j=new Date,B=new Date(j.getTime()+10080*60*1e3);return x.filter($=>{if(!$.start)return!1;const v=new Date($.start);return v>=j&&v<=B})}const c=()=>{At()};async function f(){try{const B=(await(await fetch(n)).json()).group.groups.find(z=>z.englishName==="Football");if(!B||!Array.isArray(B.groups)){console.error("Football groups not found");return}const v=B.groups.slice(0,5),R=z=>{const p="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(z.groups&&z.groups.length>0){const b=z.groups[0];return[`${p}/${z.termKey}/${b.termKey}/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]}return[`${p}/${z.termKey}/all/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]},M=v.flatMap(R);k(M)}catch(x){console.error(x)}}async function k(x){try{const j=await Promise.all(x.map(R=>fetch(R).then(M=>M.json())));let B=[],$=[];j.forEach(R=>{R.events&&(B.push(...R.events.map(M=>M.event)),$.push(...R.events.flatMap(M=>M.betOffers||[])))});const v=g(B,$);h(C(i(v)))}catch(j){console.error("Error loading events:",j)}}function g(x,j){const $=j.filter(v=>{var R;return((R=v.betOfferType)==null?void 0:R.id)===2}).reduce((v,R)=>(v[R.eventId]||(v[R.eventId]=[]),v[R.eventId].push(R),v),{});return x.filter(v=>$[v.id]).map(v=>({...v,outcome:$[v.id]}))}I.useEffect(()=>{t&&f()},[t]);const y=l||void 0,S=!m||m.length===0;return e.jsx("section",{className:y,style:{width:"100%",boxSizing:"border-box"},children:e.jsxs("div",{className:le.wrapper,children:[e.jsx("div",{className:le.container,children:e.jsxs(T.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(q,{title:"Eventos de la semana"}),e.jsx("div",{className:le.buttonWrapper,children:e.jsx(W,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{c()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:"180px"},children:e.jsx(K,{ref:a,items:S?Array(6).fill({}):m,perPage:3.5,gap:"16px",options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:x=>S?e.jsx(se,{children:e.jsx(lo,{})}):e.jsx(se,{children:e.jsx(We,{event:x})}),onMove:({isStart:x,isEnd:j})=>d({isStart:x,isEnd:j})})})]})})}function Ze({backgrounds:t,items:o}){const[s,r]=I.useState(0),l=(t==null?void 0:t.length)||1;return e.jsxs(F.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(F.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(K,{items:t,perPage:0,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:n})=>r(n),renderItem:n=>{var a;return e.jsxs(F.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(F.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:n.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:n.mobileSrc,media:"(max-width:799px)"}),e.jsx(F.Box,{component:"img",src:(a=n.fallbackSrc)!=null?a:n.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(F.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(F.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(pe,{total:l,active:s})})]}),e.jsx(F.Box,{sx:{position:"absolute",bottom:{xs:0,sm:12},left:120,right:120,"@media (max-width:1024px)":{left:24,right:24},backgroundColor:"#363636",borderRadius:2,p:1.5,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:o==null?void 0:o.map(n=>e.jsxs(F.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:n.onClick||n.href?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var a;if(n.onClick)return n.onClick();if(n.href)return window.location.href=(a=n.href)!=null?a:"/#"},children:[n.icon&&e.jsx(F.Box,{component:"img",src:n.icon,alt:n.label||`icon-${n.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(F.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:n.label})]},n.id))})]})}const xo=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function et({title:t="Medios de pago",rows:o=xo}){const s=o.flat();return e.jsxs(F.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(F.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(F.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(F.Box,{sx:{display:{xs:"block",md:"none"}},children:o.map((r,l)=>e.jsx(F.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:r.map(n=>e.jsx(de,{...n},`${n.src}-${n.alt}`))},l))}),e.jsx(F.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:s.map(r=>e.jsx(de,{...r},`${r.src}-${r.alt}`))})]})}const fo={OraculoSeccionDestacados:ze,OraculoSeccionTopJuegos:be,OraculoSeccionCasinoEnVivo:Ge,OraculoSeccionCasino:Ve,OraculoSeccionVirtuales:qe,OraculoSeccionClubOlimpo:Je,OraculoSeccionBonoBienvenida:Ke,OraculoSeccionBanners:Ze,OraculoSeccionMediosPago:et,OraculoSeccionEventoEnVivo:Qe,OraculoSeccionEventoSemana:Ye,OraculoSeccionEventoCombinadas:Xe},ho=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,go=t=>/^OraculoSeccion[A-Z]/.test(t),bo=Object.fromEntries(Object.entries(fo).filter(([t,o])=>go(t)&&ho(o))),_o=t=>{try{return Object.fromEntries(t!=null?t:[])}catch{return console.warn("[oraculo] extras inválidos. Debe ser Array<[string, unknown]>",t),{}}};class Ce extends Error{constructor(o,s,r){super(`HTTP ${o} ${r}`),this.status=o,this.url=s,this.statusText=r,this.name="HttpError"}}const Ee=["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"],tt=({sectionsOverride:t,docId:o="home",db:s,extras:r})=>{const l=I.useMemo(()=>_o(r),[r]),n=l.loader;l.openMachine,I.useMemo(()=>p=>l[p],[l]);const[a,u]=I.useState([]),[d,m]=I.useState(!1),[h,C]=I.useState({}),[i,c]=I.useState({}),[f,k]=I.useState({}),g=F.useMediaQuery("(min-width:1024px)");I.useEffect(()=>{if(t||!s)return;m(!0);const p=ve.onSnapshot(ve.doc(s,"landings",o),b=>{var O;try{let _=b.exists()?((O=b.data())==null?void 0:O.sections)||[]:[];_=_.slice().sort((w,N)=>{var P,A;return((P=w.order)!=null?P:0)-((A=N.order)!=null?A:0)}).map((w,N)=>({...w,order:N+1})),u(_),console.log("fetched: ",_)}catch(_){console.error("Error procesando landings/"+o,_)}finally{m(!1)}},b=>{console.error("Error escuchando landings/"+o,b),m(!1)});return()=>p()},[t,o,s]),I.useEffect(()=>(console.log("[oraculo preview] extras keys:",Object.keys(l)),console.log("[oraculo preview] openMachine typeof:",typeof l.openMachine),console.log("[oraculo preview] openMachine value:",l.openMachine),Zt(l),()=>eo()),[l]),I.useEffect(()=>{(t?t.slice():a.slice()).map(O=>O.componentKey).filter(O=>!!O).length},[t,a]);const y=async p=>{if(Ee.includes(p.componentKey))return{items:[],events:[],data:{}};const b=(p.apiUrl||"").trim();if(!b)return;const O=p.apiMethod||"GET",_=p.apiParams||[];let w=b,N,P;if(O==="GET"){const U=new URL(b,typeof window=="undefined"?"http://localhost":window.location.origin);for(const G of _)G.key&&U.searchParams.append(G.key,G.value);w=U.toString()}else{const U=new URLSearchParams;for(const G of _)G.key&&U.append(G.key,G.value);N=U.toString(),P={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const A=await fetch(w,{method:O,headers:P,body:N});if(!A.ok)throw new Ce(A.status,w,A.statusText);return A.json()},S=I.useMemo(()=>t?t.slice():a.slice(),[t,a]),x=dt.default.useRef(new Set);I.useEffect(()=>{const p=S.map(b=>({s:b,url:(b.apiUrl||"").trim()})).filter(({url:b})=>!!b);if(p.length)for(const{s:b,url:O}of p){const _=`${b.id}|${O}`;x.current.has(_)||(x.current.add(_),c(w=>({...w,[b.id]:!0})),k(w=>({...w,[b.id]:""})),(async()=>{try{const w=await y(b);C(N=>({...N,[b.id]:w}))}catch(w){let N="Error desconocido";w instanceof Ce?N=`Error HTTP ${w.status} (${w.statusText}) en ${w.url}`:w instanceof SyntaxError?N="Respuesta no es JSON válido":w instanceof TypeError?N="Fallo de red / CORS / conexión":typeof w=="string"&&(N=w.toString()),k(P=>({...P,[b.id]:N}))}finally{c(w=>({...w,[b.id]:!1}))}})())}},[S]);const j=I.useMemo(()=>S.filter(p=>p.visible).sort((p,b)=>p.order-b.order),[S]),B=p=>Array.isArray(p)?p.map(b=>{const O={};for(const _ of b.fields||[]){const w=(_.type||"string").toLowerCase();if(w==="number"){const N=String(_.value||"").trim();if(N!==""){const P=Number(N);Number.isNaN(P)||(O[_.name]=P)}}else if(w==="boolean")O[_.name]=String(_.value).toLowerCase()==="true";else if(w==="function"){const N=String(_.value||"").trim();if(N)try{const P=new Function(N);O[_.name]=P}catch(P){console.error(`❌ Error creando función en item '${_.name}':`,P)}}else O[_.name]=_.value}return O}):[],$=p=>{const b={};if(!Array.isArray(p))return b;for(const O of p){if(!O.name)continue;const _=(O.type||"string").toLowerCase();if(_==="number"){const w=String(O.value||"").trim();if(w!==""){const N=Number(w);Number.isNaN(N)||(b[O.name]=N)}}else if(_==="boolean")b[O.name]=String(O.value).toLowerCase()==="true";else if(_==="function"){const w=String(O.value||"").trim();if(w)try{const N=new Function(w);b[O.name]=N}catch(N){console.error(`❌ Error creando función en item '${O.name}':`,N)}}else b[O.name]=O.value}return b},v=(p,b,O)=>{const _=O?{...O}:{};if(b){const G=(b.variableName||"items").trim()||"items";return _[G]=b.arr||[],_}const w=p,N=Array.isArray(w),P=!N&&typeof w=="object"&&w!==null?w:void 0,A=P&&Array.isArray(P.lobby||P.items)?P.lobby||P.items:void 0,U=G=>N?w:A||G;return _.items=U(A||[]),_},R=p=>{var N;const b=!!((N=p.apiUrl)!=null&&N.trim()),O=b?h[p.id]:void 0;let _=p.props?{...p.props}:{};const w=$(p.manualScalarFields);if(Ee.includes(p.componentKey))return{items:O,..._,...w};if(_={..._,...w},b)_=v(O,null,_);else if(p.dataMode==="manual"){const P=B(p.manualItems);if(_=v(null,{arr:P,variableName:p.variableName},_),p.variableName2&&p.manualItems2){const A=B(p.manualItems2),U=(p.variableName2||"items2").trim()||"items2";_[U]=A}}return _},M=(p,b,O)=>{const _={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${_[b]}`,children:O},p)},z=p=>{var je;const b=p.componentKey,O=bo[b];if(!O)return console.warn(`No hay componente registrado para "${b}"`),M(p.id,"component",`Componente "${b}" no encontrado`);const _=!!((je=p.apiUrl)!=null&&je.trim()),w=_?h[p.id]:void 0,N=_?!!i[p.id]:!1,P=_?f[p.id]:"";if(_){if(N&&!w)return M(p.id,"loading",`Cargando datos desde ${p.apiUrl}...`);if(P&&!w)return M(p.id,"error",`Error cargando ${p.apiUrl}: ${P}`)}const A=R(p),G=new Set(["OraculoSeccionBanners","OraculoSeccionBonoBienvenida","OraculoSeccionCasinoEnVivo",g?"":"OraculoSeccionClubOlimpo"]).has(p.componentKey),_e=g?120:24,ot=G?{width:"100%",boxSizing:"border-box"}:{paddingLeft:_e,paddingRight:_e,width:"100%",boxSizing:"border-box"};return e.jsx("div",{style:ot,children:e.jsx(O,{...A})},p.id)};return d&&!t?n?e.jsx(n,{}):e.jsx("div",{children:"Cargando..."}):!d&&!t&&a.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(F.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(F.Stack,{direction:"column",spacing:g?8:5,useFlexGap:!0,children:j.map(z)})})};exports.OraculoButton=W;exports.OraculoCarousel=K;exports.OraculoCarouselDots=pe;exports.OraculoClubOlimpoVisual=Me;exports.OraculoEventCombinadasCard=Pe;exports.OraculoEventEnVivoCard=Fe;exports.OraculoEventHeader=Be;exports.OraculoEventLabel=me;exports.OraculoEventLeague=xe;exports.OraculoEventScore=fe;exports.OraculoEventSemanaCard=We;exports.OraculoEventStatus=$e;exports.OraculoEventStatusBadge=Ne;exports.OraculoEventTeamInfo=te;exports.OraculoGameCard=ee;exports.OraculoGameRankCard=Re;exports.OraculoGameSlide=he;exports.OraculoGridGroup=D;exports.OraculoLiveCasinoCard=Te;exports.OraculoLogoMediosPago=de;exports.OraculoPageLandingPreview=tt;exports.OraculoSeccionBanners=Ze;exports.OraculoSeccionBonoBienvenida=Ke;exports.OraculoSeccionCasino=Ve;exports.OraculoSeccionCasinoEnVivo=Ge;exports.OraculoSeccionClubOlimpo=Je;exports.OraculoSeccionDestacados=ze;exports.OraculoSeccionEventoCombinadas=Xe;exports.OraculoSeccionEventoEnVivo=Qe;exports.OraculoSeccionEventoSemana=Ye;exports.OraculoSeccionMediosPago=et;exports.OraculoSeccionTopJuegos=be;exports.OraculoSeccionVirtuales=qe;exports.OraculoSectionTitle=q;exports.OraculoTopJuegoItem=be;exports.OraculoWelcomeBanner=ue;exports.default=tt;
|
|
20
20
|
//# sourceMappingURL=index.cjs.js.map
|