@simple-parlay/components 1.30.0 → 1.30.2

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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,l=(l,a,c)=>(c=null!=l?e(r(l)):{},((e,r,l,a)=>{if(r&&"object"==typeof r||"function"==typeof r)for(var c,s=o(r),d=0,h=s.length;d<h;d++)c=s[d],i.call(e,c)||void 0===c||t(e,c,{get:(e=>r[e]).bind(null,c),enumerable:!(a=n(r,c))||a.enumerable});return e})(!a&&l&&l.t?c:t(c,"default",{value:l,enumerable:!0}),l));let a=require("react");a=l(a,1);let c=require("react-native"),s=require("react/jsx-runtime"),d=require("react-native-svg");d=l(d,1);let h=require("react-dom");var u="#C9CDD2";function f(e){const t=e.trim();if(!t)return null;const n=t.split(/\t+|\s{2,}/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;const o=n[n.length-1];return"YES"!==n[n.length-2].toUpperCase()||"NO"!==o.toUpperCase()?null:{question:n.slice(0,-2).join(" ")}}function g(e){return`<table class="props">\n${e.map(e=>{return`<tr><td class="q">${t=e.question,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}</td><td class="yes">YES</td><td class="no">NO</td></tr>`;var t}).join("\n")}\n</table>`}var p='\n :root {\n --blue: #1F4E79;\n --ink: #1A1A1A;\n --grey: #5A5A5A;\n --green: #166534;\n --red: #991B1B;\n --fill-q: #F9FAFB;\n --fill-yes: #DCFCE7;\n --fill-no: #FEE2E2;\n --rule: #D0D7DE;\n }\n * { box-sizing: border-box; }\n html, body {\n margin: 0;\n padding: 0;\n background: #FFFFFF;\n color: var(--ink);\n font-family: "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n }\n .page {\n max-width: 720px;\n margin: 0 auto;\n padding: 32px 24px 56px;\n }\n p { margin: 0 0 14px; }\n\n .masthead { text-align: center; margin-bottom: 8px; }\n .kicker {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.16em;\n font-size: 15px;\n margin-bottom: 6px;\n }\n .logo {\n display: block;\n width: 280px;\n max-width: 72%;\n height: auto;\n margin: 0 auto 12px;\n }\n .headline {\n color: var(--ink);\n font-weight: 700;\n font-size: 34px;\n line-height: 1.15;\n margin: 0 0 4px;\n }\n .headline.lg { font-size: 44px; }\n .subhead {\n color: var(--grey);\n font-weight: 700;\n letter-spacing: 0.12em;\n font-size: 15px;\n margin-top: 6px;\n }\n .lede {\n color: var(--blue);\n font-style: italic;\n font-size: 20px;\n text-align: center;\n margin: 18px 0 22px;\n }\n .rule {\n border: 0;\n border-bottom: 2.5px solid var(--blue);\n margin: 14px 0 22px;\n }\n\n h2.cap {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.06em;\n font-size: 16px;\n text-transform: uppercase;\n margin: 30px 0 12px;\n }\n h3.sub {\n color: var(--ink);\n font-weight: 700;\n font-size: 18px;\n margin: 26px 0 10px;\n }\n\n .step {\n font-weight: 700;\n font-size: 18px;\n margin: 22px 0 8px;\n }\n .step .num { color: var(--blue); }\n .step .label { color: var(--ink); }\n\n .props {\n width: 100%;\n border-collapse: collapse;\n margin: 8px 0 18px;\n }\n .props td {\n border: 1px solid #C9CDD2;\n padding: 11px 14px;\n font-size: 15px;\n }\n .props .q { background: var(--fill-q); width: 64%; }\n .props .yes {\n background: var(--fill-yes);\n color: var(--green);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n .props .no {\n background: var(--fill-no);\n color: var(--red);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n\n .divider {\n border: 0;\n border-top: 1px solid var(--rule);\n margin: 48px 0;\n }\n\n .footnote {\n color: var(--grey);\n font-style: italic;\n font-size: 13px;\n border-top: 1px solid var(--rule);\n padding-top: 14px;\n margin-top: 30px;\n }\n\n @media (max-width: 480px) {\n .page { padding: 24px 18px 44px; }\n .headline { font-size: 28px; }\n .headline.lg { font-size: 34px; }\n .lede { font-size: 18px; }\n }\n'.trim();function y(e){let t=e.trim();for(;;){const e=t.match(/^<!--[\s\S]*?-->\s*/);if(!e)break;t=t.slice(e[0].length).trimStart()}return t}var m=/^<(main|section|article|div|style|table|h[1-6]|p|ul|ol|hr)\b/i,b=/<(section|article|main|div\s+class=["']masthead|h[12]\s+class=["'](?:cap|headline)|h3\s+class=["']sub|table\s+class=["']props|hr\s+class=["']divider)\b/i;function w(e){return/^<!DOCTYPE\s+html/i.test(e)||/^<html[\s>]/i.test(e)}function x(e){const t=e.trim();return t?w(t)?t:`<!DOCTYPE html>\n<html lang="en-AU">\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<title>YES NO - How to Play</title>\n<style>${p}</style>\n</head>\n<body>\n<main class="page">\n${n=function(e){return/<table\s+class=["']props["']/i.test(e)?e:function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let o=0;for(;o<t.length;){const e=f(t[o]);if(e){const r=[e];let i=o+1;for(;i<t.length;){const e=f(t[i]);if(!e)break;r.push(e),i+=1}n.push(g(r)),o=i;continue}n.push(t[o]),o+=1}return n.join("\n")}(function(e){const t=/<p(?:\s[^>]*)?>([\s\S]*?)<\/p>/gi;let n,o="",r=0;const i=[],l=()=>{0!==i.length&&(o+=g([...i]),i.length=0)};for(;null!==(n=t.exec(e));){o+=e.slice(r,n.index);const a=n[1].replace(/<br\s*\/?>/gi,"\n").trim().split("\n").map(e=>e.trim()).filter(Boolean).map(e=>f(e));a.length>0&&a.every(e=>null!==e)?i.push(...a):(l(),o+=n[0]),r=t.lastIndex}return l(),o+=e.slice(r),o}(e))}(function(e){const t=y(e),n=t.match(/^<main[^>]*>([\s\S]*)<\/main>$/i);return n?n[1].trim():t}(t)),/class=["']logo["']/i.test(n)?n:/<div class=["']masthead["']>/i.test(n)?n.replace(/(<div class=["']masthead["']>)/i,'$1\n <img class="logo" src="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%202400%20500%22%20width%3D%222400%22%20height%3D%22500%22%3E%0A%20%20%3Ctitle%3EYESNO%20Multi%20Logo%20%E2%80%94%20Horizontal%20Master%3C%2Ftitle%3E%0A%20%20%3Cdesc%3EYESNO%20Multi%20master%20logo.%20Horizontal%20pipe%20lockup%3A%20YESNO%20wordmark%2C%20stacked%20tile%20icon%2C%20pipe%20divider%2C%20Multi%20extension%2C%20TM.%3C%2Fdesc%3E%0A%0A%20%20%3C!--%20YESNO%20wordmark%20(cropped%20from%20canonical%20Multi%20master)%20--%3E%0A%20%20%3Cimage%20href%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAA68AAADMCAYAAACcEJWAAABCUUlEQVR4nO3dd7xcRfnH8U9ooU%2BQDiIdpHcRRbEgII69IQ5SRRCQgPSiCNKlinQBZUQRUJRBwYIiSBWUDqIUKQJCyFBMQkjy%2B2NOfoaQ3Oy9d3efc3a%2F79drXze5udn5brm7%2B5wz88wIREREpOOcDwsDSwALAQ4YVX1dAJhzmstcwAhgYnV5rfo6DngRGDvN1%2BeA53KKU7p2Q0REeojzYQFgJcrr82LVZfFp%2FrwwMDcwcpqvUy9zUV6fJ0xzGT%2FNn8cAz1K9Vk%2Fz52eBf%2BYUX%2BzGbewlI6wDiIiI9ALnw4LAKtNcVgaWAZYGlqJ86OmE14CngCeBJ4CHgQeAB4GHcorjOzSuiEhjOB%2BWA9YEVqW8Rk%2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20tile%20icon%2C%20vector%20%E2%80%94%20proportional%20to%20wordmark%20height%20--%3E%0A%20%20%3Cg%20transform%3D%22translate(1040%2C%20130)%22%3E%0A%20%20%20%20%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2240%22%20y%3D%2240%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%20opacity%3D%220.55%22%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2280%22%20y%3D%2280%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%20opacity%3D%220.30%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%0A%20%20%3C!--%20Pipe%20divider%20in%20teal-700%20--%3E%0A%20%20%3Crect%20x%3D%221380%22%20y%3D%22150%22%20width%3D%226%22%20height%3D%22200%22%20fill%3D%22%2314687C%22%2F%3E%0A%0A%20%20%3C!--%20Multi%20wordmark%20(cropped%20from%20canonical%20Multi%20master)%20--%3E%0A%20%20%3Cimage%20href%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAlkAAADMCAYAAABAzLaeAAAcwklEQVR4nO3de7hdVXnv8W8uJECCAwJSJYAgpIpaiNVSK4FWactt6FGb4FEHSdVCLJKICSRIn16O55weTkK4i8q1lYGiqNUyQKwWL9QLpVYLKhYUQUAqtzAEAcMl%2FWNObKC57LX3eueYc67f53nWg8Le4%2Feuy977XWONOcYkRERExsj5sN5y%2FJziJMvxRZo0uXQBIiIiIn00tXQBIiIiIiVYz8xqJktERETEwFTDLu6wnOLVRmPLCHE%2BrAGWWYyt9R8iImLFcibrfYZjy4hwPuwAHFO6DhERkUFZNlkHOR9ebTi%2BjIYlwMzSRYiIiAzKek3WycbjS485H7alarJEREQ6x7rJOsL5sK9xhvTX0cBOpYsQEREZ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FcQnWg7ueAL%2BcUHytcj0hrOR%2B2AV5GtTRgj%2Fo2G9gJmAU4YDowDZhKdeHVOqqLY56%2BraPaVujB%2BrZ2g%2F99P3A38FOqxuou%2FUyqyRKRAdS%2FqF9N9c54f%2BCVwC4NRN8H3EB1deB1wDdzij9rIFdEZNzUZInIhDgfnkP17vhFwO7ArlSN107A9vVtW6p3yFsBU6jeFf%2Byvq0DHgLupdpw8R7gP4BbqT5auDmnuLap%2ByMiMiz%2FCXQ4TDPqI2KNAAAAAElFTkSuQmCC%22%20x%3D%221430%22%20y%3D%22148%22%20width%3D%22601%22%20height%3D%22204%22%2F%3E%0A%0A%20%20%3C!--%20TM%20superscript%20at%20top-right%20of%20Multi%20--%3E%0A%20%20%3Ctext%20x%3D%222045%22%20y%3D%22190%22%20font-family%3D%22Manrope%2C%20Poppins%2C%20sans-serif%22%20font-size%3D%2256%22%20font-weight%3D%22600%22%20fill%3D%22%230F4C5C%22%3ETM%3C%2Ftext%3E%0A%3C%2Fsvg%3E%0A" alt="YESNO Multi" />'):n}\n</main>\n</body>\n</html>`:"";var n}var k=/^(#{1,3})\s+(.+)$/,S=/^[-*]\s+(.+)$/,C=/^-{3,}$/;function B(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let o=[],r=[];const i=()=>{const e=o.map(e=>e.trim()).filter(Boolean);if(e.length>0){const t=e.map(e=>f(e));if(t.every(e=>null!==e))return n.push({type:"propsTable",rows:t}),void(o=[])}const t=o.join(" ").trim();t&&n.push({type:"paragraph",text:t}),o=[]},l=()=>{r.length>0&&(n.push({type:"list",items:[...r]}),r=[])};for(const a of t){const e=a.trim();if(!e){l(),i();continue}const t=e.match(k);if(t){l(),i(),n.push({type:"heading",level:Math.min(t[1].length,3),text:t[2].trim()});continue}if(C.test(e)){l(),i(),n.push({type:"hr"});continue}const c=e.match(S);c?(i(),r.push(c[1].trim())):(l(),o.push(e))}return l(),i(),n}function z(e){const t=[],n=/\*\*(.+?)\*\*/g;let o,r=0;for(;null!==(o=n.exec(e));)o.index>r&&t.push({text:e.slice(r,o.index),bold:!1}),t.push({text:o[1],bold:!0}),r=o.index+o[0].length;return r<e.length&&t.push({text:e.slice(r),bold:!1}),0===t.length&&t.push({text:e,bold:!1}),t}function F(e){return e.colors.heading??e.colors.text}function v(e){return e.colors.label??e.colors.text}function W(e){return e.colors.value??e.colors.text}function T(e){return e.colors.productYes??"#00C853"}function A(e){return e.colors.productNo??"#E53935"}function L(e){return e.brand?.accent??e.colors.primary}function R(e){return e.colors.textAlt??e.colors.text}function M(e){return e.colors.textAltMuted??e.colors.textMuted}function D(e){return e.colors.selectionCard??e.colors.surface??e.colors.backgroundAlt}function P(e){return e.colors.matchupHeader??e.colors.backgroundAlt}function H(e){return e.colors.selectionProp??e.colors.background}function O(e){return{textMuted:e.colors.textMuted,border:e.colors.border,background:e.colors.background,backgroundAlt:e.colors.backgroundAlt,primary:e.colors.primary,selectionCard:D(e)}}function I(e,t="light"){return e?E(e)?"dark"===t?e.dark:e.light:e:j}function E(e){return"light"in e&&"dark"in e&&!("colors"in e)}var j={name:"default",colorScheme:"light",colors:{primary:"#3b82f6",primaryHover:"#2563eb",primaryText:"#ffffff",payoutWinning:"#22c55e",payoutNone:"#e5e7eb",success:"#10b981",successBg:"#dcfce7",successText:"#166534",error:"#ef4444",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f59e0b",warningBg:"#fef3c7",warningText:"#92400e",info:"#3b82f6",infoBg:"#dbeafe",infoText:"#1e3a8a",border:"#d1d5db",borderFocus:"#3b82f6",background:"#ffffff",backgroundAlt:"#f9fafb",selectionCard:"#f9fafb",matchupHeader:"#eff6ff",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",buttonPrimary:"#3b82f6",buttonPrimaryHover:"#2563eb",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"}},N={name:"green",colorScheme:"dark",fonts:{body:"Inter",heading:"Inter",mono:"JetBrainsMono"},colors:{primary:"#00E676",primaryHover:"#00C853",primaryText:"#0a0a0a",payoutWinning:"#34d399",payoutNone:"#3f3f46",success:"#00E676",successBg:"#0d2818",successText:"#a7f3d0",error:"#ff5252",errorBg:"#2d1215",errorText:"#fca5a5",warning:"#ffab40",warningBg:"#2d1f0a",warningText:"#fde68a",info:"#40c4ff",infoBg:"#0a1e2d",infoText:"#bae6fd",border:"#2a2a2e",borderFocus:"#00E676",background:"#121214",backgroundAlt:"#1a1a1e",selectionCard:"#1e1e22",matchupHeader:"#0f2419",selectionProp:"#161618",text:"#e4e4e7",textAlt:"#e4e4e7",textAltMuted:"#a1a1aa",textMuted:"#71717a",heading:"#ffffff",label:"#a1a1aa",value:"#00E676",buttonPrimary:"#00E676",buttonPrimaryHover:"#00C853",buttonPrimaryText:"#0a0a0a",buttonSecondary:"#27272a",buttonSecondaryHover:"#3f3f46",buttonSecondaryText:"#e4e4e7"},brand:{accent:"#DFFF1A"}},G={name:"dark",colorScheme:"dark",colors:{primary:"#60a5fa",primaryHover:"#3b82f6",primaryText:"#ffffff",payoutWinning:"#16a34a",payoutNone:"#374151",success:"#34d399",successBg:"#064e3b",successText:"#d1fae5",error:"#f87171",errorBg:"#7f1d1d",errorText:"#fecaca",warning:"#fbbf24",warningBg:"#78350f",warningText:"#fef3c7",info:"#60a5fa",infoBg:"#1e3a8a",infoText:"#dbeafe",border:"#4b5563",borderFocus:"#60a5fa",background:"#1f2937",backgroundAlt:"#111827",selectionCard:"#374151",matchupHeader:"#1e3a5f",selectionProp:"#1f2937",text:"#f9fafb",textAlt:"#f9fafb",textAltMuted:"#6b7280",textMuted:"#9ca3af",buttonPrimary:"#60a5fa",buttonPrimaryHover:"#3b82f6",buttonPrimaryText:"#ffffff",buttonSecondary:"#374151",buttonSecondaryHover:"#4b5563",buttonSecondaryText:"#f9fafb"}},Y={name:"gold",colorScheme:"dark",colors:{primary:"#f59e0b",primaryHover:"#d97706",primaryText:"#000000",payoutWinning:"#facc15",payoutNone:"#1f2937",success:"#eab308",successBg:"#713f12",successText:"#fef08a",error:"#dc2626",errorBg:"#7f1d1d",errorText:"#fecaca",warning:"#f97316",warningBg:"#7c2d12",warningText:"#fed7aa",info:"#f59e0b",infoBg:"#78350f",infoText:"#fef3c7",border:"#d97706",borderFocus:"#f59e0b",background:"#18181b",backgroundAlt:"#09090b",selectionCard:"#27272a",matchupHeader:"#292019",selectionProp:"#1c1917",text:"#fafaf9",textAlt:"#fafaf9",textAltMuted:"#78716c",textMuted:"#a8a29e",buttonPrimary:"#f59e0b",buttonPrimaryHover:"#d97706",buttonPrimaryText:"#000000",buttonSecondary:"#27272a",buttonSecondaryHover:"#3f3f46",buttonSecondaryText:"#fafaf9"}},V={name:"green-light",colorScheme:"light",fonts:{body:"Inter",heading:"Inter",mono:"JetBrainsMono"},colors:{primary:"#16a34a",primaryHover:"#15803d",primaryText:"#ffffff",payoutWinning:"#22c55e",payoutNone:"#e5e7eb",success:"#16a34a",successBg:"#dcfce7",successText:"#166534",error:"#dc2626",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f59e0b",warningBg:"#fef3c7",warningText:"#92400e",info:"#0ea5e9",infoBg:"#e0f2fe",infoText:"#0c4a6e",border:"#d1d5db",borderFocus:"#16a34a",background:"#ffffff",backgroundAlt:"#f0fdf4",selectionCard:"#f0fdf4",matchupHeader:"#dcfce7",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",heading:"#111827",label:"#374151",value:"#16a34a",buttonPrimary:"#16a34a",buttonPrimaryHover:"#15803d",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"},brand:{accent:"#f97316"}},U={name:"gold-light",colorScheme:"light",colors:{primary:"#d97706",primaryHover:"#b45309",primaryText:"#ffffff",payoutWinning:"#eab308",payoutNone:"#e5e7eb",success:"#eab308",successBg:"#fef9c3",successText:"#713f12",error:"#dc2626",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f97316",warningBg:"#ffedd5",warningText:"#7c2d12",info:"#d97706",infoBg:"#fef3c7",infoText:"#78350f",border:"#d1d5db",borderFocus:"#d97706",background:"#ffffff",backgroundAlt:"#fffbeb",selectionCard:"#fffbeb",matchupHeader:"#fef3c7",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",buttonPrimary:"#d97706",buttonPrimaryHover:"#b45309",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"}},Z={name:"yesno-light",colorScheme:"light",fonts:{body:"Manrope",heading:"Manrope",mono:"JetBrains Mono"},colors:{primary:"#0F4C5C",primaryHover:"#0C3E4B",primaryText:"#FAFAF7",payoutWinning:"#0F4C5C",payoutNone:"#DDD9D2",success:"#15803D",successBg:"#DCFCE7",successText:"#14532D",error:"#DC2626",errorBg:"#FEE2E2",errorText:"#991B1B",productYes:"#00C853",productNo:"#E53935",warning:"#D97706",warningBg:"#FEF3C7",warningText:"#92400E",info:"#14687C",infoBg:"#E0F0F3",infoText:"#0F4C5C",border:"#DDD9D2",borderFocus:"#0F4C5C",background:"#FAFAF7",backgroundAlt:"#F0EDE6",selectionCard:"#FFFFFF",matchupHeader:"#EAF1F2",selectionProp:"#FFFFFF",text:"#123B45",textAlt:"#123B45",textAltMuted:"#8A9AA0",textMuted:"#647C83",heading:"#0F4C5C",label:"#14687C",value:"#0F4C5C",buttonPrimary:"#0F4C5C",buttonPrimaryHover:"#0C3E4B",buttonPrimaryText:"#DFFF1A",buttonSecondary:"#DDD9D2",buttonSecondaryHover:"#CDC8BF",buttonSecondaryText:"#0F4C5C"},brand:{accent:"#DFFF1A",chip:"#0F4C5C",text:"#0F4C5C",icon:"#FAFAF7"}},K={name:"yesno",colorScheme:"dark",fonts:{body:"Manrope",heading:"Manrope",mono:"JetBrains Mono"},colors:{primary:"#4FB3C9",primaryHover:"#6FC4D6",primaryText:"#06303A",payoutWinning:"#DFFF1A",payoutNone:"#1E5E6E",success:"#4ADE80",successBg:"#0E3A2A",successText:"#BBF7D0",error:"#FB7185",errorBg:"#3A1418",errorText:"#FECDD3",productYes:"#00C853",productNo:"#E53935",warning:"#FBBF24",warningBg:"#3A2A0A",warningText:"#FDE68A",info:"#4FB3C9",infoBg:"#0C3B47",infoText:"#CFF0F6",border:"#1E5E6E",borderFocus:"#4FB3C9",background:"#0C3B47",backgroundAlt:"#0F4C5C",selectionCard:"#124E5E",matchupHeader:"#103F4C",selectionProp:"#0C3B47",text:"#EAF3F4",textAlt:"#EAF3F4",textAltMuted:"#6E959E",textMuted:"#90B4BC",heading:"#FAFAF7",label:"#9FD9E6",value:"#DFFF1A",buttonPrimary:"#4FB3C9",buttonPrimaryHover:"#6FC4D6",buttonPrimaryText:"#06303A",buttonSecondary:"#124E5E",buttonSecondaryHover:"#186072",buttonSecondaryText:"#EAF3F4"},brand:{accent:"#DFFF1A",chip:"#0F4C5C",text:"#FAFAF7",icon:"#FAFAF7"}},q={light:j,dark:G},X={light:V,dark:N},Q={light:U,dark:Y},J={light:Z,dark:K},$={default:j,green:N,"green-light":V,dark:G,gold:Y,"gold-light":U,yesno:K,"yesno-light":Z},_={default:q,green:X,gold:Q,yesno:J};function ee(e,t="light"){return I(e,t)}function te(e,t){if(!e)return e;const n=Math.max(0,Math.min(1,t));if("transparent"===e)return e;if(e.startsWith("#")){const t=e.slice(1);let o=0,r=0,i=0;if(3===t.length)o=parseInt(t[0]+t[0],16),r=parseInt(t[1]+t[1],16),i=parseInt(t[2]+t[2],16);else if(6===t.length)o=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);else{if(8!==t.length)return e;o=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16)}return`rgba(${o}, ${r}, ${i}, ${n})`}const o=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return o?`rgba(${o[1]}, ${o[2]}, ${o[3]}, ${n})`:e}var ne={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32,xxxl:48},oe={xs:4,sm:8,md:12,lg:16,xl:24,pill:999},re={xs:11,sm:13,md:14,lg:16,xl:18,xxl:22,display:28},ie={min:44};function le(e){const t="dark"===e.colorScheme,n=e.colors;return{space:{...ne},radius:{...oe},fontSize:{...re},touchTarget:{...ie},motion:{durationFast:e.motion?.durationFast??160,durationStd:e.motion?.durationStd??220,easing:e.motion?.easing??"cubic-bezier(0.2, 0, 0, 1)"},surface:{background:n.background,surface:n.selectionCard??n.surface??n.backgroundAlt,surfaceElevated:n.surfaceElevated??n.selectionCard??n.surface??n.backgroundAlt,borderSubtle:n.borderSubtle??te(n.border,t?.6:.5)},isDark:t}}function ae(e){return"dark"===e.colorScheme?"0 1px 0 rgba(255,255,255,0.06) inset, 0 24px 60px -28px rgba(0,0,0,0.7)":"0 1px 0 rgba(255,255,255,0.7) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}function ce(e){return e.fonts?.body??"System"}function se(e){return e.fonts?.heading??e.fonts?.body??"System"}var de="game-icon:",he={perfect_pick:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Perfect Pick.\n Single-glyph identifier ("100%") on a transparent background.\n\n Themable: the digits use currentColor (primary tone) and the\n trailing % uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <text x="50" y="50"\n font-family="Manrope, Poppins, sans-serif"\n font-size="32"\n letter-spacing="-1"\n text-anchor="middle"\n dominant-baseline="central"\n font-weight="800"\n fill="currentColor"><tspan fill="currentColor">100</tspan><tspan fill="var(--icon-accent, #DFFF1A)">%</tspan></text>\n</svg>',head_to_head:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Head to Head.\n Two arrowheads clashing across a citron diamond. Transparent\n background; rendered onto the programmatic Press-to-Play tile.\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- Source design lives in an 80×60 box; centre it in 100×100 by\n shifting (10, 20) so the diamond at (40,30) lands at (50,50). --\x3e\n \x3c!-- Themable: arrowheads use currentColor (primary tone), the\n centre diamond uses the icon-accent CSS variable (default #DFFF1A). --\x3e\n <g transform="translate(10, 20)">\n <path d="M 6 14 L 32 30 L 6 46 L 18 30 Z" fill="currentColor"/>\n <path d="M 74 14 L 48 30 L 74 46 L 62 30 Z" fill="currentColor"/>\n <polygon points="40,20 50,30 40,40 30,30" fill="var(--icon-accent, #DFFF1A)"/>\n </g>\n</svg>',total_points:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Total Points.\n Sigma glyph with italic X superscript. Transparent background;\n rendered onto the programmatic Press-to-Play tile.\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- Sigma + italic X superscript, centred together in the viewBox.\n Sigma 90×98 × 0.55 = 49.5×53.9. Translating to (15, 22) puts the\n sigma centre at (~40, 49) and leaves room for the X glyph at the\n upper right so the combined mark balances around (50, 50). --\x3e\n \x3c!-- Themable: sigma uses currentColor (primary), X superscript\n uses the icon-accent CSS variable (default #DFFF1A). --\x3e\n <g transform="translate(15, 22) scale(0.55)">\n <path d="M 0,0 L 90,0 L 90,15 L 25,15 L 58,49 L 25,83 L 90,83 L 90,98 L 0,98 L 49,49 Z"\n fill="currentColor"/>\n </g>\n <text x="75" y="30"\n font-family="Manrope, Poppins, sans-serif"\n font-size="22"\n font-style="italic"\n font-weight="400"\n text-anchor="middle"\n dominant-baseline="central"\n fill="var(--icon-accent, #DFFF1A)">X</text>\n</svg>',quickpick:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — QuickPick.\n Lightning bolt glyph. Transparent background; rendered onto the\n programmatic Press-to-Play tile.\n\n Themable: bolt fill uses currentColor (primary tone); edge stroke uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(28, 16) scale(0.55)">\n <path d="M 50 8 L 5 80 L 32 80 L 22 132 L 75 50 L 47 50 L 60 8 Z"\n fill="currentColor"\n stroke="var(--icon-accent, #DFFF1A)"\n stroke-width="3.5"\n stroke-linejoin="round"/>\n </g>\n</svg>',safety_net:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Safety Net.\n The brand basketball rim + curved diamond-mesh net catching a citron ball,\n taken from the YESNO Safety Net lockup / app icon. Transparent background;\n rendered on Press-to-Play tiles and brand lockups.\n\n Themable: net uses currentColor (teal on light, white on teal tile);\n ball uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(-2, -6.2) scale(1.3)">\n <line x1="9" y1="18" x2="71" y2="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>\n <path d="M12 18L13 25.67 M17.6 18L19 25.67 M17.6 18L13 25.67 M23.2 18L25 25.67 M23.2 18L19 25.67 M28.8 18L31 25.67 M28.8 18L25 25.67 M34.4 18L37 25.67 M34.4 18L31 25.67 M40 18L43 25.67 M40 18L37 25.67 M45.6 18L49 25.67 M45.6 18L43 25.67 M51.2 18L55 25.67 M51.2 18L49 25.67 M56.8 18L61 25.67 M56.8 18L55 25.67 M62.4 18L67 25.67 M62.4 18L61 25.67 M68 18L67 25.67 M13 25.67L15.5 33.33 M19 25.67L21.62 33.33 M19 25.67L15.5 33.33 M25 25.67L27.75 33.33 M25 25.67L21.62 33.33 M31 25.67L33.88 33.33 M31 25.67L27.75 33.33 M37 25.67L40 33.33 M37 25.67L33.88 33.33 M43 25.67L46.12 33.33 M43 25.67L40 33.33 M49 25.67L52.25 33.33 M49 25.67L46.12 33.33 M55 25.67L58.38 33.33 M55 25.67L52.25 33.33 M61 25.67L64.5 33.33 M61 25.67L58.38 33.33 M67 25.67L64.5 33.33 M15.5 33.33L19 41 M21.62 33.33L25 41 M21.62 33.33L19 41 M27.75 33.33L31 41 M27.75 33.33L25 41 M33.88 33.33L37 41 M33.88 33.33L31 41 M40 33.33L43 41 M40 33.33L37 41 M46.12 33.33L49 41 M46.12 33.33L43 41 M52.25 33.33L55 41 M52.25 33.33L49 41 M58.38 33.33L61 41 M58.38 33.33L55 41 M64.5 33.33L61 41 M19 41L23 48.67 M25 41L28.67 48.67 M25 41L23 48.67 M31 41L34.33 48.67 M31 41L28.67 48.67 M37 41L40 48.67 M37 41L34.33 48.67 M43 41L45.67 48.67 M43 41L40 48.67 M49 41L51.33 48.67 M49 41L45.67 48.67 M55 41L57 48.67 M55 41L51.33 48.67 M61 41L57 48.67 M23 48.67L25 56.33 M28.67 48.67L31 56.33 M28.67 48.67L25 56.33 M34.33 48.67L37 56.33 M34.33 48.67L31 56.33 M40 48.67L43 56.33 M40 48.67L37 56.33 M45.67 48.67L49 56.33 M45.67 48.67L43 56.33 M51.33 48.67L55 56.33 M51.33 48.67L49 56.33 M57 48.67L55 56.33 M25 56.33L22 64 M31 56.33L31 60.1 M31 56.33L22 64 M37 56.33L40 59.5 M37 56.33L31 60.1 M43 56.33L49 60.1 M43 56.33L40 59.5 M49 56.33L58 64 M49 56.33L49 60.1 M55 56.33L58 64" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12 18 C12.17 19.28 12.42 23.12 13 25.67 C13.58 28.23 14.5 30.77 15.5 33.33 C16.5 35.88 17.75 38.44 19 41 C20.25 43.56 22 46.12 23 48.67 C24 51.23 25.17 53.77 25 56.33 C24.83 58.88 22.5 62.72 22 64 M68 18 C67.83 19.28 67.58 23.12 67 25.67 C66.42 28.23 65.5 30.77 64.5 33.33 C63.5 35.88 62.25 38.44 61 41 C59.75 43.56 58 46.12 57 48.67 C56 51.23 54.83 53.77 55 56.33 C55.17 58.88 57.5 62.72 58 64" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>\n <ellipse cx="40" cy="64" rx="18" ry="4.5" fill="none" stroke="currentColor" stroke-width="2.2"/>\n <circle cx="40" cy="50" r="8" fill="var(--icon-accent, #DFFF1A)"/>\n </g>\n</svg>',ladder:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Ladder.\n The sub-brand staircase: four offset rungs climbing to the top, from the\n YESNO Ladder lockup ("Climb the ladder. Stack the prizes."). Transparent\n background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: alternating rungs use currentColor (primary tone) and the\n icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <rect x="4" y="76" width="44" height="11" rx="5.5" fill="currentColor"/>\n <rect x="20" y="54" width="44" height="11" rx="5.5" fill="var(--icon-accent, #DFFF1A)"/>\n <rect x="36" y="32" width="44" height="11" rx="5.5" fill="currentColor"/>\n <rect x="52" y="10" width="44" height="11" rx="5.5" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',game_set:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Game Set Bet.\n The sub-brand tennis ball: citron ball with the S-curve seam, from the\n Game Set Bet lockup / app icon ("Game. Set. Bet."). Transparent\n background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: the seam uses currentColor (teal on light, paper on the teal\n app-icon tile); the ball uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(4, 4) scale(1.15)">\n <circle cx="40" cy="40" r="34" fill="var(--icon-accent, #DFFF1A)"/>\n <path d="M40 8 C12 14 11 40 40 40 C69 40 68 66 40 72" fill="none" stroke="currentColor" stroke-width="4.5" stroke-linecap="round"/>\n </g>\n</svg>',pick_your_dividend:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Ladder.\n Splayed ladder rails and rungs with the citron ball resting at the top —\n the stacked-multi that pays every rung your streak reaches. Transparent\n background; rendered onto the programmatic Press-to-Play tile.\n\n Themable: rails/rungs use currentColor (primary tone); the ball uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <line x1="36" y1="16" x2="27" y2="88" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>\n <line x1="64" y1="16" x2="73" y2="88" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>\n <line x1="33.8" y1="34" x2="66.2" y2="34" stroke="currentColor" stroke-width="4" stroke-linecap="round"/>\n <line x1="31.5" y1="52" x2="68.5" y2="52" stroke="currentColor" stroke-width="4" stroke-linecap="round" opacity="0.8"/>\n <line x1="29.3" y1="70" x2="70.7" y2="70" stroke="currentColor" stroke-width="4" stroke-linecap="round" opacity="0.6"/>\n <circle cx="50" cy="20" r="9" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',mirror:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Mirror.\n Two offset square-stacks reflected across a central seam, from the YESNO\n Mirror Standard mark ("Get them all right, you win. All wrong, you win.").\n Transparent background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: the reflected stacks use currentColor (primary tone) and the\n mirror seam uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- left stack --\x3e\n <rect x="6" y="26" width="28" height="28" rx="7" fill="currentColor" opacity="0.4"/>\n <rect x="14" y="34" width="28" height="28" rx="7" fill="currentColor"/>\n \x3c!-- right stack — the reflection across x=50 --\x3e\n <rect x="66" y="26" width="28" height="28" rx="7" fill="currentColor" opacity="0.4"/>\n <rect x="58" y="34" width="28" height="28" rx="7" fill="currentColor"/>\n \x3c!-- mirror seam --\x3e\n <rect x="48" y="16" width="4" height="68" rx="2" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',same_game_multi:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon - Same Game Multi.\n Three proposition legs contained inside one rounded fixture card: many\n picks, one game. Transparent background; rendered on Press-to-Play tiles\n and brand lockups.\n\n Themable: the fixture and leg marks use currentColor (primary tone); the\n locked lead leg uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <rect x="14" y="14" width="72" height="72" rx="13" fill="none" stroke="currentColor" stroke-width="6"/>\n <circle cx="31" cy="35" r="6" fill="var(--icon-accent, #DFFF1A)"/>\n <rect x="43" y="31" width="31" height="8" rx="4" fill="currentColor"/>\n <circle cx="31" cy="51" r="6" fill="currentColor" opacity="0.8"/>\n <rect x="43" y="47" width="25" height="8" rx="4" fill="currentColor" opacity="0.8"/>\n <circle cx="31" cy="67" r="6" fill="currentColor" opacity="0.6"/>\n <rect x="43" y="63" width="19" height="8" rx="4" fill="currentColor" opacity="0.6"/>\n</svg>',unknown:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Unknown game fallback.\n Question mark glyph on a transparent background.\n\n Themable: the mark uses currentColor (primary tone) and the dot uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <path\n d="M 28 42 C 28 26 36 16 46 16 C 58 16 66 26 66 38 C 66 48 58 54 50 58 L 50 68"\n fill="none"\n stroke="currentColor"\n stroke-width="8"\n stroke-linecap="round"\n stroke-linejoin="round"\n />\n <circle cx="50" cy="82" r="5" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>'},ue={perfectpick:"perfect_pick",headtohead:"head_to_head",totalpoints:"total_points",quickpick:"quickpick",safetynet:"safety_net",gameset:"game_set",gamesetbet:"game_set",pickyourdividend:"pick_your_dividend",ladder:"ladder",mirror:"mirror",mirrorstandard:"mirror",samegame:"same_game_multi",samegamemulti:"same_game_multi"},fe={safety_net:"safety_net",game_set:"game_set",pick_your_dividend:"pick_your_dividend",ladder:"ladder",mirror:"mirror",same_game_multi:"same_game_multi"};function ge(e){if(e.quick_pick_only)return"quickpick";return fe[e.rule?.trim().toLowerCase()??""]||(ue[t=e.game_name??"",t.toLowerCase().replace(/[^a-z0-9]+/g,"")]??"unknown");var t}function pe(e){return`${de}${ge(e)}`}function ye(e){return function(e){return e.startsWith(de)}(e)?he[e.slice(10)]??he.unknown:null}var me={text:"YES",tone:"yes"},be={text:"NO",tone:"no"},we=[{question:"Will the home side kick the first goal?",outcome:"yes"},{question:"Will the total go over 165 points?",outcome:"no"},{question:"Will the favourite lead at half time?",outcome:"yes"},{question:"Will either side kick five straight goals?",outcome:"yes"},{question:"Will the away side win the first quarter?",outcome:"no"},{question:"Will the top scorer kick three or more?",outcome:"yes"},{question:"Will the margin be under two goals?",outcome:"no"},{question:"Will there be a goal in the first five minutes?",outcome:"yes"}],xe=["zero","one","two","three","four","five","six","seven","eight"],ke=[{title:"Select your picks",detail:"YES or NO on each call, from {min} up to {max}."},{title:"Continue to review",detail:"Lock in the picks you have made."},{title:"Review your slip",detail:"Add, remove, or change any pick."},{title:"Place your wager",detail:"Set your stake, check the payout, and you are on."}],Se=e=>[{title:`Choose your ${e}`,detail:"Pick how many legs you are taking on and your stake."},{title:"Make your calls",detail:"YES or NO on every leg of the card."},{title:"Check the slip",detail:"Your stake is locked from the setup — review every pick."},{title:"Place your entry",detail:"Confirm and you are on."}],Ce={perfect_pick:{summary:["Perfect Pick is the multi you already know, with one big difference. You pick ",me," or ",be," across your legs, every leg has to land, and one perfect card takes the prize."],steps:ke,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},head_to_head:{summary:["Head to Head is win-or-lose calls only. Pick ",me," or ",be," on each matchup, land every leg, and the card pays."],steps:ke,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},total_points:{summary:["Total Points is all about the scoreboard. Call ",me," or ",be," on each total, land every leg, and the card pays."],steps:ke,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},quickpick:{summary:["QuickPick fills the card for you. We generate the ",me," and ",be," calls, you set the stake, and a perfect card takes the prize."],steps:[{title:"Press to play",detail:"We generate a full card of calls for you."},{title:"Check the slip",detail:"See the picks you have been dealt."},{title:"Place your wager",detail:"Set your stake, check the payout, and you are on."}],demoPrompt:"See how a card settles — call {n} legs yourself, then run it."},safety_net:{summary:["Safety Net is a multi with a miss built in. Pick ",me," or ",be," across your legs — get them all right for the top prize, and if one slips, the net catches it and the entry still pays."],steps:Se("net"),demoPrompt:"Try a {n}-leg card with a one-miss net — call every leg, then run it."},ladder:{summary:["Ladder pays as you climb. Pick ",me," or ",be," on every leg — reach the first rung and you start winning, and every rung after that stacks another prize on top."],steps:Se("ladder"),demoPrompt:"Try a {n}-leg ladder — the climb starts at {n1} right."},game_set:{summary:["Game Set Bet is straight sets. Pick ",me," or ",be," on every leg — each extra leg doubles the prize, and a clean card takes the lot."],steps:Se("ticket"),demoPrompt:"Try a quick {n}-leg ticket — call every leg, then run it."},pick_your_dividend:{summary:["Pick Your Dividend lets you choose the payout you are chasing. Pick ",me," or ",be," on every leg — land them all and the entry pays the dividend you picked."],steps:Se("dividend"),demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},mirror:{summary:["Mirror pays both ways. Pick ",me," or ",be," on every leg — get them all right, you win. Get them all wrong, you win the same. Anything in between is a split card and does not pay."],steps:Se("card"),demoPrompt:"Try a {n}-leg mirror — sweep it either way."},same_game_multi:{summary:["Same Game Multi keeps every leg inside one fixture. Pick ",me," or ",be," across the game — land every leg and the card pays."],steps:ke,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."}};function Be(e){if(!e)return null;const t=ge(e),n=Ce[t];if(!n)return null;const{min:o,max:r,demo:i}=function(e){const t=e.allowed_propositions?.filter(e=>e>0)??[],n=t.length>0?Math.min(...t):e.min_propositions??e.num_propositions??0,o=t.length>0?Math.max(...t):e.max_propositions??e.num_propositions??0;let r=3;return n>0&&(r=Math.max(r,n)),o>0&&(r=Math.min(r,o)),{min:n,max:o,demo:Math.min(Math.max(r,2),we.length)}}(e),l=e=>e.replace(/\{min\}/g,String(o>0?o:2)).replace(/\{max\}/g,String(r>0?r:12));return{id:t,...n,steps:n.steps.map(e=>({...e,detail:l(e.detail)})),demoLegs:we.slice(0,i),demoPrompt:l(n.demoPrompt).replace(/\{n1\}/g,xe[i-1]??String(i-1)).replace(/\{n\}/g,xe[i]??String(i))}}function ze(e,t,n=!0){const o=e.current;o&&("number"!=typeof o.scrollLeft?o.scrollTo?.({x:t,y:0,animated:n}):o.scroll({left:t}))}function Fe({theme:e,variant:t="primary",size:n="md",disabled:o,block:r,radius:i="md",onPress:l,onLongPress:d,style:h,children:u,accessibilityLabel:f}){const g=le(e),p=e.colors,y={sm:{h:36,px:g.space.md,fs:g.fontSize.sm},md:{h:g.touchTarget.min,px:g.space.lg,fs:g.fontSize.md},lg:{h:52,px:g.space.xl,fs:g.fontSize.lg}},m={sm:g.radius.sm,md:g.radius.md,lg:g.radius.lg,pill:g.radius.pill},b={primary:{bg:p.buttonPrimary,bgPressed:p.buttonPrimaryHover,fg:p.buttonPrimaryText,border:p.buttonPrimary},secondary:{bg:p.buttonSecondary,bgPressed:p.buttonSecondaryHover,fg:p.buttonSecondaryText,border:p.border},ghost:{bg:"transparent",bgPressed:te(p.text,g.isDark?.1:.06),fg:p.text,border:"transparent"},danger:{bg:p.error,bgPressed:te(p.error,.85),fg:"#ffffff",border:p.error}}[t],[w,x]=a.default.useState(!1);return(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!!o},disabled:o,onPress:l,onLongPress:d,onHoverIn:()=>x(!0),onHoverOut:()=>x(!1),style:({pressed:e})=>[{minHeight:y[n].h,paddingHorizontal:y[n].px,borderRadius:m[i],backgroundColor:!e&&!w||o?b.bg:b.bgPressed,borderColor:b.border,borderWidth:1,alignSelf:r?"stretch":"flex-start",alignItems:"center",justifyContent:"center",flexDirection:"row",opacity:o?.5:1,transform:[{scale:e&&!o?.985:1}]},h],children:"string"==typeof u?(0,s.jsx)(c.Text,{style:{color:b.fg,fontSize:y[n].fs,fontWeight:"500"},children:u}):u})}var ve={xs:{paddingVertical:3,paddingHorizontal:10,fontSize:11},sm:{paddingVertical:6,paddingHorizontal:14,fontSize:13},md:{paddingVertical:8,paddingHorizontal:18,fontSize:14}};function We(e,t,n,o,r){const i=le(e),l=ve[o];return{container:{paddingVertical:l.paddingVertical,paddingHorizontal:l.paddingHorizontal,borderRadius:i.radius.sm,alignItems:"center",justifyContent:"center",backgroundColor:t?n:"transparent",borderWidth:1,borderColor:t?"transparent":e.colors.border,opacity:r?.5:1},label:{fontSize:l.fontSize,fontWeight:"600",lineHeight:1.2*l.fontSize,color:t?"#ffffff":e.colors.text}}}function Te({theme:e,value:t,onYes:n,onNo:o,size:r="md",disabled:i,yesLabel:l="Yes",noLabel:a="No",style:d}){const h=We(e,"yes"===t,T(e),r,i),u=We(e,"no"===t,A(e),r,i);return(0,s.jsxs)(c.View,{style:[{flexDirection:"row",gap:8,flexShrink:0},d],children:[(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityState:{selected:"yes"===t,disabled:!!i},disabled:i,onPress:i?void 0:n,style:h.container,children:(0,s.jsx)(c.Text,{style:h.label,children:l})}),(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityState:{selected:"no"===t,disabled:!!i},disabled:i,onPress:i?void 0:o,style:u.container,children:(0,s.jsx)(c.Text,{style:u.label,children:a})})]})}function Ae({theme:e,value:t,size:n="md",style:o}){const r=le(e),i="sm"===n?10:11;return(0,s.jsx)(c.View,{style:[{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",paddingVertical:"sm"===n?2:3,paddingHorizontal:"sm"===n?8:10,borderRadius:r.radius.sm,backgroundColor:"yes"===t?T(e):A(e)},o],children:(0,s.jsx)(c.Text,{style:{fontSize:i,fontWeight:"700",letterSpacing:.04*i,textTransform:"uppercase",color:"#ffffff"},children:"yes"===t?"Yes":"No"})})}function Le({delay:e=0,style:t,children:n}){const o=function(e=0){const t=a.default.useRef(new c.Animated.Value(0)).current;return a.default.useEffect(()=>{let n=!1;const o=o=>{n||(o?t.setValue(1):c.Animated.timing(t,{toValue:1,duration:500,delay:e,easing:c.Easing.bezier(.2,.8,.2,1),useNativeDriver:"web"!==c.Platform.OS}).start())},r=c.AccessibilityInfo.isReduceMotionEnabled?.();r&&"function"==typeof r.then?r.then(o).catch(()=>o(!1)):o(!1);const i=c.AccessibilityInfo.addEventListener?.("reduceMotionChanged",e=>{e&&t.setValue(1)});return()=>{n=!0,i?.remove?.()}},[e,t]),{opacity:t,transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:[14,0]})}]}}(e);return(0,s.jsx)(c.Animated.View,{style:[t,o],children:n})}function Re({segments:e,theme:t,bodyFont:n}){return(0,s.jsx)(c.Text,{style:[De.summary,{color:t.colors.text,fontFamily:n}],children:e.map((e,n)=>"string"==typeof e?(0,s.jsx)(c.Text,{children:e},n):(0,s.jsx)(c.Text,{style:{fontWeight:"800",color:"yes"===e.tone?T(t):A(t)},children:e.text},n))})}function Me({panel:e,theme:t,dividends:n,bodyFont:o,headingFont:r}){const i=t.colors,l=t.brand?.accent??i.primaryText,d=D(t),[h,u]=(0,a.useState)("learn"),[f,g]=(0,a.useState)(()=>e.demoLegs.map(()=>null)),[p,y]=(0,a.useState)(!1),m=e.demoLegs.length,b=f.filter(e=>null!=e).length,w=b===m,x=e.demoLegs.filter((e,t)=>f[t]===e.outcome).length,k=function(e,t,n){const o=t===n,r=`${t} of ${n}`;switch(e){case"mirror":return o?{won:!0,message:`All ${n} right — that is the sweep, the card pays.`}:0===t?{won:!0,message:`All ${n} wrong — a full mirror sweep pays the same as perfect.`}:{won:!1,message:`${r} is a split card. Mirror pays all right or all wrong — nothing in between.`};case"ladder":return o?{won:!0,message:`Top rung — all ${n} right stacks every prize on the ladder into one payout.`}:t>=n-1?{won:!0,message:`${r} reaches a rung — it pays, and every extra leg right stacks the next prize on top.`}:{won:!1,message:`${r} does not reach the first rung — the climb starts at ${n-1} right.`};case"safety_net":return o?{won:!0,message:`Clean sweep — all ${n} right takes the full prize.`}:t===n-1?{won:!0,message:"One miss — the net catches it and the entry still pays."}:{won:!1,message:`${r} is more than the net holds — one miss is covered, two is not.`};case"game_set":return o?{won:!0,message:`Game, set, bet — all ${n} legs landed and the card pays.`}:{won:!1,message:`${r} — every leg has to land. Flip the misses and it is straight sets.`};case"pick_your_dividend":return o?{won:!0,message:`All ${n} right — the entry pays the dividend you picked.`}:{won:!1,message:`${r} — every leg has to land to collect your dividend.`};default:return o?{won:!0,message:`Perfect card — all ${n} legs landed, the prize is yours.`}:{won:!1,message:`${r} — one miss breaks a perfect card. Flip the misses and it pays.`}}}(e.id,x,m),S=(e,t)=>{p||g(n=>n.map((n,o)=>o===e?t:n))},C=p?"Settled":`${b} of ${m} called`,B=!p&&w,z=e=>[De.segment,{backgroundColor:e?i.primary:"transparent"}],F=e=>[De.segmentText,{color:e?i.primaryText:i.textMuted,fontFamily:r}];return(0,s.jsxs)(c.View,{children:[(0,s.jsxs)(c.View,{style:[De.segments,{borderColor:i.border,backgroundColor:i.backgroundAlt}],children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("learn"),accessibilityRole:"tab",accessibilityState:{selected:"learn"===h},style:z("learn"===h),children:(0,s.jsx)(c.Text,{style:F("learn"===h),children:"How it works"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("try"),accessibilityRole:"tab",accessibilityState:{selected:"try"===h},style:z("try"===h),children:(0,s.jsx)(c.Text,{style:F("try"===h),children:"Quick demo"})}),n?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("pay"),accessibilityRole:"tab",accessibilityState:{selected:"pay"===h},style:z("pay"===h),children:(0,s.jsx)(c.Text,{style:F("pay"===h),children:"Dividends"})}):null]}),"pay"===h?n:null,"learn"===h&&(0,s.jsxs)(c.View,{children:[(0,s.jsx)(Re,{segments:e.summary,theme:t,bodyFont:o}),(0,s.jsxs)(c.View,{style:[De.steps,De.stepsSpaced],children:[(0,s.jsx)(c.View,{pointerEvents:"none",style:[De.rail,{backgroundColor:te(i.primary,.25)}]}),e.steps.map((e,t)=>(0,s.jsxs)(c.View,{style:De.step,children:[(0,s.jsx)(c.View,{style:[De.stepTile,{backgroundColor:i.primary}],children:(0,s.jsx)(c.Text,{style:[De.stepTileText,{color:l,fontFamily:r}],children:t+1})}),(0,s.jsxs)(c.View,{style:De.stepText,children:[(0,s.jsx)(c.Text,{style:[De.stepTitle,{color:i.primary,fontFamily:r}],children:e.title}),(0,s.jsx)(c.Text,{style:[De.stepDetail,{color:i.textMuted,fontFamily:o}],children:e.detail})]})]},e.title))]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("try"),accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:[De.tryLink,{color:i.primary,fontFamily:r}],children:"Try a quick demo →"})})]}),"try"===h&&(0,s.jsxs)(c.View,{style:[De.slip,De.slipFlush,{borderColor:i.border,backgroundColor:d}],children:[(0,s.jsx)(c.View,{style:De.slipHead,children:(0,s.jsxs)(c.View,{style:De.slipHeadRow,children:[(0,s.jsx)(c.Text,{style:[De.prompt,De.promptGrow,{color:i.textMuted,fontFamily:o}],children:p?"Here is how it settled.":e.demoPrompt}),(0,s.jsx)(c.View,{style:[De.counter,B?{borderColor:i.primary,backgroundColor:i.primary}:{borderColor:te(i.border,.9),backgroundColor:"transparent"}],children:(0,s.jsx)(c.Text,{style:[De.counterText,{color:B?i.primaryText:i.textMuted,fontFamily:o}],children:C})})]})}),(0,s.jsx)(c.View,{style:De.legs,children:e.demoLegs.map((e,n)=>{const r=f[n]===e.outcome;return(0,s.jsxs)(c.View,{style:[De.leg,n>0&&{borderTopWidth:1,borderTopColor:te(i.border,.7)}],children:[(0,s.jsxs)(c.View,{style:De.legMain,children:[(0,s.jsx)(c.View,{style:[De.pip,p?{backgroundColor:r?i.success:i.error}:{borderWidth:1.5,borderColor:f[n]?i.primary:i.border}],children:(0,s.jsx)(c.Text,{style:[De.pipText,{color:p?"#fff":f[n]?i.primary:i.textMuted}],children:p?r?"✓":"✗":n+1})}),(0,s.jsx)(c.View,{style:De.legText,children:(0,s.jsx)(c.Text,{style:[De.legQuestion,{color:i.text,fontFamily:o}],children:e.question})})]}),p?(0,s.jsx)(Ae,{theme:t,size:"sm",value:e.outcome}):(0,s.jsx)(Te,{theme:t,size:"sm",value:f[n],onYes:()=>S(n,"yes"),onNo:()=>S(n,"no")})]},e.question)})}),(0,s.jsx)(c.View,{style:[De.perforation,{borderTopColor:te(i.border,.9)}]}),(0,s.jsx)(c.View,{style:De.slipFoot,children:p?(0,s.jsxs)(c.View,{children:[(0,s.jsxs)(c.View,{style:[De.verdict,{backgroundColor:k.won?i.successBg:i.errorBg}],children:[(0,s.jsx)(c.View,{style:[De.stamp,{borderColor:k.won?i.successText:i.errorText}],children:(0,s.jsx)(c.Text,{style:[De.stampText,{color:k.won?i.successText:i.errorText,fontFamily:r}],children:k.won?"Winner":"No win"})}),(0,s.jsx)(c.Text,{style:[De.verdictText,{color:k.won?i.successText:i.errorText,fontFamily:o}],children:k.message})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{g(e.demoLegs.map(()=>null)),y(!1)},accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:[De.tryAgain,{color:i.textMuted,fontFamily:o}],children:"↺ Deal it again"})})]}):(0,s.jsx)(Fe,{theme:t,size:"sm",block:!0,disabled:!w,onPress:()=>y(!0),children:"Run the demo"})})]})]})}var De=c.StyleSheet.create({summary:{fontSize:15,lineHeight:23},segments:{flexDirection:"row",gap:2,borderWidth:1,borderRadius:10,padding:2,marginBottom:14},segment:{flex:1,borderRadius:8,paddingVertical:6,alignItems:"center"},segmentText:{fontSize:11,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1},tryLink:{marginTop:6,paddingLeft:50,fontSize:12.5,fontWeight:"700"},stepsSpaced:{marginTop:12},slipFlush:{marginTop:0},promptGrow:{flex:1,minWidth:0,marginTop:0},steps:{position:"relative"},rail:{position:"absolute",left:17,top:16,bottom:16,width:1},step:{justifyContent:"center",gap:2,paddingVertical:8,paddingLeft:50,minHeight:52},stepTile:{position:"absolute",left:0,top:"50%",marginTop:-18,width:36,height:36,borderRadius:10,alignItems:"center",justifyContent:"center"},stepTileText:{fontSize:16,fontWeight:"800"},stepText:{gap:2},stepTitle:{fontSize:14.5,fontWeight:"700",lineHeight:19},stepDetail:{fontSize:13,lineHeight:18},slip:{marginTop:16,borderWidth:1,borderRadius:12,overflow:"hidden"},slipHead:{paddingHorizontal:14,paddingTop:12},slipHeadRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:10},counter:{borderWidth:1,borderRadius:999,paddingHorizontal:8,paddingVertical:2},counterText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1,fontVariant:["tabular-nums"]},prompt:{fontSize:12.5,marginTop:4},legs:{paddingHorizontal:14,marginTop:6},leg:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingVertical:10},legMain:{flexDirection:"row",alignItems:"flex-start",gap:10,flex:1,minWidth:0},pip:{marginTop:2,width:18,height:18,borderRadius:9,alignItems:"center",justifyContent:"center"},pipText:{fontSize:10,fontWeight:"800",lineHeight:13},legText:{flex:1,minWidth:0},legQuestion:{fontSize:13,fontWeight:"600",lineHeight:18},perforation:{marginHorizontal:14,borderTopWidth:1.5,borderStyle:"dashed"},slipFoot:{paddingHorizontal:14,paddingTop:12,paddingBottom:14},verdict:{flexDirection:"row",alignItems:"center",gap:12,borderRadius:8,paddingHorizontal:12,paddingVertical:10},stamp:{borderWidth:2,borderRadius:6,paddingHorizontal:6,paddingVertical:2,transform:[{rotate:"-3deg"}],flexShrink:0},stampText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4},verdictText:{flex:1,fontSize:12.5,fontWeight:"600",lineHeight:17},tryAgain:{marginTop:8,fontSize:11.5,fontWeight:"700"}});function Pe({text:e,colors:t}){return(0,s.jsx)(c.Text,{children:z(e).map((e,n)=>(0,s.jsx)(c.Text,{style:{fontWeight:e.bold?"700":"400",color:e.bold?t.text:t.textMuted},children:e.text},n))})}function He({content:e,colors:t}){const n=x(e);let o=null;try{o=require("react-native-webview").WebView}catch{o=null}return o?(0,s.jsx)(o,{source:{html:n},style:{minHeight:420,width:"100%"},originWhitelist:["*"],scrollEnabled:!0}):(0,s.jsx)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted},children:"This guide uses HTML. Install react-native-webview in the host app to display it on native."})}function Oe({rows:e}){return(0,s.jsx)(c.View,{style:{gap:0,marginVertical:6},children:e.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",borderWidth:1,borderColor:u,borderTopWidth:0===t?1:0},children:[(0,s.jsx)(c.View,{style:{flex:2.2,backgroundColor:"#F9FAFB",paddingVertical:11,paddingHorizontal:14,borderRightWidth:1,borderRightColor:u},children:(0,s.jsx)(c.Text,{style:{fontSize:15,color:"#1A1A1A"},children:e.question})}),(0,s.jsx)(c.View,{style:{flex:.65,backgroundColor:"#DCFCE7",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center",borderRightWidth:1,borderRightColor:u},children:(0,s.jsx)(c.Text,{style:{fontSize:15,fontWeight:"700",color:"#166534"},children:"YES"})}),(0,s.jsx)(c.View,{style:{flex:.65,backgroundColor:"#FEE2E2",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:{fontSize:15,fontWeight:"700",color:"#991B1B"},children:"NO"})})]},t))})}function Ie({content:e,colors:t,bodyFont:n,headingFont:o}){return(0,s.jsx)(c.View,{style:{gap:14},children:B(e).map((e,r)=>"heading"===e.type?(0,s.jsx)(c.Text,{style:{fontSize:{1:20,2:18,3:16}[e.level],fontWeight:"800",color:t.text,textTransform:1===e.level?"uppercase":"none",fontFamily:o??n},children:(0,s.jsx)(Pe,{text:e.text,colors:t})},r):"paragraph"===e.type?(0,s.jsx)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:(0,s.jsx)(Pe,{text:e.text,colors:t})},r):"list"===e.type?(0,s.jsx)(c.View,{style:{gap:6,paddingLeft:8},children:e.items.map((e,o)=>(0,s.jsxs)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:["• ",(0,s.jsx)(Pe,{text:e,colors:t})]},o))},r):"propsTable"===e.type?(0,s.jsx)(Oe,{rows:e.rows},r):(0,s.jsx)(c.View,{style:{height:1,backgroundColor:t.border,marginVertical:4}},r))})}function Ee({content:e,panel:t,theme:n,extra:o,title:r="How to Play",label:i="How to Play",variant:l="pill",colors:d,bodyFont:h,headingFont:u}){const[f,g]=(0,a.useState)(!1),{width:p}=(0,c.useWindowDimensions)(),x=p>=640,k=!(!t||!n);if(!e?.trim()&&!k&&!o)return null;const S=!k&&!!e&&function(e){const t=e.trim();if(!t)return!1;if(w(t))return!0;const n=y(t);return!!m.test(n)||b.test(t)}(e);return(0,s.jsxs)(s.Fragment,{children:["icon"===l?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>g(!0),style:[je.iconButton,{borderColor:d.primary,backgroundColor:`${d.primary}14`}],accessibilityRole:"button",accessibilityLabel:i,children:(0,s.jsx)(c.Text,{style:[je.iconButtonText,{color:d.primary,fontFamily:h}],children:"?"})}):(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>g(!0),style:[je.button,{borderColor:d.primary,backgroundColor:`${d.primary}10`}],accessibilityRole:"button",accessibilityLabel:i,children:[(0,s.jsx)(c.Text,{style:[je.buttonText,{color:d.primary,fontFamily:h}],children:i}),(0,s.jsx)(c.Text,{style:[je.buttonText,{color:d.primary,fontFamily:h}],children:"?"})]}),(0,s.jsx)(c.Modal,{visible:f,animationType:"none",transparent:!0,onRequestClose:()=>g(!1),children:(0,s.jsxs)(c.View,{style:[je.overlay,x?{justifyContent:"center",alignItems:"center",padding:16}:{justifyContent:"flex-end"}],children:[(0,s.jsx)(c.Pressable,{style:c.StyleSheet.absoluteFill,onPress:()=>g(!1)}),(0,s.jsxs)(c.View,{style:[je.sheet,x?{maxWidth:672,maxHeight:"85%",borderRadius:16}:{maxHeight:"88%",borderTopLeftRadius:16,borderTopRightRadius:16},{backgroundColor:d.background,borderColor:d.border}],children:[(0,s.jsx)(c.View,{style:[je.header,{paddingHorizontal:x?24:16,borderBottomColor:d.border,backgroundColor:d.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[je.title,{color:d.text,fontFamily:u??h}],children:r})}),(0,s.jsx)(c.ScrollView,{contentContainerStyle:S?void 0:{paddingHorizontal:x?24:16,paddingVertical:20},children:k?(0,s.jsx)(Me,{panel:t,theme:n,dividends:o,bodyFont:h,headingFont:u}):(0,s.jsxs)(s.Fragment,{children:[S?(0,s.jsx)(He,{content:e,colors:d}):(0,s.jsx)(Ie,{content:e??"",colors:d,bodyFont:h,headingFont:u}),o?(0,s.jsx)(c.View,{style:S?{paddingHorizontal:x?24:16,paddingBottom:20}:{marginTop:16},children:o}):null]})}),(0,s.jsx)(c.SafeAreaView,{style:[je.footer,{paddingHorizontal:x?24:16,borderTopColor:d.border,backgroundColor:d.backgroundAlt}],children:(0,s.jsx)(c.TouchableOpacity,{onPress:()=>g(!1),style:[je.doneButton,{alignSelf:"stretch",alignItems:"center",backgroundColor:d.primary}],children:(0,s.jsx)(c.Text,{style:[je.doneText,{color:d.primaryText,fontFamily:h}],children:"Got it"})})})]})]})})]})}var je=c.StyleSheet.create({button:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},buttonText:{fontSize:12,fontWeight:"600"},iconButton:{width:21,height:21,borderRadius:11,borderWidth:1,alignItems:"center",justifyContent:"center",flexShrink:0},iconButtonText:{fontSize:12,fontWeight:"800",lineHeight:15},overlay:{flex:1,backgroundColor:"rgba(0,0,0,0.55)"},sheet:{width:"100%",borderWidth:1,overflow:"hidden",shadowColor:"#000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:25,elevation:24},header:{paddingTop:12,paddingBottom:16,borderBottomWidth:1},title:{fontSize:18,fontWeight:"700"},footer:{paddingVertical:16,borderTopWidth:1},doneButton:{borderRadius:12,paddingVertical:13,paddingHorizontal:20},doneText:{fontSize:14,fontWeight:"700"}});function Ne({category:e,size:t=14,color:n="currentColor"}){const o=n,r=2.25;switch(e){case"casino":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M10.348 3.169l-7.15 3.113a2 2 0 0 0 -1.03 2.608l4.92 11.895a1.96 1.96 0 0 0 2.59 1.063l7.142 -3.11a2.002 2.002 0 0 0 1.036 -2.611l-4.92 -11.894a1.96 1.96 0 0 0 -2.588 -1.064z",fill:n}),(0,s.jsx)(d.Path,{d:"M16 3a2 2 0 0 1 1.995 1.85l.005 .15v3.5a1 1 0 0 1 -1.993 .117l-.007 -.117v-3.5h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",fill:n}),(0,s.jsx)(d.Path,{d:"M19.08 5.61a1 1 0 0 1 1.31 -.53c.257 .108 .505 .21 .769 .314a2 2 0 0 1 1.114 2.479l-.056 .146l-2.298 5.374a1 1 0 0 1 -1.878 -.676l.04 -.11l2.296 -5.371l-.366 -.148l-.402 -.167a1 1 0 0 1 -.53 -1.312z",fill:n})]});case"racing":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M7 10l-.85 8.507a1.357 1.357 0 0 0 1.35 1.493h.146a2 2 0 0 0 1.857 -1.257l.994 -2.486a2 2 0 0 1 1.857 -1.257h1.292a2 2 0 0 1 1.857 1.257l.994 2.486a2 2 0 0 0 1.857 1.257h.146a1.37 1.37 0 0 0 1.364 -1.494l-.864 -9.506h-8c0 -3 -3 -5 -6 -5l-3 6l2 2l3 -2",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M22 14v-2a3 3 0 0 0 -3 -3",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]});case"women":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M7 9a5 5 0 1 0 10 0a5 5 0 1 0 -10 0",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 14v7",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M9 18h6",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]});default:return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 7l4.76 3.45l-1.76 5.55h-6l-1.76 -5.55l4.76 -3.45",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 7v-4m3 13l2.5 3m-.74 -8.55l3.74 -1.45m-11.44 7.05l-2.56 2.95m.74 -8.55l-3.74 -1.45",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]})}}function Ge({size:e=20,color:t="currentColor"}){return(0,s.jsx)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ye({size:e=20,color:t="currentColor"}){return(0,s.jsxs)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M8 11V7a4 4 0 1 1 8 0v4",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ve({size:e=20,color:t="currentColor"}){return(0,s.jsx)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M21 4H3l7.2 8.5V19l3.6 2v-8.5L21 4z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ue({label:e,category:t,icon:n,theme:o,disabled:r=!1}){const i=o.colors,l=se(o),{width:a}=(0,c.useWindowDimensions)(),d=a>=480?20:a>=400?18:16,h=r?i.textMuted:i.textAlt??i.text,u=r?i.border:o.brand?.chip??i.primary,f=r?i.textMuted:o.brand?.icon??i.primaryText??i.buttonPrimaryText;return(0,s.jsxs)(c.View,{style:[Ze.row,{gap:.25*d}],children:[(0,s.jsxs)(c.Text,{accessibilityLabel:"YESNO",style:{fontSize:d,lineHeight:1.15*d,letterSpacing:-1,color:h,fontFamily:l},children:[(0,s.jsx)(c.Text,{style:Ze.yes,children:"YES"}),(0,s.jsx)(c.Text,{style:Ze.no,children:"NO"})]}),(0,s.jsx)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:e,style:[Ze.pill,{width:1.6*d,height:.85*d,borderRadius:.425*d,backgroundColor:u,transform:[{translateY:.02*-d}]}],children:n??(0,s.jsx)(Ne,{category:t,size:.6*d,color:f})}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"500",fontSize:d,lineHeight:1.15*d,flexShrink:1,minWidth:0,color:h,fontFamily:l,includeFontPadding:!1},children:e}),(0,s.jsx)(c.Text,{style:{fontSize:.3*d,lineHeight:.3*d,fontWeight:"600",marginLeft:.06*d,color:h,fontFamily:l,includeFontPadding:!1},children:"TM"})]})]})}var Ze=c.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",maxWidth:"100%"},yes:{fontWeight:"900"},no:{fontWeight:"300"},pill:{alignItems:"center",justifyContent:"center",flexShrink:0}});function Ke({groups:e,theme:t,bodyFont:n}){const o=t.colors,r=(0,a.useRef)(null),i=(0,a.useRef)(0),l=(0,a.useRef)(0),d=(0,a.useRef)(0),[h,u]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),p=()=>{const e=d.current-l.current;u(i.current>2),g(i.current<e-2)},y=e=>{ze(r,Math.max(0,i.current+e*Math.round(.7*l.current)))},m=o.background??"#fff";return 0===e.length?null:(0,s.jsxs)(c.View,{style:Xe.wrap,children:[(0,s.jsx)(c.ScrollView,{ref:r,horizontal:!0,showsHorizontalScrollIndicator:!1,onScroll:e=>{i.current=e.nativeEvent.contentOffset.x,p()},onLayout:e=>{l.current=e.nativeEvent.layout.width,p()},onContentSizeChange:e=>{d.current=e,p()},scrollEventThrottle:32,contentContainerStyle:Xe.chips,children:e.map((e,t)=>(0,s.jsxs)(a.default.Fragment,{children:[t>0&&(0,s.jsx)(c.View,{style:[Xe.divider,{backgroundColor:o.border}]}),e.label?(0,s.jsx)(c.Text,{style:[Xe.groupLabel,{color:o.textMuted,fontFamily:n}],children:e.label}):null,e.options.map(t=>{const r=t.value===e.value;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>e.onChange(t.value),activeOpacity:.8,style:[Xe.chip,{borderColor:r?o.primary:o.border,backgroundColor:r?o.primary:m}],children:(0,s.jsx)(c.Text,{style:[Xe.chipText,{color:r?o.primaryText:o.primary,fontFamily:n}],children:t.label})},t.value??"__all")})]},e.label??t))}),h&&(0,s.jsx)(c.TouchableOpacity,{accessibilityLabel:"Scroll left",onPress:()=>y(-1),style:[Xe.nav,Xe.navLeft,{backgroundColor:m,borderColor:o.border}],children:(0,s.jsx)(c.View,{style:Xe.navFlip,children:(0,s.jsx)(Ge,{size:14,color:o.primary})})}),f&&(0,s.jsx)(c.TouchableOpacity,{accessibilityLabel:"Scroll right",onPress:()=>y(1),style:[Xe.nav,Xe.navRight,{backgroundColor:m,borderColor:o.border}],children:(0,s.jsx)(Ge,{size:14,color:o.primary})})]})}function qe({label:e,options:t,value:n,onChange:o,theme:r,bodyFont:i}){return(0,s.jsx)(Ke,{groups:[{label:e,options:t,value:n,onChange:o}],theme:r,bodyFont:i})}var Xe=c.StyleSheet.create({wrap:{position:"relative",minWidth:0},chips:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2,paddingVertical:2},groupLabel:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4,flexShrink:0},divider:{width:1,height:20,flexShrink:0},chip:{borderWidth:1,borderRadius:999,paddingHorizontal:14,paddingVertical:6,flexShrink:0},chipText:{fontSize:12,fontWeight:"700",letterSpacing:-.12},nav:{position:"absolute",top:"50%",marginTop:-13,width:26,height:26,borderRadius:13,borderWidth:1,alignItems:"center",justifyContent:"center",shadowColor:"#0F4C5C",shadowOpacity:.35,shadowRadius:5,shadowOffset:{width:0,height:4},elevation:3},navLeft:{left:-2},navRight:{right:-2},navFlip:{transform:[{rotate:"180deg"}]}});function Qe(e){return(e.propositionType??e.proposition_type)?.trim()||void 0}function Je(e){return(e.description??e.proposition??"").trim()}var $e={AND:/\s+AND\s+/,OR:/\s+OR\s+/};function _e(e){return"composite_and"===(t=Qe(e))||"composite_or"===t;var t}function et(e){const t=e.source_data;if(!t)return[];try{const e=JSON.parse(t)?.composite?.components;return Array.isArray(e)?e.filter(e=>"number"==typeof e&&Number.isFinite(e)):[]}catch{return[]}}function tt(e){const t=e.home_team?.trim(),n=e.away_team?.trim();if(t&&n)return`${t} vs ${n}`;if(t)return t;if(n)return n;const o=e.eventId??e.event_id;return o?.trim()?o.trim():null}function nt(e,t){if(!_e(e))return null;const n=function(e){return _e(e)?("composite_and"===(t=Qe(e))?"AND":"composite_or"===t?"OR":null)||function(e){const t=e.source_data;if(!t)return null;try{const e=JSON.parse(t)?.composite?.operator;if("and"===e)return"AND";if("or"===e)return"OR"}catch{return null}return null}(e):null;var t}(e);if(!n)return null;const o=et(e);if(t&&o.length>=2){const e=[];for(const n of o){const o=t.get(n);o&&e.push({text:Je(o),eventLabel:tt(o)})}if(e.length>=2)return{operator:n,legs:e}}const r=function(e,t){const n=e.trim();if(!n)return null;const o=n.split($e[t]).map(e=>e.trim()).filter(Boolean);return o.length<2?null:o}(Je(e),n);return r?{operator:n,legs:r.map(e=>({text:e,eventLabel:null}))}:null}var ot="#0F4C5C",rt={aussierules_afl:"AFL",rugbyleague_nrl:"NRL",basketball_nba:"NBA",basketball_ncaab:"CBB",americanfootball_nfl:"NFL",americanfootball_ncaaf:"CFB",soccer_epl:"EPL",soccer_italy_serie_a:"SEA",soccer_spain_la_liga:"LIG",soccer_germany_bundesliga:"BUN",soccer_usa_mls:"MLS",baseball_mlb:"MLB",icehockey_nhl:"NHL",horse_racing_aus:"RLT",roulette:"RLT",dice:"DCE",cointrio:"CT3"},it={sports:"Pick the winners",casino:"Beat the house",racing:"Back a winner"};function lt(e,t,n){if(n)return n.slice(0,4).toUpperCase();const o=rt[e];if(o)return o;if(t&&e.startsWith(`${t}_`)){const n=e.slice(t.length+1).replace(/_/g," ").split(/\s+/).filter(Boolean).map(e=>e[0]).join("").slice(0,4).toUpperCase();if(n)return n}return e.startsWith("casino_")?e.slice(7,11).toUpperCase()||"CSN":e.slice(0,3).toUpperCase()||"·"}function at(e){return!!e.is_composite_component||!!(t=Qe(e))&&t.startsWith("co_");var t}function ct(e){if(null==e)return 0;const t=Number(e);return Number.isFinite(t)?t:0}function st(e){return"string"==typeof e?"true"===e.toLowerCase():!!e}function dt(e){return"yes"===e.toLowerCase()?"Yes":"No"}function ht(e){const t=Number.isInteger(e);return new Intl.NumberFormat("en-AU",{style:"currency",currency:"AUD",minimumFractionDigits:t?0:2,maximumFractionDigits:2}).format(e)}function ut(e){const t="string"==typeof e?new Date(e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:e+"Z"):e;return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}).format(t)}function ft(e){return e.reduce((t,n)=>{const o=gt(n,e);return t[o]||(t[o]=[]),t[o].push(n),t},{})}function gt(e,t){if(e.sport)return e.sport;if(_e(e)&&t)for(const n of et(e)){const e=t.find(e=>e.id===n);if(e?.sport)return e.sport}return"Other"}var pt=["sports","casino","racing"];function yt(e){const t=(e.category||"").toLowerCase(),n=e.sport||"",o=Qe(e).toLowerCase();return"casino"===t||"casino"===o||n.startsWith("casino")?"casino":"racing"===t||n.startsWith("horse_racing")?"racing":"sports"}function mt(e){return"racing"===yt(e)}function bt(e){const t={};for(const n of e){const e=yt(n);t[e]||(t[e]=[]),t[e].push(n)}return t}function wt(e){const t=bt(e);return pt.filter(e=>(t[e]?.length??0)>0)}function xt(e){switch(e){case"casino":return"Choose a Game";case"racing":return"Choose a Meeting";default:return"Choose a Sport"}}function kt(e,t,n,o){return o&&o.length>0?o.includes(e):!(void 0!==t&&e<t||void 0!==n&&e>n)}function St(e,t,n){const o=n?.min_propositions??null,r=n?.max_propositions??null,i=(n?.allowed_propositions??e.allowed_propositions)?.filter(e=>(null==o||e>=o)&&(null==r||e<=r));if(i&&i.length>0)return null!=t&&i.includes(t)?{min:t,max:t}:{min:Math.min(...i),max:Math.max(...i)};const l=e.min_propositions??e.num_propositions??0,a=e.max_propositions??e.num_propositions??0;return{min:null!=o?Math.max(l,o):l,max:null!=r&&a>0?Math.min(a,r):r??a}}function Ct(e){const t=e.allocations?.find(e=>"jackpot"===e.allocation_type);return t&&(t.dollar_amount??0)>0?{enabled:!0,amount:t.dollar_amount,limit:e.jackpot_limit??0,progressive:!1}:!0===e.jackpot_enabled&&t&&t.percentage>0?{enabled:!0,amount:e.jackpot_amount??0,limit:e.jackpot_limit??0,progressive:!0}:!0===e.jackpot_enabled&&(e.jackpot_amount??0)>0?{enabled:!0,amount:e.jackpot_amount,limit:e.jackpot_limit??0,progressive:!1}:{enabled:!1,amount:0,limit:0,progressive:!1}}function Bt(e,t){const n={basketball_nba:"NBA Basketball",americanfootball_nfl:"NFL Football",icehockey_nhl:"NHL Hockey",baseball_mlb:"MLB Baseball",soccer_epl:"Premier League",soccer_usa_mls:"MLS Soccer",horse_racing_aus:"Horse Racing",casino_blackjack:"Blackjack",casino_roulette:"Roulette",casino_slots:"Slots",aussierules_afl:"AFL",rugbyleague_nrl:"NRL","AUSTRALIAN-RULES":"AFL","RUGBY-LEAGUE":"NRL",cricket_international_t20:"T20 International",cricket_test_match:"Test Cricket"};return e.startsWith("casino_")?n[e]??e.replace(/^casino_/,"").replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):t&&e.startsWith(`${t}_`)?e.slice(t.length+1).replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):n[e]||e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function zt(e,t,n){const o=t?.[e];return o||Bt(e,n)}function Ft(e,t){const n=t?.[e];return n||function(e){return{sports:"Sports",casino:"Casino",racing:"Racing"}[e]??e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}(e)}function vt(e,t){if(e)return t&&e.startsWith(`${t}_`)?t:e}function Wt(e,t,n){return e===t||!!n&&(!(t!==n||!e.startsWith(`${n}_`))||!(e!==n||!t.startsWith(`${n}_`)))}function Tt(e,t,n){return!t||!!e&&(Wt(e,t,n)||Wt(t,e,n))}function At(e,t){return t.find(t=>t.id===e)}function Lt(e,t){let n=e;return t?.category&&(n=n.filter(e=>yt(e)===t.category)),t?.sport&&(n=n.filter(n=>_e(n)?function(e,t,n,o){if(Tt(e.sport,t,n))return!0;if(!o)return!1;for(const r of et(e)){const e=At(r,o);if(e&&Tt(e.sport,t,n))return!0}return!1}(n,t.sport,t.sportBaseKey,e):Tt(n.sport,t.sport,t.sportBaseKey))),n}function Rt(e,t){return!t||function(e){const t=(e.category||"sports").toLowerCase();return"casino"===t||"racing"===t?t:"sports"}(e)===t}function Mt(e,t,n){if(!t)return!0;const o=e.allowed_sports;return!o||0===o.length||o.some(e=>Wt(t,e,n))}function Dt(e,t,n){return!(n?.category&&!Rt(e,n.category))&&!(n?.sport&&!Mt(e,n.sport,n.sportBaseKey))&&Lt(Ht(t,e),n).length>0}function Pt(e,t){return t?.category||t?.sport?e.filter(e=>!(t.category&&!Rt(e,t.category)||t.sport&&!Mt(e,t.sport,t.sportBaseKey))):e}function Ht(e,t,n){const o=t.allowed_sports,r=o&&o.length>0,i=t.allowed_markets&&t.allowed_markets.length>0;return r||i?e.filter(l=>{if(at(l))return!1;if(r)if(_e(l)){if(!function(e,t,n,o){if(e.sport&&t.some(t=>Wt(e.sport,t,n)))return!0;if(!o)return!1;for(const r of et(e)){const e=At(r,o);if(e?.sport&&t.some(t=>Wt(e.sport,t,n)))return!0}return!1}(l,o,n,e))return!1}else if(!l.sport||!o.some(e=>Wt(l.sport,e,n)))return!1;return!(i&&!function(e,t){const n=t.allowed_markets;if(!n||0===n.length)return!0;const o=Qe(e);return!!o&&n.includes(o)}(l,t))}):e.filter(e=>!at(e))}function Ot(e,t){const n=e.available_days;if(!n)return!0;if(0===n.length)return!0;const o=((t??new Date).getDay()+6)%7;return n.includes(o)}var It=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function Et(e,t,n){return function(e,t,n){return"racing"===e||!(!t?.length||!t.every(mt))||!!n&&Boolean(t?.some(e=>e.sport===n||(e.sport||"").startsWith(`${n}_`)))}(t,e,n)?function(e){return e.reduce((e,t)=>{const n=t.away_team||t.eventId||"Race";return e[n]||(e[n]=[]),e[n].push(t),e},{})}(e):function(e){return e.reduce((e,t)=>{const n=`${t.home_team} vs ${t.away_team}`;return e[n]||(e[n]=[]),e[n].push(t),e},{})}(e)}function jt(e){const t=[];for(const n of e){const e=n.home_team&&n.away_team&&!mt(n)?`${n.home_team} vs ${n.away_team}`:n.away_team||n.home_team||n.eventId||null,o=t[t.length-1],r=null===e?null:t.find(t=>t.key===e);r?r.props.push(n):null===e&&null===o?.key?o.props.push(n):t.push({key:e,props:[n]})}return t}function Nt(e,t){if(e===t)return[e];if(t<e)return[e];const n=[];for(let o=e;o<=t;o++)n.push(o);return n}function Gt(e,t){const n=[...e].sort(()=>Math.random()-.5).slice(0,t),o=[],r=[];for(const i of n)Math.random()<.5?o.push(i):r.push(i);return{yesPicks:o,noPicks:r}}var Yt=new Map,Vt=new Map;function Ut(e,t,n){let o=e;return t&&(o=o.replace(/currentColor/g,t)),n?o=o.replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n):(o=o.replace(/var\(\s*--icon-accent\s*,\s*([^)]+)\)/g,"$1"),o=o.replace(/var\(\s*--icon-accent\s*\)/g,"currentColor")),o}function Zt({iconUrl:e,width:t,height:n,iconColor:o,accentColor:r,accessibilityLabel:i}){const l=ye(e),[h,u]=a.default.useState(()=>l??Yt.get(e)??null);return a.default.useEffect(()=>{const t=ye(e);if(t)return void u(t);if(Yt.has(e))return void u(Yt.get(e));let n=!1;return function(e){const t=Yt.get(e);if(void 0!==t)return Promise.resolve(t);const n=Vt.get(e);if(n)return n;const o=fetch(e).then(e=>{if(!e.ok)throw new Error(`SVG fetch failed: ${e.status}`);return e.text()}).then(t=>(Yt.set(e,t),Vt.delete(e),t)).catch(t=>{throw Vt.delete(e),t});return Vt.set(e,o),o}(e).then(e=>{n||u(e)}).catch(()=>{n||u(null)}),()=>{n=!0}},[e]),h?(0,s.jsx)(d.SvgXml,{xml:Ut(h,o,r),width:t,height:n,accessibilityLabel:i}):(0,s.jsx)(c.Image,{source:{uri:e},style:{width:t,height:n},resizeMode:"contain",accessibilityLabel:i})}function Kt({iconUrl:e,gameName:t,onPress:n,size:o=120,brandColor:r="#0F4C5C",cardColor:i="#DDD9D2",iconColor:l,accentColor:h,captionColor:u="#14687C",accessibilityLabel:f}){const[g,p]=a.default.useState(!1),[y,m]=a.default.useState(!1),b=(t||"").toUpperCase(),w=170,x=o/360,k=l??i,S=a.default.useRef(new c.Animated.Value(0)).current,C=e=>({position:"absolute",left:40*x,top:5*x,width:210*x,height:210*x,borderRadius:42*x,backgroundColor:r,opacity:e}),B=e=>({transform:[{translateX:S.interpolate({inputRange:[0,1],outputRange:[e*x,0]})},{translateY:S.interpolate({inputRange:[0,1],outputRange:[e*x,0]})}]}),z=!!n&&(g||y);a.default.useEffect(()=>{c.Animated.timing(S,{toValue:z?1:0,duration:220,useNativeDriver:"web"!==c.Platform.OS}).start()},[z,S]);const F=()=>(0,s.jsxs)(c.View,{style:[qt.container,{width:o,height:o}],children:[(0,s.jsxs)(d.default,{viewBox:"0 0 360 360",width:o,height:o,children:[(0,s.jsx)(d.Rect,{x:2,y:2,width:356,height:356,rx:78,fill:i,stroke:r,strokeWidth:4}),(0,s.jsx)(d.Text,{x:180,y:305,fontFamily:"Manrope, Poppins, sans-serif",fontSize:32,letterSpacing:1.5,fontWeight:"800",textAnchor:"middle",fill:r,children:"PRESS TO PLAY"}),(0,s.jsx)(d.Text,{x:180,y:338,fontFamily:"Manrope, Poppins, sans-serif",fontSize:18,letterSpacing:2,fontWeight:"500",textAnchor:"middle",fill:u,children:b})]}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[C(.3),B(50)]}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[C(.55),B(25)]}),(0,s.jsx)(c.View,{pointerEvents:"none",style:C(1)}),(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",left:60*x,top:25*x,width:w*x,height:w*x},children:(0,s.jsx)(Zt,{iconUrl:e,width:w*x,height:w*x,iconColor:k,accentColor:h})})]});return n?(0,s.jsx)(c.Pressable,{onPress:n,onPressIn:()=>m(!0),onPressOut:()=>m(!1),onHoverIn:"web"===c.Platform.OS?()=>p(!0):void 0,onHoverOut:"web"===c.Platform.OS?()=>p(!1):void 0,accessibilityRole:"button",accessibilityLabel:f??`Press to play ${t}`,style:{width:o,height:o,borderRadius:o/360*78,transform:[{scale:y?.96:1}]},children:F()}):F()}var qt=c.StyleSheet.create({container:{position:"relative"}});function Xt({visible:e,anchor:t,onClose:n,flipUp:o=!1,align:r="left",gap:i=6,children:l}){if(!e||!t)return null;const a=c.Dimensions.get("window"),d=o?{bottom:Math.max(0,a.height-t.y+i)}:{top:t.y+t.height+i},h="right"===r?{right:Math.max(0,a.width-(t.x+t.width))}:{left:Math.max(0,t.x)};return(0,s.jsxs)(c.Modal,{transparent:!0,visible:!0,animationType:"none",onRequestClose:n,children:[(0,s.jsx)(c.Pressable,{style:c.StyleSheet.absoluteFill,onPress:n}),(0,s.jsx)(c.View,{style:{position:"absolute",...d,...h},onStartShouldSetResponder:()=>!0,children:l})]})}function Qt(e){return e.homeTeam&&e.awayTeam?`${e.homeTeam} vs ${e.awayTeam}`:e.homeTeam??e.awayTeam??e.id}function Jt(e){return(e??"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function $t(e){if(!e||e.quick_pick_only)return!1;const t=Jt(e.selection_scope);if("samegamemulti"===Jt(e.rule)||!0===e.require_same_event||"singleevent"===t||"sameevent"===t)return!0;const n=[e.game_name,e.game_name_template].map(Jt);return n.includes("samegame")||n.includes("samegamemulti")}function _t(e){return(e.eventId??e.event_id)?.trim()||null}function en(e){const t=new Map;for(const n of e){if(!rn(n))continue;const e=_t(n);if(!e)continue;const o=t.get(e);o?(o.propositionCount+=1,o.homeTeam=tn(o.homeTeam,n.home_team),o.awayTeam=tn(o.awayTeam,n.away_team),o.sport=tn(o.sport,n.sport),o.league=tn(o.league,n.league),o.commenceTime=on(o.commenceTime,n.commence_time)):t.set(e,{id:e,homeTeam:n.home_team?.trim()||void 0,awayTeam:n.away_team?.trim()||void 0,commenceTime:n.commence_time?.trim()||void 0,sport:n.sport?.trim()||void 0,league:n.league?.trim()||void 0,propositionCount:1})}return[...t.values()].sort((e,t)=>{const n=nn(e.commenceTime),o=nn(t.commenceTime);return n!==o?n-o:e.id.localeCompare(t.id)})}function tn(e,t){const n=t?.trim();return n?e&&e.localeCompare(n)<=0?e:n:e}function nn(e){if(!e)return Number.MAX_SAFE_INTEGER;const t=new Date(e).getTime();return Number.isFinite(t)?t:Number.MAX_SAFE_INTEGER}function on(e,t){const n=t?.trim();if(!n)return e;if(!e)return n;const o=nn(e),r=nn(n);return r!==o?r<o?n:e:e.localeCompare(n)<=0?e:n}function rn(e){return!1!==e.bettable&&!0!==e.is_suspended&&!0!==e.is_expired&&!0!==e.is_voided&&!0!==e.is_composite_component}function ln(e,t){return t?e.filter(e=>rn(e)&&_t(e)===t):[]}function an(e,t){return!!t&&e.length>0&&e.every(e=>rn(e)&&_t(e)===t)}var cn={signature:1,premier:2,exclusive:3},sn=[{id:"signature",label:"Signature Games",shortLabel:"Signature",level:1},{id:"premier",label:"Premier Games",shortLabel:"Premier",level:2},{id:"exclusive",label:"Exclusive Games",shortLabel:"Exclusive",level:3}];function dn(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function hn(e,t){return e.filter(e=>dn(e)===t)}function un(e){const t=new Set(e.map(dn));return sn.filter(e=>t.has(e.level))}function fn(e){return un(e)[0]?.id??"signature"}var gn=[4,12],pn=[5,10,20,50];function yn(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function mn(e){const t=e.payout_structure;return{margin:e.operator_margin??0,perLegProbability:t?.per_leg_probability??.5,perfectMultiple:t?.perfect_prize?.stake_multiple??25,perfectBaseLegs:t?.perfect_prize?.base_legs??6,nearMissBudgetFraction:t?.near_miss?.budget_fraction??.5,roundTo:t?.round_to??5}}function bn(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function wn(e,t){if(t<0||t>e)return 0;let n=1;for(let o=0;o<t;o+=1)n=n*(e-o)/(o+1);return Math.round(n)}function xn(e,t,n,o){const r=Math.max(0,Math.min(n,t)),i=e*o.perfectMultiple*Math.pow(2,t-o.perfectBaseLegs),l=r>0?e*(1-o.margin)*o.nearMissBudgetFraction/r:0,a=Math.pow(1/o.perLegProbability,t),c=[];let s=wn(t,0);for(let d=1;d<=r;d+=1)s+=wn(t,d),c.push(bn(l*a/s,o.roundTo));return{legs:t,stake:e,allowedMisses:r,perfect:i,nearMiss:c,sweep:i+c.reduce((e,t)=>e+t,0)}}function kn(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let o=Math.max(1,t);o<=e.nearMiss.length;o+=1)n+=e.nearMiss[o-1];return n}function Sn(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function Cn(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function Bn(e,t){const n=Cn(t);return e.permitted_rules?.find(e=>Cn(e.name??"").includes(n))??null}function zn(e,t,n){const o=t?.min_propositions??n,r=t?.max_propositions??null;return e.filter(e=>e>=o&&(null==r||e<=r))}function Fn(e){if(!yn(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??gn[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??gn[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n),r=Bn(e,"Extra Shot"),i=Bn(e,"Double Shot"),l=zn(o,r,4).filter(e=>e>1),a=zn(o,i,6).filter(e=>e>2);if(0===l.length)return null;const c=[{id:"extra_shot",label:"Extra Shot",allowedMisses:1,stat:"Bigger payout",explain:"Miss one leg and you win the All but 1 prize. Get every leg right and you win both — the Perfect prize on top.",legOptions:l,defaultLegs:Sn(l),ruleId:r?.id??null}],s=!e.permitted_rules?.length||!!i;a.length>0&&s&&c.push({id:"double_shot",label:"Double Shot",allowedMisses:2,stat:"Safer play",explain:"Miss two legs and you win the All but 2 prize. Miss one and you win two prizes. Get every leg right and you win all three — the whole stack.",legOptions:a,defaultLegs:Sn(a),ruleId:i?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=pn.filter(e=>null===h||e<=h);return{modes:c,defaultModeId:"extra_shot",defaultStake:Math.min(Math.max(20,d),h??20),minStake:d,maxStake:h,quickAdds:u,tagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",pricing:mn(e)}}function vn(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function Wn(e,t,n){const o=Math.max(0,e-t),r=xn(20,e,o,n),i=[];for(let l=0;l<=o;l+=1){const t=Math.round(kn(r,l));i.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return i}function Tn(e,t){return[{id:"net-1",label:"Extra Shot",stat:"Bigger payout",detail:["One wrong wins a prize","Perfect wins both","Miss twice and the ticket does not pay"],dividends:Wn(e,e-1,t),expectedCorrect:e-1},{id:"net-2",label:"Double Shot",stat:"Safer play",detail:["Two wrong wins a prize","One wrong wins two","Perfect wins all three"],dividends:Wn(e,e-2,t),expectedCorrect:e-2}]}function An(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),o=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&o>0?function(e,t){return{mode:"selection",kind:"safety_net",title:"Choose your safety net",headline:"2 Ways to PLAY, more ways to PAY",heroTagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",legCount:t,options:Tn(t,mn(e)),continueLabel:"Continue to picks"}}(e,o):"exact"===n&&o>0?function(e,t){return{mode:"selection",kind:"exact",title:"All or nothing",headline:"Get it PERFECT, take the top PAY",heroTagline:"Every pick has to land. Miss a single one and the ticket is gone — but a clean sweep pays the biggest prize.",legCount:t,options:vn(t),continueLabel:"Continue to picks"}}(0,o):"pick"===n&&o>0?function(e,t){return{mode:"description",kind:"pick",title:"How it plays",headline:"Every hit PLAYS, every hit PAYS",heroTagline:"No all-or-nothing — your multiplier climbs with every correct pick.",legCount:t,highlights:["Make your yes/no picks across the available markets","Each correct pick pushes your multiplier higher","Land fewer than the full card and you can still cash"],continueLabel:"Continue to picks"}}(0,o):null}function Ln(e){return null!=An(e)}var Rn=[2500,5e3,7500,1e4,12500,15e3,2e4],Mn=[12,11,10,9,8,7,6];function Dn(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function Pn(e){return Math.round(100*e)/100}function Hn(e,t,n=.21875){const o=Math.pow(2,t),r=e/(1-n)/o,i=Number.isInteger(r),l=Pn(r),a=i?r:Pn(.96*r);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*o),multiple:e/a,oddsOneIn:o,discounted:!i}}function On(e,t=Mn){return{dividend:e,rungs:t.map(t=>Hn(e,t))}}function In(e,t){if(!Dn(e)||!e)return null;const n=e.min_propositions??6,o=e.max_propositions??12,r=Mn.filter(e=>e>=n&&e<=o);if(0===r.length)return null;const i=t?.dividends??Rn;return{dividends:i.map(e=>On(e,r)),defaultDividend:i.includes(1e4)?1e4:i[Math.floor(i.length/2)],defaultLegs:r.includes(9)?9:r[Math.floor(r.length/2)],tagline:"The dividend is set. The win is yours to build."}}function En(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],o=e.min_propositions??e.num_propositions??null,r=e.max_propositions??e.num_propositions??null,i=0===n.length&&null!==o&&null!==r&&r>0,l=n.length>0?n:i?Nt(o,r):[],a=new Map;for(const p of t?.top_payouts??[]){const e=Number(p.proposition_count),t=Number(p.net_payout),n=Number(p.bet_amount??20);!Number.isFinite(e)||e<=0||a.set(e,{count:e,payout:Number.isFinite(t)?t:0,betAmount:Number.isFinite(n)&&n>0?n:20})}for(const p of l){const e=Number(p);a.has(e)||a.set(e,{count:e,payout:0,betAmount:20})}const c=Array.from(a.values()).sort((e,t)=>e.count-t.count),s=l.length>0?Math.max(...l.map(Number)):0,d=Dn(e)?In(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:c.map(e=>({count:e.count,payout20:e.payout>0&&e.betAmount>0?e.payout/e.betAmount*20:0})),f=An(e,s),g="safety_net"===f?.kind?(f.options??[]).flatMap(e=>e.dividends?.length?[{id:e.id,label:e.label,tiers:e.dividends.map(e=>({label:e.label,payout20:e.payout20}))}]:[]):[];return{legOptions:l.map(Number),maxLegCount:s,tiers:u,modes:g,pydDividends:h,hasGenericDividends:(n.length>0||i)&&u.some(e=>e.payout20>0),minBet:Math.max(e.min_bet??1,1),maxBet:e.max_bet??null}}function jn({tiers:e,modes:t,pydDividends:n,onPlayCount:o,minBet:r=1,maxBet:i=null,colors:l,bodyFont:d,headingFont:h}){const u=e=>Math.min(Math.max(e,r),i??1/0),[f,g]=(0,a.useState)(()=>String(u(20))),p=parseFloat(f),y=u(Number.isFinite(p)&&p>0?p:20),m=y/20,b=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),w=!!t?.length;if(!b)return null;const x=(0,s.jsxs)(c.View,{style:{marginTop:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:"Example values for a"}),(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",color:l.textMuted,fontFamily:d},children:"$"}),(0,s.jsx)(c.TextInput,{value:f,onChangeText:g,onBlur:()=>g(String(y)),keyboardType:"numeric",accessibilityLabel:"Example bet amount",style:{width:64,paddingVertical:2,paddingHorizontal:5,borderRadius:6,borderWidth:1,borderColor:l.border,backgroundColor:l.background??"#fff",color:l.text,fontSize:11,fontWeight:"600",fontFamily:d}}),(0,s.jsxs)(c.Text,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:["bet",null!=i?` (${ht(r)}–${ht(i)})`:` (min ${ht(r)})`,"."]})]});return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[w?(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",letterSpacing:1.4,textTransform:"uppercase",color:l.textMuted,fontFamily:d,marginBottom:6},children:"Compare dividends"}):null,(0,s.jsx)(c.View,{style:{paddingHorizontal:14,paddingVertical:12},children:t?.length?t.map((e,n)=>(0,s.jsxs)(c.View,{style:{borderTopWidth:0===n?0:1,borderTopColor:l.border,paddingTop:0===n?0:8,marginTop:0===n?0:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",marginBottom:4,color:l.text,fontFamily:h},children:e.label}),e.tiers.map(e=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4,gap:14},children:[(0,s.jsxs)(c.Text,{style:{color:l.textMuted,fontSize:11,flex:1,fontFamily:d},children:[e.label," correct"]}),(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:d},children:ht(e.payout20*m)})]},e.label)),n===t.length-1&&x]},e.id)):n?.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Dividend"}),(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Stake from"})]}),n.map(e=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:d},children:ht(e.dividend)}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:l.text,fontSize:12,fontFamily:d},children:ht(e.stakeFrom)})]},e.dividend)),(0,s.jsx)(c.Text,{style:{marginTop:8,fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:"You set the dividend before kick-off. Longer climbs start from a smaller stake."})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Legs played"}),(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Payout"})]}),e.map(e=>(0,s.jsxs)(o?c.TouchableOpacity:c.View,{...o?{onPress:()=>o(e.count),accessibilityRole:"button"}:{},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:o?6:4},children:[(0,s.jsxs)(c.Text,{style:{fontWeight:"600",color:o?l.primary:l.text,fontSize:12,fontFamily:d},children:[e.count," legs"]}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:e.payout20>0?l.text:l.textMuted,fontSize:12,fontFamily:d},children:e.payout20>0?ht(e.payout20*m):"—"})]},e.count)),x]})})]})}function Nn({tabs:e,active:t,onChange:n,colors:o,bodyFont:r,useShortLabel:i}){return e.length<=1?null:(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,marginBottom:12},children:e.map(e=>{const l=e.id===t;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e.id),accessibilityRole:"button",accessibilityState:{selected:l},style:{flex:1,minWidth:0,borderRadius:999,paddingHorizontal:4,paddingVertical:10,borderWidth:1,borderColor:l?o.primary:o.border,backgroundColor:l?o.primary:o.background??"#fff",alignItems:"center",justifyContent:"center",shadowColor:l?o.primary:o.border,shadowOffset:{width:0,height:4},shadowOpacity:l?.35:.25,shadowRadius:l?6:5,elevation:l?4:2},children:(0,s.jsx)(c.Text,{numberOfLines:1,style:{fontFamily:r,fontSize:10,fontWeight:"700",letterSpacing:-.1,color:l?o.primaryText:o.primary},children:i?e.shortLabel:e.label})},e.id)})})}var Gn={scrollSnapType:"x mandatory"},Yn={scrollSnapAlign:"center"};function Vn({iconUrl:e,size:t,brandColor:n,iconColor:o,accentColor:r}){return(0,s.jsxs)(c.View,{style:{position:"relative",width:t,height:t},children:[(0,s.jsxs)(d.default,{viewBox:"30 -5 280 280",width:t,height:t,children:[(0,s.jsx)(d.Rect,{x:90,y:55,width:210,height:210,rx:42,fill:n,opacity:.3}),(0,s.jsx)(d.Rect,{x:65,y:30,width:210,height:210,rx:42,fill:n,opacity:.55}),(0,s.jsx)(d.Rect,{x:40,y:5,width:210,height:210,rx:42,fill:n})]}),(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",left:.107*t,top:.107*t,width:.607*t,height:.607*t},children:(0,s.jsx)(Zt,{iconUrl:e,width:.607*t,height:.607*t,iconColor:o,accentColor:r})})]})}function Un({iconUrl:e,gameName:t,size:n,brandColor:o,cardColor:r,iconColor:i,accentColor:l,captionColor:d,bodyFont:u,legOptions:f,onPick:g,colors:p,menuShadow:y}){const[m,b]=(0,a.useState)(!1),[w,x]=(0,a.useState)(null),k=(0,a.useRef)(null),S=(0,a.useRef)(null),[C,B]=(0,a.useState)(null),[z,F]=(0,a.useState)(!1),[v,W]=(0,a.useState)(null),T="web"===c.Platform.OS,A=40+40*f.length+12;(0,a.useLayoutEffect)(()=>{if(!m||!T)return;const e=k.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0,r=window.innerHeight-t.bottom,i=t.top,l=r<A&&i>r;B({top:t.top+o,bottom:t.bottom+o,right:t.right+n,flipUp:l})},[m,T,A]),(0,a.useEffect)(()=>{if(!m)return;if(T){const e=e=>{const t=k.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||S.current&&S.current.contains(n)||b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=k.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);F(r<A&&t>r),W({x:e,y:t,width:n,height:o})})},[m,T,A]);const L=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:p.border},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:p.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase",fontFamily:u},children:"How many picks?"})}),f.map((e,t)=>(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{b(!1),x(null),g(e)},onMouseEnter:()=>x(e),onMouseLeave:()=>x(t=>t===e?null:t),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:p.border,backgroundColor:w===e?p.backgroundAlt:"transparent"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:14,fontWeight:"600",color:p.text,fontFamily:u},children:[e," picks"]}),(0,s.jsx)(c.Text,{style:{backgroundColor:te(p.primary,.14),color:p.primary,paddingVertical:2,paddingHorizontal:6,borderRadius:4,fontSize:10,fontWeight:"700",letterSpacing:.5,overflow:"hidden",fontFamily:u},children:"QP"})]},e))]});return(0,s.jsxs)(c.View,{ref:k,style:{position:"relative"},children:[(0,s.jsx)(Kt,{iconUrl:e,gameName:t,onPress:()=>b(e=>!e),size:n,brandColor:o,cardColor:r,iconColor:i,accentColor:l,captionColor:d}),m&&T&&C&&"undefined"!=typeof document&&(0,h.createPortal)((0,s.jsx)("div",{ref:S,style:{position:"absolute",top:C.flipUp?void 0:C.bottom+6,bottom:C.flipUp&&"undefined"!=typeof window?window.innerHeight-C.top+6:void 0,left:C.right,transform:"translateX(-100%)",zIndex:20,backgroundColor:p.background,border:`1px solid ${p.border}`,borderRadius:8,minWidth:180,boxShadow:y,overflow:"hidden",fontFamily:u},children:L}),document.body),(0,s.jsx)(Xt,{visible:m&&!T,anchor:v,onClose:()=>b(!1),flipUp:z,align:"right",children:(0,s.jsx)(c.View,{style:{elevation:6,backgroundColor:p.background,borderRadius:8,borderWidth:1,borderColor:p.border,minWidth:180,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.16,shadowRadius:24,overflow:"hidden"},children:L})})]})}function Zn({color:e,style:t}){return(0,s.jsx)(c.View,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function Kn({colors:e,count:t=3,tileSize:n=100}){const o=e.selectionCard??e.backgroundAlt;return(0,s.jsx)(c.View,{style:{gap:12,width:"100%"},accessibilityLabel:"Loading",children:Array.from({length:t}).map((t,r)=>(0,s.jsx)(c.View,{style:{borderRadius:12,borderWidth:2,borderTopWidth:4,padding:16,gap:16,width:"100%",borderColor:e.border,borderTopColor:e.primary,backgroundColor:o},children:(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start",gap:12,width:"100%"},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,gap:8},children:[(0,s.jsx)(Zn,{color:e.textMuted,style:{height:28,width:144,maxWidth:"85%"}}),(0,s.jsx)(Zn,{color:e.textMuted,style:{height:14,width:"100%"}}),(0,s.jsx)(Zn,{color:e.textMuted,style:{height:14,width:"82%"}}),(0,s.jsx)(Zn,{color:e.textMuted,style:{height:20,width:112,borderRadius:999}})]}),(0,s.jsx)(Zn,{color:e.textMuted,style:{width:n,height:n,borderRadius:12,flexShrink:0}})]})},r))})}function qn({games:e,selectedGame:t,onSelectGame:n,loading:o,error:r,theme:i,colorScheme:l,showTier:d=!1,showCategory:h=!1,showTierFilter:u=!1,onPropositionCountChange:f,onPropositionCountSelected:g,onQuickPickGame:p,maxPayouts:y}){const m=ee(i,l),b=m.colors,w=D(m),x=ce(m),k=se(m),S=F(m),C=ae(m),B=L(m),z="dark"===m.colorScheme,W=(0,a.useMemo)(()=>un(e),[e]),[T,A]=(0,a.useState)(()=>fn(e));(0,a.useEffect)(()=>{0!==W.length&&(W.some(e=>e.id===T)||A(W[0].id))},[W,T]);const R=(0,a.useMemo)(()=>!u||W.length<=1?e:hn(e,cn[T]),[e,u,W.length,T]),M=e=>e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name,P=(e,t)=>{e.quick_pick_only&&p&&t>0?p(e,t):(t>0&&!$t(e)&&f?.(t),n(e),g?.())},[H,I]=(0,a.useState)(0),E=H>0&&H<400,j=E?108:124,N=H>0&&H<380,G=H>0?Math.min(.86*H,380):0,Y=G>0?Math.max((H-G)/2,4):4,V=G+14,U=R.length>1,Z=U&&Y>=48,K=(0,a.useRef)(null),q=(0,a.useRef)(null),[X,Q]=(0,a.useState)(0),J=e=>{const t=Math.max(0,Math.min(e,R.length-1));ze(K,t*V),Q(t)};(0,a.useEffect)(()=>{E&&0!==H&&ze(q,Math.max(0,80*X-H/2+40))},[X,E,H]),(0,a.useEffect)(()=>{ze(K,0,!1),Q(0)},[T]);const $={shadowColor:"#000",shadowOpacity:z?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};return o?(0,s.jsx)(Kn,{colors:O(m),count:Math.min(Math.max(e.length,2),4),showTierTabs:u&&W.length>1}):r?(0,s.jsx)(c.View,{style:Qn.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.error,fontFamily:x},children:r})}):0===e.length?(0,s.jsx)(c.View,{style:Qn.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:x},children:"No games available"})}):(0,s.jsxs)(c.View,{style:{flexDirection:"column"},onLayout:e=>I(e.nativeEvent.layout.width),children:[u&&(0,s.jsx)(Nn,{tabs:W,active:T,onChange:A,colors:b,bodyFont:x,useShortLabel:N}),0===R.length?(0,s.jsx)(c.View,{style:Qn.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:x},children:"No games in this collection"})}):(0,s.jsxs)(c.View,{style:{position:"relative"},children:[(0,s.jsx)(c.ScrollView,{ref:K,horizontal:!0,showsHorizontalScrollIndicator:!1,decelerationRate:"fast",snapToInterval:V>0?V:void 0,snapToAlignment:"start",style:Gn,scrollEventThrottle:16,onScroll:e=>{if(V<=0)return;const t=Math.round(e.nativeEvent.contentOffset.x/V);Q(e=>e===t?e:t)},contentContainerStyle:{alignItems:"stretch",gap:14,paddingLeft:Y,paddingRight:Y,paddingBottom:8},children:R.map(e=>{const o=Ot(e),r=function(e){const t=e.available_days;if(!t||0===t.length)return null;const n=t.map(e=>It[e]??`Day ${e}`);return 1===n.length?n[0]:n.slice(0,-1).join(", ")+" & "+n[n.length-1]}(e),i=t?.id===e.id,l=String(e.id),a=Ct(e),u=e.description||e.rule,f=e.call_to_action?.trim()||null,{legOptions:z,maxLegCount:F,tiers:W,modes:T,pydDividends:A,hasGenericDividends:L,minBet:R,maxBet:D}=En(e,y?.[e.id]),H=pe(e),O=!o&&r?`Available ${r}`:null;return(0,s.jsxs)(c.View,{style:[Qn.gameCard,Yn,{width:G||void 0,flexGrow:0,flexShrink:0,borderColor:i?b.primary:b.border,backgroundColor:i?b.infoBg:b.background??w,opacity:o?1:.5},$],pointerEvents:o?"auto":"none",children:[e.quick_pick_only&&p&&z.length>1?(0,s.jsx)(Un,{iconUrl:H,gameName:M(e),size:j,brandColor:b.primary,cardColor:w,iconColor:b.primaryText,accentColor:B,captionColor:b.textMuted,bodyFont:x,legOptions:z.map(Number),onPick:t=>P(e,t),colors:b,menuShadow:C}):(0,s.jsx)(Kt,{iconUrl:H,gameName:M(e),onPress:()=>P(e,F),size:j,brandColor:b.primary,cardColor:w,iconColor:b.primaryText,accentColor:B,captionColor:b.primary}),(0,s.jsxs)(c.Text,{style:{marginTop:8,fontFamily:k,fontSize:13,letterSpacing:-.52,lineHeight:13},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"800",color:b.primary},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:te(b.primary,.85)},children:"NO"})]}),(0,s.jsxs)(c.View,{style:{marginTop:2,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},children:[(0,s.jsx)(c.Text,{style:{fontFamily:k,fontWeight:"600",fontSize:E?19:21,color:S,letterSpacing:-.19,lineHeight:1.2*(E?19:21),textAlign:"center",paddingHorizontal:4},children:M(e)}),(0,s.jsx)(Ee,{variant:"icon",panel:Be(e),content:u||"Pick outcomes and land the payout for this game.",theme:m,title:M(e),label:`How to play ${M(e)}`,extra:(0,s.jsx)(jn,{tiers:L?W:[],modes:T,pydDividends:A,onPlayCount:z.length>1?t=>P(e,t):void 0,minBet:R,maxBet:D,colors:b,bodyFont:x,headingFont:k}),colors:b,bodyFont:x,headingFont:k})]}),f?(0,s.jsx)(c.Text,{style:{marginTop:6,fontSize:13,lineHeight:17,fontWeight:"700",color:b.primary,textAlign:"center",fontFamily:x},children:f}):null,u?(0,s.jsx)(c.Text,{style:{marginTop:8,fontSize:12.5,lineHeight:18,color:b.textMuted,textAlign:"center",fontFamily:x},children:u}):null,a.enabled&&(0,s.jsx)(c.View,{style:[Qn.jackpotBadge,{backgroundColor:`${b.warning}15`,marginTop:8}],children:(0,s.jsxs)(c.Text,{style:[Qn.jackpotBadgeText,{color:b.warning,fontFamily:x}],children:["★ ",a.progressive?a.amount>0?ht(a.amount):a.limit>0?`Up to ${ht(a.limit)}`:"Jackpot":ht(a.amount)]})}),(h||d)&&(0,s.jsxs)(c.View,{style:[Qn.tagsRow,{justifyContent:"center",marginTop:8}],children:[h&&e.category&&(0,s.jsx)(c.View,{style:[Qn.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[Qn.tagText,{color:v(m),fontFamily:x}],children:e.category})}),h&&(0,s.jsx)(c.View,{style:[Qn.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[Qn.tagText,{color:v(m),fontFamily:x}],children:e.rule})}),h&&e.lotto_type&&(0,s.jsx)(c.View,{style:[Qn.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[Qn.tagText,{color:v(m),fontFamily:x}],children:e.lotto_type})}),d&&null!=e.tier&&(0,s.jsx)(c.View,{style:[Qn.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsxs)(c.Text,{style:[Qn.tagText,{color:v(m),fontFamily:x}],children:["Tier ",e.tier]})})]}),0===z.length&&(0,s.jsx)(c.View,{style:{marginTop:8,width:"100%"},children:(0,s.jsx)(Fe,{theme:m,variant:"primary",size:"sm",onPress:()=>{n(e),g?.()},children:"Select game"})}),O?(0,s.jsx)(c.View,{style:{marginTop:"auto",width:"100%",paddingTop:12},children:(0,s.jsx)(c.Text,{style:{fontSize:11,lineHeight:15,fontWeight:"600",color:b.text,textAlign:"center",fontFamily:x},children:O})}):null]},l)})}),Z&&(0,s.jsx)(s.Fragment,{children:[-1,1].map(e=>{const t=e<0?X>0:X<R.length-1;return(0,s.jsx)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:e<0?"Previous game":"Next game",onPress:()=>J(X+e),disabled:!t,style:{position:"absolute",top:"38%",left:e<0?2:void 0,right:e>0?2:void 0,width:44,height:44,borderRadius:22,borderWidth:1,borderColor:b.border,backgroundColor:te(b.background??"#fff",.94),alignItems:"center",justifyContent:"center",opacity:t?1:.3,zIndex:1,...$},children:(0,s.jsx)(c.Text,{style:{fontSize:18,lineHeight:20,color:b.primary,fontFamily:x},children:e<0?"‹":"›"})},e)})})]}),R.length>0&&U&&(0,s.jsx)(c.View,{style:{flexDirection:"row",justifyContent:"center",flexWrap:"wrap",paddingTop:4,paddingBottom:8},children:R.map((e,t)=>(0,s.jsx)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:`Go to ${M(e)}`,onPress:()=>J(t),style:{paddingVertical:18.5,paddingHorizontal:5,marginVertical:-18.5,alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.View,{style:{width:t===X?22:7,height:7,borderRadius:999,backgroundColor:t===X?b.primary:te(b.primary,.25)}})},e.id))}),R.length>0&&U&&(0,s.jsxs)(c.View,{style:{borderTopWidth:1,borderTopColor:b.border,paddingTop:10,marginTop:2},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.6,color:b.textMuted,fontFamily:k,marginBottom:8},children:"All games"}),(0,s.jsx)(Xn,{isNarrow:E,stripRef:q,children:R.map((e,t)=>(0,s.jsxs)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityState:{selected:t===X},onPress:()=>{J(t),Ot(e)&&(e=>{const{legOptions:t,maxLegCount:n}=En(e,y?.[e.id]);e.quick_pick_only&&p&&t.length>1||P(e,n)})(e)},style:{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:16,borderWidth:1,borderColor:t===X?b.primary:"transparent",...E?{width:76,flexGrow:0,flexShrink:0}:{flexGrow:1,flexBasis:84}},children:[(0,s.jsx)(Vn,{iconUrl:pe(e),size:E?44:52,brandColor:b.primary,iconColor:b.primaryText,accentColor:B}),(0,s.jsx)(c.Text,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===X?b.primary:S,fontFamily:k},children:M(e)})]},e.id))})]})]})}function Xn({isNarrow:e,stripRef:t,children:n}){return e?(0,s.jsx)(c.ScrollView,{ref:t,horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{gap:4},children:n}):(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:4},children:n})}var Qn=c.StyleSheet.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,borderRadius:24,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2,borderRadius:999},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},tagText:{fontSize:12}}),Jn=class{constructor(e){this.inflight=new Map,this.cache=new Map,this.apiUrl=e.apiUrl,this.apiKey=e.apiKey,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.getAuthHeaders=e.getAuthHeaders}invalidateCache(){this.cache.clear()}invalidate(){this.invalidateCache()}async request(e,t,n){const o=`${this.apiUrl}${e}`,r=(t?.method??"GET").toUpperCase(),i="GET"===r,l=i,a=!i&&!n?.idempotent,c=`${r} ${o}`;if(l){const e=this.cache.get(c);if(e&&Date.now()-e.at<5e3)return e.value;const t=this.inflight.get(c);if(t)return t}const s=l?this.cache.get(c):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(o,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...s?.etag?{"If-None-Match":s.etag}:{},...t?.headers}})}catch(r){throw r}if(304===e.status&&s)return l&&this.cache.set(c,{at:Date.now(),value:s.value,etag:s.etag}),s.value;if(!e.ok){let t=`API request failed: ${e.status} ${e.statusText}`;try{const n=await e.json();422===e.status&&n.detail?Array.isArray(n.detail)?t=n.detail.map(e=>`${Array.isArray(e.loc)?e.loc.join("."):"field"}: ${e.msg}`).join("; "):"string"==typeof n.detail?t=n.detail:"object"==typeof n.detail&&(t=JSON.stringify(n.detail)):n.message?t=n.message:n.error&&(t=n.error)}catch{}throw new Error(t)}const n=await e.json();if(l){const t=e.headers.get("ETag")??void 0;this.cache.set(c,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(c,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(c)})):a&&d.finally(()=>this.invalidateCache()).catch(()=>{}),d}async getGames(e){const t=new URLSearchParams;e?.category&&t.append("category",e.category),e?.jurisdiction&&t.append("jurisdiction",e.jurisdiction),e?.sport&&t.append("sport",e.sport);const n=t.toString(),o=n?`/games?${n}`:"/games",r=await this.request(o);return{games:r.payload||[],howToPlayMarkdown:r.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams;e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category",e.category);const n=t.toString(),o=n?`/propositions?${n}`:"/propositions";return(await this.request(o)).payload||[]}async getSports(){return(await this.request("/propositions/sports")).sports||[]}async getPropositionsByIds(e){if(0===e.length)return[];const t=new URLSearchParams({ids:e.join(","),include_expired:"true"});return(await this.request(`/propositions?${t.toString()}`)).payload||[]}async getProposition(e){const t=(await this.request(`/propositions/${e}?include_expired=true`)).payload;return Array.isArray(t)?t.find(t=>t.id===e)??t[0]:t}async getGameEntries(e){const t=new URLSearchParams;null!=e?.user_id&&t.append("user_id",String(e.user_id)),null!=e?.pending&&t.append("pending",String(e.pending));const n=t.toString(),o=n?`/game-entries?${n}`:"/game-entries";return((await this.request(o)).payload||[]).map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),null!=t.stake&&null==t.bet_amount&&(t.bet_amount=Number(t.stake)),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t})}async createGameEntry(e){const t=e.proposition_ids.map(t=>({proposition_id:t,user_prediction:e.selections?.[t]??"yes"})),n={game_id:e.game_id,user_id:e.user_id,propositions:t};null!=e.stake&&(n.stake=e.stake),null!=e.rule_id&&(n.rule_id=e.rule_id);const o=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=o.stake&&null==o.bet_amount&&(o.bet_amount=Number(o.stake)),o}async getPayoutsDue(e){const t=new URLSearchParams;null!=e?.game_id&&t.set("game_id",String(e.game_id)),null!=e?.limit&&t.set("limit",String(e.limit)),null!=e?.offset&&t.set("offset",String(e.offset));const n=t.toString();return await this.request(n?`/game-entries/payouts/due?${n}`:"/game-entries/payouts/due")}async getEntryPayout(e){return(await this.request(`/game-entries/${e}/payout`)).payload}async markEntryPaidOut(e){const t=await this.request(`/game-entries/${e}/payout/mark-paid-out`,{method:"POST",body:JSON.stringify({})});return this.invalidate(),t.payload}async updateGameEntryResult(e,t){return(await this.request(`/game-entries/${e}/result`,{method:"POST",body:JSON.stringify(t)})).payload}async getGameMaxPayout(e,t){const n=null!=t?`?bet_amount=${encodeURIComponent(String(t))}`:"";return(await this.request(`/games/${e}/max-payout${n}`)).payload}async getGamesMaxPayouts(e,t){if(0===e.length)return{};const n=new URLSearchParams({ids:e.join(",")});null!=t&&n.set("bet_amount",String(t));const o=await this.request(`/games/max-payouts?${n.toString()}`),r={};for(const[i,l]of Object.entries(o.payload||{}))r[Number(i)]=l;return r}async getEntryPreview(e,t){return(await this.request(`/games/${e}/preview`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async evaluateRule(e,t){return(await this.request(`/games/${e}/evaluate-rule`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async calculatePayout(e,t){return(await this.request(`/games/${e}/calculate-payout`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}};function $n(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(null),[c,s]=(0,a.useState)(!n?.skip),[d,h]=(0,a.useState)(null),u=t?`${t.category||""}_${t.jurisdiction||""}_${t.sport||""}`:"",f=(0,a.useRef)(t);f.current=t;const g=n?.skip??!1,p=(0,a.useCallback)(async()=>{if(!g)try{s(!0),h(null);const t=await e.getGames(f.current);r(t.games),l(t.howToPlayMarkdown)}catch(t){h(t instanceof Error?t.message:"Failed to fetch games")}finally{s(!1)}},[e,u,g]);return(0,a.useEffect)(()=>{p()},[p]),{games:o,howToPlayMarkdown:i,loading:c,error:d,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await p()},[e,p])}}function _n(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(!n?.skip),[c,s]=(0,a.useState)(null),d=n?.skip??!1,h=t?`${t.event_id||""}_${t.sport||""}_${t.category||""}`:"",u=(0,a.useRef)(t);u.current=t;const f=(0,a.useCallback)(async()=>{if(!d)try{l(!0),s(null),r(await e.getPropositions(u.current))}catch(t){s(t instanceof Error?t.message:"Failed to fetch propositions")}finally{l(!1)}},[e,h,d]);return(0,a.useEffect)(()=>{f()},[f]),{propositions:o,loading:i,error:c,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await f()},[e,f])}}function eo(e,t){const[n,o]=(0,a.useState)([]),[r,i]=(0,a.useState)(!t?.skip),[l,c]=(0,a.useState)(null),s=t?.skip??!1,d=(0,a.useCallback)(async()=>{if(!s)try{i(!0),c(null),o(await e.getSports())}catch(t){c(t instanceof Error?t.message:"Failed to fetch sports")}finally{i(!1)}},[e,s]);return(0,a.useEffect)(()=>{d()},[d]),{sports:n,loading:r,error:l,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await d()},[e,d])}}function to(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(!n?.skip),[c,s]=(0,a.useState)(null),d=n?.skip??!1,h=t?`${t.user_id??""}_${t.pending??""}`:"",u=(0,a.useRef)(t);u.current=t;const f=(0,a.useCallback)(async()=>{if(!d)try{l(!0),s(null),r(await e.getGameEntries(u.current))}catch(t){s(t instanceof Error?t.message:"Failed to fetch entries")}finally{l(!1)}},[e,h,d]);return(0,a.useEffect)(()=>{f()},[f]),{entries:o,loading:i,error:c,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await f()},[e,f])}}function no(e,t,n){const[o,r]=(0,a.useState)({}),[i,l]=(0,a.useState)(!1),c=n?.skip??!1,s=n?.betAmount,d=(0,a.useRef)(new Set);return(0,a.useEffect)(()=>{if(c||0===t.length)return;const n=t.filter(e=>!(e.id in o)&&!d.current.has(e.id));if(0===n.length)return;for(const e of n)d.current.add(e.id);let i=!1;return l(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),s);i||r(e=>({...e,...t}))}catch{}finally{i||l(!1)}})(),()=>{i=!0}},[e,t.map(e=>e.id).join(","),c,s]),{maxPayouts:o,loading:i,refetchGame:(0,a.useCallback)(async(t,n)=>{if(!c)try{const o=await e.getGamesMaxPayouts([t],n??s);o[t]&&r(e=>({...e,[t]:o[t]}))}catch{}},[e,c,s])}}function oo(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{createEntry:async t=>{try{n(!0),r(null);const o=await e.createGameEntry(t);return l(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to create entry";throw r(e),new Error(e)}finally{n(!1)}},loading:t,error:o,entry:i}}function ro(e){const[t,n]=(0,a.useState)(e?"sport":"game"),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)({}),[c,s]=(0,a.useState)(null);return{step:t,selectedGame:o,selections:i,placedEntry:c,setGameOnly:e=>{r(e)},clearSelectedGame:()=>{r(null),l({})},goToSportSelection:e=>{e&&r(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),r(null),l({}))},reset:()=>{n("game"),r(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const o={...n};return o[e]===t?delete o[e]:o[e]=t,o})}}}function io(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{preview:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.getEntryPreview(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to preview entry";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}}var lo=(0,a.createContext)(null),ao={};function co(){const e=(0,a.useContext)(lo);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function so({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:o="md",yesColor:r,noColor:i,theme:l}){const h=(0,a.useContext)(lo),u=l??h?.theme??j,f=le(u),g=u.colors,p=r??T(u),y=i??A(u),m="sm"===o,b=m?f.space.xs:f.space.sm,w=m?6:8,x=m?f.fontSize.sm:f.fontSize.md,k=m?8.5:10,S=(0,a.useRef)(0);return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{if(e(),t){const e=Date.now();e-S.current<300?(S.current=0,t()):S.current=e}},activeOpacity:.8,accessibilityRole:"button",accessibilityLabel:n,style:[ho.container,{borderColor:te(g.border,.6),borderRadius:f.radius.sm,minHeight:f.touchTarget.min}],children:[(0,s.jsxs)(c.View,{style:ho.topRow,children:[(0,s.jsxs)(d.default,{style:c.StyleSheet.absoluteFill,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[(0,s.jsx)(d.Polygon,{points:"0,0 53,0 47,100 0,100",fill:p}),(0,s.jsx)(d.Polygon,{points:"53,0 100,0 100,100 47,100",fill:y}),(0,s.jsx)(d.Line,{x1:"53",y1:"0",x2:"47",y2:"100",stroke:"rgba(255,255,255,0.85)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]}),(0,s.jsx)(c.View,{style:[ho.half,{paddingHorizontal:b,paddingVertical:w}],children:(0,s.jsx)(c.Text,{style:[ho.halfLabel,{fontSize:x}],numberOfLines:1,children:"Yes"})}),(0,s.jsx)(c.View,{style:[ho.half,{paddingHorizontal:b,paddingVertical:w}],children:(0,s.jsx)(c.Text,{style:[ho.halfLabel,{fontSize:x}],numberOfLines:1,children:"No"})})]}),(0,s.jsx)(c.View,{style:[ho.labelRow,{backgroundColor:g.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[ho.labelText,{color:g.buttonSecondaryText,fontSize:k,letterSpacing:.14*k,fontFamily:u.fonts?.mono??ce(u)}],numberOfLines:1,children:n})})]})}var ho=c.StyleSheet.create({container:{borderWidth:1,overflow:"hidden",flexShrink:0,flexDirection:"column",width:"100%",minWidth:92},topRow:{flexDirection:"row",flex:1,flexShrink:0},half:{flex:1,flexShrink:0,alignItems:"center",justifyContent:"center"},halfLabel:{color:"#ffffff",fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}});function uo(e){return e.selectionCard??e.backgroundAlt}function fo({color:e,style:t}){return(0,s.jsx)(c.View,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function go({colors:e,count:t=2}){const{width:n}=(0,c.useWindowDimensions)(),o=n>=400,r=n>=640,[i,l]=a.default.useState(0),d=o?i>0?(i-12)/2:"48%":"100%",h=uo(e);return(0,s.jsx)(c.View,{onLayout:e=>l(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsxs)(c.View,{style:{width:d,minHeight:r?140:112,borderRadius:16,borderWidth:1,padding:r?20:14,gap:r?12:8,justifyContent:"center",alignItems:"flex-start",backgroundColor:h,borderColor:e.border},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:20,width:176,maxWidth:"100%"}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:96,maxWidth:"70%"}})]},n))})}function po({colors:e,count:t=4}){const{width:n}=(0,c.useWindowDimensions)(),o=n>=640,r=uo(e);return(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsxs)(c.View,{style:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:o?"row":"column",alignItems:"center",gap:o?14:8,borderRadius:16,borderWidth:1,paddingHorizontal:o?16:12,paddingVertical:o?16:12,backgroundColor:r,borderColor:e.border},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:o?48:40,width:o?48:40,borderRadius:12}}),(0,s.jsxs)(c.View,{style:{flex:o?1:void 0,minWidth:0,alignItems:o?"flex-start":"center",gap:6},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:14,width:80}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:10,width:48}})]}),o&&(0,s.jsx)(fo,{color:e.textMuted,style:{height:20,width:20,borderRadius:6}})]},n))})}function yo({colors:e,count:t=3}){const n=uo(e);return(0,s.jsx)(c.View,{style:{gap:10,width:"100%"},children:Array.from({length:t}).map((t,o)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:14,paddingVertical:14,backgroundColor:n,borderColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsx)(c.View,{style:{borderRadius:12,paddingHorizontal:12,paddingVertical:10,backgroundColor:e.backgroundAlt},children:(0,s.jsx)(fo,{color:e.textMuted,style:{height:16,width:176,maxWidth:"100%"}})}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:160,maxWidth:"80%",marginTop:8}})]}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:20,width:20,borderRadius:6}})]},o))})}function mo({colors:e,tileSize:t=116,width:n}){return(0,s.jsxs)(c.View,{style:{width:n??"100%",alignItems:"center",borderRadius:18,borderWidth:1,paddingHorizontal:14,paddingTop:24,paddingBottom:20,gap:4,borderColor:e.border,backgroundColor:uo(e)},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{width:t,height:t,borderRadius:16}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:44,marginTop:4}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:17,width:128,maxWidth:"80%",marginTop:2}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:11,width:"75%",marginTop:10}})]})}function bo({colors:e}){return(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,marginBottom:12,width:"100%"},children:[0,1,2].map(t=>(0,s.jsx)(fo,{color:e.textMuted,style:{height:38,flex:1,borderRadius:999}},t))})}function wo({colors:e,count:t=3,tileSize:n=116,showTierTabs:o=!1}){const[r,i]=a.default.useState(0),l=r>=420?(r-12)/2:"100%";return(0,s.jsxs)(c.View,{style:{width:"100%"},onLayout:e=>i(e.nativeEvent.layout.width),children:[o&&(0,s.jsx)(bo,{colors:e}),(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,o)=>(0,s.jsx)(mo,{colors:e,tileSize:n,width:l},o))})]})}function xo({colors:e,groups:t=2,rowsPerGroup:n=2}){const{width:o}=(0,c.useWindowDimensions)(),r=o>=640;return(0,s.jsxs)(c.View,{style:{gap:r?24:16,paddingBottom:64,width:"100%"},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:28,width:72,borderRadius:999}}),(0,s.jsx)(c.View,{style:{gap:16},children:Array.from({length:t}).map((t,o)=>(0,s.jsxs)(c.View,{style:{borderRadius:12,borderWidth:1,borderColor:e.border,backgroundColor:uo(e),overflow:"hidden"},children:[(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:12,gap:6,backgroundColor:e.backgroundAlt},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:16,width:176,maxWidth:"80%"}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:96}})]}),Array.from({length:n}).map((t,n)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:r?14:12,borderTopWidth:1,borderTopColor:e.border},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:16,flex:1,maxWidth:"58%"}}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:6,flexShrink:0},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:8}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:8}})]})]},n))]},o))})]})}function ko({colors:e}){return(0,s.jsx)(c.View,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16,width:"100%"},children:[0,1].map(t=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:14,width:68}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))})}function So({colors:e}){return(0,s.jsxs)(c.View,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:uo(e),overflow:"hidden",width:"100%"},children:[(0,s.jsxs)(c.View,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,gap:6},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:14,width:40}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),(0,s.jsx)(c.View,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,gap:4},children:[(0,s.jsx)(fo,{color:e.textMuted,style:{height:14,width:"88%"}}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:12,width:"70%"}})]}),(0,s.jsx)(fo,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]})}function Co({colors:e,rows:t=2}){return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[(0,s.jsx)(ko,{colors:e}),(0,s.jsx)(c.View,{style:{gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsx)(So,{colors:e},n))})]})}function Bo({colors:e,bodyFont:t,message:n,variant:o="category",gameCardCount:r=3,categoryCount:i=2,showTierTabs:l=!1}){const a=n?.trim()||"Loading",d=(()=>{switch(o){case"sport":return(0,s.jsx)(po,{colors:e,count:Math.max(i,2)});case"event":return(0,s.jsx)(yo,{colors:e});case"games":return(0,s.jsx)(wo,{colors:e,count:r,showTierTabs:l});case"propositions":return(0,s.jsx)(xo,{colors:e});case"entries":return(0,s.jsx)(Co,{colors:e,rows:2});default:return(0,s.jsx)(go,{colors:e,count:i})}})();return(0,s.jsxs)(c.View,{accessibilityRole:"progressbar",accessibilityLabel:a,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?(0,s.jsx)(c.Text,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,d]})}var zo={today:"Today",weekend:"This weekend",next7:"Next 7 days"},Fo=["today","weekend","next7"];function vo(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Wo(e,t,n){if(!e)return!1;const o=new Date(e);if(Number.isNaN(o.getTime()))return!1;const{start:r,end:i}=function(e,t){const n=function(e){const t=new Date(e);return t.setHours(0,0,0,0),t}(t);switch(e){case"today":return{start:n,end:vo(n,1)};case"weekend":{const e=n.getDay(),t=vo(n,0===e?-1:(6-e)%7);return{start:t<n?n:t,end:vo(t,2)}}case"next7":return{start:n,end:vo(n,7)}}}(t,n);return o>=r&&o<i}function To(e,t,n){if(!t||(o=n)&&o.split(" vs ").length>1)return null;var o;const r=e.outcome||e.description;return r?t(r):null}var Ao=12;function Lo({theme:e,value:t,onYes:n,onNo:o,disabled:r}){const i=e.colors,l=(e,t)=>({paddingVertical:6,paddingHorizontal:14,borderRadius:8,borderWidth:1,backgroundColor:e?t:"transparent",borderColor:e?"transparent":i.border,opacity:r?.5:1}),a=e=>({color:e?"#ffffff":i.text,fontSize:13,fontWeight:"600",lineHeight:16});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:r,accessibilityState:{selected:"yes"===t},style:l("yes"===t,T(e)),children:(0,s.jsx)(c.Text,{style:a("yes"===t),children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:r,accessibilityState:{selected:"no"===t},style:l("no"===t,A(e)),children:(0,s.jsx)(c.Text,{style:a("no"===t),children:"No"})})]})}function Ro({theme:e,variant:t,disabled:n,onPress:o,children:r}){const i=e.colors,[l,d]=(0,a.useState)(!1),h="primary"===t?{bg:i.buttonPrimary,bgHover:i.buttonPrimaryHover,fg:i.buttonPrimaryText,border:i.buttonPrimary}:{bg:i.buttonSecondary,bgHover:i.buttonSecondaryHover,fg:i.buttonSecondaryText,border:i.border};return(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:n,activeOpacity:.85,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:h.border,backgroundColor:l&&!n?h.bgHover:h.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:(0,s.jsx)(c.Text,{style:{color:h.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:r})})}function Mo({matchup:e,renderTeamLogo:t,altText:n,mutedColor:o,size:r="sm"}){const{width:i}=(0,c.useWindowDimensions)(),l=i>=640,[a,d=""]=e.split(" vs "),h=d.length>0,u="md"===r&&l?16:14;if(!h)return(0,s.jsx)(c.Text,{style:{color:n,fontSize:u,fontWeight:"600"},children:e});const f=e=>(0,s.jsxs)(c.View,{style:Oo.teamLogoRowWrap,children:[t?.(e),(0,s.jsx)(c.Text,{style:{color:n,fontSize:u,fontWeight:"600",flexShrink:1},children:e})]}),g=(0,s.jsx)(c.Text,{style:{color:o,fontSize:12,flexShrink:0},children:"vs"});return l?(0,s.jsxs)(c.View,{style:Oo.matchupTeamsRow,children:[f(a),g,f(d)]}):(0,s.jsxs)(c.View,{style:Oo.matchupTeamsStacked,children:[g,(0,s.jsxs)(c.View,{style:{flexShrink:1,minWidth:0},children:[f(a),f(d)]})]})}function Do({label:e,colors:t,onOpenChange:n}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{n?.(r)},[r,n]),(0,s.jsxs)(c.View,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[(0,s.jsx)(c.Pressable,{onPress:()=>i(e=>!e),onHoverIn:()=>i(!0),onHoverOut:()=>i(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:te(t.primary,.14),borderWidth:1,borderColor:te(t.primary,.45)},children:(0,s.jsx)(c.Text,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&(0,s.jsx)(c.View,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:6,backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??te(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function Po({prop:e,colors:t,size:n="sm",componentById:o}){const{width:r}=(0,c.useWindowDimensions)(),i=r>=640,l=nt(e,o),d=e.description??e.proposition??"",h="md"===n?i?16:14:i?14:12,u="md"===n?"500":"400",f=t.textMuted??t.textAltMuted??t.text,[g,p]=(0,a.useState)(!1);if(!l)return(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u,flex:1},children:d});const{operator:y,legs:m}=l;return m.some(e=>e.eventLabel)?(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,flexDirection:"column",gap:8,...g&&{zIndex:9999,elevation:9999,position:"relative"}},children:m.map((e,n)=>(0,s.jsxs)(c.View,{style:{minWidth:0},children:[n>0&&(0,s.jsx)(c.View,{style:{marginBottom:4},children:(0,s.jsx)(Do,{label:y,colors:t,onOpenChange:p})}),e.eventLabel&&(0,s.jsx)(c.Text,{style:{color:f,fontSize:i?12:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25},children:e.eventLabel}),(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u},children:e.text})]},n))}):(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,...g&&{zIndex:9999,elevation:9999,position:"relative"}},children:(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:m.map((e,n)=>(0,s.jsxs)(a.default.Fragment,{children:[n>0&&(0,s.jsx)(Do,{label:y,colors:t,onOpenChange:p}),(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u},children:e.text})]},n))})})}function Ho({game:e,propositions:t,selections:n,onToggleSelection:o,onNext:r,onBack:i,loading:l,error:h,theme:u,colorScheme:f,hideActions:g=!1,initialSport:p,renderTeamLogo:y,disableQuickPick:m=!1,selectedPropositionCount:b,onPropositionCountChange:w,gameCategory:x,headerExtra:k}){const S=(0,a.useContext)(lo),C=S?.sportBaseKey,B=function(e,t){const[n,o]=(0,a.useState)([]),r=(0,a.useRef)(new Set),i=(0,a.useMemo)(()=>{const e=new Map;for(const n of t)e.set(n.id,n);for(const t of n)e.set(t.id,t);return e},[t,n]),l=(0,a.useMemo)(()=>e?function(e){const t=new Set;for(const n of e)if(_e(n))for(const e of et(n))t.add(e);return[...t]}(t).filter(e=>!i.has(e)):[],[e,t,i]);return(0,a.useEffect)(()=>{if(!e||0===l.length)return;const t=l.filter(e=>!r.current.has(e));if(0===t.length)return;for(const e of t)r.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&o(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,l]),i}((0,a.useMemo)(()=>S?.apiUrl?new Jn({apiUrl:S.apiUrl,apiKey:S.apiKey,fetchImpl:S.fetchImpl,getAuthHeaders:S.getAuthHeaders}):null,[S?.apiUrl,S?.apiKey,S?.fetchImpl,S?.getAuthHeaders]),t),z=ee(u,f),v=z.colors,W=D(z),T=H(z),A=v.matchupHeader??(e.color?te(e.color,.14):P(z)),L=v.textAlt??v.text;se(z);const R=ce(z);F(z);const{width:M}=(0,c.useWindowDimensions)(),I=M>=640,E=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(z),j=!!(e.allowed_propositions&&e.allowed_propositions.length>0),{min:N,max:G}=St(e,b),Y=N,V=G,[U,Z]=a.default.useState(()=>new Set(Object.keys(Et(t,x,C))));a.default.useEffect(()=>{const e=Et(t,x,C),n=Object.keys(e);n.length>0&&Z(e=>n.every(t=>e.has(t))?e:new Set(n))},[t]);const K=Y>0&&Y===V,q=Y||1,X=V||t.length,Q=V||Y||t.length,[J,$]=a.default.useState(Q),_=Object.keys(n).length,ne=V>0&&_>=V,oe=j?null!=b&&_===b:kt(_,e.min_propositions,e.max_propositions);e.min_bet,V>0?Math.max(2,2*V):Math.max(2,2*_);const re=a.default.useRef(_),ie=j?null!=b&&_===b:V>0&&_===V;(0,a.useEffect)(()=>{ie&&_>re.current&&r?.(),re.current=_},[_,ie]);const le=(e,t)=>{!(e in n)&&ne||o(e,t)};(0,a.useEffect)(()=>{const e=V||t.length,n=Y||1;$(t=>K?V:Math.max(n,Math.min(t,e)))},[t.length,Y,V,K]);const ae=(0,a.useMemo)(()=>new Date,[]),de=(0,a.useMemo)(()=>function(e,t){const n=e.filter(e=>null!=function(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}(e));if(n.length<2)return[];const o=[];for(const r of Fo){let e=0,i=0;for(const o of n)if(Wo(o.commence_time,r,t)?e+=1:i+=1,e>0&&i>0)break;e>0&&i>0&&o.push({id:r,label:zo[r]})}return o}(t,ae),[t,ae]),[he,ue]=(0,a.useState)(null);(0,a.useEffect)(()=>{he&&!de.some(e=>e.id===he)&&ue(null)},[de,he]);const fe=(0,a.useMemo)(()=>function(e,t,n){return t?e.filter(e=>Wo(e.commence_time,t,n)):e.slice()}(t,he,ae),[t,he,ae]),ge=(0,a.useMemo)(()=>Et(fe,x,C),[fe,x,C]),pe=(0,a.useMemo)(()=>{const e=new Set;for(const t of fe){const n=Qe(t);n&&e.add(n)}return Array.from(e).sort((e,t)=>e.localeCompare(t))},[fe]),[ye,me]=(0,a.useState)(null),[be,we]=(0,a.useState)(!1);(0,a.useEffect)(()=>{ye&&!pe.includes(ye)&&me(null)},[pe,ye]);const xe=(0,a.useMemo)(()=>{if(!ye)return ge;const e={};for(const[t,n]of Object.entries(ge)){const o=n.filter(e=>Qe(e)===ye);o.length>0&&(e[t]=o)}return e},[ge,ye]),ke=Object.keys(xe);if(l)return(0,s.jsx)(xo,{colors:O(z)});if(h)return(0,s.jsx)(c.View,{style:Oo.centered,children:(0,s.jsx)(c.Text,{style:{color:v.error},children:h})});const Se=!m&&t.length>0,Ce=de.length>0||pe.length>1,Be=(null!=he?1:0)+(null!=ye?1:0);return(0,s.jsxs)(c.View,{style:{gap:I?24:16,paddingBottom:64},children:[Ce||k?(0,s.jsxs)(c.View,{style:Oo.filterHeaderRow,children:[(0,s.jsx)(c.View,{style:Oo.filterToggleRow,children:Ce?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>we(e=>!e),activeOpacity:.85,accessibilityRole:"button",style:[Oo.filterToggle,{borderColor:Be>0?v.primary:v.border,backgroundColor:Be>0?v.primary:v.background??"#fff"}],children:[(0,s.jsx)(Ve,{size:13,color:Be>0?v.primaryText:v.text}),(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",color:Be>0?v.primaryText:v.text},children:"Filter"}),Be>0&&(0,s.jsxs)(c.Text,{style:{fontSize:11,fontWeight:"700",color:v.primaryText},children:["· ",Be]}),(0,s.jsx)(c.View,{style:{transform:[{rotate:be?"-90deg":"90deg"}],opacity:.75},children:(0,s.jsx)(Ge,{size:13,color:Be>0?v.primaryText:v.text})})]}),Be>0&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{ue(null),me(null)},activeOpacity:.85,accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"600",color:v.textMuted},children:"Clear"})})]}):null}),k]}):null,be&&Ce&&(0,s.jsxs)(c.View,{style:{gap:10},children:[de.length>0&&(0,s.jsx)(qe,{label:"When",options:[{value:null,label:"All dates"},...de.map(e=>({value:e.id,label:e.label}))],value:he,onChange:e=>ue(e),theme:z,bodyFont:R}),pe.length>1&&(0,s.jsx)(qe,{label:"Market",options:[{value:null,label:"All markets"},...pe.map(e=>{return{value:e,label:(t=e,t.replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()))};var t})],value:ye,onChange:me,theme:z,bodyFont:R})]}),Se&&(0,s.jsx)(c.View,{style:[Oo.topBar,{justifyContent:"flex-end"}],children:(0,s.jsxs)(c.View,{style:[Oo.quickPickRow,{gap:I?8:6}],children:[!K&&(0,s.jsxs)(c.View,{style:Oo.quickPickCountRow,children:[(0,s.jsx)(c.TextInput,{keyboardType:"number-pad",value:String(J),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||$(Math.max(q,Math.min(X,t)))},style:[Oo.quickPickInput,{width:I?56:40,paddingHorizontal:I?8:4,paddingVertical:I?6:4,fontSize:I?14:12,color:L,backgroundColor:v.backgroundAlt,borderColor:v.border}]}),(0,s.jsxs)(c.Text,{style:{color:v.textMuted,fontSize:12},children:["/ ",t.length]})]}),(0,s.jsx)(so,{onPress:()=>{const e=K?V:J;for(const t of Object.keys(n)){const e=Number(t);o(e,n[e])}const{yesPicks:i,noPicks:l}=Gt(t,e);for(const t of i)o(t.id,"yes");for(const t of l)o(t.id,"no");r?.()}})]})}),t.length>0&&(0,s.jsx)(c.View,{style:Oo.matchupList,children:ke.every(e=>1===xe[e].length)?(0,s.jsx)(c.View,{style:[Oo.matchupCard,{borderColor:v.border,backgroundColor:W},E],children:ke.map((e,t)=>{const o=xe[e][0],r="yes"===n[o.id],i="no"===n[o.id],l=o.id in n,a=ne&&!l,d=0===t,h=t===ke.length-1;return(0,s.jsxs)(c.View,{style:{borderTopColor:v.border,borderTopWidth:d?0:1,opacity:a?.45:1},children:[(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:I?12:10,backgroundColor:A,borderTopLeftRadius:d?Ao:0,borderTopRightRadius:d?Ao:0},children:[(0,s.jsx)(c.View,{style:{minWidth:0},children:(0,s.jsx)(Mo,{matchup:e,renderTeamLogo:y,altText:L,mutedColor:v.textAltMuted??v.textMuted??L})}),o.commence_time&&(0,s.jsx)(c.Text,{style:{color:v.textAltMuted??v.textMuted,fontSize:11,opacity:.7,marginTop:2},children:ut(o.commence_time)})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:I?14:12,backgroundColor:T,borderTopWidth:1,borderTopColor:v.border,borderBottomLeftRadius:h?Ao:0,borderBottomRightRadius:h?Ao:0},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[To(o,y,e),(0,s.jsx)(Po,{prop:o,colors:v,componentById:B})]}),(0,s.jsx)(Lo,{theme:z,value:r?"yes":i?"no":null,onYes:()=>le(o.id,"yes"),onNo:()=>le(o.id,"no"),disabled:a})]})]},o.id)})}):ke.map(e=>{const t=xe[e],o=U.has(e),r=t.filter(e=>e.id in n).length,i=t[0]?.commence_time;return(0,s.jsxs)(c.View,{style:[Oo.matchupCard,{borderColor:v.border,backgroundColor:W},E],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{return t=e,Z(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[Oo.matchupHeader,{backgroundColor:A,borderTopLeftRadius:Ao,borderTopRightRadius:Ao,borderBottomLeftRadius:o?0:Ao,borderBottomRightRadius:o?0:Ao}],children:[(0,s.jsxs)(c.View,{style:Oo.matchupHeaderLeft,children:[(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:o?"180deg":"0deg"}]},children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:v.textAltMuted??v.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),(0,s.jsxs)(c.View,{style:Oo.matchupTeamWrapper,children:[(0,s.jsx)(Mo,{matchup:e,renderTeamLogo:y,altText:L,mutedColor:v.textAltMuted??v.textMuted??L,size:"md"}),i&&(0,s.jsx)(c.Text,{style:{color:v.textAltMuted??v.textMuted,fontSize:12,opacity:.7,marginTop:2,textAlign:"left"},children:ut(i)})]})]}),(0,s.jsx)(c.View,{style:Oo.matchupHeaderRight,children:r>0&&(0,s.jsx)(c.View,{style:[Oo.answeredBadge,{backgroundColor:v.successBg}],children:(0,s.jsxs)(c.Text,{style:{color:v.successText,fontSize:12,fontWeight:"500"},children:[r,"/",t.length]})})})]}),o&&(0,s.jsx)(c.View,{children:(0,s.jsx)(s.Fragment,{children:t.map((o,r)=>{const i="yes"===n[o.id],l="no"===n[o.id],a=o.id in n,d=ne&&!a,h=r===t.length-1;return(0,s.jsx)(c.View,{style:{paddingHorizontal:16,paddingVertical:I?14:12,backgroundColor:T,borderTopColor:v.border,borderTopWidth:0===r?0:1,opacity:d?.45:1,borderBottomLeftRadius:h?Ao:0,borderBottomRightRadius:h?Ao:0},children:(0,s.jsxs)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:I?16:8,rowGap:I?16:8},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[To(o,y,e),(0,s.jsx)(Po,{prop:o,colors:v,size:"md",componentById:B})]}),(0,s.jsx)(Lo,{theme:z,value:i?"yes":l?"no":null,onYes:()=>le(o.id,"yes"),onNo:()=>le(o.id,"no"),disabled:d})]})},o.id)})})})]},e)})}),0===t.length&&(0,s.jsx)(c.View,{style:Oo.centered,children:(0,s.jsx)(c.Text,{style:{color:v.textMuted},children:"No propositions available at this time"})}),!g&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:v.border,backgroundColor:W,marginHorizontal:I?-24:-16,paddingHorizontal:I?24:16,paddingVertical:I?16:12},children:[(0,s.jsx)(Ro,{theme:z,variant:"secondary",onPress:i,children:"Back"}),(0,s.jsx)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:I?12:8},children:(0,s.jsx)(Ro,{theme:z,variant:"primary",disabled:!oe,onPress:r,children:"Wager"})})]})]})}var Oo=c.StyleSheet.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},filterToggle:{flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderRadius:8,borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderRadius:Ao,borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:999}});function Io({theme:e,value:t,onYes:n,onNo:o,disabled:r}){const i=e.colors,l=(e,t)=>({paddingVertical:6,paddingHorizontal:14,borderRadius:8,borderWidth:1,backgroundColor:e?t:"transparent",borderColor:e?"transparent":i.border,opacity:r?.5:1}),a=e=>({color:e?"#ffffff":i.text,fontSize:13,fontWeight:"600",lineHeight:16});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:r,accessibilityState:{selected:"yes"===t},style:l("yes"===t,T(e)),children:(0,s.jsx)(c.Text,{style:a("yes"===t),children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:r,accessibilityState:{selected:"no"===t},style:l("no"===t,A(e)),children:(0,s.jsx)(c.Text,{style:a("no"===t),children:"No"})})]})}function Eo({theme:e,value:t}){return(0,s.jsx)(c.View,{style:{paddingVertical:2,paddingHorizontal:8,borderRadius:8,backgroundColor:"yes"===t?T(e):A(e),alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===t?"Yes":"No"})})}function jo({theme:e,variant:t,disabled:n,onPress:o,children:r}){const i=e.colors,[l,d]=(0,a.useState)(!1),h="primary"===t?{bg:i.buttonPrimary,bgHover:i.buttonPrimaryHover,fg:i.buttonPrimaryText,border:i.buttonPrimary}:{bg:i.buttonSecondary,bgHover:i.buttonSecondaryHover,fg:i.buttonSecondaryText,border:i.border};return(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:n,activeOpacity:.85,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:h.border,backgroundColor:l&&!n?h.bgHover:h.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:(0,s.jsx)(c.Text,{style:{color:h.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:r})})}var No=c.StyleSheet.create({section:{borderRadius:12,borderWidth:1},emptyState:{alignItems:"center",paddingVertical:32},selectionInfo:{flex:1,minWidth:0},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:2},teamLogoRow:{flexDirection:"row",alignItems:"center",gap:4},teamText:{fontWeight:"600"},vsSmall:{fontSize:12,fontWeight:"400"},propDesc:{fontSize:14,marginTop:4},propTime:{fontSize:12,opacity:.7,marginTop:2},rightControls:{flexDirection:"row",alignItems:"center",gap:8},removeButton:{width:20,height:20,borderRadius:10,alignItems:"center",justifyContent:"center"},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function Go({game:e,propositions:t,selections:n,onToggleSelection:o,onRemoveSelection:r,onSubmit:i,onBack:l,loading:h,error:u,expectedCorrect:f,onExpectedCorrectChange:g,betAmount:p,onBetAmountChange:y,theme:m,colorScheme:b,hideActions:w=!1,winningCounts:x,payouts:k,renderTeamLogo:S,showCustomAmount:C=!1,betAmountLocked:B=!1,betAmountLockedNote:z,canSubmit:L,authenticated:R=!0,userBalance:M,onRecharge:O,boostBanner:I}){const E=ee(m,b),j=E.colors,N=D(E),G=se(E),Y=F(E),V=v(E),U=W(E),Z=j.textAlt??j.text,{width:K}=(0,c.useWindowDimensions)(),q=K>=640,X="dark"===E.colorScheme,Q=t.length,J=e.min_bet??0,$=Math.max(J,.01),_=e.max_bet??null,te=[5,10,20,50,100,200,500].filter(e=>e>=$&&(null===_||e<=_)).slice(0,4),ne={};for(let a=0;a<=Q;a++)ne[a]=p*a;const oe=k??ne,re=oe[f]??0,ie=Ct(e),le=ie.enabled&&f===Q,[ae,ce]=a.default.useState(null),[de,he]=a.default.useState(!0),[ue,fe]=a.default.useState(!1),ge=h||p<$||!1===L,pe=null!=M&&p>M,ye=w&&!!i&&R,me=n?t.filter(e=>e.id in n):t,be=jt(me),we=j.matchupHeader??P(E),xe=H(E),ke=Object.entries(oe).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),Se=1===ke.length?ke[0].correct:null;a.default.useEffect(()=>{null!==Se&&f!==Se&&g(Se)},[Se]);const Ce={shadowColor:"#000",shadowOpacity:X?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};return(0,s.jsxs)(c.View,{style:{gap:q?16:12,paddingBottom:64},children:[(0,s.jsxs)(c.View,{style:[Yo.section,Ce,{padding:q?20:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>he(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:de},accessibilityLabel:de?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[(0,s.jsx)(c.View,{style:{transform:[{rotate:de?"180deg":"0deg"}]},children:(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:j.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,s.jsx)(c.Text,{style:{fontSize:q?16:14,fontWeight:"600",color:Y,fontFamily:G},children:de?"Hide Selections":"Review Selections"})]}),(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:999,flexShrink:0,backgroundColor:`${j.primary}15`},children:(0,s.jsxs)(c.Text,{style:{color:j.primary,fontSize:12,fontWeight:"600"},children:[me.length," pick",1!==me.length?"s":""]})})]}),!de&&(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"}),de&&(0,s.jsx)(c.View,{style:{gap:8,marginTop:12},children:be.map(e=>(0,s.jsxs)(c.View,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:j.border},children:[e.key?(0,s.jsxs)(c.View,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:we},children:[(0,s.jsx)(Mo,{matchup:e.key,renderTeamLogo:S,altText:Z,mutedColor:j.textAltMuted??j.textMuted??Z}),e.props[0].commence_time?(0,s.jsx)(c.Text,{style:{color:j.textAltMuted??j.textMuted,fontSize:11,marginTop:2,opacity:.7},children:ut(e.props[0].commence_time)}):null]}):null,e.props.map((t,i)=>{const l=n?.[t.id],a="yes"===l,h="no"===l,u=!!o;return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:xe,borderTopWidth:e.key||i>0?1:0,borderTopColor:j.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[To(t,S,e.key),(0,s.jsx)(c.Text,{style:{color:Z,fontSize:q?14:12,flexShrink:1},children:t.description})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[u?(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0,alignItems:"center"},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>o(t.id,"yes"),accessibilityState:{selected:a},style:{paddingHorizontal:10,paddingVertical:3,alignItems:"center",justifyContent:"center",borderRadius:8,backgroundColor:a?T(E):"transparent",borderWidth:1,borderColor:a?"transparent":j.border},children:(0,s.jsx)(c.Text,{style:{color:a?"#ffffff":j.text,fontSize:11,fontWeight:"600"},children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>o(t.id,"no"),accessibilityState:{selected:h},style:{paddingHorizontal:10,paddingVertical:3,alignItems:"center",justifyContent:"center",borderRadius:8,backgroundColor:h?A(E):"transparent",borderWidth:1,borderColor:h?"transparent":j.border},children:(0,s.jsx)(c.Text,{style:{color:h?"#ffffff":j.text,fontSize:11,fontWeight:"600"},children:"No"})})]}):l?(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,flexShrink:0,backgroundColor:"yes"===l?T(E):A(E)},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===l?"Yes":"No"})}):null,de&&r&&(0,s.jsx)(c.Pressable,{onPress:()=>{l&&o?.(t.id,l),r(t.id)},onMouseEnter:()=>ce(t.id),onMouseLeave:()=>ce(null),accessibilityRole:"button",accessibilityLabel:"Remove selection",style:{flexShrink:0,width:44,height:44,borderRadius:999,alignItems:"center",justifyContent:"center",backgroundColor:ae===t.id?j.error:"transparent"},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M6 18L18 6M6 6l12 12",stroke:ae===t.id?"#fff":j.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))}),I?(0,s.jsx)(c.View,{style:{marginTop:8},children:I}):null]}),ye&&(0,s.jsxs)(c.View,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:q?14:12,fontWeight:"500"},children:"↓"}),(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:q?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]}),R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:[Yo.section,Ce,{padding:q?24:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:q?16:12},children:[(0,s.jsx)(c.Text,{style:{fontSize:q?18:16,fontWeight:"600",color:Y,fontFamily:G},children:"How much are you betting?"}),null!=M&&(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:j.textMuted},children:["Balance: ",(0,s.jsx)(c.Text,{style:{color:pe?j.error:j.success},children:ht(M)})]})]}),pe&&(0,s.jsxs)(c.View,{style:{marginBottom:12,paddingHorizontal:12,paddingVertical:8,borderRadius:8,backgroundColor:j.errorBg??`${j.error}15`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{flex:1,fontSize:12,fontWeight:"500",color:j.errorText??j.error},children:["Insufficient balance. Your bet of ",ht(p)," exceeds your available ",ht(M),"."]}),O&&(0,s.jsx)(c.TouchableOpacity,{onPress:O,style:{paddingHorizontal:12,paddingVertical:4,borderRadius:6,backgroundColor:j.error},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:j.buttonPrimaryText??"#fff"},children:"Add funds"})})]}),B?(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:8,paddingHorizontal:12,paddingVertical:10,backgroundColor:j.backgroundAlt,borderWidth:1,borderColor:j.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:12,color:j.textMuted,flex:1},children:z??"Stake is set for this ticket."}),(0,s.jsx)(c.Text,{style:{fontSize:18,fontWeight:"700",color:Y,fontFamily:G},children:ht(p)})]}):(0,s.jsxs)(c.View,{style:{gap:16},children:[C&&(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,fontWeight:"600",color:V,marginBottom:8},children:"Entry amount"}),(0,s.jsxs)(c.View,{style:{position:"relative"},children:[(0,s.jsx)(c.View,{style:{position:"absolute",left:12,top:0,bottom:0,justifyContent:"center",zIndex:1},pointerEvents:"none",children:(0,s.jsx)(c.Text,{style:{color:j.textMuted},children:"$"})}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter amount",accessibilityLabel:"Entry amount",value:p?String(p):"",onChangeText:e=>{if(""===e)return void y(0);const t=Number(e);if(!Number.isFinite(t))return;const n=Math.max(0,Math.round(100*t)/100);y(null!==_?Math.min(n,_):n)},onFocus:()=>fe(!0),onBlur:()=>fe(!1),style:{paddingLeft:32,paddingRight:16,paddingVertical:12,borderWidth:1,borderRadius:8,fontSize:18,fontWeight:"600",borderColor:ue?j.borderFocus??j.primary:j.border,color:Z,backgroundColor:j.backgroundAlt},placeholderTextColor:j.textMuted})]}),(0,s.jsxs)(c.Text,{style:{fontSize:12,marginTop:6,color:j.textMuted},children:["Minimum bet: ",ht($),null!==_?` · Maximum: ${ht(_)}`:""]}),p>0&&p<$&&(0,s.jsxs)(c.Text,{style:{fontSize:12,marginTop:4,color:j.error},children:["Bet amount must be at least ",ht($)]})]}),(0,s.jsxs)(c.View,{children:[(C||p>0)&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[C?(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,fontWeight:"600",color:V},children:"Add to bet"}):(0,s.jsx)(c.View,{}),p>0&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>y(0),style:{paddingHorizontal:10,paddingVertical:4,borderRadius:6,backgroundColor:j.backgroundAlt,borderWidth:1.5,borderColor:j.border},children:(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:12,fontWeight:"600"},children:"Clear bet"})})]}),(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:te.map(e=>{const t=null!==_&&p>=_;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{const t=p+e;y(null!==_?Math.min(t,_):t)},disabled:t,style:{flex:1,minWidth:0,paddingHorizontal:12,paddingVertical:10,borderRadius:8,backgroundColor:"transparent",borderWidth:1,borderColor:j.border,opacity:t?.5:1,alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)(c.Text,{style:{color:Z,fontSize:14,fontWeight:"600"},children:["+",ht(e)]})},e)})})]})]})]}),(0,s.jsx)(c.View,{style:[Yo.section,Ce,{padding:q?20:16,backgroundColor:N,borderColor:j.border}],children:(()=>{const e=w&&!!i,t=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,s.jsx)(c.Text,{style:{color:V,fontSize:14},children:"Bet"}),(0,s.jsx)(c.Text,{style:{color:U,fontSize:14,fontWeight:"600"},children:ht(p)})]}),re>0&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:j.border},children:[(0,s.jsx)(c.Text,{style:{color:V,fontSize:14,fontWeight:"600"},children:"Potential Payout"}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[(0,s.jsx)(c.Text,{style:{color:Y,fontSize:18,fontWeight:"700"},children:ht(re)}),le&&(0,s.jsx)(c.Text,{style:{color:j.warning,fontSize:12,marginLeft:4},children:"+ Jackpot"})]})]}),ie.enabled&&(0,s.jsxs)(c.View,{style:[Yo.jackpotBanner,{backgroundColor:`${j.warning}08`,borderColor:`${j.warning}25`}],children:[(0,s.jsxs)(c.Text,{style:{color:j.warning,fontSize:12,fontWeight:"600"},children:["★ ",ie.progressive?"Progressive Jackpot":"Jackpot"]}),(0,s.jsx)(c.Text,{style:{color:j.warning,fontSize:14,fontWeight:"700"},children:ie.progressive?ie.amount>0?ht(ie.amount):ie.limit>0?`Up to ${ht(ie.limit)}`:"Progressive":ht(ie.amount)})]})]});return e?(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"stretch",gap:16},children:[(0,s.jsx)(c.View,{style:{flex:1,minWidth:0},children:t}),(0,s.jsx)(c.View,{style:{width:1,alignSelf:"stretch",backgroundColor:j.border}}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,disabled:ge,accessibilityState:{disabled:ge,busy:!!h},activeOpacity:.7,style:{flexShrink:0,paddingVertical:12,paddingHorizontal:20,borderRadius:8,backgroundColor:j.buttonPrimary,opacity:ge?.5:1,alignItems:"center",justifyContent:"center",minWidth:120},children:h?(0,s.jsxs)(c.View,{style:{alignItems:"center",gap:8},children:[(0,s.jsx)(c.ActivityIndicator,{size:"small",color:j.buttonPrimaryText}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:16,fontWeight:"700"},children:"Place Entry"}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:12,opacity:.9,marginTop:2},children:ht(p)})]})})]}):t})()})]}):(0,s.jsxs)(c.View,{style:[Yo.section,Ce,{padding:q?24:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsx)(c.Text,{style:{fontSize:q?18:16,fontWeight:"600",color:Y,fontFamily:G},children:"Log in to place this entry"}),(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,color:j.textMuted,marginTop:4,marginBottom:16},children:"Your picks are held. Log in to set your bet and confirm."}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,style:{paddingVertical:12,paddingHorizontal:24,borderRadius:8,backgroundColor:j.buttonPrimary,alignItems:"center"},children:(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Log in"})})]}),u&&(0,s.jsx)(c.View,{style:[Yo.errorBanner,{backgroundColor:j.errorBg,borderColor:j.error}],children:(0,s.jsx)(c.Text,{style:{color:j.errorText,fontSize:14},children:u})}),!w&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:j.border,backgroundColor:j.background,marginHorizontal:q?-24:-16,paddingHorizontal:q?24:16,paddingVertical:q?16:12},children:[(0,s.jsx)(Fe,{theme:E,variant:"secondary",disabled:h,onPress:l,children:"Back"}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,disabled:ge,accessibilityState:{disabled:ge,busy:!!h},activeOpacity:.7,style:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:24,paddingVertical:10,borderRadius:8,backgroundColor:j.buttonPrimary,opacity:ge?.5:1},children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.ActivityIndicator,{size:"small",color:j.buttonPrimaryText}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:`Place Entry (${ht(p)})`})})]})]})}var Yo=c.StyleSheet.create({section:{borderRadius:12,borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderRadius:4,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderRadius:8,borderWidth:1}}),Vo="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z";function Uo({index:e,size:t,wide:n,isWinning:o,isJackpot:r,isSelected:i,bgColor:l,borderFallback:h,warning:u,primary:f,textMuted:g,payout:p,onPress:y,accessibilityLabel:m}){const[b,w]=(0,a.useState)(!1),x=!!y,k=o||r,S=x&&b?1.12:k?1.1:1;return(0,s.jsxs)(c.TouchableOpacity,{onPress:y,disabled:!x,activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:m,accessibilityState:{disabled:!x,selected:i},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),style:[Zo.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:r?u:o?l:h,zIndex:i?10:r?6:o?5:1,transform:[{scale:S}]},k&&Zo.circleWinning,x&&b&&Zo.circleHovered],children:[r&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${u}80`}}),i&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:f}}),r&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",children:(0,s.jsx)(d.Path,{d:Vo,fill:u,stroke:u,strokeWidth:1})})}),(0,s.jsx)(c.Text,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:o||r?"#ffffff":g},children:e}),p>0&&(0,s.jsx)(c.Text,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:o||r?"#ffffff":g},children:ht(p)})]})}var Zo=c.StyleSheet.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,overflow:"hidden"},jackpotText:{fontSize:14,fontWeight:"600",textAlign:"center",flexShrink:1},circleGrid:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"},circle:{borderWidth:2,alignItems:"center",justifyContent:"center"},circleWinning:{elevation:4,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4},circleHovered:{elevation:6,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function Ko({iconUrl:e,gameName:t,chipColor:n,textColor:o,iconColor:r,accentColor:i,brandColor:l,height:a=56,showTrademark:d=!0,compact:h=!1,onPress:u}){const f=n??l??"#0F4C5C",g=o??f,p=.85*a,y=1.8*p,m=p/2,b='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',w=a,x=a,k=y-.18*p*2,S=p-.05*p*2,C=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Text,{accessibilityLabel:"YESNO",style:{fontFamily:b,fontSize:w,lineHeight:1.15*w,letterSpacing:-1,color:g,includeFontPadding:!1},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"900"},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"300"},children:"NO"})]}),(0,s.jsx)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:t,style:{width:y,height:p,borderRadius:m,backgroundColor:f,alignItems:"center",justifyContent:"center",flexShrink:0,transform:[{translateY:.06*-a}]},children:(0,s.jsx)(Zt,{iconUrl:e,width:k,height:S,iconColor:r,accentColor:i})}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[(0,s.jsx)(c.Text,{style:{fontFamily:b,fontSize:x,lineHeight:1.15*x,fontWeight:"500",color:g,includeFontPadding:!1,flexShrink:1},children:t}),d&&(0,s.jsx)(c.Text,{style:{fontFamily:b,fontSize:.3*x,lineHeight:.3*x,fontWeight:"600",color:g,marginLeft:.06*x,includeFontPadding:!1},children:"TM"})]})]});return u?(0,s.jsx)(c.Pressable,{onPress:u,accessibilityRole:"button",accessibilityLabel:`Play ${t}`,testID:"brand-logo-play",style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:C}):(0,s.jsx)(c.View,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:C})}function qo({color:e,style:t}){return(0,s.jsx)(c.View,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function Xo({colors:e}){const t=e.selectionCard??e.backgroundAlt;return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[(0,s.jsx)(c.View,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16},children:[0,1].map(t=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[(0,s.jsx)(qo,{color:e.textMuted,style:{height:14,width:68}}),(0,s.jsx)(qo,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))}),(0,s.jsx)(c.View,{style:{gap:12,width:"100%"},children:[0,1].map(n=>(0,s.jsxs)(c.View,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:t,overflow:"hidden",width:"100%"},children:[(0,s.jsxs)(c.View,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.View,{style:{flex:1,gap:6},children:[(0,s.jsx)(qo,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),(0,s.jsx)(qo,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[(0,s.jsx)(qo,{color:e.textMuted,style:{height:14,width:40}}),(0,s.jsx)(qo,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),(0,s.jsx)(c.View,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,gap:4},children:[(0,s.jsx)(qo,{color:e.textMuted,style:{height:14,width:"88%"}}),(0,s.jsx)(qo,{color:e.textMuted,style:{height:12,width:"70%"}})]}),(0,s.jsx)(qo,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]},n))})]})}function Qo({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,demoEntries:i,demoGames:l,demoPropositions:h,onSelectEntry:u,theme:f,colorScheme:g,renderTeamLogo:p,filterSport:y}){const m=ee(f,g),b=!!(i&&l&&h),w=m.colors,x=se(m),[k,S]=(0,a.useState)("pending"),[C,B]=(0,a.useState)([]),z=(0,a.useMemo)(()=>new Jn({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),{entries:F,loading:v,error:W,refetch:T}=to(z,{user_id:r},{skip:b}),{games:A,loading:L,error:R}=$n(z,void 0,{skip:b}),{propositions:M,loading:D,error:P}=_n(z,void 0,{skip:b}),H=b?i:F,I=b?l:A,E=b?h:M,j=!b&&(v||L||D),N=b?null:W||R||P,G=(0,a.useMemo)(()=>H.map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t}),[H]),Y=(0,a.useMemo)(()=>{const e=new Map;for(const t of I)e.set(t.id,t);return e},[I]),V=(0,a.useMemo)(()=>{const e=new Map;for(const t of E)e.set(t.id,t);for(const t of G)if(t.propositions)for(const n of t.propositions)e.has(n.id)||e.set(n.id,n);for(const t of C)e.set(t.id,t);return e},[E,G,C]),U=(0,a.useRef)(new Set);(0,a.useEffect)(()=>{if(j||b)return;const e=[];for(const n of G)for(const t of n.proposition_ids??[])V.has(t)||U.current.has(t)||(e.push(t),U.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await z.getPropositionsByIds(e);!t&&n.length>0&&B(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[G,V,j,b,z]);const Z=(0,a.useMemo)(()=>y?G.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(V.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):G,[G,y,V]),K=(0,a.useMemo)(()=>Z.filter(e=>st(e.pending)),[Z]),q=(0,a.useMemo)(()=>Z.filter(e=>!st(e.pending)),[Z]),X="pending"===k?K:q;return j?(0,s.jsx)(c.View,{style:$o.container,accessibilityLabel:"Loading entries",children:(0,s.jsx)(Xo,{colors:O(m)})}):N?(0,s.jsx)(c.View,{style:$o.container,children:(0,s.jsxs)(c.View,{style:[$o.errorBanner,{backgroundColor:w.errorBg,borderColor:w.error}],children:[(0,s.jsx)(c.Text,{style:{color:w.errorText},children:N}),(0,s.jsx)(c.TouchableOpacity,{onPress:T,style:$o.retryButton,children:(0,s.jsx)(c.Text,{style:{color:w.error,textDecorationLine:"underline",fontSize:14,fontWeight:"500"},children:"Try again"})})]})}):(0,s.jsxs)(c.View,{style:$o.container,children:[(0,s.jsx)(c.View,{style:[$o.tabBar,{borderBottomColor:w.border}],children:["pending","completed"].map(e=>{const t=k===e,n="pending"===e?K.length:q.length;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>S(e),accessibilityRole:"tab",accessibilityState:{selected:t},style:[$o.tab,{borderBottomColor:t?w.primary:"transparent"}],children:[(0,s.jsx)(c.Text,{style:[$o.tabLabel,{color:t?w.primary:w.textMuted,fontFamily:x}],children:"pending"===e?"Pending":"Completed"}),(0,s.jsx)(c.View,{style:[$o.tabBadge,{backgroundColor:t?`${w.primary}15`:w.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[$o.tabBadgeText,{color:t?w.primary:w.textMuted}],children:n})})]},e)})}),0===X.length&&(0,s.jsxs)(c.View,{style:$o.emptyState,children:[(0,s.jsx)(c.View,{style:{marginBottom:16},children:(0,s.jsx)(d.default,{width:48,height:48,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"pending"===k?"M12 6v6l4 2m6-2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z":"M9 12l2 2 4-4m6 2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z",stroke:w.textMuted,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,s.jsx)(c.Text,{style:[$o.emptyTitle,{color:w.text}],children:"pending"===k?"No pending entries":"No completed entries"}),(0,s.jsx)(c.Text,{style:[$o.emptySubtitle,{color:w.textMuted}],children:"pending"===k?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),(0,s.jsx)(c.View,{style:$o.entryList,children:X.map(e=>(0,s.jsx)(Jo,{entry:e,game:Y.get(e.game_id),propositionsById:V,onSelect:u,theme:m,renderTeamLogo:p},e.id))})]})}function Jo({entry:e,game:t,propositionsById:n,onSelect:o,theme:r,renderTeamLogo:i}){const l=r.colors,h=D(r),u=se(r),f="dark"===r.colorScheme,g=e.proposition_ids??[],p=(0,a.useMemo)(()=>g.map(e=>n.get(e)).filter(Boolean),[g,n]),y=g.length,[m,b]=(0,a.useState)(!1),w=y>0,x=(0,a.useMemo)(()=>{const t=new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),k=t=>{const o=e.selections?.[t];return null!=o?o:x.get(t)?.user_prediction??n.get(t)?.user_prediction},S=p.filter(e=>null!=e.result&&!e.is_voided).length,C=p.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=k(e.id);return null!=t&&t===e.result}).length,B=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),z=st(e.pending),F=!z&&ct(e.winning)>0,v=e.payout_status,W="fulfilled"===v&&F,L=z?"Pending":W?"Won — pay due":"paid_out"===v&&F?"Paid":F?"Won":"Lost",R=z||W?l.warningBg:F?l.successBg:l.errorBg,M=z||W?l.warningText:F?l.successText:l.errorText,P=B&&S>0?`${C}/${y} correct`:y>0?`${y} pick${1!==y?"s":""}`:null,H=B&&S>0?C>0?l.success:l.error:l.textMuted,O=(0,s.jsxs)(c.View,{style:$o.cardHeader,children:[(0,s.jsxs)(c.View,{style:$o.cardHeaderLeft,children:[(()=>{const n=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`;return t?(0,s.jsx)(Ko,{iconUrl:pe(t),gameName:n,height:18,chipColor:l.primary,textColor:l.text,iconColor:l.primaryText,accentColor:r.brand?.accent}):(0,s.jsx)(c.Text,{style:[$o.cardGameName,{color:l.text,fontFamily:u}],numberOfLines:1,children:n})})(),(0,s.jsxs)(c.View,{style:$o.metaRow,children:[(e.created_at||e.entry_date)&&(0,s.jsx)(c.Text,{style:[$o.metaText,{color:l.textMuted}],children:ut(e.created_at||e.entry_date)}),P&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Text,{style:[$o.metaDot,{color:l.textMuted}],children:"·"}),(0,s.jsx)(c.Text,{style:[$o.metaText,{fontWeight:"500",color:H}],children:P})]})]})]}),(0,s.jsxs)(c.View,{style:$o.cardHeaderRight,children:[(0,s.jsxs)(c.View,{style:$o.amounts,children:[ct(e.bet_amount)>0&&(0,s.jsx)(c.Text,{style:[$o.betLabel,{color:l.textMuted}],children:ht(ct(e.bet_amount))}),!z&&ct(e.winning)>0&&(0,s.jsxs)(c.View,{style:{alignItems:"flex-end"},children:[(0,s.jsx)(c.Text,{style:[$o.winAmount,{color:l.success}],children:ht(ct(e.winning))}),(e.payout_jackpot??0)>0&&(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"400",color:l.textMuted},children:["incl. ",ht(ct(e.payout_jackpot))," jackpot"]})]})]}),(0,s.jsx)(c.View,{style:[$o.statusPill,{backgroundColor:R}],children:(0,s.jsx)(c.Text,{style:[$o.statusText,{color:M}],children:L})}),w&&(0,s.jsx)(c.View,{style:{transform:[{rotate:m?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:l.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]});return(0,s.jsxs)(c.View,{style:[$o.card,{borderColor:l.border,backgroundColor:h,shadowColor:"#000",shadowOpacity:f?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:[(0,s.jsx)(c.TouchableOpacity,{testID:"entry-card",onPress:()=>{w&&b(e=>!e),o?.({entry:e,game:t,propositions:p})},activeOpacity:.7,disabled:!w&&!o,accessibilityLabel:`Entry #${e.id}`,accessibilityState:w?{expanded:m}:void 0,children:O}),m&&y>0&&g.map(t=>{const o=(t=>n.get(t)??e.propositions?.find(e=>e.id===t))(t),a=k(t);if(!o)return(0,s.jsxs)(c.View,{style:[$o.propRow,{borderTopColor:l.border,borderTopWidth:1}],children:[(0,s.jsx)(c.View,{style:$o.propInfo,children:(0,s.jsxs)(c.Text,{style:{fontSize:14,color:l.textMuted},children:["Loading proposition #",t,"…"]})}),null!=a&&(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===a?T(r):A(r)},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:"#ffffff",letterSpacing:.4,textTransform:"uppercase"},children:dt(a)})})]},t);const d=o.result,h=null!=d,u=!!o.is_voided,f=h&&!u&&null!=a&&a===d;let g,p,y;u?(g="Void",p=`${l.textMuted}20`,y=l.textMuted):h?f?(g="Won",p=l.successBg,y=l.successText):(g="Lost",p=l.errorBg,y=l.errorText):(g="Pending",p=l.warningBg,y=l.warningText);const m=mt(o)?void 0:o.home_team;return(0,s.jsxs)(c.View,{style:[$o.propRow,{borderTopColor:l.border,borderTopWidth:1}],children:[(0,s.jsxs)(c.View,{style:$o.propInfo,children:[(o.home_team||o.away_team)&&(0,s.jsxs)(c.View,{style:$o.teamsRow,children:[i&&m?i(m):null,m?(0,s.jsx)(c.Text,{style:[$o.teamName,{color:l.text}],children:m}):null,m&&o.away_team?(0,s.jsx)(c.Text,{style:[$o.vsText,{color:l.textMuted}],children:"vs"}):null,i&&o.away_team?i(o.away_team):null,o.away_team?(0,s.jsx)(c.Text,{style:[$o.teamName,{color:l.text}],children:o.away_team}):null]}),(o.proposition||o.description)&&(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted,marginTop:2},children:o.proposition||o.description}),o.commence_time&&(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted,marginTop:2},children:ut(o.commence_time)})]}),(0,s.jsxs)(c.View,{style:$o.outcomeCol,children:[(0,s.jsx)(c.Text,{style:[$o.outcomeLabel,{color:l.textMuted}],children:"Pick"}),null!=a?(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===a?T(r):A(r)},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:"#ffffff",letterSpacing:.4,textTransform:"uppercase"},children:dt(a)})}):(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted},children:"—"})]}),(0,s.jsxs)(c.View,{style:$o.outcomeCol,children:[(0,s.jsx)(c.Text,{style:[$o.outcomeLabel,{color:l.textMuted}],children:"Result"}),(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:p},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"700",color:y,textTransform:"uppercase"},children:g})})]})]},t)})]})}var $o=c.StyleSheet.create({container:{flex:1},errorBanner:{padding:16,borderRadius:8,borderWidth:1},retryButton:{marginTop:8},tabBar:{flexDirection:"row",borderBottomWidth:1,marginBottom:16},tab:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10,borderBottomWidth:2,marginBottom:-1},tabLabel:{fontSize:14,fontWeight:"500"},tabBadge:{minWidth:20,height:20,paddingHorizontal:6,borderRadius:999,alignItems:"center",justifyContent:"center"},tabBadgeText:{fontSize:12,fontWeight:"600"},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{borderRadius:12,borderWidth:1,overflow:"hidden"},cardHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:16,paddingVertical:12,gap:12},cardHeaderLeft:{flex:1,minWidth:0},cardGameName:{fontSize:16,fontWeight:"600"},metaRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},metaText:{fontSize:12},metaDot:{fontSize:12},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},amounts:{alignItems:"flex-end"},betLabel:{fontSize:12},winAmount:{fontSize:14,fontWeight:"700"},statusPill:{paddingHorizontal:10,paddingVertical:2,borderRadius:999},statusText:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:.3},propRow:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:10,gap:12},propInfo:{flex:1},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6},teamName:{fontSize:14,fontWeight:"500"},vsText:{fontSize:12,fontWeight:"400"},outcomeCol:{alignItems:"center",gap:2,flexShrink:0},outcomeLabel:{fontSize:9,fontWeight:"600",letterSpacing:.225,textTransform:"uppercase"}});function _o({style:e}){const{theme:t,bodyFont:n,eventFilterActive:o,eventFilterLabel:r,clearEventFilter:i,gameCategory:l}=co(),{width:d}=(0,c.useWindowDimensions)(),h=d>=640,[u,f]=a.default.useState(!1);if(!o)return null;const g=t.colors,p=r??("racing"===l?"This race":"This event");return(0,s.jsxs)(c.View,{style:[er.container,h&&er.containerWide,{borderColor:`${g.primary}33`,backgroundColor:g.surface},e],children:[(0,s.jsxs)(c.View,{style:er.textBlock,children:[(0,s.jsx)(c.Text,{style:[er.kicker,{color:g.primary,fontFamily:n}],children:"Event filter"}),(0,s.jsx)(c.Text,{style:[er.label,{color:g.text,fontFamily:n}],numberOfLines:1,children:p}),(0,s.jsx)(c.Text,{style:[er.hint,{color:g.textMuted,fontFamily:n}],children:"Only propositions from this event are shown."})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:[er.button,h&&er.buttonWide,{borderColor:`${g.primary}44`,backgroundColor:g.background,opacity:u?.9:1}],children:(0,s.jsx)(c.Text,{style:[er.buttonText,{color:g.text,fontFamily:n}],children:"Show all events"})})]})}var er=c.StyleSheet.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:10,gap:8},containerWide:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},textBlock:{minWidth:0,flexShrink:1},kicker:{fontSize:10,fontWeight:"700",letterSpacing:1.2,textTransform:"uppercase"},label:{fontSize:14,fontWeight:"600"},hint:{fontSize:12},button:{flexShrink:0,alignSelf:"flex-start",borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},buttonWide:{alignSelf:"center"},buttonText:{fontSize:12,fontWeight:"600"}});function tr({onBack:e,title:t="Go back"}){const{theme:n}=co(),o=n.colors,[r,i]=a.default.useState(!1);return(0,s.jsx)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:t,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{padding:2,alignItems:"center",justifyContent:"center",borderRadius:999,transform:[{translateX:r?-2:0}]},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:r?o.text:o.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})}function nr({onBack:e,label:t="Games"}){const{theme:n}=co(),o=n.colors,[r,i]=a.default.useState(!1),l=r?o.primary:o.textMuted;return(0,s.jsxs)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:t,activeOpacity:.7,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),style:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"flex-start",marginBottom:12,transform:[{translateX:r?-2:0}]},children:[(0,s.jsx)(d.default,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:l,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:l},children:t})]})}function or({onBack:e,hideActions:t,label:n,children:o}){const{theme:r}=co(),i=r.colors,{width:l}=(0,c.useWindowDimensions)(),h=l>=640,[u,f]=a.default.useState(!1);if(!e&&null==n&&!o)return null;const g=e=>(0,s.jsx)(c.Text,{style:{fontSize:h?14:12,flexShrink:1,color:e},children:n});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[e&&(null!=n?(0,s.jsxs)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:"Go back",activeOpacity:.7,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,transform:[{translateX:u?-2:0}]},children:[(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:u?i.text:i.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),g(u?i.text:i.textMuted)]}):(0,s.jsx)(tr,{onBack:e})),!e&&null!=n&&g(i.textMuted),o]})}var rr=[1,5,10,20,50,100],ir=[4,12];function lr(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function ar(e,t,n){const o=n?.operatorMargin??.2,r=n?.perLegProbability??.5,i=Math.round(Math.pow(1/r,t)),l=(1-o)*Math.pow(1/r,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:i}}function cr(e){if(!lr(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??ir[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??ir[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),i=e.max_bet??null,l=rr.filter(e=>e>=r&&(null===i||e<=i));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),i??20),minStake:r,maxStake:i,quickStakes:l,tagline:"Two steps to your multi. Tweak legs and stake — the prize updates as you go.",operatorMargin:e.operator_margin??.2,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var sr=[25,50,75,100],dr=[{legs:4,firstPayingTier:3,tiers50:[[3,60],[4,340]]},{legs:6,firstPayingTier:4,tiers50:[[4,40],[5,110],[6,850]]},{legs:8,firstPayingTier:5,tiers50:[[5,30],[6,70],[7,300],[8,2100]]},{legs:9,firstPayingTier:5,tiers50:[[5,10],[6,40],[7,100],[8,350],[9,4500]]},{legs:10,firstPayingTier:6,tiers50:[[6,15],[7,45],[8,140],[9,800],[10,1e4]]}];function hr(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function ur(e,t){return Math.round(e*t/50*100)/100}function fr(e,t){let n=0;return e.tiers50.map(([e,o])=>(n+=o,{atLeast:e,prize:ur(o,t),cumulative:ur(n,t)}))}function gr(e,t){return ur(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function pr(e){if(!hr(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,o=e.max_propositions??10,r=dr.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=o);if(0===r.length)return null;const i=e.min_bet??sr[0],l=e.max_bet??sr[sr.length-1],a=sr.filter(e=>e>=i&&e<=l);return{ladders:r,defaultLegs:r.some(e=>8===e.legs)?8:r[Math.floor(r.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:sr,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var yr=[1,5,10,20,50],mr=[4,12];function br(e){return!!e&&!e.quick_pick_only&&"mirror"===(e.rule??"").trim().toLowerCase()}function wr(e,t,n){const o=n?.operatorMargin??.21875,r=n?.perLegProbability??.5,i=Math.round(Math.pow(2,t)),l=Math.pow(r,t)+Math.pow(1-r,t),a=Math.round(1/l),c=(1-o)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*c*100)/100,multiple:c,totalOutcomes:i,winningOutcomes:2,oddsOneIn:a}}function xr(e){if(!br(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??mr[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??mr[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),i=e.max_bet??null,l=yr.filter(e=>e>=r&&(null===i||e<=i));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),i??20),minStake:r,maxStake:i,quickStakes:l,tagline:"Call every leg. Get them all right, you win — all wrong, you win the same.",operatorMargin:e.operator_margin??.21875,perLegProbability:e.payout_structure?.per_leg_probability??.5}}function kr(e){return e?.quick_pick_only?"quick_pick":lr(e)?"game_set":Dn(e)?"pick_your_dividend":hr(e)?"ladder":br(e)?"mirror":yn(e)?"safety_net":$t(e)?"selections":Ln(e)?"rule_setup":"selections"}function Sr(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if($t(e))return!1;const t=!!(e.allowed_markets&&e.allowed_markets.length>0),n=!!(e.allowed_sports&&e.allowed_sports.length>0);return t||n}function Cr(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||$t(e)||Sr(e))}function Br(e){switch(kr(e)){case"ladder":return{belowRequiredHint:(e,t)=>`Drop to Ladder ${e} or add another pick to stay on Ladder ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay on Ladder ${e}.`,switchTierLabel:e=>`Switch to Ladder ${e}`,overloadTitle:"Add more picks to climb higher",tableColumnLabel:"Ladder",tierButtonLabel:e=>`Ladder ${e}`};case"game_set":case"pick_your_dividend":case"mirror":case"safety_net":return{belowRequiredHint:(e,t)=>`Drop to ${e} legs or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e} legs.`,switchTierLabel:e=>`Switch to ${e} legs`,overloadTitle:"Add more legs to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`${e} legs`};default:return{belowRequiredHint:(e,t)=>`Drop to a ${e}-leg multi or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e}.`,switchTierLabel:e=>`Switch to ${e}-leg`,overloadTitle:"Add more picks to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`Multi ${e}`}}}function zr({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:r,howToPlayMarkdown:i,selectedCategory:l,displayCategoryName:a}=co(),d=n.colors,{width:h}=(0,c.useWindowDimensions)(),u=h>=640,f=h>=768;return(0,s.jsxs)(c.View,{style:u&&Fr.headerWide,children:[(0,s.jsxs)(c.View,{style:Fr.titleRow,children:[(0,s.jsx)(c.Text,{style:[Fr.title,u&&Fr.titleWide,f&&Fr.titleDesktop,{color:F(n),fontFamily:o,flex:1}],children:"Choose your game"}),i?.trim()?(0,s.jsx)(c.View,{style:Fr.howToPlayWrap,children:(0,s.jsx)(Ee,{content:i,title:"How to Play",colors:{text:d.text,textMuted:d.textMuted,border:d.border,background:d.background,backgroundAlt:d.backgroundAlt,primary:d.primary,primaryText:d.primaryText},bodyFont:r,headingFont:o})}):null]}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:l?a(l):void 0})]})}var Fr=c.StyleSheet.create({container:{flex:1},headerWide:{paddingLeft:8},titleRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:12},title:{fontSize:18,fontWeight:"700",lineHeight:22.5},titleWide:{fontSize:20,lineHeight:25},titleDesktop:{fontSize:24,lineHeight:30},howToPlayWrap:{flexShrink:0,marginTop:2},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function vr(e,t){const n=new Set(t.map(e=>e.eventId??e.event_id).filter(e=>Boolean(e)));if(0===n.size)return e;const o=[],r=[];for(const i of e){const e=i.eventId??i.event_id;(e&&n.has(e)?r:o).push(i)}return[...o,...r]}function Wr(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)([]),[c,s]=(0,a.useState)([]),[d,h]=(0,a.useState)([]),[u,f]=(0,a.useState)(null),g=(0,a.useMemo)(()=>{const t=new Map;for(const n of e)t.set(n.id,n);return t},[e]),p=(0,a.useMemo)(()=>e.filter(e=>null!=t[e.id]),[e,t]),y=(0,a.useMemo)(()=>e.map(e=>e.id).join(","),[e]),m=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(m.current===y)return;m.current=y;const n=e.filter(e=>!(e.id in t)),o=e.filter(e=>null!=t[e.id]);r(n.map(e=>e.id)),l(vr(n,o).slice(0,3).map(e=>e.id)),s([]),h([]),f(null)},[y,e,t]);const b=(0,a.useMemo)(()=>{const e=new Set(c);return[...vr(o.map(e=>g.get(e)).filter(e=>Boolean(e)).filter(t=>!e.has(t.id)),p).map(e=>e.id),...c.filter(e=>o.includes(e))]},[o,g,p,c]);(0,a.useEffect)(()=>{l(e=>{const t=new Set(o),n=e.filter(e=>t.has(e));if(0===d.length&&!u){const t=b.slice(0,3);return t.length===n.length&&t.every((e,t)=>e===n[t])?n.length===e.length?e:n:t}if(n.length>=Math.min(3,o.length))return n.length===e.length?e:n;const r=[...n];for(const o of b){if(r.length>=3)break;r.includes(o)||r.push(o)}return r})},[o,b,d,u]);const w=(0,a.useMemo)(()=>i.map(e=>g.get(e)).filter(e=>Boolean(e)),[i,g]),x=(0,a.useCallback)((e,t)=>{f(null),t&&n(e,t),h(n=>[...n,{id:e,answer:t}]),l(t=>t.filter(t=>t!==e)),s(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]}),r(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]})},[n]),k=(0,a.useCallback)(()=>{const e=d[d.length-1];e&&(e.answer&&n(e.id,e.answer),f({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),h(e=>e.slice(0,-1)),s(t=>t.filter(t=>t!==e.id)),r(t=>[e.id,...t.filter(t=>t!==e.id)]),l(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[d,n]);return{visible:w,canSkip:o.length>1,canUndo:d.length>0,restored:u,resolve:x,undo:k}}var Tr=c.Easing.bezier(.32,0,.67,0),Ar=c.Easing.bezier(.22,1,.36,1),Lr={stiffness:420,damping:34},Rr={stiffness:280,damping:28},Mr="#00C853",Dr="#E53935";function Pr(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function Hr(e,t,n){return n&&-t>Math.abs(e)}function Or({prop:e,theme:t,depth:n=0,enterFrom:o,canSkip:r=!1,onResolve:i,registerApi:l,onDragStateChange:d,children:h}){const u=(0,a.useContext)(lo),f=t??u?.theme??j,g=se(f),p=f.colors.productYes??Mr,y=f.colors.productNo??Dr,m=0===n,b=(0,a.useRef)(!1),w=(0,a.useRef)({x:0,y:0}),x=(0,a.useRef)({x:0,y:0}),k=(0,a.useRef)(null),S=(0,a.useRef)(0),C=(0,a.useRef)(null),B=(0,a.useRef)(null),z=(0,a.useRef)(null),F=(0,a.useRef)(r);F.current=r;const v=(0,a.useRef)(d);v.current=d;const W=(0,a.useRef)(new c.Animated.ValueXY({x:0,y:0})).current,T=(0,a.useRef)(new c.Animated.Value(0)).current,A=(0,a.useCallback)(()=>{W.setValue({x:w.current.x,y:w.current.y}),T.setValue(Hr(w.current.x,w.current.y,F.current)?1:0)},[T,W]),L=(0,a.useCallback)(()=>{null!=C.current&&(cancelAnimationFrame(C.current),C.current=null),B.current&&(B.current.stop(),B.current=null)},[]),R=(0,a.useCallback)(e=>{L();let t=null;const n=o=>{const r=Math.min(null==t?1/60:(o-t)/1e3,1/30);t=o;const i=w.current,l=x.current;if(l.x+=(-e.stiffness*i.x-e.damping*l.x)*r,l.y+=(-e.stiffness*i.y-e.damping*l.y)*r,i.x+=l.x*r,i.y+=l.y*r,Math.abs(i.x)<.5&&Math.abs(i.y)<.5&&Math.abs(l.x)<2&&Math.abs(l.y)<2)return i.x=0,i.y=0,l.x=0,l.y=0,A(),void(C.current=null);A(),C.current=requestAnimationFrame(n)};C.current=requestAnimationFrame(n)},[A,L]),M=(0,a.useCallback)(t=>{if(b.current)return;if("up"===t&&!F.current)return;b.current=!0,L();const n="right"===t?"yes":"left"===t?"no":null,o=Pr(t);w.current={...o},T.setValue("up"===t?1:0),B.current=c.Animated.timing(W,{toValue:o,duration:260,easing:Tr,useNativeDriver:!1}),B.current.start(),z.current=setTimeout(()=>i(e.id,n),260)},[i,e.id,L,T,W]);(0,a.useEffect)(()=>()=>{z.current&&clearTimeout(z.current),null!=C.current&&cancelAnimationFrame(C.current),B.current?.stop(),k.current&&v.current?.(!1)},[]),(0,a.useEffect)(()=>{if(!o)return L(),w.current={x:0,y:0},x.current={x:0,y:0},void A();const e=Pr(o);w.current={x:e.x,y:e.y},x.current={x:0,y:0},A(),R(Rr)},[o,A,R,L]),(0,a.useEffect)(()=>{if(m&&l)return l({fly:M}),()=>l(null)},[M,m,l]);const D=(0,a.useMemo)(()=>c.PanResponder.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,t)=>!b.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||F.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{L(),k.current={x:w.current.x,y:w.current.y},x.current={x:0,y:0},S.current=Date.now(),v.current?.(!0)},onPanResponderMove:(e,t)=>{if(b.current||!k.current)return;if(t.numberActiveTouches>1)return;const n=k.current.x+t.dx,o=k.current.y+t.dy,r=e.nativeEvent.timestamp??Date.now(),i=r-S.current;if(i>0){const e=1-Math.exp(-i/40);x.current.x+=((n-w.current.x)/i*1e3-x.current.x)*e,x.current.y+=((o-w.current.y)/i*1e3-x.current.y)*e,S.current=r}w.current.x=n,w.current.y=o,A()},onPanResponderRelease:e=>{if(!k.current)return;if(k.current=null,v.current?.(!1),b.current)return;(e.nativeEvent.timestamp??Date.now())-S.current>90&&(x.current={x:0,y:0});const t=w.current,n=x.current;if(Hr(t.x,t.y,F.current)){if(t.y<-110||n.y<-620)return M("up")}else{if(t.x>110||n.x>620)return M("right");if(t.x<-110||n.x<-620)return M("left")}R(Lr)},onPanResponderTerminate:()=>{k.current=null,x.current={x:0,y:0},v.current?.(!1),b.current||R(Lr)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[M,A,R,L]),P=W.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),H=c.Animated.subtract(1,T),O=c.Animated.multiply(H,W.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),I=c.Animated.multiply(H,W.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),E=c.Animated.multiply(T,W.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),N=(0,a.useRef)(new c.Animated.Value(n)).current;(0,a.useEffect)(()=>{const e=c.Animated.timing(N,{toValue:n,duration:240,easing:Ar,useNativeDriver:!1});return e.start(),()=>e.stop()},[n,N]);const G=N.interpolate({inputRange:[0,3],outputRange:[0,36]}),Y=N.interpolate({inputRange:[0,3],outputRange:[1,.88]});return(0,s.jsx)(c.Animated.View,{style:[c.StyleSheet.absoluteFillObject,{zIndex:3-n,transform:[{translateY:G},{scale:Y}]}],pointerEvents:m?"auto":"none",children:(0,s.jsxs)(c.Animated.View,{style:{flex:1,transform:[{translateX:W.x},{translateY:W.y},{rotate:P}]},...m?D.panHandlers:{},children:[h,m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[jr.stamp,jr.stampLeft,{opacity:O,borderColor:p,transform:[{rotate:"-12deg"}]}],children:(0,s.jsx)(c.Text,{style:[jr.stampText,{color:p,fontFamily:g}],children:"Yes"})}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[jr.stamp,jr.stampRight,{opacity:I,borderColor:y,transform:[{rotate:"12deg"}]}],children:(0,s.jsx)(c.Text,{style:[jr.stampText,{color:y,fontFamily:g}],children:"No"})}),r&&(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[jr.skipPillWrap,{opacity:E}],children:(0,s.jsx)(c.View,{style:[jr.skipPill,{borderColor:f.colors.border,backgroundColor:f.colors.background}],children:(0,s.jsx)(c.Text,{style:[jr.skipPillText,{color:f.colors.primary}],children:"Skip"})})})]})]})})}function Ir({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:o,displaySportName:r,gameCategory:i}=co(),l=t.colors,{height:a}=(0,c.useWindowDimensions)(),d=a<700?12:24,h=nt(e),u=Qe(e),f=("racing"===i?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean);return(0,s.jsxs)(c.View,{style:[jr.face,{backgroundColor:D(t),borderColor:l.border}],children:[(0,s.jsx)(c.View,{style:[jr.matchupBand,{backgroundColor:P(t)}],children:f.length>0?f.map((e,n)=>(0,s.jsxs)(c.View,{style:jr.matchupTeam,children:[n>0&&(0,s.jsx)(c.Text,{style:[jr.matchupVs,{color:M(t)}],children:"vs"}),o?.(e),(0,s.jsx)(c.Text,{style:[jr.matchupName,{color:R(t)}],children:e})]},`${e}-${n}`)):(0,s.jsx)(c.Text,{style:[jr.matchupName,{color:R(t)}],children:e.league??r(e.sport??"")})}),(0,s.jsxs)(c.View,{style:[jr.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:[(0,s.jsxs)(c.View,{style:jr.propositionRow,children:[To(e,o,f.join(" vs ")),h?(0,s.jsxs)(c.View,{style:{flex:1,gap:12},children:[(0,s.jsxs)(c.Text,{style:[jr.compositeLabel,{color:v(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),(0,s.jsx)(c.View,{style:{gap:8},children:h.legs.map((e,o)=>(0,s.jsxs)(c.View,{style:jr.compositeLeg,children:[(0,s.jsx)(c.Text,{style:{color:l.primary,fontWeight:"700"},children:"OR"===h.operator?"/":"+"}),(0,s.jsx)(c.Text,{style:[jr.compositeLegText,{color:W(t),fontFamily:n}],children:e.text})]},o))})]}):(0,s.jsx)(c.Text,{style:[jr.proposition,{flex:1,color:W(t),fontFamily:n}],children:e.description??e.proposition})]}),e.outcome_description&&e.outcome_description!==e.description&&(0,s.jsx)(c.Text,{style:[jr.outcome,{color:l.textMuted}],children:e.outcome_description})]}),(0,s.jsxs)(c.View,{style:[jr.faceFooter,{borderTopColor:l.borderSubtle??l.border}],children:[e.sport?(0,s.jsx)(c.View,{style:[jr.sportChip,{backgroundColor:l.infoBg}],children:(0,s.jsx)(c.Text,{style:[jr.sportChipText,{color:l.infoText}],children:r(e.sport)})}):null,u?(0,s.jsx)(c.Text,{style:[jr.footerMeta,{color:l.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?(0,s.jsx)(c.Text,{style:[jr.footerMeta,jr.footerDate,{color:l.textMuted}],children:ut(e.commence_time)}):null]})]})}function Er({onBack:e,onNext:t,viewSwitch:n,onDragStateChange:o}){const{theme:r,headingFont:i,propositions:l,selections:d,toggleSelection:h,selectedGame:u,selectedPropositionCount:f,answeredCount:g,selectionValid:p,goToConfirmation:y,goToSportSelection:m,loading:b,error:w,selectedRule:x}=co(),k=r.colors,S=k.productYes??Mr,C=k.productNo??Dr,{height:B}=(0,c.useWindowDimensions)(),z=Math.max(224,Math.min(.44*B,416)),v=(0,a.useRef)(null);(0,a.useEffect)(()=>{u||(m(),e?.())},[m,e,u]);const{visible:W,canSkip:T,canUndo:A,restored:L,resolve:R,undo:M}=Wr(l,d,h),P=u?St(u,f??void 0,x):{min:0,max:0},H=P.max,O=H>0&&g>=H,I=(()=>{if(!u)return null;if(P.min>0&&P.min===P.max)return P.min;const e=kr(u);return null!=f&&f>0&&("game_set"===e||"pick_your_dividend"===e||Sr(u))?f:H>0?H:null})(),E=(0,a.useRef)(g);(0,a.useEffect)(()=>{const e=E.current;if(E.current=g,null==I||e>=I||g!==I)return;const n=setTimeout(()=>{y(),t?.()},420);return()=>clearTimeout(n)},[g,y,t,I]);const j=!O&&W.length>0,N=(0,a.useCallback)(e=>{v.current=e},[]);if(!u)return null;const G=(e,t,n,o)=>(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[jr.circleButton,{borderColor:k.border,backgroundColor:k.background},o&&jr.disabled],children:(0,s.jsx)(c.Text,{style:{fontSize:18,color:k.textMuted},children:t})});return(0,s.jsxs)(c.View,{style:jr.container,children:[n?(0,s.jsx)(c.View,{style:jr.viewSwitchRow,children:n}):null,b?(0,s.jsx)(c.Text,{style:[jr.loadingText,{color:k.textMuted}],children:"Loading…"}):w?(0,s.jsx)(c.View,{style:[jr.errorBox,{backgroundColor:k.errorBg,borderColor:k.error}],children:(0,s.jsx)(c.Text,{style:{fontSize:14,color:k.errorText??k.error,textAlign:"center"},children:w})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:jr.deckArea,children:j?(0,s.jsx)(c.View,{style:[jr.deck,{height:z}],children:W.map((e,t)=>(0,s.jsx)(Or,{prop:e,depth:t,canSkip:T,enterFrom:L?.id===e.id?L.from:null,onResolve:R,registerApi:0===t?N:void 0,onDragStateChange:0===t?o:void 0,children:(0,s.jsx)(Ir,{prop:e})},e.id))}):(0,s.jsxs)(c.View,{style:[jr.emptyState,{backgroundColor:D(r),borderColor:k.border}],children:[(0,s.jsx)(c.Text,{style:[jr.emptyTitle,{color:F(r),fontFamily:i}],children:O?"Card full":"That’s the last one"}),(0,s.jsx)(c.Text,{style:[jr.emptyBody,{color:k.textMuted}],children:O?`You've picked all ${H} legs for ${u.game_name}. Undo a swipe to change one, or lock it in.`:p?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${P.min>0?` — this game needs at least ${P.min}`:""}. Undo a swipe or head back to widen the pool.`}),A&&(0,s.jsx)(c.TouchableOpacity,{onPress:M,style:[jr.emptyUndo,{borderColor:k.border}],children:(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:k.text},children:"Undo last swipe"})})]})}),(0,s.jsxs)(c.View,{style:jr.buttonArea,children:[(0,s.jsxs)(c.View,{style:jr.buttonRow,children:[G("Undo last swipe","↺",M,!A),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>v.current?.fly("left"),disabled:!j,style:[jr.answerButton,{backgroundColor:C},!j&&jr.disabled],children:(0,s.jsx)(c.Text,{style:[jr.answerButtonText,{fontFamily:i}],children:"NO"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>v.current?.fly("right"),disabled:!j,style:[jr.answerButton,{backgroundColor:S},!j&&jr.disabled],children:(0,s.jsx)(c.Text,{style:[jr.answerButtonText,{fontFamily:i}],children:"YES"})}),G("Skip this proposition","↑",()=>v.current?.fly("up"),!j||!T)]}),(0,s.jsx)(c.Text,{style:[jr.gestureHint,{color:k.textMuted}],children:T?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})]})]})}var jr=c.StyleSheet.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{borderRadius:12,borderWidth:1,padding:16},deckArea:{flex:1,minHeight:0,justifyContent:"center",paddingTop:12,paddingBottom:32},deck:{width:"100%",maxWidth:384,alignSelf:"center"},face:{flex:1,borderRadius:24,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,paddingHorizontal:20,paddingVertical:12},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{fontSize:12,marginRight:4},matchupName:{fontSize:14,fontWeight:"600"},faceBody:{flex:1,justifyContent:"center",gap:16,paddingHorizontal:20,paddingVertical:24},compositeLabel:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.5},compositeLeg:{flexDirection:"row",gap:8},compositeLegText:{flex:1,fontSize:16,fontWeight:"700",lineHeight:21},propositionRow:{flexDirection:"row",alignItems:"flex-start",gap:8},proposition:{fontSize:21,fontWeight:"800",lineHeight:27,letterSpacing:-.3},outcome:{fontSize:14,lineHeight:19},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},sportChipText:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5},footerMeta:{fontSize:11,letterSpacing:.5},footerDate:{marginLeft:"auto"},stamp:{position:"absolute",top:20,borderWidth:4,borderRadius:12,paddingHorizontal:12,paddingVertical:4},stampLeft:{left:20},stampRight:{right:20},stampText:{fontSize:24,fontWeight:"800",textTransform:"uppercase",letterSpacing:2},skipPillWrap:{position:"absolute",left:0,right:0,bottom:24,alignItems:"center"},skipPill:{borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:4},skipPillText:{fontSize:12,fontWeight:"600",textTransform:"uppercase",letterSpacing:1.5},emptyState:{width:"100%",maxWidth:384,alignSelf:"center",alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},emptyUndo:{borderWidth:1,borderRadius:999,paddingHorizontal:20,paddingVertical:8},buttonArea:{flexShrink:0},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},circleButton:{height:44,width:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answerButton:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35}});function Nr({gameKey:e,short:t,size:n=56,footer:o="YESNO Multi",title:r,sportBaseKey:i}){const l=lt(e,i,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l);return(0,s.jsxs)(d.default,{viewBox:"0 0 360 360",width:n,height:n,accessibilityLabel:r??`${l} button`,children:[(0,s.jsx)(d.Rect,{x:2,y:2,width:356,height:356,rx:78,fill:"#DDD9D2",stroke:ot,strokeWidth:4}),(0,s.jsx)(d.Rect,{x:50,y:10,width:260,height:260,rx:52,fill:ot,opacity:.3}),(0,s.jsx)(d.Rect,{x:50,y:35,width:260,height:260,rx:52,fill:ot,opacity:.55}),(0,s.jsx)(d.Rect,{x:50,y:60,width:260,height:260,rx:52,fill:ot}),(0,s.jsx)(d.Text,{x:180,y:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:"#DFFF1A",children:l}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Text,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:ot,children:o}),(0,s.jsx)(d.Text,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:ot,children:"TM"})]})]})}function Gr({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{theme:o,selectedCategory:r}=co(),i=o.colors,l=se(o),{width:a}=(0,c.useWindowDimensions)(),d=a>=640;return(0,s.jsxs)(c.View,{style:d&&Vr.headerWide,children:[(0,s.jsx)(c.Text,{style:[Vr.sectionTitle,d&&Vr.sectionTitleWide,{color:i.primary,fontFamily:l}],children:xt(r)}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:e?n:void 0})]})}function Yr({onSelectSport:e,onCancel:t,hideTitle:n,hideActions:o,renderSportLogo:r,renderSportTagline:i,backLabel:l,comingSoonSports:d}){const{theme:h,propositionsForSportPicker:u,sportSummaries:f,loading:g,setSelectedSport:p,clearSelectedGame:y,selectedCategory:m,sportBaseKey:b,displaySportName:w}=co(),x=h.colors,k=D(h),S=se(h),C=ce(h),B=F(h),{width:z}=(0,c.useWindowDimensions)(),v=z>=640,W=v?48:40,[T,A]=a.default.useState(null),L=ft(u),R=Object.keys(L);return g?(0,s.jsx)(c.View,{style:Vr.container,children:(0,s.jsx)(Bo,{colors:O(h),bodyFont:C,variant:"sport",categoryCount:R.length>0?R.length:2})}):(0,s.jsxs)(c.View,{style:Vr.container,children:[!n&&(0,s.jsx)(c.View,{style:Vr.titleWrap,children:(0,s.jsx)(Gr,{onBack:t,hideActions:o,backLabel:l})}),(0,s.jsx)(c.View,{style:Vr.content,children:(0,s.jsxs)(c.View,{style:Vr.grid,children:[R.map(t=>{const n=f.find(e=>e.key===t),o=n?.active_props??L[t].length,l=i?.(t,o)??(n?`${a=n.games_today} game${1===a?"":"s"} today · ${d=n.active_props} pick${1===d?"":"s"} available`:function(e,t){return 0===e?"racing"===t?"No races today":"casino"===t?"No games today":"No picks available":"racing"===t?`${e} race${1===e?"":"s"} today`:"casino"===t?`${e} game${1===e?"":"s"} available`:`${e} pick${1===e?"":"s"} available`}(o,m));var a,d;const h=w(t),u=T===t,g=n?n.games_today>0:o>0;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{p(t),y(),e?.(t)},onMouseEnter:()=>A(t),onMouseLeave:()=>A(e=>e===t?null:e),style:[Vr.gridCard,v&&Vr.gridCardWide,{backgroundColor:k,borderColor:u?x.primary:x.border},Vr.gridCardRaised],activeOpacity:.85,children:[r?r(t):(0,s.jsx)(Nr,{gameKey:t,size:W,footer:null,sportBaseKey:b,title:`${h} button`}),(0,s.jsxs)(c.View,{style:Vr.gridText,children:[(0,s.jsx)(c.Text,{numberOfLines:1,style:[Vr.gridName,v&&Vr.gridNameWide,{color:B,fontFamily:S}],children:h}),(0,s.jsxs)(c.View,{style:Vr.gridTaglineRow,children:[g?(0,s.jsx)(c.View,{style:[Vr.liveDot,{backgroundColor:x.success}]}):null,(0,s.jsx)(c.Text,{numberOfLines:1,style:[Vr.gridMeta,{color:x.primary,fontFamily:C}],children:l})]})]}),(0,s.jsx)(c.View,{style:Vr.gridChevron,children:(0,s.jsx)(Ge,{size:20,color:x.textMuted})})]},t)}),d?.map(e=>{const{game:t,league:n}=function(e,t){const n=e.match(/^(.*?)\s*\(([^)]+)\)\s*$/);return n?{game:n[1].trim(),league:n[2].trim()}:{game:e,league:t}}(e.label,e.short??lt(e.key,b));return(0,s.jsxs)(c.View,{style:[Vr.gridCard,v&&Vr.gridCardWide,{backgroundColor:te(x.backgroundAlt,.4),borderColor:te(x.border,.7)}],children:[(0,s.jsx)(c.View,{style:Vr.comingSoonLogo,children:r?r(e.key):(0,s.jsx)(Nr,{gameKey:e.key,short:e.short,size:W,footer:null,sportBaseKey:b,title:`${e.label} button`})}),(0,s.jsxs)(c.View,{style:Vr.gridText,children:[(0,s.jsx)(c.Text,{numberOfLines:1,style:[Vr.gridName,v&&Vr.gridNameWide,{color:x.textMuted,fontFamily:S}],children:n&&n!==t?`${t} · ${n}`:t}),(0,s.jsx)(c.Text,{numberOfLines:1,style:[Vr.gridMeta,Vr.gridMetaSpaced,{color:x.textMuted,fontFamily:C}],children:(o=e.seasonStart,o?`Starts ${o}`:"Coming soon")})]}),(0,s.jsxs)(c.View,{style:[Vr.soonPill,{backgroundColor:x.backgroundAlt}],children:[(0,s.jsx)(Ye,{size:12,color:x.textMuted}),(0,s.jsx)(c.Text,{style:[Vr.soonPillText,{color:x.textMuted,fontFamily:C}],children:"Soon"})]})]},e.key);var o})]})})]})}var Vr=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"100%",flexGrow:1,minWidth:0,flexDirection:"row",alignItems:"center",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:12,paddingVertical:12},gridCardWide:{flexBasis:"48%",gap:14,paddingHorizontal:16,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"flex-start",minWidth:0,flexShrink:1,flexGrow:1},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"center",gap:6,minWidth:0},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.1,flexShrink:1},gridMetaSpaced:{marginTop:4},liveDot:{width:6,height:6,borderRadius:3},gridChevron:{marginLeft:"auto"},comingSoonLogo:{opacity:.6},soonPill:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:4,borderRadius:999,paddingHorizontal:8,paddingVertical:4},soonPillText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function Ur({onBack:e,hideActions:t}={}){const{theme:n}=co(),o=se(n),r=n.colors,{width:i}=(0,c.useWindowDimensions)(),l=i>=640;return(0,s.jsxs)(c.View,{style:l&&Kr.headerWide,children:[(0,s.jsx)(c.Text,{style:[Kr.sectionTitle,l&&Kr.sectionTitleWide,{color:r.primary,fontFamily:o}],children:"Pick a category"}),(0,s.jsx)(or,{onBack:e,hideActions:t})]})}function Zr({onSelectCategory:e,onCancel:t,hideTitle:n,hideActions:o,renderCategoryIcon:r,getCategoryTagline:i}){const{theme:l,propositionsForCategoryPicker:d,loading:h,setSelectedCategory:u,setSelectedSport:f,clearSelectedGame:g,displayCategoryName:p}=co(),y=l.colors,m=D(l),b=ce(l),{width:w}=(0,c.useWindowDimensions)(),x=w>=640,k=w>=400,[S,C]=a.default.useState(null),[B,z]=a.default.useState(0),F=k?B>0?(B-(x?12:10))/2:"48%":"100%";bt(d);const v=wt(d);return h?(0,s.jsx)(c.View,{style:Kr.container,children:(0,s.jsx)(Bo,{colors:O(l),bodyFont:b,variant:"category",categoryCount:v.length>0?v.length:2})}):(0,s.jsxs)(c.View,{style:Kr.container,children:[!n&&(0,s.jsx)(c.View,{style:Kr.titleWrap,children:(0,s.jsx)(Ur,{onBack:t,hideActions:o})}),(0,s.jsx)(c.View,{style:Kr.content,children:(0,s.jsx)(c.View,{style:[Kr.grid,x&&Kr.gridWide],onLayout:e=>z(e.nativeEvent.layout.width),children:v.map(t=>{const n=i?.(t)??function(e){return it[e]??""}(t),o=S===t;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{u(t),f(null),g(),e?.(t)},onMouseEnter:()=>C(t),onMouseLeave:()=>C(e=>e===t?null:e),style:[Kr.card,x&&Kr.cardWide,{width:F,backgroundColor:m,borderColor:o?y.primary:y.border},o&&Kr.cardHovered],activeOpacity:.85,children:[(0,s.jsx)(Ue,{label:p(t),category:t,icon:r?.(t),theme:l}),n?(0,s.jsx)(c.Text,{style:[Kr.tagline,x&&Kr.taglineWide,{color:y.primary,fontFamily:b}],children:n}):null]},t)})})})]})}var Kr=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderRadius:16,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function qr(e){if(!e)return"Start time to be confirmed";const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"2-digit"}).format(t)}function Xr({name:e,renderTeamLogo:t,muted:n,headingFont:o,ink:r,wide:i}){if(!e)return(0,s.jsx)(c.Text,{style:[Jr.teamName,{color:n,fontFamily:o}],children:"TBC"});const l=t?.(e);return(0,s.jsxs)(c.View,{style:Jr.teamMark,children:[null!=l?(0,s.jsx)(c.View,{style:Jr.teamLogo,children:l}):null,(0,s.jsx)(c.Text,{style:[Jr.teamName,i&&Jr.teamNameWide,{color:r,fontFamily:o}],children:e})]})}function Qr({onSelectEvent:e}){const{theme:t,loading:n,sameGameMultiEvents:o,selectSameGameMultiEvent:r,renderTeamLogo:i,displaySportName:l}=co(),d=t.colors,h=ce(t),u=se(t),f=D(t),g=P(t),{width:p}=(0,c.useWindowDimensions)(),y=p>=640,[m,b]=a.default.useState(null),[w,x]=a.default.useState(null);return n?(0,s.jsx)(c.View,{style:Jr.container,children:(0,s.jsx)(Bo,{colors:O(t),bodyFont:h,variant:"event"})}):(0,s.jsxs)(c.View,{style:Jr.container,accessibilityLabel:"Available fixtures",children:[(0,s.jsx)(c.Text,{style:[Jr.intro,{color:d.textMuted,fontFamily:h}],children:"All picks in your multi must come from one game."}),0===o.length?(0,s.jsx)(c.View,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[Jr.emptyState,{borderColor:d.border,backgroundColor:f}],children:(0,s.jsx)(c.Text,{style:[Jr.emptyText,{color:d.textMuted,fontFamily:h}],children:"No fixtures with available propositions."})}):(0,s.jsx)(c.View,{style:[Jr.list,y&&Jr.listWide],children:o.map(t=>{const n=m===t.id,o=w===t.id;return(0,s.jsxs)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:`Select ${Qt(t)}`,onPress:()=>{r(t.id),e?.(t.id)},activeOpacity:.85,onMouseEnter:()=>b(t.id),onMouseLeave:()=>b(e=>e===t.id?null:e),onFocus:()=>x(t.id),onBlur:()=>x(e=>e===t.id?null:e),style:[Jr.card,y&&Jr.cardWide,{borderColor:n||o?d.primary:d.border,backgroundColor:f},n&&Jr.cardHovered],children:[(0,s.jsxs)(c.View,{style:Jr.cardMain,children:[(0,s.jsxs)(c.View,{style:[Jr.matchup,y&&Jr.matchupWide,{backgroundColor:g}],children:[(0,s.jsx)(Xr,{name:t.homeTeam,renderTeamLogo:i,muted:d.textMuted,headingFont:u,ink:d.text,wide:y}),(0,s.jsx)(c.Text,{style:[Jr.vs,{color:d.textMuted,fontFamily:u}],children:"vs"}),(0,s.jsx)(Xr,{name:t.awayTeam,renderTeamLogo:i,muted:d.textMuted,headingFont:u,ink:d.text,wide:y})]}),(0,s.jsxs)(c.Text,{style:[Jr.meta,y&&Jr.metaWide,{color:d.textMuted,fontFamily:h}],children:[qr(t.commenceTime)," · ",t.propositionCount," proposition",1===t.propositionCount?"":"s",t.league||t.sport?` · ${t.league?.toUpperCase()??l(t.sport)}`:""]})]}),(0,s.jsx)(c.View,{style:{flexShrink:0,transform:[{translateX:n?2:0}]},children:(0,s.jsx)(Ge,{size:22,color:d.textMuted})})]},t.id)})})]})}var Jr=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},intro:{fontSize:14,lineHeight:22.75,marginBottom:16},emptyState:{borderWidth:1,borderRadius:16,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:12,paddingHorizontal:12,paddingVertical:10},matchupWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6},teamMark:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,maxWidth:"100%"},teamLogo:{flexShrink:0},teamName:{fontSize:14,fontWeight:"600",flexShrink:1},teamNameWide:{fontSize:16},vs:{fontSize:12,fontWeight:"400"},meta:{marginTop:8,fontSize:11,fontWeight:"500"},metaWide:{fontSize:12}});function $r({counts:e,onPick:t,onDoubleAction:n,colors:o,align:r="right",direction:i="down",menuShadow:l="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}){const[d,u]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[p,y]=(0,a.useState)(null),m=(0,a.useRef)(0),b=(0,a.useRef)(null),w=(0,a.useRef)(null),[x,k]=(0,a.useState)(null),[S,C]=(0,a.useState)(null),B="web"===c.Platform.OS,z=36+36*e.length+12,F="up"===i||f?"up":"down";(0,a.useLayoutEffect)(()=>{if(!d||!B)return;const e=b.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0;k({top:t.top+o,bottom:t.bottom+o,left:t.left+n,right:t.right+n,width:t.width});const r=window.innerHeight-t.bottom,i=t.top;g(r<z&&i>r)},[d,B,z]),(0,a.useEffect)(()=>{if(!d)return y(null),void(B||g(!1));if(B){const e=e=>{const t=b.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||w.current&&w.current.contains(n)||u(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}const e=b.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);g(r<z&&t>r),C({x:e,y:t,width:n,height:o})})},[d,B,z]);const v=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:"How many picks?"})}),e.map(e=>(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{t(e),u(!1)},accessibilityRole:"menuitem",onMouseEnter:()=>y(e),onMouseLeave:()=>y(t=>t===e?null:t),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border,backgroundColor:p===e?o.backgroundAlt:"transparent"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),(0,s.jsx)(c.View,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:4},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e))]});return(0,s.jsxs)(c.View,{ref:b,style:{position:"relative",flexShrink:0},children:[(0,s.jsx)(so,{onPress:()=>{if(!n)return void u(e=>!e);const e=Date.now();if(e-m.current<280)return m.current=0,u(!1),void n();m.current=e,setTimeout(()=>{m.current&&Date.now()-m.current>=270&&(m.current=0,u(e=>!e))},290)}}),d&&B&&x&&"undefined"!=typeof document&&(0,h.createPortal)((0,s.jsx)("div",{ref:w,role:"menu",style:{position:"absolute",top:"up"===F?void 0:x.bottom+6,..."up"===F?{top:x.top-6,transform:"translateY(-100%)"}:null,left:"left"===r?x.left:void 0,..."right"===r?{left:x.right,transform:"up"===F?"translate(-100%, -100%)":"translateX(-100%)"}:null,zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:160,boxShadow:l,overflow:"hidden"},children:v}),document.body),(0,s.jsx)(Xt,{visible:d&&!B,anchor:S,onClose:()=>u(!1),flipUp:"up"===F,align:r,children:(0,s.jsx)(c.View,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:v})})]})}function _r({onBack:e,onNext:t,hideActions:n}={}){const{theme:o,headingFont:r,bodyFont:i,selectedGame:l,propositions:a,selections:d,toggleSelection:h,selectedPropositionCount:u,disableQuickPick:f,answeredCount:g,goToConfirmation:p,selectedEventId:y,sameGameMultiEvents:m,selectSameGameMultiEvent:b,selectedRule:w,howToPlayMarkdown:x,maxPayouts:k}=co(),S=o.colors,C=Be(l),B=En(l??{},l?k?.[l.id]:void 0),{width:z}=(0,c.useWindowDimensions)(),v=z>=640,W=$t(l)&&!y,T=m.find(e=>e.id===y),A=l?St(l,u,w):{min:0,max:0},L=A.min,R=$t(l)&&y?Math.min(A.max,a.length):A.max,M=L>0&&L===R,D=!(l?.allowed_propositions&&l.allowed_propositions.length>0)&&L>0&&R>L,P=M?R:R||a.length,H=e=>{const t=Math.max(0,Math.min(e??P,a.length));for(const i of Object.keys(d)){const e=Number(i);h(e,d[e])}const n=[...a].sort(()=>Math.random()-.5).slice(0,t),o=[],r=[];for(const i of n)Math.random()<.5?o.push(i):r.push(i);for(const i of o)h(i.id,"yes");for(const i of r)h(i.id,"no")},O=!f&&a.length>0,I=D?Array.from({length:R-L+1},(e,t)=>L+t).filter(e=>e<=a.length):[],E=g>0?g:L||P;return(0,s.jsxs)(c.View,{style:[oi.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:[oi.title,{fontSize:v?24:20,color:F(o),fontFamily:r}],children:W?"Choose a Game":"Select Propositions"}),l&&(0,s.jsx)(or,{onBack:y?()=>b(null):e,hideActions:n,label:T?Qt(T):l.game_name,children:C||x?.trim()?(0,s.jsx)(Ee,{variant:"icon",content:x,panel:C,theme:o,title:`${l.game_name} — How to Play`,extra:(0,s.jsx)(jn,{tiers:B.hasGenericDividends?B.tiers:[],modes:B.modes,pydDividends:B.pydDividends,minBet:B.minBet,maxBet:B.maxBet,colors:S,bodyFont:i,headingFont:r}),colors:{text:S.text,textMuted:S.textMuted,border:S.border,background:S.background,backgroundAlt:S.backgroundAlt,primary:S.primary,primaryText:S.primaryText},bodyFont:i,headingFont:r}):null})]}),O&&(I.length>1?(0,s.jsx)($r,{counts:I,onPick:e=>{H(e),p(),t?.()},onDoubleAction:()=>{H(E),p(),t?.()},colors:S,menuShadow:ae(o)}):(0,s.jsx)(c.View,{style:{flexShrink:0},children:(0,s.jsx)(so,{onPress:()=>{H(),p(),t?.()}})}))]})}function ei({onNext:e,onBack:t,hideButtons:n=!1}){const{theme:o,selectionValid:r,answeredCount:i,selectedGame:l,selectedPropositionCount:a,selectedEventId:d,propositions:h,goToConfirmation:u,selectedRule:f}=co(),g=o.colors,p=D(o),y=g.textAlt??g.textMuted,{width:m}=(0,c.useWindowDimensions)(),b=m>=640,w="dark"===o.colorScheme,x=l?St(l,a,f):{min:0,max:0},k=x.min,S=$t(l)&&d?Math.min(x.max,h.length):x.max,C=!!(l?.allowed_propositions&&l.allowed_propositions.length>0),B=!C&&k>0&&S>k&&i>=k&&i<S,z=S-i,F=!C&&k>0&&S>k,v=l?F?k:S||k||l.num_propositions||0:0,W=F?S:v,T=W>0?Math.min(i/W,1):0,A=F&&S>0?k/S*100:0,L=Math.max(0,k-i),R=r&&!!e,M=0===i?"Let's get started":F&&L>0?1===L?"1 to go — almost there":`${L} to go`:B?`${z} more pick${1!==z?"s":""} available`:T>=1?"✓ All selections made":T>=.75?"Almost there!":T>=.5?"Over halfway!":T>=.25?"Getting close":"Nice start",P=F?i>=k?`${i} of maximum ${S}`:`${i} of minimum ${k}`:`${i} / ${v||h.length} picks`;return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.View,{style:{borderWidth:1,borderColor:i>0?g.primary:g.border,borderRadius:12,overflow:"hidden",marginBottom:16,backgroundColor:p,shadowColor:"#000",shadowOpacity:w?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},children:(0,s.jsxs)(c.View,{style:{width:"100%",padding:b?20:16,backgroundColor:i>0?`${g.primary}10`:"transparent"},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,gap:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:i>0?g.primary:y,flexShrink:0},children:P}),R?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{u(),e?.()},style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:g.buttonPrimary},children:(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:g.buttonPrimaryText},children:["Continue with ",i]})}):(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:T>=1?g.success:g.primary,textAlign:"right",flexShrink:1},children:M})]}),(0,s.jsxs)(c.View,{style:{position:"relative",width:"100%",height:8,borderRadius:999,backgroundColor:g.background,overflow:"hidden"},children:[(0,s.jsx)(c.View,{style:{height:"100%",borderRadius:999,width:`${Math.min(100*T,100)}%`,backgroundColor:r?g.success:g.primary}}),F&&(0,s.jsx)(c.View,{style:{position:"absolute",top:-1,bottom:-1,left:`${A}%`,width:2,marginLeft:-1,borderRadius:1,backgroundColor:p,borderWidth:1,borderColor:`${g.textMuted}55`}})]}),F&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:6},children:[(0,s.jsx)(c.Text,{style:{fontSize:11,color:i>=k?g.success:g.textMuted},children:i>=k?`✓ Minimum ${k} reached`:`Minimum ${k}`}),(0,s.jsx)(c.Text,{style:{fontSize:11,color:g.textMuted},children:`Max ${S}`})]})]})})})}function ti({view:e,onChange:t}){const{theme:n}=co(),o=n.colors,r=(n,r)=>{const i=e===n;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>t(n),accessibilityRole:"button",accessibilityState:{selected:i},style:[ni.option,{backgroundColor:i?o.primary:"transparent"}],children:(0,s.jsx)(c.Text,{style:[ni.optionText,{color:i?o.primaryText:o.textMuted}],children:r})},n)};return(0,s.jsxs)(c.View,{style:[ni.track,{backgroundColor:o.backgroundAlt,borderColor:o.border}],children:[r("list","List"),r("swipe","Swipe")]})}var ni=c.StyleSheet.create({track:{flexDirection:"row",alignItems:"center",gap:4,borderRadius:8,borderWidth:1,padding:2,flexShrink:0},option:{borderRadius:6,paddingHorizontal:10,paddingVertical:4},optionText:{fontSize:12,fontWeight:"600"}}),oi=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function ri({tiers:e,selectedCount:t,onSelect:n,colors:o,bodyFont:r,extraBetAmount:i,buttonLabel:l,columnLabel:d="Legs",buildYourOwn:h,quickPickOnly:u,onQuickPick:f,collapsible:g,expanded:p,onExpandedChange:y,summaryTiers:m}){const[b,w]=(0,a.useState)(!1),x=p??b,k=null!=i&&20!==i,S=k?`$${Math.round(i)} returns`:"$20 returns",C=e.some(e=>e.payout20>0),B=!!g&&!x,z=C&&!B,F=(m??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),v=k&&F>0?F*(i/20):F,W=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,T=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[(0,s.jsx)(c.View,{style:{paddingVertical:6,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[ii.labelText,{color:o.textMuted,fontFamily:r}],children:u?"Quick Pick":d})}),z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingVertical:4,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[ii.labelText,{color:o.textMuted,fontFamily:r}],children:"Dividend"})}),(0,s.jsx)(c.View,{style:{paddingVertical:4,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[ii.labelText,{color:o.textMuted,fontFamily:r}],children:S})})]})]}),u?(0,s.jsxs)(c.View,{style:{gap:8,alignSelf:"flex-start",width:W},children:[(0,s.jsx)($r,{counts:(m??e).map(e=>e.count),onPick:e=>f?f(e):n(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),C&&!B&&(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=k&&t>0?t*(i/20):null;return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[ii.tableCellText,{color:o.success}],children:[e,"/",e]})}),(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[ii.tableCellText,{color:o.primary}],children:t>0?ht(n??t):"—"})})]},String(e))})})]}):h?(0,s.jsxs)(c.View,{style:{gap:8,alignSelf:"flex-start",width:W},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e[0]?.count??0),style:[ii.optionButton,{paddingHorizontal:0,alignSelf:"stretch",alignItems:"center",borderColor:o.buttonPrimary??o.primary,backgroundColor:o.buttonPrimary??o.primary}],children:(0,s.jsx)(c.Text,{style:[ii.optionButtonText,{color:o.buttonPrimaryText??"#ffffff",fontFamily:r}],children:"Make Your Selections"})}),C&&!B&&(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=t>0?ht(k?t*(i/20):t):"—";return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[ii.tableCellText,{color:o.success}],children:[e,"/",e]})}),(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[ii.tableCellText,{color:o.primary}],children:n})})]},String(e))})})]}):e.map(({count:e,payout20:a})=>{const d=t===e,h=k&&a>0?a*(i/20):null;return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e),accessibilityState:{selected:d},style:[ii.optionButton,{alignSelf:"stretch",alignItems:"center",borderColor:d?o.buttonPrimary??o.primary:o.border??o.primary,backgroundColor:d?o.buttonPrimary??o.primary:o.buttonSecondary??o.background}],children:(0,s.jsx)(c.Text,{style:[ii.optionButtonText,{color:d?o.buttonPrimaryText??"#ffffff":o.buttonSecondaryText??o.text,fontFamily:r}],numberOfLines:1,children:l?l(e):`Multi ${e}`})}),!B&&a>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[ii.tableCellText,{color:o.success}],children:[e,"/",e]})}),k?null!=h&&(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[ii.tableCellText,{color:o.primary}],children:ht(h)})}):(0,s.jsx)(c.View,{style:[ii.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[ii.tableCellText,{color:o.primary}],children:ht(a)})})]})]},String(e))})]});return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignSelf:"stretch"},children:[u?(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:T}):(0,s.jsx)(c.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:T}),g&&(C?(0,s.jsxs)(c.View,{style:{alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:o.text,fontFamily:r},children:["Win up to ",(0,s.jsx)(c.Text,{style:{color:o.heading??o.text??o.primary},children:ht(v)}),(0,s.jsx)(c.Text,{style:{color:o.textMuted},children:` for $${k?Math.round(i):20}`})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{return e=!x,void 0===p&&w(e),void y?.(e);var e},accessibilityRole:"button",accessibilityState:{expanded:x},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:x?o.buttonSecondary:o.background??"#ffffff",borderWidth:1,borderColor:x?o.primary??o.border:o.border},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:12,fontWeight:"600",fontFamily:r},children:x?"Hide dividends":"Show dividends"})})]}):(0,s.jsx)(c.View,{style:{alignSelf:"flex-start",paddingVertical:2,opacity:0},pointerEvents:"none",children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",fontFamily:r},children:"Show dividends"})}))]})}var ii=c.StyleSheet.create({labelText:{fontSize:12,fontWeight:"400"},optionButton:{borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},optionButtonText:{fontSize:14,fontWeight:"600"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function li(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function ai({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,selectedGame:r,selectedEventId:i,propositions:l,selections:a,toggleSelection:d,upgradePropositionCount:h,selectedPropositionCount:u,disableQuickPick:f,answeredCount:g,selectedRule:p}=co(),y=n.colors,{width:m}=(0,c.useWindowDimensions)(),b=m>=640,w=r?St(r,u,p):{min:0,max:0},x=w.min,k=$t(r)&&i?Math.min(w.max,l.length):w.max,S=x>0&&x===k,C=!(r?.allowed_propositions&&r.allowed_propositions.length>0)&&x>0&&k>x,B=S?k:k||l.length,z=e=>{const t=Math.max(0,Math.min(e??B,l.length));for(const r of Object.keys(a)){const e=Number(r);d(e,a[e])}const{yesPicks:n,noPicks:o}=Gt(l,t);for(const r of n)d(r.id,"yes");for(const r of o)d(r.id,"no");h(t)},v=!f&&l.length>0,W=C?Array.from({length:k-x+1},(e,t)=>x+t):[],T=g>0?g:x||B;return(0,s.jsxs)(c.View,{style:[ci.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:[ci.title,{fontSize:b?24:20,color:F(n),fontFamily:o}],children:"Place Your Wager"}),r&&(0,s.jsx)(or,{onBack:e,hideActions:t,label:r.game_name})]}),v&&(W.length>1?(0,s.jsx)($r,{counts:W,onPick:e=>z(e),onDoubleAction:()=>z(T),colors:y,menuShadow:ae(n)}):(0,s.jsx)(c.View,{style:{flexShrink:0},children:(0,s.jsx)(so,{onPress:()=>z()})}))]})}var ci=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16},footerRight:{flexDirection:"row",alignItems:"center",gap:12},errorText:{fontSize:12},payoutInfo:{alignItems:"flex-end"},payoutLabel:{fontSize:10,textTransform:"uppercase",letterSpacing:.25},payoutAmount:{fontSize:14,fontWeight:"700"}}),si=c.Platform.select({ios:"Menlo",default:"monospace"});function di({theme:e,value:t}){return(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===t?T(e):A(e)},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===t?"Yes":"No"})})}function hi({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:r,placedEntry:i}=co(),l=n.colors,{width:a}=(0,c.useWindowDimensions)(),h=a>=640;return(0,s.jsxs)(c.View,{style:ui.titleRow,children:[(0,s.jsxs)(c.View,{style:ui.titleText,children:[(0,s.jsx)(c.Text,{style:[ui.title,h&&ui.titleWide,{color:F(n),fontFamily:o}],children:"Entry Placed!"}),(0,s.jsx)(or,{onBack:e,hideActions:t,children:(0,s.jsx)(c.Text,{style:[ui.message,{color:l.textMuted,fontFamily:r}],children:i?(0,s.jsxs)(s.Fragment,{children:["Entry"," ",(0,s.jsxs)(c.Text,{style:{color:l.primary,fontWeight:"600",fontFamily:si},children:["#",i.id]})," ","successfully submitted"]}):"Your entry has been successfully submitted"})})]}),(0,s.jsx)(c.View,{style:[ui.checkCircle,h&&ui.checkCircleWide,{backgroundColor:`${l.success}20`}],children:(0,s.jsx)(d.default,{width:h?28:24,height:h?28:24,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M5 13l4 4L19 7",stroke:l.success,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var ui=c.StyleSheet.create({container:{flex:1},content:{flex:1},titleRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},titleText:{flex:1,minWidth:0},checkCircle:{width:48,height:48,borderRadius:999,alignItems:"center",justifyContent:"center",flexShrink:0},checkCircleWide:{width:56,height:56},title:{fontSize:20,fontWeight:"700",lineHeight:28},titleWide:{fontSize:24,lineHeight:32},message:{fontSize:14},summaryCard:{width:"100%",borderRadius:12,padding:16,borderWidth:1},summaryCardWide:{padding:20},summaryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:12,gap:12},summaryHeading:{fontSize:14,fontWeight:"600"},summaryHeadingWide:{fontSize:16},statsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12},statCell:{flexBasis:"45%",flexGrow:1},statCellWide:{flexBasis:"30%"},statLabel:{fontSize:10,fontWeight:"600",letterSpacing:.25,textTransform:"uppercase"},statValue:{fontSize:14,fontWeight:"600",marginTop:2},pickList:{gap:6},pickRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8,borderRadius:4},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16}});function fi({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o}=co(),{width:r}=(0,c.useWindowDimensions)(),i=r>=640;return(0,s.jsxs)(c.View,{style:gi.header,children:[(0,s.jsx)(c.Text,{style:[gi.title,{fontSize:i?24:20,color:F(n),fontFamily:o}],children:"Your Entries"}),(0,s.jsx)(or,{onBack:e,hideActions:t})]})}var gi=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function pi(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function yi({ink:e,ball:t,size:n,balls:o=1}){return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"2 12 76 62",fill:"none",children:[(0,s.jsx)(d.Line,{x1:"9",y1:"18",x2:"71",y2:"18",stroke:e,strokeWidth:2.5,strokeLinecap:"round"}),(0,s.jsx)(d.Path,{d:"M12 18L13 25.67 M17.6 18L19 25.67 M17.6 18L13 25.67 M23.2 18L25 25.67 M23.2 18L19 25.67 M28.8 18L31 25.67 M28.8 18L25 25.67 M34.4 18L37 25.67 M34.4 18L31 25.67 M40 18L43 25.67 M40 18L37 25.67 M45.6 18L49 25.67 M45.6 18L43 25.67 M51.2 18L55 25.67 M51.2 18L49 25.67 M56.8 18L61 25.67 M56.8 18L55 25.67 M62.4 18L67 25.67 M62.4 18L61 25.67 M68 18L67 25.67 M13 25.67L15.5 33.33 M19 25.67L21.62 33.33 M19 25.67L15.5 33.33 M25 25.67L27.75 33.33 M25 25.67L21.62 33.33 M31 25.67L33.88 33.33 M31 25.67L27.75 33.33 M37 25.67L40 33.33 M37 25.67L33.88 33.33 M43 25.67L46.12 33.33 M43 25.67L40 33.33 M49 25.67L52.25 33.33 M49 25.67L46.12 33.33 M55 25.67L58.38 33.33 M55 25.67L52.25 33.33 M61 25.67L64.5 33.33 M61 25.67L58.38 33.33 M67 25.67L64.5 33.33 M15.5 33.33L19 41 M21.62 33.33L25 41 M21.62 33.33L19 41 M27.75 33.33L31 41 M27.75 33.33L25 41 M33.88 33.33L37 41 M33.88 33.33L31 41 M40 33.33L43 41 M40 33.33L37 41 M46.12 33.33L49 41 M46.12 33.33L43 41 M52.25 33.33L55 41 M52.25 33.33L49 41 M58.38 33.33L61 41 M58.38 33.33L55 41 M64.5 33.33L61 41 M19 41L23 48.67 M25 41L28.67 48.67 M25 41L23 48.67 M31 41L34.33 48.67 M31 41L28.67 48.67 M37 41L40 48.67 M37 41L34.33 48.67 M43 41L45.67 48.67 M43 41L40 48.67 M49 41L51.33 48.67 M49 41L45.67 48.67 M55 41L57 48.67 M55 41L51.33 48.67 M61 41L57 48.67 M23 48.67L25 56.33 M28.67 48.67L31 56.33 M28.67 48.67L25 56.33 M34.33 48.67L37 56.33 M34.33 48.67L31 56.33 M40 48.67L43 56.33 M40 48.67L37 56.33 M45.67 48.67L49 56.33 M45.67 48.67L43 56.33 M51.33 48.67L55 56.33 M51.33 48.67L49 56.33 M57 48.67L55 56.33 M25 56.33L22 64 M31 56.33L31 60.1 M31 56.33L22 64 M37 56.33L40 59.5 M37 56.33L31 60.1 M43 56.33L49 60.1 M43 56.33L40 59.5 M49 56.33L58 64 M49 56.33L49 60.1 M55 56.33L58 64",fill:"none",stroke:e,strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",opacity:.9}),(0,s.jsx)(d.Path,{d:"M12 18 C12.17 19.28 12.42 23.12 13 25.67 C13.58 28.23 14.5 30.77 15.5 33.33 C16.5 35.88 17.75 38.44 19 41 C20.25 43.56 22 46.12 23 48.67 C24 51.23 25.17 53.77 25 56.33 C24.83 58.88 22.5 62.72 22 64 M68 18 C67.83 19.28 67.58 23.12 67 25.67 C66.42 28.23 65.5 30.77 64.5 33.33 C63.5 35.88 62.25 38.44 61 41 C59.75 43.56 58 46.12 57 48.67 C56 51.23 54.83 53.77 55 56.33 C55.17 58.88 57.5 62.72 58 64",fill:"none",stroke:e,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Ellipse,{cx:"40",cy:"64",rx:"18",ry:"4.5",fill:"none",stroke:e,strokeWidth:2.2}),(o>=2?[{cx:33,cy:52,r:6.6},{cx:48,cy:49,r:6.6}]:[{cx:40,cy:50,r:8}]).map((e,n)=>(0,s.jsx)(d.Circle,{cx:e.cx,cy:e.cy,r:e.r,fill:t},n))]})}function mi({ink:e,ball:t,size:n}){return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"34",stroke:e,strokeWidth:3,opacity:.9}),(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"23",stroke:e,strokeWidth:3,opacity:.65}),(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"8",fill:t}),(0,s.jsx)(d.Line,{x1:"80",y1:"20",x2:"55",y2:"45",stroke:e,strokeWidth:4,strokeLinecap:"round"}),(0,s.jsx)(d.Path,{d:"M50 50 l8 -3 -3 8 z",fill:e})]})}function bi({ink:e,ball:t,size:n}){const o=[{x:16,h:22},{x:40,h:40},{x:64,h:60}];return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[(0,s.jsx)(d.Line,{x1:"10",y1:"84",x2:"90",y2:"84",stroke:e,strokeWidth:2,opacity:.5}),o.map((n,r)=>(0,s.jsx)(d.Rect,{x:n.x,y:84-n.h,width:16,height:n.h,rx:3.5,fill:r===o.length-1?t:e,opacity:r===o.length-1?1:.5+.22*r},n.x)),(0,s.jsx)(d.Path,{d:"M14 60 L38 48 L62 30 L86 14",stroke:e,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,s.jsx)(d.Path,{d:"M86 14 l-9 1 M86 14 l1 9",stroke:e,strokeWidth:3,strokeLinecap:"round"})]})}function wi({kind:e,balls:t,...n}){return"safety_net"===e?(0,s.jsx)(yi,{...n,balls:t}):"pick"===e?(0,s.jsx)(bi,{...n}):(0,s.jsx)(mi,{...n})}function xi({kind:e,size:t=56,balls:n}){const{theme:o}=co(),r=o.colors,i=o.brand?.chip??r.primary,l=o.brand?.icon??r.primaryText,a=L(o);return(0,s.jsx)(c.View,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:i,borderWidth:1,borderColor:pi(l,.16),alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(wi,{kind:e,ink:l,ball:a,balls:n,size:Math.round(.68*t)})})}function ki({option:e,renderDividends:t}){const{theme:n}=co(),o=n.colors,r=se(n),i=o.primary,l=L(n),a=e.dividends??[];return t?(0,s.jsx)(s.Fragment,{children:t(e)}):(0,s.jsxs)(c.View,{style:Fi.dividends,children:[(0,s.jsxs)(c.View,{style:Fi.dividendRow,children:[(0,s.jsx)(c.Text,{style:[Fi.dividendsCaption,{color:o.textMuted}],children:"IF YOU LAND"}),(0,s.jsxs)(c.Text,{style:[Fi.dividendsCaption,{color:o.textMuted}],children:["$",20," RETURNS"]})]}),a.map((t,n)=>{const a=e.tierLegs?.[n];return(0,s.jsxs)(c.View,{style:Fi.dividendTierRow,children:[(0,s.jsxs)(c.View,{style:Fi.dividendLabelCol,children:[(0,s.jsx)(c.Text,{style:[Fi.dividendLabel,{color:o.text}],children:t.label}),null!=a&&a>0&&(0,s.jsxs)(c.View,{style:Fi.tierLegs,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[Array.from({length:a}).map((e,t)=>(0,s.jsx)(c.View,{style:[Fi.tierLegDot,{backgroundColor:i}]},t)),0===t.misses&&(0,s.jsx)(c.View,{style:[Fi.tierLegBall,{backgroundColor:l}]})]})]}),(0,s.jsx)(c.Text,{style:[Fi.dividendMult,{color:i,fontFamily:r}],children:ht(t.payout20)})]},t.misses)})]})}function Si({option:e,renderDividends:t}){const{theme:n}=co(),o=n.colors,r=e.dividends??[],i=r.reduce((e,t)=>t.payout20>e?t.payout20:e,0),[l,d]=(0,a.useState)(!1),u=(0,a.useRef)(null),f=(0,a.useRef)(null),[g,p]=(0,a.useState)(null),[y,m]=(0,a.useState)(!1),[b,w]=(0,a.useState)(null),x="web"===c.Platform.OS,k=40+36*Math.max(r.length,1)+12,S=(0,a.useCallback)(()=>{const e=u.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,o=t.top,r=n<k&&o>n;p({left:t.left,top:r?t.top-6:t.bottom+6,flipUp:r})},[k]);(0,a.useLayoutEffect)(()=>{if(!l||!x)return void p(null);S();const e=()=>d(!1),t=()=>S();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[l,x,S]),(0,a.useEffect)(()=>{if(!l)return;if(x){const e=e=>{const t=u.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||f.current&&f.current.contains(n)||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=u.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);m(r<k&&t>r),w({x:e,y:t,width:n,height:o})})},[l,x,k]);const C=t?(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:8},children:t(e)}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:(0,s.jsxs)(c.Text,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:["Dividends for $",20]})}),r.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:o.border,gap:12},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:o.text,fontSize:13,flex:1},children:e.label}),(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:e.payout20>0?o.heading??o.text:o.textMuted,fontSize:13,textAlign:"right"},children:e.payout20>0?ht(e.payout20):"—"})]},e.misses))]});return(0,s.jsxs)(c.View,{style:{alignSelf:"center",maxWidth:"100%",width:"100%",alignItems:"center"},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[i>0?(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:o.text},children:["Win up to ",(0,s.jsx)(c.Text,{style:{color:o.heading??o.text},children:ht(i)}),(0,s.jsxs)(c.Text,{style:{color:o.textMuted},children:[" for $",20]})]}):null,(0,s.jsxs)(c.View,{ref:u,collapsable:!1,style:{position:"relative",alignSelf:"flex-start"},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>d(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:l},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:l?o.buttonSecondary:o.background,borderWidth:1,borderColor:l?o.primary??o.border:o.border},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:12,fontWeight:"600"},children:l?"Hide dividends":"Show dividends"})}),(0,s.jsx)(Xt,{visible:l&&!x,anchor:b,onClose:()=>d(!1),flipUp:y,align:"left",children:(0,s.jsx)(c.View,{style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:220,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:C})})]})]}),l&&x&&g&&"undefined"!=typeof document?(0,h.createPortal)((0,s.jsx)("div",{ref:f,style:{position:"fixed",left:g.left,top:g.top,transform:g.flipUp?"translateY(-100%)":void 0,zIndex:9999,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:220,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:C}),document.body):null]})}function Ci({kind:e,option:t,onSelect:n,renderDividends:o}){const{theme:r}=co(),i=r.colors,l=se(r),h=F(r),u=i.primary,f=i.selectionCard??i.backgroundAlt,{width:g}=(0,c.useWindowDimensions)(),p=g>=640,y="safety_net"===e?Math.max(1,(t.detail?.length??2)-1):void 0,m=!!o||(t.dividends?.length??0)>0,b=m&&!!t.dividendsInline,[w,x]=(0,a.useState)(!1);return(0,s.jsxs)(c.View,{onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),style:[Fi.card,p&&Fi.cardWide,{backgroundColor:f,borderColor:w?u:i.border,shadowColor:w?u:"#000",shadowOpacity:w?.28:.08,shadowRadius:w?14:8,shadowOffset:{width:0,height:w?12:8},elevation:w?4:1,transform:[{translateY:w?-2:0}]}],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:n,activeOpacity:.85,accessibilityRole:"button",style:Fi.cardMain,children:[(0,s.jsx)(xi,{kind:e,balls:y,size:60}),(0,s.jsxs)(c.View,{style:Fi.cardText,children:[(0,s.jsx)(c.Text,{style:[Fi.cardTitle,{color:h,fontFamily:l}],children:t.label}),t.stat?(0,s.jsx)(c.View,{style:[Fi.statChip,{backgroundColor:pi(u,.12)}],children:(0,s.jsx)(c.Text,{style:[Fi.statChipText,{color:u}],children:t.stat.toUpperCase()})}):null,(0,s.jsx)(c.View,{style:Fi.detailBlock,children:t.detail?.map(e=>(0,s.jsx)(c.Text,{style:[Fi.detailLine,{color:i.textMuted}],children:e},e))})]}),(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:w?2:0}]},children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),m?(0,s.jsx)(c.View,{style:[Fi.dividendsWrap,{borderTopColor:pi(h,.08)}],children:b?(0,s.jsx)(ki,{option:t,renderDividends:o}):(0,s.jsx)(Si,{option:t,renderDividends:o})}):null]})}function Bi({kind:e,highlights:t,onSelect:n,accessibilityLabel:o}){const{theme:r}=co(),i=r.colors,l=F(r),h=L(r),u=i.primary,f=i.selectionCard??i.backgroundAlt,{width:g}=(0,c.useWindowDimensions)(),p=g>=640,[y,m]=(0,a.useState)(!1);return(0,s.jsx)(c.View,{onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),style:[Fi.card,p&&Fi.cardWide,{backgroundColor:f,borderColor:y?u:i.border,shadowColor:y?u:"#000",shadowOpacity:y?.28:.08,shadowRadius:y?14:8,shadowOffset:{width:0,height:y?12:8},elevation:y?4:1,transform:[{translateY:y?-2:0}]}],children:(0,s.jsxs)(c.TouchableOpacity,{onPress:n,activeOpacity:.85,accessibilityRole:"button",accessibilityLabel:o,style:Fi.cardMain,children:[(0,s.jsx)(xi,{kind:e,size:60}),(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,gap:8},children:t.map(e=>(0,s.jsxs)(c.View,{style:Fi.bulletRow,children:[(0,s.jsx)(c.View,{style:[Fi.dot,{backgroundColor:h}]}),(0,s.jsx)(c.Text,{style:[Fi.bulletText,{color:l}],children:e})]},e))}),(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:y?2:0}]},children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})})}function zi({onContinue:e,onBack:t,hideTitle:n,config:o,renderDividends:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,setExpectedCorrect:u,handlePropositionCountChange:f,bodyFont:g,screenSize:p}=co(),y=l.colors,m=se(l),b="mobile"===p,{width:w}=(0,c.useWindowDimensions)(),x=w>=640,k=(0,a.useMemo)(()=>o??An(d,h),[o,d,h]),S=k?.options??[],C=t=>{null!=t?.expectedCorrect&&u(t.expectedCorrect),null!=t?.propositionCount&&f(t.propositionCount),e?.()};if(!d||!k)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:y.textMuted,fontFamily:g},children:"No rule setup required."})});const B=k.kind,z=k.headline??k.heroTitle,F=k.continueLabel??"Continue";return(0,s.jsxs)(c.View,{style:[Fi.container,{backgroundColor:y.background}],children:[t?(0,s.jsx)(c.View,{style:Fi.backRow,children:(0,s.jsx)(nr,{onBack:t,label:i})}):null,(0,s.jsxs)(Le,{style:Fi.inner,children:[n?null:(0,s.jsx)(c.Text,{accessibilityRole:"header",style:[Fi.sectionTitle,Fi.sectionTitleInBody,{color:y.primary,fontFamily:m,textAlign:"center"}],children:k.title}),(0,s.jsxs)(c.View,{style:Fi.headerBlock,children:[(0,s.jsx)(Ko,{iconUrl:pe(d),gameName:d.game_name,height:b?24:32,chipColor:y.primary,textColor:y.text,iconColor:y.primaryText,accentColor:l.brand?.accent,compact:b}),k.subtitle?(0,s.jsx)(c.Text,{style:[Fi.pickSubtitle,{color:y.textMuted}],children:k.subtitle}):null,z||k.heroTagline?(0,s.jsx)(c.Text,{style:[Fi.tagline,{color:y.textMuted}],children:k.heroTagline??z}):null]}),S.length>0?(0,s.jsx)(c.View,{style:[Fi.cardList,x&&S.length>1&&Fi.cardGrid],children:S.map(e=>(0,s.jsx)(c.View,{style:x&&S.length>1?Fi.cardCell:void 0,children:(0,s.jsx)(Ci,{kind:B,option:e,onSelect:()=>C(e),renderDividends:r})},e.id))}):k.highlights&&k.highlights.length>0?(0,s.jsx)(Bi,{kind:B,highlights:k.highlights,onSelect:()=>C(),accessibilityLabel:F}):null]})]})}var Fi=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16,marginBottom:4},inner:{flex:1,paddingHorizontal:16,maxWidth:768,width:"100%",alignSelf:"center"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:12},headerBlock:{alignItems:"center",marginBottom:24},pickSubtitle:{fontSize:13,marginTop:8},tagline:{fontSize:14,lineHeight:20,textAlign:"center",maxWidth:384,marginTop:12},cardList:{gap:12},cardGrid:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"},card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardText:{flex:1,minWidth:0,gap:5},cardTitle:{fontSize:19,fontWeight:"800",letterSpacing:-.3},statChip:{alignSelf:"flex-start",borderRadius:999,paddingHorizontal:8,paddingVertical:3},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.6},detailBlock:{minHeight:60,gap:2,justifyContent:"flex-start"},detailLine:{fontSize:13,lineHeight:18},dividendsWrap:{marginTop:12,paddingTop:12,borderTopWidth:1},dividends:{gap:5},dividendsCaption:{fontSize:9,fontWeight:"600",letterSpacing:1},dividendRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",gap:12},dividendTierRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},dividendLabelCol:{flexShrink:1,minWidth:0,gap:3},dividendLabel:{fontSize:13},tierLegs:{flexDirection:"row",alignItems:"center",gap:3},tierLegDot:{width:5,height:5,borderRadius:1.5,opacity:.85},tierLegBall:{width:7,height:7,borderRadius:999,marginLeft:2},dividendMult:{fontSize:15,fontWeight:"800",fontVariant:["tabular-nums"]},radio:{width:24,height:24,borderRadius:12,borderWidth:2,alignItems:"center",justifyContent:"center"},bulletRow:{flexDirection:"row",alignItems:"flex-start",gap:12},dot:{width:6,height:6,borderRadius:3,marginTop:7},bulletText:{flex:1,fontSize:15,lineHeight:21},footer:{flexDirection:"row",justifyContent:"flex-end",paddingTop:16,paddingHorizontal:16},smallBtn:{paddingHorizontal:20,paddingVertical:11,borderRadius:10},smallBtnText:{fontSize:14,fontWeight:"700"}});function vi(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function Wi({iconUrl:e,size:t=56}){const{theme:n}=co(),o=n.colors,r=n.brand?.chip??o.primary,i=n.brand?.icon??o.primaryText,l=L(n);return(0,s.jsx)(c.View,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:r,borderWidth:1,borderColor:vi(i,.16),alignItems:"center",justifyContent:"center",shadowColor:r,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:(0,s.jsx)(Zt,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:i,accentColor:l})})}function Ti({eyebrow:e,iconUrl:t,gameName:n,tagline:o,style:r}){const{theme:i,screenSize:l}=co(),a=i.colors,d=se(i),h="mobile"===l,{width:u}=(0,c.useWindowDimensions)(),f=u>=640;return(0,s.jsxs)(c.View,{style:[Ai.block,f&&Ai.blockWide,r],children:[e&&f?(0,s.jsx)(c.Text,{style:[Ai.eyebrow,{color:a.primary,fontFamily:d}],children:e.toUpperCase()}):null,(0,s.jsx)(Ko,{iconUrl:t,gameName:n,height:h?20:32,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:i.brand?.accent,compact:h}),o?(0,s.jsx)(c.Text,{style:[Ai.tagline,f&&Ai.taglineWide,{color:a.textMuted}],children:o}):null]})}var Ai=c.StyleSheet.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Li({ariaLabel:e,children:t}){const{width:n}=(0,c.useWindowDimensions)();return n>=640?(0,s.jsx)(c.View,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:Mi.grid,children:t}):(0,s.jsx)(c.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:Mi.rail,children:t})}function Ri(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var Mi=c.StyleSheet.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function Di({legs:e,prizeBall:t=!0}){const{theme:n}=co(),o=n.colors.primary,r=L(n);return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>(0,s.jsx)(c.View,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:o,opacity:.85,marginRight:3}},t)),t?(0,s.jsx)(c.View,{style:{width:7,height:7,borderRadius:999,backgroundColor:r,marginLeft:2}}):null]})}function Pi({tile:e,label:t,stat:n,detail:o,onSelect:r,children:i}){const{theme:l}=co(),h=l.colors,u=se(l),f=F(l),g=h.primary,p=h.selectionCard??h.backgroundAlt,{width:y}=(0,c.useWindowDimensions)(),m=y>=640,[b,w]=(0,a.useState)(!1);return(0,s.jsxs)(c.View,{onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),style:[Hi.card,m&&Hi.cardWide,{backgroundColor:p,borderColor:b?g:h.border,shadowColor:b?g:"#000",shadowOpacity:b?.28:.08,shadowRadius:b?14:10,shadowOffset:{width:0,height:b?12:8},elevation:b?4:1,transform:[{translateY:b?-2:0}]}],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:r,activeOpacity:.85,style:[Hi.cardMain,m&&Hi.cardMainWide],children:[e,(0,s.jsxs)(c.View,{style:[Hi.cardText,m&&Hi.cardTextWide],children:[(0,s.jsxs)(c.View,{style:Hi.titleRow,children:[(0,s.jsx)(c.Text,{style:[Hi.cardTitle,m&&Hi.cardTitleWide,{color:f,fontFamily:u}],children:t}),n?(0,s.jsx)(c.View,{style:[Hi.statChip,{backgroundColor:vi(g,.12)}],children:(0,s.jsx)(c.Text,{style:[Hi.statChipText,{color:g}],children:n.toUpperCase()})}):null]}),o&&o.length>0?(0,s.jsx)(c.View,{style:Hi.detailBlock,children:(m?o:o.slice(0,1)).map(e=>(0,s.jsx)(c.Text,{style:[Hi.detailLine,m&&Hi.detailLineWide,{color:h.textMuted}],children:e},e))}):null]}),(0,s.jsx)(c.View,{style:[Hi.chevron,{transform:[{translateX:b?2:0}]}],children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:g,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i?(0,s.jsx)(c.View,{style:[Hi.childrenWrap,{borderTopColor:vi(f,.08)}],children:i}):null]})}var Hi=c.StyleSheet.create({card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardMainWide:{gap:16},cardText:{flex:1,minWidth:0,gap:4},cardTextWide:{gap:6},titleRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4},cardTitle:{fontSize:16,fontWeight:"800",letterSpacing:-.4},cardTitleWide:{fontSize:20,letterSpacing:-.5},statChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.72},detailBlock:{gap:2},detailLine:{fontSize:12,lineHeight:17},detailLineWide:{fontSize:13,lineHeight:18},chevron:{alignSelf:"center",flexShrink:0},childrenWrap:{marginTop:12,paddingTop:12,borderTopWidth:1}});function Oi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=co(),m=l.colors,b=ce(l),w=se(l),x=F(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[B,z]=(0,a.useState)(!1),v=(0,a.useMemo)(()=>r??cr(d),[r,d]),[W,T]=(0,a.useState)(()=>v?null!=h&&v.legOptions.includes(h)?h:v.defaultLegs:8),[A,L]=(0,a.useState)(()=>v?.defaultStake??20);if(!d||!lr(d)||!v)return(0,s.jsx)(c.View,{style:[Ii.container,{backgroundColor:m.background}],children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No game set available."})});const R=ar(A,W,{operatorMargin:v.operatorMargin,perLegProbability:v.perLegProbability}),M=A>=v.minStake,P=(e,t)=>(0,s.jsxs)(c.View,{style:Ii.controlLabelRow,children:[(0,s.jsx)(c.Text,{style:[Ii.controlLabelText,{color:m.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Ii.controlValueText,{color:x}],children:t})]});return(0,s.jsxs)(c.View,{style:[Ii.container,{backgroundColor:m.background}],children:[n?(0,s.jsx)(c.View,{style:Ii.backRow,children:(0,s.jsx)(nr,{onBack:n,label:i})}):null,(0,s.jsxs)(Le,{style:Ii.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Ii.sectionTitle,Ii.sectionTitleInBody,C&&Ii.sectionTitleInBodyWide,{color:m.primary,fontFamily:w,textAlign:"center"}],children:"The fastest multi"}),(0,s.jsx)(Ti,{eyebrow:o?null:"The fastest multi",iconUrl:pe(d),gameName:d.game_name,tagline:v.tagline}),(0,s.jsxs)(c.View,{style:[Ii.ticket,C&&Ii.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[P("Legs",`${W} legs`),(0,s.jsx)(c.View,{style:Ii.chipRow,children:v.legOptions.map(e=>{const t=e===W;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>T(e),accessibilityRole:"radio",accessibilityState:{selected:t},activeOpacity:.8,style:[Ii.chip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Ii.chipText,{color:t?m.primaryText:m.textMuted}],children:e})},e)})}),(0,s.jsxs)(c.View,{style:Ii.hintRow,children:[(0,s.jsx)(c.Text,{style:[Ii.hintText,{color:m.textMuted}],children:"Easier to land"}),(0,s.jsx)(c.Text,{style:[Ii.hintText,{color:m.textMuted}],children:"Bigger prize"})]}),(0,s.jsxs)(c.View,{style:Ii.stakeBlock,children:[P("Stake",ht(A)),(0,s.jsxs)(c.View,{style:[Ii.inputWrap,{borderColor:B?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Ii.inputPrefix,{color:m.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>z(!0),onBlur:()=>z(!1),value:A?String(A):"",onChangeText:e=>{if(""===e)return void L(0);const t=Number(e);Number.isFinite(t)&&L((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==v.maxStake?Math.min(t,v.maxStake):t})(t))},style:[Ii.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),(0,s.jsx)(c.View,{style:Ii.chipRow,children:v.quickStakes.map(e=>{const t=e===A;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>L(e),activeOpacity:.8,style:[Ii.stakeChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsxs)(c.Text,{style:[Ii.chipText,{color:t?m.primaryText:m.textMuted}],children:["$",e]})},e)})}),!M&&A>0?(0,s.jsxs)(c.Text,{style:[Ii.errorText,{color:m.error}],children:["Minimum stake is ",ht(v.minStake),"."]}):null]}),(0,s.jsxs)(c.View,{style:[Ii.dividendBlock,{borderTopColor:vi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:Ii.dividendCaptionRow,children:[(0,s.jsxs)(c.Text,{style:[Ii.dividendCaption,{color:m.textMuted}],children:["If all ",W," land"]}),(0,s.jsxs)(c.Text,{style:[Ii.dividendCaption,{color:m.textMuted}],children:[ht(A)," returns"]})]}),(0,s.jsxs)(c.View,{style:Ii.dividendMainRow,children:[(0,s.jsxs)(c.View,{style:Ii.dividendMainLeft,children:[(0,s.jsx)(c.Text,{style:[Ii.perfectTicket,{color:m.text}],children:"Perfect ticket"}),(0,s.jsx)(Di,{legs:W})]}),(0,s.jsx)(c.Text,{style:[Ii.prize,C&&Ii.prizeWide,{color:m.primary,fontFamily:w}],children:ht(R.prize)})]}),(0,s.jsxs)(c.Text,{style:[Ii.multipleLine,{color:m.textMuted}],children:[(H=R.multiple,`×${(Math.round(10*H)/10).toLocaleString("en-US",{maximumFractionDigits:1})}`)," your stake · total return, stake included"]}),(0,s.jsx)(c.Text,{style:[Ii.allOrNothing,{color:m.textMuted}],children:"All or nothing. Miss a single leg and the ticket does not pay."})]})]}),(0,s.jsxs)(c.View,{style:[Ii.modeCards,C&&Ii.modeCardsWide],children:[(0,s.jsx)(c.View,{style:C?Ii.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{M&&(u(W),f(W),g(A),y(),t?.())}})}),(0,s.jsx)(c.View,{style:C?Ii.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{M&&(f(W),g(A),p(d,W),e?.())}})})]})]})]});var H}var Ii=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:16},sectionTitleInBodyWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},dividendBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},dividendCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},dividendCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},dividendMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:6},dividendMainLeft:{flex:1,minWidth:0,gap:3},perfectTicket:{fontSize:13},prize:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},prizeWide:{fontSize:24},multipleLine:{fontSize:11,marginTop:6,fontVariant:["tabular-nums"]},allOrNothing:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ei({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=co(),m=l.colors,b=ce(l),w=se(l),x=F(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[B,z]=(0,a.useState)(null),[v,W]=(0,a.useState)(null),T=(0,a.useMemo)(()=>r??In(d),[r,d]),[A,L]=(0,a.useState)(()=>T?.defaultDividend??1e4),[R,M]=(0,a.useState)(()=>{const e=T?.dividends[0]?.rungs.map(e=>e.legs)??[];return null!=h&&e.includes(h)?h:T?.defaultLegs??9});if(!d||!Dn(d)||!T)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No dividend series available."})});const P=T.dividends.find(e=>e.dividend===A)??T.dividends[0],H=P.rungs.find(e=>e.legs===R)??P.rungs[0],O=Math.max(...P.rungs.map(e=>e.legs)),I=Math.min(...P.rungs.map(e=>e.legs));return(0,s.jsxs)(c.View,{style:ji.container,children:[n?(0,s.jsx)(c.View,{style:ji.backRow,children:(0,s.jsx)(nr,{onBack:n,label:i})}):null,(0,s.jsxs)(Le,{style:ji.inner,children:[(0,s.jsx)(Ti,{eyebrow:o?null:"Pick your dividend",iconUrl:pe(d),gameName:d.game_name,tagline:T.tagline}),(0,s.jsxs)(c.View,{style:[ji.ticket,C&&ji.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.12,shadowRadius:12,shadowOffset:{width:0,height:8},elevation:1}],children:[(E=ht(P.dividend),(0,s.jsxs)(c.View,{style:ji.sectionLabelRow,children:[(0,s.jsx)(c.Text,{style:[ji.sectionLabelText,{color:m.textMuted}],children:"Set dividend"}),E?(0,s.jsx)(c.Text,{style:[ji.sectionValueText,{color:x}],children:E}):null]})),(0,s.jsx)(Li,{ariaLabel:"Set dividend",children:T.dividends.map(e=>{const t=e.dividend===A,n=B===e.dividend;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>L(e.dividend),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},onMouseEnter:()=>z(e.dividend),onMouseLeave:()=>z(null),style:[ji.dividendTile,Ri(C),{backgroundColor:t?vi(m.primary,.08):"transparent",borderColor:t||n?m.primary:m.border}],children:[(0,s.jsx)(c.Text,{style:[ji.dividendValue,C&&ji.dividendValueWide,{color:x,fontFamily:w}],children:ht(e.dividend)}),(0,s.jsxs)(c.Text,{style:[ji.dividendFrom,{color:m.textMuted}],children:["from ",ht(e.rungs[0]?.stake??0)]})]},e.dividend)})}),(0,s.jsx)(c.Text,{style:[ji.ticketNote,{color:m.textMuted}],children:"One set amount — it does not move, whatever you spend."}),(0,s.jsxs)(c.View,{style:[ji.ladderDivider,{borderTopColor:vi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:ji.ladderHeaderRow,children:[(0,s.jsx)(c.Text,{style:[ji.ladderHeaderText,{color:m.textMuted}],children:"Legs to land"}),(0,s.jsx)(c.Text,{style:[ji.ladderHeaderText,{color:m.textMuted}],children:"Your stake"})]}),(0,s.jsx)(c.View,{style:ji.rungList,children:P.rungs.map(e=>{const t=e.legs===R,n=v===e.legs;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>M(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},onMouseEnter:()=>W(e.legs),onMouseLeave:()=>W(null),style:[ji.rungRow,{backgroundColor:t?vi(m.primary,.08):"transparent",borderColor:t||n?m.primary:m.border}],children:[(0,s.jsxs)(c.View,{style:ji.rungLeft,children:[(0,s.jsxs)(c.Text,{style:[ji.rungLegs,{color:m.text}],children:[e.legs," legs",C?e.legs===O?" · the long climb":e.legs===I?" · the sprint":"":""]}),(0,s.jsx)(Di,{legs:e.legs})]}),(0,s.jsx)(c.Text,{style:[ji.rungStake,C&&ji.rungStakeWide,{color:m.primary,fontFamily:w}],children:ht(e.stake)})]},e.legs)})}),(0,s.jsx)(c.Text,{style:[ji.ticketNote,{color:m.textMuted}],children:"Same dividend on every rung — a little for the long climb, more for the short one."})]})]}),(0,s.jsxs)(c.View,{style:[ji.cardList,C&&ji.cardListWide],children:[(0,s.jsx)(c.View,{style:C?ji.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(d),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${H.legs} legs`,`${ht(H.stake)} chasing the ${ht(P.dividend)}`],onSelect:()=>{var e;u((e=H).legs),f(e.legs),g(e.stake),y(),t?.()}})}),(0,s.jsx)(c.View,{style:C?ji.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${H.legs} legs at ${ht(H.stake)}`,"Straight to the bet slip"],onSelect:()=>{f(H.legs),g(H.stake),p(d,H.legs),e?.()}})})]})]})]});var E}var ji=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},eyebrowLeft:{textAlign:"left"},eyebrowSectionWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},dividendGrid:{flexDirection:"row",flexWrap:"wrap",gap:6},dividendTile:{borderWidth:1,borderRadius:12,paddingHorizontal:6,paddingVertical:10,alignItems:"center"},dividendValue:{fontSize:16,fontWeight:"800",letterSpacing:-.32,fontVariant:["tabular-nums"]},dividendValueWide:{fontSize:20,letterSpacing:-.4},dividendFrom:{fontSize:10,marginTop:4},ticketNote:{fontSize:11,fontStyle:"italic",marginTop:8},ladderDivider:{marginTop:16,paddingTop:12,borderTopWidth:1},ladderHeaderRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},ladderHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:6},rungLeft:{flexShrink:1,minWidth:0,gap:3},rungLegs:{fontSize:13},rungStake:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungStakeWide:{fontSize:16},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ni({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y,screenSize:m,bodyFont:b}=co(),w=l.colors,x="mobile"===m,k=se(l),S=F(l),C=L(l),B=D(l),{width:z}=(0,c.useWindowDimensions)(),v=z>=640,[W,T]=(0,a.useState)(null),A=(0,a.useMemo)(()=>r??pr(d),[r,d]),[R,M]=(0,a.useState)(()=>A?null!=h&&A.ladders.some(e=>e.legs===h)?h:A.defaultLegs:8),[P,H]=(0,a.useState)(()=>A?.defaultStake??50),[O,I]=(0,a.useState)(!1);if(!d||!hr(d)||!A)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontFamily:b},children:"No ladders available."})});const E=A.ladders.find(e=>e.legs===R)??A.ladders[0],j=fr(E,P),N=gr(E,P),G=[...j].reverse(),Y=x&&G.length>4,V=Y&&!O?G.slice(0,3):G,U=(e,t)=>(0,s.jsxs)(c.View,{style:Gi.sectionLabelRow,children:[(0,s.jsx)(c.Text,{style:[Gi.sectionLabelText,{color:w.textMuted}],children:e}),t?(0,s.jsx)(c.Text,{style:[Gi.sectionLabelValue,{color:S}],children:t}):null]});return(0,s.jsxs)(c.View,{style:[Gi.container,{backgroundColor:w.background}],children:[n?(0,s.jsx)(c.View,{style:Gi.backRow,children:(0,s.jsx)(nr,{onBack:n,label:i})}):null,(0,s.jsxs)(Le,{style:Gi.inner,children:[(0,s.jsx)(Ti,{eyebrow:o?null:"Climb the ladder. Stack the prizes.",iconUrl:pe(d),gameName:d.game_name,tagline:A.tagline}),(0,s.jsxs)(c.View,{style:[Gi.builder,v&&Gi.builderWide,{backgroundColor:B,borderColor:w.border,shadowColor:S,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[U("Your bet",ht(P)),(0,s.jsx)(c.View,{style:Gi.betRow,children:A.stakes.map(e=>{const t=e===P;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>H(e),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},style:[Gi.betChip,{backgroundColor:t?w.primary:"transparent",borderColor:t?w.primary:w.border}],children:(0,s.jsxs)(c.Text,{style:[Gi.betChipText,{color:t?w.primaryText:w.textMuted}],children:["$",e]})},e)})}),(0,s.jsx)(c.Text,{style:[Gi.betNote,{color:w.textMuted}],children:"Every prize scales with your bet."}),(0,s.jsxs)(c.View,{style:Gi.laddersBlock,children:[U(`${A.ladders.length} ladders to choose from`),(0,s.jsx)(Li,{ariaLabel:"Ladder",children:A.ladders.map(e=>{const t=e.legs===R,n=W===e.legs;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>M(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},onMouseEnter:()=>T(e.legs),onMouseLeave:()=>T(null),style:[Gi.ladderTile,Ri(v,"17%"),{backgroundColor:t?vi(w.primary,.08):"transparent",borderColor:t||n?w.primary:w.border}],children:[(0,s.jsxs)(c.Text,{style:[Gi.ladderTileLabel,{color:w.primary}],children:["Ladder ",e.legs]}),(0,s.jsx)(c.Text,{style:[Gi.ladderTilePrize,{color:S,fontFamily:k}],children:ht(gr(e,P))}),(0,s.jsxs)(c.Text,{style:[Gi.ladderTileNote,{color:w.textMuted}],children:["Win from ",e.firstPayingTier," right"]})]},e.legs)})})]}),(0,s.jsxs)(c.View,{style:[Gi.stackTable,{borderTopColor:vi(S,.08)}],children:[(0,s.jsxs)(c.Text,{style:[Gi.stackIntro,{color:w.text}],children:["Ladder ",E.legs," wins from ",E.firstPayingTier," right — every tier stacks into the"," ",(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:S},children:ht(N)})," Full Stack Prize."]}),(0,s.jsxs)(c.View,{style:Gi.rungHeader,children:[(0,s.jsx)(c.Text,{style:[Gi.rungHeaderCaption,{color:w.textMuted}],children:"Get right"}),(0,s.jsxs)(c.View,{style:Gi.rungHeaderRight,children:[(0,s.jsx)(c.Text,{style:[Gi.rungHeaderCaption,Gi.rungColPrize,{color:w.textMuted}],children:"Tier pays"}),(0,s.jsx)(c.Text,{style:[Gi.rungHeaderCaption,Gi.rungColTotal,{color:w.textMuted}],children:"You collect"})]})]}),(0,s.jsx)(c.View,{style:Gi.rungList,children:V.map(e=>{const t=e.atLeast===E.legs;return(0,s.jsxs)(c.View,{style:Gi.rungRow,children:[(0,s.jsxs)(c.View,{style:Gi.rungLeft,children:[(0,s.jsxs)(c.View,{style:Gi.rungLabelRow,children:[(0,s.jsxs)(c.Text,{style:[Gi.rungLabel,{color:w.text}],children:[e.atLeast," of ",E.legs]}),t&&v?(0,s.jsx)(c.View,{style:[Gi.fullStackChip,{backgroundColor:vi(C,.35)}],children:(0,s.jsx)(c.Text,{style:[Gi.fullStackChipText,{color:S}],children:"Full stack"})}):null]}),(0,s.jsx)(Di,{legs:e.atLeast,prizeBall:t})]}),(0,s.jsxs)(c.View,{style:Gi.rungRight,children:[(0,s.jsx)(c.Text,{style:[Gi.rungPrize,Gi.rungColPrice,{color:w.textMuted}],children:ht(e.prize)}),(0,s.jsx)(c.Text,{style:[Gi.rungCumulative,Gi.rungColTotal,v&&Gi.rungCumulativeWide,{color:w.primary,fontFamily:k}],children:ht(e.cumulative)})]})]},e.atLeast)})}),Y?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>I(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:O},style:[Gi.tierToggle,{borderColor:w.border}],children:(0,s.jsx)(c.Text,{style:[Gi.tierToggleText,{color:w.primary}],children:O?"Show fewer tiers":`Show all ${G.length} tiers`})}):null,(0,s.jsxs)(c.Text,{style:[Gi.stackNote,{color:w.textMuted}],children:["Land below ",E.firstPayingTier," right and the ticket does not pay."]})]})]}),(0,s.jsxs)(c.View,{style:[Gi.modeCards,v&&Gi.modeCardsWide],children:[(0,s.jsx)(c.View,{style:v?Gi.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(d),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${E.legs} outcomes`,`Win from ${E.firstPayingTier} right — every tier stacks`],onSelect:()=>{u(E.legs),f(E.legs),g(P),y(),t?.()}})}),(0,s.jsx)(c.View,{style:v?Gi.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${E.legs} legs at ${ht(P)}`,"Straight to the bet slip"],onSelect:()=>{f(E.legs),g(P),p(d,E.legs),e?.()}})})]})]})]})}var Gi=c.StyleSheet.create({container:{flex:1},inner:{flex:1,paddingHorizontal:16,width:"100%"},backRow:{paddingHorizontal:16},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},pageTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,textAlign:"center",marginBottom:16},header:{alignItems:"center",marginBottom:24},headerWide:{marginBottom:28},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},builder:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},builderWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionLabelValue:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},betRow:{flexDirection:"row",flexWrap:"wrap",gap:6},betChip:{flexGrow:1,flexBasis:52,minWidth:52,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},betChipText:{fontSize:14,fontWeight:"700"},betNote:{marginTop:8,fontSize:11,fontStyle:"italic"},laddersBlock:{marginTop:16},ladderGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},ladderTile:{flexGrow:1,borderWidth:1,borderRadius:12,paddingHorizontal:8,paddingVertical:12,alignItems:"center",justifyContent:"center"},ladderTileLabel:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},ladderTilePrize:{marginTop:4,fontSize:18,fontWeight:"800",letterSpacing:-.36,fontVariant:["tabular-nums"]},ladderTileNote:{marginTop:4,fontSize:10},stackTable:{marginTop:16,borderTopWidth:1,paddingTop:12},stackIntro:{marginBottom:8,fontSize:12,lineHeight:18},rungHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},rungHeaderRight:{flexDirection:"row",gap:10},rungColPrice:{width:64,textAlign:"right"},rungColPrize:{width:64,textAlign:"right"},rungColTotal:{width:84,textAlign:"right"},rungHeaderCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},rungLeft:{flex:1,minWidth:0,gap:3},rungLabelRow:{flexDirection:"row",alignItems:"center",gap:8,flexWrap:"wrap"},rungLabel:{fontSize:13},fullStackChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},fullStackChipText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},rungRight:{flexDirection:"row",alignItems:"baseline",gap:10,flexShrink:0},rungPrize:{fontSize:11,fontVariant:["tabular-nums"]},rungCumulative:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungCumulativeWide:{fontSize:16},tierToggle:{marginTop:8,borderWidth:1,borderRadius:8,paddingVertical:8,alignItems:"center"},tierToggleText:{fontSize:11,fontWeight:"700"},stackNote:{marginTop:8,fontSize:11,fontStyle:"italic"},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Yi({legs:e,right:t}){const{theme:n}=co(),o=n.colors.primary,r=L(n);return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,n)=>(0,s.jsx)(c.View,{style:{width:5,height:5,borderRadius:1.5,marginRight:3,backgroundColor:t?o:"transparent",borderWidth:t?0:1,borderColor:t?void 0:vi(o,.45),opacity:t?.85:1}},n)),(0,s.jsx)(c.View,{style:{width:7,height:7,borderRadius:999,backgroundColor:r,marginLeft:2}})]})}function Vi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=co(),m=l.colors,b=ce(l),w=se(l),x=F(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[B,z]=(0,a.useState)(!1),v=(0,a.useMemo)(()=>r??xr(d),[r,d]),[W,T]=(0,a.useState)(()=>v?null!=h&&v.legOptions.includes(h)?h:v.defaultLegs:8),[A,L]=(0,a.useState)(()=>v?.defaultStake??20);if(!d||!br(d)||!v)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No mirror available."})});const R=wr(A,W,{operatorMargin:v.operatorMargin,perLegProbability:v.perLegProbability}),M=A>=v.minStake,P=(e,t)=>(0,s.jsxs)(c.View,{style:Ui.controlLabel,children:[(0,s.jsx)(c.Text,{style:[Ui.controlLabelText,{color:m.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Ui.controlValueText,{color:x}],children:t})]}),H=e=>(0,s.jsxs)(c.View,{style:Ui.winRow,children:[(0,s.jsxs)(c.View,{style:Ui.winRowLeft,children:[(0,s.jsx)(c.Text,{style:[Ui.winRowLabel,{color:m.text}],children:e?`All ${W} right`:`All ${W} wrong`}),(0,s.jsx)(Yi,{legs:W,right:e})]}),(0,s.jsx)(c.Text,{style:[Ui.winRowPrize,C&&Ui.winRowPrizeWide,{color:m.primary,fontFamily:w}],children:ht(R.prize)})]});return(0,s.jsxs)(c.View,{style:Ui.container,children:[n?(0,s.jsx)(c.View,{style:Ui.backRow,children:(0,s.jsx)(nr,{onBack:n,label:i})}):null,(0,s.jsxs)(Le,{style:Ui.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Ui.sectionTitle,{color:m.primary,fontFamily:w}],children:"All right, or all wrong"}),(0,s.jsx)(Ti,{eyebrow:o?null:"All right, or all wrong",iconUrl:pe(d),gameName:d.game_name,tagline:v.tagline}),(0,s.jsxs)(c.View,{style:[Ui.ticket,C&&Ui.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[P("Legs",`${W} legs`),(0,s.jsx)(c.View,{style:Ui.chipRow,children:v.legOptions.map(e=>{const t=e===W;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>T(e),accessibilityRole:"radio",accessibilityState:{selected:t},style:[Ui.legChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Ui.chipText,{color:t?m.primaryText:m.textMuted}],children:e})},e)})}),(0,s.jsxs)(c.View,{style:Ui.hintRow,children:[(0,s.jsx)(c.Text,{style:[Ui.hintText,{color:m.textMuted}],children:"Easier to sweep"}),(0,s.jsx)(c.Text,{style:[Ui.hintText,{color:m.textMuted}],children:"Bigger prize"})]}),(0,s.jsxs)(c.View,{style:Ui.stakeBlock,children:[P("Stake",ht(A)),(0,s.jsxs)(c.View,{style:[Ui.inputWrap,{borderColor:B?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Ui.inputPrefix,{color:m.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"numeric",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>z(!0),onBlur:()=>z(!1),value:A?String(A):"",onChangeText:e=>{if(""===e)return void L(0);const t=Number(e);Number.isFinite(t)&&L((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==v.maxStake?Math.min(t,v.maxStake):t})(t))},style:[Ui.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),(0,s.jsx)(c.View,{style:Ui.quickStakeRow,children:v.quickStakes.map(e=>{const t=e===A;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>L(e),style:[Ui.stakeChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Ui.chipText,{color:t?m.primaryText:m.textMuted}],children:`$${e}`})},e)})}),!M&&A>0?(0,s.jsx)(c.Text,{style:[Ui.errorText,{color:m.error}],children:`Minimum stake is ${ht(v.minStake)}.`}):null]}),(0,s.jsxs)(c.View,{style:[Ui.winSection,{borderTopColor:vi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:Ui.winHeader,children:[(0,s.jsx)(c.Text,{style:[Ui.winHeaderText,{color:m.textMuted}],children:"Two ways to win"}),(0,s.jsx)(c.Text,{style:[Ui.winHeaderText,{color:m.textMuted}],children:`${ht(A)} pays each`})]}),(0,s.jsxs)(c.View,{style:Ui.winRows,children:[H(!0),H(!1)]}),(0,s.jsx)(c.Text,{style:[Ui.splitNote,{color:m.textMuted}],children:"Anything in between — a split card — does not pay."})]})]}),(0,s.jsxs)(c.View,{style:[Ui.cardList,C&&Ui.cardListWide],children:[(0,s.jsx)(c.View,{style:C?Ui.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","Aim for the sweep — either direction pays"],onSelect:()=>{M&&(u(W),f(W),g(A),y(),t?.())}})}),(0,s.jsx)(c.View,{style:C?Ui.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{M&&(f(W),g(A),p(d,W),e?.())}})})]})]})]})}var Ui=c.StyleSheet.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16,textAlign:"center"},tagline:{marginTop:12,fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabel:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},legChip:{minWidth:40,flexGrow:1,flexBasis:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{marginTop:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},quickStakeRow:{marginTop:8,flexDirection:"row",flexWrap:"wrap",gap:6},stakeChip:{minWidth:48,flexGrow:1,flexBasis:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},errorText:{marginTop:8,fontSize:12},winSection:{marginTop:16,borderTopWidth:1,paddingTop:12},winHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},winHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},winRows:{marginTop:6,gap:8},winRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},winRowLeft:{flex:1,minWidth:0,gap:3},winRowLabel:{fontSize:13},winRowPrize:{fontSize:18,fontWeight:"800",fontVariant:["tabular-nums"]},winRowPrizeWide:{fontSize:20},splitNote:{marginTop:8,fontSize:11,fontStyle:"italic"},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Zi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,setSelectedRuleId:p,quickPickGame:y,goToSportSelection:m}=co(),b=l.colors,w=ce(l),x=se(l),k=F(l),S=D(l),{width:C}=(0,c.useWindowDimensions)(),B=C>=640,[z,v]=(0,a.useState)(!1),W=(0,a.useMemo)(()=>r??Fn(d),[r,d]),[T,A]=(0,a.useState)(()=>W?.defaultModeId??"extra_shot"),[L,R]=(0,a.useState)(()=>{const e=W?.modes.find(e=>e.id===(W?.defaultModeId??"extra_shot"));return e?null!=h&&e.legOptions.includes(h)?h:e.defaultLegs:8}),[M,P]=(0,a.useState)(()=>W?.defaultStake??20);if(!d||!yn(d)||!W)return(0,s.jsx)(c.View,{style:[Ki.container,{backgroundColor:b.background}],children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:w},children:"No safety net available."})});const H=W.modes.find(e=>e.id===T)??W.modes[0],O=xn(M,L,H.allowedMisses,W.pricing),I=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==W.maxStake?Math.min(t,W.maxStake):t},E=M>=W.minStake,j=(e,t)=>(0,s.jsxs)(c.View,{style:Ki.controlLabelRow,children:[(0,s.jsx)(c.Text,{style:[Ki.controlLabelText,{color:b.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Ki.controlValueText,{color:k}],children:t})]}),N=(e,t,n,o)=>(0,s.jsx)(c.TouchableOpacity,{onPress:o,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[Ki.chip,{backgroundColor:n?b.primary:"transparent",borderColor:n?b.primary:b.border}],children:(0,s.jsx)(c.Text,{style:[Ki.chipText,{color:n?b.primaryText:b.textMuted}],children:t})},e),G=[{label:"Perfect",amount:O.perfect},...O.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];return(0,s.jsxs)(c.View,{style:[Ki.container,{backgroundColor:b.background}],children:[n?(0,s.jsx)(c.View,{style:Ki.backRow,children:(0,s.jsx)(nr,{onBack:n,label:i})}):null,(0,s.jsxs)(Le,{style:Ki.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Ki.sectionTitle,Ki.sectionTitleInBody,B&&Ki.sectionTitleInBodyWide,{color:b.primary,fontFamily:x,textAlign:"center"}],children:"Choose your safety net"}),(0,s.jsx)(Ti,{eyebrow:o?null:"Choose your safety net",iconUrl:pe(d),gameName:d.game_name,tagline:W.tagline}),(0,s.jsxs)(c.View,{style:[Ki.ticket,B&&Ki.ticketWide,{backgroundColor:S,borderColor:b.border,shadowColor:k,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[j("Safety net",H.label),(0,s.jsx)(c.View,{style:Ki.chipRow,children:W.modes.map(e=>N(e.id,e.label,e.id===H.id,()=>(e=>{const t=W.modes.find(t=>t.id===e);t&&(A(e),p(t.ruleId),t.legOptions.includes(L)||R(t.legOptions.reduce((e,t)=>Math.abs(t-L)<Math.abs(e-L)?t:e,t.legOptions[0])))})(e.id)))}),(0,s.jsx)(c.Text,{style:[Ki.modeExplain,B&&Ki.modeExplainWide,{color:b.textMuted}],children:H.explain}),(0,s.jsxs)(c.View,{style:Ki.legsBlock,children:[j("Legs",`${L} legs`),(0,s.jsx)(c.View,{style:Ki.chipRow,children:H.legOptions.map(e=>N(e,String(e),e===L,()=>R(e)))}),(0,s.jsxs)(c.View,{style:Ki.hintRow,children:[(0,s.jsx)(c.Text,{style:[Ki.hintText,{color:b.textMuted}],children:"Easier to land"}),(0,s.jsx)(c.Text,{style:[Ki.hintText,{color:b.textMuted}],children:"Bigger prizes"})]})]}),(0,s.jsxs)(c.View,{style:Ki.stakeBlock,children:[j("Stake",ht(M)),(0,s.jsxs)(c.View,{style:[Ki.inputWrap,{borderColor:z?b.borderFocus??b.primary:b.border,backgroundColor:b.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Ki.inputPrefix,{color:b.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:b.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>v(!0),onBlur:()=>v(!1),value:M?String(M):"",onChangeText:e=>{if(""===e)return void P(0);const t=Number(e);Number.isFinite(t)&&P(I(t))},style:[Ki.input,{color:b.textAlt??b.text,fontFamily:w}]})]}),(0,s.jsx)(c.View,{style:Ki.chipRow,children:W.quickAdds.map(e=>(0,s.jsx)(c.TouchableOpacity,{onPress:()=>P(I((M||0)+e)),activeOpacity:.8,style:[Ki.stakeChip,{backgroundColor:"transparent",borderColor:b.border}],children:(0,s.jsxs)(c.Text,{style:[Ki.chipText,{color:b.textMuted}],children:["+$",e]})},e))}),!E&&M>0?(0,s.jsxs)(c.Text,{style:[Ki.errorText,{color:b.error}],children:["Minimum stake is ",ht(W.minStake),"."]}):null]}),(0,s.jsxs)(c.View,{style:[Ki.prizeBlock,{borderTopColor:vi(k,.08)}],children:[(0,s.jsxs)(c.View,{style:Ki.prizeCaptionRow,children:[(0,s.jsx)(c.Text,{style:[Ki.prizeCaption,{color:b.textMuted}],children:"What you can win"}),(0,s.jsxs)(c.Text,{style:[Ki.prizeCaption,{color:b.textMuted}],children:[ht(M)," returns"]})]}),(0,s.jsxs)(c.View,{style:Ki.prizeRows,children:[G.map(e=>(0,s.jsxs)(c.View,{style:Ki.prizeRow,children:[(0,s.jsx)(c.Text,{style:[Ki.prizeRowLabel,B&&Ki.prizeRowLabelWide,{color:b.text}],children:e.label}),(0,s.jsx)(c.Text,{style:[Ki.prizeRowAmount,B&&Ki.prizeRowAmountWide,{color:b.primary,fontFamily:x}],children:ht(Math.round(e.amount))})]},e.label)),(0,s.jsxs)(c.View,{style:[Ki.sweepRow,{backgroundColor:b.primary}],children:[(0,s.jsxs)(c.View,{style:Ki.sweepLeft,children:[(0,s.jsx)(c.Text,{style:[Ki.sweepLabel,B&&Ki.sweepLabelWide,{color:b.primaryText,fontFamily:x}],children:"Clean sweep"}),(0,s.jsx)(c.Text,{style:[Ki.sweepSub,{color:b.primaryText}],children:"every leg right — all prizes"})]}),(0,s.jsx)(c.Text,{style:[Ki.sweepAmount,B&&Ki.sweepAmountWide,{color:b.primaryText,fontFamily:x}],children:ht(Math.round(O.sweep))})]})]}),(0,s.jsx)(c.Text,{style:[Ki.stakeNote,{color:b.textMuted}],children:"Total returns, stake included."}),(0,s.jsxs)(c.Text,{style:[Ki.missNote,{color:b.textMuted}],children:["Miss ",1===H.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),(0,s.jsxs)(c.View,{style:[Ki.modeCards,B&&Ki.modeCardsWide],children:[(0,s.jsx)(c.View,{style:B?Ki.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{E&&(p(H.ruleId),u(L),f(L-H.allowedMisses),g(M),m(),t?.())}})}),(0,s.jsx)(c.View,{style:B?Ki.modeCardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{E&&(p(H.ruleId),f(L-H.allowedMisses),g(M),y(d,L),e?.())}})})]})]})]})}var Ki=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:16},sectionTitleInBodyWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},modeExplain:{fontSize:12,lineHeight:17,marginTop:8},modeExplainWide:{fontSize:13,lineHeight:18},legsBlock:{marginTop:16},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12,marginBottom:8},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},prizeBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},prizeCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},prizeCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},prizeRows:{marginTop:6,gap:6},prizeRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},prizeRowLabel:{fontSize:12},prizeRowLabelWide:{fontSize:13},prizeRowAmount:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},prizeRowAmountWide:{fontSize:16},sweepRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:12,paddingHorizontal:12,paddingVertical:10,marginTop:4},sweepLeft:{flex:1,minWidth:0,gap:2},sweepLabel:{fontSize:14,fontWeight:"800"},sweepLabelWide:{fontSize:15},sweepSub:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.6,opacity:.75},sweepAmount:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},sweepAmountWide:{fontSize:24},stakeNote:{fontSize:11,marginTop:6},missNote:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function qi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,backLabel:r="Games"}){const{theme:i,selectedGame:l,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,quickPickGame:f,goToSportSelection:g}=co(),p=i.colors,y=ce(i),m=se(i),{width:b}=(0,c.useWindowDimensions)(),w=b>=640,x=(0,a.useMemo)(()=>{if(!l)return[];if(l.allowed_propositions&&l.allowed_propositions.length>0)return[...l.allowed_propositions].sort((e,t)=>e-t);const{min:e,max:t}=St(l);return Nt(e,t)},[l]),k=Cr(l),S=x[0]??0,C=x[x.length-1]??0,[B]=(0,a.useState)(()=>null!=d&&x.includes(d)?d:C),z=(0,a.useMemo)(()=>An(l,B||void 0),[l,B]);if(!l||0===x.length||"exact"!==z?.kind)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:p.textMuted,fontFamily:y},children:"No setup available."})});const F=k?["Any yes/no props in the pool",`Pick ${S}–${C} legs — all must land`]:["A clean yes or no on every leg",`All ${B} have to land`],v=k?[`We fill ${B} legs across any markets`,"Straight to the bet slip"]:[`We fill all ${B} legs for you`,"Straight to the bet slip"];return(0,s.jsxs)(c.View,{style:Xi.container,children:[n?(0,s.jsx)(c.View,{style:Xi.backRow,children:(0,s.jsx)(nr,{onBack:n,label:r})}):null,(0,s.jsxs)(Le,{style:Xi.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Xi.sectionTitle,w&&Xi.sectionTitleWide,{color:p.primary,fontFamily:m}],children:z.title}),(0,s.jsx)(Ti,{eyebrow:o?null:z.title,iconUrl:pe(l),gameName:l.game_name,tagline:z.heroTagline}),(0,s.jsxs)(c.View,{style:[Xi.cardList,w&&Xi.cardListWide],children:[(0,s.jsx)(c.View,{style:w?Xi.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:pe(l),size:60}),label:"Pick my own",stat:"Your calls",detail:F,onSelect:()=>{k||(h(B),u(B)),g(),t?.()}})}),(0,s.jsx)(c.View,{style:w?Xi.cardCell:void 0,children:(0,s.jsx)(Pi,{tile:(0,s.jsx)(Wi,{iconUrl:`${de}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:v,onSelect:()=>{u(B),f(l,B),e?.()}})})]})]})]})}var Xi=c.StyleSheet.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16,textAlign:"center"},sectionTitleWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},cardList:{gap:12},cardListWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});exports.BladeApiClient=Jn,exports.BrandLockup=function({iconUrl:e,gameName:t,nameLines:n,height:o=56,showTrademark:r=!0}){const{theme:i}=co(),l=F(i),a=L(i),d=i.colors.primaryHover??function(e){const t=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!t)return e;const n=parseInt(t[1],16);return`rgba(${n>>16&255}, ${n>>8&255}, ${255&n}, 0.7)`}(l),h=se(i)??"Manrope, Poppins, sans-serif",u=n&&n.length>0?n:t.split(/\s+/),f=.72*o,g=.5*o,p=Math.min(.62*o/u.length,.3*o);return(0,s.jsxs)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:`YESNO ${t}`,style:{flexDirection:"row",alignItems:"center",gap:.22*o},children:[(0,s.jsx)(Zt,{iconUrl:e,width:f,height:f,iconColor:l,accentColor:a}),(0,s.jsxs)(c.Text,{style:{fontFamily:h,fontSize:g,letterSpacing:.045*-g,lineHeight:g,color:l,includeFontPadding:!1},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"800"},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"600"},children:"NO"})]}),(0,s.jsx)(c.View,{style:{width:Math.max(2,Math.round(.045*o)),height:.78*o,backgroundColor:d}}),(0,s.jsx)(c.View,{style:{flexDirection:"column"},children:u.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start"},children:[(0,s.jsx)(c.Text,{style:{fontFamily:h,fontSize:p,fontWeight:"500",letterSpacing:.012*-p,lineHeight:1.14*p,color:l,includeFontPadding:!1},children:e}),r&&t===u.length-1?(0,s.jsx)(c.Text,{style:{fontFamily:h,fontSize:.36*p,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})},exports.CategoryIcon=Ne,exports.CategoryPickerPage=Zr,exports.CategoryPickerPageActions=function({onCancel:e}){const{theme:t,screenSize:n}=co(),o=t.colors;return e&&"mobile"!==n?(0,s.jsx)(c.View,{style:Kr.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Kr.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Kr.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null},exports.CategoryPickerPageTitle=Ur,exports.ChevronRightIcon=Ge,exports.ConfirmPage=function({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o,hideTitle:r,hideActions:i}){const l=co(),{theme:d,selectedGame:h,selectedPropositions:u,selections:f,propositions:g,selectedPropositionCount:p,selectedEventId:y,expectedCorrect:m,setExpectedCorrect:b,betAmount:w,setBetAmount:x,submitting:k,submitError:S,canSubmit:C,winningCounts:B,payouts:z,overloadPayouts:F,renderTeamLogo:v,userBalance:W,onRecharge:T,goBack:A,toggleSelection:L,upgradePropositionCount:R,goToSportSelection:M,selectedRule:D}=l,P=d.colors,{width:H}=(0,c.useWindowDimensions)(),O=H>=640;if((0,a.useEffect)(()=>{h||(M(),e?.())},[h,M,e]),!h)return null;const I=!!(h.allowed_propositions&&h.allowed_propositions.length>0),E=St(h,p,D),j=E.min,N=$t(h)&&y?Math.min(E.max,g.length):E.max,G=Object.keys(f).length,Y=j>0&&G<j,V=!I&&j>0&&N>j&&G>=j&&G<N,U=I?[...h.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(p??0)):[],Z=I&&U.length>0&&!Y,K=V||Z,q=N-G;P.textAlt??P.text;const X=()=>{A(),e?.()},Q=(I?[...h.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===G&&e<(p??1/0)),J=I&&G<Math.min(...h.allowed_propositions??[1/0]),$=I&&Y&&!J,_=Br(h),ee=function(e,t,n,o){const r=e?.description?.trim();if(r)return r;const i=(t??[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(0===i.length||n<=0)return null;const l=i[0];if(l>=n)return"Get every pick right to win.";if(!i.every((e,t)=>e===l+t)||i[i.length-1]!==n)return 2===i.length&&0===i[0]&&i[1]===n?`Get all ${n} picks right — or all ${n} wrong — to win.`:`Get exactly ${i.join(" or ")} of your ${n} picks right to win.`;const a=i.map(e=>o?.[e]).filter(e=>Number.isFinite(e));if(a.length===i.length&&a.length>1&&a.every((e,t)=>0===t||e>a[t-1]))return`Get ${l} of your ${n} picks right to start winning — every pick after that grows the prize.`;const c=n-l;return`Get ${l} of your ${n} picks right to win — up to ${1===c?"one miss":`${c} misses`} still pays.`}(D,B,G,z),te=null!=Q?_.belowRequiredHint(Q,p??j):_.belowRequiredAddOnlyHint(p??j);return(0,a.useEffect)(()=>{!Y||I&&!J||X()},[Y,I,J]),(0,s.jsxs)(c.View,{style:ci.container,children:[!r&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(ai,{onBack:e,hideActions:i})}),(0,s.jsx)(c.View,{style:ci.content,children:(0,s.jsx)(Go,{game:h,propositions:u,selections:f,onToggleSelection:L,onRemoveSelection:()=>{},onSubmit:async()=>{n?(await l.handleSubmit(),t?.()):o?.(li(l))},onBack:X,loading:k,error:S,expectedCorrect:m,onExpectedCorrectChange:b,betAmount:w,onBetAmountChange:x,theme:d,showCustomAmount:!0,betAmountLocked:Dn(h),betAmountLockedNote:"Set by your dividend ladder rung.",hideActions:!0,winningCounts:B,payouts:z,renderTeamLogo:v,canSubmit:C,authenticated:n,userBalance:W,onRecharge:T,boostBanner:(0,s.jsxs)(s.Fragment,{children:[ee&&(0,s.jsxs)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.primary}30`,backgroundColor:`${P.primary}08`,marginBottom:12},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1,color:P.textMuted,marginBottom:4},children:"How you win"}),(0,s.jsx)(c.Text,{style:{fontSize:O?14:12,color:P.text},children:ee})]}),$&&(0,s.jsxs)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.warning}40`,backgroundColor:`${P.warning}10`,flexDirection:O?"row":"column",alignItems:O?"center":"flex-start",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{fontSize:O?14:12,color:P.text,flexShrink:1},children:["You have ",(0,s.jsxs)(c.Text,{style:{fontWeight:"700"},children:[G," pick",1!==G?"s":""]}),`. ${te}`]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:X,style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonSecondary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonSecondaryText},children:"Add a pick"})}),null!=Q&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>R(Q),style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonPrimaryText},children:_.switchTierLabel(Q)})})]})]}),K&&(0,s.jsx)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.primary}30`,backgroundColor:`${P.primary}08`},children:Z?(()=>{const e=p??G,t=F[e],n=w>0?w:20,o=null!=t&&t>0?t*(n/20):null;return(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:P.primary,marginBottom:4},children:_.overloadTitle}),null!=o&&(0,s.jsxs)(c.Text,{style:{fontSize:12,color:P.textMuted,marginBottom:8},children:["Currently winning up to ",(0,s.jsx)(c.Text,{style:{color:P.heading??P.text,fontWeight:"700"},children:ht(o)}),` with ${e} picks`]}),(0,s.jsx)(ri,{tiers:U.map(e=>({count:e,payout20:F[e]??0})),selectedCount:void 0,onSelect:e=>{R(e),X()},colors:P,bodyFont:l.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:_.tableColumnLabel,buttonLabel:_.tierButtonLabel})]})})():(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{fontSize:12,color:P.textMuted,flex:1},children:[1===q?"Add ":"Add up to ",(0,s.jsxs)(c.Text,{style:{color:P.primary,fontWeight:"700"},children:[q," more pick",1!==q?"s":""]})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:X,style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonPrimaryText},children:"Add picks"})})]})})]})})}),i&&S?(0,s.jsx)(c.View,{style:{marginTop:12,alignItems:"flex-end"},children:(0,s.jsx)(c.Text,{style:[ci.errorText,{color:P.error}],children:S})}):null]})},exports.ConfirmPageActions=function({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o}){const r=co(),{theme:i,selectedGame:l,expectedCorrect:a,betAmount:d,submitting:h,submitError:u,canSubmit:f,payouts:g,selectedPropositionIds:p,screenSize:y}=r,m=i.colors,{width:b}=(0,c.useWindowDimensions)(),w=b>=640;if(!l)return null;const x=g[a]??0,k=Ct(l),S=a===p.length,C=k?.enabled&&S,B=e&&"mobile"!==y;return(0,s.jsxs)(c.View,{style:ci.footer,children:[B&&(0,s.jsx)(Fe,{theme:i,variant:"secondary",onPress:e,children:"Back"}),(0,s.jsxs)(c.View,{style:ci.footerRight,children:[u?(0,s.jsx)(c.Text,{style:[ci.errorText,{color:m.error}],children:u}):null,(x>0||C)&&w&&(0,s.jsxs)(c.View,{style:ci.payoutInfo,children:[(0,s.jsx)(c.Text,{style:[ci.payoutLabel,{color:m.textMuted}],children:"Potential winnings"}),(0,s.jsxs)(c.Text,{style:[ci.payoutAmount,{color:m.heading??m.text}],children:[ht(x),C?(0,s.jsx)(c.Text,{style:{color:m.warning},children:" + Jackpot"}):null]})]}),(0,s.jsx)(Fe,{theme:i,variant:"primary",disabled:!f,onPress:async()=>{n?(await r.handleSubmit(),t?.()):o?.(li(r))},children:n?h?"Placing…":`Place Entry (${ht(d)})`:"Log in to place entry"})]})]})},exports.ConfirmPageTitle=ai,exports.DOUBLE_SHOT_MIN_LEGS=6,exports.EXTRA_SHOT_MIN_LEGS=4,exports.EntriesPage=function({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:o}){const{theme:r,apiUrl:i,apiKey:l,fetchImpl:a,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,renderTeamLogo:p,filterSport:y}=co();return(0,s.jsxs)(c.View,{style:gi.container,children:[!n&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(fi,{onBack:t,hideActions:o})}),(0,s.jsx)(c.View,{style:gi.content,children:(0,s.jsx)(Qo,{apiUrl:i,apiKey:l,fetchImpl:a,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,onSelectEntry:e,theme:r,renderTeamLogo:p,filterSport:y})})]})},exports.EntriesPageTitle=fi,exports.EntrySubmission=Go,exports.EventFilterBanner=_o,exports.EventPickerPage=Qr,exports.FilterChipCarousel=Ke,exports.FilterChipRow=qe,exports.GAME_TIER_LEVEL=cn,exports.GAME_TIER_TABS=sn,exports.GameEntries=Qo,exports.GameLogo=Nr,exports.GamePage=function({onSelectGame:e,onGameSetup:t,onRuleSetup:n,onGameSetBet:o,onPickYourDividend:r,onLadder:i,onMirror:l,onSafetyNet:d,onQuickPick:h,onCancel:u,hideTitle:f,hideActions:g,showPerfectPickSetup:p=!1,showTierFilter:y=!1}){const m=co(),{theme:b,games:w,loading:x,error:k,selectedGame:S,selectedPropositionCount:C,handlePropositionCountChange:B,maxPayouts:z}=m;b.colors;const F=a.default.useRef(S);F.current=S;const{width:v}=(0,c.useWindowDimensions)(),W=v>=640;return(0,s.jsxs)(c.View,{style:Fr.container,children:[!f&&(0,s.jsx)(c.View,{style:{marginBottom:W?24:16},children:(0,s.jsx)(zr,{onBack:u,hideActions:g})}),(0,s.jsx)(_o,{}),(0,s.jsx)(c.View,{style:Fr.content,children:(0,s.jsx)(qn,{games:w,selectedGame:S,onSelectGame:e=>{F.current=e,m.selectGame(e)},loading:x,error:k,theme:b,showTierFilter:y,selectedPropositionCount:C,onPropositionCountChange:B,onPropositionCountSelected:()=>{const a=F.current;if("rule_setup"===kr(a)&&Cr(a)&&!p)return m.goToSportSelection(),void e?.();const c=kr(a);if("quick_pick"===c||"selections"===c)return m.goToSportSelection(),void e?.();t?t(c):({game_set:o,pick_your_dividend:r,ladder:i,mirror:l,safety_net:d,rule_setup:n}[c]??n)?.()},onQuickPickGame:(e,t)=>{m.quickPickGame(e,t),h?.()},maxPayouts:z})})]})},exports.GamePageActions=function({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:o}=co(),r=n.colors;return e&&"mobile"!==o?(0,s.jsx)(c.View,{style:[Fr.footer],children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Fr.secondaryBtn,{backgroundColor:r.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Fr.secondaryBtnText,{color:r.buttonSecondaryText}],children:"Cancel"})})}):null},exports.GamePageTitle=zr,exports.GameSelector=qn,exports.GameSetBetPage=Oi,exports.GameSetBetPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors,{width:l}=(0,c.useWindowDimensions)(),a=l<640;return(0,s.jsxs)(c.View,{style:[Ii.header,a&&Ii.headerCompact],children:[(0,s.jsx)(c.Text,{style:[Ii.sectionTitle,a&&Ii.sectionTitleCompact,{color:i.primary,fontFamily:r}],children:"The fastest multi"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.GameSetupPage=function({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:r="Games"}){const{theme:i,selectedGame:l,goToSportSelection:a,bodyFont:d}=co(),h={onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:r};switch(kr(l)){case"game_set":return(0,s.jsx)(Oi,{...h});case"pick_your_dividend":return(0,s.jsx)(Ei,{...h});case"ladder":return(0,s.jsx)(Ni,{...h});case"mirror":return(0,s.jsx)(Vi,{...h});case"safety_net":return(0,s.jsx)(Zi,{...h});case"rule_setup":return"exact"===An(l)?.kind?(0,s.jsx)(qi,{...h}):(0,s.jsx)(zi,{onBack:n,hideTitle:o,backLabel:r,onContinue:()=>{a(),e?.()}});default:return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:i.colors.textMuted,fontFamily:d},children:"No setup required — this game goes straight to picks."})})}},exports.HowToPlayButton=Ee,exports.HowToPlayPanel=Me,exports.LADDER_FAMILY=dr,exports.LADDER_REFERENCE_BET=50,exports.LADDER_STAKES=sr,exports.LadderPage=Ni,exports.LadderPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Gi.titleWrap,children:[(0,s.jsx)(c.Text,{style:[Gi.eyebrow,{color:i.primary,fontFamily:r}],children:"Every step pays"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.LockIcon=Ye,exports.MIRROR_STANDARD_MARGIN=.21875,exports.MirrorPage=Vi,exports.MirrorPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Ui.header,children:[(0,s.jsx)(c.Text,{style:[Ui.eyebrow,{color:i.primary,fontFamily:r}],children:"All right, or all wrong"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PYD_LEG_RUNGS=Mn,exports.PYD_RETAIL_DIVIDENDS=Rn,exports.PayoutCircles=function({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:o,theme:r=j,colorWinning:i,colorNone:l,winningCounts:a,payouts:h}){const u=r.colors,{width:f}=(0,c.useWindowDimensions)(),g=f>=640,p=i??u.payoutWinning,y=l??u.payoutNone,m=Ct(e),b=g?48:40;return(0,s.jsxs)(c.View,{style:Zo.container,children:[(0,s.jsx)(c.Text,{style:[Zo.title,{color:u.textMuted}],children:"Payout Visualization"}),m.enabled&&(0,s.jsxs)(c.View,{style:[Zo.jackpotBanner,{borderColor:`${u.warning}30`}],children:[(0,s.jsxs)(d.default,{style:c.StyleSheet.absoluteFill,width:"100%",height:"100%",pointerEvents:"none",children:[(0,s.jsx)(d.Defs,{children:(0,s.jsxs)(d.LinearGradient,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,s.jsx)(d.Stop,{offset:"0%",stopColor:u.warning,stopOpacity:.094}),(0,s.jsx)(d.Stop,{offset:"100%",stopColor:u.warning,stopOpacity:.031})]})}),(0,s.jsx)(d.Rect,{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#payout-jackpot-grad)"})]}),(0,s.jsx)(d.default,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:(0,s.jsx)(d.Path,{d:Vo,fill:u.warning})}),(0,s.jsx)(c.Text,{style:[Zo.jackpotText,{color:u.warning}],children:m.progressive?m.amount>0?`Progressive Jackpot: ${ht(m.amount)}${m.limit>0?` (up to ${ht(m.limit)})`:""} for a perfect pick!`:m.limit>0?`Progressive Jackpot — up to ${ht(m.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${ht(m.amount)} for a perfect pick!`})]}),(0,s.jsx)(c.View,{style:[Zo.circleGrid,{gap:g?8:6}],children:Array.from({length:t+1},(e,r)=>{const i=a.includes(r),l=h[r]??0,c=r===t,d=m.enabled&&c,f=d?u.warning:i?p:y,w=r===n,x=d?m.progressive?`${r} correct wins progressive jackpot${m.amount>0?` (currently ${ht(m.amount)})`:""}${m.limit>0?` up to ${ht(m.limit)}`:""} plus ${ht(l)}`:`${r} correct wins jackpot ${ht(m.amount)} plus ${ht(l)}`:i?`${r} correct wins ${ht(l)}`:l>0?`${r} correct pays ${ht(l)} but does not win`:`${r} correct — no payout`,k=o?`${x}. Tap to select`:x;return(0,s.jsx)(Uo,{index:r,size:b,wide:g,isWinning:i,isJackpot:d,isSelected:w,bgColor:f,borderFallback:u.border,warning:u.warning,primary:u.primary,textMuted:u.textMuted,payout:l,onPress:o?()=>o(r):void 0,accessibilityLabel:k},r)})}),(0,s.jsxs)(c.Text,{style:[Zo.expectedText,{color:u.textMuted}],children:["Your expected: ",(0,s.jsxs)(c.Text,{style:Zo.expectedBold,children:[n," correct"]})]})]})},exports.PerfectPickPage=qi,exports.PerfectPickPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Xi.header,children:[(0,s.jsx)(c.Text,{style:[Xi.eyebrow,{color:i.primary,fontFamily:r}],children:"All or nothing"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PickYourDividendPage=Ei,exports.PickYourDividendPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors;return(0,s.jsxs)(c.View,{style:ji.titleWrap,children:[(0,s.jsx)(c.Text,{style:[ji.eyebrow,ji.eyebrowLeft,{color:i.primary,fontFamily:r}],children:"The dividend is set"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PlaceEntryProvider=function({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,getUserBalance:i,children:l,theme:c,colorScheme:d,demoGames:h,demoPropositions:u,demoEntries:f,demoMaxPayouts:g,gameCategory:p,jurisdiction:y,initialGameId:m,filterSport:b,initialSport:w,initialEventId:x,initialEventLabel:k,sportBaseKey:S,disableQuickPick:C=!1,renderTeamLogo:B,onEntryPlaced:z,onBeforeSubmit:F,onCancel:v,onShare:W,onRecharge:T,onClearEventFilter:A,screenSize:L="desktop",howToPlayMarkdown:R,sportDisplayNames:M,categoryDisplayNames:D}){const P=ee(c,d),H=ce(P),O=se(P),I=!(!h||!u),E=(0,a.useMemo)(()=>new Jn({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),[j,N]=(0,a.useState)(0),G=(0,a.useRef)(0),[Y,V]=(0,a.useState)(0),[U,Z]=(0,a.useState)([]),[K,q]=(0,a.useState)({}),[X,Q]=(0,a.useState)({}),[J,$]=(0,a.useState)(void 0),[_,te]=(0,a.useState)(null),[ne,oe]=(0,a.useState)(void 0),re=a.default.useCallback(async()=>{if(i)try{const e=await i();"number"==typeof e&&Number.isFinite(e)&&oe(e)}catch(e){}},[i]);(0,a.useEffect)(()=>{i?re():oe(void 0)},[i,re]);const ie=(0,a.useRef)(null),[le,ae]=(0,a.useState)(null),[de,he]=(0,a.useState)(w??null),[ue,fe]=(0,a.useState)(x??null);(0,a.useEffect)(()=>{w&&he(w)},[w]),(0,a.useEffect)(()=>{fe(x??null)},[x]);const[ge,pe]=(0,a.useState)(x),ye=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!x)return pe(void 0),void(ye.current=!1);ye.current||pe(x)},[x]);const me=p??le??void 0,be=b??w??void 0,we=vt(de??be,S),xe=vt(be,S)??be,ke=de??void 0,{games:Se,howToPlayMarkdown:Ce,loading:Be,error:ze}=$n(E,{category:me,jurisdiction:y,sport:we},{skip:I}),{propositions:Fe,loading:ve,error:We}=_n(E,{category:me,sport:xe,event_id:ge},{skip:I}),{sports:Te,loading:Ae}=eo(E,{skip:I}),{createEntry:Le,loading:Re,error:Me}=oo(E),{preview:De}=io(E),Pe=(0,a.useMemo)(()=>Pt((I?h:Se)??[],{category:me,sport:we??ke,sportBaseKey:S}),[I,h,Se,me,we,ke,S]),He=R??Ce??null,{maxPayouts:Oe,refetchGame:Ie}=no(E,Pe??[],{skip:I,betAmount:20}),Ee=I?g??ao:Oe,je=I?u:Fe,Ne=b?(je??[]).filter(e=>e.sport===b):je,Ge=(0,a.useMemo)(()=>wt(Ne??[]),[Ne]),Ye=(0,a.useMemo)(()=>me||(1===Ge.length?Ge[0]:void 0),[me,Ge]),Ve=(0,a.useMemo)(()=>{const e=Ne??[];return Ye?Lt(e,{category:Ye,sportBaseKey:S}):e},[Ne,Ye,S]),Ue=(0,a.useMemo)(()=>ke?Lt(Ve,{sport:ke,sportBaseKey:S}):Ve,[Ve,ke,S]),Ze=(0,a.useMemo)(()=>({category:Ye,sport:ke,sportBaseKey:S}),[Ye,ke,S]),Ke=(0,a.useMemo)(()=>{const e=(Pe??[]).filter(e=>e.active);if(!Ye&&Ge.length>1)return[];const t=Ye?Pt(e,Ze):e;return Ye||ke?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Dt(e,t,n)):e}(t,Ue,Ze):t},[Pe,Ue,Ze,Ye,ke,Ge.length]),{step:qe,selectedGame:Xe,selections:Qe,placedEntry:Je,setGameOnly:$e,clearSelectedGame:_e,goToSportSelection:et,goToConfirmation:tt,goToSuccess:nt,goBack:ot,reset:rt,toggleSelection:it}=ro(m),lt=a.default.useCallback(()=>{ye.current=!0,pe(void 0),rt(),A?.()},[rt,A]),at=!!ge,ct=at?k:void 0,st=!I&&(Xe?Be||ve||Ae:Be),dt=I?null:Xe?ze||We:ze,ht=(0,a.useMemo)(()=>Xe?Ht(Ue,Xe,S):Ue,[Xe,Ue,S]),ut=(0,a.useMemo)(()=>Xe?ht:Ve,[Xe,ht,Ve]),ft=(0,a.useMemo)(()=>Lt(Xe?ht:Ve,{category:Ye}),[Xe,ht,Ve,Ye]),pt=(0,a.useMemo)(()=>{const e=new Set(ft.map(e=>e.sport).filter(Boolean));return Te.filter(t=>e.has(t.key))},[Te,ft]),mt=(0,a.useMemo)(()=>Lt(ht,{category:Ye,sport:de}),[ht,Ye,de]),bt=(0,a.useMemo)(()=>{if(!Xe||!$t(Xe))return[];const{min:e}=St(Xe,J),t=J??e;return en(mt).filter(e=>e.propositionCount>=t)},[Xe,J,mt]),xt=(0,a.useMemo)(()=>$t(Xe)?ln(mt,ue):mt,[Xe,mt,ue]),Ct=Object.keys(Qe).map(Number),Bt=Ct.length,Tt=(0,a.useMemo)(()=>mt.filter(e=>Ct.includes(e.id)),[mt,Ct]);(0,a.useEffect)(()=>{p||le||1===Ge.length&&ae(Ge[0])},[p,le,Ge]),(0,a.useEffect)(()=>{if(!Xe)return;const e=ht,t=new Set(e.map(yt));let n=le;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==le&&ae(n));const o=n?e.filter(e=>yt(e)===n):e,r=new Set(function(e){const t=new Set;for(const n of e){const o=gt(n,e);"Other"!==o&&t.add(o)}return[...t]}(o)),i=Xe.allowed_sports;he(e=>e&&r.has(e)?e:1===i?.length&&r.has(i[0])?i[0]:i&&i.length>1?e&&i.includes(e)&&r.has(e)?e:null:1===r.size?Array.from(r)[0]:null)},[Xe?.id,ht,le]),(0,a.useEffect)(()=>{Xe&&Ye&&(Rt(Xe,Ye)||_e())},[Xe,Ye,_e]),(0,a.useEffect)(()=>{Xe&&(Dt(Xe,Ue,{category:Ye,sport:de,sportBaseKey:S})||_e())},[Xe,Ye,de,S,Ue,_e]),(0,a.useEffect)(()=>{if(Xe){if(V(0),ie.current){const{count:e}=ie.current;return ie.current=null,$(e),void N(e)}if(Xe.allowed_propositions&&Xe.allowed_propositions.length>0){const e=J;null!=e&&Xe.allowed_propositions.includes(e)?N(e):($(void 0),N(0))}else $(void 0),N(Xe.num_propositions||Xe.max_propositions||0)}},[Xe]);const At=(e,t,n)=>{const o=(Ee[e]?.top_payouts??[]).find(e=>e.proposition_count===t);if(!o)return 0;const r=o.bet_amount&&o.bet_amount>0?o.bet_amount:20;return r<=0?0:o.net_payout/r*n};(0,a.useEffect)(()=>{if("sport"!==qe&&"confirm"!==qe||!Xe||I)return;const e=$t(Xe)&&ue?xt.length:Number.MAX_SAFE_INTEGER;let t;if(Xe.allowed_propositions&&Xe.allowed_propositions.length>0){const n=Xe.allowed_propositions?[...Xe.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void Q({});const o=J??n[0],r=n.filter(e=>e>o);if(0===r.length)return void Q({});t=[o,...r]}else{const{min:n,max:o}=St(Xe),r=Math.min(o,e);if(n<=0||r<=n)return void Q({});t=Array.from({length:r-n+1},(e,t)=>n+t)}const n={};for(const o of t)n[o]=At(Xe.id,o,20);Q(n)},[qe,Xe,J,ue,xt.length,I,Ee]),(0,a.useEffect)(()=>{if("confirm"!==qe||!Xe)return;const e=Ct.length;if(0===e)return;let t=!1;const n={};for(let r=0;r<=e;r++)n[r]=At(Xe.id,r,Y);q(n),e!==G.current?(G.current=e,N(e)):(j>e||j<=0&&e>0)&&N(e);const o=Y>0?Y:Math.max(Xe.min_bet??20,.01);return(async()=>{try{const n=await De(Xe.id,{actual:j,predicted:j,total:e,bet_amount:o});if(t)return;Z(n.winning_counts)}catch{t||Z([])}})(),()=>{t=!0}},[qe,Xe,Ct.length,j,Y,De,Ee]);const Mt=(0,a.useMemo)(()=>{return t=_,(e=Xe)&&null!=t?e.permitted_rules?.find(e=>e.id===t)??null:null;var e,t},[Xe,_]),Ot=!$t(Xe)||an(Tt,ue),It=Xe?St(Xe,void 0,Mt):null,Et=!(!Xe||!Ot)&&(Xe.allowed_propositions&&Xe.allowed_propositions.length>0?null!=J&&Bt===J&&kt(Bt,It?.min,It?.max):kt(Bt,It?.min,It?.max)),jt=Xe?.min_bet??0,Nt=Math.max(jt,.01),Gt=null==ne||Y<=ne,Yt=!Re&&Y>=Nt&&Et&&Gt,Vt=e=>{$(e),N(e);for(const t of Object.keys(Qe))it(Number(t),Qe[Number(t)])},Ut=e=>{$(e),N(e)},Zt=e=>{fe($t(e)?x??null:null),$e(e)},Kt=e=>{if(e!==ue){for(const e of Object.keys(Qe)){const t=Number(e);it(t,Qe[t])}fe(e)}},qt=(e,t)=>{ie.current={count:t},$e(e),Ie(e.id);const n=e.allowed_sports??[];let o=null;de&&n.some(e=>Wt(de,e,S))?o=de:1===n.length&&(o=n[0]),he(o);for(const a of Object.keys(Qe)){const e=Number(a);it(e,Qe[e])}let r=Lt(Ht(Ne??[],e,S),{category:Ye,sport:o,sportBaseKey:S});const i=Math.max(0,Math.min(t,r.length)),l=[...r].sort(()=>Math.random()-.5).slice(0,i);for(const a of l)it(a.id,Math.random()<.5?"yes":"no");tt()},Xt=async()=>{if(Xe&&Et){if(I){const e={id:Math.floor(1e4*Math.random()),game_id:Xe.id,user_id:r,proposition_ids:Ct,selections:Qe,pending:!0,expected_correct:j,bet_amount:Y};return z?.(e),nt(e),void re()}try{F&&await F(Y);const e=await Le({game_id:Xe.id,user_id:r,proposition_ids:Ct,selections:Qe,stake:Y,rule_id:Mt?.id??null});z?.(e),nt(e),re()}catch(e){}}},Qt=(0,a.useCallback)(e=>M?.[e]??pt.find(t=>t.key===e)?.label??zt(e,void 0,S),[M,pt,S]),Jt=(0,a.useCallback)(e=>Ft(e,D),[D]),_t=(0,a.useMemo)(()=>({theme:P,bodyFont:H,headingFont:O,games:Ke,propositions:xt,propositionsForCategoryPicker:ut,propositionsForSportPicker:ft,sportSummaries:pt,loading:st,error:dt,step:qe,selectedGame:Xe,selections:Qe,placedEntry:Je,selectedPropositionIds:Ct,selectedPropositions:Tt,selectionValid:Et,selectedRuleId:_,setSelectedRuleId:te,selectedRule:Mt,answeredCount:Bt,betAmount:Y,setBetAmount:V,expectedCorrect:j,setExpectedCorrect:N,selectedPropositionCount:J,handlePropositionCountChange:Vt,upgradePropositionCount:Ut,winningCounts:U,payouts:K,overloadPayouts:X,submitting:Re,submitError:Me,canSubmit:Yt,gamePrice:jt,userBalance:ne,hasSufficientBalance:Gt,refreshUserBalance:re,handleSubmit:Xt,selectGame:Zt,goToSportSelection:et,goToConfirmation:tt,goBack:ot,reset:rt,clearSelectedGame:_e,toggleSelection:it,quickPickGame:qt,selectedCategory:le,setSelectedCategory:ae,selectedSport:de,setSelectedSport:he,selectedEventId:ue,sameGameMultiEvents:bt,selectSameGameMultiEvent:Kt,apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,disableQuickPick:C,renderTeamLogo:B,filterSport:b,initialSport:w,initialEventId:x,sportBaseKey:S,gameCategory:p,eventFilterActive:at,eventFilterLabel:ct,clearEventFilter:lt,screenSize:L,displaySportName:Qt,displayCategoryName:Jt,maxPayouts:Ee??{},howToPlayMarkdown:He,onEntryPlaced:z,onCancel:v,onShare:W,onRecharge:T,demoEntries:f,demoGames:h,demoPropositions:u}),[P,H,O,Ke,xt,ut,ft,pt,st,dt,qe,Xe,Qe,Je,Ct,Tt,Et,Bt,Y,j,J,_,Mt,U,K,X,Re,Me,Yt,jt,e,t,r,ne,n,o,C,B,b,w,x,S,p,L,at,ct,lt,le,de,ue,bt,Ee,He,z,v,W,T,A,f,h,u,Vt,Qt,Jt]);return(0,s.jsx)(lo.Provider,{value:_t,children:l})},exports.QuickPickButton=so,exports.RuleSetupPage=zi,exports.RuleSetupPageActions=function({onContinue:e,canContinue:t,continueLabel:n="Continue"}){const{theme:o,screenSize:r}=co(),i=o.colors;return e&&"mobile"!==r?(0,s.jsx)(c.View,{style:Fi.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,disabled:!t,accessibilityRole:"button",accessibilityState:{disabled:!t},style:[Fi.smallBtn,{backgroundColor:i.buttonPrimary,opacity:t?1:.45}],children:(0,s.jsx)(c.Text,{style:[Fi.smallBtnText,{color:i.buttonPrimaryText}],children:n})})}):null},exports.RuleSetupPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o,selectedPropositionCount:r}=co(),i=se(n),l=n.colors,a=An(o,r),{width:d}=(0,c.useWindowDimensions)(),h=d<640;return(0,s.jsxs)(c.View,{style:[Fi.header,h&&Fi.headerCompact],children:[(0,s.jsx)(c.Text,{accessibilityRole:"header",style:[Fi.sectionTitle,h&&Fi.sectionTitleCompact,{color:l.primary,fontFamily:i}],children:a?.title??"About this game"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?`${o.game_name}${a?.subtitle?` · ${a.subtitle}`:""}`:void 0})]})},exports.SafetyNetPage=Zi,exports.SafetyNetPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=co(),r=se(n),i=n.colors,{width:l}=(0,c.useWindowDimensions)(),a=l<640;return(0,s.jsxs)(c.View,{style:[Ki.header,a&&Ki.headerCompact],children:[(0,s.jsx)(c.Text,{style:[Ki.sectionTitle,a&&Ki.sectionTitleCompact,{color:i.primary,fontFamily:r}],children:"Choose your safety net"}),(0,s.jsx)(or,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.SelectionReview=function({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:r,theme:i,colorScheme:l,hideActions:h=!1,renderTeamLogo:u,allowAnswerToggle:f=!0,gameName:g,potentialPayout:p,defaultExpanded:y=!1,addMorePicks:m}){const b=ee(i,l),w=b.colors,x=D(b),k=se(b),S=F(b),C=w.textAlt??w.text,{width:B}=(0,c.useWindowDimensions)(),z=B>=640,v=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(b),[W,T]=(0,a.useState)(null),[A,L]=(0,a.useState)(y),R=e.filter(e=>e.id in t),M=R.length,O=jt(R),I=w.matchupHeader??P(b),E=H(b),j=z?16:12;return(0,s.jsxs)(c.View,{style:{gap:z?24:16,paddingBottom:64},children:[(0,s.jsxs)(c.View,{style:[No.section,{padding:z?24:16,backgroundColor:x,borderColor:w.border},v],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>L(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:A},style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:12},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:A?"180deg":"0deg"}]},children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:w.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:z?18:16,fontWeight:"600",color:S,fontFamily:k},children:"Your Selections"}),(0,s.jsx)(c.View,{style:{backgroundColor:w.primary,paddingHorizontal:6,paddingVertical:2,borderRadius:999},children:(0,s.jsx)(c.Text,{style:{color:w.primaryText,fontSize:12,fontWeight:"600"},children:M})})]}),g&&(0,s.jsx)(c.Text,{numberOfLines:1,style:{color:w.textMuted,fontSize:14,marginTop:2},children:g})]})]}),null!=p&&p>0&&(0,s.jsxs)(c.View,{style:{alignItems:"flex-end",flexShrink:0},children:[(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontSize:10,textTransform:"uppercase",letterSpacing:.25},children:"Potential Payout"}),(0,s.jsx)(c.Text,{style:{color:S,fontSize:14,fontWeight:"700"},children:ht(p)})]})]}),m&&m.remaining>0&&(0,s.jsxs)(c.View,{style:{marginTop:j,padding:12,borderRadius:8,borderWidth:1,borderColor:`${w.primary}30`,backgroundColor:`${w.primary}08`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{flex:1,color:w.textMuted,fontSize:12},children:[1===m.remaining?"Add ":"Add up to ",(0,s.jsxs)(c.Text,{style:{color:w.primary,fontWeight:"700"},children:[m.remaining," more pick",1!==m.remaining?"s":""]}),null!=m.potentialPayout&&m.potentialPayout>0&&(0,s.jsxs)(c.Text,{children:[" ","to win up to"," ",(0,s.jsx)(c.Text,{style:{color:S,fontWeight:"700"},children:ht(m.potentialPayout)})," ","with ",m.max," picks"]})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>m.onAdd(),style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:w.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{color:w.buttonPrimaryText,fontSize:12,fontWeight:"600"},children:"Add picks"})})]}),A&&(0===R.length?(0,s.jsx)(c.View,{style:[No.emptyState,{marginTop:j}],children:(0,s.jsx)(c.Text,{style:{color:w.textMuted},children:"No selections made yet"})}):(0,s.jsx)(c.View,{style:{gap:z?12:8,marginTop:j},children:O.map(e=>(0,s.jsxs)(c.View,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:w.border},children:[e.key?(0,s.jsxs)(c.View,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:I},children:[(0,s.jsx)(Mo,{matchup:e.key,renderTeamLogo:u,altText:C,mutedColor:w.textAltMuted??w.textMuted??C}),e.props[0].commence_time?(0,s.jsx)(c.Text,{style:[No.propTime,{color:w.textAltMuted??w.textMuted}],children:ut(e.props[0].commence_time)}):null]}):null,e.props.map((o,i)=>{const l=t[o.id],a="yes"===l,h="no"===l;return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:z?12:8,paddingHorizontal:12,paddingVertical:z?12:10,backgroundColor:E,borderTopWidth:e.key||i>0?1:0,borderTopColor:w.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[To(o,u,e.key),(0,s.jsx)(c.Text,{style:{flex:1,minWidth:0,color:C,fontSize:14,lineHeight:19},children:o.description})]}),(0,s.jsxs)(c.View,{style:No.rightControls,children:[f?(0,s.jsx)(Io,{theme:b,value:a?"yes":h?"no":null,onYes:()=>n(o.id,"yes"),onNo:()=>n(o.id,"no")}):l&&(0,s.jsx)(Eo,{theme:b,value:"yes"===l?"yes":"no"}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{n(o.id,t[o.id]),r()},accessibilityLabel:"Remove selection",onMouseEnter:()=>T(o.id),onMouseLeave:()=>T(e=>e===o.id?null:e),style:[No.removeButton,{backgroundColor:"transparent"}],children:(0,s.jsx)(d.default,{width:12,height:12,viewBox:"0 0 24 24",children:(0,s.jsx)(d.Path,{d:"M6 18L18 6M6 6l12 12",stroke:W===o.id?w.error:w.textAltMuted??w.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},o.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),(0,s.jsx)(c.View,{style:[No.section,{padding:z?24:16,backgroundColor:x,borderColor:w.border},v],children:(0,s.jsxs)(c.View,{style:No.summaryRow,children:[(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontSize:14},children:"Total Selections"}),(0,s.jsx)(c.Text,{style:{color:w.text,fontSize:14,fontWeight:"600"},children:R.length})]})}),!h&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:w.border,backgroundColor:w.background,marginHorizontal:z?-24:-16,paddingHorizontal:z?24:16,paddingVertical:z?16:12},children:[(0,s.jsx)(jo,{theme:b,variant:"secondary",onPress:r,children:"Back"}),(0,s.jsx)(jo,{theme:b,variant:"primary",disabled:0===R.length,onPress:o,children:"Place bet"})]})]})},exports.SelectionsPage=function({onNext:e,onBack:t,hideTitle:n,hideActions:o,defaultView:r="list",view:i,onViewChange:l,hideViewSwitch:d,onSwipeDragStateChange:h}){const u=co(),{selectedRule:f}=u,{theme:g,selectedGame:p,propositions:y,propositionsForSportPicker:m,selections:b,toggleSelection:w,loading:x,error:k,disableQuickPick:S,renderTeamLogo:C,filterSport:B,initialSport:z,gameCategory:F,selectedPropositionCount:v,handlePropositionCountChange:W,goToConfirmation:T,goBack:A,selectedCategory:L,setSelectedCategory:R,selectedSport:M,setSelectedSport:D,selectedEventId:P,propositionsForCategoryPicker:H,answeredCount:O}=u,[I,E]=a.default.useState(r),j=i??I,N=a.default.useCallback(e=>{void 0===i&&E(e),l?.(e)},[i,l]);a.default.useEffect(()=>{p||(u.goToSportSelection(),t?.())},[p,u,t]);const G=a.default.useMemo(()=>{if(!p)return null;const{min:e,max:t}=St(p,v??void 0,f);if(e>0&&e===t)return e;const n=kr(p);return null!=v&&v>0&&("game_set"===n||"pick_your_dividend"===n||"safety_net"===n||Sr(p))?v:null},[p,v]),Y=a.default.useRef(O);a.default.useEffect(()=>{const t=Y.current;Y.current=O,null!=G&&t<G&&O===G&&(T(),e?.())},[O,G]);const V=a.default.useMemo(()=>wt(H??[]),[H]);a.default.useEffect(()=>{p&&1===V.length&&L!==V[0]&&R(V[0])},[p,V,L,R]);const U=a.default.useMemo(()=>{const e=new Set;for(const t of m??[])t.sport&&e.add(t.sport);return Array.from(e)},[m]);if(a.default.useEffect(()=>{p&&(V.length>1&&!L||1===U.length&&M!==U[0]&&D(U[0]))},[p,V,L,U,M,D]),!p)return null;const Z=V.length>1&&!L,K=!Z&&U.length>1&&!M,q=!Z&&!K&&$t(p)&&!P,X=(()=>{if(!$t(p)||!P)return p;const e=Math.min(p.max_propositions??y.length,y.length);return{...p,max_propositions:e,allowed_propositions:p.allowed_propositions?.filter(t=>t<=e)}})(),Q=()=>{A(),t?.()};return(0,s.jsxs)(c.View,{style:oi.container,children:[!n&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(_r,{onBack:o?Q:void 0,onNext:o?e:void 0,hideActions:o})}),!$t(p)&&(0,s.jsx)(_o,{}),(0,s.jsx)(c.View,{style:oi.content,children:Z?(0,s.jsx)(Zr,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>R(e)}):K?(0,s.jsx)(Yr,{hideTitle:!0,hideActions:!0,onSelectSport:e=>D(e)}):q?(0,s.jsx)(Qr,{}):"swipe"===j?(0,s.jsx)(Er,{onBack:Q,onNext:e,viewSwitch:d?void 0:(0,s.jsx)(ti,{view:j,onChange:N}),onDragStateChange:h}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Ho,{game:X,propositions:y,selections:b,onToggleSelection:w,onNext:()=>{T(),e?.()},onBack:Q,loading:x,error:k,theme:g,hideActions:!0,initialSport:B??z,renderTeamLogo:C,disableQuickPick:!0,selectedPropositionCount:v,onPropositionCountChange:W,gameCategory:F,headerExtra:d?void 0:(0,s.jsx)(ti,{view:j,onChange:N})})})}),!o&&!Z&&!K&&!q&&(0,s.jsx)(c.View,{style:{marginTop:24},children:(0,s.jsx)(ei,{onNext:e,onBack:t})})]})},exports.SelectionsPageActions=ei,exports.SelectionsPageTitle=_r,exports.SportPickerPage=Yr,exports.SportPickerPageActions=function({onCancel:e}){const{theme:t,screenSize:n}=co(),o=t.colors;return e&&"mobile"!==n?(0,s.jsx)(c.View,{style:Vr.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Vr.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Vr.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null},exports.SportPickerPageTitle=Gr,exports.SuccessPage=function({onPlayAgain:e,onDone:t,onBack:n,onShare:o,hideTitle:r,hideActions:i}){const l=co(),{theme:d,bodyFont:h,headingFont:u,selectedGame:f,placedEntry:g,betAmount:p,selectedPropositionIds:y,selectedPropositions:m,selections:b,payouts:w,onShare:x}=l,k=d.colors,S=D(d),C=k.textAlt??k.text,{width:B}=(0,c.useWindowDimensions)(),z=B>=640,v={shadowColor:"#000",shadowOpacity:"dark"===d.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},W=g?.proposition_ids?g.proposition_ids.length:y.length,T=w[W]??null,A=a.default.useRef(!1);return a.default.useEffect(()=>{g&&f?A.current=!1:(l.goToSportSelection(),A.current||(A.current=!0,e?e():t?.()))},[g,f,l,e,t]),g?(0,s.jsxs)(c.View,{style:ui.container,children:[!r&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(hi,{onBack:n,hideActions:i})}),(0,s.jsxs)(c.View,{style:[ui.content,{gap:z?16:12}],children:[(0,s.jsxs)(c.View,{style:[ui.summaryCard,z&&ui.summaryCardWide,{backgroundColor:S,borderColor:k.border},v],children:[(0,s.jsxs)(c.View,{style:ui.summaryHeader,children:[(()=>{const e=f?f.allowed_propositions&&f.allowed_propositions.length>0&&f.game_name.replace(/\s+\d+\s*$/,"").trim()||f.game_name:"Entry summary";return f?(0,s.jsx)(c.View,{style:{flex:1,minWidth:0},children:(0,s.jsx)(Ko,{iconUrl:pe(f),gameName:e,height:18,chipColor:k.primary,textColor:k.text,iconColor:k.primaryText,accentColor:d.brand?.accent})}):(0,s.jsx)(c.Text,{numberOfLines:1,style:[ui.summaryHeading,z&&ui.summaryHeadingWide,{color:F(d),fontFamily:u,flex:1}],children:e})})(),(0,s.jsx)(c.View,{style:{backgroundColor:`${k.primary}15`,borderRadius:999,paddingHorizontal:8,paddingVertical:2,flexShrink:0},children:(0,s.jsxs)(c.Text,{style:{color:k.primary,fontSize:12,fontWeight:"600",fontFamily:h},children:[W," pick",1!==W?"s":""]})})]}),(0,s.jsxs)(c.View,{style:ui.statsGrid,children:[(0,s.jsxs)(c.View,{style:[ui.statCell,z&&ui.statCellWide],children:[(0,s.jsx)(c.Text,{style:[ui.statLabel,{color:k.textMuted,fontFamily:h}],children:"Selections"}),(0,s.jsx)(c.Text,{style:[ui.statValue,{color:C,fontFamily:h}],children:W})]}),p>0&&(0,s.jsxs)(c.View,{style:[ui.statCell,z&&ui.statCellWide],children:[(0,s.jsx)(c.Text,{style:[ui.statLabel,{color:k.textMuted,fontFamily:h}],children:"Wager"}),(0,s.jsx)(c.Text,{style:[ui.statValue,{color:C,fontFamily:h}],children:ht(p)})]}),null!=T&&T>0&&(0,s.jsxs)(c.View,{style:[ui.statCell,z&&ui.statCellWide],children:[(0,s.jsx)(c.Text,{style:[ui.statLabel,{color:k.textMuted,fontFamily:h}],children:"Potential win"}),(0,s.jsx)(c.Text,{style:[ui.statValue,{color:k.heading??k.text,fontWeight:"700",fontFamily:h}],children:ht(T)})]})]})]}),m.length>0&&(0,s.jsxs)(c.View,{style:[ui.summaryCard,z&&ui.summaryCardWide,{backgroundColor:S,borderColor:k.border},v],children:[(0,s.jsx)(c.Text,{style:[ui.summaryHeading,z&&ui.summaryHeadingWide,{color:F(d),fontFamily:u,marginBottom:8}],children:"Your picks"}),(0,s.jsx)(c.View,{style:ui.pickList,children:m.map((e,t)=>{const n=b?.[e.id],o="yes"===n;return(0,s.jsxs)(c.View,{style:[ui.pickRow,{backgroundColor:k.backgroundAlt}],children:[(0,s.jsx)(c.View,{style:{width:20,height:20,borderRadius:10,backgroundColor:k.primary,alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,s.jsx)(c.Text,{style:{color:k.primaryText,fontSize:10,fontWeight:"700",fontFamily:h},children:t+1})}),(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(c.Text,{numberOfLines:1,style:{color:C,fontSize:z?14:12,fontWeight:"500",fontFamily:h},children:[mt(e)?null:(0,s.jsxs)(s.Fragment,{children:[e.home_team," ",(0,s.jsx)(c.Text,{style:{color:k.textMuted},children:"vs"})," "]}),e.away_team]}),(0,s.jsx)(c.Text,{numberOfLines:1,style:{color:k.textMuted,fontSize:11,fontFamily:h},children:e.description})]}),null!=n&&(0,s.jsx)(di,{theme:d,value:o?"yes":"no"})]},e.id)})})]})]})]}):null},exports.SuccessPageActions=function({onPlayAgain:e,onDone:t,onShare:n}){const{theme:o,reset:r,placedEntry:i,selectedGame:l,selectedPropositions:a,selections:d,betAmount:h}=co();return o.colors,(0,s.jsxs)(c.View,{style:ui.footer,children:[(0,s.jsx)(Fe,{theme:o,variant:"secondary",onPress:()=>{r(),e?.()},children:"Place Another"}),t&&(0,s.jsx)(Fe,{theme:o,variant:"primary",onPress:t,children:"Done"})]})},exports.SuccessPageTitle=hi,exports.SwipeCard=Or,exports.SwipeCardFace=Ir,exports.SwipeDeck=Er,exports.VISIBLE_DEPTH=3,exports.YesNoCategoryLabel=Ue,exports.availableGameTierTabs=un,exports.contrastTextColour=function(e,t="#ffffff",n="#1a1a1a"){if(!e)return n;const o=function(e){const t=e.trim().toLowerCase(),n=t.match(/^#([0-9a-f]{3,8})$/);if(n){let e=n[1];return 3!==e.length&&4!==e.length||(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}const o=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return o?[Number(o[1]),Number(o[2]),Number(o[3])]:null}(e);if(!o)return n;const[r,i,l]=o.map(e=>{const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return.2126*r+.7152*i+.0722*l>.4?n:t},exports.darkTheme=G,exports.defaultGameTierId=fn,exports.defaultTheme=j,exports.defaultThemeSet=q,exports.filterGamesByTierLevel=hn,exports.filterPropositionsToEvent=ln,exports.formatCurrency=ht,exports.formatDate=ut,exports.formatSameGameMultiEventLabel=Qt,exports.fullStackPrize=gr,exports.gameNeedsRuleSetup=Ln,exports.gameSetPrize=ar,exports.getConfirmBoostCopy=Br,exports.getGameFlow=kr,exports.getGameSetBetConfig=cr,exports.getJackpotInfo=Ct,exports.getLadderConfig=pr,exports.getMirrorConfig=xr,exports.getPickYourDividendConfig=In,exports.getPropositionEventId=_t,exports.getRuleSetupConfig=An,exports.getSafetyNetConfig=Fn,exports.getSafetyNetPricing=mn,exports.getSportDisplayName=Bt,exports.getTheme=function(e){return{default:j,green:N,"green-light":V,dark:G,gold:Y,"gold-light":U,yesno:K,"yesno-light":Z}[e]||j},exports.getThemeSet=function(e){return{default:q,green:X,gold:Q,yesno:J}[e]||q},exports.goldLightTheme=U,exports.goldTheme=Y,exports.goldThemeSet=Q,exports.greenLightTheme=V,exports.greenTheme=N,exports.greenThemeSet=X,exports.groupPropositionsBySport=ft,exports.groupSameGameMultiEvents=en,exports.isFixedCardExactGame=Sr,exports.isGameSetBetGame=lr,exports.isLadderGame=hr,exports.isMirrorGame=br,exports.isOpenExactMultiGame=Cr,exports.isPickYourDividendGame=Dn,exports.isSafetyNetGame=yn,exports.isSameGameMultiGame=$t,exports.isSelectableSameGameMultiProposition=rn,exports.isThemeSet=E,exports.isValidSelectionCount=kt,exports.ladderCollectAt=function(e,t,n){return ur(e.tiers50.reduce((e,[n,o])=>n<=t?e+o:e,0),n)},exports.ladderTiers=fr,exports.mirrorPrize=wr,exports.propositionsBelongToEvent=an,exports.pydLadder=On,exports.pydRung=Hn,exports.resolveCategoryDisplayName=Ft,exports.resolveGameTierLevel=dn,exports.resolvePrice=function(e){return"object"==typeof e&&null!==e?Number(e.amount)||0:Number(e)||0},exports.resolveSportDisplayName=zt,exports.resolveTheme=I,exports.roundDividendAmount=bn,exports.safetyNetCollect=kn,exports.safetyNetTicket=xn,exports.themeAccent=L,exports.themeBodyFont=ce,exports.themeHeading=F,exports.themeHeadingFont=se,exports.themeLabel=v,exports.themeSets=_,exports.themeTextAlt=R,exports.themeTextAltMuted=M,exports.themeValue=W,exports.themes=$,exports.useCalculatePayout=function(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{calculate:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.calculatePayout(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}},exports.useCreateGameEntry=oo,exports.useEntryPreview=io,exports.useEvaluateRule=function(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{evaluate:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.evaluateRule(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}},exports.useGameEntries=to,exports.useGameMaxPayouts=no,exports.useGames=$n,exports.usePlaceEntry=co,exports.usePlaceEntryFlow=ro,exports.usePropositions=_n,exports.useResolvedTheme=ee,exports.useSports=eo,exports.useSwipeDeck=Wr;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,l=(l,a,c)=>(c=null!=l?e(r(l)):{},((e,r,l,a)=>{if(r&&"object"==typeof r||"function"==typeof r)for(var c,s=o(r),d=0,h=s.length;d<h;d++)c=s[d],i.call(e,c)||void 0===c||t(e,c,{get:(e=>r[e]).bind(null,c),enumerable:!(a=n(r,c))||a.enumerable});return e})(!a&&l&&l.t&&i.call(l,"default")?c:t(c,"default",{value:l,enumerable:!0}),l));let a=require("react");a=l(a,1);let c=require("react-native"),s=require("react/jsx-runtime"),d=require("react-native-svg");d=l(d,1);let h=require("react-dom");var u="#C9CDD2";function f(e){const t=e.trim();if(!t)return null;const n=t.split(/\t+|\s{2,}/).map(e=>e.trim()).filter(Boolean);if(n.length<3)return null;const o=n[n.length-1];return"YES"!==n[n.length-2].toUpperCase()||"NO"!==o.toUpperCase()?null:{question:n.slice(0,-2).join(" ")}}function g(e){return`<table class="props">\n${e.map(e=>{return`<tr><td class="q">${t=e.question,t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}</td><td class="yes">YES</td><td class="no">NO</td></tr>`;var t}).join("\n")}\n</table>`}var p='\n :root {\n --blue: #1F4E79;\n --ink: #1A1A1A;\n --grey: #5A5A5A;\n --green: #166534;\n --red: #991B1B;\n --fill-q: #F9FAFB;\n --fill-yes: #DCFCE7;\n --fill-no: #FEE2E2;\n --rule: #D0D7DE;\n }\n * { box-sizing: border-box; }\n html, body {\n margin: 0;\n padding: 0;\n background: #FFFFFF;\n color: var(--ink);\n font-family: "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;\n font-size: 16px;\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n }\n .page {\n max-width: 720px;\n margin: 0 auto;\n padding: 32px 24px 56px;\n }\n p { margin: 0 0 14px; }\n\n .masthead { text-align: center; margin-bottom: 8px; }\n .kicker {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.16em;\n font-size: 15px;\n margin-bottom: 6px;\n }\n .logo {\n display: block;\n width: 280px;\n max-width: 72%;\n height: auto;\n margin: 0 auto 12px;\n }\n .headline {\n color: var(--ink);\n font-weight: 700;\n font-size: 34px;\n line-height: 1.15;\n margin: 0 0 4px;\n }\n .headline.lg { font-size: 44px; }\n .subhead {\n color: var(--grey);\n font-weight: 700;\n letter-spacing: 0.12em;\n font-size: 15px;\n margin-top: 6px;\n }\n .lede {\n color: var(--blue);\n font-style: italic;\n font-size: 20px;\n text-align: center;\n margin: 18px 0 22px;\n }\n .rule {\n border: 0;\n border-bottom: 2.5px solid var(--blue);\n margin: 14px 0 22px;\n }\n\n h2.cap {\n color: var(--blue);\n font-weight: 700;\n letter-spacing: 0.06em;\n font-size: 16px;\n text-transform: uppercase;\n margin: 30px 0 12px;\n }\n h3.sub {\n color: var(--ink);\n font-weight: 700;\n font-size: 18px;\n margin: 26px 0 10px;\n }\n\n .step {\n font-weight: 700;\n font-size: 18px;\n margin: 22px 0 8px;\n }\n .step .num { color: var(--blue); }\n .step .label { color: var(--ink); }\n\n .props {\n width: 100%;\n border-collapse: collapse;\n margin: 8px 0 18px;\n }\n .props td {\n border: 1px solid #C9CDD2;\n padding: 11px 14px;\n font-size: 15px;\n }\n .props .q { background: var(--fill-q); width: 64%; }\n .props .yes {\n background: var(--fill-yes);\n color: var(--green);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n .props .no {\n background: var(--fill-no);\n color: var(--red);\n font-weight: 700;\n text-align: center;\n letter-spacing: 0.04em;\n }\n\n .divider {\n border: 0;\n border-top: 1px solid var(--rule);\n margin: 48px 0;\n }\n\n .footnote {\n color: var(--grey);\n font-style: italic;\n font-size: 13px;\n border-top: 1px solid var(--rule);\n padding-top: 14px;\n margin-top: 30px;\n }\n\n @media (max-width: 480px) {\n .page { padding: 24px 18px 44px; }\n .headline { font-size: 28px; }\n .headline.lg { font-size: 34px; }\n .lede { font-size: 18px; }\n }\n'.trim();function y(e){let t=e.trim();for(;;){const e=t.match(/^<!--[\s\S]*?-->\s*/);if(!e)break;t=t.slice(e[0].length).trimStart()}return t}var m=/^<(main|section|article|div|style|table|h[1-6]|p|ul|ol|hr)\b/i,b=/<(section|article|main|div\s+class=["']masthead|h[12]\s+class=["'](?:cap|headline)|h3\s+class=["']sub|table\s+class=["']props|hr\s+class=["']divider)\b/i;function w(e){return/^<!DOCTYPE\s+html/i.test(e)||/^<html[\s>]/i.test(e)}function x(e){const t=e.trim();if(!t)return"";if(w(t))return t;const n=function(e){return/class=["']logo["']/i.test(e)?e:/<div class=["']masthead["']>/i.test(e)?e.replace(/(<div class=["']masthead["']>)/i,'$1\n <img class="logo" src="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%202400%20500%22%20width%3D%222400%22%20height%3D%22500%22%3E%0A%20%20%3Ctitle%3EYESNO%20Multi%20Logo%20%E2%80%94%20Horizontal%20Master%3C%2Ftitle%3E%0A%20%20%3Cdesc%3EYESNO%20Multi%20master%20logo.%20Horizontal%20pipe%20lockup%3A%20YESNO%20wordmark%2C%20stacked%20tile%20icon%2C%20pipe%20divider%2C%20Multi%20extension%2C%20TM.%3C%2Fdesc%3E%0A%0A%20%20%3C!--%20YESNO%20wordmark%20(cropped%20from%20canonical%20Multi%20master)%20--%3E%0A%20%20%3Cimage%20href%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAA68AAADMCAYAAACcEJWAAABCUUlEQVR4nO3dd7xcRfnH8U9ooU%2BQDiIdpHcRRbEgII69IQ5SRRC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Nkf%2FJwGPUo7UT3t5IKf4X4M8IiKmnA8rUF6bV6V0Mp76dXHDWC8AD1WXv1df78sp%2Ft0wU62peBUREekQ58McwNKUIvZtwDLAEpS1WQtN83UBYCQwJ%2BUM7pyUvhQTgfHTXcZVl7HAv2dyebrXm3aIiLSD88FRloIsSTk7uxiloJ3654UpXehHzuAyF%2FA65bV5wnSX8ZTuv89Segk8N82fnwH%2BmVMc043b2Ev%2BD9aR9w7mNio3AAAAAElFTkSuQmCC%22%20x%3D%2240%22%20y%3D%22148%22%20width%3D%22940%22%20height%3D%22204%22%2F%3E%0A%0A%20%20%3C!--%20Stacked%20tile%20icon%2C%20vector%20%E2%80%94%20proportional%20to%20wordmark%20height%20--%3E%0A%20%20%3Cg%20transform%3D%22translate(1040%2C%20130)%22%3E%0A%20%20%20%20%3Crect%20x%3D%220%22%20y%3D%220%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2240%22%20y%3D%2240%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%20opacity%3D%220.55%22%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2280%22%20y%3D%2280%22%20width%3D%22180%22%20height%3D%22180%22%20rx%3D%2236%22%20fill%3D%22%230F4C5C%22%20opacity%3D%220.30%22%2F%3E%0A%20%20%3C%2Fg%3E%0A%0A%20%20%3C!--%20Pipe%20divider%20in%20teal-700%20--%3E%0A%20%20%3Crect%20x%3D%221380%22%20y%3D%22150%22%20width%3D%226%22%20height%3D%22200%22%20fill%3D%22%2314687C%22%2F%3E%0A%0A%20%20%3C!--%20Multi%20wordmark%20(cropped%20from%20canonical%20Multi%20master)%20--%3E%0A%20%20%3Cimage%20href%3D%22data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAlkAAADMCAYAAABAzLaeAAAcwklEQVR4nO3de7hdVXnv8W8uJEC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GHAB8mv7%2F7Haamix7qxjf9O56YPWQaxF5hpziD3OKi4B9gEj%2FfmF%2FCfDAS3OKl5cuRmRYcopfzyn%2BEbAX8NdUeylKy6jJMpZT%2FC5w1Ti%2B9cr6e0XM5RRvySkeRTWzdSHDuWijlAeAD1FdMfjanOKVWnclfZVTvD2n%2BGfAnsBBVFcj%2FrBsVWPyGNXPaq9NKl2AiLSP88EBC4FAtf1D2z0KfB64BEg5xXWWYfXjs%2Bewx80pfmfYY8pocj7MobrIZR7wKmAOzU%2BsrKU6ZP024Jb6dnP9zztG4c2PmiwR2SznwwuA%2BcChVL%2Bwty5b0a%2FcQnWg7ueAL%2BcUHytcj0hrOR%2B2AV5GtTRgj%2Fo2G9gJmAU4YDowDZhKdeHVOqqLY56%2BraPaVujB%2BrZ2g%2F99P3A38FOqxuou%2FUyqyRKRAdS%2FqF9N9c54f%2BCVwC4NRN8H3EB1deB1wDdzij9rIFdEZNzUZInIhDgfnkP17vhFwO7ArlSN107A9vVtW6p3yFsBU6jeFf%2Byvq0DHgLupdpw8R7gP4BbqT5auDmnuLap%2ByMiMiz%2FCXQ4TDPqI2KNAAAAAElFTkSuQmCC%22%20x%3D%221430%22%20y%3D%22148%22%20width%3D%22601%22%20height%3D%22204%22%2F%3E%0A%0A%20%20%3C!--%20TM%20superscript%20at%20top-right%20of%20Multi%20--%3E%0A%20%20%3Ctext%20x%3D%222045%22%20y%3D%22190%22%20font-family%3D%22Manrope%2C%20Poppins%2C%20sans-serif%22%20font-size%3D%2256%22%20font-weight%3D%22600%22%20fill%3D%22%230F4C5C%22%3ETM%3C%2Ftext%3E%0A%3C%2Fsvg%3E%0A" alt="YESNO Multi" />'):e}(function(e){return/<table\s+class=["']props["']/i.test(e)?e:function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let o=0;for(;o<t.length;){const e=f(t[o]);if(e){const r=[e];let i=o+1;for(;i<t.length;){const e=f(t[i]);if(!e)break;r.push(e),i+=1}n.push(g(r)),o=i;continue}n.push(t[o]),o+=1}return n.join("\n")}(function(e){const t=/<p(?:\s[^>]*)?>([\s\S]*?)<\/p>/gi;let n,o="",r=0;const i=[],l=()=>{0!==i.length&&(o+=g([...i]),i.length=0)};for(;null!==(n=t.exec(e));){o+=e.slice(r,n.index);const a=n[1].replace(/<br\s*\/?>/gi,"\n").trim().split("\n").map(e=>e.trim()).filter(Boolean).map(e=>f(e));a.length>0&&a.every(e=>null!==e)?i.push(...a):(l(),o+=n[0]),r=t.lastIndex}return l(),o+=e.slice(r),o}(e))}(function(e){const t=y(e),n=t.match(/^<main[^>]*>([\s\S]*)<\/main>$/i);return n?n[1].trim():t}(t)));return`<!DOCTYPE html>\n<html lang="en-AU">\n<head>\n<meta charset="UTF-8">\n<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<title>YES NO - How to Play</title>\n<style>${p}</style>\n</head>\n<body>\n<main class="page">\n${n}\n</main>\n</body>\n</html>`}var k=/^(#{1,3})\s+(.+)$/,S=/^[-*]\s+(.+)$/,C=/^-{3,}$/;function B(e){return e.colors.heading??e.colors.text}function z(e){return e.colors.label??e.colors.text}function F(e){return e.colors.value??e.colors.text}function v(e){return e.colors.productYes??"#00C853"}function W(e){return e.colors.productNo??"#E53935"}function T(e){return e.brand?.accent??e.colors.primary}function A(e,t,n){const o=t?.trim().toLowerCase()===e.trim().toLowerCase();return t&&!o?t:n}function R(e){return e.colors.textAlt??e.colors.text}function L(e){return e.colors.textAltMuted??e.colors.textMuted}function D(e){return e.colors.selectionCard??e.colors.surface??e.colors.backgroundAlt}function M(e){return e.colors.matchupHeader??e.colors.backgroundAlt}function P(e){return e.colors.selectionProp??e.colors.background}function H(e){return{textMuted:e.colors.textMuted,border:e.colors.border,background:e.colors.background,backgroundAlt:e.colors.backgroundAlt,primary:e.colors.primary,selectionCard:D(e)}}function O(e,t="light"){return e?I(e)?"dark"===t?e.dark:e.light:e:E}function I(e){return"light"in e&&"dark"in e&&!("colors"in e)}var E={name:"default",colorScheme:"light",colors:{primary:"#3b82f6",primaryHover:"#2563eb",primaryText:"#ffffff",payoutWinning:"#22c55e",payoutNone:"#e5e7eb",success:"#10b981",successBg:"#dcfce7",successText:"#166534",error:"#ef4444",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f59e0b",warningBg:"#fef3c7",warningText:"#92400e",info:"#3b82f6",infoBg:"#dbeafe",infoText:"#1e3a8a",border:"#d1d5db",borderFocus:"#3b82f6",background:"#ffffff",backgroundAlt:"#f9fafb",selectionCard:"#f9fafb",matchupHeader:"#eff6ff",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",buttonPrimary:"#3b82f6",buttonPrimaryHover:"#2563eb",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"}},j={name:"green",colorScheme:"dark",fonts:{body:"Inter",heading:"Inter",mono:"JetBrainsMono"},colors:{primary:"#00E676",primaryHover:"#00C853",primaryText:"#0a0a0a",payoutWinning:"#34d399",payoutNone:"#3f3f46",success:"#00E676",successBg:"#0d2818",successText:"#a7f3d0",error:"#ff5252",errorBg:"#2d1215",errorText:"#fca5a5",warning:"#ffab40",warningBg:"#2d1f0a",warningText:"#fde68a",info:"#40c4ff",infoBg:"#0a1e2d",infoText:"#bae6fd",border:"#2a2a2e",borderFocus:"#00E676",background:"#121214",backgroundAlt:"#1a1a1e",selectionCard:"#1e1e22",matchupHeader:"#0f2419",selectionProp:"#161618",text:"#e4e4e7",textAlt:"#e4e4e7",textAltMuted:"#a1a1aa",textMuted:"#71717a",heading:"#ffffff",label:"#a1a1aa",value:"#00E676",buttonPrimary:"#00E676",buttonPrimaryHover:"#00C853",buttonPrimaryText:"#0a0a0a",buttonSecondary:"#27272a",buttonSecondaryHover:"#3f3f46",buttonSecondaryText:"#e4e4e7"},brand:{accent:"#DFFF1A"}},N={name:"dark",colorScheme:"dark",colors:{primary:"#60a5fa",primaryHover:"#3b82f6",primaryText:"#ffffff",payoutWinning:"#16a34a",payoutNone:"#374151",success:"#34d399",successBg:"#064e3b",successText:"#d1fae5",error:"#f87171",errorBg:"#7f1d1d",errorText:"#fecaca",warning:"#fbbf24",warningBg:"#78350f",warningText:"#fef3c7",info:"#60a5fa",infoBg:"#1e3a8a",infoText:"#dbeafe",border:"#4b5563",borderFocus:"#60a5fa",background:"#1f2937",backgroundAlt:"#111827",selectionCard:"#374151",matchupHeader:"#1e3a5f",selectionProp:"#1f2937",text:"#f9fafb",textAlt:"#f9fafb",textAltMuted:"#6b7280",textMuted:"#9ca3af",buttonPrimary:"#60a5fa",buttonPrimaryHover:"#3b82f6",buttonPrimaryText:"#ffffff",buttonSecondary:"#374151",buttonSecondaryHover:"#4b5563",buttonSecondaryText:"#f9fafb"}},G={name:"gold",colorScheme:"dark",colors:{primary:"#f59e0b",primaryHover:"#d97706",primaryText:"#000000",payoutWinning:"#facc15",payoutNone:"#1f2937",success:"#eab308",successBg:"#713f12",successText:"#fef08a",error:"#dc2626",errorBg:"#7f1d1d",errorText:"#fecaca",warning:"#f97316",warningBg:"#7c2d12",warningText:"#fed7aa",info:"#f59e0b",infoBg:"#78350f",infoText:"#fef3c7",border:"#d97706",borderFocus:"#f59e0b",background:"#18181b",backgroundAlt:"#09090b",selectionCard:"#27272a",matchupHeader:"#292019",selectionProp:"#1c1917",text:"#fafaf9",textAlt:"#fafaf9",textAltMuted:"#78716c",textMuted:"#a8a29e",buttonPrimary:"#f59e0b",buttonPrimaryHover:"#d97706",buttonPrimaryText:"#000000",buttonSecondary:"#27272a",buttonSecondaryHover:"#3f3f46",buttonSecondaryText:"#fafaf9"}},Y={name:"green-light",colorScheme:"light",fonts:{body:"Inter",heading:"Inter",mono:"JetBrainsMono"},colors:{primary:"#16a34a",primaryHover:"#15803d",primaryText:"#ffffff",payoutWinning:"#22c55e",payoutNone:"#e5e7eb",success:"#16a34a",successBg:"#dcfce7",successText:"#166534",error:"#dc2626",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f59e0b",warningBg:"#fef3c7",warningText:"#92400e",info:"#0ea5e9",infoBg:"#e0f2fe",infoText:"#0c4a6e",border:"#d1d5db",borderFocus:"#16a34a",background:"#ffffff",backgroundAlt:"#f0fdf4",selectionCard:"#f0fdf4",matchupHeader:"#dcfce7",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",heading:"#111827",label:"#374151",value:"#16a34a",buttonPrimary:"#16a34a",buttonPrimaryHover:"#15803d",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"},brand:{accent:"#f97316"}},V={name:"gold-light",colorScheme:"light",colors:{primary:"#d97706",primaryHover:"#b45309",primaryText:"#ffffff",payoutWinning:"#eab308",payoutNone:"#e5e7eb",success:"#eab308",successBg:"#fef9c3",successText:"#713f12",error:"#dc2626",errorBg:"#fee2e2",errorText:"#991b1b",warning:"#f97316",warningBg:"#ffedd5",warningText:"#7c2d12",info:"#d97706",infoBg:"#fef3c7",infoText:"#78350f",border:"#d1d5db",borderFocus:"#d97706",background:"#ffffff",backgroundAlt:"#fffbeb",selectionCard:"#fffbeb",matchupHeader:"#fef3c7",selectionProp:"#ffffff",text:"#111827",textAlt:"#111827",textAltMuted:"#9ca3af",textMuted:"#6b7280",buttonPrimary:"#d97706",buttonPrimaryHover:"#b45309",buttonPrimaryText:"#ffffff",buttonSecondary:"#e5e7eb",buttonSecondaryHover:"#d1d5db",buttonSecondaryText:"#374151"}},U={name:"yesno-light",colorScheme:"light",fonts:{body:"Manrope",heading:"Manrope",mono:"JetBrains Mono"},colors:{primary:"#0F4C5C",primaryHover:"#0C3E4B",primaryText:"#FAFAF7",payoutWinning:"#0F4C5C",payoutNone:"#DDD9D2",success:"#15803D",successBg:"#DCFCE7",successText:"#14532D",error:"#DC2626",errorBg:"#FEE2E2",errorText:"#991B1B",productYes:"#00C853",productNo:"#E53935",warning:"#D97706",warningBg:"#FEF3C7",warningText:"#92400E",info:"#14687C",infoBg:"#E0F0F3",infoText:"#0F4C5C",border:"#DDD9D2",borderFocus:"#0F4C5C",background:"#FAFAF7",backgroundAlt:"#F0EDE6",selectionCard:"#FFFFFF",matchupHeader:"#EAF1F2",selectionProp:"#FFFFFF",text:"#123B45",textAlt:"#123B45",textAltMuted:"#8A9AA0",textMuted:"#647C83",heading:"#0F4C5C",label:"#14687C",value:"#0F4C5C",buttonPrimary:"#0F4C5C",buttonPrimaryHover:"#0C3E4B",buttonPrimaryText:"#DFFF1A",buttonSecondary:"#DDD9D2",buttonSecondaryHover:"#CDC8BF",buttonSecondaryText:"#0F4C5C"},brand:{accent:"#DFFF1A",chip:"#0F4C5C",text:"#0F4C5C",icon:"#FAFAF7"}},Z={name:"yesno",colorScheme:"dark",fonts:{body:"Manrope",heading:"Manrope",mono:"JetBrains Mono"},colors:{primary:"#4FB3C9",primaryHover:"#6FC4D6",primaryText:"#06303A",payoutWinning:"#DFFF1A",payoutNone:"#1E5E6E",success:"#4ADE80",successBg:"#0E3A2A",successText:"#BBF7D0",error:"#FB7185",errorBg:"#3A1418",errorText:"#FECDD3",productYes:"#00C853",productNo:"#E53935",warning:"#FBBF24",warningBg:"#3A2A0A",warningText:"#FDE68A",info:"#4FB3C9",infoBg:"#0C3B47",infoText:"#CFF0F6",border:"#1E5E6E",borderFocus:"#4FB3C9",background:"#0C3B47",backgroundAlt:"#0F4C5C",selectionCard:"#124E5E",matchupHeader:"#103F4C",selectionProp:"#0C3B47",text:"#EAF3F4",textAlt:"#EAF3F4",textAltMuted:"#6E959E",textMuted:"#90B4BC",heading:"#FAFAF7",label:"#9FD9E6",value:"#DFFF1A",buttonPrimary:"#4FB3C9",buttonPrimaryHover:"#6FC4D6",buttonPrimaryText:"#06303A",buttonSecondary:"#124E5E",buttonSecondaryHover:"#186072",buttonSecondaryText:"#EAF3F4"},brand:{accent:"#DFFF1A",chip:"#0F4C5C",text:"#FAFAF7",icon:"#FAFAF7"}},K={light:E,dark:N},q={light:Y,dark:j},X={light:V,dark:G},Q={light:U,dark:Z},J={default:E,green:j,"green-light":Y,dark:N,gold:G,"gold-light":V,yesno:Z,"yesno-light":U},$={default:K,green:q,gold:X,yesno:Q};function _(e,t="light"){return O(e,t)}function ee(e,t){if(!e)return e;const n=Math.max(0,Math.min(1,t));if("transparent"===e)return e;if(e.startsWith("#")){const t=e.slice(1);let o=0,r=0,i=0;if(3===t.length)o=parseInt(t[0]+t[0],16),r=parseInt(t[1]+t[1],16),i=parseInt(t[2]+t[2],16);else if(6===t.length)o=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);else{if(8!==t.length)return e;o=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16)}return`rgba(${o}, ${r}, ${i}, ${n})`}const o=e.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);return o?`rgba(${o[1]}, ${o[2]}, ${o[3]}, ${n})`:e}var te={xs:4,sm:8,md:12,lg:16,xl:24,xxl:32,xxxl:48},ne={xs:4,sm:8,md:12,lg:16,xl:24,pill:999},oe={xs:11,sm:13,md:14,lg:16,xl:18,xxl:22,display:28},re={min:44};function ie(e){const t="dark"===e.colorScheme,n=e.colors;return{space:{...te},radius:{...ne},fontSize:{...oe},touchTarget:{...re},motion:{durationFast:e.motion?.durationFast??160,durationStd:e.motion?.durationStd??220,easing:e.motion?.easing??"cubic-bezier(0.2, 0, 0, 1)"},surface:{background:n.background,surface:n.selectionCard??n.surface??n.backgroundAlt,surfaceElevated:n.surfaceElevated??n.selectionCard??n.surface??n.backgroundAlt,borderSubtle:n.borderSubtle??ee(n.border,t?.6:.5)},isDark:t}}function le(e){return"dark"===e.colorScheme?"0 1px 0 rgba(255,255,255,0.06) inset, 0 24px 60px -28px rgba(0,0,0,0.7)":"0 1px 0 rgba(255,255,255,0.7) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}function ae(e){return e.fonts?.body??"System"}function ce(e){return e.fonts?.heading??e.fonts?.body??"System"}var se="game-icon:",de={perfect_pick:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Perfect Pick.\n Single-glyph identifier ("100%") on a transparent background.\n\n Themable: the digits use currentColor (primary tone) and the\n trailing % uses the icon-accent CSS variable (default #DFFF1A).\n\n Laid out with geometry, not font metrics: two separate single-chunk <text>\n elements at explicit x, each pinned with textLength, and an explicit baseline\n y instead of dominant-baseline. react-native-svg anchors each <tspan> as its\n own chunk and ignores letter-spacing, so the old one-text/two-tspan version\n drifted off centre on native and pushed the % outside the viewBox. Combined\n extent is 8..92, centred on 50, whatever font actually resolves.\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <text x="8" y="62"\n font-family="Manrope, Poppins, sans-serif"\n font-size="34"\n font-weight="800"\n textLength="56"\n lengthAdjust="spacingAndGlyphs"\n fill="currentColor">100</text>\n <text x="66" y="62"\n font-family="Manrope, Poppins, sans-serif"\n font-size="34"\n font-weight="800"\n textLength="26"\n lengthAdjust="spacingAndGlyphs"\n fill="var(--icon-accent, #DFFF1A)">%</text>\n</svg>',head_to_head:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Head to Head.\n Two arrowheads clashing across a citron diamond. Transparent\n background; rendered onto the programmatic Press-to-Play tile.\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- Source design lives in an 80×60 box; centre it in 100×100 by\n shifting (10, 20) so the diamond at (40,30) lands at (50,50). --\x3e\n \x3c!-- Themable: arrowheads use currentColor (primary tone), the\n centre diamond uses the icon-accent CSS variable (default #DFFF1A). --\x3e\n <g transform="translate(10, 20)">\n <path d="M 6 14 L 32 30 L 6 46 L 18 30 Z" fill="currentColor"/>\n <path d="M 74 14 L 48 30 L 74 46 L 62 30 Z" fill="currentColor"/>\n <polygon points="40,20 50,30 40,40 30,30" fill="var(--icon-accent, #DFFF1A)"/>\n </g>\n</svg>',total_points:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Total Points.\n Sigma glyph with italic X superscript. Transparent background;\n rendered onto the programmatic Press-to-Play tile.\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- Sigma + italic X superscript, centred together in the viewBox.\n Sigma 90×98 × 0.55 = 49.5×53.9. Translating to (15, 22) puts the\n sigma centre at (~40, 49) and leaves room for the X glyph at the\n upper right so the combined mark balances around (50, 50). --\x3e\n \x3c!-- Themable: sigma uses currentColor (primary), X superscript\n uses the icon-accent CSS variable (default #DFFF1A). --\x3e\n <g transform="translate(15, 22) scale(0.55)">\n <path d="M 0,0 L 90,0 L 90,15 L 25,15 L 58,49 L 25,83 L 90,83 L 90,98 L 0,98 L 49,49 Z"\n fill="currentColor"/>\n </g>\n <text x="75" y="30"\n font-family="Manrope, Poppins, sans-serif"\n font-size="22"\n font-style="italic"\n font-weight="400"\n text-anchor="middle"\n dominant-baseline="central"\n fill="var(--icon-accent, #DFFF1A)">X</text>\n</svg>',quickpick:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — QuickPick.\n Lightning bolt glyph. Transparent background; rendered onto the\n programmatic Press-to-Play tile.\n\n Themable: bolt fill uses currentColor (primary tone); edge stroke uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(28, 16) scale(0.55)">\n <path d="M 50 8 L 5 80 L 32 80 L 22 132 L 75 50 L 47 50 L 60 8 Z"\n fill="currentColor"\n stroke="var(--icon-accent, #DFFF1A)"\n stroke-width="3.5"\n stroke-linejoin="round"/>\n </g>\n</svg>',safety_net:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Safety Net.\n The brand basketball rim + curved diamond-mesh net catching a citron ball,\n taken from the YESNO Safety Net lockup / app icon. Transparent background;\n rendered on Press-to-Play tiles and brand lockups.\n\n Themable: net uses currentColor (teal on light, white on teal tile);\n ball uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(-2, -6.2) scale(1.3)">\n <line x1="9" y1="18" x2="71" y2="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/>\n <path d="M12 18L13 25.67 M17.6 18L19 25.67 M17.6 18L13 25.67 M23.2 18L25 25.67 M23.2 18L19 25.67 M28.8 18L31 25.67 M28.8 18L25 25.67 M34.4 18L37 25.67 M34.4 18L31 25.67 M40 18L43 25.67 M40 18L37 25.67 M45.6 18L49 25.67 M45.6 18L43 25.67 M51.2 18L55 25.67 M51.2 18L49 25.67 M56.8 18L61 25.67 M56.8 18L55 25.67 M62.4 18L67 25.67 M62.4 18L61 25.67 M68 18L67 25.67 M13 25.67L15.5 33.33 M19 25.67L21.62 33.33 M19 25.67L15.5 33.33 M25 25.67L27.75 33.33 M25 25.67L21.62 33.33 M31 25.67L33.88 33.33 M31 25.67L27.75 33.33 M37 25.67L40 33.33 M37 25.67L33.88 33.33 M43 25.67L46.12 33.33 M43 25.67L40 33.33 M49 25.67L52.25 33.33 M49 25.67L46.12 33.33 M55 25.67L58.38 33.33 M55 25.67L52.25 33.33 M61 25.67L64.5 33.33 M61 25.67L58.38 33.33 M67 25.67L64.5 33.33 M15.5 33.33L19 41 M21.62 33.33L25 41 M21.62 33.33L19 41 M27.75 33.33L31 41 M27.75 33.33L25 41 M33.88 33.33L37 41 M33.88 33.33L31 41 M40 33.33L43 41 M40 33.33L37 41 M46.12 33.33L49 41 M46.12 33.33L43 41 M52.25 33.33L55 41 M52.25 33.33L49 41 M58.38 33.33L61 41 M58.38 33.33L55 41 M64.5 33.33L61 41 M19 41L23 48.67 M25 41L28.67 48.67 M25 41L23 48.67 M31 41L34.33 48.67 M31 41L28.67 48.67 M37 41L40 48.67 M37 41L34.33 48.67 M43 41L45.67 48.67 M43 41L40 48.67 M49 41L51.33 48.67 M49 41L45.67 48.67 M55 41L57 48.67 M55 41L51.33 48.67 M61 41L57 48.67 M23 48.67L25 56.33 M28.67 48.67L31 56.33 M28.67 48.67L25 56.33 M34.33 48.67L37 56.33 M34.33 48.67L31 56.33 M40 48.67L43 56.33 M40 48.67L37 56.33 M45.67 48.67L49 56.33 M45.67 48.67L43 56.33 M51.33 48.67L55 56.33 M51.33 48.67L49 56.33 M57 48.67L55 56.33 M25 56.33L22 64 M31 56.33L31 60.1 M31 56.33L22 64 M37 56.33L40 59.5 M37 56.33L31 60.1 M43 56.33L49 60.1 M43 56.33L40 59.5 M49 56.33L58 64 M49 56.33L49 60.1 M55 56.33L58 64" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M12 18 C12.17 19.28 12.42 23.12 13 25.67 C13.58 28.23 14.5 30.77 15.5 33.33 C16.5 35.88 17.75 38.44 19 41 C20.25 43.56 22 46.12 23 48.67 C24 51.23 25.17 53.77 25 56.33 C24.83 58.88 22.5 62.72 22 64 M68 18 C67.83 19.28 67.58 23.12 67 25.67 C66.42 28.23 65.5 30.77 64.5 33.33 C63.5 35.88 62.25 38.44 61 41 C59.75 43.56 58 46.12 57 48.67 C56 51.23 54.83 53.77 55 56.33 C55.17 58.88 57.5 62.72 58 64" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>\n <ellipse cx="40" cy="64" rx="18" ry="4.5" fill="none" stroke="currentColor" stroke-width="2.2"/>\n <circle cx="40" cy="50" r="8" fill="var(--icon-accent, #DFFF1A)"/>\n </g>\n</svg>',ladder:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Ladder.\n The sub-brand staircase: four offset rungs climbing to the top, from the\n YESNO Ladder lockup ("Climb the ladder. Stack the prizes."). Transparent\n background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: alternating rungs use currentColor (primary tone) and the\n icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <rect x="4" y="76" width="44" height="11" rx="5.5" fill="currentColor"/>\n <rect x="20" y="54" width="44" height="11" rx="5.5" fill="var(--icon-accent, #DFFF1A)"/>\n <rect x="36" y="32" width="44" height="11" rx="5.5" fill="currentColor"/>\n <rect x="52" y="10" width="44" height="11" rx="5.5" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',game_set:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Game Set Bet.\n The sub-brand tennis ball: citron ball with the S-curve seam, from the\n Game Set Bet lockup / app icon ("Game. Set. Bet."). Transparent\n background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: the seam uses currentColor (teal on light, paper on the teal\n app-icon tile); the ball uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <g transform="translate(4, 4) scale(1.15)">\n <circle cx="40" cy="40" r="34" fill="var(--icon-accent, #DFFF1A)"/>\n <path d="M40 8 C12 14 11 40 40 40 C69 40 68 66 40 72" fill="none" stroke="currentColor" stroke-width="4.5" stroke-linecap="round"/>\n </g>\n</svg>',pick_your_dividend:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Ladder.\n Splayed ladder rails and rungs with the citron ball resting at the top —\n the stacked-multi that pays every rung your streak reaches. Transparent\n background; rendered onto the programmatic Press-to-Play tile.\n\n Themable: rails/rungs use currentColor (primary tone); the ball uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <line x1="36" y1="16" x2="27" y2="88" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>\n <line x1="64" y1="16" x2="73" y2="88" stroke="currentColor" stroke-width="5" stroke-linecap="round"/>\n <line x1="33.8" y1="34" x2="66.2" y2="34" stroke="currentColor" stroke-width="4" stroke-linecap="round"/>\n <line x1="31.5" y1="52" x2="68.5" y2="52" stroke="currentColor" stroke-width="4" stroke-linecap="round" opacity="0.8"/>\n <line x1="29.3" y1="70" x2="70.7" y2="70" stroke="currentColor" stroke-width="4" stroke-linecap="round" opacity="0.6"/>\n <circle cx="50" cy="20" r="9" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',mirror:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Mirror.\n Two offset square-stacks reflected across a central seam, from the YESNO\n Mirror Standard mark ("Get them all right, you win. All wrong, you win.").\n Transparent background; rendered on Press-to-Play tiles and brand lockups.\n\n Themable: the reflected stacks use currentColor (primary tone) and the\n mirror seam uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n \x3c!-- left stack --\x3e\n <rect x="6" y="26" width="28" height="28" rx="7" fill="currentColor" opacity="0.4"/>\n <rect x="14" y="34" width="28" height="28" rx="7" fill="currentColor"/>\n \x3c!-- right stack — the reflection across x=50 --\x3e\n <rect x="66" y="26" width="28" height="28" rx="7" fill="currentColor" opacity="0.4"/>\n <rect x="58" y="34" width="28" height="28" rx="7" fill="currentColor"/>\n \x3c!-- mirror seam --\x3e\n <rect x="48" y="16" width="4" height="68" rx="2" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>',same_game_multi:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon - Same Game Multi.\n Three proposition legs contained inside one rounded fixture card: many\n picks, one game. Transparent background; rendered on Press-to-Play tiles\n and brand lockups.\n\n Themable: the fixture and leg marks use currentColor (primary tone); the\n locked lead leg uses the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <rect x="14" y="14" width="72" height="72" rx="13" fill="none" stroke="currentColor" stroke-width="6"/>\n <circle cx="31" cy="35" r="6" fill="var(--icon-accent, #DFFF1A)"/>\n <rect x="43" y="31" width="31" height="8" rx="4" fill="currentColor"/>\n <circle cx="31" cy="51" r="6" fill="currentColor" opacity="0.8"/>\n <rect x="43" y="47" width="25" height="8" rx="4" fill="currentColor" opacity="0.8"/>\n <circle cx="31" cy="67" r="6" fill="currentColor" opacity="0.6"/>\n <rect x="43" y="63" width="19" height="8" rx="4" fill="currentColor" opacity="0.6"/>\n</svg>',unknown:'<?xml version="1.0" encoding="UTF-8"?>\n\x3c!--\n YESNO icon — Unknown game fallback.\n Question mark glyph on a transparent background.\n\n Themable: the mark uses currentColor (primary tone) and the dot uses\n the icon-accent CSS variable (default #DFFF1A).\n--\x3e\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">\n <path\n d="M 28 42 C 28 26 36 16 46 16 C 58 16 66 26 66 38 C 66 48 58 54 50 58 L 50 68"\n fill="none"\n stroke="currentColor"\n stroke-width="8"\n stroke-linecap="round"\n stroke-linejoin="round"\n />\n <circle cx="50" cy="82" r="5" fill="var(--icon-accent, #DFFF1A)"/>\n</svg>'},he={perfectpick:"perfect_pick",headtohead:"head_to_head",totalpoints:"total_points",quickpick:"quickpick",safetynet:"safety_net",gameset:"game_set",gamesetbet:"game_set",pickyourdividend:"pick_your_dividend",ladder:"ladder",mirror:"mirror",mirrorstandard:"mirror",samegame:"same_game_multi",samegamemulti:"same_game_multi"},ue={safety_net:"safety_net",game_set:"game_set",pick_your_dividend:"pick_your_dividend",ladder:"ladder",mirror:"mirror",same_game_multi:"same_game_multi"};function fe(e){if(e.quick_pick_only)return"quickpick";const t=ue[e.rule?.trim().toLowerCase()??""];if(t)return t;const n=(e.game_name??"").toLowerCase().replace(/[^a-z0-9]+/g,"");return he[n]??"unknown"}function ge(e){return`${se}${fe(e)}`}function pe(e){if(!function(e){return e.startsWith(se)}(e))return null;const t=e.slice(10);return de[t]??de.unknown}var ye={text:"YES",tone:"yes"},me={text:"NO",tone:"no"},be=[{question:"Will the home side kick the first goal?",outcome:"yes"},{question:"Will the total go over 165 points?",outcome:"no"},{question:"Will the favourite lead at half time?",outcome:"yes"},{question:"Will either side kick five straight goals?",outcome:"yes"},{question:"Will the away side win the first quarter?",outcome:"no"},{question:"Will the top scorer kick three or more?",outcome:"yes"},{question:"Will the margin be under two goals?",outcome:"no"},{question:"Will there be a goal in the first five minutes?",outcome:"yes"}],we=["zero","one","two","three","four","five","six","seven","eight"],xe=[{title:"Select your picks",detail:"YES or NO on each call, from {min} up to {max}."},{title:"Continue to review",detail:"Lock in the picks you have made."},{title:"Review your slip",detail:"Add, remove, or change any pick."},{title:"Place your wager",detail:"Set your stake, check the payout, and you are on."}],ke=e=>[{title:`Choose your ${e}`,detail:"Pick how many legs you are taking on and your stake."},{title:"Make your calls",detail:"YES or NO on every leg of the card."},{title:"Check the slip",detail:"Your stake is locked from the setup — review every pick."},{title:"Place your entry",detail:"Confirm and you are on."}],Se={perfect_pick:{summary:["Perfect Pick is the multi you already know, with one big difference. You pick ",ye," or ",me," across your legs, every leg has to land, and one perfect card takes the prize."],steps:xe,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},head_to_head:{summary:["Head to Head is win-or-lose calls only. Pick ",ye," or ",me," on each matchup, land every leg, and the card pays."],steps:xe,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},total_points:{summary:["Total Points is all about the scoreboard. Call ",ye," or ",me," on each total, land every leg, and the card pays."],steps:xe,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},quickpick:{summary:["QuickPick fills the card for you. We generate the ",ye," and ",me," calls, you set the stake, and a perfect card takes the prize."],steps:[{title:"Press to play",detail:"We generate a full card of calls for you."},{title:"Check the slip",detail:"See the picks you have been dealt."},{title:"Place your wager",detail:"Set your stake, check the payout, and you are on."}],demoPrompt:"See how a card settles — call {n} legs yourself, then run it."},safety_net:{summary:["Safety Net is a multi with a miss built in. Pick ",ye," or ",me," across your legs — get them all right for the top prize, and if one slips, the net catches it and the entry still pays."],steps:ke("net"),demoPrompt:"Try a {n}-leg card with a one-miss net — call every leg, then run it."},ladder:{summary:["Ladder pays as you climb. Pick ",ye," or ",me," on every leg — reach the first rung and you start winning, and every rung after that stacks another prize on top."],steps:ke("ladder"),demoPrompt:"Try a {n}-leg ladder — the climb starts at {n1} right."},game_set:{summary:["Game Set Bet is straight sets. Pick ",ye," or ",me," on every leg — each extra leg doubles the prize, and a clean card takes the lot."],steps:ke("ticket"),demoPrompt:"Try a quick {n}-leg ticket — call every leg, then run it."},pick_your_dividend:{summary:["Pick Your Dividend lets you choose the payout you are chasing. Pick ",ye," or ",me," on every leg — land them all and the entry pays the dividend you picked."],steps:ke("dividend"),demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."},mirror:{summary:["Mirror pays both ways. Pick ",ye," or ",me," on every leg — get them all right, you win. Get them all wrong, you win the same. Anything in between is a split card and does not pay."],steps:ke("card"),demoPrompt:"Try a {n}-leg mirror — sweep it either way."},same_game_multi:{summary:["Same Game Multi keeps every leg inside one fixture. Pick ",ye," or ",me," across the game — land every leg and the card pays."],steps:xe,demoPrompt:"Try a quick {n}-leg card — call every leg, then run it."}};function Ce(e){if(!e)return null;const t=fe(e),n=Se[t];if(!n)return null;const{min:o,max:r,demo:i}=function(e){const t=e.allowed_propositions?.filter(e=>e>0)??[],n=t.length>0?Math.min(...t):e.min_propositions??e.num_propositions??0,o=t.length>0?Math.max(...t):e.max_propositions??e.num_propositions??0;let r=3;return n>0&&(r=Math.max(r,n)),o>0&&(r=Math.min(r,o)),{min:n,max:o,demo:Math.min(Math.max(r,2),be.length)}}(e),l=e=>e.replace(/\{min\}/g,String(o>0?o:2)).replace(/\{max\}/g,String(r>0?r:12));return{id:t,...n,steps:n.steps.map(e=>({...e,detail:l(e.detail)})),demoLegs:be.slice(0,i),demoPrompt:l(n.demoPrompt).replace(/\{n1\}/g,we[i-1]??String(i-1)).replace(/\{n\}/g,we[i]??String(i))}}function Be(e,t,n=!0){const o=e.current;o&&("web"!==c.Platform.OS?o.scrollTo?.({x:t,y:0,animated:n}):"function"==typeof o.scroll?o.scroll({left:t}):"number"==typeof o.scrollLeft&&(o.scrollLeft=t))}function ze(e,t){return{onMouseEnter:e,onMouseLeave:t}}function Fe({theme:e,variant:t="primary",size:n="md",disabled:o,block:r,radius:i="md",onPress:l,onLongPress:d,style:h,children:u,accessibilityLabel:f}){const g=ie(e),p=e.colors,y={sm:{h:36,px:g.space.md,fs:g.fontSize.sm},md:{h:g.touchTarget.min,px:g.space.lg,fs:g.fontSize.md},lg:{h:52,px:g.space.xl,fs:g.fontSize.lg}},m={sm:g.radius.sm,md:g.radius.md,lg:g.radius.lg,pill:g.radius.pill},b={primary:{bg:p.buttonPrimary,bgPressed:p.buttonPrimaryHover,fg:p.buttonPrimaryText,border:p.buttonPrimary},secondary:{bg:p.buttonSecondary,bgPressed:p.buttonSecondaryHover,fg:p.buttonSecondaryText,border:p.border},ghost:{bg:"transparent",bgPressed:ee(p.text,g.isDark?.1:.06),fg:p.text,border:"transparent"},danger:{bg:p.error,bgPressed:ee(p.error,.85),fg:"#ffffff",border:p.error}}[t],[w,x]=a.default.useState(!1);return(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:!!o},disabled:o,onPress:l,onLongPress:d,onHoverIn:()=>x(!0),onHoverOut:()=>x(!1),style:({pressed:e})=>[{minHeight:y[n].h,paddingHorizontal:y[n].px,borderRadius:m[i],backgroundColor:!e&&!w||o?b.bg:b.bgPressed,borderColor:b.border,borderWidth:1,alignSelf:r?"stretch":"flex-start",alignItems:"center",justifyContent:"center",flexDirection:"row",opacity:o?.5:1,transform:[{scale:e&&!o?.985:1}]},h],children:"string"==typeof u?(0,s.jsx)(c.Text,{style:{color:b.fg,fontSize:y[n].fs,fontWeight:"500"},children:u}):u})}var ve={xs:{paddingVertical:3,paddingHorizontal:10,fontSize:11},sm:{paddingVertical:6,paddingHorizontal:14,fontSize:13},md:{paddingVertical:8,paddingHorizontal:18,fontSize:14}};function We(e,t,n,o,r){const i=ie(e),l=ve[o];return{container:{paddingVertical:l.paddingVertical,paddingHorizontal:l.paddingHorizontal,borderRadius:i.radius.sm,alignItems:"center",justifyContent:"center",backgroundColor:t?n:"transparent",borderWidth:1,borderColor:t?"transparent":e.colors.border,opacity:r?.5:1},label:{fontSize:l.fontSize,fontWeight:"600",lineHeight:1.2*l.fontSize,color:t?"#ffffff":e.colors.text}}}function Te({theme:e,value:t,onYes:n,onNo:o,size:r="md",disabled:i,yesLabel:l="Yes",noLabel:a="No",style:d}){const h=We(e,"yes"===t,v(e),r,i),u=We(e,"no"===t,W(e),r,i);return(0,s.jsxs)(c.View,{style:[{flexDirection:"row",gap:8,flexShrink:0},d],children:[(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityState:{selected:"yes"===t,disabled:!!i},disabled:i,onPress:i?void 0:n,style:h.container,children:(0,s.jsx)(c.Text,{style:h.label,children:l})}),(0,s.jsx)(c.Pressable,{accessibilityRole:"button",accessibilityState:{selected:"no"===t,disabled:!!i},disabled:i,onPress:i?void 0:o,style:u.container,children:(0,s.jsx)(c.Text,{style:u.label,children:a})})]})}function Ae({theme:e,value:t,size:n="md",style:o}){const r=ie(e),i="sm"===n?10:11;return(0,s.jsx)(c.View,{style:[{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",paddingVertical:"sm"===n?2:3,paddingHorizontal:"sm"===n?8:10,borderRadius:r.radius.sm,backgroundColor:"yes"===t?v(e):W(e)},o],children:(0,s.jsx)(c.Text,{style:{fontSize:i,fontWeight:"700",letterSpacing:.04*i,textTransform:"uppercase",color:"#ffffff"},children:"yes"===t?"Yes":"No"})})}function Re({delay:e=0,style:t,children:n}){const o=function(e=0){const t=a.default.useRef(new c.Animated.Value(0)).current;return a.default.useEffect(()=>{let n=!1;const o=o=>{n||(o?t.setValue(1):c.Animated.timing(t,{toValue:1,duration:500,delay:e,easing:c.Easing.bezier(.2,.8,.2,1),useNativeDriver:"web"!==c.Platform.OS}).start())},r=c.AccessibilityInfo.isReduceMotionEnabled?.();r&&"function"==typeof r.then?r.then(o).catch(()=>o(!1)):o(!1);const i=c.AccessibilityInfo.addEventListener?.("reduceMotionChanged",e=>{e&&t.setValue(1)});return()=>{n=!0,i?.remove?.()}},[e,t]),{opacity:t,transform:[{translateY:t.interpolate({inputRange:[0,1],outputRange:[14,0]})}]}}(e);return(0,s.jsx)(c.Animated.View,{style:[t,o],children:n})}function Le({segments:e,theme:t,bodyFont:n}){return(0,s.jsx)(c.Text,{style:[Me.summary,{color:t.colors.text,fontFamily:n}],children:e.map((e,n)=>"string"==typeof e?(0,s.jsx)(c.Text,{children:e},n):(0,s.jsx)(c.Text,{style:{fontWeight:"800",color:"yes"===e.tone?v(t):W(t)},children:e.text},n))})}function De({panel:e,theme:t,dividends:n,bodyFont:o,headingFont:r}){const i=t.colors,l=t.brand?.accent??i.primaryText,d=D(t),[h,u]=(0,a.useState)("learn"),[f,g]=(0,a.useState)(()=>e.demoLegs.map(()=>null)),[p,y]=(0,a.useState)(!1),m=e.demoLegs.length,b=f.filter(e=>null!=e).length,w=b===m,x=e.demoLegs.filter((e,t)=>f[t]===e.outcome).length,k=function(e,t,n){const o=t===n,r=`${t} of ${n}`;switch(e){case"mirror":return o?{won:!0,message:`All ${n} right — that is the sweep, the card pays.`}:0===t?{won:!0,message:`All ${n} wrong — a full mirror sweep pays the same as perfect.`}:{won:!1,message:`${r} is a split card. Mirror pays all right or all wrong — nothing in between.`};case"ladder":return o?{won:!0,message:`Top rung — all ${n} right stacks every prize on the ladder into one payout.`}:t>=n-1?{won:!0,message:`${r} reaches a rung — it pays, and every extra leg right stacks the next prize on top.`}:{won:!1,message:`${r} does not reach the first rung — the climb starts at ${n-1} right.`};case"safety_net":return o?{won:!0,message:`Clean sweep — all ${n} right takes the full prize.`}:t===n-1?{won:!0,message:"One miss — the net catches it and the entry still pays."}:{won:!1,message:`${r} is more than the net holds — one miss is covered, two is not.`};case"game_set":return o?{won:!0,message:`Game, set, bet — all ${n} legs landed and the card pays.`}:{won:!1,message:`${r} — every leg has to land. Flip the misses and it is straight sets.`};case"pick_your_dividend":return o?{won:!0,message:`All ${n} right — the entry pays the dividend you picked.`}:{won:!1,message:`${r} — every leg has to land to collect your dividend.`};default:return o?{won:!0,message:`Perfect card — all ${n} legs landed, the prize is yours.`}:{won:!1,message:`${r} — one miss breaks a perfect card. Flip the misses and it pays.`}}}(e.id,x,m),S=(e,t)=>{p||g(n=>n.map((n,o)=>o===e?t:n))},C=p?"Settled":`${b} of ${m} called`,B=!p&&w,z=e=>[Me.segment,{backgroundColor:e?i.primary:"transparent"}],F=e=>[Me.segmentText,{color:e?i.primaryText:i.textMuted,fontFamily:r}];return(0,s.jsxs)(c.View,{children:[(0,s.jsxs)(c.View,{style:[Me.segments,{borderColor:i.border,backgroundColor:i.backgroundAlt}],children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("learn"),accessibilityRole:"tab",accessibilityState:{selected:"learn"===h},style:z("learn"===h),children:(0,s.jsx)(c.Text,{style:F("learn"===h),children:"How it works"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("try"),accessibilityRole:"tab",accessibilityState:{selected:"try"===h},style:z("try"===h),children:(0,s.jsx)(c.Text,{style:F("try"===h),children:"Quick demo"})}),n?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("pay"),accessibilityRole:"tab",accessibilityState:{selected:"pay"===h},style:z("pay"===h),children:(0,s.jsx)(c.Text,{style:F("pay"===h),children:"Dividends"})}):null]}),"pay"===h?n:null,"learn"===h&&(0,s.jsxs)(c.View,{children:[(0,s.jsx)(Le,{segments:e.summary,theme:t,bodyFont:o}),(0,s.jsxs)(c.View,{style:[Me.steps,Me.stepsSpaced],children:[(0,s.jsx)(c.View,{pointerEvents:"none",style:[Me.rail,{backgroundColor:ee(i.primary,.25)}]}),e.steps.map((e,t)=>(0,s.jsxs)(c.View,{style:Me.step,children:[(0,s.jsx)(c.View,{style:[Me.stepTile,{backgroundColor:i.primary}],children:(0,s.jsx)(c.Text,{style:[Me.stepTileText,{color:l,fontFamily:r}],children:t+1})}),(0,s.jsxs)(c.View,{style:Me.stepText,children:[(0,s.jsx)(c.Text,{style:[Me.stepTitle,{color:i.primary,fontFamily:r}],children:e.title}),(0,s.jsx)(c.Text,{style:[Me.stepDetail,{color:i.textMuted,fontFamily:o}],children:e.detail})]})]},e.title))]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>u("try"),accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:[Me.tryLink,{color:i.primary,fontFamily:r}],children:"Try a quick demo →"})})]}),"try"===h&&(0,s.jsxs)(c.View,{style:[Me.slip,Me.slipFlush,{borderColor:i.border,backgroundColor:d}],children:[(0,s.jsx)(c.View,{style:Me.slipHead,children:(0,s.jsxs)(c.View,{style:Me.slipHeadRow,children:[(0,s.jsx)(c.Text,{style:[Me.prompt,Me.promptGrow,{color:i.textMuted,fontFamily:o}],children:p?"Here is how it settled.":e.demoPrompt}),(0,s.jsx)(c.View,{style:[Me.counter,B?{borderColor:i.primary,backgroundColor:i.primary}:{borderColor:ee(i.border,.9),backgroundColor:"transparent"}],children:(0,s.jsx)(c.Text,{style:[Me.counterText,{color:B?i.primaryText:i.textMuted,fontFamily:o}],children:C})})]})}),(0,s.jsx)(c.View,{style:Me.legs,children:e.demoLegs.map((e,n)=>{const r=f[n]===e.outcome;return(0,s.jsxs)(c.View,{style:[Me.leg,n>0&&{borderTopWidth:1,borderTopColor:ee(i.border,.7)}],children:[(0,s.jsxs)(c.View,{style:Me.legMain,children:[(0,s.jsx)(c.View,{style:[Me.pip,p?{backgroundColor:r?i.success:i.error}:{borderWidth:1.5,borderColor:f[n]?i.primary:i.border}],children:(0,s.jsx)(c.Text,{style:[Me.pipText,{color:p?"#fff":f[n]?i.primary:i.textMuted}],children:p?r?"✓":"✗":n+1})}),(0,s.jsx)(c.View,{style:Me.legText,children:(0,s.jsx)(c.Text,{style:[Me.legQuestion,{color:i.text,fontFamily:o}],children:e.question})})]}),p?(0,s.jsx)(Ae,{theme:t,size:"sm",value:e.outcome}):(0,s.jsx)(Te,{theme:t,size:"sm",value:f[n],onYes:()=>S(n,"yes"),onNo:()=>S(n,"no")})]},e.question)})}),(0,s.jsx)(c.View,{style:[Me.perforation,{borderTopColor:ee(i.border,.9)}]}),(0,s.jsx)(c.View,{style:Me.slipFoot,children:p?(0,s.jsxs)(c.View,{children:[(0,s.jsxs)(c.View,{style:[Me.verdict,{backgroundColor:k.won?i.successBg:i.errorBg}],children:[(0,s.jsx)(c.View,{style:[Me.stamp,{borderColor:k.won?i.successText:i.errorText}],children:(0,s.jsx)(c.Text,{style:[Me.stampText,{color:k.won?i.successText:i.errorText,fontFamily:r}],children:k.won?"Winner":"No win"})}),(0,s.jsx)(c.Text,{style:[Me.verdictText,{color:k.won?i.successText:i.errorText,fontFamily:o}],children:k.message})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{g(e.demoLegs.map(()=>null)),y(!1)},accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:[Me.tryAgain,{color:i.textMuted,fontFamily:o}],children:"↺ Deal it again"})})]}):(0,s.jsx)(Fe,{theme:t,size:"sm",block:!0,disabled:!w,onPress:()=>y(!0),children:"Run the demo"})})]})]})}var Me=c.StyleSheet.create({summary:{fontSize:15,lineHeight:23},segments:{flexDirection:"row",gap:2,borderWidth:1,borderRadius:10,padding:2,marginBottom:14},segment:{flex:1,borderRadius:8,paddingVertical:6,alignItems:"center"},segmentText:{fontSize:11,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.1},tryLink:{marginTop:6,paddingLeft:50,fontSize:12.5,fontWeight:"700"},stepsSpaced:{marginTop:12},slipFlush:{marginTop:0},promptGrow:{flex:1,minWidth:0,marginTop:0},steps:{position:"relative"},rail:{position:"absolute",left:17,top:16,bottom:16,width:1},step:{justifyContent:"center",gap:2,paddingVertical:8,paddingLeft:50,minHeight:52},stepTile:{position:"absolute",left:0,top:"50%",marginTop:-18,width:36,height:36,borderRadius:10,alignItems:"center",justifyContent:"center"},stepTileText:{fontSize:16,fontWeight:"800"},stepText:{gap:2},stepTitle:{fontSize:14.5,fontWeight:"700",lineHeight:19},stepDetail:{fontSize:13,lineHeight:18},slip:{marginTop:16,borderWidth:1,borderRadius:12,overflow:"hidden"},slipHead:{paddingHorizontal:14,paddingTop:12},slipHeadRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:10},counter:{borderWidth:1,borderRadius:999,paddingHorizontal:8,paddingVertical:2},counterText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1,fontVariant:["tabular-nums"]},prompt:{fontSize:12.5,marginTop:4},legs:{paddingHorizontal:14,marginTop:6},leg:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingVertical:10},legMain:{flexDirection:"row",alignItems:"flex-start",gap:10,flex:1,minWidth:0},pip:{marginTop:2,width:18,height:18,borderRadius:9,alignItems:"center",justifyContent:"center"},pipText:{fontSize:10,fontWeight:"800",lineHeight:13},legText:{flex:1,minWidth:0},legQuestion:{fontSize:13,fontWeight:"600",lineHeight:18},perforation:{marginHorizontal:14,borderTopWidth:1.5,borderStyle:"dashed"},slipFoot:{paddingHorizontal:14,paddingTop:12,paddingBottom:14},verdict:{flexDirection:"row",alignItems:"center",gap:12,borderRadius:8,paddingHorizontal:12,paddingVertical:10},stamp:{borderWidth:2,borderRadius:6,paddingHorizontal:6,paddingVertical:2,transform:[{rotate:"-3deg"}],flexShrink:0},stampText:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4},verdictText:{flex:1,fontSize:12.5,fontWeight:"600",lineHeight:17},tryAgain:{marginTop:8,fontSize:11.5,fontWeight:"700"}});function Pe({text:e,colors:t}){const n=function(e){const t=[],n=/\*\*(.+?)\*\*/g;let o,r=0;for(;null!==(o=n.exec(e));)o.index>r&&t.push({text:e.slice(r,o.index),bold:!1}),t.push({text:o[1],bold:!0}),r=o.index+o[0].length;return r<e.length&&t.push({text:e.slice(r),bold:!1}),0===t.length&&t.push({text:e,bold:!1}),t}(e);return(0,s.jsx)(c.Text,{children:n.map((e,n)=>(0,s.jsx)(c.Text,{style:{fontWeight:e.bold?"700":"400",color:e.bold?t.text:t.textMuted},children:e.text},n))})}function He({content:e,colors:t}){const n=x(e);let o=null;try{o=require("react-native-webview").WebView}catch{o=null}return o?(0,s.jsx)(o,{source:{html:n},style:{minHeight:420,width:"100%"},originWhitelist:["*"],scrollEnabled:!0}):(0,s.jsx)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted},children:"This guide uses HTML. Install react-native-webview in the host app to display it on native."})}function Oe({rows:e}){return(0,s.jsx)(c.View,{style:{gap:0,marginVertical:6},children:e.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",borderWidth:1,borderColor:u,borderTopWidth:0===t?1:0},children:[(0,s.jsx)(c.View,{style:{flex:2.2,backgroundColor:"#F9FAFB",paddingVertical:11,paddingHorizontal:14,borderRightWidth:1,borderRightColor:u},children:(0,s.jsx)(c.Text,{style:{fontSize:15,color:"#1A1A1A"},children:e.question})}),(0,s.jsx)(c.View,{style:{flex:.65,backgroundColor:"#DCFCE7",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center",borderRightWidth:1,borderRightColor:u},children:(0,s.jsx)(c.Text,{style:{fontSize:15,fontWeight:"700",color:"#166534"},children:"YES"})}),(0,s.jsx)(c.View,{style:{flex:.65,backgroundColor:"#FEE2E2",paddingVertical:11,paddingHorizontal:8,alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:{fontSize:15,fontWeight:"700",color:"#991B1B"},children:"NO"})})]},t))})}function Ie({content:e,colors:t,bodyFont:n,headingFont:o}){const r=function(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let o=[],r=[];const i=()=>{const e=o.map(e=>e.trim()).filter(Boolean);if(e.length>0){const t=e.map(e=>f(e));if(t.every(e=>null!==e))return n.push({type:"propsTable",rows:t}),void(o=[])}const t=o.join(" ").trim();t&&n.push({type:"paragraph",text:t}),o=[]},l=()=>{r.length>0&&(n.push({type:"list",items:[...r]}),r=[])};for(const a of t){const e=a.trim();if(!e){l(),i();continue}const t=e.match(k);if(t){l(),i(),n.push({type:"heading",level:Math.min(t[1].length,3),text:t[2].trim()});continue}if(C.test(e)){l(),i(),n.push({type:"hr"});continue}const c=e.match(S);c?(i(),r.push(c[1].trim())):(l(),o.push(e))}return l(),i(),n}(e);return(0,s.jsx)(c.View,{style:{gap:14},children:r.map((e,r)=>"heading"===e.type?(0,s.jsx)(c.Text,{style:{fontSize:{1:20,2:18,3:16}[e.level],fontWeight:"800",color:t.text,textTransform:1===e.level?"uppercase":"none",fontFamily:o??n},children:(0,s.jsx)(Pe,{text:e.text,colors:t})},r):"paragraph"===e.type?(0,s.jsx)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:(0,s.jsx)(Pe,{text:e.text,colors:t})},r):"list"===e.type?(0,s.jsx)(c.View,{style:{gap:6,paddingLeft:8},children:e.items.map((e,o)=>(0,s.jsxs)(c.Text,{style:{fontSize:14,lineHeight:22,color:t.textMuted,fontFamily:n},children:["• ",(0,s.jsx)(Pe,{text:e,colors:t})]},o))},r):"propsTable"===e.type?(0,s.jsx)(Oe,{rows:e.rows},r):(0,s.jsx)(c.View,{style:{height:1,backgroundColor:t.border,marginVertical:4}},r))})}function Ee({content:e,panel:t,theme:n,extra:o,title:r="How to Play",label:i="How to Play",variant:l="pill",colors:d,bodyFont:h,headingFont:u}){const[f,g]=(0,a.useState)(!1),{width:p}=(0,c.useWindowDimensions)(),x=p>=640,k=!(!t||!n);if(!e?.trim()&&!k&&!o)return null;const S=!k&&!!e&&function(e){const t=e.trim();if(!t)return!1;if(w(t))return!0;const n=y(t);return!!m.test(n)||b.test(t)}(e);return(0,s.jsxs)(s.Fragment,{children:["icon"===l?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>g(!0),style:[je.iconButton,{borderColor:d.primary,backgroundColor:`${d.primary}14`}],accessibilityRole:"button",accessibilityLabel:i,children:(0,s.jsx)(c.Text,{style:[je.iconButtonText,{color:d.primary,fontFamily:h}],children:"?"})}):(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>g(!0),style:[je.button,{borderColor:d.primary,backgroundColor:`${d.primary}10`}],accessibilityRole:"button",accessibilityLabel:i,children:[(0,s.jsx)(c.Text,{style:[je.buttonText,{color:d.primary,fontFamily:h}],children:i}),(0,s.jsx)(c.Text,{style:[je.buttonText,{color:d.primary,fontFamily:h}],children:"?"})]}),(0,s.jsx)(c.Modal,{visible:f,animationType:"none",transparent:!0,onRequestClose:()=>g(!1),children:(0,s.jsxs)(c.View,{style:[je.overlay,x?{justifyContent:"center",alignItems:"center",padding:16}:{justifyContent:"flex-end"}],children:[(0,s.jsx)(c.Pressable,{style:c.StyleSheet.absoluteFill,onPress:()=>g(!1)}),(0,s.jsxs)(c.View,{style:[je.sheet,x?{maxWidth:672,maxHeight:"85%",borderRadius:16}:{maxHeight:"88%",borderTopLeftRadius:16,borderTopRightRadius:16},{backgroundColor:d.background,borderColor:d.border}],children:[(0,s.jsx)(c.View,{style:[je.header,{paddingHorizontal:x?24:16,borderBottomColor:d.border,backgroundColor:d.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[je.title,{color:d.text,fontFamily:u??h}],children:r})}),(0,s.jsx)(c.ScrollView,{contentContainerStyle:S?void 0:{paddingHorizontal:x?24:16,paddingVertical:20},children:k?(0,s.jsx)(De,{panel:t,theme:n,dividends:o,bodyFont:h,headingFont:u}):(0,s.jsxs)(s.Fragment,{children:[S?(0,s.jsx)(He,{content:e,colors:d}):(0,s.jsx)(Ie,{content:e??"",colors:d,bodyFont:h,headingFont:u}),o?(0,s.jsx)(c.View,{style:S?{paddingHorizontal:x?24:16,paddingBottom:20}:{marginTop:16},children:o}):null]})}),(0,s.jsx)(c.SafeAreaView,{style:[je.footer,{paddingHorizontal:x?24:16,borderTopColor:d.border,backgroundColor:d.backgroundAlt}],children:(0,s.jsx)(c.TouchableOpacity,{onPress:()=>g(!1),style:[je.doneButton,{alignSelf:"stretch",alignItems:"center",backgroundColor:d.primary}],children:(0,s.jsx)(c.Text,{style:[je.doneText,{color:d.primaryText,fontFamily:h}],children:"Got it"})})})]})]})})]})}var je=c.StyleSheet.create({button:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},buttonText:{fontSize:12,fontWeight:"600"},iconButton:{width:21,height:21,borderRadius:11,borderWidth:1,alignItems:"center",justifyContent:"center",flexShrink:0},iconButtonText:{fontSize:12,fontWeight:"800",lineHeight:15},overlay:{flex:1,backgroundColor:"rgba(0,0,0,0.55)"},sheet:{width:"100%",borderWidth:1,overflow:"hidden",shadowColor:"#000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:25,elevation:24},header:{paddingTop:12,paddingBottom:16,borderBottomWidth:1},title:{fontSize:18,fontWeight:"700"},footer:{paddingVertical:16,borderTopWidth:1},doneButton:{borderRadius:12,paddingVertical:13,paddingHorizontal:20},doneText:{fontSize:14,fontWeight:"700"}});function Ne({category:e,size:t=14,color:n="currentColor"}){const o=n,r=2.25;switch(e){case"casino":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M10.348 3.169l-7.15 3.113a2 2 0 0 0 -1.03 2.608l4.92 11.895a1.96 1.96 0 0 0 2.59 1.063l7.142 -3.11a2.002 2.002 0 0 0 1.036 -2.611l-4.92 -11.894a1.96 1.96 0 0 0 -2.588 -1.064z",fill:n}),(0,s.jsx)(d.Path,{d:"M16 3a2 2 0 0 1 1.995 1.85l.005 .15v3.5a1 1 0 0 1 -1.993 .117l-.007 -.117v-3.5h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z",fill:n}),(0,s.jsx)(d.Path,{d:"M19.08 5.61a1 1 0 0 1 1.31 -.53c.257 .108 .505 .21 .769 .314a2 2 0 0 1 1.114 2.479l-.056 .146l-2.298 5.374a1 1 0 0 1 -1.878 -.676l.04 -.11l2.296 -5.371l-.366 -.148l-.402 -.167a1 1 0 0 1 -.53 -1.312z",fill:n})]});case"racing":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M7 10l-.85 8.507a1.357 1.357 0 0 0 1.35 1.493h.146a2 2 0 0 0 1.857 -1.257l.994 -2.486a2 2 0 0 1 1.857 -1.257h1.292a2 2 0 0 1 1.857 1.257l.994 2.486a2 2 0 0 0 1.857 1.257h.146a1.37 1.37 0 0 0 1.364 -1.494l-.864 -9.506h-8c0 -3 -3 -5 -6 -5l-3 6l2 2l3 -2",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M22 14v-2a3 3 0 0 0 -3 -3",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]});case"women":return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M7 9a5 5 0 1 0 10 0a5 5 0 1 0 -10 0",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 14v7",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M9 18h6",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]});default:return(0,s.jsxs)(d.default,{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 7l4.76 3.45l-1.76 5.55h-6l-1.76 -5.55l4.76 -3.45",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M12 7v-4m3 13l2.5 3m-.74 -8.55l3.74 -1.45m-11.44 7.05l-2.56 2.95m.74 -8.55l-3.74 -1.45",stroke:o,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round"})]})}}function Ge({size:e=20,color:t="currentColor"}){return(0,s.jsx)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ye({size:e=20,color:t="currentColor"}){return(0,s.jsxs)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)(d.Path,{d:"M5 11h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Path,{d:"M8 11V7a4 4 0 1 1 8 0v4",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ve({size:e=20,color:t="currentColor"}){return(0,s.jsx)(d.default,{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M21 4H3l7.2 8.5V19l3.6 2v-8.5L21 4z",stroke:t,strokeWidth:2.25,strokeLinecap:"round",strokeLinejoin:"round"})})}function Ue({label:e,category:t,icon:n,theme:o,disabled:r=!1}){const i=o.colors,l=ce(o),{width:a}=(0,c.useWindowDimensions)(),d=a>=480?20:a>=400?18:16,h=r?i.textMuted:i.textAlt??i.text,u=r?i.border:o.brand?.chip??i.primary,f=r?i.textMuted:o.brand?.icon??i.primaryText??i.buttonPrimaryText;return(0,s.jsxs)(c.View,{style:[Ze.row,{gap:.25*d}],children:[(0,s.jsxs)(c.Text,{accessibilityLabel:"YESNO",style:{fontSize:d,lineHeight:1.15*d,letterSpacing:-1,color:h,fontFamily:l},children:[(0,s.jsx)(c.Text,{style:Ze.yes,children:"YES"}),(0,s.jsx)(c.Text,{style:Ze.no,children:"NO"})]}),(0,s.jsx)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:e,style:[Ze.pill,{width:1.6*d,height:.85*d,borderRadius:.425*d,backgroundColor:u,transform:[{translateY:.02*-d}]}],children:n??(0,s.jsx)(Ne,{category:t,size:.6*d,color:f})}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"500",fontSize:d,lineHeight:1.15*d,flexShrink:1,minWidth:0,color:h,fontFamily:l,includeFontPadding:!1},children:e}),(0,s.jsx)(c.Text,{style:{fontSize:.3*d,lineHeight:.3*d,fontWeight:"600",marginLeft:.06*d,color:h,fontFamily:l,includeFontPadding:!1},children:"TM"})]})]})}var Ze=c.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",maxWidth:"100%"},yes:{fontWeight:"900"},no:{fontWeight:"300"},pill:{alignItems:"center",justifyContent:"center",flexShrink:0}});function Ke({groups:e,theme:t,bodyFont:n}){const o=t.colors,r=(0,a.useRef)(null),i=(0,a.useRef)(0),l=(0,a.useRef)(0),d=(0,a.useRef)(0),[h,u]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),p=()=>{const e=d.current-l.current;u(i.current>2),g(i.current<e-2)},y=e=>{const t=Math.max(0,i.current+e*Math.round(.7*l.current));Be(r,t)},m=o.background??"#fff";return 0===e.length?null:(0,s.jsxs)(c.View,{style:Xe.wrap,children:[(0,s.jsx)(c.ScrollView,{ref:r,horizontal:!0,showsHorizontalScrollIndicator:!1,onScroll:e=>{i.current=e.nativeEvent.contentOffset.x,p()},onLayout:e=>{l.current=e.nativeEvent.layout.width,p()},onContentSizeChange:e=>{d.current=e,p()},scrollEventThrottle:32,contentContainerStyle:Xe.chips,children:e.map((e,t)=>(0,s.jsxs)(a.default.Fragment,{children:[t>0&&(0,s.jsx)(c.View,{style:[Xe.divider,{backgroundColor:o.border}]}),e.label?(0,s.jsx)(c.Text,{style:[Xe.groupLabel,{color:o.textMuted,fontFamily:n}],children:e.label}):null,e.options.map(t=>{const r=t.value===e.value;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>e.onChange(t.value),activeOpacity:.8,style:[Xe.chip,{borderColor:r?o.primary:o.border,backgroundColor:r?o.primary:m}],children:(0,s.jsx)(c.Text,{style:[Xe.chipText,{color:r?o.primaryText:o.primary,fontFamily:n}],children:t.label})},t.value??"__all")})]},e.label??t))}),h&&(0,s.jsx)(c.TouchableOpacity,{accessibilityLabel:"Scroll left",onPress:()=>y(-1),style:[Xe.nav,Xe.navLeft,{backgroundColor:m,borderColor:o.border}],children:(0,s.jsx)(c.View,{style:Xe.navFlip,children:(0,s.jsx)(Ge,{size:14,color:o.primary})})}),f&&(0,s.jsx)(c.TouchableOpacity,{accessibilityLabel:"Scroll right",onPress:()=>y(1),style:[Xe.nav,Xe.navRight,{backgroundColor:m,borderColor:o.border}],children:(0,s.jsx)(Ge,{size:14,color:o.primary})})]})}function qe({label:e,options:t,value:n,onChange:o,theme:r,bodyFont:i}){return(0,s.jsx)(Ke,{groups:[{label:e,options:t,value:n,onChange:o}],theme:r,bodyFont:i})}var Xe=c.StyleSheet.create({wrap:{position:"relative",minWidth:0},chips:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:2,paddingVertical:2},groupLabel:{fontSize:10,fontWeight:"800",textTransform:"uppercase",letterSpacing:1.4,flexShrink:0},divider:{width:1,height:20,flexShrink:0},chip:{borderWidth:1,borderRadius:999,paddingHorizontal:14,paddingVertical:6,flexShrink:0},chipText:{fontSize:12,fontWeight:"700",letterSpacing:-.12},nav:{position:"absolute",top:"50%",marginTop:-13,width:26,height:26,borderRadius:13,borderWidth:1,alignItems:"center",justifyContent:"center",shadowColor:"#0F4C5C",shadowOpacity:.35,shadowRadius:5,shadowOffset:{width:0,height:4},elevation:3},navLeft:{left:-2},navRight:{right:-2},navFlip:{transform:[{rotate:"180deg"}]}});function Qe(e){return(e.propositionType??e.proposition_type)?.trim()||void 0}function Je(e){return(e.description??e.proposition??"").trim()}var $e={AND:/\s+AND\s+/,OR:/\s+OR\s+/};function _e(e){return"composite_and"===(t=Qe(e))||"composite_or"===t;var t}function et(e){const t=e.source_data;if(!t)return[];try{const e=JSON.parse(t)?.composite?.components;return Array.isArray(e)?e.filter(e=>"number"==typeof e&&Number.isFinite(e)):[]}catch{return[]}}function tt(e){const t=e.home_team?.trim(),n=e.away_team?.trim();if(t&&n)return`${t} vs ${n}`;if(t)return t;if(n)return n;const o=e.eventId??e.event_id;return o?.trim()?o.trim():null}function nt(e,t){if(!_e(e))return null;const n=function(e){return _e(e)?("composite_and"===(t=Qe(e))?"AND":"composite_or"===t?"OR":null)||function(e){const t=e.source_data;if(!t)return null;try{const e=JSON.parse(t)?.composite?.operator;if("and"===e)return"AND";if("or"===e)return"OR"}catch{return null}return null}(e):null;var t}(e);if(!n)return null;const o=et(e);if(t&&o.length>=2){const e=[];for(const n of o){const o=t.get(n);o&&e.push({text:Je(o),eventLabel:tt(o)})}if(e.length>=2)return{operator:n,legs:e}}const r=function(e,t){const n=e.trim();if(!n)return null;const o=n.split($e[t]).map(e=>e.trim()).filter(Boolean);return o.length<2?null:o}(Je(e),n);return r?{operator:n,legs:r.map(e=>({text:e,eventLabel:null}))}:null}var ot="#0F4C5C",rt={aussierules_afl:"AFL",rugbyleague_nrl:"NRL",basketball_nba:"NBA",basketball_ncaab:"CBB",americanfootball_nfl:"NFL",americanfootball_ncaaf:"CFB",soccer_epl:"EPL",soccer_italy_serie_a:"SEA",soccer_spain_la_liga:"LIG",soccer_germany_bundesliga:"BUN",soccer_usa_mls:"MLS",baseball_mlb:"MLB",icehockey_nhl:"NHL",horse_racing_aus:"RLT",roulette:"RLT",dice:"DCE",cointrio:"CT3"},it={sports:"Pick the winners",casino:"Beat the house",racing:"Back a winner"};function lt(e,t,n){if(n)return n.slice(0,4).toUpperCase();const o=rt[e];if(o)return o;if(t&&e.startsWith(`${t}_`)){const n=e.slice(t.length+1).replace(/_/g," ").split(/\s+/).filter(Boolean).map(e=>e[0]).join("").slice(0,4).toUpperCase();if(n)return n}return e.startsWith("casino_")?e.slice(7,11).toUpperCase()||"CSN":e.slice(0,3).toUpperCase()||"·"}function at(e){return!!e.is_composite_component||!!(t=Qe(e))&&t.startsWith("co_");var t}function ct(e){if(null==e)return 0;const t=Number(e);return Number.isFinite(t)?t:0}function st(e){return"string"==typeof e?"true"===e.toLowerCase():!!e}function dt(e){return"yes"===e.toLowerCase()?"Yes":"No"}function ht(e){const t=Number.isInteger(e);return new Intl.NumberFormat("en-AU",{style:"currency",currency:"AUD",minimumFractionDigits:t?0:2,maximumFractionDigits:2}).format(e)}function ut(e){const t="string"==typeof e?new Date(e.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(e)?e:e+"Z"):e;return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}).format(t)}function ft(e){return e.reduce((t,n)=>{const o=gt(n,e);return t[o]||(t[o]=[]),t[o].push(n),t},{})}function gt(e,t){if(e.sport)return e.sport;if(_e(e)&&t)for(const n of et(e)){const e=t.find(e=>e.id===n);if(e?.sport)return e.sport}return"Other"}var pt=["sports","casino","racing"];function yt(e){const t=(e.category||"").toLowerCase(),n=e.sport||"",o=Qe(e).toLowerCase();return"casino"===t||"casino"===o||n.startsWith("casino")?"casino":"racing"===t||n.startsWith("horse_racing")?"racing":"sports"}function mt(e){return"racing"===yt(e)}function bt(e){const t={};for(const n of e){const e=yt(n);t[e]||(t[e]=[]),t[e].push(n)}return t}function wt(e){const t=bt(e);return pt.filter(e=>(t[e]?.length??0)>0)}function xt(e){switch(e){case"casino":return"Choose a Game";case"racing":return"Choose a Meeting";default:return"Choose a Sport"}}function kt(e,t,n,o){return o&&o.length>0?o.includes(e):!(void 0!==t&&e<t||void 0!==n&&e>n)}function St(e,t,n){const o=n?.min_propositions??null,r=n?.max_propositions??null,i=(n?.allowed_propositions??e.allowed_propositions)?.filter(e=>(null==o||e>=o)&&(null==r||e<=r));if(i&&i.length>0)return null!=t&&i.includes(t)?{min:t,max:t}:{min:Math.min(...i),max:Math.max(...i)};const l=e.min_propositions??e.num_propositions??0,a=e.max_propositions??e.num_propositions??0;return{min:null!=o?Math.max(l,o):l,max:null!=r&&a>0?Math.min(a,r):r??a}}function Ct(e){const t=e.allocations?.find(e=>"jackpot"===e.allocation_type);return t&&(t.dollar_amount??0)>0?{enabled:!0,amount:t.dollar_amount,limit:e.jackpot_limit??0,progressive:!1}:!0===e.jackpot_enabled&&t&&t.percentage>0?{enabled:!0,amount:e.jackpot_amount??0,limit:e.jackpot_limit??0,progressive:!0}:!0===e.jackpot_enabled&&(e.jackpot_amount??0)>0?{enabled:!0,amount:e.jackpot_amount,limit:e.jackpot_limit??0,progressive:!1}:{enabled:!1,amount:0,limit:0,progressive:!1}}function Bt(e,t){const n={basketball_nba:"NBA Basketball",americanfootball_nfl:"NFL Football",icehockey_nhl:"NHL Hockey",baseball_mlb:"MLB Baseball",soccer_epl:"Premier League",soccer_usa_mls:"MLS Soccer",horse_racing_aus:"Horse Racing",casino_blackjack:"Blackjack",casino_roulette:"Roulette",casino_slots:"Slots",aussierules_afl:"AFL",rugbyleague_nrl:"NRL","AUSTRALIAN-RULES":"AFL","RUGBY-LEAGUE":"NRL",cricket_international_t20:"T20 International",cricket_test_match:"Test Cricket"};return e.startsWith("casino_")?n[e]??e.replace(/^casino_/,"").replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):t&&e.startsWith(`${t}_`)?e.slice(t.length+1).replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase()):n[e]||e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function zt(e,t,n){const o=t?.[e];return o||Bt(e,n)}function Ft(e,t){const n=t?.[e];return n||function(e){return{sports:"Sports",casino:"Casino",racing:"Racing"}[e]??e.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}(e)}function vt(e,t){if(e)return t&&e.startsWith(`${t}_`)?t:e}function Wt(e,t,n){return e===t||!!n&&(!(t!==n||!e.startsWith(`${n}_`))||!(e!==n||!t.startsWith(`${n}_`)))}function Tt(e,t,n){return!t||!!e&&(Wt(e,t,n)||Wt(t,e,n))}function At(e,t){return t.find(t=>t.id===e)}function Rt(e,t){let n=e;return t?.category&&(n=n.filter(e=>yt(e)===t.category)),t?.sport&&(n=n.filter(n=>_e(n)?function(e,t,n,o){if(Tt(e.sport,t,n))return!0;if(!o)return!1;for(const r of et(e)){const e=At(r,o);if(e&&Tt(e.sport,t,n))return!0}return!1}(n,t.sport,t.sportBaseKey,e):Tt(n.sport,t.sport,t.sportBaseKey))),n}function Lt(e,t){return!t||function(e){const t=(e.category||"sports").toLowerCase();return"casino"===t||"racing"===t?t:"sports"}(e)===t}function Dt(e,t,n){if(!t)return!0;const o=e.allowed_sports;return!o||0===o.length||o.some(e=>Wt(t,e,n))}function Mt(e,t,n){return!(n?.category&&!Lt(e,n.category))&&!(n?.sport&&!Dt(e,n.sport,n.sportBaseKey))&&Rt(Ht(t,e),n).length>0}function Pt(e,t){return t?.category||t?.sport?e.filter(e=>!(t.category&&!Lt(e,t.category)||t.sport&&!Dt(e,t.sport,t.sportBaseKey))):e}function Ht(e,t,n){const o=t.allowed_sports,r=o&&o.length>0,i=t.allowed_markets&&t.allowed_markets.length>0;return r||i?e.filter(l=>{if(at(l))return!1;if(r)if(_e(l)){if(!function(e,t,n,o){if(e.sport&&t.some(t=>Wt(e.sport,t,n)))return!0;if(!o)return!1;for(const r of et(e)){const e=At(r,o);if(e?.sport&&t.some(t=>Wt(e.sport,t,n)))return!0}return!1}(l,o,n,e))return!1}else if(!l.sport||!o.some(e=>Wt(l.sport,e,n)))return!1;return!(i&&!function(e,t){const n=t.allowed_markets;if(!n||0===n.length)return!0;const o=Qe(e);return!!o&&n.includes(o)}(l,t))}):e.filter(e=>!at(e))}function Ot(e,t){const n=e.available_days;if(!n)return!0;if(0===n.length)return!0;const o=((t??new Date).getDay()+6)%7;return n.includes(o)}var It=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function Et(e,t,n){return function(e,t,n){return"racing"===e||!(!t?.length||!t.every(mt))||!!n&&Boolean(t?.some(e=>e.sport===n||(e.sport||"").startsWith(`${n}_`)))}(t,e,n)?function(e){return e.reduce((e,t)=>{const n=t.away_team||t.eventId||"Race";return e[n]||(e[n]=[]),e[n].push(t),e},{})}(e):function(e){return e.reduce((e,t)=>{const n=`${t.home_team} vs ${t.away_team}`;return e[n]||(e[n]=[]),e[n].push(t),e},{})}(e)}function jt(e){const t=[];for(const n of e){const e=n.home_team&&n.away_team&&!mt(n)?`${n.home_team} vs ${n.away_team}`:n.away_team||n.home_team||n.eventId||null,o=t[t.length-1],r=null===e?null:t.find(t=>t.key===e);r?r.props.push(n):null===e&&null===o?.key?o.props.push(n):t.push({key:e,props:[n]})}return t}function Nt(e,t){if(e===t)return[e];if(t<e)return[e];const n=[];for(let o=e;o<=t;o++)n.push(o);return n}function Gt(e,t){const n=[...e].sort(()=>Math.random()-.5).slice(0,t),o=[],r=[];for(const i of n)Math.random()<.5?o.push(i):r.push(i);return{yesPicks:o,noPicks:r}}var Yt=new Map,Vt=new Map;function Ut(e,t,n){let o=e;return t&&(o=o.replace(/currentColor/g,t)),n?o=o.replace(/var\(\s*--icon-accent\s*(?:,[^)]*)?\)/g,n):(o=o.replace(/var\(\s*--icon-accent\s*,\s*([^)]+)\)/g,"$1"),o=o.replace(/var\(\s*--icon-accent\s*\)/g,"currentColor")),o}function Zt({iconUrl:e,width:t,height:n,iconColor:o,accentColor:r,accessibilityLabel:i}){const l=pe(e),[h,u]=a.default.useState(()=>l??Yt.get(e)??null);return a.default.useEffect(()=>{const t=pe(e);if(t)return void u(t);if(Yt.has(e))return void u(Yt.get(e));let n=!1;return function(e){const t=Yt.get(e);if(void 0!==t)return Promise.resolve(t);const n=Vt.get(e);if(n)return n;const o=fetch(e).then(e=>{if(!e.ok)throw new Error(`SVG fetch failed: ${e.status}`);return e.text()}).then(t=>(Yt.set(e,t),Vt.delete(e),t)).catch(t=>{throw Vt.delete(e),t});return Vt.set(e,o),o}(e).then(e=>{n||u(e)}).catch(()=>{n||u(null)}),()=>{n=!0}},[e]),h?(0,s.jsx)(d.SvgXml,{xml:Ut(h,o,r),width:t,height:n,accessibilityLabel:i}):(0,s.jsx)(c.Image,{source:{uri:e},style:{width:t,height:n},resizeMode:"contain",accessibilityLabel:i})}function Kt({iconUrl:e,gameName:t,onPress:n,size:o=120,brandColor:r="#0F4C5C",cardColor:i="#DDD9D2",iconColor:l,accentColor:h,captionColor:u="#14687C",accessibilityLabel:f}){const[g,p]=a.default.useState(!1),[y,m]=a.default.useState(!1),b=(t||"").toUpperCase(),w=170,x=o/360,k=l??i,S=A(r,h,k),C=a.default.useRef(new c.Animated.Value(0)).current,B=e=>({position:"absolute",left:40*x,top:5*x,width:210*x,height:210*x,borderRadius:42*x,backgroundColor:r,opacity:e}),z=e=>({transform:[{translateX:C.interpolate({inputRange:[0,1],outputRange:[e*x,0]})},{translateY:C.interpolate({inputRange:[0,1],outputRange:[e*x,0]})}]}),F=!!n&&(g||y);a.default.useEffect(()=>{c.Animated.timing(C,{toValue:F?1:0,duration:220,useNativeDriver:"web"!==c.Platform.OS}).start()},[F,C]);const v=()=>(0,s.jsxs)(c.View,{style:[qt.container,{width:o,height:o}],children:[(0,s.jsxs)(d.default,{viewBox:"0 0 360 360",width:o,height:o,children:[(0,s.jsx)(d.Rect,{x:2,y:2,width:356,height:356,rx:78,fill:i,stroke:r,strokeWidth:4}),(0,s.jsx)(d.Text,{x:180,y:305,fontFamily:"Manrope, Poppins, sans-serif",fontSize:32,letterSpacing:1.5,fontWeight:"800",textAnchor:"middle",fill:r,children:"PRESS TO PLAY"}),(0,s.jsx)(d.Text,{x:180,y:338,fontFamily:"Manrope, Poppins, sans-serif",fontSize:18,letterSpacing:2,fontWeight:"500",textAnchor:"middle",fill:u,children:b})]}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[B(.3),z(50)]}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[B(.55),z(25)]}),(0,s.jsx)(c.View,{pointerEvents:"none",style:B(1)}),(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",left:60*x,top:25*x,width:w*x,height:w*x},children:(0,s.jsx)(Zt,{iconUrl:e,width:w*x,height:w*x,iconColor:k,accentColor:S})})]});return n?(0,s.jsx)(c.Pressable,{onPress:n,onPressIn:()=>m(!0),onPressOut:()=>m(!1),onHoverIn:"web"===c.Platform.OS?()=>p(!0):void 0,onHoverOut:"web"===c.Platform.OS?()=>p(!1):void 0,accessibilityRole:"button",accessibilityLabel:f??`Press to play ${t}`,style:{width:o,height:o,borderRadius:o/360*78,transform:[{scale:y?.96:1}]},children:v()}):v()}var qt=c.StyleSheet.create({container:{position:"relative"}});function Xt({visible:e,anchor:t,onClose:n,flipUp:o=!1,align:r="left",gap:i=6,children:l}){if(!e||!t)return null;const a=c.Dimensions.get("window"),d=o?{bottom:Math.max(0,a.height-t.y+i)}:{top:t.y+t.height+i},h="right"===r?{right:Math.max(0,a.width-(t.x+t.width))}:{left:Math.max(0,t.x)};return(0,s.jsxs)(c.Modal,{transparent:!0,visible:!0,animationType:"none",onRequestClose:n,children:[(0,s.jsx)(c.Pressable,{style:c.StyleSheet.absoluteFill,onPress:n}),(0,s.jsx)(c.View,{style:{position:"absolute",...d,...h},onStartShouldSetResponder:()=>!0,children:l})]})}function Qt(e){return e.selectionCard??e.backgroundAlt}function Jt({color:e,style:t}){return(0,s.jsx)(c.View,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function $t({colors:e,count:t=2}){const{width:n}=(0,c.useWindowDimensions)(),o=n>=400,r=n>=640,[i,l]=a.default.useState(0),d=o?i>0?(i-12)/2:"48%":"100%",h=Qt(e);return(0,s.jsx)(c.View,{onLayout:e=>l(e.nativeEvent.layout.width),style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsxs)(c.View,{style:{width:d,minHeight:r?140:112,borderRadius:16,borderWidth:1,padding:r?20:14,gap:r?12:8,justifyContent:"center",alignItems:"flex-start",backgroundColor:h,borderColor:e.border},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:20,width:176,maxWidth:"100%"}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:96,maxWidth:"70%"}})]},n))})}function _t({colors:e,count:t=4}){const{width:n}=(0,c.useWindowDimensions)(),o=n>=640,r=Qt(e);return(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsxs)(c.View,{style:{flexBasis:"48%",flexGrow:1,minWidth:0,flexDirection:o?"row":"column",alignItems:"center",gap:o?14:8,borderRadius:16,borderWidth:1,paddingHorizontal:o?16:12,paddingVertical:o?16:12,backgroundColor:r,borderColor:e.border},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:o?48:40,width:o?48:40,borderRadius:12}}),(0,s.jsxs)(c.View,{style:{flex:o?1:void 0,minWidth:0,alignItems:o?"flex-start":"center",gap:6},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:14,width:80}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:10,width:48}})]}),o&&(0,s.jsx)(Jt,{color:e.textMuted,style:{height:20,width:20,borderRadius:6}})]},n))})}function en({colors:e,count:t=3}){const n=Qt(e);return(0,s.jsx)(c.View,{style:{gap:10,width:"100%"},children:Array.from({length:t}).map((t,o)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:14,paddingVertical:14,backgroundColor:n,borderColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsx)(c.View,{style:{borderRadius:12,paddingHorizontal:12,paddingVertical:10,backgroundColor:e.backgroundAlt},children:(0,s.jsx)(Jt,{color:e.textMuted,style:{height:16,width:176,maxWidth:"100%"}})}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:160,maxWidth:"80%",marginTop:8}})]}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:20,width:20,borderRadius:6}})]},o))})}function tn({colors:e,tileSize:t=116,width:n}){return(0,s.jsxs)(c.View,{style:{width:n??"100%",alignItems:"center",borderRadius:18,borderWidth:1,paddingHorizontal:14,paddingTop:24,paddingBottom:20,gap:4,borderColor:e.border,backgroundColor:Qt(e)},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{width:t,height:t,borderRadius:16}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:44,marginTop:4}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:17,width:128,maxWidth:"80%",marginTop:2}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:11,width:"75%",marginTop:10}})]})}function nn({colors:e}){return(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,marginBottom:12,width:"100%"},children:[0,1,2].map(t=>(0,s.jsx)(Jt,{color:e.textMuted,style:{height:38,flex:1,borderRadius:999}},t))})}function on({colors:e,count:t=3,tileSize:n=116,showTierTabs:o=!1}){const[r,i]=a.default.useState(0),l=r>=420?(r-12)/2:"100%";return(0,s.jsxs)(c.View,{style:{width:"100%"},onLayout:e=>i(e.nativeEvent.layout.width),children:[o&&(0,s.jsx)(nn,{colors:e}),(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:12,width:"100%"},children:Array.from({length:t}).map((t,o)=>(0,s.jsx)(tn,{colors:e,tileSize:n,width:l},o))})]})}function rn({colors:e,groups:t=2,rowsPerGroup:n=2}){const{width:o}=(0,c.useWindowDimensions)(),r=o>=640;return(0,s.jsxs)(c.View,{style:{gap:r?24:16,paddingBottom:64,width:"100%"},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:28,width:72,borderRadius:999}}),(0,s.jsx)(c.View,{style:{gap:16},children:Array.from({length:t}).map((t,o)=>(0,s.jsxs)(c.View,{style:{borderRadius:12,borderWidth:1,borderColor:e.border,backgroundColor:Qt(e),overflow:"hidden"},children:[(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:12,gap:6,backgroundColor:e.backgroundAlt},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:16,width:176,maxWidth:"80%"}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:96}})]}),Array.from({length:n}).map((t,n)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:r?14:12,borderTopWidth:1,borderTopColor:e.border},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:16,flex:1,maxWidth:"58%"}}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:6,flexShrink:0},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:8}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:r?32:28,width:r?48:44,borderRadius:8}})]})]},n))]},o))})]})}function ln({colors:e}){return(0,s.jsx)(c.View,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16,width:"100%"},children:[0,1].map(t=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:14,width:68}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))})}function an({colors:e}){return(0,s.jsxs)(c.View,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:Qt(e),overflow:"hidden",width:"100%"},children:[(0,s.jsxs)(c.View,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,gap:6},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:14,width:40}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),(0,s.jsx)(c.View,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,gap:4},children:[(0,s.jsx)(Jt,{color:e.textMuted,style:{height:14,width:"88%"}}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:12,width:"70%"}})]}),(0,s.jsx)(Jt,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]})}function cn({colors:e,rows:t=2}){return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[(0,s.jsx)(ln,{colors:e}),(0,s.jsx)(c.View,{style:{gap:12,width:"100%"},children:Array.from({length:t}).map((t,n)=>(0,s.jsx)(an,{colors:e},n))})]})}function sn({colors:e,bodyFont:t,message:n,variant:o="category",gameCardCount:r=3,categoryCount:i=2,showTierTabs:l=!1}){const a=n?.trim()||"Loading",d=(()=>{switch(o){case"sport":return(0,s.jsx)(_t,{colors:e,count:Math.max(i,2)});case"event":return(0,s.jsx)(en,{colors:e});case"games":return(0,s.jsx)(on,{colors:e,count:r,showTierTabs:l});case"propositions":return(0,s.jsx)(rn,{colors:e});case"entries":return(0,s.jsx)(cn,{colors:e,rows:2});default:return(0,s.jsx)($t,{colors:e,count:i})}})();return(0,s.jsxs)(c.View,{accessibilityRole:"progressbar",accessibilityLabel:a,accessibilityLiveRegion:"polite",style:{width:"100%"},children:[n?.trim()?(0,s.jsx)(c.Text,{style:{fontSize:14,textAlign:"center",marginBottom:16,color:e.textMuted,fontFamily:t},children:n}):null,d]})}function dn(e){return e.homeTeam&&e.awayTeam?`${e.homeTeam} vs ${e.awayTeam}`:e.homeTeam??e.awayTeam??e.id}function hn(e){return(e??"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"")}function un(e){if(!e||e.quick_pick_only)return!1;const t=hn(e.selection_scope);if("samegamemulti"===hn(e.rule)||!0===e.require_same_event||"singleevent"===t||"sameevent"===t)return!0;const n=[e.game_name,e.game_name_template].map(hn);return n.includes("samegame")||n.includes("samegamemulti")}function fn(e){return(e.eventId??e.event_id)?.trim()||null}function gn(e){const t=new Map;for(const n of e){if(!bn(n))continue;const e=fn(n);if(!e)continue;const o=t.get(e);o?(o.propositionCount+=1,o.homeTeam=pn(o.homeTeam,n.home_team),o.awayTeam=pn(o.awayTeam,n.away_team),o.sport=pn(o.sport,n.sport),o.league=pn(o.league,n.league),o.commenceTime=mn(o.commenceTime,n.commence_time)):t.set(e,{id:e,homeTeam:n.home_team?.trim()||void 0,awayTeam:n.away_team?.trim()||void 0,commenceTime:n.commence_time?.trim()||void 0,sport:n.sport?.trim()||void 0,league:n.league?.trim()||void 0,propositionCount:1})}return[...t.values()].sort((e,t)=>{const n=yn(e.commenceTime),o=yn(t.commenceTime);return n!==o?n-o:e.id.localeCompare(t.id)})}function pn(e,t){const n=t?.trim();return n?e&&e.localeCompare(n)<=0?e:n:e}function yn(e){if(!e)return Number.MAX_SAFE_INTEGER;const t=new Date(e).getTime();return Number.isFinite(t)?t:Number.MAX_SAFE_INTEGER}function mn(e,t){const n=t?.trim();if(!n)return e;if(!e)return n;const o=yn(e),r=yn(n);return r!==o?r<o?n:e:e.localeCompare(n)<=0?e:n}function bn(e){return!1!==e.bettable&&!0!==e.is_suspended&&!0!==e.is_expired&&!0!==e.is_voided&&!0!==e.is_composite_component}function wn(e,t){return t?e.filter(e=>bn(e)&&fn(e)===t):[]}function xn(e,t){return!!t&&e.length>0&&e.every(e=>bn(e)&&fn(e)===t)}var kn={signature:1,premier:2,exclusive:3},Sn=[{id:"signature",label:"Signature Games",shortLabel:"Signature",level:1},{id:"premier",label:"Premier Games",shortLabel:"Premier",level:2},{id:"exclusive",label:"Exclusive Games",shortLabel:"Exclusive",level:3}];function Cn(e){return"number"==typeof e.tier&&Number.isFinite(e.tier)?e.tier:1}function Bn(e,t){return e.filter(e=>Cn(e)===t)}function zn(e){const t=new Set(e.map(Cn));return Sn.filter(e=>t.has(e.level))}function Fn(e){return zn(e)[0]?.id??"signature"}var vn=[4,12],Wn=[5,10,20,50];function Tn(e){return!!e&&!e.quick_pick_only&&"safety_net"===(e.rule??"").trim().toLowerCase()}function An(e){const t=e.payout_structure;return{margin:e.operator_margin??0,perLegProbability:t?.per_leg_probability??.5,perfectMultiple:t?.perfect_prize?.stake_multiple??25,perfectBaseLegs:t?.perfect_prize?.base_legs??6,nearMissBudgetFraction:t?.near_miss?.budget_fraction??.5,roundTo:t?.round_to??5}}function Rn(e,t){return t>0&&e>=t?Math.round(e/t)*t:Math.round(e)}function Ln(e,t){if(t<0||t>e)return 0;let n=1;for(let o=0;o<t;o+=1)n=n*(e-o)/(o+1);return Math.round(n)}function Dn(e,t,n,o){const r=Math.max(0,Math.min(n,t)),i=e*o.perfectMultiple*Math.pow(2,t-o.perfectBaseLegs),l=r>0?e*(1-o.margin)*o.nearMissBudgetFraction/r:0,a=Math.pow(1/o.perLegProbability,t),c=[];let s=Ln(t,0);for(let d=1;d<=r;d+=1)s+=Ln(t,d),c.push(Rn(l*a/s,o.roundTo));return{legs:t,stake:e,allowedMisses:r,perfect:i,nearMiss:c,sweep:i+c.reduce((e,t)=>e+t,0)}}function Mn(e,t){if(t<0||t>e.allowedMisses)return 0;let n=0===t?e.perfect:0;for(let o=Math.max(1,t);o<=e.nearMiss.length;o+=1)n+=e.nearMiss[o-1];return n}function Pn(e){return e.includes(8)?8:e[Math.floor(e.length/2)]}function Hn(e){return e.toLowerCase().replace(/[^a-z]+/g," ").trim()}function On(e,t){const n=Hn(t);return e.permitted_rules?.find(e=>Hn(e.name??"").includes(n))??null}function In(e,t,n){const o=t?.min_propositions??n,r=t?.max_propositions??null;return e.filter(e=>e>=o&&(null==r||e<=r))}function En(e){if(!Tn(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??vn[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??vn[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n),r=On(e,"Extra Shot"),i=On(e,"Double Shot"),l=In(o,r,4).filter(e=>e>1),a=In(o,i,6).filter(e=>e>2);if(0===l.length)return null;const c=[{id:"extra_shot",label:"Extra Shot",allowedMisses:1,stat:"Bigger payout",explain:"Miss one leg and you win the All but 1 prize. Get every leg right and you win both — the Perfect prize on top.",legOptions:l,defaultLegs:Pn(l),ruleId:r?.id??null}],s=!e.permitted_rules?.length||!!i;a.length>0&&s&&c.push({id:"double_shot",label:"Double Shot",allowedMisses:2,stat:"Safer play",explain:"Miss two legs and you win the All but 2 prize. Miss one and you win two prizes. Get every leg right and you win all three — the whole stack.",legOptions:a,defaultLegs:Pn(a),ruleId:i?.id??null});const d=Math.max(e.min_bet??5,.01),h=e.max_bet??null,u=Wn.filter(e=>null===h||e<=h);return{modes:c,defaultModeId:"extra_shot",defaultStake:Math.min(Math.max(20,d),h??20),minStake:d,maxStake:h,quickAdds:u,tagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",pricing:An(e)}}function jn(e){return[{id:`target-${e}`,label:"Perfect pick",stat:"Top payout",detail:["Get every pick right","nothing else pays"],emphasis:!0,expectedCorrect:e}]}function Nn(e,t,n){const o=Math.max(0,e-t),r=Dn(20,e,o,n),i=[];for(let l=0;l<=o;l+=1){const t=Math.round(Mn(r,l));i.push({misses:l,label:`${e-l}/${e}`,multiplier:t/20,payout20:t})}return i}function Gn(e,t){return[{id:"net-1",label:"Extra Shot",stat:"Bigger payout",detail:["One wrong wins a prize","Perfect wins both","Miss twice and the ticket does not pay"],dividends:Nn(e,e-1,t),expectedCorrect:e-1},{id:"net-2",label:"Double Shot",stat:"Safer play",detail:["Two wrong wins a prize","One wrong wins two","Perfect wins all three"],dividends:Nn(e,e-2,t),expectedCorrect:e-2}]}function Yn(e,t){if(!e||e.quick_pick_only)return null;const n=function(e){return(e??"").trim().toLowerCase()}(e.rule),o=t??e.num_propositions??e.min_propositions??e.allowed_propositions?.[0]??0;return"safety_net"===n&&o>0?function(e,t){return{mode:"selection",kind:"safety_net",title:"Choose your safety net",headline:"2 Ways to PLAY, more ways to PAY",heroTagline:"The wider the safety net, the more misses it catches. The narrower it is, the bigger the top prize.",legCount:t,options:Gn(t,An(e)),continueLabel:"Continue to picks"}}(e,o):"exact"===n&&o>0?function(e,t){return{mode:"selection",kind:"exact",title:"All or nothing",headline:"Get it PERFECT, take the top PAY",heroTagline:"Every pick has to land. Miss a single one and the ticket is gone — but a clean sweep pays the biggest prize.",legCount:t,options:jn(t),continueLabel:"Continue to picks"}}(0,o):"pick"===n&&o>0?function(e,t){return{mode:"description",kind:"pick",title:"How it plays",headline:"Every hit PLAYS, every hit PAYS",heroTagline:"No all-or-nothing — your multiplier climbs with every correct pick.",legCount:t,highlights:["Make your yes/no picks across the available markets","Each correct pick pushes your multiplier higher","Land fewer than the full card and you can still cash"],continueLabel:"Continue to picks"}}(0,o):null}function Vn(e){return null!=Yn(e)}var Un=[2500,5e3,7500,1e4,12500,15e3,2e4],Zn=[12,11,10,9,8,7,6];function Kn(e){return!!e&&!e.quick_pick_only&&"pick_your_dividend"===(e.rule??"").trim().toLowerCase()}function qn(e){return Math.round(100*e)/100}function Xn(e,t,n=.21875){const o=Math.pow(2,t),r=e/(1-n)/o,i=Number.isInteger(r),l=qn(r),a=i?r:qn(.96*r);return{legs:t,exactStake:l,stake:a,margin:1-e/(a*o),multiple:e/a,oddsOneIn:o,discounted:!i}}function Qn(e,t=Zn){return{dividend:e,rungs:t.map(t=>Xn(e,t))}}function Jn(e,t){if(!Kn(e)||!e)return null;const n=e.min_propositions??6,o=e.max_propositions??12,r=Zn.filter(e=>e>=n&&e<=o);if(0===r.length)return null;const i=t?.dividends??Un;return{dividends:i.map(e=>Qn(e,r)),defaultDividend:i.includes(1e4)?1e4:i[Math.floor(i.length/2)],defaultLegs:r.includes(9)?9:r[Math.floor(r.length/2)],tagline:"The dividend is set. The win is yours to build."}}function $n(e,t){const n=e.allowed_propositions&&e.allowed_propositions.length>0?e.allowed_propositions.map(Number):[],o=e.min_propositions??e.num_propositions??null,r=e.max_propositions??e.num_propositions??null,i=0===n.length&&null!==o&&null!==r&&r>0,l=n.length>0?n:i?Nt(o,r):[],a=new Map;for(const p of t?.top_payouts??[]){const e=Number(p.proposition_count),t=Number(p.net_payout),n=Number(p.bet_amount??20);!Number.isFinite(e)||e<=0||a.set(e,{count:e,payout:Number.isFinite(t)?t:0,betAmount:Number.isFinite(n)&&n>0?n:20})}for(const p of l){const e=Number(p);a.has(e)||a.set(e,{count:e,payout:0,betAmount:20})}const c=Array.from(a.values()).sort((e,t)=>e.count-t.count),s=l.length>0?Math.max(...l.map(Number)):0,d=Kn(e)?Jn(e):null,h=d?d.dividends.map(e=>({dividend:e.dividend,stakeFrom:Math.min(...e.rungs.map(e=>e.stake))})):void 0,u=d?[]:c.map(e=>({count:e.count,payout20:e.payout>0&&e.betAmount>0?e.payout/e.betAmount*20:0})),f=Yn(e,s),g="safety_net"===f?.kind?(f.options??[]).flatMap(e=>e.dividends?.length?[{id:e.id,label:e.label,tiers:e.dividends.map(e=>({label:e.label,payout20:e.payout20}))}]:[]):[];return{legOptions:l.map(Number),maxLegCount:s,tiers:u,modes:g,pydDividends:h,hasGenericDividends:(n.length>0||i)&&u.some(e=>e.payout20>0),minBet:Math.max(e.min_bet??1,1),maxBet:e.max_bet??null}}function _n({tiers:e,modes:t,pydDividends:n,onPlayCount:o,minBet:r=1,maxBet:i=null,colors:l,bodyFont:d,headingFont:h}){const u=e=>Math.min(Math.max(e,r),i??1/0),[f,g]=(0,a.useState)(()=>String(u(20))),p=parseFloat(f),y=u(Number.isFinite(p)&&p>0?p:20),m=y/20,b=!!(t?.length||n?.length||e.some(e=>e.payout20>0)),w=!!t?.length;if(!b)return null;const x=(0,s.jsxs)(c.View,{style:{marginTop:8,flexDirection:"row",alignItems:"center",gap:4,flexWrap:"wrap"},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:"Example values for a"}),(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",color:l.textMuted,fontFamily:d},children:"$"}),(0,s.jsx)(c.TextInput,{value:f,onChangeText:g,onBlur:()=>g(String(y)),keyboardType:"numeric",accessibilityLabel:"Example bet amount",style:{width:64,paddingVertical:2,paddingHorizontal:5,borderRadius:6,borderWidth:1,borderColor:l.border,backgroundColor:l.background??"#fff",color:l.text,fontSize:11,fontWeight:"600",fontFamily:d}}),(0,s.jsxs)(c.Text,{style:{fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:["bet",null!=i?` (${ht(r)}–${ht(i)})`:` (min ${ht(r)})`,"."]})]});return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[w?(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",letterSpacing:1.4,textTransform:"uppercase",color:l.textMuted,fontFamily:d,marginBottom:6},children:"Compare dividends"}):null,(0,s.jsx)(c.View,{style:{paddingHorizontal:14,paddingVertical:12},children:t?.length?t.map((e,n)=>(0,s.jsxs)(c.View,{style:{borderTopWidth:0===n?0:1,borderTopColor:l.border,paddingTop:0===n?0:8,marginTop:0===n?0:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",marginBottom:4,color:l.text,fontFamily:h},children:e.label}),e.tiers.map(e=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4,gap:14},children:[(0,s.jsxs)(c.Text,{style:{color:l.textMuted,fontSize:11,flex:1,fontFamily:d},children:[e.label," correct"]}),(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:d},children:ht(e.payout20*m)})]},e.label)),n===t.length-1&&x]},e.id)):n?.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Dividend"}),(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Stake from"})]}),n.map(e=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:4},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:l.heading??l.text,fontSize:12,fontFamily:d},children:ht(e.dividend)}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:l.text,fontSize:12,fontFamily:d},children:ht(e.stakeFrom)})]},e.dividend)),(0,s.jsx)(c.Text,{style:{marginTop:8,fontSize:10,fontStyle:"italic",color:l.textMuted,fontFamily:d},children:"You set the dividend before kick-off. Longer climbs start from a smaller stake."})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingBottom:4,marginBottom:4,borderBottomWidth:1,borderBottomColor:l.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Legs played"}),(0,s.jsx)(c.Text,{style:{fontSize:10.5,fontWeight:"700",textTransform:"uppercase",letterSpacing:.4,color:l.primary,fontFamily:d},children:"Payout"})]}),e.map(e=>(0,s.jsxs)(o?c.TouchableOpacity:c.View,{...o?{onPress:()=>o(e.count),accessibilityRole:"button"}:{},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:o?6:4},children:[(0,s.jsxs)(c.Text,{style:{fontWeight:"600",color:o?l.primary:l.text,fontSize:12,fontFamily:d},children:[e.count," legs"]}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:e.payout20>0?l.text:l.textMuted,fontSize:12,fontFamily:d},children:e.payout20>0?ht(e.payout20*m):"—"})]},e.count)),x]})})]})}function eo({tabs:e,active:t,onChange:n,colors:o,bodyFont:r,useShortLabel:i}){return e.length<=1?null:(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,marginBottom:12},children:e.map(e=>{const l=e.id===t;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e.id),accessibilityRole:"button",accessibilityState:{selected:l},style:{flex:1,minWidth:0,borderRadius:999,paddingHorizontal:4,paddingVertical:10,borderWidth:1,borderColor:l?o.primary:o.border,backgroundColor:l?o.primary:o.background??"#fff",alignItems:"center",justifyContent:"center",shadowColor:l?o.primary:o.border,shadowOffset:{width:0,height:4},shadowOpacity:l?.35:.25,shadowRadius:l?6:5,elevation:l?4:2},children:(0,s.jsx)(c.Text,{numberOfLines:1,style:{fontFamily:r,fontSize:10,fontWeight:"700",letterSpacing:-.1,color:l?o.primaryText:o.primary},children:i?e.shortLabel:e.label})},e.id)})})}var to={scrollSnapType:"x mandatory"},no={scrollSnapAlign:"center"};function oo({iconUrl:e,size:t,brandColor:n,iconColor:o,accentColor:r}){return(0,s.jsxs)(c.View,{style:{position:"relative",width:t,height:t},children:[(0,s.jsxs)(d.default,{viewBox:"30 -5 280 280",width:t,height:t,children:[(0,s.jsx)(d.Rect,{x:90,y:55,width:210,height:210,rx:42,fill:n,opacity:.3}),(0,s.jsx)(d.Rect,{x:65,y:30,width:210,height:210,rx:42,fill:n,opacity:.55}),(0,s.jsx)(d.Rect,{x:40,y:5,width:210,height:210,rx:42,fill:n})]}),(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",left:.107*t,top:.107*t,width:.607*t,height:.607*t},children:(0,s.jsx)(Zt,{iconUrl:e,width:.607*t,height:.607*t,iconColor:o,accentColor:r})})]})}function ro({iconUrl:e,gameName:t,size:n,brandColor:o,cardColor:r,iconColor:i,accentColor:l,captionColor:d,bodyFont:u,legOptions:f,onPick:g,colors:p,menuShadow:y}){const[m,b]=(0,a.useState)(!1),[w,x]=(0,a.useState)(null),k=(0,a.useRef)(null),S=(0,a.useRef)(null),[C,B]=(0,a.useState)(null),[z,F]=(0,a.useState)(!1),[v,W]=(0,a.useState)(null),T="web"===c.Platform.OS,A=40+40*f.length+12;(0,a.useLayoutEffect)(()=>{if(!m||!T)return;const e=k.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0,r=window.innerHeight-t.bottom,i=t.top,l=r<A&&i>r;B({top:t.top+o,bottom:t.bottom+o,right:t.right+n,flipUp:l})},[m,T,A]),(0,a.useEffect)(()=>{if(!m)return;if(T){const e=e=>{const t=k.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||S.current&&S.current.contains(n)||b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=k.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);F(r<A&&t>r),W({x:e,y:t,width:n,height:o})})},[m,T,A]);const R=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:p.border},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:p.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase",fontFamily:u},children:"How many picks?"})}),f.map((e,t)=>(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{b(!1),x(null),g(e)},onMouseEnter:()=>x(e),onMouseLeave:()=>x(t=>t===e?null:t),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:p.border,backgroundColor:w===e?p.backgroundAlt:"transparent"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:14,fontWeight:"600",color:p.text,fontFamily:u},children:[e," picks"]}),(0,s.jsx)(c.Text,{style:{backgroundColor:ee(p.primary,.14),color:p.primary,paddingVertical:2,paddingHorizontal:6,borderRadius:4,fontSize:10,fontWeight:"700",letterSpacing:.5,overflow:"hidden",fontFamily:u},children:"QP"})]},e))]});return(0,s.jsxs)(c.View,{ref:k,style:{position:"relative"},children:[(0,s.jsx)(Kt,{iconUrl:e,gameName:t,onPress:()=>b(e=>!e),size:n,brandColor:o,cardColor:r,iconColor:i,accentColor:l,captionColor:d}),m&&T&&C&&"undefined"!=typeof document&&(0,h.createPortal)((0,s.jsx)("div",{ref:S,style:{position:"absolute",top:C.flipUp?void 0:C.bottom+6,bottom:C.flipUp&&"undefined"!=typeof window?window.innerHeight-C.top+6:void 0,left:C.right,transform:"translateX(-100%)",zIndex:20,backgroundColor:p.background,border:`1px solid ${p.border}`,borderRadius:8,minWidth:180,boxShadow:y,overflow:"hidden",fontFamily:u},children:R}),document.body),(0,s.jsx)(Xt,{visible:m&&!T,anchor:v,onClose:()=>b(!1),flipUp:z,align:"right",children:(0,s.jsx)(c.View,{style:{elevation:6,backgroundColor:p.background,borderRadius:8,borderWidth:1,borderColor:p.border,minWidth:180,shadowColor:"#000",shadowOffset:{width:0,height:12},shadowOpacity:.16,shadowRadius:24,overflow:"hidden"},children:R})})]})}function io({games:e,selectedGame:t,onSelectGame:n,loading:o,error:r,theme:i,colorScheme:l,showTier:d=!1,showCategory:h=!1,showTierFilter:u=!1,onPropositionCountChange:f,onPropositionCountSelected:g,onQuickPickGame:p,maxPayouts:y}){const m=_(i,l),b=m.colors,w=D(m),x=ae(m),k=ce(m),S=B(m),C=le(m),F=T(m),v="dark"===m.colorScheme,W=(0,a.useMemo)(()=>zn(e),[e]),[A,R]=(0,a.useState)(()=>Fn(e));(0,a.useEffect)(()=>{0!==W.length&&(W.some(e=>e.id===A)||R(W[0].id))},[W,A]);const L=(0,a.useMemo)(()=>!u||W.length<=1?e:Bn(e,kn[A]),[e,u,W.length,A]),M=e=>e.allowed_propositions&&e.allowed_propositions.length>0&&e.game_name.replace(/\s+\d+\s*$/,"").trim()||e.game_name,P=(e,t)=>{e.quick_pick_only&&p&&t>0?p(e,t):(t>0&&!un(e)&&f?.(t),n(e),g?.())},[O,I]=(0,a.useState)(0),E=O>0&&O<400,j=E?108:124,N=O>0&&O<380,G=O>0?Math.min(.86*O,380):0,Y=G>0?Math.max((O-G)/2,4):4,V=G+14,U=L.length>1,Z=U&&Y>=48,K=(0,a.useRef)(null),q=(0,a.useRef)(null),[X,Q]=(0,a.useState)(0),J=e=>{const t=Math.max(0,Math.min(e,L.length-1));Be(K,t*V),Q(t)};(0,a.useEffect)(()=>{E&&0!==O&&Be(q,Math.max(0,80*X-O/2+40))},[X,E,O]),(0,a.useEffect)(()=>{Be(K,0,!1),Q(0)},[A]);const $={shadowColor:"#000",shadowOpacity:v?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};return o?(0,s.jsx)(on,{colors:H(m),count:Math.min(Math.max(e.length,2),4),showTierTabs:u&&W.length>1}):r?(0,s.jsx)(c.View,{style:ao.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.error,fontFamily:x},children:r})}):0===e.length?(0,s.jsx)(c.View,{style:ao.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:x},children:"No games available"})}):(0,s.jsxs)(c.View,{style:{flexDirection:"column"},onLayout:e=>I(e.nativeEvent.layout.width),children:[u&&(0,s.jsx)(eo,{tabs:W,active:A,onChange:R,colors:b,bodyFont:x,useShortLabel:N}),0===L.length?(0,s.jsx)(c.View,{style:ao.centerContainer,children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:x},children:"No games in this collection"})}):(0,s.jsxs)(c.View,{style:{position:"relative"},children:[(0,s.jsx)(c.ScrollView,{ref:K,horizontal:!0,showsHorizontalScrollIndicator:!1,decelerationRate:"fast",snapToInterval:V>0?V:void 0,snapToAlignment:"start",style:to,scrollEventThrottle:16,onScroll:e=>{if(V<=0)return;const t=Math.round(e.nativeEvent.contentOffset.x/V);Q(e=>e===t?e:t)},contentContainerStyle:{alignItems:"stretch",gap:14,paddingLeft:Y,paddingRight:Y,paddingBottom:8},children:L.map(e=>{const o=Ot(e),r=function(e){const t=e.available_days;if(!t||0===t.length)return null;const n=t.map(e=>It[e]??`Day ${e}`);return 1===n.length?n[0]:n.slice(0,-1).join(", ")+" & "+n[n.length-1]}(e),i=t?.id===e.id,l=String(e.id),a=Ct(e),u=e.description||e.rule,f=e.call_to_action?.trim()||null,{legOptions:B,maxLegCount:v,tiers:W,modes:T,pydDividends:A,hasGenericDividends:R,minBet:L,maxBet:D}=$n(e,y?.[e.id]),H=ge(e),O=!o&&r?`Available ${r}`:null;return(0,s.jsxs)(c.View,{style:[ao.gameCard,no,{width:G||void 0,flexGrow:0,flexShrink:0,borderColor:i?b.primary:b.border,backgroundColor:i?b.infoBg:b.background??w,opacity:o?1:.5},$],pointerEvents:o?"auto":"none",children:[e.quick_pick_only&&p&&B.length>1?(0,s.jsx)(ro,{iconUrl:H,gameName:M(e),size:j,brandColor:b.primary,cardColor:w,iconColor:b.primaryText,accentColor:F,captionColor:b.textMuted,bodyFont:x,legOptions:B.map(Number),onPick:t=>P(e,t),colors:b,menuShadow:C}):(0,s.jsx)(Kt,{iconUrl:H,gameName:M(e),onPress:()=>P(e,v),size:j,brandColor:b.primary,cardColor:w,iconColor:b.primaryText,accentColor:F,captionColor:b.primary}),(0,s.jsxs)(c.Text,{style:{marginTop:8,fontFamily:k,fontSize:13,letterSpacing:-.52,lineHeight:13},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"800",color:b.primary},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"600",color:ee(b.primary,.85)},children:"NO"})]}),(0,s.jsxs)(c.View,{style:{marginTop:2,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},children:[(0,s.jsx)(c.Text,{style:{fontFamily:k,fontWeight:"600",fontSize:E?19:21,color:S,letterSpacing:-.19,lineHeight:1.2*(E?19:21),textAlign:"center",paddingHorizontal:4},children:M(e)}),(0,s.jsx)(Ee,{variant:"icon",panel:Ce(e),content:u||"Pick outcomes and land the payout for this game.",theme:m,title:M(e),label:`How to play ${M(e)}`,extra:(0,s.jsx)(_n,{tiers:R?W:[],modes:T,pydDividends:A,onPlayCount:B.length>1?t=>P(e,t):void 0,minBet:L,maxBet:D,colors:b,bodyFont:x,headingFont:k}),colors:b,bodyFont:x,headingFont:k})]}),f?(0,s.jsx)(c.Text,{style:{marginTop:6,fontSize:13,lineHeight:17,fontWeight:"700",color:b.primary,textAlign:"center",fontFamily:x},children:f}):null,u?(0,s.jsx)(c.Text,{style:{marginTop:8,fontSize:12.5,lineHeight:18,color:b.textMuted,textAlign:"center",fontFamily:x},children:u}):null,a.enabled&&(0,s.jsx)(c.View,{style:[ao.jackpotBadge,{backgroundColor:`${b.warning}15`,marginTop:8}],children:(0,s.jsxs)(c.Text,{style:[ao.jackpotBadgeText,{color:b.warning,fontFamily:x}],children:["★ ",a.progressive?a.amount>0?ht(a.amount):a.limit>0?`Up to ${ht(a.limit)}`:"Jackpot":ht(a.amount)]})}),(h||d)&&(0,s.jsxs)(c.View,{style:[ao.tagsRow,{justifyContent:"center",marginTop:8}],children:[h&&e.category&&(0,s.jsx)(c.View,{style:[ao.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[ao.tagText,{color:z(m),fontFamily:x}],children:e.category})}),h&&(0,s.jsx)(c.View,{style:[ao.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[ao.tagText,{color:z(m),fontFamily:x}],children:e.rule})}),h&&e.lotto_type&&(0,s.jsx)(c.View,{style:[ao.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[ao.tagText,{color:z(m),fontFamily:x}],children:e.lotto_type})}),d&&null!=e.tier&&(0,s.jsx)(c.View,{style:[ao.tag,{backgroundColor:b.backgroundAlt}],children:(0,s.jsxs)(c.Text,{style:[ao.tagText,{color:z(m),fontFamily:x}],children:["Tier ",e.tier]})})]}),0===B.length&&(0,s.jsx)(c.View,{style:{marginTop:8,width:"100%"},children:(0,s.jsx)(Fe,{theme:m,variant:"primary",size:"sm",onPress:()=>{n(e),g?.()},children:"Select game"})}),O?(0,s.jsx)(c.View,{style:{marginTop:"auto",width:"100%",paddingTop:12},children:(0,s.jsx)(c.Text,{style:{fontSize:11,lineHeight:15,fontWeight:"600",color:b.text,textAlign:"center",fontFamily:x},children:O})}):null]},l)})}),Z&&(0,s.jsx)(s.Fragment,{children:[-1,1].map(e=>{const t=e<0?X>0:X<L.length-1;return(0,s.jsx)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:e<0?"Previous game":"Next game",onPress:()=>J(X+e),disabled:!t,style:{position:"absolute",top:"38%",left:e<0?2:void 0,right:e>0?2:void 0,width:44,height:44,borderRadius:22,borderWidth:1,borderColor:b.border,backgroundColor:ee(b.background??"#fff",.94),alignItems:"center",justifyContent:"center",opacity:t?1:.3,zIndex:1,...$},children:(0,s.jsx)(c.Text,{style:{fontSize:18,lineHeight:20,color:b.primary,fontFamily:x},children:e<0?"‹":"›"})},e)})})]}),L.length>0&&U&&(0,s.jsx)(c.View,{style:{flexDirection:"row",justifyContent:"center",flexWrap:"wrap",paddingTop:4,paddingBottom:8},children:L.map((e,t)=>(0,s.jsx)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:`Go to ${M(e)}`,onPress:()=>J(t),style:{paddingVertical:18.5,paddingHorizontal:5,marginVertical:-18.5,alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.View,{style:{width:t===X?22:7,height:7,borderRadius:999,backgroundColor:t===X?b.primary:ee(b.primary,.25)}})},e.id))}),L.length>0&&U&&(0,s.jsxs)(c.View,{style:{borderTopWidth:1,borderTopColor:b.border,paddingTop:10,marginTop:2},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.6,color:b.textMuted,fontFamily:k,marginBottom:8},children:"All games"}),(0,s.jsx)(lo,{isNarrow:E,stripRef:q,children:L.map((e,t)=>(0,s.jsxs)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityState:{selected:t===X},onPress:()=>{J(t),Ot(e)&&(e=>{const{legOptions:t,maxLegCount:n}=$n(e,y?.[e.id]);e.quick_pick_only&&p&&t.length>1||P(e,n)})(e)},style:{alignItems:"center",gap:4,paddingHorizontal:4,paddingVertical:6,borderRadius:16,borderWidth:1,borderColor:t===X?b.primary:"transparent",...E?{width:76,flexGrow:0,flexShrink:0}:{flexGrow:1,flexBasis:84}},children:[(0,s.jsx)(oo,{iconUrl:ge(e),size:E?44:52,brandColor:b.primary,iconColor:b.primaryText,accentColor:F}),(0,s.jsx)(c.Text,{numberOfLines:2,style:{fontSize:11,fontWeight:"700",lineHeight:13,textAlign:"center",letterSpacing:-.11,color:t===X?b.primary:S,fontFamily:k},children:M(e)})]},e.id))})]})]})}function lo({isNarrow:e,stripRef:t,children:n}){return e?(0,s.jsx)(c.ScrollView,{ref:t,horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{gap:4},children:n}):(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",gap:4},children:n})}var ao=c.StyleSheet.create({centerContainer:{alignItems:"center",justifyContent:"center",padding:32,gap:8},gameCard:{flexDirection:"column",alignItems:"center",borderWidth:1,borderRadius:24,paddingHorizontal:20,paddingTop:22,paddingBottom:20},jackpotBadge:{alignSelf:"center",flexDirection:"row",alignItems:"center",gap:2,paddingHorizontal:8,paddingVertical:2,borderRadius:999},jackpotBadgeText:{fontSize:10,fontWeight:"700"},tagsRow:{flexDirection:"row",flexWrap:"wrap",gap:4},tag:{paddingHorizontal:6,paddingVertical:2,borderRadius:4},tagText:{fontSize:12}}),co=class{constructor(e){this.inflight=new Map,this.cache=new Map,this.apiUrl=e.apiUrl,this.apiKey=e.apiKey,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.getAuthHeaders=e.getAuthHeaders}invalidateCache(){this.cache.clear()}invalidate(){this.invalidateCache()}async request(e,t,n){const o=`${this.apiUrl}${e}`,r=(t?.method??"GET").toUpperCase(),i="GET"===r,l=i,a=!i&&!n?.idempotent,c=`${r} ${o}`;if(l){const e=this.cache.get(c);if(e&&Date.now()-e.at<5e3)return e.value;const t=this.inflight.get(c);if(t)return t}const s=l?this.cache.get(c):void 0,d=(async()=>{let e;try{const n=this.getAuthHeaders?await this.getAuthHeaders():void 0;e=await this.fetchImpl(o,{...t,headers:{"Content-Type":"application/json",...this.apiKey?{"X-API-Key":this.apiKey}:{},...n??{},...s?.etag?{"If-None-Match":s.etag}:{},...t?.headers}})}catch(r){throw r}if(304===e.status&&s)return l&&this.cache.set(c,{at:Date.now(),value:s.value,etag:s.etag}),s.value;if(!e.ok){let t=`API request failed: ${e.status} ${e.statusText}`;try{const n=await e.json();422===e.status&&n.detail?Array.isArray(n.detail)?t=n.detail.map(e=>`${Array.isArray(e.loc)?e.loc.join("."):"field"}: ${e.msg}`).join("; "):"string"==typeof n.detail?t=n.detail:"object"==typeof n.detail&&(t=JSON.stringify(n.detail)):n.message?t=n.message:n.error&&(t=n.error)}catch{}throw new Error(t)}const n=await e.json();if(l){const t=e.headers.get("ETag")??void 0;this.cache.set(c,{at:Date.now(),value:n,etag:t})}return n})();return l?(this.inflight.set(c,d),d.catch(()=>{}).finally(()=>{this.inflight.delete(c)})):a&&d.finally(()=>this.invalidateCache()).catch(()=>{}),d}async getGames(e){const t=new URLSearchParams;e?.category&&t.append("category",e.category),e?.jurisdiction&&t.append("jurisdiction",e.jurisdiction),e?.sport&&t.append("sport",e.sport);const n=t.toString(),o=n?`/games?${n}`:"/games",r=await this.request(o);return{games:r.payload||[],howToPlayMarkdown:r.how_to_play_markdown??null}}async getGame(e){return(await this.request(`/games/${e}`)).payload}async getPropositions(e){const t=new URLSearchParams;e?.event_id&&t.append("event_id",e.event_id),e?.sport&&t.append("sport",e.sport),e?.category&&t.append("category",e.category);const n=t.toString(),o=n?`/propositions?${n}`:"/propositions";return(await this.request(o)).payload||[]}async getSports(){return(await this.request("/propositions/sports")).sports||[]}async getPropositionsByIds(e){if(0===e.length)return[];const t=new URLSearchParams({ids:e.join(","),include_expired:"true"});return(await this.request(`/propositions?${t.toString()}`)).payload||[]}async getProposition(e){const t=(await this.request(`/propositions/${e}?include_expired=true`)).payload;return Array.isArray(t)?t.find(t=>t.id===e)??t[0]:t}async getGameEntries(e){const t=new URLSearchParams;null!=e?.user_id&&t.append("user_id",String(e.user_id)),null!=e?.pending&&t.append("pending",String(e.pending));const n=t.toString(),o=n?`/game-entries?${n}`:"/game-entries";return((await this.request(o)).payload||[]).map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),null!=t.stake&&null==t.bet_amount&&(t.bet_amount=Number(t.stake)),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t})}async createGameEntry(e){const t=e.proposition_ids.map(t=>({proposition_id:t,user_prediction:e.selections?.[t]??"yes"})),n={game_id:e.game_id,user_id:e.user_id,propositions:t};null!=e.stake&&(n.stake=e.stake),null!=e.rule_id&&(n.rule_id=e.rule_id);const o=(await this.request("/game-entries",{method:"POST",body:JSON.stringify(n)})).payload;return null!=o.stake&&null==o.bet_amount&&(o.bet_amount=Number(o.stake)),o}async getPayoutsDue(e){const t=new URLSearchParams;null!=e?.game_id&&t.set("game_id",String(e.game_id)),null!=e?.limit&&t.set("limit",String(e.limit)),null!=e?.offset&&t.set("offset",String(e.offset));const n=t.toString();return await this.request(n?`/game-entries/payouts/due?${n}`:"/game-entries/payouts/due")}async getEntryPayout(e){return(await this.request(`/game-entries/${e}/payout`)).payload}async markEntryPaidOut(e){const t=await this.request(`/game-entries/${e}/payout/mark-paid-out`,{method:"POST",body:JSON.stringify({})});return this.invalidate(),t.payload}async updateGameEntryResult(e,t){return(await this.request(`/game-entries/${e}/result`,{method:"POST",body:JSON.stringify(t)})).payload}async getGameMaxPayout(e,t){const n=null!=t?`?bet_amount=${encodeURIComponent(String(t))}`:"";return(await this.request(`/games/${e}/max-payout${n}`)).payload}async getGamesMaxPayouts(e,t){if(0===e.length)return{};const n=new URLSearchParams({ids:e.join(",")});null!=t&&n.set("bet_amount",String(t));const o=await this.request(`/games/max-payouts?${n.toString()}`),r={};for(const[i,l]of Object.entries(o.payload||{}))r[Number(i)]=l;return r}async getEntryPreview(e,t){return(await this.request(`/games/${e}/preview`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async evaluateRule(e,t){return(await this.request(`/games/${e}/evaluate-rule`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}async calculatePayout(e,t){return(await this.request(`/games/${e}/calculate-payout`,{method:"POST",body:JSON.stringify(t)},{idempotent:!0})).payload}};function so(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(null),[c,s]=(0,a.useState)(!n?.skip),[d,h]=(0,a.useState)(null),u=t?`${t.category||""}_${t.jurisdiction||""}_${t.sport||""}`:"",f=(0,a.useRef)(t);f.current=t;const g=n?.skip??!1,p=(0,a.useCallback)(async()=>{if(!g)try{s(!0),h(null);const t=await e.getGames(f.current);r(t.games),l(t.howToPlayMarkdown)}catch(t){h(t instanceof Error?t.message:"Failed to fetch games")}finally{s(!1)}},[e,u,g]);return(0,a.useEffect)(()=>{p()},[p]),{games:o,howToPlayMarkdown:i,loading:c,error:d,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await p()},[e,p])}}function ho(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(!n?.skip),[c,s]=(0,a.useState)(null),d=n?.skip??!1,h=t?`${t.event_id||""}_${t.sport||""}_${t.category||""}`:"",u=(0,a.useRef)(t);u.current=t;const f=(0,a.useCallback)(async()=>{if(!d)try{l(!0),s(null);const t=await e.getPropositions(u.current);r(t)}catch(t){s(t instanceof Error?t.message:"Failed to fetch propositions")}finally{l(!1)}},[e,h,d]);return(0,a.useEffect)(()=>{f()},[f]),{propositions:o,loading:i,error:c,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await f()},[e,f])}}function uo(e,t){const[n,o]=(0,a.useState)([]),[r,i]=(0,a.useState)(!t?.skip),[l,c]=(0,a.useState)(null),s=t?.skip??!1,d=(0,a.useCallback)(async()=>{if(!s)try{i(!0),c(null),o(await e.getSports())}catch(t){c(t instanceof Error?t.message:"Failed to fetch sports")}finally{i(!1)}},[e,s]);return(0,a.useEffect)(()=>{d()},[d]),{sports:n,loading:r,error:l,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await d()},[e,d])}}function fo(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)(!n?.skip),[c,s]=(0,a.useState)(null),d=n?.skip??!1,h=t?`${t.user_id??""}_${t.pending??""}`:"",u=(0,a.useRef)(t);u.current=t;const f=(0,a.useCallback)(async()=>{if(!d)try{l(!0),s(null);const t=await e.getGameEntries(u.current);r(t)}catch(t){s(t instanceof Error?t.message:"Failed to fetch entries")}finally{l(!1)}},[e,h,d]);return(0,a.useEffect)(()=>{f()},[f]),{entries:o,loading:i,error:c,refetch:(0,a.useCallback)(async()=>{e.invalidate(),await f()},[e,f])}}function go(e,t,n){const[o,r]=(0,a.useState)({}),[i,l]=(0,a.useState)(!1),c=n?.skip??!1,s=n?.betAmount,d=(0,a.useRef)(new Set);return(0,a.useEffect)(()=>{if(c||0===t.length)return;const n=t.filter(e=>!(e.id in o)&&!d.current.has(e.id));if(0===n.length)return;for(const e of n)d.current.add(e.id);let i=!1;return l(!0),(async()=>{try{const t=await e.getGamesMaxPayouts(n.map(e=>e.id),s);i||r(e=>({...e,...t}))}catch{}finally{i||l(!1)}})(),()=>{i=!0}},[e,t.map(e=>e.id).join(","),c,s]),{maxPayouts:o,loading:i,refetchGame:(0,a.useCallback)(async(t,n)=>{if(!c)try{const o=await e.getGamesMaxPayouts([t],n??s);o[t]&&r(e=>({...e,[t]:o[t]}))}catch{}},[e,c,s])}}function po(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{createEntry:async t=>{try{n(!0),r(null);const o=await e.createGameEntry(t);return l(o),o}catch(o){const e=o instanceof Error?o.message:"Failed to create entry";throw r(e),new Error(e)}finally{n(!1)}},loading:t,error:o,entry:i}}function yo(e){const[t,n]=(0,a.useState)(e?"sport":"game"),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)({}),[c,s]=(0,a.useState)(null);return{step:t,selectedGame:o,selections:i,placedEntry:c,setGameOnly:e=>{r(e)},clearSelectedGame:()=>{r(null),l({})},goToSportSelection:e=>{e&&r(e),n("sport")},goToConfirmation:()=>{n("confirm")},goToSuccess:e=>{s(e),n("success")},goBack:()=>{"confirm"===t?n("sport"):"sport"===t&&(n("game"),r(null),l({}))},reset:()=>{n("game"),r(null),l({}),s(null)},toggleSelection:(e,t)=>{l(n=>{const o={...n};return o[e]===t?delete o[e]:o[e]=t,o})}}}function mo(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{preview:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.getEntryPreview(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to preview entry";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}}var bo=(0,a.createContext)(null),wo={};function xo(){const e=(0,a.useContext)(bo);if(!e)throw new Error("usePlaceEntry must be used within a <PlaceEntryProvider>");return e}function ko({onPress:e,onDoubleClick:t,label:n="QUICKPICK",size:o="md",yesColor:r,noColor:i,theme:l}){const h=(0,a.useContext)(bo),u=l??h?.theme??E,f=ie(u),g=u.colors,p=r??v(u),y=i??W(u),m="sm"===o,b=m?f.space.xs:f.space.sm,w=m?6:8,x=m?f.fontSize.sm:f.fontSize.md,k=m?8.5:10,S=(0,a.useRef)(0);return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{if(e(),t){const e=Date.now();e-S.current<300?(S.current=0,t()):S.current=e}},activeOpacity:.8,accessibilityRole:"button",accessibilityLabel:n,style:[So.container,{borderColor:ee(g.border,.6),borderRadius:f.radius.sm,minHeight:f.touchTarget.min}],children:[(0,s.jsxs)(c.View,{style:So.topRow,children:[(0,s.jsxs)(d.default,{style:c.StyleSheet.absoluteFill,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[(0,s.jsx)(d.Polygon,{points:"0,0 53,0 47,100 0,100",fill:p}),(0,s.jsx)(d.Polygon,{points:"53,0 100,0 100,100 47,100",fill:y}),(0,s.jsx)(d.Line,{x1:"53",y1:"0",x2:"47",y2:"100",stroke:"rgba(255,255,255,0.85)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]}),(0,s.jsx)(c.View,{style:[So.half,{paddingHorizontal:b,paddingVertical:w}],children:(0,s.jsx)(c.Text,{style:[So.halfLabel,{fontSize:x}],numberOfLines:1,children:"Yes"})}),(0,s.jsx)(c.View,{style:[So.half,{paddingHorizontal:b,paddingVertical:w}],children:(0,s.jsx)(c.Text,{style:[So.halfLabel,{fontSize:x}],numberOfLines:1,children:"No"})})]}),(0,s.jsx)(c.View,{style:[So.labelRow,{backgroundColor:g.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[So.labelText,{color:g.buttonSecondaryText,fontSize:k,letterSpacing:.14*k,fontFamily:u.fonts?.mono??ae(u)}],numberOfLines:1,children:n})})]})}var So=c.StyleSheet.create({container:{borderWidth:1,overflow:"hidden",flexShrink:0,flexDirection:"column",width:"100%",minWidth:92},topRow:{flexDirection:"row",flex:1,flexShrink:0},half:{flex:1,flexShrink:0,alignItems:"center",justifyContent:"center"},halfLabel:{color:"#ffffff",fontWeight:"600",letterSpacing:.2,flexShrink:0,textAlign:"center"},labelRow:{paddingTop:3,paddingBottom:4,alignItems:"center",justifyContent:"center"},labelText:{fontWeight:"700",textAlign:"center",flexShrink:0}}),Co={today:"Today",weekend:"This weekend",next7:"Next 7 days"},Bo=["today","weekend","next7"];function zo(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Fo(e,t,n){if(!e)return!1;const o=new Date(e);if(Number.isNaN(o.getTime()))return!1;const{start:r,end:i}=function(e,t){const n=function(e){const t=new Date(e);return t.setHours(0,0,0,0),t}(t);switch(e){case"today":return{start:n,end:zo(n,1)};case"weekend":{const e=n.getDay(),t=zo(n,0===e?-1:(6-e)%7);return{start:t<n?n:t,end:zo(t,2)}}case"next7":return{start:n,end:zo(n,7)}}}(t,n);return o>=r&&o<i}function vo(e,t,n){if(!t||(o=n)&&o.split(" vs ").length>1)return null;var o;const r=e.outcome||e.description;return r?t(r):null}var Wo=12;function To({theme:e,value:t,onYes:n,onNo:o,disabled:r}){const i=e.colors,l=(e,t)=>({paddingVertical:6,paddingHorizontal:14,borderRadius:8,borderWidth:1,backgroundColor:e?t:"transparent",borderColor:e?"transparent":i.border,opacity:r?.5:1}),a=e=>({color:e?"#ffffff":i.text,fontSize:13,fontWeight:"600",lineHeight:16});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:r,accessibilityState:{selected:"yes"===t},style:l("yes"===t,v(e)),children:(0,s.jsx)(c.Text,{style:a("yes"===t),children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:r,accessibilityState:{selected:"no"===t},style:l("no"===t,W(e)),children:(0,s.jsx)(c.Text,{style:a("no"===t),children:"No"})})]})}function Ao({theme:e,variant:t,disabled:n,onPress:o,children:r}){const i=e.colors,[l,d]=(0,a.useState)(!1),h="primary"===t?{bg:i.buttonPrimary,bgHover:i.buttonPrimaryHover,fg:i.buttonPrimaryText,border:i.buttonPrimary}:{bg:i.buttonSecondary,bgHover:i.buttonSecondaryHover,fg:i.buttonSecondaryText,border:i.border};return(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:n,activeOpacity:.85,...ze(()=>d(!0),()=>d(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:h.border,backgroundColor:l&&!n?h.bgHover:h.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:(0,s.jsx)(c.Text,{style:{color:h.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:r})})}function Ro({matchup:e,renderTeamLogo:t,altText:n,mutedColor:o,size:r="sm"}){const{width:i}=(0,c.useWindowDimensions)(),l=i>=640,[a,d=""]=e.split(" vs "),h=d.length>0,u="md"===r&&l?16:14;if(!h)return(0,s.jsx)(c.Text,{style:{color:n,fontSize:u,fontWeight:"600"},children:e});const f=e=>(0,s.jsxs)(c.View,{style:Po.teamLogoRowWrap,children:[t?.(e),(0,s.jsx)(c.Text,{style:{color:n,fontSize:u,fontWeight:"600",flexShrink:1},children:e})]}),g=(0,s.jsx)(c.Text,{style:{color:o,fontSize:12,flexShrink:0},children:"vs"});return l?(0,s.jsxs)(c.View,{style:Po.matchupTeamsRow,children:[f(a),g,f(d)]}):(0,s.jsxs)(c.View,{style:Po.matchupTeamsStacked,children:[g,(0,s.jsxs)(c.View,{style:{flexShrink:1,minWidth:0},children:[f(a),f(d)]})]})}function Lo({label:e,colors:t,onOpenChange:n}){const o="OR"===e?"If either wins, you win.":"Both must win for Yes.",[r,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{n?.(r)},[r,n]),(0,s.jsxs)(c.View,{style:{position:"relative",zIndex:r?9999:0,elevation:r?9999:0},children:[(0,s.jsx)(c.Pressable,{onPress:()=>i(e=>!e),onHoverIn:()=>i(!0),onHoverOut:()=>i(!1),hitSlop:6,accessibilityLabel:o,accessibilityRole:"button",accessibilityState:{expanded:r},children:(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:6,backgroundColor:ee(t.primary,.14),borderWidth:1,borderColor:ee(t.primary,.45)},children:(0,s.jsx)(c.Text,{style:{color:t.primary,fontSize:10,fontWeight:"700",lineHeight:10,textTransform:"uppercase",letterSpacing:.25},children:e})})}),r&&(0,s.jsx)(c.View,{style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:192,maxWidth:352,paddingHorizontal:10,paddingVertical:6,borderRadius:6,backgroundColor:t.backgroundAlt??"#fff",borderWidth:1,borderColor:t.border??ee(t.primary,.3),shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.12,shadowRadius:4,elevation:9999},children:(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:11,lineHeight:15},children:o})})]})}function Do({prop:e,colors:t,size:n="sm",componentById:o}){const{width:r}=(0,c.useWindowDimensions)(),i=r>=640,l=nt(e,o),d=e.description??e.proposition??"",h="md"===n?i?16:14:i?14:12,u="md"===n?"500":"400",f=t.textMuted??t.textAltMuted??t.text,[g,p]=(0,a.useState)(!1);if(!l)return(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u,flex:1},children:d});const{operator:y,legs:m}=l;return m.some(e=>e.eventLabel)?(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,flexDirection:"column",gap:8,...g&&{zIndex:9999,elevation:9999,position:"relative"}},children:m.map((e,n)=>(0,s.jsxs)(c.View,{style:{minWidth:0},children:[n>0&&(0,s.jsx)(c.View,{style:{marginBottom:4},children:(0,s.jsx)(Lo,{label:y,colors:t,onOpenChange:p})}),e.eventLabel&&(0,s.jsx)(c.Text,{style:{color:f,fontSize:i?12:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.25},children:e.eventLabel}),(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u},children:e.text})]},n))}):(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,...g&&{zIndex:9999,elevation:9999,position:"relative"}},children:(0,s.jsx)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},children:m.map((e,n)=>(0,s.jsxs)(a.default.Fragment,{children:[n>0&&(0,s.jsx)(Lo,{label:y,colors:t,onOpenChange:p}),(0,s.jsx)(c.Text,{style:{color:t.text,fontSize:h,fontWeight:u},children:e.text})]},n))})})}function Mo({game:e,propositions:t,selections:n,onToggleSelection:o,onNext:r,onBack:i,loading:l,error:h,theme:u,colorScheme:f,hideActions:g=!1,initialSport:p,renderTeamLogo:y,disableQuickPick:m=!1,selectedPropositionCount:b,onPropositionCountChange:w,gameCategory:x,headerExtra:k}){const S=(0,a.useContext)(bo),C=S?.sportBaseKey,z=function(e,t){const[n,o]=(0,a.useState)([]),r=(0,a.useRef)(new Set),i=(0,a.useMemo)(()=>{const e=new Map;for(const n of t)e.set(n.id,n);for(const t of n)e.set(t.id,t);return e},[t,n]),l=(0,a.useMemo)(()=>e?function(e){const t=new Set;for(const n of e)if(_e(n))for(const e of et(n))t.add(e);return[...t]}(t).filter(e=>!i.has(e)):[],[e,t,i]);return(0,a.useEffect)(()=>{if(!e||0===l.length)return;const t=l.filter(e=>!r.current.has(e));if(0===t.length)return;for(const e of t)r.current.add(e);let n=!1;return e.getPropositionsByIds(t).then(e=>{!n&&e.length>0&&o(t=>[...t,...e])}).catch(()=>{}),()=>{n=!0}},[e,l]),i}((0,a.useMemo)(()=>S?.apiUrl?new co({apiUrl:S.apiUrl,apiKey:S.apiKey,fetchImpl:S.fetchImpl,getAuthHeaders:S.getAuthHeaders}):null,[S?.apiUrl,S?.apiKey,S?.fetchImpl,S?.getAuthHeaders]),t),F=_(u,f),v=F.colors,W=D(F),T=P(F),A=v.matchupHeader??(e.color?ee(e.color,.14):M(F)),R=v.textAlt??v.text;ce(F);const L=ae(F);B(F);const{width:O}=(0,c.useWindowDimensions)(),I=O>=640,E=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(F),j=!!(e.allowed_propositions&&e.allowed_propositions.length>0),{min:N,max:G}=St(e,b),Y=N,V=G,[U,Z]=a.default.useState(()=>new Set(Object.keys(Et(t,x,C))));a.default.useEffect(()=>{const e=Et(t,x,C),n=Object.keys(e);n.length>0&&Z(e=>n.every(t=>e.has(t))?e:new Set(n))},[t]);const K=Y>0&&Y===V,q=Y||1,X=V||t.length,Q=V||Y||t.length,[J,$]=a.default.useState(Q),te=Object.keys(n).length,ne=V>0&&te>=V,oe=j?null!=b&&te===b:kt(te,e.min_propositions,e.max_propositions);e.min_bet,V>0?Math.max(2,2*V):Math.max(2,2*te);const re=a.default.useRef(te),ie=j?null!=b&&te===b:V>0&&te===V;(0,a.useEffect)(()=>{ie&&te>re.current&&r?.(),re.current=te},[te,ie]);const le=(e,t)=>{!(e in n)&&ne||o(e,t)};(0,a.useEffect)(()=>{const e=V||t.length,n=Y||1;$(t=>K?V:Math.max(n,Math.min(t,e)))},[t.length,Y,V,K]);const se=(0,a.useMemo)(()=>new Date,[]),de=(0,a.useMemo)(()=>function(e,t){const n=e.filter(e=>null!=function(e){if(!e.commence_time)return null;const t=new Date(e.commence_time);return Number.isNaN(t.getTime())?null:t}(e));if(n.length<2)return[];const o=[];for(const r of Bo){let e=0,i=0;for(const o of n)if(Fo(o.commence_time,r,t)?e+=1:i+=1,e>0&&i>0)break;e>0&&i>0&&o.push({id:r,label:Co[r]})}return o}(t,se),[t,se]),[he,ue]=(0,a.useState)(null);(0,a.useEffect)(()=>{he&&!de.some(e=>e.id===he)&&ue(null)},[de,he]);const fe=(0,a.useMemo)(()=>function(e,t,n){return t?e.filter(e=>Fo(e.commence_time,t,n)):e.slice()}(t,he,se),[t,he,se]),ge=(0,a.useMemo)(()=>Et(fe,x,C),[fe,x,C]),pe=(0,a.useMemo)(()=>{const e=new Set;for(const t of fe){const n=Qe(t);n&&e.add(n)}return Array.from(e).sort((e,t)=>e.localeCompare(t))},[fe]),[ye,me]=(0,a.useState)(null),[be,we]=(0,a.useState)(!1);(0,a.useEffect)(()=>{ye&&!pe.includes(ye)&&me(null)},[pe,ye]);const xe=(0,a.useMemo)(()=>{if(!ye)return ge;const e={};for(const[t,n]of Object.entries(ge)){const o=n.filter(e=>Qe(e)===ye);o.length>0&&(e[t]=o)}return e},[ge,ye]),ke=Object.keys(xe);if(l)return(0,s.jsx)(rn,{colors:H(F)});if(h)return(0,s.jsx)(c.View,{style:Po.centered,children:(0,s.jsx)(c.Text,{style:{color:v.error},children:h})});const Se=!m&&t.length>0,Ce=de.length>0||pe.length>1,Be=(null!=he?1:0)+(null!=ye?1:0);return(0,s.jsxs)(c.View,{style:{gap:I?24:16,paddingBottom:64},children:[Ce||k?(0,s.jsxs)(c.View,{style:Po.filterHeaderRow,children:[(0,s.jsx)(c.View,{style:Po.filterToggleRow,children:Ce?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>we(e=>!e),activeOpacity:.85,accessibilityRole:"button",style:[Po.filterToggle,{borderColor:Be>0?v.primary:v.border,backgroundColor:Be>0?v.primary:v.background??"#fff"}],children:[(0,s.jsx)(Ve,{size:13,color:Be>0?v.primaryText:v.text}),(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"700",color:Be>0?v.primaryText:v.text},children:"Filter"}),Be>0&&(0,s.jsxs)(c.Text,{style:{fontSize:11,fontWeight:"700",color:v.primaryText},children:["· ",Be]}),(0,s.jsx)(c.View,{style:{transform:[{rotate:be?"-90deg":"90deg"}],opacity:.75},children:(0,s.jsx)(Ge,{size:13,color:Be>0?v.primaryText:v.text})})]}),Be>0&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{ue(null),me(null)},activeOpacity:.85,accessibilityRole:"button",children:(0,s.jsx)(c.Text,{style:{fontSize:11,fontWeight:"600",color:v.textMuted},children:"Clear"})})]}):null}),k]}):null,be&&Ce&&(0,s.jsxs)(c.View,{style:{gap:10},children:[de.length>0&&(0,s.jsx)(qe,{label:"When",options:[{value:null,label:"All dates"},...de.map(e=>({value:e.id,label:e.label}))],value:he,onChange:e=>ue(e),theme:F,bodyFont:L}),pe.length>1&&(0,s.jsx)(qe,{label:"Market",options:[{value:null,label:"All markets"},...pe.map(e=>{return{value:e,label:(t=e,t.replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()))};var t})],value:ye,onChange:me,theme:F,bodyFont:L})]}),Se&&(0,s.jsx)(c.View,{style:[Po.topBar,{justifyContent:"flex-end"}],children:(0,s.jsxs)(c.View,{style:[Po.quickPickRow,{gap:I?8:6}],children:[!K&&(0,s.jsxs)(c.View,{style:Po.quickPickCountRow,children:[(0,s.jsx)(c.TextInput,{keyboardType:"number-pad",value:String(J),onChangeText:e=>{const t=parseInt(e,10);isNaN(t)||$(Math.max(q,Math.min(X,t)))},style:[Po.quickPickInput,{width:I?56:40,paddingHorizontal:I?8:4,paddingVertical:I?6:4,fontSize:I?14:12,color:R,backgroundColor:v.backgroundAlt,borderColor:v.border}]}),(0,s.jsxs)(c.Text,{style:{color:v.textMuted,fontSize:12},children:["/ ",t.length]})]}),(0,s.jsx)(ko,{onPress:()=>{const e=K?V:J;for(const t of Object.keys(n)){const e=Number(t);o(e,n[e])}const{yesPicks:i,noPicks:l}=Gt(t,e);for(const t of i)o(t.id,"yes");for(const t of l)o(t.id,"no");r?.()}})]})}),t.length>0&&(0,s.jsx)(c.View,{style:Po.matchupList,children:ke.every(e=>1===xe[e].length)?(0,s.jsx)(c.View,{style:[Po.matchupCard,{borderColor:v.border,backgroundColor:W},E],children:ke.map((e,t)=>{const o=xe[e][0],r="yes"===n[o.id],i="no"===n[o.id],l=o.id in n,a=ne&&!l,d=0===t,h=t===ke.length-1;return(0,s.jsxs)(c.View,{style:{borderTopColor:v.border,borderTopWidth:d?0:1,opacity:a?.45:1},children:[(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:I?12:10,backgroundColor:A,borderTopLeftRadius:d?Wo:0,borderTopRightRadius:d?Wo:0},children:[(0,s.jsx)(c.View,{style:{minWidth:0},children:(0,s.jsx)(Ro,{matchup:e,renderTeamLogo:y,altText:R,mutedColor:v.textAltMuted??v.textMuted??R})}),o.commence_time&&(0,s.jsx)(c.Text,{style:{color:v.textAltMuted??v.textMuted,fontSize:11,opacity:.7,marginTop:2},children:ut(o.commence_time)})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingHorizontal:16,paddingVertical:I?14:12,backgroundColor:T,borderTopWidth:1,borderTopColor:v.border,borderBottomLeftRadius:h?Wo:0,borderBottomRightRadius:h?Wo:0},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[vo(o,y,e),(0,s.jsx)(Do,{prop:o,colors:v,componentById:z})]}),(0,s.jsx)(To,{theme:F,value:r?"yes":i?"no":null,onYes:()=>le(o.id,"yes"),onNo:()=>le(o.id,"no"),disabled:a})]})]},o.id)})}):ke.map(e=>{const t=xe[e],o=U.has(e),r=t.filter(e=>e.id in n).length,i=t[0]?.commence_time;return(0,s.jsxs)(c.View,{style:[Po.matchupCard,{borderColor:v.border,backgroundColor:W},E],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{return t=e,Z(e=>{const n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n});var t},style:[Po.matchupHeader,{backgroundColor:A,borderTopLeftRadius:Wo,borderTopRightRadius:Wo,borderBottomLeftRadius:o?0:Wo,borderBottomRightRadius:o?0:Wo}],children:[(0,s.jsxs)(c.View,{style:Po.matchupHeaderLeft,children:[(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:o?"180deg":"0deg"}]},children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:v.textAltMuted??v.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),(0,s.jsxs)(c.View,{style:Po.matchupTeamWrapper,children:[(0,s.jsx)(Ro,{matchup:e,renderTeamLogo:y,altText:R,mutedColor:v.textAltMuted??v.textMuted??R,size:"md"}),i&&(0,s.jsx)(c.Text,{style:{color:v.textAltMuted??v.textMuted,fontSize:12,opacity:.7,marginTop:2,textAlign:"left"},children:ut(i)})]})]}),(0,s.jsx)(c.View,{style:Po.matchupHeaderRight,children:r>0&&(0,s.jsx)(c.View,{style:[Po.answeredBadge,{backgroundColor:v.successBg}],children:(0,s.jsxs)(c.Text,{style:{color:v.successText,fontSize:12,fontWeight:"500"},children:[r,"/",t.length]})})})]}),o&&(0,s.jsx)(c.View,{children:(0,s.jsx)(s.Fragment,{children:t.map((o,r)=>{const i="yes"===n[o.id],l="no"===n[o.id],a=o.id in n,d=ne&&!a,h=r===t.length-1;return(0,s.jsx)(c.View,{style:{paddingHorizontal:16,paddingVertical:I?14:12,backgroundColor:T,borderTopColor:v.border,borderTopWidth:0===r?0:1,opacity:d?.45:1,borderBottomLeftRadius:h?Wo:0,borderBottomRightRadius:h?Wo:0},children:(0,s.jsxs)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",alignItems:"flex-start",columnGap:I?16:8,rowGap:I?16:8},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:128,flexDirection:"row",alignItems:"flex-start",gap:8},children:[vo(o,y,e),(0,s.jsx)(Do,{prop:o,colors:v,size:"md",componentById:z})]}),(0,s.jsx)(To,{theme:F,value:i?"yes":l?"no":null,onYes:()=>le(o.id,"yes"),onNo:()=>le(o.id,"no"),disabled:d})]})},o.id)})})})]},e)})}),0===t.length&&(0,s.jsx)(c.View,{style:Po.centered,children:(0,s.jsx)(c.Text,{style:{color:v.textMuted},children:"No propositions available at this time"})}),!g&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:v.border,backgroundColor:W,marginHorizontal:I?-24:-16,paddingHorizontal:I?24:16,paddingVertical:I?16:12},children:[(0,s.jsx)(Ao,{theme:F,variant:"secondary",onPress:i,children:"Back"}),(0,s.jsx)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:I?12:8},children:(0,s.jsx)(Ao,{theme:F,variant:"primary",disabled:!oe,onPress:r,children:"Wager"})})]})]})}var Po=c.StyleSheet.create({centered:{alignItems:"center",justifyContent:"center",padding:32,flexDirection:"row"},filterHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},filterToggleRow:{flexDirection:"row",alignItems:"center",gap:8},filterToggle:{flexDirection:"row",alignItems:"center",gap:6,borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:6},topBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:8},quickPickRow:{flexDirection:"row",alignItems:"center",flexShrink:0},quickPickCountRow:{flexDirection:"row",alignItems:"center",gap:4},quickPickInput:{borderRadius:8,borderWidth:2,fontWeight:"600",textAlign:"center"},matchupList:{gap:16},matchupCard:{borderRadius:Wo,borderWidth:1,overflow:"visible"},matchupHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:16,paddingVertical:14},matchupHeaderLeft:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},matchupTeamWrapper:{flex:1,minWidth:0},matchupTeamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:4},matchupTeamsStacked:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"stretch"},teamLogoRowWrap:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:1,minWidth:0},matchupHeaderRight:{flexDirection:"row",alignItems:"center",gap:8,marginLeft:8,flexShrink:0},answeredBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:999}});function Ho({theme:e,value:t,onYes:n,onNo:o,disabled:r}){const i=e.colors,l=(e,t)=>({paddingVertical:6,paddingHorizontal:14,borderRadius:8,borderWidth:1,backgroundColor:e?t:"transparent",borderColor:e?"transparent":i.border,opacity:r?.5:1}),a=e=>({color:e?"#ffffff":i.text,fontSize:13,fontWeight:"600",lineHeight:16});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:r,accessibilityState:{selected:"yes"===t},style:l("yes"===t,v(e)),children:(0,s.jsx)(c.Text,{style:a("yes"===t),children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:r,accessibilityState:{selected:"no"===t},style:l("no"===t,W(e)),children:(0,s.jsx)(c.Text,{style:a("no"===t),children:"No"})})]})}function Oo({theme:e,value:t}){return(0,s.jsx)(c.View,{style:{paddingVertical:2,paddingHorizontal:8,borderRadius:8,backgroundColor:"yes"===t?v(e):W(e),alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===t?"Yes":"No"})})}function Io({theme:e,variant:t,disabled:n,onPress:o,children:r}){const i=e.colors,[l,d]=(0,a.useState)(!1),h="primary"===t?{bg:i.buttonPrimary,bgHover:i.buttonPrimaryHover,fg:i.buttonPrimaryText,border:i.buttonPrimary}:{bg:i.buttonSecondary,bgHover:i.buttonSecondaryHover,fg:i.buttonSecondaryText,border:i.border};return(0,s.jsx)(c.TouchableOpacity,{onPress:o,disabled:n,activeOpacity:.85,...ze(()=>d(!0),()=>d(!1)),style:{minHeight:44,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderColor:h.border,backgroundColor:l&&!n?h.bgHover:h.bg,opacity:n?.5:1,alignItems:"center",justifyContent:"center",flexDirection:"row"},children:(0,s.jsx)(c.Text,{style:{color:h.fg,fontSize:14,fontWeight:"500",lineHeight:17},children:r})})}var Eo=c.StyleSheet.create({section:{borderRadius:12,borderWidth:1},emptyState:{alignItems:"center",paddingVertical:32},selectionInfo:{flex:1,minWidth:0},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6,rowGap:2},teamLogoRow:{flexDirection:"row",alignItems:"center",gap:4},teamText:{fontWeight:"600"},vsSmall:{fontSize:12,fontWeight:"400"},propDesc:{fontSize:14,marginTop:4},propTime:{fontSize:12,opacity:.7,marginTop:2},rightControls:{flexDirection:"row",alignItems:"center",gap:8},removeButton:{width:20,height:20,borderRadius:10,alignItems:"center",justifyContent:"center"},summaryRow:{flexDirection:"row",justifyContent:"space-between"}});function jo({game:e,propositions:t,selections:n,onToggleSelection:o,onRemoveSelection:r,onSubmit:i,onBack:l,loading:h,error:u,expectedCorrect:f,onExpectedCorrectChange:g,betAmount:p,onBetAmountChange:y,theme:m,colorScheme:b,hideActions:w=!1,winningCounts:x,payouts:k,renderTeamLogo:S,showCustomAmount:C=!1,betAmountLocked:T=!1,betAmountLockedNote:A,canSubmit:R,authenticated:L=!0,userBalance:H,onRecharge:O,boostBanner:I}){const E=_(m,b),j=E.colors,N=D(E),G=ce(E),Y=B(E),V=z(E),U=F(E),Z=j.textAlt??j.text,{width:K}=(0,c.useWindowDimensions)(),q=K>=640,X="dark"===E.colorScheme,Q=t.length,J=e.min_bet??0,$=Math.max(J,.01),ee=e.max_bet??null,te=[5,10,20,50,100,200,500].filter(e=>e>=$&&(null===ee||e<=ee)).slice(0,4),ne={};for(let a=0;a<=Q;a++)ne[a]=p*a;const oe=k??ne,re=oe[f]??0,ie=Ct(e),le=ie.enabled&&f===Q,[ae,se]=a.default.useState(null),[de,he]=a.default.useState(!0),[ue,fe]=a.default.useState(!1),ge=h||p<$||!1===R,pe=null!=H&&p>H,ye=w&&!!i&&L,me=n?t.filter(e=>e.id in n):t,be=jt(me),we=j.matchupHeader??M(E),xe=P(E),ke=Object.entries(oe).map(([e,t])=>({correct:Number(e),payout:t})).filter(e=>e.correct>0&&e.payout>0).sort((e,t)=>e.correct-t.correct),Se=1===ke.length?ke[0].correct:null;a.default.useEffect(()=>{null!==Se&&f!==Se&&g(Se)},[Se]);const Ce={shadowColor:"#000",shadowOpacity:X?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2};return(0,s.jsxs)(c.View,{style:{gap:q?16:12,paddingBottom:64},children:[(0,s.jsxs)(c.View,{style:[No.section,Ce,{padding:q?20:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>he(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:de},accessibilityLabel:de?"Hide selections":"Show selections",testID:"entry-submission-selections-toggle",style:{flexDirection:"row",alignItems:"center",gap:8,flex:1},activeOpacity:.7,children:[(0,s.jsx)(c.View,{style:{transform:[{rotate:de?"180deg":"0deg"}]},children:(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:j.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,s.jsx)(c.Text,{style:{fontSize:q?16:14,fontWeight:"600",color:Y,fontFamily:G},children:de?"Hide Selections":"Review Selections"})]}),(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:999,flexShrink:0,backgroundColor:`${j.primary}15`},children:(0,s.jsxs)(c.Text,{style:{color:j.primary,fontSize:12,fontWeight:"600"},children:[me.length," pick",1!==me.length?"s":""]})})]}),!de&&(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:12,marginTop:8},children:"Tap to show your picks"}),de&&(0,s.jsx)(c.View,{style:{gap:8,marginTop:12},children:be.map(e=>(0,s.jsxs)(c.View,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:j.border},children:[e.key?(0,s.jsxs)(c.View,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:we},children:[(0,s.jsx)(Ro,{matchup:e.key,renderTeamLogo:S,altText:Z,mutedColor:j.textAltMuted??j.textMuted??Z}),e.props[0].commence_time?(0,s.jsx)(c.Text,{style:{color:j.textAltMuted??j.textMuted,fontSize:11,marginTop:2,opacity:.7},children:ut(e.props[0].commence_time)}):null]}):null,e.props.map((t,i)=>{const l=n?.[t.id],a="yes"===l,h="no"===l,u=!!o;return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingVertical:8,paddingHorizontal:12,backgroundColor:xe,borderTopWidth:e.key||i>0?1:0,borderTopColor:j.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[vo(t,S,e.key),(0,s.jsx)(c.Text,{style:{color:Z,fontSize:q?14:12,flexShrink:1},children:t.description})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:0},children:[u?(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0,alignItems:"center"},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>o(t.id,"yes"),accessibilityState:{selected:a},style:{paddingHorizontal:10,paddingVertical:3,alignItems:"center",justifyContent:"center",borderRadius:8,backgroundColor:a?v(E):"transparent",borderWidth:1,borderColor:a?"transparent":j.border},children:(0,s.jsx)(c.Text,{style:{color:a?"#ffffff":j.text,fontSize:11,fontWeight:"600"},children:"Yes"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>o(t.id,"no"),accessibilityState:{selected:h},style:{paddingHorizontal:10,paddingVertical:3,alignItems:"center",justifyContent:"center",borderRadius:8,backgroundColor:h?W(E):"transparent",borderWidth:1,borderColor:h?"transparent":j.border},children:(0,s.jsx)(c.Text,{style:{color:h?"#ffffff":j.text,fontSize:11,fontWeight:"600"},children:"No"})})]}):l?(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,flexShrink:0,backgroundColor:"yes"===l?v(E):W(E)},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===l?"Yes":"No"})}):null,de&&r&&(0,s.jsx)(c.Pressable,{onPress:()=>{l&&o?.(t.id,l),r(t.id)},...ze(()=>se(t.id),()=>se(null)),accessibilityRole:"button",accessibilityLabel:"Remove selection",style:{flexShrink:0,width:44,height:44,borderRadius:999,alignItems:"center",justifyContent:"center",backgroundColor:ae===t.id?j.error:"transparent"},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M6 18L18 6M6 6l12 12",stroke:ae===t.id?"#fff":j.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]},t.id)})]},e.key??`solo-${e.props[0].id}`))}),I?(0,s.jsx)(c.View,{style:{marginTop:8},children:I}):null]}),ye&&(0,s.jsxs)(c.View,{testID:"entry-submission-scroll-hint",style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:-4},children:[(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:q?14:12,fontWeight:"500"},children:"↓"}),(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:q?14:12,fontWeight:"500",flex:1},children:"Scroll down to set your bet and place your entry"})]}),L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:[No.section,Ce,{padding:q?24:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:q?16:12},children:[(0,s.jsx)(c.Text,{style:{fontSize:q?18:16,fontWeight:"600",color:Y,fontFamily:G},children:"How much are you betting?"}),null!=H&&(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:j.textMuted},children:["Balance: ",(0,s.jsx)(c.Text,{style:{color:pe?j.error:j.success},children:ht(H)})]})]}),pe&&(0,s.jsxs)(c.View,{style:{marginBottom:12,paddingHorizontal:12,paddingVertical:8,borderRadius:8,backgroundColor:j.errorBg??`${j.error}15`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{flex:1,fontSize:12,fontWeight:"500",color:j.errorText??j.error},children:["Insufficient balance. Your bet of ",ht(p)," exceeds your available ",ht(H),"."]}),O&&(0,s.jsx)(c.TouchableOpacity,{onPress:O,style:{paddingHorizontal:12,paddingVertical:4,borderRadius:6,backgroundColor:j.error},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:j.buttonPrimaryText??"#fff"},children:"Add funds"})})]}),T?(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:8,paddingHorizontal:12,paddingVertical:10,backgroundColor:j.backgroundAlt,borderWidth:1,borderColor:j.border},children:[(0,s.jsx)(c.Text,{style:{fontSize:12,color:j.textMuted,flex:1},children:A??"Stake is set for this ticket."}),(0,s.jsx)(c.Text,{style:{fontSize:18,fontWeight:"700",color:Y,fontFamily:G},children:ht(p)})]}):(0,s.jsxs)(c.View,{style:{gap:16},children:[C&&(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,fontWeight:"600",color:V,marginBottom:8},children:"Entry amount"}),(0,s.jsxs)(c.View,{style:{position:"relative"},children:[(0,s.jsx)(c.View,{style:{position:"absolute",left:12,top:0,bottom:0,justifyContent:"center",zIndex:1},pointerEvents:"none",children:(0,s.jsx)(c.Text,{style:{color:j.textMuted},children:"$"})}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter amount",accessibilityLabel:"Entry amount",value:p?String(p):"",onChangeText:e=>{if(""===e)return void y(0);const t=Number(e);if(!Number.isFinite(t))return;const n=Math.max(0,Math.round(100*t)/100);y(null!==ee?Math.min(n,ee):n)},onFocus:()=>fe(!0),onBlur:()=>fe(!1),style:{paddingLeft:32,paddingRight:16,paddingVertical:12,borderWidth:1,borderRadius:8,fontSize:18,fontWeight:"600",borderColor:ue?j.borderFocus??j.primary:j.border,color:Z,backgroundColor:j.backgroundAlt},placeholderTextColor:j.textMuted})]}),(0,s.jsxs)(c.Text,{style:{fontSize:12,marginTop:6,color:j.textMuted},children:["Minimum bet: ",ht($),null!==ee?` · Maximum: ${ht(ee)}`:""]}),p>0&&p<$&&(0,s.jsxs)(c.Text,{style:{fontSize:12,marginTop:4,color:j.error},children:["Bet amount must be at least ",ht($)]})]}),(0,s.jsxs)(c.View,{children:[(C||p>0)&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[C?(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,fontWeight:"600",color:V},children:"Add to bet"}):(0,s.jsx)(c.View,{}),p>0&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>y(0),style:{paddingHorizontal:10,paddingVertical:4,borderRadius:6,backgroundColor:j.backgroundAlt,borderWidth:1.5,borderColor:j.border},children:(0,s.jsx)(c.Text,{style:{color:j.textMuted,fontSize:12,fontWeight:"600"},children:"Clear bet"})})]}),(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:te.map(e=>{const t=null!==ee&&p>=ee;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{const t=p+e;y(null!==ee?Math.min(t,ee):t)},disabled:t,style:{flex:1,minWidth:0,paddingHorizontal:12,paddingVertical:10,borderRadius:8,backgroundColor:"transparent",borderWidth:1,borderColor:j.border,opacity:t?.5:1,alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)(c.Text,{style:{color:Z,fontSize:14,fontWeight:"600"},children:["+",ht(e)]})},e)})})]})]})]}),(0,s.jsx)(c.View,{style:[No.section,Ce,{padding:q?20:16,backgroundColor:N,borderColor:j.border}],children:(()=>{const e=w&&!!i,t=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[(0,s.jsx)(c.Text,{style:{color:V,fontSize:14},children:"Bet"}),(0,s.jsx)(c.Text,{style:{color:U,fontSize:14,fontWeight:"600"},children:ht(p)})]}),re>0&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:8,borderTopWidth:1,borderTopColor:j.border},children:[(0,s.jsx)(c.Text,{style:{color:V,fontSize:14,fontWeight:"600"},children:"Potential Payout"}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[(0,s.jsx)(c.Text,{style:{color:Y,fontSize:18,fontWeight:"700"},children:ht(re)}),le&&(0,s.jsx)(c.Text,{style:{color:j.warning,fontSize:12,marginLeft:4},children:"+ Jackpot"})]})]}),ie.enabled&&(0,s.jsxs)(c.View,{style:[No.jackpotBanner,{backgroundColor:`${j.warning}08`,borderColor:`${j.warning}25`}],children:[(0,s.jsxs)(c.Text,{style:{color:j.warning,fontSize:12,fontWeight:"600"},children:["★ ",ie.progressive?"Progressive Jackpot":"Jackpot"]}),(0,s.jsx)(c.Text,{style:{color:j.warning,fontSize:14,fontWeight:"700"},children:ie.progressive?ie.amount>0?ht(ie.amount):ie.limit>0?`Up to ${ht(ie.limit)}`:"Progressive":ht(ie.amount)})]})]});return e?(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"stretch",gap:16},children:[(0,s.jsx)(c.View,{style:{flex:1,minWidth:0},children:t}),(0,s.jsx)(c.View,{style:{width:1,alignSelf:"stretch",backgroundColor:j.border}}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,disabled:ge,accessibilityState:{disabled:ge,busy:!!h},activeOpacity:.7,style:{flexShrink:0,paddingVertical:12,paddingHorizontal:20,borderRadius:8,backgroundColor:j.buttonPrimary,opacity:ge?.5:1,alignItems:"center",justifyContent:"center",minWidth:120},children:h?(0,s.jsxs)(c.View,{style:{alignItems:"center",gap:8},children:[(0,s.jsx)(c.ActivityIndicator,{size:"small",color:j.buttonPrimaryText}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:16,fontWeight:"700"},children:"Place Entry"}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:12,opacity:.9,marginTop:2},children:ht(p)})]})})]}):t})()})]}):(0,s.jsxs)(c.View,{style:[No.section,Ce,{padding:q?24:16,backgroundColor:N,borderColor:j.border}],children:[(0,s.jsx)(c.Text,{style:{fontSize:q?18:16,fontWeight:"600",color:Y,fontFamily:G},children:"Log in to place this entry"}),(0,s.jsx)(c.Text,{style:{fontSize:q?14:12,color:j.textMuted,marginTop:4,marginBottom:16},children:"Your picks are held. Log in to set your bet and confirm."}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,style:{paddingVertical:12,paddingHorizontal:24,borderRadius:8,backgroundColor:j.buttonPrimary,alignItems:"center"},children:(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Log in"})})]}),u&&(0,s.jsx)(c.View,{style:[No.errorBanner,{backgroundColor:j.errorBg,borderColor:j.error}],children:(0,s.jsx)(c.Text,{style:{color:j.errorText,fontSize:14},children:u})}),!w&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:j.border,backgroundColor:j.background,marginHorizontal:q?-24:-16,paddingHorizontal:q?24:16,paddingVertical:q?16:12},children:[(0,s.jsx)(Fe,{theme:E,variant:"secondary",disabled:h,onPress:l,children:"Back"}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,disabled:ge,accessibilityState:{disabled:ge,busy:!!h},activeOpacity:.7,style:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingHorizontal:24,paddingVertical:10,borderRadius:8,backgroundColor:j.buttonPrimary,opacity:ge?.5:1},children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.ActivityIndicator,{size:"small",color:j.buttonPrimaryText}),(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:"Placing Entry…"})]}):(0,s.jsx)(c.Text,{style:{color:j.buttonPrimaryText,fontSize:14,fontWeight:"600"},children:`Place Entry (${ht(p)})`})})]})]})}var No=c.StyleSheet.create({section:{borderRadius:12,borderWidth:1},jackpotBanner:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:6,paddingHorizontal:8,borderRadius:4,borderWidth:1,marginTop:8},errorBanner:{padding:12,borderRadius:8,borderWidth:1}}),Go="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.27 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z";function Yo({index:e,size:t,wide:n,isWinning:o,isJackpot:r,isSelected:i,bgColor:l,borderFallback:h,warning:u,primary:f,textMuted:g,payout:p,onPress:y,accessibilityLabel:m}){const[b,w]=(0,a.useState)(!1),x=!!y,k=o||r,S=x&&b?1.12:k?1.1:1;return(0,s.jsxs)(c.TouchableOpacity,{onPress:y,disabled:!x,activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:m,accessibilityState:{disabled:!x,selected:i},...ze(()=>w(!0),()=>w(!1)),style:[Vo.circle,{width:t,height:t,borderRadius:t/2,backgroundColor:l,borderColor:r?u:o?l:h,zIndex:i?10:r?6:o?5:1,transform:[{scale:S}]},k&&Vo.circleWinning,x&&b&&Vo.circleHovered],children:[r&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-3,right:-3,bottom:-3,left:-3,borderRadius:t/2+3,borderWidth:2,borderColor:`${u}80`}}),i&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6,bottom:-6,left:-6,borderRadius:t/2+6,borderWidth:3,borderColor:f}}),r&&(0,s.jsx)(c.View,{pointerEvents:"none",style:{position:"absolute",top:-6,right:-6},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",children:(0,s.jsx)(d.Path,{d:Go,fill:u,stroke:u,strokeWidth:1})})}),(0,s.jsx)(c.Text,{style:{fontSize:n?16:14,lineHeight:n?16:14,fontWeight:"600",color:o||r?"#ffffff":g},children:e}),p>0&&(0,s.jsx)(c.Text,{style:{fontSize:n?8:7,lineHeight:n?8:7,fontWeight:"400",color:o||r?"#ffffff":g},children:ht(p)})]})}var Vo=c.StyleSheet.create({container:{gap:16},title:{fontSize:14,fontWeight:"600",textAlign:"center"},jackpotBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1,overflow:"hidden"},jackpotText:{fontSize:14,fontWeight:"600",textAlign:"center",flexShrink:1},circleGrid:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"},circle:{borderWidth:2,alignItems:"center",justifyContent:"center"},circleWinning:{elevation:4,shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4},circleHovered:{elevation:6,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8},expectedText:{fontSize:12,textAlign:"center"},expectedBold:{fontWeight:"600"}});function Uo({iconUrl:e,gameName:t,chipColor:n,textColor:o,iconColor:r,accentColor:i,brandColor:l,height:a=56,showTrademark:d=!0,compact:h=!1,onPress:u}){const f=n??l??"#0F4C5C",g=o??f,p=.85*a,y=1.8*p,m=p/2,b='Manrope, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',w=a,x=a,k=y-.18*p*2,S=p-.05*p*2,C=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Text,{accessibilityLabel:"YESNO",style:{fontFamily:b,fontSize:w,lineHeight:1.15*w,letterSpacing:-1,color:g,includeFontPadding:!1},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"900"},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"300"},children:"NO"})]}),(0,s.jsx)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:t,style:{width:y,height:p,borderRadius:m,backgroundColor:f,alignItems:"center",justifyContent:"center",flexShrink:0,transform:[{translateY:.06*-a}]},children:(0,s.jsx)(Zt,{iconUrl:e,width:k,height:S,iconColor:r,accentColor:i})}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start",flexShrink:1,minWidth:0},children:[(0,s.jsx)(c.Text,{style:{fontFamily:b,fontSize:x,lineHeight:1.15*x,fontWeight:"500",color:g,includeFontPadding:!1,flexShrink:1},children:t}),d&&(0,s.jsx)(c.Text,{style:{fontFamily:b,fontSize:.3*x,lineHeight:.3*x,fontWeight:"600",color:g,marginLeft:.06*x,includeFontPadding:!1},children:"TM"})]})]});return u?(0,s.jsx)(c.Pressable,{onPress:u,accessibilityRole:"button",accessibilityLabel:`Play ${t}`,testID:"brand-logo-play",style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:C}):(0,s.jsx)(c.View,{style:{flexDirection:"row",alignItems:"center",flexWrap:"wrap",gap:.2*a,maxWidth:"100%",minWidth:0},children:C})}function Zo({color:e,style:t}){return(0,s.jsx)(c.View,{style:[{backgroundColor:e,opacity:.35,borderRadius:6},t]})}function Ko({colors:e}){const t=e.selectionCard??e.backgroundAlt;return(0,s.jsxs)(c.View,{style:{width:"100%"},children:[(0,s.jsx)(c.View,{style:{flexDirection:"row",borderBottomWidth:1,borderBottomColor:e.border,marginBottom:16},children:[0,1].map(t=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10},children:[(0,s.jsx)(Zo,{color:e.textMuted,style:{height:14,width:68}}),(0,s.jsx)(Zo,{color:e.textMuted,style:{height:20,width:20,borderRadius:999}})]},t))}),(0,s.jsx)(c.View,{style:{gap:12,width:"100%"},children:[0,1].map(n=>(0,s.jsxs)(c.View,{style:{borderRadius:8,borderWidth:1,borderColor:e.border,backgroundColor:t,overflow:"hidden",width:"100%"},children:[(0,s.jsxs)(c.View,{style:{width:"100%",paddingHorizontal:16,paddingVertical:12,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.View,{style:{flex:1,gap:6},children:[(0,s.jsx)(Zo,{color:e.textMuted,style:{height:18,width:160,maxWidth:"75%"}}),(0,s.jsx)(Zo,{color:e.textMuted,style:{height:12,width:128,maxWidth:"65%"}})]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},children:[(0,s.jsx)(Zo,{color:e.textMuted,style:{height:14,width:40}}),(0,s.jsx)(Zo,{color:e.textMuted,style:{height:24,width:60,borderRadius:999}})]})]}),(0,s.jsx)(c.View,{style:{borderTopWidth:1,borderTopColor:e.border,width:"100%"},children:[0,1,2].map(t=>(0,s.jsxs)(c.View,{style:{paddingHorizontal:16,paddingVertical:10,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:0===t?0:1,borderTopColor:e.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,gap:4},children:[(0,s.jsx)(Zo,{color:e.textMuted,style:{height:14,width:"88%"}}),(0,s.jsx)(Zo,{color:e.textMuted,style:{height:12,width:"70%"}})]}),(0,s.jsx)(Zo,{color:e.textMuted,style:{height:20,width:40,borderRadius:4}})]},t))})]},n))})]})}function qo({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,demoEntries:i,demoGames:l,demoPropositions:h,onSelectEntry:u,theme:f,colorScheme:g,renderTeamLogo:p,filterSport:y}){const m=_(f,g),b=!!(i&&l&&h),w=m.colors,x=ce(m),[k,S]=(0,a.useState)("pending"),[C,B]=(0,a.useState)([]),z=(0,a.useMemo)(()=>new co({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),{entries:F,loading:v,error:W,refetch:T}=fo(z,{user_id:r},{skip:b}),{games:A,loading:R,error:L}=so(z,void 0,{skip:b}),{propositions:D,loading:M,error:P}=ho(z,void 0,{skip:b}),O=b?i:F,I=b?l:A,E=b?h:D,j=!b&&(v||R||M),N=b?null:W||L||P,G=(0,a.useMemo)(()=>O.map(e=>{const t={...e};return!t.created_at&&t.entry_date&&(t.created_at=t.entry_date),(!t.proposition_ids||0===t.proposition_ids.length)&&t.propositions&&t.propositions.length>0&&(t.proposition_ids=t.propositions.map(e=>e.id)),t}),[O]),Y=(0,a.useMemo)(()=>{const e=new Map;for(const t of I)e.set(t.id,t);return e},[I]),V=(0,a.useMemo)(()=>{const e=new Map;for(const t of E)e.set(t.id,t);for(const t of G)if(t.propositions)for(const n of t.propositions)e.has(n.id)||e.set(n.id,n);for(const t of C)e.set(t.id,t);return e},[E,G,C]),U=(0,a.useRef)(new Set);(0,a.useEffect)(()=>{if(j||b)return;const e=[];for(const n of G)for(const t of n.proposition_ids??[])V.has(t)||U.current.has(t)||(e.push(t),U.current.add(t));if(0===e.length)return;let t=!1;return(async()=>{try{const n=await z.getPropositionsByIds(e);!t&&n.length>0&&B(e=>[...e,...n])}catch{}})(),()=>{t=!0}},[G,V,j,b,z]);const Z=(0,a.useMemo)(()=>y?G.filter(e=>{const t=e.proposition_ids??[];return 0===t.length||t.some(t=>(V.get(t)??e.propositions?.find(e=>e.id===t))?.sport===y)}):G,[G,y,V]),K=(0,a.useMemo)(()=>Z.filter(e=>st(e.pending)),[Z]),q=(0,a.useMemo)(()=>Z.filter(e=>!st(e.pending)),[Z]),X="pending"===k?K:q;return j?(0,s.jsx)(c.View,{style:Qo.container,accessibilityLabel:"Loading entries",children:(0,s.jsx)(Ko,{colors:H(m)})}):N?(0,s.jsx)(c.View,{style:Qo.container,children:(0,s.jsxs)(c.View,{style:[Qo.errorBanner,{backgroundColor:w.errorBg,borderColor:w.error}],children:[(0,s.jsx)(c.Text,{style:{color:w.errorText},children:N}),(0,s.jsx)(c.TouchableOpacity,{onPress:T,style:Qo.retryButton,children:(0,s.jsx)(c.Text,{style:{color:w.error,textDecorationLine:"underline",fontSize:14,fontWeight:"500"},children:"Try again"})})]})}):(0,s.jsxs)(c.View,{style:Qo.container,children:[(0,s.jsx)(c.View,{style:[Qo.tabBar,{borderBottomColor:w.border}],children:["pending","completed"].map(e=>{const t=k===e,n="pending"===e?K.length:q.length;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>S(e),accessibilityRole:"tab",accessibilityState:{selected:t},style:[Qo.tab,{borderBottomColor:t?w.primary:"transparent"}],children:[(0,s.jsx)(c.Text,{style:[Qo.tabLabel,{color:t?w.primary:w.textMuted,fontFamily:x}],children:"pending"===e?"Pending":"Completed"}),(0,s.jsx)(c.View,{style:[Qo.tabBadge,{backgroundColor:t?`${w.primary}15`:w.backgroundAlt}],children:(0,s.jsx)(c.Text,{style:[Qo.tabBadgeText,{color:t?w.primary:w.textMuted}],children:n})})]},e)})}),0===X.length&&(0,s.jsxs)(c.View,{style:Qo.emptyState,children:[(0,s.jsx)(c.View,{style:{marginBottom:16},children:(0,s.jsx)(d.default,{width:48,height:48,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"pending"===k?"M12 6v6l4 2m6-2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z":"M9 12l2 2 4-4m6 2a10 10 0 1 1-20 0 10 10 0 0 1 20 0z",stroke:w.textMuted,strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,s.jsx)(c.Text,{style:[Qo.emptyTitle,{color:w.text}],children:"pending"===k?"No pending entries":"No completed entries"}),(0,s.jsx)(c.Text,{style:[Qo.emptySubtitle,{color:w.textMuted}],children:"pending"===k?"Entries awaiting results will appear here":"Settled entries will appear here"})]}),(0,s.jsx)(c.View,{style:Qo.entryList,children:X.map(e=>(0,s.jsx)(Xo,{entry:e,game:Y.get(e.game_id),propositionsById:V,onSelect:u,theme:m,renderTeamLogo:p},e.id))})]})}function Xo({entry:e,game:t,propositionsById:n,onSelect:o,theme:r,renderTeamLogo:i}){const l=r.colors,h=D(r),u=ce(r),f="dark"===r.colorScheme,g=e.proposition_ids??[],p=(0,a.useMemo)(()=>g.map(e=>n.get(e)).filter(Boolean),[g,n]),y=g.length,[m,b]=(0,a.useState)(!1),w=y>0,x=(0,a.useMemo)(()=>{const t=new Map;for(const n of e.propositions??[])t.set(n.id,n);return t},[e.propositions]),k=t=>{const o=e.selections?.[t];return null!=o?o:x.get(t)?.user_prediction??n.get(t)?.user_prediction},S=p.filter(e=>null!=e.result&&!e.is_voided).length,C=p.filter(e=>{if(null==e.result||e.is_voided)return!1;const t=k(e.id);return null!=t&&t===e.result}).length,B=null!=e.selections&&Object.keys(e.selections).length>0||(e.propositions??[]).some(e=>null!=e.user_prediction),z=st(e.pending),F=!z&&ct(e.winning)>0,T=e.payout_status,A="fulfilled"===T&&F,R=z?"Pending":A?"Won — pay due":"paid_out"===T&&F?"Paid":F?"Won":"Lost",L=z||A?l.warningBg:F?l.successBg:l.errorBg,M=z||A?l.warningText:F?l.successText:l.errorText,P=B&&S>0?`${C}/${y} correct`:y>0?`${y} pick${1!==y?"s":""}`:null,H=B&&S>0?C>0?l.success:l.error:l.textMuted,O=(0,s.jsxs)(c.View,{style:Qo.cardHeader,children:[(0,s.jsxs)(c.View,{style:Qo.cardHeaderLeft,children:[(()=>{const n=t?t.allowed_propositions&&t.allowed_propositions.length>0&&t.game_name.replace(/\s+\d+\s*$/,"").trim()||t.game_name:`Game #${e.game_id}`;return t?(0,s.jsx)(Uo,{iconUrl:ge(t),gameName:n,height:18,chipColor:l.primary,textColor:l.text,iconColor:l.primaryText,accentColor:r.brand?.accent}):(0,s.jsx)(c.Text,{style:[Qo.cardGameName,{color:l.text,fontFamily:u}],numberOfLines:1,children:n})})(),(0,s.jsxs)(c.View,{style:Qo.metaRow,children:[(e.created_at||e.entry_date)&&(0,s.jsx)(c.Text,{style:[Qo.metaText,{color:l.textMuted}],children:ut(e.created_at||e.entry_date)}),P&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Text,{style:[Qo.metaDot,{color:l.textMuted}],children:"·"}),(0,s.jsx)(c.Text,{style:[Qo.metaText,{fontWeight:"500",color:H}],children:P})]})]})]}),(0,s.jsxs)(c.View,{style:Qo.cardHeaderRight,children:[(0,s.jsxs)(c.View,{style:Qo.amounts,children:[ct(e.bet_amount)>0&&(0,s.jsx)(c.Text,{style:[Qo.betLabel,{color:l.textMuted}],children:ht(ct(e.bet_amount))}),!z&&ct(e.winning)>0&&(0,s.jsxs)(c.View,{style:{alignItems:"flex-end"},children:[(0,s.jsx)(c.Text,{style:[Qo.winAmount,{color:l.success}],children:ht(ct(e.winning))}),(e.payout_jackpot??0)>0&&(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"400",color:l.textMuted},children:["incl. ",ht(ct(e.payout_jackpot))," jackpot"]})]})]}),(0,s.jsx)(c.View,{style:[Qo.statusPill,{backgroundColor:L}],children:(0,s.jsx)(c.Text,{style:[Qo.statusText,{color:M}],children:R})}),w&&(0,s.jsx)(c.View,{style:{transform:[{rotate:m?"180deg":"0deg"}]},accessibilityElementsHidden:!0,children:(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:l.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})]});return(0,s.jsxs)(c.View,{style:[Qo.card,{borderColor:l.border,backgroundColor:h,shadowColor:"#000",shadowOpacity:f?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}],children:[(0,s.jsx)(c.TouchableOpacity,{testID:"entry-card",onPress:()=>{w&&b(e=>!e),o?.({entry:e,game:t,propositions:p})},activeOpacity:.7,disabled:!w&&!o,accessibilityLabel:`Entry #${e.id}`,accessibilityState:w?{expanded:m}:void 0,children:O}),m&&y>0&&g.map(t=>{const o=(t=>n.get(t)??e.propositions?.find(e=>e.id===t))(t),a=k(t);if(!o)return(0,s.jsxs)(c.View,{style:[Qo.propRow,{borderTopColor:l.border,borderTopWidth:1}],children:[(0,s.jsx)(c.View,{style:Qo.propInfo,children:(0,s.jsxs)(c.Text,{style:{fontSize:14,color:l.textMuted},children:["Loading proposition #",t,"…"]})}),null!=a&&(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===a?v(r):W(r)},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:"#ffffff",letterSpacing:.4,textTransform:"uppercase"},children:dt(a)})})]},t);const d=o.result,h=null!=d,u=!!o.is_voided,f=h&&!u&&null!=a&&a===d;let g,p,y;u?(g="Void",p=`${l.textMuted}20`,y=l.textMuted):h?f?(g="Won",p=l.successBg,y=l.successText):(g="Lost",p=l.errorBg,y=l.errorText):(g="Pending",p=l.warningBg,y=l.warningText);const m=mt(o)?void 0:o.home_team;return(0,s.jsxs)(c.View,{style:[Qo.propRow,{borderTopColor:l.border,borderTopWidth:1}],children:[(0,s.jsxs)(c.View,{style:Qo.propInfo,children:[(o.home_team||o.away_team)&&(0,s.jsxs)(c.View,{style:Qo.teamsRow,children:[i&&m?i(m):null,m?(0,s.jsx)(c.Text,{style:[Qo.teamName,{color:l.text}],children:m}):null,m&&o.away_team?(0,s.jsx)(c.Text,{style:[Qo.vsText,{color:l.textMuted}],children:"vs"}):null,i&&o.away_team?i(o.away_team):null,o.away_team?(0,s.jsx)(c.Text,{style:[Qo.teamName,{color:l.text}],children:o.away_team}):null]}),(o.proposition||o.description)&&(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted,marginTop:2},children:o.proposition||o.description}),o.commence_time&&(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted,marginTop:2},children:ut(o.commence_time)})]}),(0,s.jsxs)(c.View,{style:Qo.outcomeCol,children:[(0,s.jsx)(c.Text,{style:[Qo.outcomeLabel,{color:l.textMuted}],children:"Pick"}),null!=a?(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===a?v(r):W(r)},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:"#ffffff",letterSpacing:.4,textTransform:"uppercase"},children:dt(a)})}):(0,s.jsx)(c.Text,{style:{fontSize:12,color:l.textMuted},children:"—"})]}),(0,s.jsxs)(c.View,{style:Qo.outcomeCol,children:[(0,s.jsx)(c.Text,{style:[Qo.outcomeLabel,{color:l.textMuted}],children:"Result"}),(0,s.jsx)(c.View,{style:{paddingHorizontal:8,paddingVertical:2,borderRadius:4,backgroundColor:p},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"700",color:y,textTransform:"uppercase"},children:g})})]})]},t)})]})}var Qo=c.StyleSheet.create({container:{flex:1},errorBanner:{padding:16,borderRadius:8,borderWidth:1},retryButton:{marginTop:8},tabBar:{flexDirection:"row",borderBottomWidth:1,marginBottom:16},tab:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:16,paddingVertical:10,borderBottomWidth:2,marginBottom:-1},tabLabel:{fontSize:14,fontWeight:"500"},tabBadge:{minWidth:20,height:20,paddingHorizontal:6,borderRadius:999,alignItems:"center",justifyContent:"center"},tabBadgeText:{fontSize:12,fontWeight:"600"},emptyState:{alignItems:"center",justifyContent:"center",paddingVertical:48,paddingHorizontal:16},emptyTitle:{fontSize:16,fontWeight:"500"},emptySubtitle:{fontSize:14,marginTop:4},entryList:{gap:12},card:{borderRadius:12,borderWidth:1,overflow:"hidden"},cardHeader:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:16,paddingVertical:12,gap:12},cardHeaderLeft:{flex:1,minWidth:0},cardGameName:{fontSize:16,fontWeight:"600"},metaRow:{flexDirection:"row",alignItems:"center",gap:8,marginTop:2},metaText:{fontSize:12},metaDot:{fontSize:12},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:12,flexShrink:0},amounts:{alignItems:"flex-end"},betLabel:{fontSize:12},winAmount:{fontSize:14,fontWeight:"700"},statusPill:{paddingHorizontal:10,paddingVertical:2,borderRadius:999},statusText:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:.3},propRow:{flexDirection:"row",alignItems:"center",paddingHorizontal:16,paddingVertical:10,gap:12},propInfo:{flex:1},teamsRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:6},teamName:{fontSize:14,fontWeight:"500"},vsText:{fontSize:12,fontWeight:"400"},outcomeCol:{alignItems:"center",gap:2,flexShrink:0},outcomeLabel:{fontSize:9,fontWeight:"600",letterSpacing:.225,textTransform:"uppercase"}});function Jo({style:e}){const{theme:t,bodyFont:n,eventFilterActive:o,eventFilterLabel:r,clearEventFilter:i,gameCategory:l}=xo(),{width:d}=(0,c.useWindowDimensions)(),h=d>=640,[u,f]=a.default.useState(!1);if(!o)return null;const g=t.colors,p=r??("racing"===l?"This race":"This event");return(0,s.jsxs)(c.View,{style:[$o.container,h&&$o.containerWide,{borderColor:`${g.primary}33`,backgroundColor:g.surface},e],children:[(0,s.jsxs)(c.View,{style:$o.textBlock,children:[(0,s.jsx)(c.Text,{style:[$o.kicker,{color:g.primary,fontFamily:n}],children:"Event filter"}),(0,s.jsx)(c.Text,{style:[$o.label,{color:g.text,fontFamily:n}],numberOfLines:1,children:p}),(0,s.jsx)(c.Text,{style:[$o.hint,{color:g.textMuted,fontFamily:n}],children:"Only propositions from this event are shown."})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:i,...ze(()=>f(!0),()=>f(!1)),style:[$o.button,h&&$o.buttonWide,{borderColor:`${g.primary}44`,backgroundColor:g.background,opacity:u?.9:1}],children:(0,s.jsx)(c.Text,{style:[$o.buttonText,{color:g.text,fontFamily:n}],children:"Show all events"})})]})}var $o=c.StyleSheet.create({container:{marginBottom:16,flexDirection:"column",borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:10,gap:8},containerWide:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},textBlock:{minWidth:0,flexShrink:1},kicker:{fontSize:10,fontWeight:"700",letterSpacing:1.2,textTransform:"uppercase"},label:{fontSize:14,fontWeight:"600"},hint:{fontSize:12},button:{flexShrink:0,alignSelf:"flex-start",borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},buttonWide:{alignSelf:"center"},buttonText:{fontSize:12,fontWeight:"600"}});function _o({onBack:e,title:t="Go back"}){const{theme:n}=xo(),o=n.colors,[r,i]=a.default.useState(!1);return(0,s.jsx)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:t,...ze(()=>i(!0),()=>i(!1)),style:{padding:2,alignItems:"center",justifyContent:"center",borderRadius:999,transform:[{translateX:r?-2:0}]},children:(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:r?o.text:o.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})}function er({onBack:e,label:t="Games"}){const{theme:n}=xo(),o=n.colors,[r,i]=a.default.useState(!1),l=r?o.primary:o.textMuted;return(0,s.jsxs)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:t,activeOpacity:.7,...ze(()=>i(!0),()=>i(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,alignSelf:"flex-start",marginBottom:12,transform:[{translateX:r?-2:0}]},children:[(0,s.jsx)(d.default,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:l,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:l},children:t})]})}function tr({onBack:e,hideActions:t,label:n,children:o}){const{theme:r}=xo(),i=r.colors,{width:l}=(0,c.useWindowDimensions)(),h=l>=640,[u,f]=a.default.useState(!1);if(!e&&null==n&&!o)return null;const g=e=>(0,s.jsx)(c.Text,{style:{fontSize:h?14:12,flexShrink:1,color:e},children:n});return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:6,marginTop:2},children:[e&&(null!=n?(0,s.jsxs)(c.TouchableOpacity,{onPress:e,accessibilityRole:"button",accessibilityLabel:"Go back",activeOpacity:.7,...ze(()=>f(!0),()=>f(!1)),style:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,flexShrink:1,transform:[{translateX:u?-2:0}]},children:[(0,s.jsx)(d.default,{width:14,height:14,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M19 12H5 M12 19l-7-7 7-7",stroke:u?i.text:i.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})}),g(u?i.text:i.textMuted)]}):(0,s.jsx)(_o,{onBack:e})),!e&&null!=n&&g(i.textMuted),o]})}var nr=[1,5,10,20,50,100],or=[4,12];function rr(e){return!!e&&!e.quick_pick_only&&"game_set"===(e.rule??"").trim().toLowerCase()}function ir(e,t,n){const o=n?.operatorMargin??.2,r=n?.perLegProbability??.5,i=Math.round(Math.pow(1/r,t)),l=(1-o)*Math.pow(1/r,t);return{legs:t,stake:e,prize:Math.round(e*l*100)/100,multiple:l,oddsOneIn:i}}function lr(e){if(!rr(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??or[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??or[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),i=e.max_bet??null,l=nr.filter(e=>e>=r&&(null===i||e<=i));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),i??20),minStake:r,maxStake:i,quickStakes:l,tagline:"Two steps to your multi. Tweak legs and stake — the prize updates as you go.",operatorMargin:e.operator_margin??.2,perLegProbability:e.payout_structure?.per_leg_probability??.5}}var ar=[25,50,75,100],cr=[{legs:4,firstPayingTier:3,tiers50:[[3,60],[4,340]]},{legs:6,firstPayingTier:4,tiers50:[[4,40],[5,110],[6,850]]},{legs:8,firstPayingTier:5,tiers50:[[5,30],[6,70],[7,300],[8,2100]]},{legs:9,firstPayingTier:5,tiers50:[[5,10],[6,40],[7,100],[8,350],[9,4500]]},{legs:10,firstPayingTier:6,tiers50:[[6,15],[7,45],[8,140],[9,800],[10,1e4]]}];function sr(e){return!!e&&!e.quick_pick_only&&"ladder"===(e.rule??"").trim().toLowerCase()}function dr(e,t){return Math.round(e*t/50*100)/100}function hr(e,t){let n=0;return e.tiers50.map(([e,o])=>(n+=o,{atLeast:e,prize:dr(o,t),cumulative:dr(n,t)}))}function ur(e,t){return dr(e.tiers50.reduce((e,[,t])=>e+t,0),t)}function fr(e){if(!sr(e)||!e)return null;const t=e.allowed_propositions,n=e.min_propositions??4,o=e.max_propositions??10,r=cr.filter(e=>t&&t.length>0?t.includes(e.legs):e.legs>=n&&e.legs<=o);if(0===r.length)return null;const i=e.min_bet??ar[0],l=e.max_bet??ar[ar.length-1],a=ar.filter(e=>e>=i&&e<=l);return{ladders:r,defaultLegs:r.some(e=>8===e.legs)?8:r[Math.floor(r.length/2)].legs,defaultStake:a.includes(50)?50:a[0]??50,stakes:a.length>0?a:ar,tagline:"Climb the ladder. Every step pays its own prize, and every prize stacks on the one before."}}var gr=[1,5,10,20,50],pr=[4,12];function yr(e){return!!e&&!e.quick_pick_only&&"mirror"===(e.rule??"").trim().toLowerCase()}function mr(e,t,n){const o=n?.operatorMargin??.21875,r=n?.perLegProbability??.5,i=Math.round(Math.pow(2,t)),l=Math.pow(r,t)+Math.pow(1-r,t),a=Math.round(1/l),c=(1-o)*Math.pow(2,t-1);return{legs:t,stake:e,prize:Math.round(e*c*100)/100,multiple:c,totalOutcomes:i,winningOutcomes:2,oddsOneIn:a}}function br(e){if(!yr(e)||!e)return null;const t=e.min_propositions??e.allowed_propositions?.[0]??pr[0],n=e.max_propositions??e.allowed_propositions?.[e.allowed_propositions.length-1]??pr[1],o=e.allowed_propositions&&e.allowed_propositions.length>0?[...e.allowed_propositions].sort((e,t)=>e-t):Array.from({length:Math.max(0,n-t+1)},(e,n)=>t+n);if(0===o.length)return null;const r=Math.max(e.min_bet??1,.01),i=e.max_bet??null,l=gr.filter(e=>e>=r&&(null===i||e<=i));return{legOptions:o,defaultLegs:o.includes(8)?8:o[Math.floor(o.length/2)],defaultStake:Math.min(Math.max(20,r),i??20),minStake:r,maxStake:i,quickStakes:l,tagline:"Call every leg. Get them all right, you win — all wrong, you win the same.",operatorMargin:e.operator_margin??.21875,perLegProbability:e.payout_structure?.per_leg_probability??.5}}function wr(e){return e?.quick_pick_only?"quick_pick":rr(e)?"game_set":Kn(e)?"pick_your_dividend":sr(e)?"ladder":yr(e)?"mirror":Tn(e)?"safety_net":un(e)?"selections":Vn(e)?"rule_setup":"selections"}function xr(e){if(!e||e.quick_pick_only)return!1;if("exact"!==(e.rule??"").trim().toLowerCase())return!1;if(un(e))return!1;const t=!!(e.allowed_markets&&e.allowed_markets.length>0),n=!!(e.allowed_sports&&e.allowed_sports.length>0);return t||n}function kr(e){return!(!e||e.quick_pick_only||"exact"!==(e.rule??"").trim().toLowerCase()||un(e)||xr(e))}function Sr(e){switch(wr(e)){case"ladder":return{belowRequiredHint:(e,t)=>`Drop to Ladder ${e} or add another pick to stay on Ladder ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay on Ladder ${e}.`,switchTierLabel:e=>`Switch to Ladder ${e}`,overloadTitle:"Add more picks to climb higher",tableColumnLabel:"Ladder",tierButtonLabel:e=>`Ladder ${e}`};case"game_set":case"pick_your_dividend":case"mirror":case"safety_net":return{belowRequiredHint:(e,t)=>`Drop to ${e} legs or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e} legs.`,switchTierLabel:e=>`Switch to ${e} legs`,overloadTitle:"Add more legs to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`${e} legs`};default:return{belowRequiredHint:(e,t)=>`Drop to a ${e}-leg multi or add another pick to stay at ${t}.`,belowRequiredAddOnlyHint:e=>`Add another pick to stay at ${e}.`,switchTierLabel:e=>`Switch to ${e}-leg`,overloadTitle:"Add more picks to win more",tableColumnLabel:"Legs",tierButtonLabel:e=>`Multi ${e}`}}}function Cr({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:r,howToPlayMarkdown:i,selectedCategory:l,displayCategoryName:a}=xo(),d=n.colors,{width:h}=(0,c.useWindowDimensions)(),u=h>=640,f=h>=768;return(0,s.jsxs)(c.View,{style:u&&Br.headerWide,children:[(0,s.jsxs)(c.View,{style:Br.titleRow,children:[(0,s.jsx)(c.Text,{style:[Br.title,u&&Br.titleWide,f&&Br.titleDesktop,{color:B(n),fontFamily:o,flex:1}],children:"Choose your game"}),i?.trim()?(0,s.jsx)(c.View,{style:Br.howToPlayWrap,children:(0,s.jsx)(Ee,{content:i,title:"How to Play",colors:{text:d.text,textMuted:d.textMuted,border:d.border,background:d.background,backgroundAlt:d.backgroundAlt,primary:d.primary,primaryText:d.primaryText},bodyFont:r,headingFont:o})}):null]}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:l?a(l):void 0})]})}var Br=c.StyleSheet.create({container:{flex:1},headerWide:{paddingLeft:8},titleRow:{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:12},title:{fontSize:18,fontWeight:"700",lineHeight:22.5},titleWide:{fontSize:20,lineHeight:25},titleDesktop:{fontSize:24,lineHeight:30},howToPlayWrap:{flexShrink:0,marginTop:2},content:{flex:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function zr(e,t){const n=new Set(t.map(e=>e.eventId??e.event_id).filter(e=>Boolean(e)));if(0===n.size)return e;const o=[],r=[];for(const i of e){const e=i.eventId??i.event_id;(e&&n.has(e)?r:o).push(i)}return[...o,...r]}function Fr(e,t,n){const[o,r]=(0,a.useState)([]),[i,l]=(0,a.useState)([]),[c,s]=(0,a.useState)([]),[d,h]=(0,a.useState)([]),[u,f]=(0,a.useState)(null),g=(0,a.useMemo)(()=>{const t=new Map;for(const n of e)t.set(n.id,n);return t},[e]),p=(0,a.useMemo)(()=>e.filter(e=>null!=t[e.id]),[e,t]),y=(0,a.useMemo)(()=>e.map(e=>e.id).join(","),[e]),m=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(m.current===y)return;m.current=y;const n=e.filter(e=>!(e.id in t)),o=e.filter(e=>null!=t[e.id]);r(n.map(e=>e.id)),l(zr(n,o).slice(0,3).map(e=>e.id)),s([]),h([]),f(null)},[y,e,t]);const b=(0,a.useMemo)(()=>{const e=new Set(c);return[...zr(o.map(e=>g.get(e)).filter(e=>Boolean(e)).filter(t=>!e.has(t.id)),p).map(e=>e.id),...c.filter(e=>o.includes(e))]},[o,g,p,c]);(0,a.useEffect)(()=>{l(e=>{const t=new Set(o),n=e.filter(e=>t.has(e));if(0===d.length&&!u){const t=b.slice(0,3);return t.length===n.length&&t.every((e,t)=>e===n[t])?n.length===e.length?e:n:t}if(n.length>=Math.min(3,o.length))return n.length===e.length?e:n;const r=[...n];for(const o of b){if(r.length>=3)break;r.includes(o)||r.push(o)}return r})},[o,b,d,u]);const w=(0,a.useMemo)(()=>i.map(e=>g.get(e)).filter(e=>Boolean(e)),[i,g]),x=(0,a.useCallback)((e,t)=>{f(null),t&&n(e,t),h(n=>[...n,{id:e,answer:t}]),l(t=>t.filter(t=>t!==e)),s(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]}),r(n=>{const o=n.filter(t=>t!==e);return t?o:[...o,e]})},[n]),k=(0,a.useCallback)(()=>{const e=d[d.length-1];e&&(e.answer&&n(e.id,e.answer),f({id:e.id,from:"yes"===e.answer?"right":"no"===e.answer?"left":"up"}),h(e=>e.slice(0,-1)),s(t=>t.filter(t=>t!==e.id)),r(t=>[e.id,...t.filter(t=>t!==e.id)]),l(t=>[e.id,...t.filter(t=>t!==e.id)].slice(0,3)))},[d,n]);return{visible:w,canSkip:o.length>1,canUndo:d.length>0,restored:u,resolve:x,undo:k}}var vr=c.Easing.bezier(.32,0,.67,0),Wr=c.Easing.bezier(.22,1,.36,1),Tr={stiffness:420,damping:34},Ar={stiffness:280,damping:28},Rr="#00C853",Lr="#E53935";function Dr(e){return"up"===e?{x:0,y:-720}:{x:"right"===e?640:-640,y:70}}function Mr(e,t,n){return n&&-t>Math.abs(e)}function Pr({prop:e,theme:t,depth:n=0,enterFrom:o,canSkip:r=!1,onResolve:i,registerApi:l,onDragStateChange:d,children:h}){const u=(0,a.useContext)(bo),f=t??u?.theme??E,g=ce(f),p=f.colors.productYes??Rr,y=f.colors.productNo??Lr,m=0===n,b=(0,a.useRef)(!1),w=(0,a.useRef)({x:0,y:0}),x=(0,a.useRef)({x:0,y:0}),k=(0,a.useRef)(null),S=(0,a.useRef)(0),C=(0,a.useRef)(null),B=(0,a.useRef)(null),z=(0,a.useRef)(null),F=(0,a.useRef)(r);F.current=r;const v=(0,a.useRef)(d);v.current=d;const W=(0,a.useRef)(new c.Animated.ValueXY({x:0,y:0})).current,T=(0,a.useRef)(new c.Animated.Value(0)).current,A=(0,a.useCallback)(()=>{W.setValue({x:w.current.x,y:w.current.y}),T.setValue(Mr(w.current.x,w.current.y,F.current)?1:0)},[T,W]),R=(0,a.useCallback)(()=>{null!=C.current&&(cancelAnimationFrame(C.current),C.current=null),B.current&&(B.current.stop(),B.current=null)},[]),L=(0,a.useCallback)(e=>{R();let t=null;const n=o=>{const r=Math.min(null==t?1/60:(o-t)/1e3,1/30);t=o;const i=w.current,l=x.current;if(l.x+=(-e.stiffness*i.x-e.damping*l.x)*r,l.y+=(-e.stiffness*i.y-e.damping*l.y)*r,i.x+=l.x*r,i.y+=l.y*r,Math.abs(i.x)<.5&&Math.abs(i.y)<.5&&Math.abs(l.x)<2&&Math.abs(l.y)<2)return i.x=0,i.y=0,l.x=0,l.y=0,A(),void(C.current=null);A(),C.current=requestAnimationFrame(n)};C.current=requestAnimationFrame(n)},[A,R]),D=(0,a.useCallback)(t=>{if(b.current)return;if("up"===t&&!F.current)return;b.current=!0,R();const n="right"===t?"yes":"left"===t?"no":null,o=Dr(t);w.current={...o},T.setValue("up"===t?1:0),B.current=c.Animated.timing(W,{toValue:o,duration:260,easing:vr,useNativeDriver:!1}),B.current.start(),z.current=setTimeout(()=>i(e.id,n),260)},[i,e.id,R,T,W]);(0,a.useEffect)(()=>()=>{z.current&&clearTimeout(z.current),null!=C.current&&cancelAnimationFrame(C.current),B.current?.stop(),k.current&&v.current?.(!1)},[]),(0,a.useEffect)(()=>{if(!o)return R(),w.current={x:0,y:0},x.current={x:0,y:0},void A();const e=Dr(o);w.current={x:e.x,y:e.y},x.current={x:0,y:0},A(),L(Ar)},[o,A,L,R]),(0,a.useEffect)(()=>{if(m&&l)return l({fly:D}),()=>l(null)},[D,m,l]);const M=(0,a.useMemo)(()=>c.PanResponder.create({onStartShouldSetPanResponder:()=>!1,onMoveShouldSetPanResponder:(e,t)=>!b.current&&(Math.abs(t.dx)>2&&Math.abs(t.dx)>Math.abs(t.dy)||F.current&&-t.dy>2&&-t.dy>Math.abs(t.dx)),onPanResponderGrant:()=>{R(),k.current={x:w.current.x,y:w.current.y},x.current={x:0,y:0},S.current=Date.now(),v.current?.(!0)},onPanResponderMove:(e,t)=>{if(b.current||!k.current)return;if(t.numberActiveTouches>1)return;const n=k.current.x+t.dx,o=k.current.y+t.dy,r=e.nativeEvent.timestamp??Date.now(),i=r-S.current;if(i>0){const e=1-Math.exp(-i/40);x.current.x+=((n-w.current.x)/i*1e3-x.current.x)*e,x.current.y+=((o-w.current.y)/i*1e3-x.current.y)*e,S.current=r}w.current.x=n,w.current.y=o,A()},onPanResponderRelease:e=>{if(!k.current)return;if(k.current=null,v.current?.(!1),b.current)return;(e.nativeEvent.timestamp??Date.now())-S.current>90&&(x.current={x:0,y:0});const t=w.current,n=x.current;if(Mr(t.x,t.y,F.current)){if(t.y<-110||n.y<-620)return D("up")}else{if(t.x>110||n.x>620)return D("right");if(t.x<-110||n.x<-620)return D("left")}L(Tr)},onPanResponderTerminate:()=>{k.current=null,x.current={x:0,y:0},v.current?.(!1),b.current||L(Tr)},onPanResponderTerminationRequest:()=>!1,onShouldBlockNativeResponder:()=>!0}),[D,A,L,R]),P=W.x.interpolate({inputRange:[-260,0,260],outputRange:["-16deg","0deg","16deg"],extrapolate:"clamp"}),H=c.Animated.subtract(1,T),O=c.Animated.multiply(H,W.x.interpolate({inputRange:[24,132],outputRange:[0,1],extrapolate:"clamp"})),I=c.Animated.multiply(H,W.x.interpolate({inputRange:[-132,-24],outputRange:[1,0],extrapolate:"clamp"})),j=c.Animated.multiply(T,W.y.interpolate({inputRange:[-120,-30],outputRange:[1,0],extrapolate:"clamp"})),N=(0,a.useRef)(new c.Animated.Value(n)).current;(0,a.useEffect)(()=>{const e=c.Animated.timing(N,{toValue:n,duration:240,easing:Wr,useNativeDriver:!1});return e.start(),()=>e.stop()},[n,N]);const G=N.interpolate({inputRange:[0,3],outputRange:[0,36]}),Y=N.interpolate({inputRange:[0,3],outputRange:[1,.88]});return(0,s.jsx)(c.Animated.View,{style:[c.StyleSheet.absoluteFill,{zIndex:3-n,transform:[{translateY:G},{scale:Y}]}],pointerEvents:m?"auto":"none",children:(0,s.jsxs)(c.Animated.View,{style:{flex:1,transform:[{translateX:W.x},{translateY:W.y},{rotate:P}]},...m?M.panHandlers:{},children:[h,m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[Ir.stamp,Ir.stampLeft,{opacity:O,borderColor:p,transform:[{rotate:"-12deg"}]}],children:(0,s.jsx)(c.Text,{style:[Ir.stampText,{color:p,fontFamily:g}],children:"Yes"})}),(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[Ir.stamp,Ir.stampRight,{opacity:I,borderColor:y,transform:[{rotate:"12deg"}]}],children:(0,s.jsx)(c.Text,{style:[Ir.stampText,{color:y,fontFamily:g}],children:"No"})}),r&&(0,s.jsx)(c.Animated.View,{pointerEvents:"none",style:[Ir.skipPillWrap,{opacity:j}],children:(0,s.jsx)(c.View,{style:[Ir.skipPill,{borderColor:f.colors.border,backgroundColor:f.colors.background}],children:(0,s.jsx)(c.Text,{style:[Ir.skipPillText,{color:f.colors.primary}],children:"Skip"})})})]})]})})}function Hr({prop:e}){const{theme:t,headingFont:n,renderTeamLogo:o,displaySportName:r,gameCategory:i}=xo(),l=t.colors,{height:a}=(0,c.useWindowDimensions)(),d=a<700?12:24,h=nt(e),u=Qe(e),f=("racing"===i?[e.away_team?.trim()||e.home_team?.trim()]:[e.home_team?.trim(),e.away_team?.trim()]).filter(Boolean);return(0,s.jsxs)(c.View,{style:[Ir.face,{backgroundColor:D(t),borderColor:l.border}],children:[(0,s.jsx)(c.View,{style:[Ir.matchupBand,{backgroundColor:M(t)}],children:f.length>0?f.map((e,n)=>(0,s.jsxs)(c.View,{style:Ir.matchupTeam,children:[n>0&&(0,s.jsx)(c.Text,{style:[Ir.matchupVs,{color:L(t)}],children:"vs"}),o?.(e),(0,s.jsx)(c.Text,{style:[Ir.matchupName,{color:R(t)}],children:e})]},`${e}-${n}`)):(0,s.jsx)(c.Text,{style:[Ir.matchupName,{color:R(t)}],children:e.league??r(e.sport??"")})}),(0,s.jsxs)(c.View,{style:[Ir.faceBody,{paddingVertical:d,gap:12===d?12:16}],children:[(0,s.jsxs)(c.View,{style:Ir.propositionRow,children:[vo(e,o,f.join(" vs ")),h?(0,s.jsxs)(c.View,{style:{flex:1,gap:12},children:[(0,s.jsxs)(c.Text,{style:[Ir.compositeLabel,{color:z(t)}],children:["All ","OR"===h.operator?"or any of these":"of these"]}),(0,s.jsx)(c.View,{style:{gap:8},children:h.legs.map((e,o)=>(0,s.jsxs)(c.View,{style:Ir.compositeLeg,children:[(0,s.jsx)(c.Text,{style:{color:l.primary,fontWeight:"700"},children:"OR"===h.operator?"/":"+"}),(0,s.jsx)(c.Text,{style:[Ir.compositeLegText,{color:F(t),fontFamily:n}],children:e.text})]},o))})]}):(0,s.jsx)(c.Text,{style:[Ir.proposition,{flex:1,color:F(t),fontFamily:n}],children:e.description??e.proposition})]}),e.outcome_description&&e.outcome_description!==e.description&&(0,s.jsx)(c.Text,{style:[Ir.outcome,{color:l.textMuted}],children:e.outcome_description})]}),(0,s.jsxs)(c.View,{style:[Ir.faceFooter,{borderTopColor:l.borderSubtle??l.border}],children:[e.sport?(0,s.jsx)(c.View,{style:[Ir.sportChip,{backgroundColor:l.infoBg}],children:(0,s.jsx)(c.Text,{style:[Ir.sportChipText,{color:l.infoText}],children:r(e.sport)})}):null,u?(0,s.jsx)(c.Text,{style:[Ir.footerMeta,{color:l.textMuted}],children:u.replace(/[_-]+/g," ").toUpperCase()}):null,e.commence_time?(0,s.jsx)(c.Text,{style:[Ir.footerMeta,Ir.footerDate,{color:l.textMuted}],children:ut(e.commence_time)}):null]})]})}function Or({onBack:e,onNext:t,viewSwitch:n,onDragStateChange:o}){const{theme:r,headingFont:i,propositions:l,selections:d,toggleSelection:h,selectedGame:u,selectedPropositionCount:f,answeredCount:g,selectionValid:p,goToConfirmation:y,goToSportSelection:m,loading:b,error:w,selectedRule:x}=xo(),k=r.colors,S=k.productYes??Rr,C=k.productNo??Lr,{height:z}=(0,c.useWindowDimensions)(),F=Math.max(224,Math.min(.44*z,416)),v=(0,a.useRef)(null);(0,a.useEffect)(()=>{u||(m(),e?.())},[m,e,u]);const{visible:W,canSkip:T,canUndo:A,restored:R,resolve:L,undo:M}=Fr(l,d,h),P=u?St(u,f??void 0,x):{min:0,max:0},H=P.max,O=H>0&&g>=H,I=(()=>{if(!u)return null;if(P.min>0&&P.min===P.max)return P.min;const e=wr(u);return null!=f&&f>0&&("game_set"===e||"pick_your_dividend"===e||xr(u))?f:H>0?H:null})(),E=(0,a.useRef)(g);(0,a.useEffect)(()=>{const e=E.current;if(E.current=g,null==I||e>=I||g!==I)return;const n=setTimeout(()=>{y(),t?.()},420);return()=>clearTimeout(n)},[g,y,t,I]);const j=!O&&W.length>0,N=(0,a.useCallback)(e=>{v.current=e},[]);if(!u)return null;const G=(e,t,n,o)=>(0,s.jsx)(c.TouchableOpacity,{onPress:n,disabled:o,accessibilityLabel:e,accessibilityRole:"button",style:[Ir.circleButton,{borderColor:k.border,backgroundColor:k.background},o&&Ir.disabled],children:(0,s.jsx)(c.Text,{style:{fontSize:18,color:k.textMuted},children:t})});return(0,s.jsxs)(c.View,{style:Ir.container,children:[n?(0,s.jsx)(c.View,{style:Ir.viewSwitchRow,children:n}):null,b?(0,s.jsx)(c.Text,{style:[Ir.loadingText,{color:k.textMuted}],children:"Loading…"}):w?(0,s.jsx)(c.View,{style:[Ir.errorBox,{backgroundColor:k.errorBg,borderColor:k.error}],children:(0,s.jsx)(c.Text,{style:{fontSize:14,color:k.errorText??k.error,textAlign:"center"},children:w})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:Ir.deckArea,children:j?(0,s.jsx)(c.View,{style:[Ir.deck,{height:F}],children:W.map((e,t)=>(0,s.jsx)(Pr,{prop:e,depth:t,canSkip:T,enterFrom:R?.id===e.id?R.from:null,onResolve:L,registerApi:0===t?N:void 0,onDragStateChange:0===t?o:void 0,children:(0,s.jsx)(Hr,{prop:e})},e.id))}):(0,s.jsxs)(c.View,{style:[Ir.emptyState,{backgroundColor:D(r),borderColor:k.border}],children:[(0,s.jsx)(c.Text,{style:[Ir.emptyTitle,{color:B(r),fontFamily:i}],children:O?"Card full":"That’s the last one"}),(0,s.jsx)(c.Text,{style:[Ir.emptyBody,{color:k.textMuted}],children:O?`You've picked all ${H} legs for ${u.game_name}. Undo a swipe to change one, or lock it in.`:p?"You've been through every proposition. Lock your card in, or undo to revisit a pick.":`No propositions left to answer${P.min>0?` — this game needs at least ${P.min}`:""}. Undo a swipe or head back to widen the pool.`}),A&&(0,s.jsx)(c.TouchableOpacity,{onPress:M,style:[Ir.emptyUndo,{borderColor:k.border}],children:(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:k.text},children:"Undo last swipe"})})]})}),(0,s.jsxs)(c.View,{style:Ir.buttonArea,children:[(0,s.jsxs)(c.View,{style:Ir.buttonRow,children:[G("Undo last swipe","↺",M,!A),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>v.current?.fly("left"),disabled:!j,style:[Ir.answerButton,{backgroundColor:C},!j&&Ir.disabled],children:(0,s.jsx)(c.Text,{style:[Ir.answerButtonText,{fontFamily:i}],children:"NO"})}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>v.current?.fly("right"),disabled:!j,style:[Ir.answerButton,{backgroundColor:S},!j&&Ir.disabled],children:(0,s.jsx)(c.Text,{style:[Ir.answerButtonText,{fontFamily:i}],children:"YES"})}),G("Skip this proposition","↑",()=>v.current?.fly("up"),!j||!T)]}),(0,s.jsx)(c.Text,{style:[Ir.gestureHint,{color:k.textMuted}],children:T?"Swipe right for Yes, left for No · ↑ to skip":"Swipe right for Yes, left for No"})]})]})]})}var Ir=c.StyleSheet.create({container:{flex:1},viewSwitchRow:{flexDirection:"row",justifyContent:"flex-end",paddingBottom:12},loadingText:{paddingVertical:40,textAlign:"center",fontSize:14},errorBox:{borderRadius:12,borderWidth:1,padding:16},deckArea:{flex:1,minHeight:0,justifyContent:"center",paddingTop:12,paddingBottom:32},deck:{width:"100%",maxWidth:384,alignSelf:"center"},face:{flex:1,borderRadius:24,borderWidth:1,overflow:"hidden",shadowColor:"#0A1416",shadowOpacity:.25,shadowRadius:20,shadowOffset:{width:0,height:12},elevation:8},matchupBand:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,paddingHorizontal:20,paddingVertical:12},matchupTeam:{flexDirection:"row",alignItems:"center",gap:6},matchupVs:{fontSize:12,marginRight:4},matchupName:{fontSize:14,fontWeight:"600"},faceBody:{flex:1,justifyContent:"center",gap:16,paddingHorizontal:20,paddingVertical:24},compositeLabel:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.5},compositeLeg:{flexDirection:"row",gap:8},compositeLegText:{flex:1,fontSize:16,fontWeight:"700",lineHeight:21},propositionRow:{flexDirection:"row",alignItems:"flex-start",gap:8},proposition:{fontSize:21,fontWeight:"800",lineHeight:27,letterSpacing:-.3},outcome:{fontSize:14,lineHeight:19},faceFooter:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:8,borderTopWidth:1,paddingHorizontal:20,paddingVertical:12},sportChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},sportChipText:{fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.5},footerMeta:{fontSize:11,letterSpacing:.5},footerDate:{marginLeft:"auto"},stamp:{position:"absolute",top:20,borderWidth:4,borderRadius:12,paddingHorizontal:12,paddingVertical:4},stampLeft:{left:20},stampRight:{right:20},stampText:{fontSize:24,fontWeight:"800",textTransform:"uppercase",letterSpacing:2},skipPillWrap:{position:"absolute",left:0,right:0,bottom:24,alignItems:"center"},skipPill:{borderWidth:1,borderRadius:999,paddingHorizontal:12,paddingVertical:4},skipPillText:{fontSize:12,fontWeight:"600",textTransform:"uppercase",letterSpacing:1.5},emptyState:{width:"100%",maxWidth:384,alignSelf:"center",alignItems:"center",gap:12,borderRadius:24,borderWidth:1,borderStyle:"dashed",paddingHorizontal:24,paddingVertical:40},emptyTitle:{fontSize:16,fontWeight:"800"},emptyBody:{fontSize:14,textAlign:"center",lineHeight:19},emptyUndo:{borderWidth:1,borderRadius:999,paddingHorizontal:20,paddingVertical:8},buttonArea:{flexShrink:0},buttonRow:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:12,width:"100%",maxWidth:384,alignSelf:"center"},circleButton:{height:44,width:44,borderRadius:999,borderWidth:1,alignItems:"center",justifyContent:"center"},answerButton:{flex:1,height:56,borderRadius:999,alignItems:"center",justifyContent:"center"},answerButtonText:{fontSize:18,fontWeight:"800",letterSpacing:1.5,color:"#ffffff"},gestureHint:{marginTop:8,textAlign:"center",fontSize:11},disabled:{opacity:.35}});function Er({gameKey:e,short:t,size:n=56,footer:o="YESNO Multi",title:r,sportBaseKey:i}){const l=lt(e,i,t),a=function(e){return e.length<=3?92:4===e.length?72:56}(l),c=r??`${l} button`;return(0,s.jsxs)(d.default,{viewBox:"0 0 360 360",width:n,height:n,accessibilityLabel:c,children:[(0,s.jsx)(d.Rect,{x:2,y:2,width:356,height:356,rx:78,fill:"#DDD9D2",stroke:ot,strokeWidth:4}),(0,s.jsx)(d.Rect,{x:50,y:10,width:260,height:260,rx:52,fill:ot,opacity:.3}),(0,s.jsx)(d.Rect,{x:50,y:35,width:260,height:260,rx:52,fill:ot,opacity:.55}),(0,s.jsx)(d.Rect,{x:50,y:60,width:260,height:260,rx:52,fill:ot}),(0,s.jsx)(d.Text,{x:180,y:220,fontFamily:"Manrope, Poppins, sans-serif",fontSize:a,letterSpacing:-3,textAnchor:"middle",fontWeight:"800",fill:"#DFFF1A",children:l}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Text,{x:180,y:345,fontFamily:"Manrope, Poppins, sans-serif",fontSize:24,letterSpacing:-.5,textAnchor:"middle",fontWeight:"700",fill:ot,children:o}),(0,s.jsx)(d.Text,{x:262,y:333,fontFamily:"Manrope, Poppins, sans-serif",fontSize:10,fontWeight:"600",fill:ot,children:"TM"})]})]})}function jr({onBack:e,hideActions:t,backLabel:n="Category"}={}){const{theme:o,selectedCategory:r}=xo(),i=o.colors,l=ce(o),{width:a}=(0,c.useWindowDimensions)(),d=a>=640;return(0,s.jsxs)(c.View,{style:d&&Gr.headerWide,children:[(0,s.jsx)(c.Text,{style:[Gr.sectionTitle,d&&Gr.sectionTitleWide,{color:i.primary,fontFamily:l}],children:xt(r)}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:e?n:void 0})]})}function Nr({onSelectSport:e,onCancel:t,hideTitle:n,hideActions:o,renderSportLogo:r,renderSportTagline:i,backLabel:l,comingSoonSports:d}){const{theme:h,propositionsForSportPicker:u,sportSummaries:f,loading:g,setSelectedSport:p,clearSelectedGame:y,selectedCategory:m,sportBaseKey:b,displaySportName:w}=xo(),x=h.colors,k=D(h),S=ce(h),C=ae(h),z=B(h),{width:F}=(0,c.useWindowDimensions)(),v=F>=640,W=v?48:40,[T,A]=a.default.useState(null),R=ft(u),L=Object.keys(R);return g?(0,s.jsx)(c.View,{style:Gr.container,children:(0,s.jsx)(sn,{colors:H(h),bodyFont:C,variant:"sport",categoryCount:L.length>0?L.length:2})}):(0,s.jsxs)(c.View,{style:Gr.container,children:[!n&&(0,s.jsx)(c.View,{style:Gr.titleWrap,children:(0,s.jsx)(jr,{onBack:t,hideActions:o,backLabel:l})}),(0,s.jsx)(c.View,{style:Gr.content,children:(0,s.jsxs)(c.View,{style:Gr.grid,children:[L.map(t=>{const n=f.find(e=>e.key===t),o=n?.active_props??R[t].length,l=i?.(t,o)??(n?`${a=n.games_today} game${1===a?"":"s"} today · ${d=n.active_props} pick${1===d?"":"s"} available`:function(e,t){return 0===e?"racing"===t?"No races today":"casino"===t?"No games today":"No picks available":"racing"===t?`${e} race${1===e?"":"s"} today`:"casino"===t?`${e} game${1===e?"":"s"} available`:`${e} pick${1===e?"":"s"} available`}(o,m));var a,d;const h=w(t),u=T===t,g=n?n.games_today>0:o>0;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{p(t),y(),e?.(t)},...ze(()=>A(t),()=>A(e=>e===t?null:e)),style:[Gr.gridCard,v&&Gr.gridCardWide,{backgroundColor:k,borderColor:u?x.primary:x.border},Gr.gridCardRaised],activeOpacity:.85,children:[r?r(t):(0,s.jsx)(Er,{gameKey:t,size:W,footer:null,sportBaseKey:b,title:`${h} button`}),(0,s.jsxs)(c.View,{style:Gr.gridText,children:[(0,s.jsx)(c.Text,{numberOfLines:1,style:[Gr.gridName,v&&Gr.gridNameWide,{color:z,fontFamily:S}],children:h}),(0,s.jsxs)(c.View,{style:Gr.gridTaglineRow,children:[g?(0,s.jsx)(c.View,{style:[Gr.liveDot,{backgroundColor:x.success}]}):null,(0,s.jsx)(c.Text,{numberOfLines:1,style:[Gr.gridMeta,{color:x.primary,fontFamily:C}],children:l})]})]}),(0,s.jsx)(c.View,{style:Gr.gridChevron,children:(0,s.jsx)(Ge,{size:20,color:x.textMuted})})]},t)}),d?.map(e=>{const{game:t,league:n}=function(e,t){const n=e.match(/^(.*?)\s*\(([^)]+)\)\s*$/);return n?{game:n[1].trim(),league:n[2].trim()}:{game:e,league:t}}(e.label,e.short??lt(e.key,b));return(0,s.jsxs)(c.View,{style:[Gr.gridCard,v&&Gr.gridCardWide,{backgroundColor:ee(x.backgroundAlt,.4),borderColor:ee(x.border,.7)}],children:[(0,s.jsx)(c.View,{style:Gr.comingSoonLogo,children:r?r(e.key):(0,s.jsx)(Er,{gameKey:e.key,short:e.short,size:W,footer:null,sportBaseKey:b,title:`${e.label} button`})}),(0,s.jsxs)(c.View,{style:Gr.gridText,children:[(0,s.jsx)(c.Text,{numberOfLines:1,style:[Gr.gridName,v&&Gr.gridNameWide,{color:x.textMuted,fontFamily:S}],children:n&&n!==t?`${t} · ${n}`:t}),(0,s.jsx)(c.Text,{numberOfLines:1,style:[Gr.gridMeta,Gr.gridMetaSpaced,{color:x.textMuted,fontFamily:C}],children:(o=e.seasonStart,o?`Starts ${o}`:"Coming soon")})]}),(0,s.jsxs)(c.View,{style:[Gr.soonPill,{backgroundColor:x.backgroundAlt}],children:[(0,s.jsx)(Ye,{size:12,color:x.textMuted}),(0,s.jsx)(c.Text,{style:[Gr.soonPillText,{color:x.textMuted,fontFamily:C}],children:"Soon"})]})]},e.key);var o})]})})]})}var Gr=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:12},gridCard:{flexBasis:"100%",flexGrow:1,minWidth:0,flexDirection:"row",alignItems:"center",gap:12,borderRadius:16,borderWidth:1,paddingHorizontal:12,paddingVertical:12},gridCardWide:{flexBasis:"48%",gap:14,paddingHorizontal:16,paddingVertical:16},gridCardRaised:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:2},gridText:{flexDirection:"column",alignItems:"flex-start",minWidth:0,flexShrink:1,flexGrow:1},gridName:{fontSize:14,fontWeight:"800",letterSpacing:-.35,lineHeight:18,maxWidth:"100%"},gridNameWide:{fontSize:16,lineHeight:20},gridTaglineRow:{marginTop:4,flexDirection:"row",alignItems:"center",gap:6,minWidth:0},gridMeta:{fontSize:9.3,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.1,flexShrink:1},gridMetaSpaced:{marginTop:4},liveDot:{width:6,height:6,borderRadius:3},gridChevron:{marginLeft:"auto"},comingSoonLogo:{opacity:.6},soonPill:{marginLeft:"auto",flexDirection:"row",alignItems:"center",gap:4,borderRadius:999,paddingHorizontal:8,paddingVertical:4},soonPillText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function Yr({onBack:e,hideActions:t}={}){const{theme:n}=xo(),o=ce(n),r=n.colors,{width:i}=(0,c.useWindowDimensions)(),l=i>=640;return(0,s.jsxs)(c.View,{style:l&&Ur.headerWide,children:[(0,s.jsx)(c.Text,{style:[Ur.sectionTitle,l&&Ur.sectionTitleWide,{color:r.primary,fontFamily:o}],children:"Pick a category"}),(0,s.jsx)(tr,{onBack:e,hideActions:t})]})}function Vr({onSelectCategory:e,onCancel:t,hideTitle:n,hideActions:o,renderCategoryIcon:r,getCategoryTagline:i}){const{theme:l,propositionsForCategoryPicker:d,loading:h,setSelectedCategory:u,setSelectedSport:f,clearSelectedGame:g,displayCategoryName:p}=xo(),y=l.colors,m=D(l),b=ae(l),{width:w}=(0,c.useWindowDimensions)(),x=w>=640,k=w>=400,[S,C]=a.default.useState(null),[B,z]=a.default.useState(0),F=k?B>0?(B-(x?12:10))/2:"48%":"100%";bt(d);const v=wt(d);return h?(0,s.jsx)(c.View,{style:Ur.container,children:(0,s.jsx)(sn,{colors:H(l),bodyFont:b,variant:"category",categoryCount:v.length>0?v.length:2})}):(0,s.jsxs)(c.View,{style:Ur.container,children:[!n&&(0,s.jsx)(c.View,{style:Ur.titleWrap,children:(0,s.jsx)(Yr,{onBack:t,hideActions:o})}),(0,s.jsx)(c.View,{style:Ur.content,children:(0,s.jsx)(c.View,{style:[Ur.grid,x&&Ur.gridWide],onLayout:e=>z(e.nativeEvent.layout.width),children:v.map(t=>{const n=i?.(t)??function(e){return it[e]??""}(t),o=S===t;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{u(t),f(null),g(),e?.(t)},...ze(()=>C(t),()=>C(e=>e===t?null:e)),style:[Ur.card,x&&Ur.cardWide,{width:F,backgroundColor:m,borderColor:o?y.primary:y.border},o&&Ur.cardHovered],activeOpacity:.85,children:[(0,s.jsx)(Ue,{label:p(t),category:t,icon:r?.(t),theme:l}),n?(0,s.jsx)(c.Text,{style:[Ur.tagline,x&&Ur.taglineWide,{color:y.primary,fontFamily:b}],children:n}):null]},t)})})})]})}var Ur=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},titleWrap:{marginBottom:8},headerWide:{paddingLeft:8},sectionTitle:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1.4,marginBottom:12},sectionTitleWide:{fontSize:12,letterSpacing:2.16,marginBottom:16},content:{flex:1},grid:{flexDirection:"row",flexWrap:"wrap",gap:10},gridWide:{gap:12},card:{alignItems:"flex-start",justifyContent:"center",gap:8,minHeight:112,borderRadius:16,borderWidth:1,padding:14},cardWide:{gap:12,minHeight:140,padding:20},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},tagline:{fontSize:10,fontWeight:"500",textTransform:"uppercase",letterSpacing:.8},taglineWide:{fontSize:12,letterSpacing:1.2},footer:{flexDirection:"row",alignItems:"center",paddingTop:16},secondaryBtn:{paddingHorizontal:20,paddingVertical:10,borderRadius:8},secondaryBtnText:{fontSize:14,fontWeight:"500"}});function Zr(e){if(!e)return"Start time to be confirmed";const t=new Date(e);return Number.isNaN(t.getTime())?e:new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"2-digit"}).format(t)}function Kr({name:e,renderTeamLogo:t,muted:n,headingFont:o,ink:r,wide:i}){if(!e)return(0,s.jsx)(c.Text,{style:[Xr.teamName,{color:n,fontFamily:o}],children:"TBC"});const l=t?.(e);return(0,s.jsxs)(c.View,{style:Xr.teamMark,children:[null!=l?(0,s.jsx)(c.View,{style:Xr.teamLogo,children:l}):null,(0,s.jsx)(c.Text,{style:[Xr.teamName,i&&Xr.teamNameWide,{color:r,fontFamily:o}],children:e})]})}function qr({onSelectEvent:e}){const{theme:t,loading:n,sameGameMultiEvents:o,selectSameGameMultiEvent:r,renderTeamLogo:i,displaySportName:l}=xo(),d=t.colors,h=ae(t),u=ce(t),f=D(t),g=M(t),{width:p}=(0,c.useWindowDimensions)(),y=p>=640,[m,b]=a.default.useState(null),[w,x]=a.default.useState(null);return n?(0,s.jsx)(c.View,{style:Xr.container,children:(0,s.jsx)(sn,{colors:H(t),bodyFont:h,variant:"event"})}):(0,s.jsxs)(c.View,{style:Xr.container,accessibilityLabel:"Available fixtures",children:[(0,s.jsx)(c.Text,{style:[Xr.intro,{color:d.textMuted,fontFamily:h}],children:"All picks in your multi must come from one game."}),0===o.length?(0,s.jsx)(c.View,{accessibilityRole:"text",accessibilityLiveRegion:"polite",style:[Xr.emptyState,{borderColor:d.border,backgroundColor:f}],children:(0,s.jsx)(c.Text,{style:[Xr.emptyText,{color:d.textMuted,fontFamily:h}],children:"No fixtures with available propositions."})}):(0,s.jsx)(c.View,{style:[Xr.list,y&&Xr.listWide],children:o.map(t=>{const n=m===t.id,o=w===t.id;return(0,s.jsxs)(c.TouchableOpacity,{accessibilityRole:"button",accessibilityLabel:`Select ${dn(t)}`,onPress:()=>{r(t.id),e?.(t.id)},activeOpacity:.85,...ze(()=>b(t.id),()=>b(e=>e===t.id?null:e)),onFocus:()=>x(t.id),onBlur:()=>x(e=>e===t.id?null:e),style:[Xr.card,y&&Xr.cardWide,{borderColor:n||o?d.primary:d.border,backgroundColor:f},n&&Xr.cardHovered],children:[(0,s.jsxs)(c.View,{style:Xr.cardMain,children:[(0,s.jsxs)(c.View,{style:[Xr.matchup,y&&Xr.matchupWide,{backgroundColor:g}],children:[(0,s.jsx)(Kr,{name:t.homeTeam,renderTeamLogo:i,muted:d.textMuted,headingFont:u,ink:d.text,wide:y}),(0,s.jsx)(c.Text,{style:[Xr.vs,{color:d.textMuted,fontFamily:u}],children:"vs"}),(0,s.jsx)(Kr,{name:t.awayTeam,renderTeamLogo:i,muted:d.textMuted,headingFont:u,ink:d.text,wide:y})]}),(0,s.jsxs)(c.Text,{style:[Xr.meta,y&&Xr.metaWide,{color:d.textMuted,fontFamily:h}],children:[Zr(t.commenceTime)," · ",t.propositionCount," proposition",1===t.propositionCount?"":"s",t.league||t.sport?` · ${t.league?.toUpperCase()??l(t.sport)}`:""]})]}),(0,s.jsx)(c.View,{style:{flexShrink:0,transform:[{translateX:n?2:0}]},children:(0,s.jsx)(Ge,{size:22,color:d.textMuted})})]},t.id)})})]})}var Xr=c.StyleSheet.create({container:{flex:1},centered:{flex:1,flexDirection:"row",justifyContent:"center",alignItems:"center",padding:32},intro:{fontSize:14,lineHeight:22.75,marginBottom:16},emptyState:{borderWidth:1,borderRadius:16,padding:24,alignItems:"center"},emptyText:{fontSize:14,textAlign:"center"},list:{gap:10},listWide:{gap:12},cardHovered:{shadowColor:"#000",shadowOpacity:.1,shadowRadius:6,shadowOffset:{width:0,height:4},elevation:3},card:{minHeight:64,width:"100%",flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:16,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:16},cardMain:{flex:1,minWidth:0},matchup:{flexDirection:"column",alignItems:"flex-start",gap:4,borderRadius:12,paddingHorizontal:12,paddingVertical:10},matchupWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:6},teamMark:{flexDirection:"row",alignItems:"center",gap:6,minWidth:0,maxWidth:"100%"},teamLogo:{flexShrink:0},teamName:{fontSize:14,fontWeight:"600",flexShrink:1},teamNameWide:{fontSize:16},vs:{fontSize:12,fontWeight:"400"},meta:{marginTop:8,fontSize:11,fontWeight:"500"},metaWide:{fontSize:12}});function Qr({counts:e,onPick:t,onDoubleAction:n,colors:o,align:r="right",direction:i="down",menuShadow:l="0 1px 0 rgba(255,255,255,0.6) inset, 0 20px 50px -24px rgba(15,23,42,0.22)"}){const[d,u]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),[p,y]=(0,a.useState)(null),m=(0,a.useRef)(0),b=(0,a.useRef)(null),w=(0,a.useRef)(null),[x,k]=(0,a.useState)(null),[S,C]=(0,a.useState)(null),B="web"===c.Platform.OS,z=36+36*e.length+12,F="up"===i||f?"up":"down";(0,a.useLayoutEffect)(()=>{if(!d||!B)return;const e=b.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.scrollX||window.pageXOffset||0,o=window.scrollY||window.pageYOffset||0;k({top:t.top+o,bottom:t.bottom+o,left:t.left+n,right:t.right+n,width:t.width});const r=window.innerHeight-t.bottom,i=t.top;g(r<z&&i>r)},[d,B,z]),(0,a.useEffect)(()=>{if(!d)return y(null),void(B||g(!1));if(B){const e=e=>{const t=b.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||w.current&&w.current.contains(n)||u(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}const e=b.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);g(r<z&&t>r),C({x:e,y:t,width:n,height:o})})},[d,B,z]);const v=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:"How many picks?"})}),e.map(e=>(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>{t(e),u(!1)},accessibilityRole:"menuitem",...ze(()=>y(e),()=>y(t=>t===e?null:t)),style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:1,borderTopColor:o.border,backgroundColor:p===e?o.backgroundAlt:"transparent"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:14,fontWeight:"600",color:o.text},children:[e," picks"]}),(0,s.jsx)(c.View,{style:{backgroundColor:o.backgroundAlt,paddingHorizontal:6,paddingVertical:2,borderRadius:4},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:10,fontWeight:"700",letterSpacing:.5},children:"QP"})})]},e))]});return(0,s.jsxs)(c.View,{ref:b,style:{position:"relative",flexShrink:0},children:[(0,s.jsx)(ko,{onPress:()=>{if(!n)return void u(e=>!e);const e=Date.now();if(e-m.current<280)return m.current=0,u(!1),void n();m.current=e,setTimeout(()=>{m.current&&Date.now()-m.current>=270&&(m.current=0,u(e=>!e))},290)}}),d&&B&&x&&"undefined"!=typeof document&&(0,h.createPortal)((0,s.jsx)("div",{ref:w,role:"menu",style:{position:"absolute",top:"up"===F?void 0:x.bottom+6,..."up"===F?{top:x.top-6,transform:"translateY(-100%)"}:null,left:"left"===r?x.left:void 0,..."right"===r?{left:x.right,transform:"up"===F?"translate(-100%, -100%)":"translateX(-100%)"}:null,zIndex:20,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:160,boxShadow:l,overflow:"hidden"},children:v}),document.body),(0,s.jsx)(Xt,{visible:d&&!B,anchor:S,onClose:()=>u(!1),flipUp:"up"===F,align:r,children:(0,s.jsx)(c.View,{accessibilityRole:"menu",style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:160,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:v})})]})}function Jr({onBack:e,onNext:t,hideActions:n}={}){const{theme:o,headingFont:r,bodyFont:i,selectedGame:l,propositions:a,selections:d,toggleSelection:h,selectedPropositionCount:u,disableQuickPick:f,answeredCount:g,goToConfirmation:p,selectedEventId:y,sameGameMultiEvents:m,selectSameGameMultiEvent:b,selectedRule:w,howToPlayMarkdown:x,maxPayouts:k}=xo(),S=o.colors,C=Ce(l),z=$n(l??{},l?k?.[l.id]:void 0),{width:F}=(0,c.useWindowDimensions)(),v=F>=640,W=un(l)&&!y,T=m.find(e=>e.id===y),A=l?St(l,u,w):{min:0,max:0},R=A.min,L=un(l)&&y?Math.min(A.max,a.length):A.max,D=R>0&&R===L,M=!(l?.allowed_propositions&&l.allowed_propositions.length>0)&&R>0&&L>R,P=D?L:L||a.length,H=e=>{const t=Math.max(0,Math.min(e??P,a.length));for(const i of Object.keys(d)){const e=Number(i);h(e,d[e])}const n=[...a].sort(()=>Math.random()-.5).slice(0,t),o=[],r=[];for(const i of n)Math.random()<.5?o.push(i):r.push(i);for(const i of o)h(i.id,"yes");for(const i of r)h(i.id,"no")},O=!f&&a.length>0,I=M?Array.from({length:L-R+1},(e,t)=>R+t).filter(e=>e<=a.length):[],E=g>0?g:R||P;return(0,s.jsxs)(c.View,{style:[ti.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:[ti.title,{fontSize:v?24:20,color:B(o),fontFamily:r}],children:W?"Choose a Game":"Select Propositions"}),l&&(0,s.jsx)(tr,{onBack:y?()=>b(null):e,hideActions:n,label:T?dn(T):l.game_name,children:C||x?.trim()?(0,s.jsx)(Ee,{variant:"icon",content:x,panel:C,theme:o,title:`${l.game_name} — How to Play`,extra:(0,s.jsx)(_n,{tiers:z.hasGenericDividends?z.tiers:[],modes:z.modes,pydDividends:z.pydDividends,minBet:z.minBet,maxBet:z.maxBet,colors:S,bodyFont:i,headingFont:r}),colors:{text:S.text,textMuted:S.textMuted,border:S.border,background:S.background,backgroundAlt:S.backgroundAlt,primary:S.primary,primaryText:S.primaryText},bodyFont:i,headingFont:r}):null})]}),O&&(I.length>1?(0,s.jsx)(Qr,{counts:I,onPick:e=>{H(e),p(),t?.()},onDoubleAction:()=>{H(E),p(),t?.()},colors:S,menuShadow:le(o)}):(0,s.jsx)(c.View,{style:{flexShrink:0},children:(0,s.jsx)(ko,{onPress:()=>{H(),p(),t?.()}})}))]})}function $r({onNext:e,onBack:t,hideButtons:n=!1}){const{theme:o,selectionValid:r,answeredCount:i,selectedGame:l,selectedPropositionCount:a,selectedEventId:d,propositions:h,goToConfirmation:u,selectedRule:f}=xo(),g=o.colors,p=D(o),y=g.textAlt??g.textMuted,{width:m}=(0,c.useWindowDimensions)(),b=m>=640,w="dark"===o.colorScheme,x=l?St(l,a,f):{min:0,max:0},k=x.min,S=un(l)&&d?Math.min(x.max,h.length):x.max,C=!!(l?.allowed_propositions&&l.allowed_propositions.length>0),B=!C&&k>0&&S>k&&i>=k&&i<S,z=S-i,F=!C&&k>0&&S>k,v=l?F?k:S||k||l.num_propositions||0:0,W=F?S:v,T=W>0?Math.min(i/W,1):0,A=F&&S>0?k/S*100:0,R=Math.max(0,k-i),L=r&&!!e,M=0===i?"Let's get started":F&&R>0?1===R?"1 to go — almost there":`${R} to go`:B?`${z} more pick${1!==z?"s":""} available`:T>=1?"✓ All selections made":T>=.75?"Almost there!":T>=.5?"Over halfway!":T>=.25?"Getting close":"Nice start",P=F?i>=k?`${i} of maximum ${S}`:`${i} of minimum ${k}`:`${i} / ${v||h.length} picks`;return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.View,{style:{borderWidth:1,borderColor:i>0?g.primary:g.border,borderRadius:12,overflow:"hidden",marginBottom:16,backgroundColor:p,shadowColor:"#000",shadowOpacity:w?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},children:(0,s.jsxs)(c.View,{style:{width:"100%",padding:b?20:16,backgroundColor:i>0?`${g.primary}10`:"transparent"},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:12,gap:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:i>0?g.primary:y,flexShrink:0},children:P}),L?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{u(),e?.()},style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:g.buttonPrimary},children:(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:g.buttonPrimaryText},children:["Continue with ",i]})}):(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:T>=1?g.success:g.primary,textAlign:"right",flexShrink:1},children:M})]}),(0,s.jsxs)(c.View,{style:{position:"relative",width:"100%",height:8,borderRadius:999,backgroundColor:g.background,overflow:"hidden"},children:[(0,s.jsx)(c.View,{style:{height:"100%",borderRadius:999,width:`${Math.min(100*T,100)}%`,backgroundColor:r?g.success:g.primary}}),F&&(0,s.jsx)(c.View,{style:{position:"absolute",top:-1,bottom:-1,left:`${A}%`,width:2,marginLeft:-1,borderRadius:1,backgroundColor:p,borderWidth:1,borderColor:`${g.textMuted}55`}})]}),F&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginTop:6},children:[(0,s.jsx)(c.Text,{style:{fontSize:11,color:i>=k?g.success:g.textMuted},children:i>=k?`✓ Minimum ${k} reached`:`Minimum ${k}`}),(0,s.jsx)(c.Text,{style:{fontSize:11,color:g.textMuted},children:`Max ${S}`})]})]})})})}function _r({view:e,onChange:t}){const{theme:n}=xo(),o=n.colors,r=(n,r)=>{const i=e===n;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>t(n),accessibilityRole:"button",accessibilityState:{selected:i},style:[ei.option,{backgroundColor:i?o.primary:"transparent"}],children:(0,s.jsx)(c.Text,{style:[ei.optionText,{color:i?o.primaryText:o.textMuted}],children:r})},n)};return(0,s.jsxs)(c.View,{style:[ei.track,{backgroundColor:o.backgroundAlt,borderColor:o.border}],children:[r("list","List"),r("swipe","Swipe")]})}var ei=c.StyleSheet.create({track:{flexDirection:"row",alignItems:"center",gap:4,borderRadius:8,borderWidth:1,padding:2,flexShrink:0},option:{borderRadius:6,paddingHorizontal:10,paddingVertical:4},optionText:{fontSize:12,fontWeight:"600"}}),ti=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function ni({tiers:e,selectedCount:t,onSelect:n,colors:o,bodyFont:r,extraBetAmount:i,buttonLabel:l,columnLabel:d="Legs",buildYourOwn:h,quickPickOnly:u,onQuickPick:f,collapsible:g,expanded:p,onExpandedChange:y,summaryTiers:m}){const[b,w]=(0,a.useState)(!1),x=p??b,k=null!=i&&20!==i,S=k?`$${Math.round(i)} returns`:"$20 returns",C=e.some(e=>e.payout20>0),B=!!g&&!x,z=C&&!B,F=(m??e).reduce((e,t)=>t.payout20>e?t.payout20:e,0),v=k&&F>0?F*(i/20):F,W=e.length>0?82*e.length+8*Math.max(0,e.length-1):82,T=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,width:70,flexShrink:0},children:[(0,s.jsx)(c.View,{style:{paddingVertical:6,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[oi.labelText,{color:o.textMuted,fontFamily:r}],children:u?"Quick Pick":d})}),z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingVertical:4,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[oi.labelText,{color:o.textMuted,fontFamily:r}],children:"Dividend"})}),(0,s.jsx)(c.View,{style:{paddingVertical:4,justifyContent:"center"},children:(0,s.jsx)(c.Text,{style:[oi.labelText,{color:o.textMuted,fontFamily:r}],children:S})})]})]}),u?(0,s.jsxs)(c.View,{style:{gap:8,alignSelf:"flex-start",width:W},children:[(0,s.jsx)(Qr,{counts:(m??e).map(e=>e.count),onPick:e=>f?f(e):n(e),align:"left",direction:"up",colors:{background:o.background??"#ffffff",backgroundAlt:o.backgroundAlt??"#f3f4f6",border:o.border??"#e5e7eb",text:o.text??"#111827"}}),C&&!B&&(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=k&&t>0?t*(i/20):null;return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[oi.tableCellText,{color:o.success}],children:[e,"/",e]})}),(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[oi.tableCellText,{color:o.primary}],children:t>0?ht(n??t):"—"})})]},String(e))})})]}):h?(0,s.jsxs)(c.View,{style:{gap:8,alignSelf:"flex-start",width:W},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e[0]?.count??0),style:[oi.optionButton,{paddingHorizontal:0,alignSelf:"stretch",alignItems:"center",borderColor:o.buttonPrimary??o.primary,backgroundColor:o.buttonPrimary??o.primary}],children:(0,s.jsx)(c.Text,{style:[oi.optionButtonText,{color:o.buttonPrimaryText??"#ffffff",fontFamily:r}],children:"Make Your Selections"})}),C&&!B&&(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8},children:e.map(({count:e,payout20:t})=>{const n=t>0?ht(k?t*(i/20):t):"—";return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[oi.tableCellText,{color:o.success}],children:[e,"/",e]})}),(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[oi.tableCellText,{color:o.primary}],children:n})})]},String(e))})})]}):e.map(({count:e,payout20:a})=>{const d=t===e,h=k&&a>0?a*(i/20):null;return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignItems:"center",width:82},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>n(e),accessibilityState:{selected:d},style:[oi.optionButton,{alignSelf:"stretch",alignItems:"center",borderColor:d?o.buttonPrimary??o.primary:o.border??o.primary,backgroundColor:d?o.buttonPrimary??o.primary:o.buttonSecondary??o.background}],children:(0,s.jsx)(c.Text,{style:[oi.optionButtonText,{color:d?o.buttonPrimaryText??"#ffffff":o.buttonSecondaryText??o.text,fontFamily:r}],numberOfLines:1,children:l?l(e):`Multi ${e}`})}),!B&&a>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.success}15`,alignSelf:"stretch"}],children:(0,s.jsxs)(c.Text,{style:[oi.tableCellText,{color:o.success}],children:[e,"/",e]})}),k?null!=h&&(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[oi.tableCellText,{color:o.primary}],children:ht(h)})}):(0,s.jsx)(c.View,{style:[oi.tableCell,{backgroundColor:`${o.primary}12`,alignSelf:"stretch"}],children:(0,s.jsx)(c.Text,{style:[oi.tableCellText,{color:o.primary}],children:ht(a)})})]})]},String(e))})]});return(0,s.jsxs)(c.View,{style:{flexDirection:"column",gap:8,alignSelf:"stretch"},children:[u?(0,s.jsx)(c.View,{style:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:T}):(0,s.jsx)(c.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:{flexDirection:"row",gap:8,alignItems:"flex-start",paddingBottom:6},children:T}),g&&(C?(0,s.jsxs)(c.View,{style:{alignSelf:"flex-start",flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:o.text,fontFamily:r},children:["Win up to ",(0,s.jsx)(c.Text,{style:{color:o.heading??o.text??o.primary},children:ht(v)}),(0,s.jsx)(c.Text,{style:{color:o.textMuted},children:` for $${k?Math.round(i):20}`})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{return e=!x,void 0===p&&w(e),void y?.(e);var e},accessibilityRole:"button",accessibilityState:{expanded:x},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:x?o.buttonSecondary:o.background??"#ffffff",borderWidth:1,borderColor:x?o.primary??o.border:o.border},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:12,fontWeight:"600",fontFamily:r},children:x?"Hide dividends":"Show dividends"})})]}):(0,s.jsx)(c.View,{style:{alignSelf:"flex-start",paddingVertical:2,opacity:0},pointerEvents:"none",children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",fontFamily:r},children:"Show dividends"})}))]})}var oi=c.StyleSheet.create({labelText:{fontSize:12,fontWeight:"400"},optionButton:{borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:6},optionButtonText:{fontSize:14,fontWeight:"600"},tableCell:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,alignItems:"center",justifyContent:"center"},tableCellText:{fontSize:12,fontWeight:"700"}});function ri(e){return{game_id:e.selectedGame.id,rule_id:e.selectedRule?.id??null,proposition_ids:e.selectedPropositionIds,selections:e.selections,stake:e.betAmount}}function ii({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,selectedGame:r,selectedEventId:i,propositions:l,selections:a,toggleSelection:d,upgradePropositionCount:h,selectedPropositionCount:u,disableQuickPick:f,answeredCount:g,selectedRule:p}=xo(),y=n.colors,{width:m}=(0,c.useWindowDimensions)(),b=m>=640,w=r?St(r,u,p):{min:0,max:0},x=w.min,k=un(r)&&i?Math.min(w.max,l.length):w.max,S=x>0&&x===k,C=!(r?.allowed_propositions&&r.allowed_propositions.length>0)&&x>0&&k>x,z=S?k:k||l.length,F=e=>{const t=Math.max(0,Math.min(e??z,l.length));for(const r of Object.keys(a)){const e=Number(r);d(e,a[e])}const{yesPicks:n,noPicks:o}=Gt(l,t);for(const r of n)d(r.id,"yes");for(const r of o)d(r.id,"no");h(t)},v=!f&&l.length>0,W=C?Array.from({length:k-x+1},(e,t)=>x+t):[],T=g>0?g:x||z;return(0,s.jsxs)(c.View,{style:[li.header,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12}],children:[(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:[li.title,{fontSize:b?24:20,color:B(n),fontFamily:o}],children:"Place Your Wager"}),r&&(0,s.jsx)(tr,{onBack:e,hideActions:t,label:r.game_name})]}),v&&(W.length>1?(0,s.jsx)(Qr,{counts:W,onPick:e=>F(e),onDoubleAction:()=>F(T),colors:y,menuShadow:le(n)}):(0,s.jsx)(c.View,{style:{flexShrink:0},children:(0,s.jsx)(ko,{onPress:()=>F()})}))]})}var li=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16},footerRight:{flexDirection:"row",alignItems:"center",gap:12},errorText:{fontSize:12},payoutInfo:{alignItems:"flex-end"},payoutLabel:{fontSize:10,textTransform:"uppercase",letterSpacing:.25},payoutAmount:{fontSize:14,fontWeight:"700"}}),ai=c.Platform.select({ios:"Menlo",default:"monospace"});function ci({theme:e,value:t}){return(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,paddingHorizontal:8,paddingVertical:2,borderRadius:8,backgroundColor:"yes"===t?v(e):W(e)},children:(0,s.jsx)(c.Text,{style:{color:"#ffffff",fontSize:10,fontWeight:"700",letterSpacing:.4,textTransform:"uppercase"},children:"yes"===t?"Yes":"No"})})}function si({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o,bodyFont:r,placedEntry:i}=xo(),l=n.colors,{width:a}=(0,c.useWindowDimensions)(),h=a>=640;return(0,s.jsxs)(c.View,{style:di.titleRow,children:[(0,s.jsxs)(c.View,{style:di.titleText,children:[(0,s.jsx)(c.Text,{style:[di.title,h&&di.titleWide,{color:B(n),fontFamily:o}],children:"Entry Placed!"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,children:(0,s.jsx)(c.Text,{style:[di.message,{color:l.textMuted,fontFamily:r}],children:i?(0,s.jsxs)(s.Fragment,{children:["Entry"," ",(0,s.jsxs)(c.Text,{style:{color:l.primary,fontWeight:"600",fontFamily:ai},children:["#",i.id]})," ","successfully submitted"]}):"Your entry has been successfully submitted"})})]}),(0,s.jsx)(c.View,{style:[di.checkCircle,h&&di.checkCircleWide,{backgroundColor:`${l.success}20`}],children:(0,s.jsx)(d.default,{width:h?28:24,height:h?28:24,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"M5 13l4 4L19 7",stroke:l.success,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var di=c.StyleSheet.create({container:{flex:1},content:{flex:1},titleRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,paddingLeft:8},titleText:{flex:1,minWidth:0},checkCircle:{width:48,height:48,borderRadius:999,alignItems:"center",justifyContent:"center",flexShrink:0},checkCircleWide:{width:56,height:56},title:{fontSize:20,fontWeight:"700",lineHeight:28},titleWide:{fontSize:24,lineHeight:32},message:{fontSize:14},summaryCard:{width:"100%",borderRadius:12,padding:16,borderWidth:1},summaryCardWide:{padding:20},summaryHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:12,gap:12},summaryHeading:{fontSize:14,fontWeight:"600"},summaryHeadingWide:{fontSize:16},statsGrid:{flexDirection:"row",flexWrap:"wrap",gap:12},statCell:{flexBasis:"45%",flexGrow:1},statCellWide:{flexBasis:"30%"},statLabel:{fontSize:10,fontWeight:"600",letterSpacing:.25,textTransform:"uppercase"},statValue:{fontSize:14,fontWeight:"600",marginTop:2},pickList:{gap:6},pickRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8,borderRadius:4},footer:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingTop:16}});function hi({onBack:e,hideActions:t}={}){const{theme:n,headingFont:o}=xo(),{width:r}=(0,c.useWindowDimensions)(),i=r>=640;return(0,s.jsxs)(c.View,{style:ui.header,children:[(0,s.jsx)(c.Text,{style:[ui.title,{fontSize:i?24:20,color:B(n),fontFamily:o}],children:"Your Entries"}),(0,s.jsx)(tr,{onBack:e,hideActions:t})]})}var ui=c.StyleSheet.create({container:{flex:1},header:{paddingLeft:8},title:{fontWeight:"700"},content:{flex:1}});function fi(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function gi({ink:e,ball:t,size:n,balls:o=1}){return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"2 12 76 62",fill:"none",children:[(0,s.jsx)(d.Line,{x1:"9",y1:"18",x2:"71",y2:"18",stroke:e,strokeWidth:2.5,strokeLinecap:"round"}),(0,s.jsx)(d.Path,{d:"M12 18L13 25.67 M17.6 18L19 25.67 M17.6 18L13 25.67 M23.2 18L25 25.67 M23.2 18L19 25.67 M28.8 18L31 25.67 M28.8 18L25 25.67 M34.4 18L37 25.67 M34.4 18L31 25.67 M40 18L43 25.67 M40 18L37 25.67 M45.6 18L49 25.67 M45.6 18L43 25.67 M51.2 18L55 25.67 M51.2 18L49 25.67 M56.8 18L61 25.67 M56.8 18L55 25.67 M62.4 18L67 25.67 M62.4 18L61 25.67 M68 18L67 25.67 M13 25.67L15.5 33.33 M19 25.67L21.62 33.33 M19 25.67L15.5 33.33 M25 25.67L27.75 33.33 M25 25.67L21.62 33.33 M31 25.67L33.88 33.33 M31 25.67L27.75 33.33 M37 25.67L40 33.33 M37 25.67L33.88 33.33 M43 25.67L46.12 33.33 M43 25.67L40 33.33 M49 25.67L52.25 33.33 M49 25.67L46.12 33.33 M55 25.67L58.38 33.33 M55 25.67L52.25 33.33 M61 25.67L64.5 33.33 M61 25.67L58.38 33.33 M67 25.67L64.5 33.33 M15.5 33.33L19 41 M21.62 33.33L25 41 M21.62 33.33L19 41 M27.75 33.33L31 41 M27.75 33.33L25 41 M33.88 33.33L37 41 M33.88 33.33L31 41 M40 33.33L43 41 M40 33.33L37 41 M46.12 33.33L49 41 M46.12 33.33L43 41 M52.25 33.33L55 41 M52.25 33.33L49 41 M58.38 33.33L61 41 M58.38 33.33L55 41 M64.5 33.33L61 41 M19 41L23 48.67 M25 41L28.67 48.67 M25 41L23 48.67 M31 41L34.33 48.67 M31 41L28.67 48.67 M37 41L40 48.67 M37 41L34.33 48.67 M43 41L45.67 48.67 M43 41L40 48.67 M49 41L51.33 48.67 M49 41L45.67 48.67 M55 41L57 48.67 M55 41L51.33 48.67 M61 41L57 48.67 M23 48.67L25 56.33 M28.67 48.67L31 56.33 M28.67 48.67L25 56.33 M34.33 48.67L37 56.33 M34.33 48.67L31 56.33 M40 48.67L43 56.33 M40 48.67L37 56.33 M45.67 48.67L49 56.33 M45.67 48.67L43 56.33 M51.33 48.67L55 56.33 M51.33 48.67L49 56.33 M57 48.67L55 56.33 M25 56.33L22 64 M31 56.33L31 60.1 M31 56.33L22 64 M37 56.33L40 59.5 M37 56.33L31 60.1 M43 56.33L49 60.1 M43 56.33L40 59.5 M49 56.33L58 64 M49 56.33L49 60.1 M55 56.33L58 64",fill:"none",stroke:e,strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round",opacity:.9}),(0,s.jsx)(d.Path,{d:"M12 18 C12.17 19.28 12.42 23.12 13 25.67 C13.58 28.23 14.5 30.77 15.5 33.33 C16.5 35.88 17.75 38.44 19 41 C20.25 43.56 22 46.12 23 48.67 C24 51.23 25.17 53.77 25 56.33 C24.83 58.88 22.5 62.72 22 64 M68 18 C67.83 19.28 67.58 23.12 67 25.67 C66.42 28.23 65.5 30.77 64.5 33.33 C63.5 35.88 62.25 38.44 61 41 C59.75 43.56 58 46.12 57 48.67 C56 51.23 54.83 53.77 55 56.33 C55.17 58.88 57.5 62.72 58 64",fill:"none",stroke:e,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)(d.Ellipse,{cx:"40",cy:"64",rx:"18",ry:"4.5",fill:"none",stroke:e,strokeWidth:2.2}),(o>=2?[{cx:33,cy:52,r:6.6},{cx:48,cy:49,r:6.6}]:[{cx:40,cy:50,r:8}]).map((e,n)=>(0,s.jsx)(d.Circle,{cx:e.cx,cy:e.cy,r:e.r,fill:t},n))]})}function pi({ink:e,ball:t,size:n}){return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"34",stroke:e,strokeWidth:3,opacity:.9}),(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"23",stroke:e,strokeWidth:3,opacity:.65}),(0,s.jsx)(d.Circle,{cx:"50",cy:"50",r:"8",fill:t}),(0,s.jsx)(d.Line,{x1:"80",y1:"20",x2:"55",y2:"45",stroke:e,strokeWidth:4,strokeLinecap:"round"}),(0,s.jsx)(d.Path,{d:"M50 50 l8 -3 -3 8 z",fill:e})]})}function yi({ink:e,ball:t,size:n}){const o=[{x:16,h:22},{x:40,h:40},{x:64,h:60}];return(0,s.jsxs)(d.default,{width:n,height:n,viewBox:"0 0 100 100",fill:"none",children:[(0,s.jsx)(d.Line,{x1:"10",y1:"84",x2:"90",y2:"84",stroke:e,strokeWidth:2,opacity:.5}),o.map((n,r)=>(0,s.jsx)(d.Rect,{x:n.x,y:84-n.h,width:16,height:n.h,rx:3.5,fill:r===o.length-1?t:e,opacity:r===o.length-1?1:.5+.22*r},n.x)),(0,s.jsx)(d.Path,{d:"M14 60 L38 48 L62 30 L86 14",stroke:e,strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,s.jsx)(d.Path,{d:"M86 14 l-9 1 M86 14 l1 9",stroke:e,strokeWidth:3,strokeLinecap:"round"})]})}function mi({kind:e,balls:t,...n}){return"safety_net"===e?(0,s.jsx)(gi,{...n,balls:t}):"pick"===e?(0,s.jsx)(yi,{...n}):(0,s.jsx)(pi,{...n})}function bi({kind:e,size:t=56,balls:n}){const{theme:o}=xo(),r=o.colors,i=o.brand?.chip??r.primary,l=o.brand?.icon??r.primaryText,a=T(o);return(0,s.jsx)(c.View,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:i,borderWidth:1,borderColor:fi(l,.16),alignItems:"center",justifyContent:"center"},children:(0,s.jsx)(mi,{kind:e,ink:l,ball:a,balls:n,size:Math.round(.68*t)})})}function wi({option:e,renderDividends:t}){const{theme:n}=xo(),o=n.colors,r=ce(n),i=o.primary,l=T(n),a=e.dividends??[];return t?(0,s.jsx)(s.Fragment,{children:t(e)}):(0,s.jsxs)(c.View,{style:Bi.dividends,children:[(0,s.jsxs)(c.View,{style:Bi.dividendRow,children:[(0,s.jsx)(c.Text,{style:[Bi.dividendsCaption,{color:o.textMuted}],children:"IF YOU LAND"}),(0,s.jsxs)(c.Text,{style:[Bi.dividendsCaption,{color:o.textMuted}],children:["$",20," RETURNS"]})]}),a.map((t,n)=>{const a=e.tierLegs?.[n];return(0,s.jsxs)(c.View,{style:Bi.dividendTierRow,children:[(0,s.jsxs)(c.View,{style:Bi.dividendLabelCol,children:[(0,s.jsx)(c.Text,{style:[Bi.dividendLabel,{color:o.text}],children:t.label}),null!=a&&a>0&&(0,s.jsxs)(c.View,{style:Bi.tierLegs,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[Array.from({length:a}).map((e,t)=>(0,s.jsx)(c.View,{style:[Bi.tierLegDot,{backgroundColor:i}]},t)),0===t.misses&&(0,s.jsx)(c.View,{style:[Bi.tierLegBall,{backgroundColor:l}]})]})]}),(0,s.jsx)(c.Text,{style:[Bi.dividendMult,{color:i,fontFamily:r}],children:ht(t.payout20)})]},t.misses)})]})}function xi({option:e,renderDividends:t}){const{theme:n}=xo(),o=n.colors,r=e.dividends??[],i=r.reduce((e,t)=>t.payout20>e?t.payout20:e,0),[l,d]=(0,a.useState)(!1),u=(0,a.useRef)(null),f=(0,a.useRef)(null),[g,p]=(0,a.useState)(null),[y,m]=(0,a.useState)(!1),[b,w]=(0,a.useState)(null),x="web"===c.Platform.OS,k=40+36*Math.max(r.length,1)+12,S=(0,a.useCallback)(()=>{const e=u.current;if(!e||"function"!=typeof e.getBoundingClientRect)return;const t=e.getBoundingClientRect(),n=window.innerHeight-t.bottom,o=t.top,r=n<k&&o>n;p({left:t.left,top:r?t.top-6:t.bottom+6,flipUp:r})},[k]);(0,a.useLayoutEffect)(()=>{if(!l||!x)return void p(null);S();const e=()=>d(!1),t=()=>S();return window.addEventListener("scroll",e,!0),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",t)}},[l,x,S]),(0,a.useEffect)(()=>{if(!l)return;if(x){const e=e=>{const t=u.current,n=e.target;t&&"function"==typeof t.contains&&t.contains(n)||f.current&&f.current.contains(n)||d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}const e=u.current;e&&"function"==typeof e.measureInWindow&&e.measureInWindow((e,t,n,o)=>{const r=c.Dimensions.get("window").height-(t+o);m(r<k&&t>r),w({x:e,y:t,width:n,height:o})})},[l,x,k]);const C=t?(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:8},children:t(e)}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.View,{style:{paddingHorizontal:12,paddingVertical:6,borderBottomWidth:1,borderBottomColor:o.border},children:(0,s.jsxs)(c.Text,{style:{fontSize:10,fontWeight:"700",color:o.text,opacity:.55,letterSpacing:.5,textTransform:"uppercase"},children:["Dividends for $",20]})}),r.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,borderTopWidth:0===t?0:1,borderTopColor:o.border,gap:12},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:o.text,fontSize:13,flex:1},children:e.label}),(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:e.payout20>0?o.heading??o.text:o.textMuted,fontSize:13,textAlign:"right"},children:e.payout20>0?ht(e.payout20):"—"})]},e.misses))]});return(0,s.jsxs)(c.View,{style:{alignSelf:"center",maxWidth:"100%",width:"100%",alignItems:"center"},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"center",columnGap:8,rowGap:4,maxWidth:"100%"},children:[i>0?(0,s.jsxs)(c.Text,{style:{fontSize:12,fontWeight:"600",color:o.text},children:["Win up to ",(0,s.jsx)(c.Text,{style:{color:o.heading??o.text},children:ht(i)}),(0,s.jsxs)(c.Text,{style:{color:o.textMuted},children:[" for $",20]})]}):null,(0,s.jsxs)(c.View,{ref:u,collapsable:!1,style:{position:"relative",alignSelf:"flex-start"},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:()=>d(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:l},style:{paddingVertical:4,paddingHorizontal:10,borderRadius:6,backgroundColor:l?o.buttonSecondary:o.background,borderWidth:1,borderColor:l?o.primary??o.border:o.border},children:(0,s.jsx)(c.Text,{style:{color:o.text,fontSize:12,fontWeight:"600"},children:l?"Hide dividends":"Show dividends"})}),(0,s.jsx)(Xt,{visible:l&&!x,anchor:b,onClose:()=>d(!1),flipUp:y,align:"left",children:(0,s.jsx)(c.View,{style:{elevation:8,backgroundColor:o.background,borderRadius:8,borderWidth:1,borderColor:o.border,minWidth:220,shadowColor:"#000",shadowOffset:{width:0,height:6},shadowOpacity:.18,shadowRadius:12,overflow:"hidden"},children:C})})]})]}),l&&x&&g&&"undefined"!=typeof document?(0,h.createPortal)((0,s.jsx)("div",{ref:f,style:{position:"fixed",left:g.left,top:g.top,transform:g.flipUp?"translateY(-100%)":void 0,zIndex:9999,backgroundColor:o.background,border:`1px solid ${o.border}`,borderRadius:8,minWidth:220,overflow:"hidden",boxShadow:"0 8px 24px rgba(0,0,0,0.18)"},children:C}),document.body):null]})}function ki({kind:e,option:t,onSelect:n,renderDividends:o}){const{theme:r}=xo(),i=r.colors,l=ce(r),h=B(r),u=i.primary,f=i.selectionCard??i.backgroundAlt,{width:g}=(0,c.useWindowDimensions)(),p=g>=640,y="safety_net"===e?Math.max(1,(t.detail?.length??2)-1):void 0,m=!!o||(t.dividends?.length??0)>0,b=m&&!!t.dividendsInline,[w,x]=(0,a.useState)(!1);return(0,s.jsxs)(c.View,{...ze(()=>x(!0),()=>x(!1)),style:[Bi.card,p&&Bi.cardWide,{backgroundColor:f,borderColor:w?u:i.border,shadowColor:w?u:"#000",shadowOpacity:w?.28:.08,shadowRadius:w?14:8,shadowOffset:{width:0,height:w?12:8},elevation:w?4:1,transform:[{translateY:w?-2:0}]}],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:n,activeOpacity:.85,accessibilityRole:"button",style:Bi.cardMain,children:[(0,s.jsx)(bi,{kind:e,balls:y,size:60}),(0,s.jsxs)(c.View,{style:Bi.cardText,children:[(0,s.jsx)(c.Text,{style:[Bi.cardTitle,{color:h,fontFamily:l}],children:t.label}),t.stat?(0,s.jsx)(c.View,{style:[Bi.statChip,{backgroundColor:fi(u,.12)}],children:(0,s.jsx)(c.Text,{style:[Bi.statChipText,{color:u}],children:t.stat.toUpperCase()})}):null,(0,s.jsx)(c.View,{style:Bi.detailBlock,children:t.detail?.map(e=>(0,s.jsx)(c.Text,{style:[Bi.detailLine,{color:i.textMuted}],children:e},e))})]}),(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:w?2:0}]},children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),m?(0,s.jsx)(c.View,{style:[Bi.dividendsWrap,{borderTopColor:fi(h,.08)}],children:b?(0,s.jsx)(wi,{option:t,renderDividends:o}):(0,s.jsx)(xi,{option:t,renderDividends:o})}):null]})}function Si({kind:e,highlights:t,onSelect:n,accessibilityLabel:o}){const{theme:r}=xo(),i=r.colors,l=B(r),h=T(r),u=i.primary,f=i.selectionCard??i.backgroundAlt,{width:g}=(0,c.useWindowDimensions)(),p=g>=640,[y,m]=(0,a.useState)(!1);return(0,s.jsx)(c.View,{...ze(()=>m(!0),()=>m(!1)),style:[Bi.card,p&&Bi.cardWide,{backgroundColor:f,borderColor:y?u:i.border,shadowColor:y?u:"#000",shadowOpacity:y?.28:.08,shadowRadius:y?14:8,shadowOffset:{width:0,height:y?12:8},elevation:y?4:1,transform:[{translateY:y?-2:0}]}],children:(0,s.jsxs)(c.TouchableOpacity,{onPress:n,activeOpacity:.85,accessibilityRole:"button",accessibilityLabel:o,style:Bi.cardMain,children:[(0,s.jsx)(bi,{kind:e,size:60}),(0,s.jsx)(c.View,{style:{flex:1,minWidth:0,gap:8},children:t.map(e=>(0,s.jsxs)(c.View,{style:Bi.bulletRow,children:[(0,s.jsx)(c.View,{style:[Bi.dot,{backgroundColor:h}]}),(0,s.jsx)(c.Text,{style:[Bi.bulletText,{color:l}],children:e})]},e))}),(0,s.jsx)(c.View,{style:{alignSelf:"center",flexShrink:0,transform:[{translateX:y?2:0}]},children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:u,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]})})}function Ci({onContinue:e,onBack:t,hideTitle:n,config:o,renderDividends:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,setExpectedCorrect:u,handlePropositionCountChange:f,bodyFont:g,screenSize:p}=xo(),y=l.colors,m=ce(l),b="mobile"===p,{width:w}=(0,c.useWindowDimensions)(),x=w>=640,k=(0,a.useMemo)(()=>o??Yn(d,h),[o,d,h]),S=k?.options??[],C=t=>{null!=t?.expectedCorrect&&u(t.expectedCorrect),null!=t?.propositionCount&&f(t.propositionCount),e?.()};if(!d||!k)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:y.textMuted,fontFamily:g},children:"No rule setup required."})});const B=k.kind,z=k.headline??k.heroTitle,F=k.continueLabel??"Continue";return(0,s.jsxs)(c.View,{style:[Bi.container,{backgroundColor:y.background}],children:[t?(0,s.jsx)(c.View,{style:Bi.backRow,children:(0,s.jsx)(er,{onBack:t,label:i})}):null,(0,s.jsxs)(Re,{style:Bi.inner,children:[n?null:(0,s.jsx)(c.Text,{accessibilityRole:"header",style:[Bi.sectionTitle,Bi.sectionTitleInBody,{color:y.primary,fontFamily:m,textAlign:"center"}],children:k.title}),(0,s.jsxs)(c.View,{style:Bi.headerBlock,children:[(0,s.jsx)(Uo,{iconUrl:ge(d),gameName:d.game_name,height:b?24:32,chipColor:y.primary,textColor:y.text,iconColor:y.primaryText,accentColor:l.brand?.accent,compact:b}),k.subtitle?(0,s.jsx)(c.Text,{style:[Bi.pickSubtitle,{color:y.textMuted}],children:k.subtitle}):null,z||k.heroTagline?(0,s.jsx)(c.Text,{style:[Bi.tagline,{color:y.textMuted}],children:k.heroTagline??z}):null]}),S.length>0?(0,s.jsx)(c.View,{style:[Bi.cardList,x&&S.length>1&&Bi.cardGrid],children:S.map(e=>(0,s.jsx)(c.View,{style:x&&S.length>1?Bi.cardCell:void 0,children:(0,s.jsx)(ki,{kind:B,option:e,onSelect:()=>C(e),renderDividends:r})},e.id))}):k.highlights&&k.highlights.length>0?(0,s.jsx)(Si,{kind:B,highlights:k.highlights,onSelect:()=>C(),accessibilityLabel:F}):null]})]})}var Bi=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16,marginBottom:4},inner:{flex:1,paddingHorizontal:16,maxWidth:768,width:"100%",alignSelf:"center"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:12},headerBlock:{alignItems:"center",marginBottom:24},pickSubtitle:{fontSize:13,marginTop:8},tagline:{fontSize:14,lineHeight:20,textAlign:"center",maxWidth:384,marginTop:12},cardList:{gap:12},cardGrid:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"},card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardText:{flex:1,minWidth:0,gap:5},cardTitle:{fontSize:19,fontWeight:"800",letterSpacing:-.3},statChip:{alignSelf:"flex-start",borderRadius:999,paddingHorizontal:8,paddingVertical:3},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.6},detailBlock:{minHeight:60,gap:2,justifyContent:"flex-start"},detailLine:{fontSize:13,lineHeight:18},dividendsWrap:{marginTop:12,paddingTop:12,borderTopWidth:1},dividends:{gap:5},dividendsCaption:{fontSize:9,fontWeight:"600",letterSpacing:1},dividendRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",gap:12},dividendTierRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},dividendLabelCol:{flexShrink:1,minWidth:0,gap:3},dividendLabel:{fontSize:13},tierLegs:{flexDirection:"row",alignItems:"center",gap:3},tierLegDot:{width:5,height:5,borderRadius:1.5,opacity:.85},tierLegBall:{width:7,height:7,borderRadius:999,marginLeft:2},dividendMult:{fontSize:15,fontWeight:"800",fontVariant:["tabular-nums"]},radio:{width:24,height:24,borderRadius:12,borderWidth:2,alignItems:"center",justifyContent:"center"},bulletRow:{flexDirection:"row",alignItems:"flex-start",gap:12},dot:{width:6,height:6,borderRadius:3,marginTop:7},bulletText:{flex:1,fontSize:15,lineHeight:21},footer:{flexDirection:"row",justifyContent:"flex-end",paddingTop:16,paddingHorizontal:16},smallBtn:{paddingHorizontal:20,paddingVertical:11,borderRadius:10},smallBtnText:{fontSize:14,fontWeight:"700"}});function zi(e,t){const n=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!n)return e;const o=parseInt(n[1],16);return`rgba(${o>>16&255}, ${o>>8&255}, ${255&o}, ${t})`}function Fi({iconUrl:e,size:t=56}){const{theme:n}=xo(),o=n.colors,r=n.brand?.chip??o.primary,i=n.brand?.icon??o.primaryText,l=A(r,T(n),i);return(0,s.jsx)(c.View,{style:{width:t,height:t,borderRadius:.3*t,backgroundColor:r,borderWidth:1,borderColor:zi(i,.16),alignItems:"center",justifyContent:"center",shadowColor:r,shadowOpacity:.45,shadowRadius:9,shadowOffset:{width:0,height:4},elevation:2},children:(0,s.jsx)(Zt,{iconUrl:e,width:Math.round(.68*t),height:Math.round(.68*t),iconColor:i,accentColor:l})})}function vi({eyebrow:e,iconUrl:t,gameName:n,tagline:o,style:r}){const{theme:i,screenSize:l}=xo(),a=i.colors,d=ce(i),h="mobile"===l,{width:u}=(0,c.useWindowDimensions)(),f=u>=640;return(0,s.jsxs)(c.View,{style:[Wi.block,f&&Wi.blockWide,r],children:[e&&f?(0,s.jsx)(c.Text,{style:[Wi.eyebrow,{color:a.primary,fontFamily:d}],children:e.toUpperCase()}):null,(0,s.jsx)(Uo,{iconUrl:t,gameName:n,height:h?20:32,chipColor:a.primary,textColor:a.text,iconColor:a.primaryText,accentColor:i.brand?.accent,compact:h}),o?(0,s.jsx)(c.Text,{style:[Wi.tagline,f&&Wi.taglineWide,{color:a.textMuted}],children:o}):null]})}var Wi=c.StyleSheet.create({block:{alignItems:"center",marginBottom:16},blockWide:{marginBottom:28},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:20,textAlign:"center"},tagline:{marginTop:8,fontSize:13,lineHeight:18,textAlign:"center",maxWidth:384},taglineWide:{marginTop:12,fontSize:15,lineHeight:24}});function Ti({ariaLabel:e,children:t}){const{width:n}=(0,c.useWindowDimensions)();return n>=640?(0,s.jsx)(c.View,{accessibilityRole:"radiogroup",accessibilityLabel:e,style:Ri.grid,children:t}):(0,s.jsx)(c.ScrollView,{horizontal:!0,showsHorizontalScrollIndicator:!1,accessibilityRole:"radiogroup",accessibilityLabel:e,contentContainerStyle:Ri.rail,children:t})}function Ai(e,t="21%"){return e?{flexGrow:1,flexBasis:t,minWidth:0}:{width:124,flexGrow:0,flexShrink:0}}var Ri=c.StyleSheet.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8},rail:{flexDirection:"row",gap:8,paddingBottom:4}});function Li({legs:e,prizeBall:t=!0}){const{theme:n}=xo(),o=n.colors.primary,r=T(n);return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,t)=>(0,s.jsx)(c.View,{style:{width:5,height:5,borderRadius:1.5,backgroundColor:o,opacity:.85,marginRight:3}},t)),t?(0,s.jsx)(c.View,{style:{width:7,height:7,borderRadius:999,backgroundColor:r,marginLeft:2}}):null]})}function Di({tile:e,label:t,stat:n,detail:o,onSelect:r,children:i}){const{theme:l}=xo(),h=l.colors,u=ce(l),f=B(l),g=h.primary,p=h.selectionCard??h.backgroundAlt,{width:y}=(0,c.useWindowDimensions)(),m=y>=640,[b,w]=(0,a.useState)(!1);return(0,s.jsxs)(c.View,{...ze(()=>w(!0),()=>w(!1)),style:[Mi.card,m&&Mi.cardWide,{backgroundColor:p,borderColor:b?g:h.border,shadowColor:b?g:"#000",shadowOpacity:b?.28:.08,shadowRadius:b?14:10,shadowOffset:{width:0,height:b?12:8},elevation:b?4:1,transform:[{translateY:b?-2:0}]}],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:r,activeOpacity:.85,style:[Mi.cardMain,m&&Mi.cardMainWide],children:[e,(0,s.jsxs)(c.View,{style:[Mi.cardText,m&&Mi.cardTextWide],children:[(0,s.jsxs)(c.View,{style:Mi.titleRow,children:[(0,s.jsx)(c.Text,{style:[Mi.cardTitle,m&&Mi.cardTitleWide,{color:f,fontFamily:u}],children:t}),n?(0,s.jsx)(c.View,{style:[Mi.statChip,{backgroundColor:zi(g,.12)}],children:(0,s.jsx)(c.Text,{style:[Mi.statChipText,{color:g}],children:n.toUpperCase()})}):null]}),o&&o.length>0?(0,s.jsx)(c.View,{style:Mi.detailBlock,children:(m?o:o.slice(0,1)).map(e=>(0,s.jsx)(c.Text,{style:[Mi.detailLine,m&&Mi.detailLineWide,{color:h.textMuted}],children:e},e))}):null]}),(0,s.jsx)(c.View,{style:[Mi.chevron,{transform:[{translateX:b?2:0}]}],children:(0,s.jsx)(d.default,{width:22,height:22,viewBox:"0 0 24 24",fill:"none",children:(0,s.jsx)(d.Path,{d:"m9 6 6 6-6 6",stroke:g,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i?(0,s.jsx)(c.View,{style:[Mi.childrenWrap,{borderTopColor:zi(f,.08)}],children:i}):null]})}var Mi=c.StyleSheet.create({card:{flexGrow:1,borderWidth:2,borderRadius:24,paddingHorizontal:14,paddingVertical:14},cardWide:{paddingHorizontal:20,paddingVertical:20},cardMain:{flexDirection:"row",alignItems:"flex-start",gap:14,flexGrow:1},cardMainWide:{gap:16},cardText:{flex:1,minWidth:0,gap:4},cardTextWide:{gap:6},titleRow:{flexDirection:"row",flexWrap:"wrap",alignItems:"center",columnGap:8,rowGap:4},cardTitle:{fontSize:16,fontWeight:"800",letterSpacing:-.4},cardTitleWide:{fontSize:20,letterSpacing:-.5},statChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},statChipText:{fontSize:9,fontWeight:"700",letterSpacing:.72},detailBlock:{gap:2},detailLine:{fontSize:12,lineHeight:17},detailLineWide:{fontSize:13,lineHeight:18},chevron:{alignSelf:"center",flexShrink:0},childrenWrap:{marginTop:12,paddingTop:12,borderTopWidth:1}});function Pi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=xo(),m=l.colors,b=ae(l),w=ce(l),x=B(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[z,F]=(0,a.useState)(!1),v=(0,a.useMemo)(()=>r??lr(d),[r,d]),[W,T]=(0,a.useState)(()=>v?null!=h&&v.legOptions.includes(h)?h:v.defaultLegs:8),[A,R]=(0,a.useState)(()=>v?.defaultStake??20);if(!d||!rr(d)||!v)return(0,s.jsx)(c.View,{style:[Hi.container,{backgroundColor:m.background}],children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No game set available."})});const L=ir(A,W,{operatorMargin:v.operatorMargin,perLegProbability:v.perLegProbability}),M=A>=v.minStake,P=(e,t)=>(0,s.jsxs)(c.View,{style:Hi.controlLabelRow,children:[(0,s.jsx)(c.Text,{style:[Hi.controlLabelText,{color:m.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Hi.controlValueText,{color:x}],children:t})]});return(0,s.jsxs)(c.View,{style:[Hi.container,{backgroundColor:m.background}],children:[n?(0,s.jsx)(c.View,{style:Hi.backRow,children:(0,s.jsx)(er,{onBack:n,label:i})}):null,(0,s.jsxs)(Re,{style:Hi.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Hi.sectionTitle,Hi.sectionTitleInBody,C&&Hi.sectionTitleInBodyWide,{color:m.primary,fontFamily:w,textAlign:"center"}],children:"The fastest multi"}),(0,s.jsx)(vi,{eyebrow:o?null:"The fastest multi",iconUrl:ge(d),gameName:d.game_name,tagline:v.tagline}),(0,s.jsxs)(c.View,{style:[Hi.ticket,C&&Hi.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[P("Legs",`${W} legs`),(0,s.jsx)(c.View,{style:Hi.chipRow,children:v.legOptions.map(e=>{const t=e===W;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>T(e),accessibilityRole:"radio",accessibilityState:{selected:t},activeOpacity:.8,style:[Hi.chip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Hi.chipText,{color:t?m.primaryText:m.textMuted}],children:e})},e)})}),(0,s.jsxs)(c.View,{style:Hi.hintRow,children:[(0,s.jsx)(c.Text,{style:[Hi.hintText,{color:m.textMuted}],children:"Easier to land"}),(0,s.jsx)(c.Text,{style:[Hi.hintText,{color:m.textMuted}],children:"Bigger prize"})]}),(0,s.jsxs)(c.View,{style:Hi.stakeBlock,children:[P("Stake",ht(A)),(0,s.jsxs)(c.View,{style:[Hi.inputWrap,{borderColor:z?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Hi.inputPrefix,{color:m.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>F(!0),onBlur:()=>F(!1),value:A?String(A):"",onChangeText:e=>{if(""===e)return void R(0);const t=Number(e);Number.isFinite(t)&&R((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==v.maxStake?Math.min(t,v.maxStake):t})(t))},style:[Hi.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),(0,s.jsx)(c.View,{style:Hi.chipRow,children:v.quickStakes.map(e=>{const t=e===A;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>R(e),activeOpacity:.8,style:[Hi.stakeChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsxs)(c.Text,{style:[Hi.chipText,{color:t?m.primaryText:m.textMuted}],children:["$",e]})},e)})}),!M&&A>0?(0,s.jsxs)(c.Text,{style:[Hi.errorText,{color:m.error}],children:["Minimum stake is ",ht(v.minStake),"."]}):null]}),(0,s.jsxs)(c.View,{style:[Hi.dividendBlock,{borderTopColor:zi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:Hi.dividendCaptionRow,children:[(0,s.jsxs)(c.Text,{style:[Hi.dividendCaption,{color:m.textMuted}],children:["If all ",W," land"]}),(0,s.jsxs)(c.Text,{style:[Hi.dividendCaption,{color:m.textMuted}],children:[ht(A)," returns"]})]}),(0,s.jsxs)(c.View,{style:Hi.dividendMainRow,children:[(0,s.jsxs)(c.View,{style:Hi.dividendMainLeft,children:[(0,s.jsx)(c.Text,{style:[Hi.perfectTicket,{color:m.text}],children:"Perfect ticket"}),(0,s.jsx)(Li,{legs:W})]}),(0,s.jsx)(c.Text,{style:[Hi.prize,C&&Hi.prizeWide,{color:m.primary,fontFamily:w}],children:ht(L.prize)})]}),(0,s.jsxs)(c.Text,{style:[Hi.multipleLine,{color:m.textMuted}],children:[(H=L.multiple,`×${(Math.round(10*H)/10).toLocaleString("en-US",{maximumFractionDigits:1})}`)," your stake · total return, stake included"]}),(0,s.jsx)(c.Text,{style:[Hi.allOrNothing,{color:m.textMuted}],children:"All or nothing. Miss a single leg and the ticket does not pay."})]})]}),(0,s.jsxs)(c.View,{style:[Hi.modeCards,C&&Hi.modeCardsWide],children:[(0,s.jsx)(c.View,{style:C?Hi.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{M&&(u(W),f(W),g(A),y(),t?.())}})}),(0,s.jsx)(c.View,{style:C?Hi.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{M&&(f(W),g(A),p(d,W),e?.())}})})]})]})]});var H}var Hi=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:16},sectionTitleInBodyWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},dividendBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},dividendCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},dividendCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},dividendMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,marginTop:6},dividendMainLeft:{flex:1,minWidth:0,gap:3},perfectTicket:{fontSize:13},prize:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},prizeWide:{fontSize:24},multipleLine:{fontSize:11,marginTop:6,fontVariant:["tabular-nums"]},allOrNothing:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Oi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=xo(),m=l.colors,b=ae(l),w=ce(l),x=B(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[z,F]=(0,a.useState)(null),[v,W]=(0,a.useState)(null),T=(0,a.useMemo)(()=>r??Jn(d),[r,d]),[A,R]=(0,a.useState)(()=>T?.defaultDividend??1e4),[L,M]=(0,a.useState)(()=>{const e=T?.dividends[0]?.rungs.map(e=>e.legs)??[];return null!=h&&e.includes(h)?h:T?.defaultLegs??9});if(!d||!Kn(d)||!T)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No dividend series available."})});const P=T.dividends.find(e=>e.dividend===A)??T.dividends[0],H=P.rungs.find(e=>e.legs===L)??P.rungs[0],O=Math.max(...P.rungs.map(e=>e.legs)),I=Math.min(...P.rungs.map(e=>e.legs));return(0,s.jsxs)(c.View,{style:Ii.container,children:[n?(0,s.jsx)(c.View,{style:Ii.backRow,children:(0,s.jsx)(er,{onBack:n,label:i})}):null,(0,s.jsxs)(Re,{style:Ii.inner,children:[(0,s.jsx)(vi,{eyebrow:o?null:"Pick your dividend",iconUrl:ge(d),gameName:d.game_name,tagline:T.tagline}),(0,s.jsxs)(c.View,{style:[Ii.ticket,C&&Ii.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.12,shadowRadius:12,shadowOffset:{width:0,height:8},elevation:1}],children:[(E=ht(P.dividend),(0,s.jsxs)(c.View,{style:Ii.sectionLabelRow,children:[(0,s.jsx)(c.Text,{style:[Ii.sectionLabelText,{color:m.textMuted}],children:"Set dividend"}),E?(0,s.jsx)(c.Text,{style:[Ii.sectionValueText,{color:x}],children:E}):null]})),(0,s.jsx)(Ti,{ariaLabel:"Set dividend",children:T.dividends.map(e=>{const t=e.dividend===A,n=z===e.dividend;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>R(e.dividend),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...ze(()=>F(e.dividend),()=>F(null)),style:[Ii.dividendTile,Ai(C),{backgroundColor:t?zi(m.primary,.08):"transparent",borderColor:t||n?m.primary:m.border}],children:[(0,s.jsx)(c.Text,{style:[Ii.dividendValue,C&&Ii.dividendValueWide,{color:x,fontFamily:w}],children:ht(e.dividend)}),(0,s.jsxs)(c.Text,{style:[Ii.dividendFrom,{color:m.textMuted}],children:["from ",ht(e.rungs[0]?.stake??0)]})]},e.dividend)})}),(0,s.jsx)(c.Text,{style:[Ii.ticketNote,{color:m.textMuted}],children:"One set amount — it does not move, whatever you spend."}),(0,s.jsxs)(c.View,{style:[Ii.ladderDivider,{borderTopColor:zi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:Ii.ladderHeaderRow,children:[(0,s.jsx)(c.Text,{style:[Ii.ladderHeaderText,{color:m.textMuted}],children:"Legs to land"}),(0,s.jsx)(c.Text,{style:[Ii.ladderHeaderText,{color:m.textMuted}],children:"Your stake"})]}),(0,s.jsx)(c.View,{style:Ii.rungList,children:P.rungs.map(e=>{const t=e.legs===L,n=v===e.legs;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>M(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...ze(()=>W(e.legs),()=>W(null)),style:[Ii.rungRow,{backgroundColor:t?zi(m.primary,.08):"transparent",borderColor:t||n?m.primary:m.border}],children:[(0,s.jsxs)(c.View,{style:Ii.rungLeft,children:[(0,s.jsxs)(c.Text,{style:[Ii.rungLegs,{color:m.text}],children:[e.legs," legs",C?e.legs===O?" · the long climb":e.legs===I?" · the sprint":"":""]}),(0,s.jsx)(Li,{legs:e.legs})]}),(0,s.jsx)(c.Text,{style:[Ii.rungStake,C&&Ii.rungStakeWide,{color:m.primary,fontFamily:w}],children:ht(e.stake)})]},e.legs)})}),(0,s.jsx)(c.Text,{style:[Ii.ticketNote,{color:m.textMuted}],children:"Same dividend on every rung — a little for the long climb, more for the short one."})]})]}),(0,s.jsxs)(c.View,{style:[Ii.cardList,C&&Ii.cardListWide],children:[(0,s.jsx)(c.View,{style:C?Ii.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(d),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${H.legs} legs`,`${ht(H.stake)} chasing the ${ht(P.dividend)}`],onSelect:()=>{var e;u((e=H).legs),f(e.legs),g(e.stake),y(),t?.()}})}),(0,s.jsx)(c.View,{style:C?Ii.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${H.legs} legs at ${ht(H.stake)}`,"Straight to the bet slip"],onSelect:()=>{f(H.legs),g(H.stake),p(d,H.legs),e?.()}})})]})]})]});var E}var Ii=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},eyebrowLeft:{textAlign:"left"},eyebrowSectionWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},dividendGrid:{flexDirection:"row",flexWrap:"wrap",gap:6},dividendTile:{borderWidth:1,borderRadius:12,paddingHorizontal:6,paddingVertical:10,alignItems:"center"},dividendValue:{fontSize:16,fontWeight:"800",letterSpacing:-.32,fontVariant:["tabular-nums"]},dividendValueWide:{fontSize:20,letterSpacing:-.4},dividendFrom:{fontSize:10,marginTop:4},ticketNote:{fontSize:11,fontStyle:"italic",marginTop:8},ladderDivider:{marginTop:16,paddingTop:12,borderTopWidth:1},ladderHeaderRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},ladderHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderWidth:1,borderRadius:12,paddingHorizontal:12,paddingVertical:6},rungLeft:{flexShrink:1,minWidth:0,gap:3},rungLegs:{fontSize:13},rungStake:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungStakeWide:{fontSize:16},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ei({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y,screenSize:m,bodyFont:b}=xo(),w=l.colors,x="mobile"===m,k=ce(l),S=B(l),C=T(l),z=D(l),{width:F}=(0,c.useWindowDimensions)(),v=F>=640,[W,A]=(0,a.useState)(null),R=(0,a.useMemo)(()=>r??fr(d),[r,d]),[L,M]=(0,a.useState)(()=>R?null!=h&&R.ladders.some(e=>e.legs===h)?h:R.defaultLegs:8),[P,H]=(0,a.useState)(()=>R?.defaultStake??50),[O,I]=(0,a.useState)(!1);if(!d||!sr(d)||!R)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontFamily:b},children:"No ladders available."})});const E=R.ladders.find(e=>e.legs===L)??R.ladders[0],j=hr(E,P),N=ur(E,P),G=[...j].reverse(),Y=x&&G.length>4,V=Y&&!O?G.slice(0,3):G,U=(e,t)=>(0,s.jsxs)(c.View,{style:ji.sectionLabelRow,children:[(0,s.jsx)(c.Text,{style:[ji.sectionLabelText,{color:w.textMuted}],children:e}),t?(0,s.jsx)(c.Text,{style:[ji.sectionLabelValue,{color:S}],children:t}):null]});return(0,s.jsxs)(c.View,{style:[ji.container,{backgroundColor:w.background}],children:[n?(0,s.jsx)(c.View,{style:ji.backRow,children:(0,s.jsx)(er,{onBack:n,label:i})}):null,(0,s.jsxs)(Re,{style:ji.inner,children:[(0,s.jsx)(vi,{eyebrow:o?null:"Climb the ladder. Stack the prizes.",iconUrl:ge(d),gameName:d.game_name,tagline:R.tagline}),(0,s.jsxs)(c.View,{style:[ji.builder,v&&ji.builderWide,{backgroundColor:z,borderColor:w.border,shadowColor:S,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[U("Your bet",ht(P)),(0,s.jsx)(c.View,{style:ji.betRow,children:R.stakes.map(e=>{const t=e===P;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>H(e),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},style:[ji.betChip,{backgroundColor:t?w.primary:"transparent",borderColor:t?w.primary:w.border}],children:(0,s.jsxs)(c.Text,{style:[ji.betChipText,{color:t?w.primaryText:w.textMuted}],children:["$",e]})},e)})}),(0,s.jsx)(c.Text,{style:[ji.betNote,{color:w.textMuted}],children:"Every prize scales with your bet."}),(0,s.jsxs)(c.View,{style:ji.laddersBlock,children:[U(`${R.ladders.length} ladders to choose from`),(0,s.jsx)(Ti,{ariaLabel:"Ladder",children:R.ladders.map(e=>{const t=e.legs===L,n=W===e.legs;return(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>M(e.legs),activeOpacity:.85,accessibilityRole:"radio",accessibilityState:{selected:t},...ze(()=>A(e.legs),()=>A(null)),style:[ji.ladderTile,Ai(v,"17%"),{backgroundColor:t?zi(w.primary,.08):"transparent",borderColor:t||n?w.primary:w.border}],children:[(0,s.jsxs)(c.Text,{style:[ji.ladderTileLabel,{color:w.primary}],children:["Ladder ",e.legs]}),(0,s.jsx)(c.Text,{style:[ji.ladderTilePrize,{color:S,fontFamily:k}],children:ht(ur(e,P))}),(0,s.jsxs)(c.Text,{style:[ji.ladderTileNote,{color:w.textMuted}],children:["Win from ",e.firstPayingTier," right"]})]},e.legs)})})]}),(0,s.jsxs)(c.View,{style:[ji.stackTable,{borderTopColor:zi(S,.08)}],children:[(0,s.jsxs)(c.Text,{style:[ji.stackIntro,{color:w.text}],children:["Ladder ",E.legs," wins from ",E.firstPayingTier," right — every tier stacks into the"," ",(0,s.jsx)(c.Text,{style:{fontWeight:"700",color:S},children:ht(N)})," Full Stack Prize."]}),(0,s.jsxs)(c.View,{style:ji.rungHeader,children:[(0,s.jsx)(c.Text,{style:[ji.rungHeaderCaption,{color:w.textMuted}],children:"Get right"}),(0,s.jsxs)(c.View,{style:ji.rungHeaderRight,children:[(0,s.jsx)(c.Text,{style:[ji.rungHeaderCaption,ji.rungColPrize,{color:w.textMuted}],children:"Tier pays"}),(0,s.jsx)(c.Text,{style:[ji.rungHeaderCaption,ji.rungColTotal,{color:w.textMuted}],children:"You collect"})]})]}),(0,s.jsx)(c.View,{style:ji.rungList,children:V.map(e=>{const t=e.atLeast===E.legs;return(0,s.jsxs)(c.View,{style:ji.rungRow,children:[(0,s.jsxs)(c.View,{style:ji.rungLeft,children:[(0,s.jsxs)(c.View,{style:ji.rungLabelRow,children:[(0,s.jsxs)(c.Text,{style:[ji.rungLabel,{color:w.text}],children:[e.atLeast," of ",E.legs]}),t&&v?(0,s.jsx)(c.View,{style:[ji.fullStackChip,{backgroundColor:zi(C,.35)}],children:(0,s.jsx)(c.Text,{style:[ji.fullStackChipText,{color:S}],children:"Full stack"})}):null]}),(0,s.jsx)(Li,{legs:e.atLeast,prizeBall:t})]}),(0,s.jsxs)(c.View,{style:ji.rungRight,children:[(0,s.jsx)(c.Text,{style:[ji.rungPrize,ji.rungColPrice,{color:w.textMuted}],children:ht(e.prize)}),(0,s.jsx)(c.Text,{style:[ji.rungCumulative,ji.rungColTotal,v&&ji.rungCumulativeWide,{color:w.primary,fontFamily:k}],children:ht(e.cumulative)})]})]},e.atLeast)})}),Y?(0,s.jsx)(c.TouchableOpacity,{onPress:()=>I(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:O},style:[ji.tierToggle,{borderColor:w.border}],children:(0,s.jsx)(c.Text,{style:[ji.tierToggleText,{color:w.primary}],children:O?"Show fewer tiers":`Show all ${G.length} tiers`})}):null,(0,s.jsxs)(c.Text,{style:[ji.stackNote,{color:w.textMuted}],children:["Land below ",E.firstPayingTier," right and the ticket does not pay."]})]})]}),(0,s.jsxs)(c.View,{style:[ji.modeCards,v&&ji.modeCardsWide],children:[(0,s.jsx)(c.View,{style:v?ji.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(d),size:60}),label:"Pick my own",stat:"Your calls",detail:[`A clean yes or no on all ${E.legs} outcomes`,`Win from ${E.firstPayingTier} right — every tier stacks`],onSelect:()=>{u(E.legs),f(E.legs),g(P),y(),t?.()}})}),(0,s.jsx)(c.View,{style:v?ji.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:[`We fill all ${E.legs} legs at ${ht(P)}`,"Straight to the bet slip"],onSelect:()=>{f(E.legs),g(P),p(d,E.legs),e?.()}})})]})]})]})}var ji=c.StyleSheet.create({container:{flex:1},inner:{flex:1,paddingHorizontal:16,width:"100%"},backRow:{paddingHorizontal:16},titleWrap:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},pageTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,textAlign:"center",marginBottom:16},header:{alignItems:"center",marginBottom:24},headerWide:{marginBottom:28},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},builder:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},builderWide:{paddingHorizontal:20,paddingVertical:20},sectionLabelRow:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},sectionLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},sectionLabelValue:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},betRow:{flexDirection:"row",flexWrap:"wrap",gap:6},betChip:{flexGrow:1,flexBasis:52,minWidth:52,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},betChipText:{fontSize:14,fontWeight:"700"},betNote:{marginTop:8,fontSize:11,fontStyle:"italic"},laddersBlock:{marginTop:16},ladderGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},ladderTile:{flexGrow:1,borderWidth:1,borderRadius:12,paddingHorizontal:8,paddingVertical:12,alignItems:"center",justifyContent:"center"},ladderTileLabel:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},ladderTilePrize:{marginTop:4,fontSize:18,fontWeight:"800",letterSpacing:-.36,fontVariant:["tabular-nums"]},ladderTileNote:{marginTop:4,fontSize:10},stackTable:{marginTop:16,borderTopWidth:1,paddingTop:12},stackIntro:{marginBottom:8,fontSize:12,lineHeight:18},rungHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},rungHeaderRight:{flexDirection:"row",gap:10},rungColPrice:{width:64,textAlign:"right"},rungColPrize:{width:64,textAlign:"right"},rungColTotal:{width:84,textAlign:"right"},rungHeaderCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},rungList:{marginTop:6,gap:6},rungRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},rungLeft:{flex:1,minWidth:0,gap:3},rungLabelRow:{flexDirection:"row",alignItems:"center",gap:8,flexWrap:"wrap"},rungLabel:{fontSize:13},fullStackChip:{borderRadius:999,paddingHorizontal:8,paddingVertical:2},fullStackChipText:{fontSize:9,fontWeight:"700",textTransform:"uppercase",letterSpacing:.8},rungRight:{flexDirection:"row",alignItems:"baseline",gap:10,flexShrink:0},rungPrize:{fontSize:11,fontVariant:["tabular-nums"]},rungCumulative:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},rungCumulativeWide:{fontSize:16},tierToggle:{marginTop:8,borderWidth:1,borderRadius:8,paddingVertical:8,alignItems:"center"},tierToggleText:{fontSize:11,fontWeight:"700"},stackNote:{marginTop:8,fontSize:11,fontStyle:"italic"},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Ni({legs:e,right:t}){const{theme:n}=xo(),o=n.colors.primary,r=T(n);return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center"},children:[Array.from({length:e}).map((e,n)=>(0,s.jsx)(c.View,{style:{width:5,height:5,borderRadius:1.5,marginRight:3,backgroundColor:t?o:"transparent",borderWidth:t?0:1,borderColor:t?void 0:zi(o,.45),opacity:t?.85:1}},n)),(0,s.jsx)(c.View,{style:{width:7,height:7,borderRadius:999,backgroundColor:r,marginLeft:2}})]})}function Gi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,quickPickGame:p,goToSportSelection:y}=xo(),m=l.colors,b=ae(l),w=ce(l),x=B(l),k=D(l),{width:S}=(0,c.useWindowDimensions)(),C=S>=640,[z,F]=(0,a.useState)(!1),v=(0,a.useMemo)(()=>r??br(d),[r,d]),[W,T]=(0,a.useState)(()=>v?null!=h&&v.legOptions.includes(h)?h:v.defaultLegs:8),[A,R]=(0,a.useState)(()=>v?.defaultStake??20);if(!d||!yr(d)||!v)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:m.textMuted,fontFamily:b},children:"No mirror available."})});const L=mr(A,W,{operatorMargin:v.operatorMargin,perLegProbability:v.perLegProbability}),M=A>=v.minStake,P=(e,t)=>(0,s.jsxs)(c.View,{style:Yi.controlLabel,children:[(0,s.jsx)(c.Text,{style:[Yi.controlLabelText,{color:m.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Yi.controlValueText,{color:x}],children:t})]}),H=e=>(0,s.jsxs)(c.View,{style:Yi.winRow,children:[(0,s.jsxs)(c.View,{style:Yi.winRowLeft,children:[(0,s.jsx)(c.Text,{style:[Yi.winRowLabel,{color:m.text}],children:e?`All ${W} right`:`All ${W} wrong`}),(0,s.jsx)(Ni,{legs:W,right:e})]}),(0,s.jsx)(c.Text,{style:[Yi.winRowPrize,C&&Yi.winRowPrizeWide,{color:m.primary,fontFamily:w}],children:ht(L.prize)})]});return(0,s.jsxs)(c.View,{style:Yi.container,children:[n?(0,s.jsx)(c.View,{style:Yi.backRow,children:(0,s.jsx)(er,{onBack:n,label:i})}):null,(0,s.jsxs)(Re,{style:Yi.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Yi.sectionTitle,{color:m.primary,fontFamily:w}],children:"All right, or all wrong"}),(0,s.jsx)(vi,{eyebrow:o?null:"All right, or all wrong",iconUrl:ge(d),gameName:d.game_name,tagline:v.tagline}),(0,s.jsxs)(c.View,{style:[Yi.ticket,C&&Yi.ticketWide,{backgroundColor:k,borderColor:m.border,shadowColor:x,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[P("Legs",`${W} legs`),(0,s.jsx)(c.View,{style:Yi.chipRow,children:v.legOptions.map(e=>{const t=e===W;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>T(e),accessibilityRole:"radio",accessibilityState:{selected:t},style:[Yi.legChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Yi.chipText,{color:t?m.primaryText:m.textMuted}],children:e})},e)})}),(0,s.jsxs)(c.View,{style:Yi.hintRow,children:[(0,s.jsx)(c.Text,{style:[Yi.hintText,{color:m.textMuted}],children:"Easier to sweep"}),(0,s.jsx)(c.Text,{style:[Yi.hintText,{color:m.textMuted}],children:"Bigger prize"})]}),(0,s.jsxs)(c.View,{style:Yi.stakeBlock,children:[P("Stake",ht(A)),(0,s.jsxs)(c.View,{style:[Yi.inputWrap,{borderColor:z?m.borderFocus??m.primary:m.border,backgroundColor:m.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Yi.inputPrefix,{color:m.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"numeric",placeholder:"Enter stake",placeholderTextColor:m.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>F(!0),onBlur:()=>F(!1),value:A?String(A):"",onChangeText:e=>{if(""===e)return void R(0);const t=Number(e);Number.isFinite(t)&&R((e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==v.maxStake?Math.min(t,v.maxStake):t})(t))},style:[Yi.input,{color:m.textAlt??m.text,fontFamily:b}]})]}),(0,s.jsx)(c.View,{style:Yi.quickStakeRow,children:v.quickStakes.map(e=>{const t=e===A;return(0,s.jsx)(c.TouchableOpacity,{onPress:()=>R(e),style:[Yi.stakeChip,{backgroundColor:t?m.primary:"transparent",borderColor:t?m.primary:m.border}],children:(0,s.jsx)(c.Text,{style:[Yi.chipText,{color:t?m.primaryText:m.textMuted}],children:`$${e}`})},e)})}),!M&&A>0?(0,s.jsx)(c.Text,{style:[Yi.errorText,{color:m.error}],children:`Minimum stake is ${ht(v.minStake)}.`}):null]}),(0,s.jsxs)(c.View,{style:[Yi.winSection,{borderTopColor:zi(x,.08)}],children:[(0,s.jsxs)(c.View,{style:Yi.winHeader,children:[(0,s.jsx)(c.Text,{style:[Yi.winHeaderText,{color:m.textMuted}],children:"Two ways to win"}),(0,s.jsx)(c.Text,{style:[Yi.winHeaderText,{color:m.textMuted}],children:`${ht(A)} pays each`})]}),(0,s.jsxs)(c.View,{style:Yi.winRows,children:[H(!0),H(!1)]}),(0,s.jsx)(c.Text,{style:[Yi.splitNote,{color:m.textMuted}],children:"Anything in between — a split card — does not pay."})]})]}),(0,s.jsxs)(c.View,{style:[Yi.cardList,C&&Yi.cardListWide],children:[(0,s.jsx)(c.View,{style:C?Yi.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","Aim for the sweep — either direction pays"],onSelect:()=>{M&&(u(W),f(W),g(A),y(),t?.())}})}),(0,s.jsx)(c.View,{style:C?Yi.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{M&&(f(W),g(A),p(d,W),e?.())}})})]})]})]})}var Yi=c.StyleSheet.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16,textAlign:"center"},tagline:{marginTop:12,fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabel:{marginBottom:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},legChip:{minWidth:40,flexGrow:1,flexBasis:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},hintRow:{marginTop:8,flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},quickStakeRow:{marginTop:8,flexDirection:"row",flexWrap:"wrap",gap:6},stakeChip:{minWidth:48,flexGrow:1,flexBasis:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},errorText:{marginTop:8,fontSize:12},winSection:{marginTop:16,borderTopWidth:1,paddingTop:12},winHeader:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},winHeaderText:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},winRows:{marginTop:6,gap:8},winRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},winRowLeft:{flex:1,minWidth:0,gap:3},winRowLabel:{fontSize:13},winRowPrize:{fontSize:18,fontWeight:"800",fontVariant:["tabular-nums"]},winRowPrizeWide:{fontSize:20},splitNote:{marginTop:8,fontSize:11,fontStyle:"italic"},cardList:{marginTop:16,gap:12},cardListWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Vi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,config:r,backLabel:i="Games"}){const{theme:l,selectedGame:d,selectedPropositionCount:h,handlePropositionCountChange:u,setExpectedCorrect:f,setBetAmount:g,setSelectedRuleId:p,quickPickGame:y,goToSportSelection:m}=xo(),b=l.colors,w=ae(l),x=ce(l),k=B(l),S=D(l),{width:C}=(0,c.useWindowDimensions)(),z=C>=640,[F,v]=(0,a.useState)(!1),W=(0,a.useMemo)(()=>r??En(d),[r,d]),[T,A]=(0,a.useState)(()=>W?.defaultModeId??"extra_shot"),[R,L]=(0,a.useState)(()=>{const e=W?.modes.find(e=>e.id===(W?.defaultModeId??"extra_shot"));return e?null!=h&&e.legOptions.includes(h)?h:e.defaultLegs:8}),[M,P]=(0,a.useState)(()=>W?.defaultStake??20);if(!d||!Tn(d)||!W)return(0,s.jsx)(c.View,{style:[Ui.container,{backgroundColor:b.background}],children:(0,s.jsx)(c.Text,{style:{color:b.textMuted,fontFamily:w},children:"No safety net available."})});const H=W.modes.find(e=>e.id===T)??W.modes[0],O=Dn(M,R,H.allowedMisses,W.pricing),I=e=>{const t=Math.max(0,Math.round(100*e)/100);return null!==W.maxStake?Math.min(t,W.maxStake):t},E=M>=W.minStake,j=(e,t)=>(0,s.jsxs)(c.View,{style:Ui.controlLabelRow,children:[(0,s.jsx)(c.Text,{style:[Ui.controlLabelText,{color:b.textMuted}],children:e}),(0,s.jsx)(c.Text,{style:[Ui.controlValueText,{color:k}],children:t})]}),N=(e,t,n,o)=>(0,s.jsx)(c.TouchableOpacity,{onPress:o,accessibilityRole:"radio",accessibilityState:{selected:n},activeOpacity:.8,style:[Ui.chip,{backgroundColor:n?b.primary:"transparent",borderColor:n?b.primary:b.border}],children:(0,s.jsx)(c.Text,{style:[Ui.chipText,{color:n?b.primaryText:b.textMuted}],children:t})},e),G=[{label:"Perfect",amount:O.perfect},...O.nearMiss.map((e,t)=>({label:`All but ${t+1}`,amount:e}))];return(0,s.jsxs)(c.View,{style:[Ui.container,{backgroundColor:b.background}],children:[n?(0,s.jsx)(c.View,{style:Ui.backRow,children:(0,s.jsx)(er,{onBack:n,label:i})}):null,(0,s.jsxs)(Re,{style:Ui.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Ui.sectionTitle,Ui.sectionTitleInBody,z&&Ui.sectionTitleInBodyWide,{color:b.primary,fontFamily:x,textAlign:"center"}],children:"Choose your safety net"}),(0,s.jsx)(vi,{eyebrow:o?null:"Choose your safety net",iconUrl:ge(d),gameName:d.game_name,tagline:W.tagline}),(0,s.jsxs)(c.View,{style:[Ui.ticket,z&&Ui.ticketWide,{backgroundColor:S,borderColor:b.border,shadowColor:k,shadowOpacity:.14,shadowRadius:14,shadowOffset:{width:0,height:10},elevation:1}],children:[j("Safety net",H.label),(0,s.jsx)(c.View,{style:Ui.chipRow,children:W.modes.map(e=>N(e.id,e.label,e.id===H.id,()=>(e=>{const t=W.modes.find(t=>t.id===e);t&&(A(e),p(t.ruleId),t.legOptions.includes(R)||L(t.legOptions.reduce((e,t)=>Math.abs(t-R)<Math.abs(e-R)?t:e,t.legOptions[0])))})(e.id)))}),(0,s.jsx)(c.Text,{style:[Ui.modeExplain,z&&Ui.modeExplainWide,{color:b.textMuted}],children:H.explain}),(0,s.jsxs)(c.View,{style:Ui.legsBlock,children:[j("Legs",`${R} legs`),(0,s.jsx)(c.View,{style:Ui.chipRow,children:H.legOptions.map(e=>N(e,String(e),e===R,()=>L(e)))}),(0,s.jsxs)(c.View,{style:Ui.hintRow,children:[(0,s.jsx)(c.Text,{style:[Ui.hintText,{color:b.textMuted}],children:"Easier to land"}),(0,s.jsx)(c.Text,{style:[Ui.hintText,{color:b.textMuted}],children:"Bigger prizes"})]})]}),(0,s.jsxs)(c.View,{style:Ui.stakeBlock,children:[j("Stake",ht(M)),(0,s.jsxs)(c.View,{style:[Ui.inputWrap,{borderColor:F?b.borderFocus??b.primary:b.border,backgroundColor:b.backgroundAlt}],children:[(0,s.jsx)(c.Text,{style:[Ui.inputPrefix,{color:b.textMuted}],children:"$"}),(0,s.jsx)(c.TextInput,{keyboardType:"decimal-pad",placeholder:"Enter stake",placeholderTextColor:b.textMuted,accessibilityLabel:"Stake amount",onFocus:()=>v(!0),onBlur:()=>v(!1),value:M?String(M):"",onChangeText:e=>{if(""===e)return void P(0);const t=Number(e);Number.isFinite(t)&&P(I(t))},style:[Ui.input,{color:b.textAlt??b.text,fontFamily:w}]})]}),(0,s.jsx)(c.View,{style:Ui.chipRow,children:W.quickAdds.map(e=>(0,s.jsx)(c.TouchableOpacity,{onPress:()=>P(I((M||0)+e)),activeOpacity:.8,style:[Ui.stakeChip,{backgroundColor:"transparent",borderColor:b.border}],children:(0,s.jsxs)(c.Text,{style:[Ui.chipText,{color:b.textMuted}],children:["+$",e]})},e))}),!E&&M>0?(0,s.jsxs)(c.Text,{style:[Ui.errorText,{color:b.error}],children:["Minimum stake is ",ht(W.minStake),"."]}):null]}),(0,s.jsxs)(c.View,{style:[Ui.prizeBlock,{borderTopColor:zi(k,.08)}],children:[(0,s.jsxs)(c.View,{style:Ui.prizeCaptionRow,children:[(0,s.jsx)(c.Text,{style:[Ui.prizeCaption,{color:b.textMuted}],children:"What you can win"}),(0,s.jsxs)(c.Text,{style:[Ui.prizeCaption,{color:b.textMuted}],children:[ht(M)," returns"]})]}),(0,s.jsxs)(c.View,{style:Ui.prizeRows,children:[G.map(e=>(0,s.jsxs)(c.View,{style:Ui.prizeRow,children:[(0,s.jsx)(c.Text,{style:[Ui.prizeRowLabel,z&&Ui.prizeRowLabelWide,{color:b.text}],children:e.label}),(0,s.jsx)(c.Text,{style:[Ui.prizeRowAmount,z&&Ui.prizeRowAmountWide,{color:b.primary,fontFamily:x}],children:ht(Math.round(e.amount))})]},e.label)),(0,s.jsxs)(c.View,{style:[Ui.sweepRow,{backgroundColor:b.primary}],children:[(0,s.jsxs)(c.View,{style:Ui.sweepLeft,children:[(0,s.jsx)(c.Text,{style:[Ui.sweepLabel,z&&Ui.sweepLabelWide,{color:b.primaryText,fontFamily:x}],children:"Clean sweep"}),(0,s.jsx)(c.Text,{style:[Ui.sweepSub,{color:b.primaryText}],children:"every leg right — all prizes"})]}),(0,s.jsx)(c.Text,{style:[Ui.sweepAmount,z&&Ui.sweepAmountWide,{color:b.primaryText,fontFamily:x}],children:ht(Math.round(O.sweep))})]})]}),(0,s.jsx)(c.Text,{style:[Ui.stakeNote,{color:b.textMuted}],children:"Total returns, stake included."}),(0,s.jsxs)(c.Text,{style:[Ui.missNote,{color:b.textMuted}],children:["Miss ",1===H.allowedMisses?"two":"three"," or more and the ticket does not pay."]})]})]}),(0,s.jsxs)(c.View,{style:[Ui.modeCards,z&&Ui.modeCardsWide],children:[(0,s.jsx)(c.View,{style:z?Ui.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(d),size:60}),label:"Pick my own",stat:"Your calls",detail:["A clean yes or no on every leg","You read the games, you make the calls"],onSelect:()=>{E&&(p(H.ruleId),u(R),f(R-H.allowedMisses),g(M),m(),t?.())}})}),(0,s.jsx)(c.View,{style:z?Ui.modeCardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:["We fill every leg for you","Straight to the bet slip"],onSelect:()=>{E&&(p(H.ruleId),f(R-H.allowedMisses),g(M),y(d,R),e?.())}})})]})]})]})}var Ui=c.StyleSheet.create({container:{flex:1},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},headerCompact:{paddingHorizontal:12},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},sectionTitleCompact:{fontSize:10,letterSpacing:1.4,marginBottom:12},sectionTitleInBody:{marginBottom:16},sectionTitleInBodyWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},ticket:{borderWidth:2,borderRadius:24,paddingHorizontal:16,paddingVertical:16},ticketWide:{paddingHorizontal:20,paddingVertical:20},controlLabelRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},controlLabelText:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1},controlValueText:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chipRow:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{flexGrow:1,minWidth:40,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},stakeChip:{flexGrow:1,minWidth:48,borderWidth:1,borderRadius:8,paddingHorizontal:4,paddingVertical:8,alignItems:"center",justifyContent:"center"},chipText:{fontSize:14,fontWeight:"700"},modeExplain:{fontSize:12,lineHeight:17,marginTop:8},modeExplainWide:{fontSize:13,lineHeight:18},legsBlock:{marginTop:16},hintRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between",marginTop:8},hintText:{fontSize:11,fontStyle:"italic"},stakeBlock:{marginTop:16},inputWrap:{flexDirection:"row",alignItems:"center",borderWidth:1,borderRadius:8,paddingHorizontal:12,marginBottom:8},inputPrefix:{fontSize:16,fontWeight:"700",marginRight:4},input:{flex:1,paddingVertical:12,fontSize:18,fontWeight:"600",fontVariant:["tabular-nums"]},errorText:{fontSize:12,marginTop:8},prizeBlock:{marginTop:16,paddingTop:12,borderTopWidth:1},prizeCaptionRow:{flexDirection:"row",alignItems:"baseline",justifyContent:"space-between"},prizeCaption:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:1},prizeRows:{marginTop:6,gap:6},prizeRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},prizeRowLabel:{fontSize:12},prizeRowLabelWide:{fontSize:13},prizeRowAmount:{fontSize:14,fontWeight:"800",fontVariant:["tabular-nums"]},prizeRowAmountWide:{fontSize:16},sweepRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderRadius:12,paddingHorizontal:12,paddingVertical:10,marginTop:4},sweepLeft:{flex:1,minWidth:0,gap:2},sweepLabel:{fontSize:14,fontWeight:"800"},sweepLabelWide:{fontSize:15},sweepSub:{fontSize:10,fontWeight:"600",textTransform:"uppercase",letterSpacing:.6,opacity:.75},sweepAmount:{fontSize:20,fontWeight:"800",fontVariant:["tabular-nums"]},sweepAmountWide:{fontSize:24},stakeNote:{fontSize:11,marginTop:6},missNote:{fontSize:11,fontStyle:"italic",marginTop:4},modeCards:{marginTop:16,gap:12},modeCardsWide:{marginTop:20,flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},modeCardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});function Zi({onQuickPick:e,onPickYourOwn:t,onBack:n,hideTitle:o,backLabel:r="Games"}){const{theme:i,selectedGame:l,selectedPropositionCount:d,handlePropositionCountChange:h,setExpectedCorrect:u,quickPickGame:f,goToSportSelection:g}=xo(),p=i.colors,y=ae(i),m=ce(i),{width:b}=(0,c.useWindowDimensions)(),w=b>=640,x=(0,a.useMemo)(()=>{if(!l)return[];if(l.allowed_propositions&&l.allowed_propositions.length>0)return[...l.allowed_propositions].sort((e,t)=>e-t);const{min:e,max:t}=St(l);return Nt(e,t)},[l]),k=kr(l),S=x[0]??0,C=x[x.length-1]??0,[B]=(0,a.useState)(()=>null!=d&&x.includes(d)?d:C),z=(0,a.useMemo)(()=>Yn(l,B||void 0),[l,B]);if(!l||0===x.length||"exact"!==z?.kind)return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:p.textMuted,fontFamily:y},children:"No setup available."})});const F=k?["Any yes/no props in the pool",`Pick ${S}–${C} legs — all must land`]:["A clean yes or no on every leg",`All ${B} have to land`],v=k?[`We fill ${B} legs across any markets`,"Straight to the bet slip"]:[`We fill all ${B} legs for you`,"Straight to the bet slip"];return(0,s.jsxs)(c.View,{style:Ki.container,children:[n?(0,s.jsx)(c.View,{style:Ki.backRow,children:(0,s.jsx)(er,{onBack:n,label:r})}):null,(0,s.jsxs)(Re,{style:Ki.inner,children:[o?null:(0,s.jsx)(c.Text,{style:[Ki.sectionTitle,w&&Ki.sectionTitleWide,{color:p.primary,fontFamily:m}],children:z.title}),(0,s.jsx)(vi,{eyebrow:o?null:z.title,iconUrl:ge(l),gameName:l.game_name,tagline:z.heroTagline}),(0,s.jsxs)(c.View,{style:[Ki.cardList,w&&Ki.cardListWide],children:[(0,s.jsx)(c.View,{style:w?Ki.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:ge(l),size:60}),label:"Pick my own",stat:"Your calls",detail:F,onSelect:()=>{k||(h(B),u(B)),g(),t?.()}})}),(0,s.jsx)(c.View,{style:w?Ki.cardCell:void 0,children:(0,s.jsx)(Di,{tile:(0,s.jsx)(Fi,{iconUrl:`${se}quickpick`,size:60}),label:"QuickPick for me",stat:"Fastest",detail:v,onSelect:()=>{u(B),f(l,B),e?.()}})})]})]})]})}var Ki=c.StyleSheet.create({container:{flex:1,width:"100%"},header:{marginBottom:8,paddingHorizontal:16},eyebrow:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16},backRow:{paddingHorizontal:16},inner:{flex:1,paddingHorizontal:16,width:"100%"},sectionTitle:{fontSize:12,fontWeight:"700",textTransform:"uppercase",letterSpacing:2.16,marginBottom:16,textAlign:"center"},sectionTitleWide:{marginBottom:20},tagline:{fontSize:14,lineHeight:23,textAlign:"center",maxWidth:384,marginTop:12},taglineWide:{fontSize:15,lineHeight:24},cardList:{gap:12},cardListWide:{flexDirection:"row",flexWrap:"wrap",alignItems:"stretch"},cardCell:{flexBasis:"48%",flexGrow:1,minWidth:"45%"}});exports.BladeApiClient=co,exports.BrandLockup=function({iconUrl:e,gameName:t,nameLines:n,height:o=56,showTrademark:r=!0}){const{theme:i}=xo(),l=B(i),a=T(i),d=i.colors.primaryHover??function(e){const t=/^#([0-9a-f]{6})$/i.exec((e??"").trim());if(!t)return e;const n=parseInt(t[1],16);return`rgba(${n>>16&255}, ${n>>8&255}, ${255&n}, 0.7)`}(l),h=ce(i)??"Manrope, Poppins, sans-serif",u=n&&n.length>0?n:t.split(/\s+/),f=.72*o,g=.5*o,p=Math.min(.62*o/u.length,.3*o);return(0,s.jsxs)(c.View,{accessible:!0,accessibilityRole:"image",accessibilityLabel:`YESNO ${t}`,style:{flexDirection:"row",alignItems:"center",gap:.22*o},children:[(0,s.jsx)(Zt,{iconUrl:e,width:f,height:f,iconColor:l,accentColor:a}),(0,s.jsxs)(c.Text,{style:{fontFamily:h,fontSize:g,letterSpacing:.045*-g,lineHeight:g,color:l,includeFontPadding:!1},children:[(0,s.jsx)(c.Text,{style:{fontWeight:"800"},children:"YES"}),(0,s.jsx)(c.Text,{style:{fontWeight:"600"},children:"NO"})]}),(0,s.jsx)(c.View,{style:{width:Math.max(2,Math.round(.045*o)),height:.78*o,backgroundColor:d}}),(0,s.jsx)(c.View,{style:{flexDirection:"column"},children:u.map((e,t)=>(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"flex-start"},children:[(0,s.jsx)(c.Text,{style:{fontFamily:h,fontSize:p,fontWeight:"500",letterSpacing:.012*-p,lineHeight:1.14*p,color:l,includeFontPadding:!1},children:e}),r&&t===u.length-1?(0,s.jsx)(c.Text,{style:{fontFamily:h,fontSize:.36*p,fontWeight:"500",color:l,marginLeft:1},children:"™"}):null]},`${e}-${t}`))})]})},exports.CategoryIcon=Ne,exports.CategoryPickerPage=Vr,exports.CategoryPickerPageActions=function({onCancel:e}){const{theme:t,screenSize:n}=xo(),o=t.colors;return e&&"mobile"!==n?(0,s.jsx)(c.View,{style:Ur.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Ur.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Ur.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null},exports.CategoryPickerPageTitle=Yr,exports.ChevronRightIcon=Ge,exports.ConfirmPage=function({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o,hideTitle:r,hideActions:i}){const l=xo(),{theme:d,selectedGame:h,selectedPropositions:u,selections:f,propositions:g,selectedPropositionCount:p,selectedEventId:y,expectedCorrect:m,setExpectedCorrect:b,betAmount:w,setBetAmount:x,submitting:k,submitError:S,canSubmit:C,winningCounts:B,payouts:z,overloadPayouts:F,renderTeamLogo:v,userBalance:W,onRecharge:T,goBack:A,toggleSelection:R,upgradePropositionCount:L,goToSportSelection:D,selectedRule:M}=l,P=d.colors,{width:H}=(0,c.useWindowDimensions)(),O=H>=640;if((0,a.useEffect)(()=>{h||(D(),e?.())},[h,D,e]),!h)return null;const I=!!(h.allowed_propositions&&h.allowed_propositions.length>0),E=St(h,p,M),j=E.min,N=un(h)&&y?Math.min(E.max,g.length):E.max,G=Object.keys(f).length,Y=j>0&&G<j,V=!I&&j>0&&N>j&&G>=j&&G<N,U=I?[...h.allowed_propositions??[]].sort((e,t)=>e-t).filter(e=>e>(p??0)):[],Z=I&&U.length>0&&!Y,K=V||Z,q=N-G;P.textAlt??P.text;const X=()=>{A(),e?.()},Q=(I?[...h.allowed_propositions??[]].sort((e,t)=>t-e):[]).find(e=>e===G&&e<(p??1/0)),J=I&&G<Math.min(...h.allowed_propositions??[1/0]),$=I&&Y&&!J,_=Sr(h),ee=function(e,t,n,o){const r=e?.description?.trim();if(r)return r;const i=(t??[]).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);if(0===i.length||n<=0)return null;const l=i[0];if(l>=n)return"Get every pick right to win.";if(!i.every((e,t)=>e===l+t)||i[i.length-1]!==n)return 2===i.length&&0===i[0]&&i[1]===n?`Get all ${n} picks right — or all ${n} wrong — to win.`:`Get exactly ${i.join(" or ")} of your ${n} picks right to win.`;const a=i.map(e=>o?.[e]).filter(e=>Number.isFinite(e));if(a.length===i.length&&a.length>1&&a.every((e,t)=>0===t||e>a[t-1]))return`Get ${l} of your ${n} picks right to start winning — every pick after that grows the prize.`;const c=n-l;return`Get ${l} of your ${n} picks right to win — up to ${1===c?"one miss":`${c} misses`} still pays.`}(M,B,G,z),te=null!=Q?_.belowRequiredHint(Q,p??j):_.belowRequiredAddOnlyHint(p??j);return(0,a.useEffect)(()=>{!Y||I&&!J||X()},[Y,I,J]),(0,s.jsxs)(c.View,{style:li.container,children:[!r&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(ii,{onBack:e,hideActions:i})}),(0,s.jsx)(c.View,{style:li.content,children:(0,s.jsx)(jo,{game:h,propositions:u,selections:f,onToggleSelection:R,onRemoveSelection:()=>{},onSubmit:async()=>{n?(await l.handleSubmit(),t?.()):o?.(ri(l))},onBack:X,loading:k,error:S,expectedCorrect:m,onExpectedCorrectChange:b,betAmount:w,onBetAmountChange:x,theme:d,showCustomAmount:!0,betAmountLocked:Kn(h),betAmountLockedNote:"Set by your dividend ladder rung.",hideActions:!0,winningCounts:B,payouts:z,renderTeamLogo:v,canSubmit:C,authenticated:n,userBalance:W,onRecharge:T,boostBanner:(0,s.jsxs)(s.Fragment,{children:[ee&&(0,s.jsxs)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.primary}30`,backgroundColor:`${P.primary}08`,marginBottom:12},children:[(0,s.jsx)(c.Text,{style:{fontSize:10,fontWeight:"700",textTransform:"uppercase",letterSpacing:1,color:P.textMuted,marginBottom:4},children:"How you win"}),(0,s.jsx)(c.Text,{style:{fontSize:O?14:12,color:P.text},children:ee})]}),$&&(0,s.jsxs)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.warning}40`,backgroundColor:`${P.warning}10`,flexDirection:O?"row":"column",alignItems:O?"center":"flex-start",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{fontSize:O?14:12,color:P.text,flexShrink:1},children:["You have ",(0,s.jsxs)(c.Text,{style:{fontWeight:"700"},children:[G," pick",1!==G?"s":""]}),`. ${te}`]}),(0,s.jsxs)(c.View,{style:{flexDirection:"row",gap:8,flexShrink:0},children:[(0,s.jsx)(c.TouchableOpacity,{onPress:X,style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonSecondary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonSecondaryText},children:"Add a pick"})}),null!=Q&&(0,s.jsx)(c.TouchableOpacity,{onPress:()=>L(Q),style:{paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonPrimaryText},children:_.switchTierLabel(Q)})})]})]}),K&&(0,s.jsx)(c.View,{style:{padding:12,borderRadius:8,borderWidth:1,borderColor:`${P.primary}30`,backgroundColor:`${P.primary}08`},children:Z?(()=>{const e=p??G,t=F[e],n=w>0?w:20,o=null!=t&&t>0?t*(n/20):null;return(0,s.jsxs)(c.View,{children:[(0,s.jsx)(c.Text,{style:{fontSize:14,fontWeight:"600",color:P.primary,marginBottom:4},children:_.overloadTitle}),null!=o&&(0,s.jsxs)(c.Text,{style:{fontSize:12,color:P.textMuted,marginBottom:8},children:["Currently winning up to ",(0,s.jsx)(c.Text,{style:{color:P.heading??P.text,fontWeight:"700"},children:ht(o)}),` with ${e} picks`]}),(0,s.jsx)(ni,{tiers:U.map(e=>({count:e,payout20:F[e]??0})),selectedCount:void 0,onSelect:e=>{L(e),X()},colors:P,bodyFont:l.bodyFont,extraBetAmount:20!==n?n:void 0,columnLabel:_.tableColumnLabel,buttonLabel:_.tierButtonLabel})]})})():(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{fontSize:12,color:P.textMuted,flex:1},children:[1===q?"Add ":"Add up to ",(0,s.jsxs)(c.Text,{style:{color:P.primary,fontWeight:"700"},children:[q," more pick",1!==q?"s":""]})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:X,style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:P.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{fontSize:12,fontWeight:"600",color:P.buttonPrimaryText},children:"Add picks"})})]})})]})})}),i&&S?(0,s.jsx)(c.View,{style:{marginTop:12,alignItems:"flex-end"},children:(0,s.jsx)(c.Text,{style:[li.errorText,{color:P.error}],children:S})}):null]})},exports.ConfirmPageActions=function({onBack:e,onSubmitted:t,authenticated:n=!0,onUnauthenticated:o}){const r=xo(),{theme:i,selectedGame:l,expectedCorrect:a,betAmount:d,submitting:h,submitError:u,canSubmit:f,payouts:g,selectedPropositionIds:p,screenSize:y}=r,m=i.colors,{width:b}=(0,c.useWindowDimensions)(),w=b>=640;if(!l)return null;const x=g[a]??0,k=Ct(l),S=a===p.length,C=k?.enabled&&S,B=e&&"mobile"!==y;return(0,s.jsxs)(c.View,{style:li.footer,children:[B&&(0,s.jsx)(Fe,{theme:i,variant:"secondary",onPress:e,children:"Back"}),(0,s.jsxs)(c.View,{style:li.footerRight,children:[u?(0,s.jsx)(c.Text,{style:[li.errorText,{color:m.error}],children:u}):null,(x>0||C)&&w&&(0,s.jsxs)(c.View,{style:li.payoutInfo,children:[(0,s.jsx)(c.Text,{style:[li.payoutLabel,{color:m.textMuted}],children:"Potential winnings"}),(0,s.jsxs)(c.Text,{style:[li.payoutAmount,{color:m.heading??m.text}],children:[ht(x),C?(0,s.jsx)(c.Text,{style:{color:m.warning},children:" + Jackpot"}):null]})]}),(0,s.jsx)(Fe,{theme:i,variant:"primary",disabled:!f,onPress:async()=>{n?(await r.handleSubmit(),t?.()):o?.(ri(r))},children:n?h?"Placing…":`Place Entry (${ht(d)})`:"Log in to place entry"})]})]})},exports.ConfirmPageTitle=ii,exports.DOUBLE_SHOT_MIN_LEGS=6,exports.EXTRA_SHOT_MIN_LEGS=4,exports.EntriesPage=function({onSelectEntry:e,onBack:t,hideTitle:n,hideActions:o}){const{theme:r,apiUrl:i,apiKey:l,fetchImpl:a,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,renderTeamLogo:p,filterSport:y}=xo();return(0,s.jsxs)(c.View,{style:ui.container,children:[!n&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(hi,{onBack:t,hideActions:o})}),(0,s.jsx)(c.View,{style:ui.content,children:(0,s.jsx)(qo,{apiUrl:i,apiKey:l,fetchImpl:a,getAuthHeaders:d,userId:h,demoEntries:u,demoGames:f,demoPropositions:g,onSelectEntry:e,theme:r,renderTeamLogo:p,filterSport:y})})]})},exports.EntriesPageTitle=hi,exports.EntrySubmission=jo,exports.EventFilterBanner=Jo,exports.EventPickerPage=qr,exports.FilterChipCarousel=Ke,exports.FilterChipRow=qe,exports.GAME_TIER_LEVEL=kn,exports.GAME_TIER_TABS=Sn,exports.GameEntries=qo,exports.GameLogo=Er,exports.GamePage=function({onSelectGame:e,onGameSetup:t,onRuleSetup:n,onGameSetBet:o,onPickYourDividend:r,onLadder:i,onMirror:l,onSafetyNet:d,onQuickPick:h,onCancel:u,hideTitle:f,hideActions:g,showPerfectPickSetup:p=!1,showTierFilter:y=!1}){const m=xo(),{theme:b,games:w,loading:x,error:k,selectedGame:S,selectedPropositionCount:C,handlePropositionCountChange:B,maxPayouts:z}=m;b.colors;const F=a.default.useRef(S);F.current=S;const{width:v}=(0,c.useWindowDimensions)(),W=v>=640;return(0,s.jsxs)(c.View,{style:Br.container,children:[!f&&(0,s.jsx)(c.View,{style:{marginBottom:W?24:16},children:(0,s.jsx)(Cr,{onBack:u,hideActions:g})}),(0,s.jsx)(Jo,{}),(0,s.jsx)(c.View,{style:Br.content,children:(0,s.jsx)(io,{games:w,selectedGame:S,onSelectGame:e=>{F.current=e,m.selectGame(e)},loading:x,error:k,theme:b,showTierFilter:y,selectedPropositionCount:C,onPropositionCountChange:B,onPropositionCountSelected:()=>{const a=F.current;if("rule_setup"===wr(a)&&kr(a)&&!p)return m.goToSportSelection(),void e?.();const c=wr(a);if("quick_pick"===c||"selections"===c)return m.goToSportSelection(),void e?.();t?t(c):({game_set:o,pick_your_dividend:r,ladder:i,mirror:l,safety_net:d,rule_setup:n}[c]??n)?.()},onQuickPickGame:(e,t)=>{m.quickPickGame(e,t),h?.()},maxPayouts:z})})]})},exports.GamePageActions=function({onCancel:e,onSelectGame:t}){const{theme:n,screenSize:o}=xo(),r=n.colors;return e&&"mobile"!==o?(0,s.jsx)(c.View,{style:[Br.footer],children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Br.secondaryBtn,{backgroundColor:r.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Br.secondaryBtnText,{color:r.buttonSecondaryText}],children:"Cancel"})})}):null},exports.GamePageTitle=Cr,exports.GameSelector=io,exports.GameSetBetPage=Pi,exports.GameSetBetPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors,{width:l}=(0,c.useWindowDimensions)(),a=l<640;return(0,s.jsxs)(c.View,{style:[Hi.header,a&&Hi.headerCompact],children:[(0,s.jsx)(c.Text,{style:[Hi.sectionTitle,a&&Hi.sectionTitleCompact,{color:i.primary,fontFamily:r}],children:"The fastest multi"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.GameSetupPage=function({onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:r="Games"}){const{theme:i,selectedGame:l,goToSportSelection:a,bodyFont:d}=xo(),h={onPickYourOwn:e,onQuickPick:t,onBack:n,hideTitle:o,backLabel:r};switch(wr(l)){case"game_set":return(0,s.jsx)(Pi,{...h});case"pick_your_dividend":return(0,s.jsx)(Oi,{...h});case"ladder":return(0,s.jsx)(Ei,{...h});case"mirror":return(0,s.jsx)(Gi,{...h});case"safety_net":return(0,s.jsx)(Vi,{...h});case"rule_setup":return"exact"===Yn(l)?.kind?(0,s.jsx)(Zi,{...h}):(0,s.jsx)(Ci,{onBack:n,hideTitle:o,backLabel:r,onContinue:()=>{a(),e?.()}});default:return(0,s.jsx)(c.View,{children:(0,s.jsx)(c.Text,{style:{color:i.colors.textMuted,fontFamily:d},children:"No setup required — this game goes straight to picks."})})}},exports.HowToPlayButton=Ee,exports.HowToPlayPanel=De,exports.LADDER_FAMILY=cr,exports.LADDER_REFERENCE_BET=50,exports.LADDER_STAKES=ar,exports.LadderPage=Ei,exports.LadderPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors;return(0,s.jsxs)(c.View,{style:ji.titleWrap,children:[(0,s.jsx)(c.Text,{style:[ji.eyebrow,{color:i.primary,fontFamily:r}],children:"Every step pays"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.LockIcon=Ye,exports.MIRROR_STANDARD_MARGIN=.21875,exports.MirrorPage=Gi,exports.MirrorPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Yi.header,children:[(0,s.jsx)(c.Text,{style:[Yi.eyebrow,{color:i.primary,fontFamily:r}],children:"All right, or all wrong"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PYD_LEG_RUNGS=Zn,exports.PYD_RETAIL_DIVIDENDS=Un,exports.PayoutCircles=function({game:e,totalSelections:t,expectedCorrect:n,onExpectedCorrectChange:o,theme:r=E,colorWinning:i,colorNone:l,winningCounts:h,payouts:u}){const f=r.colors,{width:g}=(0,c.useWindowDimensions)(),p=g>=640,y=i??f.payoutWinning,m=l??f.payoutNone,b=Ct(e),w=p?48:40,[x,k]=(0,a.useState)({width:0,height:0});return(0,s.jsxs)(c.View,{style:Vo.container,children:[(0,s.jsx)(c.Text,{style:[Vo.title,{color:f.textMuted}],children:"Payout Visualization"}),b.enabled&&(0,s.jsxs)(c.View,{style:[Vo.jackpotBanner,{borderColor:`${f.warning}30`}],onLayout:e=>k({width:e.nativeEvent.layout.width,height:e.nativeEvent.layout.height}),children:[x.width>0&&(0,s.jsxs)(d.default,{style:c.StyleSheet.absoluteFill,width:x.width,height:x.height,pointerEvents:"none",children:[(0,s.jsx)(d.Defs,{children:(0,s.jsxs)(d.LinearGradient,{id:"payout-jackpot-grad",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,s.jsx)(d.Stop,{offset:"0%",stopColor:f.warning,stopOpacity:.094}),(0,s.jsx)(d.Stop,{offset:"100%",stopColor:f.warning,stopOpacity:.031})]})}),(0,s.jsx)(d.Rect,{x:0,y:0,width:x.width,height:x.height,fill:"url(#payout-jackpot-grad)"})]}),(0,s.jsx)(d.default,{width:16,height:16,viewBox:"0 0 24 24",style:{flexShrink:0},children:(0,s.jsx)(d.Path,{d:Go,fill:f.warning})}),(0,s.jsx)(c.Text,{style:[Vo.jackpotText,{color:f.warning}],children:b.progressive?b.amount>0?`Progressive Jackpot: ${ht(b.amount)}${b.limit>0?` (up to ${ht(b.limit)})`:""} for a perfect pick!`:b.limit>0?`Progressive Jackpot — up to ${ht(b.limit)} for a perfect pick!`:"Progressive Jackpot for a perfect pick!":`Jackpot: ${ht(b.amount)} for a perfect pick!`})]}),(0,s.jsx)(c.View,{style:[Vo.circleGrid,{gap:p?8:6}],children:Array.from({length:t+1},(e,r)=>{const i=h.includes(r),l=u[r]??0,a=r===t,c=b.enabled&&a,d=c?f.warning:i?y:m,g=r===n,x=c?b.progressive?`${r} correct wins progressive jackpot${b.amount>0?` (currently ${ht(b.amount)})`:""}${b.limit>0?` up to ${ht(b.limit)}`:""} plus ${ht(l)}`:`${r} correct wins jackpot ${ht(b.amount)} plus ${ht(l)}`:i?`${r} correct wins ${ht(l)}`:l>0?`${r} correct pays ${ht(l)} but does not win`:`${r} correct — no payout`,k=o?`${x}. Tap to select`:x;return(0,s.jsx)(Yo,{index:r,size:w,wide:p,isWinning:i,isJackpot:c,isSelected:g,bgColor:d,borderFallback:f.border,warning:f.warning,primary:f.primary,textMuted:f.textMuted,payout:l,onPress:o?()=>o(r):void 0,accessibilityLabel:k},r)})}),(0,s.jsxs)(c.Text,{style:[Vo.expectedText,{color:f.textMuted}],children:["Your expected: ",(0,s.jsxs)(c.Text,{style:Vo.expectedBold,children:[n," correct"]})]})]})},exports.PerfectPickPage=Zi,exports.PerfectPickPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Ki.header,children:[(0,s.jsx)(c.Text,{style:[Ki.eyebrow,{color:i.primary,fontFamily:r}],children:"All or nothing"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PickYourDividendPage=Oi,exports.PickYourDividendPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors;return(0,s.jsxs)(c.View,{style:Ii.titleWrap,children:[(0,s.jsx)(c.Text,{style:[Ii.eyebrow,Ii.eyebrowLeft,{color:i.primary,fontFamily:r}],children:"The dividend is set"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.PlaceEntryProvider=function({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,getUserBalance:i,children:l,theme:c,colorScheme:d,demoGames:h,demoPropositions:u,demoEntries:f,demoMaxPayouts:g,gameCategory:p,jurisdiction:y,initialGameId:m,filterSport:b,initialSport:w,initialEventId:x,initialEventLabel:k,sportBaseKey:S,disableQuickPick:C=!1,renderTeamLogo:B,onEntryPlaced:z,onBeforeSubmit:F,onCancel:v,onShare:W,onRecharge:T,onClearEventFilter:A,screenSize:R="desktop",howToPlayMarkdown:L,sportDisplayNames:D,categoryDisplayNames:M}){const P=_(c,d),H=ae(P),O=ce(P),I=!(!h||!u),E=(0,a.useMemo)(()=>new co({apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o}),[e,t,n,o]),[j,N]=(0,a.useState)(0),G=(0,a.useRef)(0),[Y,V]=(0,a.useState)(0),[U,Z]=(0,a.useState)([]),[K,q]=(0,a.useState)({}),[X,Q]=(0,a.useState)({}),[J,$]=(0,a.useState)(void 0),[ee,te]=(0,a.useState)(null),[ne,oe]=(0,a.useState)(void 0),re=a.default.useCallback(async()=>{if(i)try{const e=await i();"number"==typeof e&&Number.isFinite(e)&&oe(e)}catch(e){}},[i]);(0,a.useEffect)(()=>{i?re():oe(void 0)},[i,re]);const ie=(0,a.useRef)(null),[le,se]=(0,a.useState)(null),[de,he]=(0,a.useState)(w??null),[ue,fe]=(0,a.useState)(x??null);(0,a.useEffect)(()=>{w&&he(w)},[w]),(0,a.useEffect)(()=>{fe(x??null)},[x]);const[ge,pe]=(0,a.useState)(x),ye=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!x)return pe(void 0),void(ye.current=!1);ye.current||pe(x)},[x]);const me=p??le??void 0,be=b??w??void 0,we=vt(de??be,S),xe=vt(be,S)??be,ke=de??void 0,{games:Se,howToPlayMarkdown:Ce,loading:Be,error:ze}=so(E,{category:me,jurisdiction:y,sport:we},{skip:I}),{propositions:Fe,loading:ve,error:We}=ho(E,{category:me,sport:xe,event_id:ge},{skip:I}),{sports:Te,loading:Ae}=uo(E,{skip:I}),{createEntry:Re,loading:Le,error:De}=po(E),{preview:Me}=mo(E),Pe=(0,a.useMemo)(()=>Pt((I?h:Se)??[],{category:me,sport:we??ke,sportBaseKey:S}),[I,h,Se,me,we,ke,S]),He=L??Ce??null,{maxPayouts:Oe,refetchGame:Ie}=go(E,Pe??[],{skip:I,betAmount:20}),Ee=I?g??wo:Oe,je=I?u:Fe,Ne=b?(je??[]).filter(e=>e.sport===b):je,Ge=(0,a.useMemo)(()=>wt(Ne??[]),[Ne]),Ye=(0,a.useMemo)(()=>me||(1===Ge.length?Ge[0]:void 0),[me,Ge]),Ve=(0,a.useMemo)(()=>{const e=Ne??[];return Ye?Rt(e,{category:Ye,sportBaseKey:S}):e},[Ne,Ye,S]),Ue=(0,a.useMemo)(()=>ke?Rt(Ve,{sport:ke,sportBaseKey:S}):Ve,[Ve,ke,S]),Ze=(0,a.useMemo)(()=>({category:Ye,sport:ke,sportBaseKey:S}),[Ye,ke,S]),Ke=(0,a.useMemo)(()=>{const e=(Pe??[]).filter(e=>e.active);if(!Ye&&Ge.length>1)return[];const t=Ye?Pt(e,Ze):e;return Ye||ke?function(e,t,n){return n?.category||n?.sport?e.filter(e=>Mt(e,t,n)):e}(t,Ue,Ze):t},[Pe,Ue,Ze,Ye,ke,Ge.length]),{step:qe,selectedGame:Xe,selections:Qe,placedEntry:Je,setGameOnly:$e,clearSelectedGame:_e,goToSportSelection:et,goToConfirmation:tt,goToSuccess:nt,goBack:ot,reset:rt,toggleSelection:it}=yo(m),lt=a.default.useCallback(()=>{ye.current=!0,pe(void 0),rt(),A?.()},[rt,A]),at=!!ge,ct=at?k:void 0,st=!I&&(Xe?Be||ve||Ae:Be),dt=I?null:Xe?ze||We:ze,ht=(0,a.useMemo)(()=>Xe?Ht(Ue,Xe,S):Ue,[Xe,Ue,S]),ut=(0,a.useMemo)(()=>Xe?ht:Ve,[Xe,ht,Ve]),ft=(0,a.useMemo)(()=>Rt(Xe?ht:Ve,{category:Ye}),[Xe,ht,Ve,Ye]),pt=(0,a.useMemo)(()=>{const e=new Set(ft.map(e=>e.sport).filter(Boolean));return Te.filter(t=>e.has(t.key))},[Te,ft]),mt=(0,a.useMemo)(()=>Rt(ht,{category:Ye,sport:de}),[ht,Ye,de]),bt=(0,a.useMemo)(()=>{if(!Xe||!un(Xe))return[];const{min:e}=St(Xe,J),t=J??e;return gn(mt).filter(e=>e.propositionCount>=t)},[Xe,J,mt]),xt=(0,a.useMemo)(()=>un(Xe)?wn(mt,ue):mt,[Xe,mt,ue]),Ct=Object.keys(Qe).map(Number),Bt=Ct.length,Tt=(0,a.useMemo)(()=>mt.filter(e=>Ct.includes(e.id)),[mt,Ct]);(0,a.useEffect)(()=>{p||le||1===Ge.length&&se(Ge[0])},[p,le,Ge]),(0,a.useEffect)(()=>{if(!Xe)return;const e=ht,t=new Set(e.map(yt));let n=le;n&&t.has(n)||(n=1===t.size?Array.from(t)[0]:null,n!==le&&se(n));const o=n?e.filter(e=>yt(e)===n):e,r=new Set(function(e){const t=new Set;for(const n of e){const o=gt(n,e);"Other"!==o&&t.add(o)}return[...t]}(o)),i=Xe.allowed_sports;he(e=>e&&r.has(e)?e:1===i?.length&&r.has(i[0])?i[0]:i&&i.length>1?e&&i.includes(e)&&r.has(e)?e:null:1===r.size?Array.from(r)[0]:null)},[Xe?.id,ht,le]),(0,a.useEffect)(()=>{Xe&&Ye&&(Lt(Xe,Ye)||_e())},[Xe,Ye,_e]),(0,a.useEffect)(()=>{Xe&&(Mt(Xe,Ue,{category:Ye,sport:de,sportBaseKey:S})||_e())},[Xe,Ye,de,S,Ue,_e]),(0,a.useEffect)(()=>{if(Xe){if(V(0),ie.current){const{count:e}=ie.current;return ie.current=null,$(e),void N(e)}if(Xe.allowed_propositions&&Xe.allowed_propositions.length>0){const e=J;null!=e&&Xe.allowed_propositions.includes(e)?N(e):($(void 0),N(0))}else $(void 0),N(Xe.num_propositions||Xe.max_propositions||0)}},[Xe]);const At=(e,t,n)=>{const o=(Ee[e]?.top_payouts??[]).find(e=>e.proposition_count===t);if(!o)return 0;const r=o.bet_amount&&o.bet_amount>0?o.bet_amount:20;return r<=0?0:o.net_payout/r*n};(0,a.useEffect)(()=>{if("sport"!==qe&&"confirm"!==qe||!Xe||I)return;const e=un(Xe)&&ue?xt.length:Number.MAX_SAFE_INTEGER;let t;if(Xe.allowed_propositions&&Xe.allowed_propositions.length>0){const n=Xe.allowed_propositions?[...Xe.allowed_propositions].filter(t=>t<=e).sort((e,t)=>e-t):[];if(0===n.length)return void Q({});const o=J??n[0],r=n.filter(e=>e>o);if(0===r.length)return void Q({});t=[o,...r]}else{const{min:n,max:o}=St(Xe),r=Math.min(o,e);if(n<=0||r<=n)return void Q({});t=Array.from({length:r-n+1},(e,t)=>n+t)}const n={};for(const o of t)n[o]=At(Xe.id,o,20);Q(n)},[qe,Xe,J,ue,xt.length,I,Ee]),(0,a.useEffect)(()=>{if("confirm"!==qe||!Xe)return;const e=Ct.length;if(0===e)return;let t=!1;const n={};for(let r=0;r<=e;r++)n[r]=At(Xe.id,r,Y);q(n),e!==G.current?(G.current=e,N(e)):(j>e||j<=0&&e>0)&&N(e);const o=Y>0?Y:Math.max(Xe.min_bet??20,.01);return(async()=>{try{const n=await Me(Xe.id,{actual:j,predicted:j,total:e,bet_amount:o});if(t)return;Z(n.winning_counts)}catch{t||Z([])}})(),()=>{t=!0}},[qe,Xe,Ct.length,j,Y,Me,Ee]);const Dt=(0,a.useMemo)(()=>{return t=ee,(e=Xe)&&null!=t?e.permitted_rules?.find(e=>e.id===t)??null:null;var e,t},[Xe,ee]),Ot=!un(Xe)||xn(Tt,ue),It=Xe?St(Xe,void 0,Dt):null,Et=!(!Xe||!Ot)&&(Xe.allowed_propositions&&Xe.allowed_propositions.length>0?null!=J&&Bt===J&&kt(Bt,It?.min,It?.max):kt(Bt,It?.min,It?.max)),jt=Xe?.min_bet??0,Nt=Math.max(jt,.01),Gt=null==ne||Y<=ne,Yt=!Le&&Y>=Nt&&Et&&Gt,Vt=e=>{$(e),N(e);for(const t of Object.keys(Qe))it(Number(t),Qe[Number(t)])},Ut=e=>{$(e),N(e)},Zt=e=>{fe(un(e)?x??null:null),$e(e)},Kt=e=>{if(e!==ue){for(const e of Object.keys(Qe)){const t=Number(e);it(t,Qe[t])}fe(e)}},qt=(e,t)=>{ie.current={count:t},$e(e),Ie(e.id);const n=e.allowed_sports??[];let o=null;de&&n.some(e=>Wt(de,e,S))?o=de:1===n.length&&(o=n[0]),he(o);for(const a of Object.keys(Qe)){const e=Number(a);it(e,Qe[e])}let r=Rt(Ht(Ne??[],e,S),{category:Ye,sport:o,sportBaseKey:S});const i=Math.max(0,Math.min(t,r.length)),l=[...r].sort(()=>Math.random()-.5).slice(0,i);for(const a of l)it(a.id,Math.random()<.5?"yes":"no");tt()},Xt=async()=>{if(Xe&&Et){if(I){const e={id:Math.floor(1e4*Math.random()),game_id:Xe.id,user_id:r,proposition_ids:Ct,selections:Qe,pending:!0,expected_correct:j,bet_amount:Y};return z?.(e),nt(e),void re()}try{F&&await F(Y);const e=await Re({game_id:Xe.id,user_id:r,proposition_ids:Ct,selections:Qe,stake:Y,rule_id:Dt?.id??null});z?.(e),nt(e),re()}catch(e){}}},Qt=(0,a.useCallback)(e=>D?.[e]??pt.find(t=>t.key===e)?.label??zt(e,void 0,S),[D,pt,S]),Jt=(0,a.useCallback)(e=>Ft(e,M),[M]),$t=(0,a.useMemo)(()=>({theme:P,bodyFont:H,headingFont:O,games:Ke,propositions:xt,propositionsForCategoryPicker:ut,propositionsForSportPicker:ft,sportSummaries:pt,loading:st,error:dt,step:qe,selectedGame:Xe,selections:Qe,placedEntry:Je,selectedPropositionIds:Ct,selectedPropositions:Tt,selectionValid:Et,selectedRuleId:ee,setSelectedRuleId:te,selectedRule:Dt,answeredCount:Bt,betAmount:Y,setBetAmount:V,expectedCorrect:j,setExpectedCorrect:N,selectedPropositionCount:J,handlePropositionCountChange:Vt,upgradePropositionCount:Ut,winningCounts:U,payouts:K,overloadPayouts:X,submitting:Le,submitError:De,canSubmit:Yt,gamePrice:jt,userBalance:ne,hasSufficientBalance:Gt,refreshUserBalance:re,handleSubmit:Xt,selectGame:Zt,goToSportSelection:et,goToConfirmation:tt,goBack:ot,reset:rt,clearSelectedGame:_e,toggleSelection:it,quickPickGame:qt,selectedCategory:le,setSelectedCategory:se,selectedSport:de,setSelectedSport:he,selectedEventId:ue,sameGameMultiEvents:bt,selectSameGameMultiEvent:Kt,apiUrl:e,apiKey:t,fetchImpl:n,getAuthHeaders:o,userId:r,disableQuickPick:C,renderTeamLogo:B,filterSport:b,initialSport:w,initialEventId:x,sportBaseKey:S,gameCategory:p,eventFilterActive:at,eventFilterLabel:ct,clearEventFilter:lt,screenSize:R,displaySportName:Qt,displayCategoryName:Jt,maxPayouts:Ee??{},howToPlayMarkdown:He,onEntryPlaced:z,onCancel:v,onShare:W,onRecharge:T,demoEntries:f,demoGames:h,demoPropositions:u}),[P,H,O,Ke,xt,ut,ft,pt,st,dt,qe,Xe,Qe,Je,Ct,Tt,Et,Bt,Y,j,J,ee,Dt,U,K,X,Le,De,Yt,jt,e,t,r,ne,n,o,C,B,b,w,x,S,p,R,at,ct,lt,le,de,ue,bt,Ee,He,z,v,W,T,A,f,h,u,Vt,Qt,Jt]);return(0,s.jsx)(bo.Provider,{value:$t,children:l})},exports.QuickPickButton=ko,exports.RuleSetupPage=Ci,exports.RuleSetupPageActions=function({onContinue:e,canContinue:t,continueLabel:n="Continue"}){const{theme:o,screenSize:r}=xo(),i=o.colors;return e&&"mobile"!==r?(0,s.jsx)(c.View,{style:Bi.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,disabled:!t,accessibilityRole:"button",accessibilityState:{disabled:!t},style:[Bi.smallBtn,{backgroundColor:i.buttonPrimary,opacity:t?1:.45}],children:(0,s.jsx)(c.Text,{style:[Bi.smallBtnText,{color:i.buttonPrimaryText}],children:n})})}):null},exports.RuleSetupPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o,selectedPropositionCount:r}=xo(),i=ce(n),l=n.colors,a=Yn(o,r),{width:d}=(0,c.useWindowDimensions)(),h=d<640;return(0,s.jsxs)(c.View,{style:[Bi.header,h&&Bi.headerCompact],children:[(0,s.jsx)(c.Text,{accessibilityRole:"header",style:[Bi.sectionTitle,h&&Bi.sectionTitleCompact,{color:l.primary,fontFamily:i}],children:a?.title??"About this game"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?`${o.game_name}${a?.subtitle?` · ${a.subtitle}`:""}`:void 0})]})},exports.SafetyNetPage=Vi,exports.SafetyNetPageTitle=function({onBack:e,hideActions:t}={}){const{theme:n,selectedGame:o}=xo(),r=ce(n),i=n.colors,{width:l}=(0,c.useWindowDimensions)(),a=l<640;return(0,s.jsxs)(c.View,{style:[Ui.header,a&&Ui.headerCompact],children:[(0,s.jsx)(c.Text,{style:[Ui.sectionTitle,a&&Ui.sectionTitleCompact,{color:i.primary,fontFamily:r}],children:"Choose your safety net"}),(0,s.jsx)(tr,{onBack:e,hideActions:t,label:o?.game_name})]})},exports.SelectionReview=function({propositions:e,selections:t,onToggleSelection:n,onNext:o,onBack:r,theme:i,colorScheme:l,hideActions:h=!1,renderTeamLogo:u,allowAnswerToggle:f=!0,gameName:g,potentialPayout:p,defaultExpanded:y=!1,addMorePicks:m}){const b=_(i,l),w=b.colors,x=D(b),k=ce(b),S=B(b),C=w.textAlt??w.text,{width:z}=(0,c.useWindowDimensions)(),F=z>=640,v=function(e){return{shadowColor:"#000",shadowOpacity:"dark"===e.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2}}(b),[W,T]=(0,a.useState)(null),[A,R]=(0,a.useState)(y),L=e.filter(e=>e.id in t),H=L.length,O=jt(L),I=w.matchupHeader??M(b),E=P(b),j=F?16:12;return(0,s.jsxs)(c.View,{style:{gap:F?24:16,paddingBottom:64},children:[(0,s.jsxs)(c.View,{style:[Eo.section,{padding:F?24:16,backgroundColor:x,borderColor:w.border},v],children:[(0,s.jsxs)(c.TouchableOpacity,{onPress:()=>R(e=>!e),accessibilityRole:"button",accessibilityState:{expanded:A},style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:12},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8,flex:1,minWidth:0},children:[(0,s.jsx)(d.default,{width:18,height:18,viewBox:"0 0 24 24",style:{flexShrink:0,transform:[{rotate:A?"180deg":"0deg"}]},children:(0,s.jsx)(d.Path,{d:"m6 9 6 6 6-6",stroke:w.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",gap:8},children:[(0,s.jsx)(c.Text,{style:{fontSize:F?18:16,fontWeight:"600",color:S,fontFamily:k},children:"Your Selections"}),(0,s.jsx)(c.View,{style:{backgroundColor:w.primary,paddingHorizontal:6,paddingVertical:2,borderRadius:999},children:(0,s.jsx)(c.Text,{style:{color:w.primaryText,fontSize:12,fontWeight:"600"},children:H})})]}),g&&(0,s.jsx)(c.Text,{numberOfLines:1,style:{color:w.textMuted,fontSize:14,marginTop:2},children:g})]})]}),null!=p&&p>0&&(0,s.jsxs)(c.View,{style:{alignItems:"flex-end",flexShrink:0},children:[(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontSize:10,textTransform:"uppercase",letterSpacing:.25},children:"Potential Payout"}),(0,s.jsx)(c.Text,{style:{color:S,fontSize:14,fontWeight:"700"},children:ht(p)})]})]}),m&&m.remaining>0&&(0,s.jsxs)(c.View,{style:{marginTop:j,padding:12,borderRadius:8,borderWidth:1,borderColor:`${w.primary}30`,backgroundColor:`${w.primary}08`,flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,s.jsxs)(c.Text,{style:{flex:1,color:w.textMuted,fontSize:12},children:[1===m.remaining?"Add ":"Add up to ",(0,s.jsxs)(c.Text,{style:{color:w.primary,fontWeight:"700"},children:[m.remaining," more pick",1!==m.remaining?"s":""]}),null!=m.potentialPayout&&m.potentialPayout>0&&(0,s.jsxs)(c.Text,{children:[" ","to win up to"," ",(0,s.jsx)(c.Text,{style:{color:S,fontWeight:"700"},children:ht(m.potentialPayout)})," ","with ",m.max," picks"]})]}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>m.onAdd(),style:{flexShrink:0,paddingHorizontal:12,paddingVertical:6,borderRadius:8,backgroundColor:w.buttonPrimary},children:(0,s.jsx)(c.Text,{style:{color:w.buttonPrimaryText,fontSize:12,fontWeight:"600"},children:"Add picks"})})]}),A&&(0===L.length?(0,s.jsx)(c.View,{style:[Eo.emptyState,{marginTop:j}],children:(0,s.jsx)(c.Text,{style:{color:w.textMuted},children:"No selections made yet"})}):(0,s.jsx)(c.View,{style:{gap:F?12:8,marginTop:j},children:O.map(e=>(0,s.jsxs)(c.View,{style:{borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:w.border},children:[e.key?(0,s.jsxs)(c.View,{style:{paddingHorizontal:12,paddingVertical:8,backgroundColor:I},children:[(0,s.jsx)(Ro,{matchup:e.key,renderTeamLogo:u,altText:C,mutedColor:w.textAltMuted??w.textMuted??C}),e.props[0].commence_time?(0,s.jsx)(c.Text,{style:[Eo.propTime,{color:w.textAltMuted??w.textMuted}],children:ut(e.props[0].commence_time)}):null]}):null,e.props.map((o,i)=>{const l=t[o.id],a="yes"===l,h="no"===l;return(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:F?12:8,paddingHorizontal:12,paddingVertical:F?12:10,backgroundColor:E,borderTopWidth:e.key||i>0?1:0,borderTopColor:w.border},children:[(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0,flexDirection:"row",alignItems:"flex-start",gap:8},children:[vo(o,u,e.key),(0,s.jsx)(c.Text,{style:{flex:1,minWidth:0,color:C,fontSize:14,lineHeight:19},children:o.description})]}),(0,s.jsxs)(c.View,{style:Eo.rightControls,children:[f?(0,s.jsx)(Ho,{theme:b,value:a?"yes":h?"no":null,onYes:()=>n(o.id,"yes"),onNo:()=>n(o.id,"no")}):l&&(0,s.jsx)(Oo,{theme:b,value:"yes"===l?"yes":"no"}),(0,s.jsx)(c.TouchableOpacity,{onPress:()=>{n(o.id,t[o.id]),r()},accessibilityLabel:"Remove selection",...ze(()=>T(o.id),()=>T(e=>e===o.id?null:e)),style:[Eo.removeButton,{backgroundColor:"transparent"}],children:(0,s.jsx)(d.default,{width:12,height:12,viewBox:"0 0 24 24",children:(0,s.jsx)(d.Path,{d:"M6 18L18 6M6 6l12 12",stroke:W===o.id?w.error:w.textAltMuted??w.textMuted,strokeWidth:2.5,strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})})]})]},o.id)})]},e.key??`solo-${e.props[0].id}`))}))]}),(0,s.jsx)(c.View,{style:[Eo.section,{padding:F?24:16,backgroundColor:x,borderColor:w.border},v],children:(0,s.jsxs)(c.View,{style:Eo.summaryRow,children:[(0,s.jsx)(c.Text,{style:{color:w.textMuted,fontSize:14},children:"Total Selections"}),(0,s.jsx)(c.Text,{style:{color:w.text,fontSize:14,fontWeight:"600"},children:L.length})]})}),!h&&(0,s.jsxs)(c.View,{style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,borderTopWidth:1,borderTopColor:w.border,backgroundColor:w.background,marginHorizontal:F?-24:-16,paddingHorizontal:F?24:16,paddingVertical:F?16:12},children:[(0,s.jsx)(Io,{theme:b,variant:"secondary",onPress:r,children:"Back"}),(0,s.jsx)(Io,{theme:b,variant:"primary",disabled:0===L.length,onPress:o,children:"Place bet"})]})]})},exports.SelectionsPage=function({onNext:e,onBack:t,hideTitle:n,hideActions:o,defaultView:r="list",view:i,onViewChange:l,hideViewSwitch:d,onSwipeDragStateChange:h}){const u=xo(),{selectedRule:f}=u,{theme:g,selectedGame:p,propositions:y,propositionsForSportPicker:m,selections:b,toggleSelection:w,loading:x,error:k,disableQuickPick:S,renderTeamLogo:C,filterSport:B,initialSport:z,gameCategory:F,selectedPropositionCount:v,handlePropositionCountChange:W,goToConfirmation:T,goBack:A,selectedCategory:R,setSelectedCategory:L,selectedSport:D,setSelectedSport:M,selectedEventId:P,propositionsForCategoryPicker:H,answeredCount:O}=u,[I,E]=a.default.useState(r),j=i??I,N=a.default.useCallback(e=>{void 0===i&&E(e),l?.(e)},[i,l]);a.default.useEffect(()=>{p||(u.goToSportSelection(),t?.())},[p,u,t]);const G=a.default.useMemo(()=>{if(!p)return null;const{min:e,max:t}=St(p,v??void 0,f);if(e>0&&e===t)return e;const n=wr(p);return null!=v&&v>0&&("game_set"===n||"pick_your_dividend"===n||"safety_net"===n||xr(p))?v:null},[p,v]),Y=a.default.useRef(O);a.default.useEffect(()=>{const t=Y.current;Y.current=O,null!=G&&t<G&&O===G&&(T(),e?.())},[O,G]);const V=a.default.useMemo(()=>wt(H??[]),[H]);a.default.useEffect(()=>{p&&1===V.length&&R!==V[0]&&L(V[0])},[p,V,R,L]);const U=a.default.useMemo(()=>{const e=new Set;for(const t of m??[])t.sport&&e.add(t.sport);return Array.from(e)},[m]);if(a.default.useEffect(()=>{p&&(V.length>1&&!R||1===U.length&&D!==U[0]&&M(U[0]))},[p,V,R,U,D,M]),!p)return null;const Z=V.length>1&&!R,K=!Z&&U.length>1&&!D,q=!Z&&!K&&un(p)&&!P,X=(()=>{if(!un(p)||!P)return p;const e=Math.min(p.max_propositions??y.length,y.length);return{...p,max_propositions:e,allowed_propositions:p.allowed_propositions?.filter(t=>t<=e)}})(),Q=()=>{A(),t?.()};return(0,s.jsxs)(c.View,{style:ti.container,children:[!n&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(Jr,{onBack:o?Q:void 0,onNext:o?e:void 0,hideActions:o})}),!un(p)&&(0,s.jsx)(Jo,{}),(0,s.jsx)(c.View,{style:ti.content,children:Z?(0,s.jsx)(Vr,{hideTitle:!0,hideActions:!0,onSelectCategory:e=>L(e)}):K?(0,s.jsx)(Nr,{hideTitle:!0,hideActions:!0,onSelectSport:e=>M(e)}):q?(0,s.jsx)(qr,{}):"swipe"===j?(0,s.jsx)(Or,{onBack:Q,onNext:e,viewSwitch:d?void 0:(0,s.jsx)(_r,{view:j,onChange:N}),onDragStateChange:h}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Mo,{game:X,propositions:y,selections:b,onToggleSelection:w,onNext:()=>{T(),e?.()},onBack:Q,loading:x,error:k,theme:g,hideActions:!0,initialSport:B??z,renderTeamLogo:C,disableQuickPick:!0,selectedPropositionCount:v,onPropositionCountChange:W,gameCategory:F,headerExtra:d?void 0:(0,s.jsx)(_r,{view:j,onChange:N})})})}),!o&&!Z&&!K&&!q&&(0,s.jsx)(c.View,{style:{marginTop:24},children:(0,s.jsx)($r,{onNext:e,onBack:t})})]})},exports.SelectionsPageActions=$r,exports.SelectionsPageTitle=Jr,exports.SportPickerPage=Nr,exports.SportPickerPageActions=function({onCancel:e}){const{theme:t,screenSize:n}=xo(),o=t.colors;return e&&"mobile"!==n?(0,s.jsx)(c.View,{style:Gr.footer,children:(0,s.jsx)(c.TouchableOpacity,{onPress:e,style:[Gr.secondaryBtn,{backgroundColor:o.buttonSecondary}],children:(0,s.jsx)(c.Text,{style:[Gr.secondaryBtnText,{color:o.buttonSecondaryText}],children:"Cancel"})})}):null},exports.SportPickerPageTitle=jr,exports.SuccessPage=function({onPlayAgain:e,onDone:t,onBack:n,onShare:o,hideTitle:r,hideActions:i}){const l=xo(),{theme:d,bodyFont:h,headingFont:u,selectedGame:f,placedEntry:g,betAmount:p,selectedPropositionIds:y,selectedPropositions:m,selections:b,payouts:w,onShare:x}=l,k=d.colors,S=D(d),C=k.textAlt??k.text,{width:z}=(0,c.useWindowDimensions)(),F=z>=640,v={shadowColor:"#000",shadowOpacity:"dark"===d.colorScheme?.4:.12,shadowRadius:12,shadowOffset:{width:0,height:6},elevation:2},W=g?.proposition_ids?g.proposition_ids.length:y.length,T=w[W]??null,A=a.default.useRef(!1);return a.default.useEffect(()=>{g&&f?A.current=!1:(l.goToSportSelection(),A.current||(A.current=!0,e?e():t?.()))},[g,f,l,e,t]),g?(0,s.jsxs)(c.View,{style:di.container,children:[!r&&(0,s.jsx)(c.View,{style:{marginBottom:24},children:(0,s.jsx)(si,{onBack:n,hideActions:i})}),(0,s.jsxs)(c.View,{style:[di.content,{gap:F?16:12}],children:[(0,s.jsxs)(c.View,{style:[di.summaryCard,F&&di.summaryCardWide,{backgroundColor:S,borderColor:k.border},v],children:[(0,s.jsxs)(c.View,{style:di.summaryHeader,children:[(()=>{const e=f?f.allowed_propositions&&f.allowed_propositions.length>0&&f.game_name.replace(/\s+\d+\s*$/,"").trim()||f.game_name:"Entry summary";return f?(0,s.jsx)(c.View,{style:{flex:1,minWidth:0},children:(0,s.jsx)(Uo,{iconUrl:ge(f),gameName:e,height:18,chipColor:k.primary,textColor:k.text,iconColor:k.primaryText,accentColor:d.brand?.accent})}):(0,s.jsx)(c.Text,{numberOfLines:1,style:[di.summaryHeading,F&&di.summaryHeadingWide,{color:B(d),fontFamily:u,flex:1}],children:e})})(),(0,s.jsx)(c.View,{style:{backgroundColor:`${k.primary}15`,borderRadius:999,paddingHorizontal:8,paddingVertical:2,flexShrink:0},children:(0,s.jsxs)(c.Text,{style:{color:k.primary,fontSize:12,fontWeight:"600",fontFamily:h},children:[W," pick",1!==W?"s":""]})})]}),(0,s.jsxs)(c.View,{style:di.statsGrid,children:[(0,s.jsxs)(c.View,{style:[di.statCell,F&&di.statCellWide],children:[(0,s.jsx)(c.Text,{style:[di.statLabel,{color:k.textMuted,fontFamily:h}],children:"Selections"}),(0,s.jsx)(c.Text,{style:[di.statValue,{color:C,fontFamily:h}],children:W})]}),p>0&&(0,s.jsxs)(c.View,{style:[di.statCell,F&&di.statCellWide],children:[(0,s.jsx)(c.Text,{style:[di.statLabel,{color:k.textMuted,fontFamily:h}],children:"Wager"}),(0,s.jsx)(c.Text,{style:[di.statValue,{color:C,fontFamily:h}],children:ht(p)})]}),null!=T&&T>0&&(0,s.jsxs)(c.View,{style:[di.statCell,F&&di.statCellWide],children:[(0,s.jsx)(c.Text,{style:[di.statLabel,{color:k.textMuted,fontFamily:h}],children:"Potential win"}),(0,s.jsx)(c.Text,{style:[di.statValue,{color:k.heading??k.text,fontWeight:"700",fontFamily:h}],children:ht(T)})]})]})]}),m.length>0&&(0,s.jsxs)(c.View,{style:[di.summaryCard,F&&di.summaryCardWide,{backgroundColor:S,borderColor:k.border},v],children:[(0,s.jsx)(c.Text,{style:[di.summaryHeading,F&&di.summaryHeadingWide,{color:B(d),fontFamily:u,marginBottom:8}],children:"Your picks"}),(0,s.jsx)(c.View,{style:di.pickList,children:m.map((e,t)=>{const n=b?.[e.id],o="yes"===n;return(0,s.jsxs)(c.View,{style:[di.pickRow,{backgroundColor:k.backgroundAlt}],children:[(0,s.jsx)(c.View,{style:{width:20,height:20,borderRadius:10,backgroundColor:k.primary,alignItems:"center",justifyContent:"center",flexShrink:0},children:(0,s.jsx)(c.Text,{style:{color:k.primaryText,fontSize:10,fontWeight:"700",fontFamily:h},children:t+1})}),(0,s.jsxs)(c.View,{style:{flex:1,minWidth:0},children:[(0,s.jsxs)(c.Text,{numberOfLines:1,style:{color:C,fontSize:F?14:12,fontWeight:"500",fontFamily:h},children:[mt(e)?null:(0,s.jsxs)(s.Fragment,{children:[e.home_team," ",(0,s.jsx)(c.Text,{style:{color:k.textMuted},children:"vs"})," "]}),e.away_team]}),(0,s.jsx)(c.Text,{numberOfLines:1,style:{color:k.textMuted,fontSize:11,fontFamily:h},children:e.description})]}),null!=n&&(0,s.jsx)(ci,{theme:d,value:o?"yes":"no"})]},e.id)})})]})]})]}):null},exports.SuccessPageActions=function({onPlayAgain:e,onDone:t,onShare:n}){const{theme:o,reset:r,placedEntry:i,selectedGame:l,selectedPropositions:a,selections:d,betAmount:h}=xo();return o.colors,(0,s.jsxs)(c.View,{style:di.footer,children:[(0,s.jsx)(Fe,{theme:o,variant:"secondary",onPress:()=>{r(),e?.()},children:"Place Another"}),t&&(0,s.jsx)(Fe,{theme:o,variant:"primary",onPress:t,children:"Done"})]})},exports.SuccessPageTitle=si,exports.SwipeCard=Pr,exports.SwipeCardFace=Hr,exports.SwipeDeck=Or,exports.VISIBLE_DEPTH=3,exports.YesNoCategoryLabel=Ue,exports.availableGameTierTabs=zn,exports.contrastTextColour=function(e,t="#ffffff",n="#1a1a1a"){if(!e)return n;const o=function(e){const t=e.trim().toLowerCase(),n=t.match(/^#([0-9a-f]{3,8})$/);if(n){let e=n[1];return 3!==e.length&&4!==e.length||(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}const o=t.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);return o?[Number(o[1]),Number(o[2]),Number(o[3])]:null}(e);if(!o)return n;const[r,i,l]=o.map(e=>{const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)});return.2126*r+.7152*i+.0722*l>.4?n:t},exports.darkTheme=N,exports.defaultGameTierId=Fn,exports.defaultTheme=E,exports.defaultThemeSet=K,exports.filterGamesByTierLevel=Bn,exports.filterPropositionsToEvent=wn,exports.formatCurrency=ht,exports.formatDate=ut,exports.formatSameGameMultiEventLabel=dn,exports.fullStackPrize=ur,exports.gameNeedsRuleSetup=Vn,exports.gameSetPrize=ir,exports.getConfirmBoostCopy=Sr,exports.getGameFlow=wr,exports.getGameSetBetConfig=lr,exports.getJackpotInfo=Ct,exports.getLadderConfig=fr,exports.getMirrorConfig=br,exports.getPickYourDividendConfig=Jn,exports.getPropositionEventId=fn,exports.getRuleSetupConfig=Yn,exports.getSafetyNetConfig=En,exports.getSafetyNetPricing=An,exports.getSportDisplayName=Bt,exports.getTheme=function(e){return{default:E,green:j,"green-light":Y,dark:N,gold:G,"gold-light":V,yesno:Z,"yesno-light":U}[e]||E},exports.getThemeSet=function(e){return{default:K,green:q,gold:X,yesno:Q}[e]||K},exports.goldLightTheme=V,exports.goldTheme=G,exports.goldThemeSet=X,exports.greenLightTheme=Y,exports.greenTheme=j,exports.greenThemeSet=q,exports.groupPropositionsBySport=ft,exports.groupSameGameMultiEvents=gn,exports.isFixedCardExactGame=xr,exports.isGameSetBetGame=rr,exports.isLadderGame=sr,exports.isMirrorGame=yr,exports.isOpenExactMultiGame=kr,exports.isPickYourDividendGame=Kn,exports.isSafetyNetGame=Tn,exports.isSameGameMultiGame=un,exports.isSelectableSameGameMultiProposition=bn,exports.isThemeSet=I,exports.isValidSelectionCount=kt,exports.ladderCollectAt=function(e,t,n){return dr(e.tiers50.reduce((e,[n,o])=>n<=t?e+o:e,0),n)},exports.ladderTiers=hr,exports.mirrorPrize=mr,exports.propositionsBelongToEvent=xn,exports.pydLadder=Qn,exports.pydRung=Xn,exports.resolveCategoryDisplayName=Ft,exports.resolveGameTierLevel=Cn,exports.resolvePrice=function(e){return"object"==typeof e&&null!==e?Number(e.amount)||0:Number(e)||0},exports.resolveSportDisplayName=zt,exports.resolveTheme=O,exports.roundDividendAmount=Rn,exports.safetyNetCollect=Mn,exports.safetyNetTicket=Dn,exports.themeAccent=T,exports.themeBodyFont=ae,exports.themeHeading=B,exports.themeHeadingFont=ce,exports.themeLabel=z,exports.themeSets=$,exports.themeTextAlt=R,exports.themeTextAltMuted=L,exports.themeValue=F,exports.themes=J,exports.useCalculatePayout=function(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{calculate:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.calculatePayout(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to calculate payout";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}},exports.useCreateGameEntry=po,exports.useEntryPreview=mo,exports.useEvaluateRule=function(e){const[t,n]=(0,a.useState)(!1),[o,r]=(0,a.useState)(null),[i,l]=(0,a.useState)(null);return{evaluate:(0,a.useCallback)(async(t,o)=>{try{n(!0),r(null);const i=await e.evaluateRule(t,o);return l(i),i}catch(i){const e=i instanceof Error?i.message:"Failed to evaluate rule";throw r(e),new Error(e)}finally{n(!1)}},[e]),loading:t,error:o,result:i}},exports.useGameEntries=fo,exports.useGameMaxPayouts=go,exports.useGames=so,exports.usePlaceEntry=xo,exports.usePlaceEntryFlow=yo,exports.usePropositions=ho,exports.useResolvedTheme=_,exports.useSports=uo,exports.useSwipeDeck=Fr;