1import{N as d}from"./notFound-Cr0KC2gK.js";import{i as a,u as c,j as n,r as y}from"../indexDG-t2xYb.js";import{P as f}from"./index-jzGpQP2P.js";import"./index-BPNC8kD_.js";import"./withDraggableScroll-eelHqWwn-DjyzrmXO.js";import"./index-CvYzfLY1.js";import"./update-swiper-B1V2aUn_.js";import"./index-_wH0_aWu.js";import"./index-B0RSl5TH.js";import"./picture-CvC75irv-BKcKF0i3.js";import"./index-phIZXobz.js";import"./index-CbwTSuiS.js";import"./useBranding-IbJA2ISi.js";/** 2 * @name fu-widgets 3 * @version 5.5.0 4 * @copyright 2026 Sportal.bg 5 * @license All rights reserved. Unauthorized copying or distribution is strictly prohibited. 6 * Proprietary and confidential. 7 */const g={ended:new Set(["EXPIRED"]),playable:new Set(["ACTIVE"])},h={},v=c.div` 8 padding: 20px; 9 border-radius: 0 0 20px 20px; 10 11 ${({$backgroundColor:r,theme:t})=>r?a` 12 background-color: ${r}; 13 & > * { 14 filter: invert(1); 15 } 16 & * { 17 color: ${r} !important; 18 } 19 20 & p { 21 padding: 0 !important; 22 margin: 0 !important; 23 } 24 25 & h2, 26 h3, 27 h4, 28 h5, 29 h6 { 30 margin: 10px 0; 31 padding: 0 10px; 32 } 33 `:a` 34 background-color: ${t.colors.content.main}; 35 & * { 36 color: ${t.colors.content.dark} !important; 37 } 38 39 ${({theme:o})=>o.applyLightThemeStyles(a` 40 background-color: ${o.colors.content.dark}; 41 42 & * { 43 color: ${o.colors.content.main} !important; 44 } 45 `)} 46 `} 47`,u=({content:r,branding:t})=>{var o;return n.jsx(v,{$backgroundColor:(o=t==null?void 0:t.colors)==null?void 0:o.backgroundColor,dangerouslySetInnerHTML:{__html:r}})},s=c.p` 48 width: 100%; 49 height: 100%; 50 margin: 0 !important; 51 padding: 0 !important; 52 font-size: 16px !important; 53 font-family: 'Open Sans', serif !important; 54 font-weight: bold; 55 line-height: 2.5em !important; 56 text-align: center; 57`,w=c.div` 58 width: 325px; 59 height: 42px; 60 margin: 0 auto; 61 cursor: pointer; 62 transition: all 0.3s; 63 64 &:hover { 65 ${s} { 66 color: ${({$primaryColor:r,theme:t})=>r||t.colors.primary.main}!important; 67 } 68 } 69 70 ${({$active:r,$primaryColor:t,$backgroundColor:o,theme:e})=>r?a` 71 ${s} { 72 color: ${t||e.colors.primary.main}; 73 } 74 border-bottom: 2px solid ${t||e.colors.primary.main}; 75 `:o?a` 76 ${s} { 77 color: ${o}; 78 79 &:not(:hover) { 80 filter: invert(1); 81 } 82 } 83 `:a` 84 ${s} { 85 color: ${e.colors.content.dark}; 86 87 ${({theme:i})=>i.applyLightThemeStyles(a` 88 color: ${i.colors.content.main}; 89 `)} 90 } 91 `}; 92`,k=c.div` 93 display: flex; 94 justify-content: center; 95 align-items: center; 96 width: 100%; 97 border-bottom: 1px solid ${({$primaryColor:r,theme:t})=>r||t.colors.primary.main}; 98 border-radius: 20px 20px 0 0; 99 overflow: hidden; 100 ${({$backgroundColor:r,theme:t})=>r?a` 101 background-color: ${r}; 102 `:a` 103 background-color: ${t.colors.content.main}; 104 105 ${({theme:o})=>o.applyLightThemeStyles(a` 106 background-color: ${o.colors.content.dark}; 107 `)} 108 `} 109`,j=r=>{var t,o,e,i;return n.jsx(k,{$backgroundColor:(o=(t=r==null?void 0:r.branding)==null?void 0:t.colors)==null?void 0:o.backgroundColor,$primaryColor:(i=(e=r==null?void 0:r.branding)==null?void 0:e.colors)==null?void 0:i.primaryColor,children:r.tabs.map((l,$)=>{var m,p,x,b;return n.jsx(w,{$active:l.value===r.activeTab,$primaryColor:(p=(m=r==null?void 0:r.branding)==null?void 0:m.colors)==null?void 0:p.primaryColor,$backgroundColor:(b=(x=r==null?void 0:r.branding)==null?void 0:x.colors)==null?void 0:b.backgroundColor,onClick:()=>r.action(l.value),children:n.jsx(s,{children:l.label})},$)})})},T=c.div` 110 max-width: 950px; 111 margin: 0 auto; 112 border-radius: 20px; 113 box-shadow: 0 3px 10px 5px ${({theme:r})=>r.colors.content.black}; 114 115 ${({theme:r})=>r.applyLightThemeStyles(a` 116 box-shadow: 0 3px 10px 5px #00000040; 117 `)} 118`,C=r=>{const t=[{label:"ÐгÑай",value:"play"}];return r.rules&&r.rules.trim()!==""&&(r.adContent&&r.adContent.trim()!==""&&t.push({label:"ÐагÑади",value:"prizes"}),r.status==="EXPIRED"&&t.push({label:"ÐеÑеливÑи",value:"winners"}),t.push({label:"ÐÑавила",value:"rules"})),t},P=(r,t)=>{const{rules:o,description:e,branding:i,adContent:l}=t;switch(r){case"play":return n.jsx(f,{data:t});case"prizes":return n.jsx(u,{content:l??"",branding:i});case"winners":return n.jsx(u,{content:e??"",branding:i});case"rules":return n.jsx(u,{content:o,branding:i});default:return null}},S=({data:r})=>{const{rules:t,branding:o}=r,[e,i]=y.useState("play");return n.jsxs(T,{children:[t&&n.jsx(j,{action:i,tabs:C(r),branding:o,activeTab:e}),P(e,r)]})},E=({data:r,endGame:t})=>h[t]&&g.ended.has(r.status)?h[t]:g.playable.has(r.status)?n.jsx(S,{data:r}):n.jsx(d,{}),_=async({id:r,fallbackConfig:t})=>{if(!r)return console.error(`Poll widget missing initial data: id: ${r}`),[{},d];try{return[{data:await window.FU.sdk.voting.getPollById(r),fallbackConfig:JSON.parse(t??"{}")},E]}
118catch(o){return console.error(`Poll widget with id: ${r}`,o),[{},d]}};export{_ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.