sy-ui-lib 1.0.30 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -63,5 +63,5 @@ React keys must be passed directly to JSX without using spread:
63
63
  ${o?"cursor-not-allowed":"cursor-pointer"}
64
64
  `,children:f&&r.jsx("span",{className:"w-4 h-4 rounded-full bg-secondary"})}),r.jsx("span",{children:u.label})]},u.value.toString())})})},Be=e=>{const{data:t,scrollSpeed:n=100,defaultTitle:s="No upcoming events. Stay tuned!"}=e,o=g.useRef(null),i=g.useRef(null);return g.useEffect(()=>{const a=o.current,l=i.current;if(a&&l){a.style.cursor="pointer";const C=a.offsetWidth,c=l.offsetWidth,u=(c+C)/n,f=[{transform:`translateX(${C}px)`},{transform:`translateX(-${c}px)`}],h=l.animate(f,{duration:u*1e3,iterations:Number.POSITIVE_INFINITY,easing:"linear"}),m=()=>h.pause(),x=()=>h.play();return a.addEventListener("mouseenter",m),a.addEventListener("mouseleave",x),()=>{h.cancel(),a.removeEventListener("mouseenter",m),a.removeEventListener("mouseleave",x)}}},[n]),r.jsx("div",{className:"overflow-hidden h-9 flex items-center bg-primary",ref:o,children:r.jsx("div",{ref:i,className:"whitespace-nowrap will-change-transform flex items-center",children:(t==null?void 0:t.length)>0?r.jsx(r.Fragment,{children:t==null?void 0:t.map((a,l)=>{var C;return r.jsxs("div",{className:"flex items-center mx-10",children:[r.jsx(j,{text:a==null?void 0:a.title,variant:"captionBold",color:"error"}),r.jsx(Y,{icon:a==null?void 0:a.iconName,size:24,color:"error",className:"ml-2 mr-15"}),((C=a==null?void 0:a.events)==null?void 0:C.length)>0&&a.events.map((c,d)=>r.jsxs("span",{className:"mr-10 whitespace-nowrap flex items-center",children:[r.jsx("span",{className:"mr-2",children:r.jsx(j,{text:c.timeLabel,variant:"caption",color:"secondary",underline:!0})}),r.jsx(j,{text:c.description,variant:"captionBold",color:"secondary"})]},`${d+1}-${c.timeLabel}`))]},`${l}${a==null?void 0:a.title}`)})}):r.jsx(j,{variant:"captionBold",text:s,color:"error"})})})},$e=e=>{const{titles:t,bets:n,showHeader:s=!1}=e,[o,i]=g.useState(!1),a={Back:{typeColor:"bg-babyBlue",bgColor:"bg-cloudBlue"},Lay:{typeColor:"bg-watermelonRed",bgColor:"bg-softRosePink"}},l=["Yes","Back","Even","Odd"],C=d=>{const{odds:u,showTitles:f=!1}=d;return r.jsx("div",{className:"flex items-center ml-auto justify-between min-w-32 lg:min-w-40",children:u==null?void 0:u.map(h=>r.jsx("div",{children:r.jsx(j,{variant:f?"caption":"captionBold",text:f?h.title:h.value})},h.title))})},c=({label:d,value:u})=>r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx(j,{variant:"caption",text:d,color:"slategray"}),r.jsx(j,{variant:"caption",text:u,color:"slategray"})]});return r.jsxs("div",{className:"w-full",children:[s&&r.jsx(I5,{variant:"EventTitle",title:t.slipTitle||""}),r.jsx("div",{className:"max-h-64 overflow-y-auto p-1 bg-tertiary",children:r.jsx("div",{className:"space-y-1",children:n==null?void 0:n.map(d=>{const u=l.includes(d.type)?"Back":"Lay",{typeColor:f,bgColor:h}=a[u];return o?r.jsxs("div",{children:[r.jsxs("div",{className:`py-1 px-2 flex items-center ${f}`,children:[r.jsx(j,{variant:"caption",text:`${d.type} ${d.type===C1.BACK?`(${t.betFor})`:`(${t.betAgainst})`}`}),r.jsx(C,{odds:d.oddsDetails,showTitles:!0})]}),r.jsxs("div",{className:h,children:[r.jsxs("div",{className:"p-1 gap-4 flex items-center",children:[r.jsx(c,{label:t.reference,value:d.reference}),r.jsx(c,{label:t.time,value:d.time})]}),r.jsx("hr",{className:`border-t ${f}`}),r.jsxs("div",{className:"flex p-1 gap-2",children:[r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:d.subTitle}),r.jsx(j,{variant:"caption",text:d.result,color:"slategray"})]}),r.jsx(C,{odds:d.oddsDetails})]})]})]},d.id):r.jsxs("div",{className:`px-2 py-1 flex items-center ${h} gap-2`,children:[r.jsx("div",{className:`flex items-center justify-center p-1 min-w-12 rounded-md ${f}`,children:r.jsx(j,{variant:"captionBold",text:d.type})}),r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:d.subTitle}),r.jsx(j,{variant:"smallMedium",text:d.result,color:"slategray"})]}),r.jsx(C,{odds:d.oddsDetails})]},d.id)})})}),r.jsxs("div",{className:"flex items-center gap-1 py-2 px-3 bg-tertiary rounded-b-lg",children:[(n==null?void 0:n.length)>0&&r.jsx(I2,{checked:o,onChange:d=>i(d.target.checked)}),r.jsx(j,{variant:"caption",text:(n==null?void 0:n.length)>0?t.betInfo:t.nullMessage})]})]})},Te=({slides:e,isLoading:t=!1,altImageUrl:n="",interval:s=3e3,loop:o=!0,pauseOnHover:i=!0,className:a=""})=>{const[l,C]=g.useState(0),c=g.useRef(null),[d,u]=g.useState(!1),f=g.useCallback(()=>{C(h=>h===e.length-1?o?0:h:h+1)},[e.length,o]);return g.useEffect(()=>{if(i&&d)return;function h(){f(),c.current=setTimeout(h,s)}return c.current=setTimeout(h,s),()=>{c.current&&clearTimeout(c.current)}},[d,s,i,f]),r.jsx("div",{className:`relative overflow-hidden w-full aspect-19/6 min-h-32 max-h-82.5 rounded-2xl shadow-lg z-level-0 ${a}`,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:t?r.jsx("div",{className:"flex justify-center items-center h-30 md:h-96",children:r.jsx(E5,{className:"animate-spin w-30 md:w-full"})}):r.jsxs(r.Fragment,{children:[e==null?void 0:e.map((h,m)=>r.jsx("div",{className:`absolute inset-0 transition-opacity duration-700 ease-in-out ${m===l?"opacity-100 z-level-1":"opacity-0 z-level-0"}`,children:r.jsx("img",{src:h.imageURL||n,alt:h.alt||"slide image",className:"relative w-full h-full object-fill"})},h.id)),r.jsx("div",{className:"absolute z-level-2 bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2",children:e==null?void 0:e.map((h,m)=>r.jsx("button",{type:"button",onClick:()=>C(m),className:`h-1 md:h-2 bg-white rounded-full cursor-pointer transition-all duration-300 ${m===l?"w-4 md:w-8":"w-1 md:w-2"}`,"aria-label":`Go to slide ${m+1}`},h.id))})]})})},Ie=({betSlipVariant:e,slipTitle:t,betSlipLabels:n,betDetails:s,betButtonAmounts:o=[],defaultStake:i=0,defaultOdds:a,minBet:l,maxBet:C,errorMessage:c,footerCTA:d,projectedPL:u,handleBetPlacement:f})=>{const h={Back:{primaryBg:"bg-babyBlue",secondaryBg:"bg-cloudBlue",border:"border-babyBlue"},Lay:{primaryBg:"bg-watermelonRed",secondaryBg:"bg-softRosePink",border:"border-watermelonRed"}},x=["Yes","Back","Even","Odd"].includes(e)?"Back":"Lay",{primaryBg:p,secondaryBg:y,border:M}=h[x],[w,N]=g.useState(i),[b,v]=g.useState(a);g.useEffect(()=>{N(i),v(a)},[i,a]);const L=g.useRef(f);g.useEffect(()=>{L.current=f},[f]),g.useEffect(()=>{L.current({stake:w,odds:b})},[w,b]);const k=E=>r.jsx("div",{className:"text-center",children:r.jsx(j,{variant:"caption",text:E})},E),Z=E=>{const H=Number(E.target.value),V=a-T1.LIMIT,D=a+T1.LIMIT;H<V||H>D||v(H)};return r.jsxs("div",{className:"pb-2 bg-brightgray",children:[r.jsxs("div",{className:`p-2 grid grid-cols-2 items-center ${p}`,children:[r.jsx(j,{variant:"caption",text:t}),r.jsxs("div",{className:"flex items-center justify-end mr-10",children:[k(n.pLValueTitle),r.jsx("div",{className:"mx-1 min-w-8 max-w-16 text-right",children:r.jsx(j,{variant:"captionBold",text:u})})]})]}),r.jsxs("div",{className:y,children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[r.jsxs("div",{className:"flex flex-col justify-center m-2",children:[r.jsx(j,{variant:"captionBold",text:s.betTitle}),r.jsx(j,{variant:"caption",text:s.betDescription})]}),r.jsxs("div",{className:"flex items-center gap-1 justify-end px-2",children:[r.jsxs("div",{className:"flex flex-col flex-start items-center gap-1",children:[k(n.oddsTitle),r.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:b,min:a-T1.LIMIT,max:a+T1.LIMIT,onChange:Z,onKeyDown:E=>E.preventDefault(),disabled:["Yes","No","Odd","Even"].includes(e),className:"min-w-12 max-w-14 h-10 rounded-sm p-1 bg-white border-0"})]}),r.jsxs("div",{className:"relative",children:[r.jsxs("div",{className:"flex flex-col items-center gap-1",children:[k(n.stakeTitle),r.jsx("input",{type:"text",value:w,onChange:E=>{const H=E.target.value;f3.NUMBER_INPUT_REGEX.test(H)&&N(Number(H))},className:"min-w-12 max-w-16 h-10 rounded-sm p-1 bg-white border-0"})]}),w<l.amount&&r.jsxs("div",{className:"z-level-1 absolute top-full left-0 mt-1 text-xs text-error bg-white border border-error rounded px-2 py-1 shadow-md",children:[l.errorMessage," ",l.amount]}),C&&w>C.amount&&r.jsxs("div",{className:"z-level-1 absolute top-full left-0 mt-1 text-xs text-error bg-white border border-error rounded px-2 py-1 shadow-md",children:[C.errorMessage," ",C.amount]})]})]})]}),r.jsx("div",{className:"h-auto flex flex-wrap gap-2 overflow-x-auto mt-4 mx-2 mb-2 whitespace-nowrap no-scrollbar",children:o.length>0&&o.map(E=>r.jsx(o1,{text:`+${X1(E)}`,size:"small",variant:"outline",onClick:()=>N(H=>H+E)},E))}),r.jsxs("div",{className:`h-6 flex items-center justify-end border-t border-b p-2 gap-4 ${M}`,children:[r.jsx(j,{variant:"captionBold",text:`${l.title}: ${l.amount}`}),C&&r.jsx(j,{variant:"captionBold",text:`${C.title}: ${C.amount}`})]})]}),c&&r.jsx("div",{className:"px-2 mt-1",children:r.jsx(j,{variant:"caption",color:"error",text:c})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[r.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{N(0)}}),r.jsx("div",{className:"flex items-center justify-end mt-1 mr-2 gap-2",children:d.map((E,H)=>r.jsx(o1,{...E},E.text||H))})]})]})},Q2=[{code:"+1",shortName:"US",fullName:"United States"},{code:"+91",shortName:"IND",fullName:"India"},{code:"+44",shortName:"UK",fullName:"United Kingdom"},{code:"+61",shortName:"AUS",fullName:"Australia"},{code:"+81",shortName:"JPN",fullName:"Japan"},{code:"+49",shortName:"DE",fullName:"Germany"},{code:"+33",shortName:"FR",fullName:"France"},{code:"+39",shortName:"IT",fullName:"Italy"},{code:"+7",shortName:"RU",fullName:"Russia"},{code:"+55",shortName:"BR",fullName:"Brazil"},{code:"+27",shortName:"ZA",fullName:"South Africa"},{code:"+82",shortName:"KR",fullName:"South Korea"},{code:"+34",shortName:"ES",fullName:"Spain"},{code:"+46",shortName:"SE",fullName:"Sweden"},{code:"+31",shortName:"NL",fullName:"Netherlands"},{code:"+52",shortName:"MX",fullName:"Mexico"},{code:"+20",shortName:"EG",fullName:"Egypt"},{code:"+90",shortName:"TR",fullName:"Turkey"},{code:"+66",shortName:"TH",fullName:"Thailand"},{code:"+65",shortName:"SG",fullName:"Singapore"},{code:"+62",shortName:"ID",fullName:"Indonesia"},{code:"+98",shortName:"IR",fullName:"Iran"},{code:"+64",shortName:"NZ",fullName:"New Zealand"},{code:"+41",shortName:"CH",fullName:"Switzerland"},{code:"+351",shortName:"PT",fullName:"Portugal"},{code:"+353",shortName:"IE",fullName:"Ireland"}],Ae={true:"border-error focus-within:border-error",false:"border-brightgray focus-within:border-smokyblack"},We={true:"bg-brightgray",false:"bg-white"},Ye=e=>{const{label:t,id:n="",name:s="",value:o="",onChange:i=()=>{},placeholder:a="",isRequired:l=!1,className:C="",isDisabled:c=!1,hasError:d=!1,errorMessage:u="",size:f="md",theme:h="light",...m}=e,x={sm:"px-2 py-1.5",md:"px-4 py-2.5",lg:"px-6 py-3.5"},[p,y]=o.split("-"),[M,w]=g.useState(!1),N=Q2.find(H=>H.code===p)||Q2[0],b=g.useRef(null);g.useEffect(()=>{const H=V=>{b.current&&!b.current.contains(V.target)&&w(!1)};return document.addEventListener("click",H),()=>{document.removeEventListener("click",H)}},[]);const v=H=>{w(!1),i==null||i(`${H}-${y||""}`)},L=H=>{i==null||i(`${p||Q2[0].code}-${H}`)},k=`${M?"relative":""} flex items-center border rounded-lg ${x[f]} ${Ae[`${d}`]} ${We[`${c}`]}`,Z=`flex-1 w-full font-roboto text-base text-smokyblack font-normal focus:outline-none focus:ring-0 focus:border-slategray text-black font-normal ${C}`,E=`${t}${l?"*":""}`;return r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(j,{variant:"body1",text:E,color:d?"error":h==="dark"?"white":"slategray"}),r.jsxs("div",{className:k,children:[r.jsxs("div",{className:"mr-2",ref:b,children:[r.jsxs("button",{type:"button",className:"flex items-center cursor-pointer gap-1",onClick:()=>!c&&w(!M),children:[r.jsx(j,{variant:"subtitle1",text:N.shortName,color:"smokyblack"}),r.jsx(Y,{icon:M?"caretUp":"caretDown",color:"smokyblack"}),r.jsx("div",{className:"h-7 border border-neutralGray"}),r.jsx(j,{variant:"subtitle1",text:N.code,color:"smokyblack"})]}),M&&r.jsx("ul",{className:"absolute top-full my-1 left-0 w-full bg-white border border-brightgray rounded-lg shadow-lg z-level-3 max-h-60 overflow-auto",children:Q2.map((H,V)=>{const D=H.code===N.code,I=D?"white":"slategray";return r.jsx("li",{className:`px-3 py-2 flex items-center gap-2 cursor-pointer hover:bg-brightgray ${D?"bg-secondary text-white hover:bg-secondary/85":""}`,onClick:()=>v(H.code),onKeyUp:_=>{(_.key==="Enter"||_.key===" ")&&v(H.code)},children:r.jsx(j,{variant:"caption",text:`${H.code} ${H.fullName} (${H.shortName})`,color:I})},`${H.code}-${V}`)})})]}),r.jsx("input",{id:n,name:s,type:"tel",value:y||"",onChange:H=>{L(H.target.value)},placeholder:a,className:Z,disabled:c,...m})]}),d&&u&&r.jsx("div",{className:"flex justify-end",children:r.jsx(j,{variant:"caption",text:u,color:"error"})})]})},ze=e=>{const{text:t,onClick:n,iconName:s,variant:o="default"}=e,i=o==="action";return r.jsx("button",{type:"button",onClick:n,className:`${i?"w-full py-3":"w-40 py-2"} px-5 flex items-center text-xs font-normal tracking-tight transition-all duration-200 rounded-lg hover:bg-brightgray cursor-pointer`,children:r.jsxs("div",{className:"flex justify-between items-center gap-2 w-full",children:[r.jsx(j,{variant:i?"subtitle2":"caption",text:t}),i&&s&&r.jsx(Y,{icon:s,color:"black"})]})})},Ge=e=>{const{items:t,lastItem:n,variant:s="default"}=e,o=s==="action";return r.jsx("div",{className:`${o?"w-full":"w-fit shadow-md rounded-lg"} bg-white`,children:r.jsxs("ul",{className:"flex flex-col",children:[t.length===0?r.jsx("div",{className:`flex justify-center ${o?"w-full py-3":"w-40 py-2"}`,children:r.jsx(j,{variant:"caption",text:"No data available!",color:"slategray"})}):t.map(i=>r.jsx("li",{className:`${o?"border-b border-brightgray":""}`,children:r.jsx(ze,{...i,variant:s})},i.text)),!!n&&r.jsx("li",{children:r.jsxs("button",{type:"button",onClick:n.onClick,className:`${o?"w-full py-3 border-b border-brightgray":"w-40 py-2"} px-5 flex items-center gap-3 hover:bg-offwhite border-t border-brightgray rounded-b-lg cursor-pointer`,children:[!!n.text&&r.jsx(j,{text:n.text,variant:"subtitle2",color:"techBlue"}),!!n.iconName&&r.jsx(Y,{icon:n.iconName,color:"techBlue"})]})})]})})},qe=e=>{const{steps:t}=e;return r.jsx("div",{className:"flex items-center justify-between w-full",children:t==null?void 0:t.map((n,s)=>{var c;const o=s===t.length-1,i=(c=t[s+1])==null?void 0:c.status,a=n.status==="completed"?r.jsx("div",{className:"p-[6px] md:p-4 bg-secondary rounded-full flex items-center justify-center shadow-lg",children:r.jsx("div",{className:"p-[2px] md:p-1 bg-white/40 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"p-[2px] md:p-[6px] bg-white/30 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"flex items-center justify-center bg-secondary/60 rounded-full",children:r.jsx(Y,{icon:"doneFill",size:20,color:"white"})})})})}):n.status==="inProgress"?r.jsx("div",{className:"p-3 md:p-5 rounded-full bg-secondary flex items-center justify-center",children:r.jsx("div",{className:"p-1 md:p-2 bg-white/30 rounded-full flex items-center justify-center",children:r.jsx("div",{className:"w-2 h-2 md:w-4 md:h-4 bg-white rounded-full"})})}):r.jsx("div",{className:"p-5 md:p-9 rounded-full bg-brightgray flex"}),l=n.status&&i==="completed"?"bg-secondary":"bg-brightgray",C={...n.title,color:n.status==="pending"?"neutralGray":n.title.color};return r.jsxs("div",{className:"flex-1 flex flex-col items-center",children:[r.jsxs("div",{className:"relative flex items-center justify-center w-full",children:[r.jsx("div",{className:"flex justify-center",children:a}),!o&&r.jsx("div",{className:"absolute top-1/2 left-[calc(50%+20px)] md:left-[calc(50%+36px)] w-[calc(100%-20px)] md:w-[calc(100%-36px)]",children:r.jsx("div",{className:`h-[2px] w-full ${l}`})})]}),r.jsx("div",{className:"mt-2 md:mt-4 text-center",children:r.jsx(j,{variant:n.title.variant??"caption",...C})})]},`${s+1}`)})})},Ue=e=>{const{walletData:t,footerCTA:n,redirectLinks:s}=e||{},{isMobile:o}=V1();return r.jsxs("div",{className:"max-w-56 rounded-md bg-primary shadow-md shadow-white p-2",children:[r.jsxs("div",{className:"pb-2",children:[t==null?void 0:t.map(i=>{var a,l,C;return r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("div",{className:"flex-1",children:r.jsx(j,{text:(i==null?void 0:i.key)??"",variant:"caption",color:"white"})}),r.jsx("div",{className:"flex-1 text-left",children:r.jsx(j,{text:(i==null?void 0:i.value)??"",variant:"captionBold",color:(i==null?void 0:i.color)??"white"})}),!o&&((a=i==null?void 0:i.info)==null?void 0:a.title)&&r.jsx(d4,{title:(l=i==null?void 0:i.info)==null?void 0:l.title,position:(C=i==null?void 0:i.info)==null?void 0:C.position,children:r.jsx(Y,{icon:"info",color:"white"})})]},i.key)}),r.jsx("div",{className:"flex justify-between pt-2 px-3 gap-2 flex-wrap",children:n==null?void 0:n.map((i,a)=>r.jsx(o1,{text:(i==null?void 0:i.text)??"",variant:i==null?void 0:i.variant,size:"extraSmall",onClick:i==null?void 0:i.onClick,disabled:i==null?void 0:i.disabled},(i==null?void 0:i.text)??`${a+1}`))})]}),r.jsx("div",{className:"border-t border-brightgray pt-2 px-2",children:s==null?void 0:s.map((i,a)=>r.jsxs("button",{onClick:i==null?void 0:i.onClick,type:"button",className:"flex justify-between gap-2 py-1 w-full",children:[r.jsx(j,{text:(i==null?void 0:i.title)??"",variant:"caption",color:"white"}),r.jsx(Y,{icon:"caretRight",color:"white"})]},`${a+1}-${i==null?void 0:i.title}`))})]})},Ke=({id:e="",name:t="",label:n="",isRequired:s=!1,hasError:o=!1,errorMessage:i="",isDisabled:a=!1,onChange:l,instructionText:C,supportText:c,supportFormate:d,maxFiles:u=10,maxLimitMessage:f="Upload limit reached. Maximum allowed files",invalidFileMessage:h="Invalid file type.",maxFileSize:m=1,maxFileSizeMessage:x="File size exceeds the allowed limit."})=>{const[p,y]=g.useState(!1),[M,w]=g.useState([]),[N,b]=g.useState(null),v=g.useRef(null),L=d.map(F=>`.${F.toLowerCase().replace(f3.FILE_FORMAT_REGEX,"")}`).join(","),k=M.length>=u,Z=`${n}${s?" *":""}`,E=d.join(", ").toUpperCase(),H=o?"border-error":p?"border-secondary":"border-slategray",V=F=>{var R;return((R=F.name.split(".").pop())==null?void 0:R.toLowerCase())??""},D=F=>{l==null||l({target:{name:t,files:F},currentTarget:{name:t,files:F}})},I=F=>{b(F)},_=F=>{F.target.value=""},U=F=>{const R=V(F);return d.map(l1=>l1.toLowerCase()).includes(R)},g1=F=>F.size<=m*1024*1024,x1=F=>F.filter(R=>U(R)&&g1(R)),J=F=>{if(a)return;if(F.some(m1=>!U(m1))){I(h);return}if(F.some(m1=>!g1(m1))){I(x);return}const R=x1(F);if(R.length===0){I(h);return}const l1=[...M,...R].slice(0,u);w(l1),b(null),D(l1)},s1=F=>{if(a)return;const R=M.filter((l1,m1)=>m1!==F);w(R),D(R)},S=F=>{F.preventDefault(),F.stopPropagation(),!(a||k)&&y(F.type==="dragenter"||F.type==="dragover")},P=F=>{var R;F.preventDefault(),F.stopPropagation(),!a&&(y(!1),J(Array.from(((R=F.dataTransfer)==null?void 0:R.files)??[])))},G=F=>{var R;F.stopPropagation(),!(a||k)&&((R=v.current)==null||R.click())},$=F=>{var R;a||k||(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),(R=v.current)==null||R.click())},h1=F=>{const R=Array.from(F.target.files??[]);R.length>0&&J(R),_(F)};return r.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n&&r.jsx(j,{variant:"body1",text:Z,color:o?"error":"slategray"}),r.jsxs("div",{"aria-disabled":a,onClick:G,onKeyDown:$,onDragEnter:S,onDragOver:S,onDragLeave:S,onDrop:P,className:`border-2 border-dashed rounded-md transition-all duration-200 p-6 md:p-8 text-center focus:outline-none ${H} ${k||a?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-secondary"}`,children:[r.jsx("input",{id:e,name:t,type:"file",ref:v,accept:L,multiple:!0,disabled:a,onChange:h1,className:"hidden"}),r.jsxs("div",{className:"flex flex-col items-center justify-center pointer-events-none",children:[r.jsx(Y,{icon:"upload"}),r.jsxs("div",{children:[r.jsx("div",{className:"flex gap-1 items-center justify-center",children:r.jsx(j,{variant:"subtitle2",text:C})}),r.jsxs("div",{className:"flex gap-2 justify-center my-2 flex-wrap",children:[r.jsx(j,{variant:"caption",text:`${c} :`}),r.jsx(j,{variant:"caption",text:`${E} (Max : ${m}MB)`})]}),(N||o)&&r.jsx(j,{variant:"caption",color:"error",text:N||i})]})]})]}),k&&f&&r.jsx(j,{variant:"caption",color:"error",text:f}),M.length>0&&r.jsx("div",{className:"mt-4 max-h-40 overflow-y-auto space-y-2 no-scrollbar bg-brightgray p-2 rounded-xl",children:M.map((F,R)=>{const l1=V(F);return r.jsxs("div",{className:"flex justify-between items-center rounded-md py-2 px-4 bg-offwhite",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:l1||"file"}),r.jsx(j,{variant:"body2",text:`${F.name} (${(F.size/(1024*1024)).toFixed(2)} MB)`})]}),!a&&r.jsx(Y,{icon:"cancel",color:"slategray",size:20,onClick:()=>s1(R)})]},`${R+1}`)})})]})},Xe=()=>{const e=[{className:"z-n-20",label:"z-n-20 (-20)",usage:"Background utility / debugging"},{className:"z-n-10",label:"z-n-10 (-10)",usage:"Behind-base elements"},{className:"z-level-0",label:"z-level-0 (0)",usage:"Base layer / normal components"},{className:"z-level-1",label:"z-level-1 (100)",usage:"Swiper slide"},{className:"z-level-2",label:"z-level-2 (200)",usage:"Slide indicators"},{className:"z-level-3",label:"z-level-3 (300)",usage:"Dropdown / Multi-select dropdown / DatePicker"},{className:"z-level-4",label:"z-level-4 (400)",usage:"Reserved for minor overlays"},{className:"z-level-5",label:"z-level-5 (500)",usage:"Tooltips"},{className:"z-level-6",label:"z-level-6 (600)",usage:"Reserved overlay layer"},{className:"z-level-7",label:"z-level-7 (700)",usage:"Modal"},{className:"z-level-8",label:"z-level-8 (800)",usage:"High overlays (future use)"},{className:"z-level-9",label:"z-level-9 (900)",usage:"Snackbar"},{className:"z-level-10",label:"z-level-10 (999)",usage:"Loaders / Always on top"}],t=["bg-red-400","bg-orange-400","bg-yellow-400","bg-green-400","bg-emerald-400","bg-teal-400","bg-cyan-400","bg-sky-400","bg-blue-400","bg-indigo-400","bg-violet-400","bg-fuchsia-400","bg-pink-400"],n=150,s=n*.4,o=30,i=n+(e.length-1)*o+16;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsx("div",{className:"relative overflow-visible rounded-lg",style:{height:i},children:e.map((a,l)=>{const C=l*s,c=l*o,d=t[l%t.length];return r.jsx("div",{className:`absolute ${a.className} ${d} text-white rounded-xl shadow-md flex justify-center p-3`,style:{width:n,height:n,left:C,top:c},children:r.jsx(j,{variant:"captionBold",text:a.label,color:"white"})},a.className)})}),r.jsxs("div",{className:"p-5 bg-gray-100 rounded-xl shadow-inner",children:[r.jsx(j,{variant:"captionBold",text:"Z-Index Usage Details"}),r.jsx("div",{className:"mt-3 space-y-1",children:e.map(a=>r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("span",{className:"font-mono text-sm text-gray-700 w-40",children:a.label}),r.jsxs("span",{className:"text-gray-600 text-sm",children:["→ ",a.usage]})]},a.className))})]})]})})},Qe=({isOpen:e,onClose:t,betSlipVariant:n,slipTitle:s,betSlipLabels:o,betDetails:i,betButtonAmounts:a,defaultStake:l=0,defaultOdds:C,minBet:c,maxBet:d,projectedPL:u,footerCTA:f,errorMessage:h,handleBetPlacement:m})=>{const x={Back:{primaryBg:"bg-babyBlue",secondaryBg:"bg-cloudBlue",tertiaryBg:"bg-lavenderBlue",border:"border-pastelBlue"},Lay:{primaryBg:"bg-watermelonRed",secondaryBg:"bg-peachbloom",tertiaryBg:"bg-softRosePink",border:"border-peachyPink"}},y=["Yes","Back","Even","Odd"].includes(n)?"Back":"Lay",{primaryBg:M,tertiaryBg:w,secondaryBg:N,border:b}=x[y],[v,L]=g.useState(l),[k,Z]=g.useState(C);g.useEffect(()=>{L(l),Z(C)},[l,C]);const E=g.useRef(m);g.useEffect(()=>{E.current=m},[m]),g.useEffect(()=>{E.current({stake:v,odds:k})},[v,k]);const H=V=>{const D=Number(V.target.value),I=C-T1.LIMIT,_=C+T1.LIMIT;D<I||D>_||Z(D)};return e?r.jsx("div",{className:"fixed inset-0 z-level-6 flex items-start justify-center pointer-events-none",tabIndex:-1,children:r.jsxs("div",{className:"bg-white shadow-lg w-full pointer-events-auto",onMouseDown:V=>V.stopPropagation(),role:"presentation",children:[r.jsxs("div",{className:`flex items-center justify-between px-4 py-1 ${M}`,children:[r.jsx(j,{variant:"subtitle1",text:s,color:"white"}),r.jsx(Y,{size:16,icon:"cancel",color:"white",onClick:t})]}),r.jsxs("div",{className:`${N} flex flex-row justify-between py-1 px-4`,children:[r.jsxs("div",{children:[r.jsx(j,{variant:"captionBold",text:i==null?void 0:i.betTitle}),r.jsx(j,{variant:"caption",text:i==null?void 0:i.betDescription})]}),r.jsxs("div",{className:"text-right",children:[r.jsx(j,{text:o.pLValueTitle,variant:"subtitle2"}),r.jsx(j,{text:u,variant:"caption"})]})]}),r.jsx("div",{className:`${N} px-4 pb-2 flex flex-wrap gap-3`,children:a.map(V=>r.jsx(o1,{text:`+${V}`,size:"extraSmall",variant:"outline",onClick:()=>L(v+V)},V))}),r.jsxs("div",{className:`${N} px-3 pb-1`,children:[r.jsxs("div",{className:"grid grid-cols-2 text-center mb-2",children:[r.jsx(j,{text:o.oddsTitle,variant:"captionBold"}),r.jsx(j,{text:o.stakeTitle,variant:"captionBold"})]}),r.jsxs("div",{className:"px-4 pb-1 grid grid-cols-2 gap-4",children:[r.jsx("input",{type:"number",step:T1.NUMBER_FILED_STEPS,value:k,min:C-T1.LIMIT,max:C+T1.LIMIT,disabled:["Yes","No","Odd","Even"].includes(n),onChange:H,onKeyDown:V=>V.preventDefault(),className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none appearance-auto"}),r.jsx("input",{type:"text",value:v,onChange:V=>{const D=V.target.value;f3.NUMBER_INPUT_REGEX.test(D)&&L(Number(D))},className:"w-full px-4 py-2 bg-white rounded-md shadow-sm text-center text-black outline-none"})]}),d&&v>d.amount?r.jsx("div",{className:"px-5 flex justify-end",children:r.jsx(j,{text:`${d.errorMessage} ${d.amount}`,variant:"caption",color:"error"})}):c&&v<c.amount&&r.jsx("div",{className:" px-5 flex justify-end",children:r.jsx(j,{text:`${c.errorMessage} ${c.amount}`,variant:"caption",color:"error"})})]}),r.jsxs("div",{className:`flex justify-end gap-4 px-4 py-1 border-t border-b ${b} ${w}`,children:[r.jsx(j,{variant:"caption",text:`${c.title}: ${c.amount}`}),d&&r.jsx(j,{variant:"caption",text:`${d.title}: ${d.amount}`})]}),h&&r.jsx("div",{className:"px-2 mt-1",children:r.jsx(j,{variant:"caption",color:"error",text:h})}),f&&r.jsxs("div",{className:"flex items-center justify-between px-4 py-1",children:[r.jsx(o1,{text:"Clear",variant:"ghost",size:"small",onClick:()=>{L(0)}}),r.jsx("div",{className:"flex gap-3",children:f.map((V,D)=>r.jsx(o1,{...V},`${V==null?void 0:V.text}-${D}`))})]})]})}):null},Je=e=>{const{isVisible:t,typographyProps:n,color:s="error"}=e;return t?r.jsx("div",{className:`flex justify-center rounded-lg border-4 border-double animate-pulse [animation-duration:0.6s] bg-${s} border-${s} bg-clip-padding p-2 md:px-4`,children:r.jsx(j,{text:n.text,variant:n.variant??"overline",color:n.color??"white"})}):null},E4=({level:e=3})=>r.jsxs("div",{className:`${e===1?"flex gap-0.5 sm:gap-1":e===2?"flex gap-0.5 sm:gap-1 pr-13 lg:pr-17":"flex gap-1 pr-24 sm:pr-25 md:pr-26 lg:pr-34"}
65
65
  `,children:[r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-12 md:min-w-14 lg:min-w-18 h-7 bg-babyBlue rounded-t-lg",children:r.jsx(j,{text:e===1?"Back":"Back All",color:"black",variant:"captionBold"})}),r.jsx("div",{className:"flex justify-center items-center min-w-11.5 min-[420px]:min-w-12 md:min-w-14 lg:min-w-18 h-7 bg-watermelonRed rounded-t-lg",children:r.jsx(j,{text:e===1?"Lay":"Lay All",color:"black",variant:"captionBold"})})]}),I5=({title:e,variant:t,eventId:n="0",level:s=3,min:o=10,max:i=100,selectionCount:a=0,totalMatched:l=0,isSubHeader:C=!1,showBetsButton:c=!1,viewBetCTA:d,onClick:u,eventDetails:f="",onInfoClick:h})=>{const m=["1","X","2"].slice(0,s),{isMobile:x}=V1(),p=()=>r.jsxs("div",{className:"flex gap-1 bg-slategray px-1 md:px-2 py-1 rounded-md",children:[r.jsx(j,{color:"white",variant:"caption",text:"Min/Max:"}),r.jsx(j,{color:"white",variant:"caption",text:`${X1(o)}/${X1(i)}`})]});return t==="EventTitle"?r.jsxs("div",{className:"flex flex-col md:flex-row gap-1 bg-primary rounded-t-lg px-2 py-2 w-full justify-between",children:[r.jsxs("div",{className:"flex gap-2 justify-between",children:[r.jsx(j,{variant:"captionBold",text:e,color:"white"}),h&&r.jsx(Y,{icon:"info",onClick:h,cursorPointer:!0,color:"white"})]}),f&&r.jsxs("div",{className:"flex gap-1",children:[r.jsx(Y,{icon:"calendar",color:"white",size:16}),r.jsx("div",{className:"w-max",children:r.jsx(j,{color:"success",text:f,variant:"caption"})})]})]}):r.jsxs(r.Fragment,{children:[t!=="MatchOdds"?r.jsxs("div",{className:"bg-primary rounded-t-lg px-2 py-2 flex flex-row items-center gap-4 w-full justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[t==="MultiMarket"&&r.jsx("div",{className:"bg-success w-6 h-6 rounded flex items-center justify-center",children:r.jsx(Y,{icon:"pin"})}),r.jsx(j,{variant:"subtitle2",text:e,color:"white"})]}),t==="OtherMarket"&&c&&r.jsx(o1,{...d}),t==="FancyMarket"&&r.jsxs("div",{className:"flex md:gap-8 lg:mr-24 mr-18 gap-6",children:[r.jsx(j,{variant:"caption",text:"No",color:"white"}),r.jsx(j,{variant:"caption",text:"Yes",color:"white"})]}),t==="MultiMarket"&&r.jsx("div",{className:"ml-auto md:block",children:r.jsx(o1,{variant:"primary",size:"extraSmall",text:"Match Odds",onClick:()=>u==null?void 0:u(n)})})]}):r.jsxs("div",{className:"bg-brightgray flex justify-between gap-2 items-center pr-5",children:[r.jsx("div",{className:"flex gap-1 md:gap-3 items-center",children:r.jsx("div",{className:"bg-primary px-2 py-2",children:r.jsx(j,{color:"white",text:e,variant:"subtitle2"})})}),r.jsxs("div",{className:"hidden md:flex gap-2",children:[r.jsx(j,{color:"neutralGray",text:"Matched",variant:"subtitle2"}),r.jsx(j,{color:"black",text:`PTH ${l}`,variant:"subtitle2"})]})]}),t==="MultiMarket"&&r.jsxs("div",{className:"hidden md:flex max-full max-h-12 border border-brightgray mt-1 items-center justify-between px-4 pt-3",children:[r.jsx(j,{variant:"caption",text:`${a} Selections`}),!x&&r.jsx(E4,{level:s})]}),t==="Sports"&&C&&r.jsxs("div",{className:"flex items-center justify-end bg-brightgray px-4 py-2",children:[r.jsx("div",{className:"min-w-10 px-2 text-center",children:r.jsx(j,{variant:"body1",color:"black",text:"Matched"})}),r.jsx("div",{className:"flex items-center justify-center",children:m.map(y=>r.jsx("div",{className:"min-w-36 mx-1 flex justify-center",children:r.jsx(j,{variant:"body1",color:"black",text:y})},y))}),r.jsx("div",{className:"w-9"})]}),(t==="OtherMarket"||t==="MatchOdds")&&r.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-2",children:[p(),s===3&&r.jsx("div",{className:"ml-1 max-[430px]:hidden",children:r.jsx(E4,{})})]}),t==="Racing"&&r.jsxs("div",{className:"flex justify-between border border-b border-brightgray py-1 px-1 md:px-1.5 lg:px-2",children:[p(),r.jsx("div",{className:"ml-1",children:r.jsx(E4,{level:s})})]})]})},s2=({marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:i,index:a,color:l,type:C,disabled:c,showSize:d,min:u,max:f,onClick:h})=>{const m=C===C1.BACK&&a===2||C===C1.LAY&&a===0,x=[C1.YES,C1.NO,C1.ODD,C1.EVEN].includes(C),p={marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,type:C,odds:i==null?void 0:i.odds,size:(i==null?void 0:i.oddsSize)||0,min:u,max:f,acceptBestOdds:!(m||x)},[y,M]=g.useState(!1),w=g.useRef(i==null?void 0:i.odds);return g.useEffect(()=>{if(w.current!==(i==null?void 0:i.odds)){M(!0);const N=setTimeout(()=>{M(!1)},200);return w.current=i==null?void 0:i.odds,()=>clearTimeout(N)}},[i==null?void 0:i.odds]),r.jsxs("button",{type:"button",disabled:c||!(i!=null&&i.odds)||!(i!=null&&i.oddsSize),onClick:()=>(i==null?void 0:i.odds)&&(i==null?void 0:i.oddsSize)&&!c&&h(p),className:`min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded min-w-11.5 min-[420px]:min-w-12 lg:min-w-16 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed flex-1 ${l} transition-colors duration-300
66
- ${y?"bg-yellow":""}`,children:[r.jsx(j,{variant:"smallBold",color:"black",text:i!=null&&i.odds?i.odds:"-"}),d&&r.jsx(j,{variant:"smallMedium",color:"black",text:i!=null&&i.oddsSize?X1(i.oddsSize):"-"})]})},e0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,notes:l="",batb:C=[],batl:c=[],showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,isYesNO:p=!0,onRowClick:y=()=>{},onOddClick:M=()=>{}})=>{const w=u||f,N=a!==0,b=Math.max(C==null?void 0:C.length,c==null?void 0:c.length),v=Array.from({length:b},(E,H)=>C[H]),L=Array.from({length:b},(E,H)=>c[H]),k=p?C1.YES:C1.EVEN,Z=p?C1.NO:C1.ODD;return r.jsx("div",{className:"w-full border-x border-b border-brightgray py-1 px-2 md:px-4",children:r.jsxs("div",{className:"flex items-start gap-2 justify-between align-center",children:[r.jsxs("div",{className:"flex justify-between w-full cursor-pointer",onClick:()=>y(s),onKeyDown:()=>y(s),children:[r.jsxs("div",{className:"break-all",children:[r.jsx(j,{variant:"subtitle2",color:"black",text:o}),l&&r.jsx(j,{variant:"smallMedium",color:"black",text:l})]}),(i||N)&&r.jsx(j,{text:Number((i+a).toFixed(2)),variant:"captionBold",isNumberTypography:!0})]}),r.jsxs("div",{className:"flex gap-1 md:gap-2 items-start",children:[r.jsxs("div",{className:"relative",children:[u&&r.jsx("div",{className:"absolute inset-0 bg-freeze-pattern rounded pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("div",{className:"flex flex-col gap-1",children:L.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.NO_COLOR:A1.ODD_COLOR,type:Z,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.NO)))}),r.jsx("div",{className:"flex flex-col gap-1",children:v.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.YES_COLOR:A1.ODD_COLOR,type:k,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.YES)))})]})]}),r.jsxs("div",{className:"text-right w-14",children:[r.jsx(j,{variant:"smallMedium",text:"Min/Max"}),r.jsx(j,{variant:"smallMedium",text:`${X1(m)}/${X1(x)}`})]})]})]})})},t0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,batb:l=[],batl:C=[],level:c=3,showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,onOddClick:p=()=>{},notes:y=""})=>{const M=u||f,w=i!==0,N=a!==0,b=Array.from({length:c},(L,k)=>l[k]),v=Array.from({length:c},(L,k)=>C[k]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:items-center gap-2 min-[420px]:justify-between",children:[r.jsxs("div",{className:"flex min-[420px]:flex-col justify-between",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!w&&!N?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(w||N)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),N&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[u&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:b.map((L,k)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:L,color:A1.BACK_COLORS[k],index:k,type:C1.BACK,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${e}-${k+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((L,k)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:L,index:k,color:A1.LAY_COLORS[k],type:C1.LAY,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${k+1}`))})]})]}),y&&r.jsx(j,{variant:"caption",color:"black",text:y})]})},n0=({id:e,eventName:t="",inPlay:n=!1,openDate:s="",showBookmakerIcon:o=!1,showFancyIcon:i=!1,showTotalMatched:a=!1,totalMatched:l=0,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,pinned:f=!1,isFreezed:h=!1,isSuspended:m=!1,suspendedMsg:x="Suspended",onClickRedirect:p=()=>{},onOddClick:y=()=>{},onPinClick:M=()=>{}})=>{const{isMobile:w}=V1(),N=Array.from({length:d},(b,v)=>({Back:C[v],Lay:c[v]}));return r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:`flex justify-between gap-1 ${n?"md:flex-col":"flex-col"}`,children:[r.jsx("button",{onClick:()=>p(e),type:"button",className:"cursor-pointer text-left",children:r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:w?"captionBold":"body1",text:t,underline:!0,color:"techBlue"})})}),r.jsxs("div",{className:"flex gap-1 items-center",children:[r.jsxs("div",{className:"",children:[n&&r.jsx("div",{className:"hidden md:block",children:r.jsx(j,{variant:"caption",text:R3.IN_PLAY_MSG,color:"success"})}),s&&r.jsx(j,{variant:"caption",text:s,color:"neutralGray"})]}),r.jsxs("div",{className:"flex gap-1 items-center",children:[o&&r.jsx(Y,{icon:"letterB",size:16}),i&&r.jsx(Y,{icon:"letterF",size:16}),n&&r.jsxs("span",{className:"md:hidden relative flex size-3",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-75"}),r.jsx("span",{className:"relative inline-flex size-3 rounded-full bg-success"})]})]})]})]}),r.jsxs("div",{className:"flex flex-row md:items-center justify-between gap-1",children:[a&&!w&&r.jsx("div",{className:"min-w-10 px-2",children:r.jsx(j,{variant:"caption",color:"slategray",text:`${R3.MATCHED_POINTS} ${X1(l)}`})}),r.jsxs("div",{className:"relative flex gap-1 flex-1",children:[h&&r.jsx("div",{className:"absolute inset-0 z-level-1 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),m&&r.jsx("div",{className:"absolute inset-0 z-level-1 flex items-center justify-center rounded border-2 border-error backdrop-blur-xs",children:r.jsx(j,{variant:"captionBold",color:"error",text:x})}),N.map(b=>r.jsx("div",{className:"flex gap-1 flex-1",children:[C1.BACK,C1.LAY].map(v=>{const L=b[v],k=v===C1.BACK,Z=k?"bg-babyBlue":"bg-peachyPink";return r.jsxs("button",{type:"button",disabled:!(L!=null&&L.odds)||h||m,onClick:()=>!h&&!m&&(y==null?void 0:y(k?C1.BACK:C1.LAY,L==null?void 0:L.odds)),className:`${Z} flex-1 min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded min-w-10 min-[420px]:min-w-12 md:min-w-18 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed`,children:[r.jsx(j,{variant:"smallBold",color:"black",text:L!=null&&L.odds?L.odds:"-"}),u&&r.jsx(j,{variant:"smallMedium",color:"black",text:L!=null&&L.oddsSize?X1(L.oddsSize):"-"})]},n2(v))})},n2("Pair_Odds")))]}),r.jsx("button",{type:"button",onClick:()=>M==null?void 0:M(!f),className:"sm:ml-2",children:r.jsx(Y,{icon:f?"pinned":"pin",color:f?"error":"slategray",size:w?20:24})})]})]})},r0=e=>{const{marketId:t="0",eventId:n="0",providerId:s="0",runnerId:o,serialNo:i,position:a,details:l=[],runnerName:C="",currentValue:c=0,projectedValue:d=0,batb:u=[],batl:f=[],level:h=3,showOddsSize:m=!1,isFreezed:x=!1,isSuspended:p=!1,suspendedMsg:y="Suspended",min:M=10,max:w=100,onOddClick:N=()=>{},notes:b=""}=e,v=x||p,L=c!==0,k=d!==0,[Z,E]=g.useState(!1),H=Array.from({length:h},(_,U)=>u[3-h+U]),V=Array.from({length:h},(_,U)=>f[U]),D=()=>!L&&!k?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(L||k)&&r.jsx(j,{variant:"captionBold",text:c,isNumberTypography:!0}),k&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((c+d).toFixed(2))})]})]}),I=()=>!Z&&!l?null:r.jsx(r.Fragment,{children:l==null?void 0:l.map(_=>r.jsxs("div",{className:"flex gap-1 bg-brightgray px-1",children:[r.jsx(j,{text:_.label,variant:"captionBold",color:"black"}),r.jsx(j,{text:_.value,variant:"caption",color:"black"})]},_.label))});return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsx("div",{className:"flex items-center gap-2",children:r.jsxs("div",{className:"flex flex-col",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(j,{text:i,variant:"caption",color:"black"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{text:C,variant:"subtitle2",color:"black"})}),r.jsx("div",{className:"flex md:hidden items-center",children:r.jsx(Y,{icon:Z?"caretUp":"caretDown",size:16,onClick:()=>E(_=>!_)})}),r.jsx("div",{className:"hidden md:block",children:D()})]}),r.jsxs("div",{className:"flex items-start gap-1",children:[r.jsx(j,{text:`(${a})`,variant:"caption",color:"black"}),r.jsx("div",{className:"hidden md:flex flex-wrap gap-1",children:I()}),r.jsx("div",{className:"block md:hidden",children:D()})]})]})}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[x&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),p&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:y})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:H.map((_,U)=>r.jsx(s2,{marketId:t,eventId:n,providerId:s,runnerId:o,runnerName:C,item:_,color:A1.BACK_COLORS[3-h+U],index:3-h+U,type:C1.BACK,disabled:v,showSize:m,min:M,max:w,onClick:N},`${o}-${t}-${U+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:V.map((_,U)=>r.jsx(s2,{runnerId:o,runnerName:C,marketId:t,eventId:n,providerId:s,item:_,index:U,color:A1.LAY_COLORS[U],type:C1.LAY,disabled:v,showSize:m,min:M,max:w,onClick:N},`${o}-${U+1}`))})]})]}),r.jsx("div",{className:"block md:hidden",children:Z&&I()}),b&&r.jsx(j,{variant:"caption",color:"black",text:b})]})},s0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,iconName:l,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,isFreezed:f=!1,isSuspended:h=!1,suspendedMsg:m="Suspended",min:x=10,max:p=100,onOddClick:y=()=>{},notes:M=""})=>{const w=f||h,N=i!==0,b=a!==0,v=Array.from({length:d},(k,Z)=>C[3-d+Z]),L=Array.from({length:d},(k,Z)=>c[Z]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:l,cursorPointer:!1}),r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:gap-2",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!N&&!b?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(N||b)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),b&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[f&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),h&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:m})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((k,Z)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:k,color:A1.BACK_COLORS[3-d+Z],index:3-d+Z,type:C1.BACK,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${e}-${Z+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:L.map((k,Z)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:k,index:Z,color:A1.LAY_COLORS[Z],type:C1.LAY,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${Z+1}`))})]})]}),M&&r.jsx(j,{variant:"caption",color:"black",text:M})]})},o0=e=>{const{id:t,eventName:n,racingEvents:s,isTV:o=!1,onClickRedirect:i=()=>{}}=e,{isMobile:a}=V1();return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex border border-brightgray flex-col px-4 gap-1 py-1 md:flex-row md:px-10 md:gap-2 md:py-3",children:[r.jsxs("div",{className:"flex gap-2 md:min-w-80 shrink-0",children:[o&&r.jsx(Y,{icon:"tv"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:"subtitle1",text:n})})]}),r.jsx("div",{className:"flex gap-1 md:gap-2 flex-wrap",children:s&&s.length>0&&s.map(l=>r.jsx("button",{type:"button",onClick:()=>i(l.raceId,t),className:"bg-slategray py-1 px-3 rounded-sm cursor-pointer",children:r.jsx(j,{variant:a?"caption":"subtitle1",text:l.time,color:"white"})},n2(l.raceId)))})]})})},i0=e=>{switch(e.variant){case"fancy":return r.jsx(e0,{...e});case"layered":return r.jsx(t0,{...e});case"pair":return r.jsx(n0,{...e});case"racing":return r.jsx(o0,{...e});case"raceLayered":return r.jsx(s0,{...e});case"raceDetailsLayered":return r.jsx(r0,{...e});default:return null}},h3=e=>{var u,f;const{checked:t,onChange:n,disabled:s=!1,ariaLabel:o="Toggle",size:i="md",variant:a="default",content:l}=e,C=()=>{s||n==null||n(!t)},c=t?((u=l==null?void 0:l.on)==null?void 0:u.color)??"secondary":((f=l==null?void 0:l.off)==null?void 0:f.color)??"primary",d=t?l==null?void 0:l.on:l==null?void 0:l.off;return a==="compound"?r.jsxs("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:C,className:`relative ${i==="sm"?"w-16 h-6.5":"w-18 h-8"} rounded-full transition-colors duration-200 bg-white border border-offwhite shadow-lg ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[r.jsx("span",{className:`absolute top-0 left-0 ${i==="sm"?"w-6 h-6":"w-7.5 h-7.5"} rounded-full transition-all duration-200 ease-in-out flex items-center justify-center bg-${c} ${t?i==="sm"?"translate-x-9.5":"translate-x-10":"translate-x-0"}`,children:r.jsx(Y,{icon:(d==null?void 0:d.icon)??(t?"current":"currentOff"),color:"white",size:i==="sm"?16:20})}),r.jsx("span",{className:`absolute top-1/2 -translate-y-1/2 text-xs ${t?"left-2":"right-2"}`,children:r.jsx(j,{text:(d==null?void 0:d.text)??(t?"ON":"OFF"),variant:"captionBold"})})]}):r.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:C,className:`relative ${i==="sm"?"w-12 h-6":"w-16 h-8"} rounded-full transition-colors duration-200 bg-offwhite border border-neutralGray ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:r.jsx("span",{className:`absolute top-0.75 left-1 ${i==="sm"?"w-4 h-4":"w-6 h-6"} rounded-full transition-all duration-200 ease-in-out bg-${c} ${t?i==="sm"?"translate-x-6":"translate-x-8":"translate-x-0"}`})})},a0=e=>{const{competition:t,startStatus:n,title:s,time:o,id:i,isLive:a,onClick:l}=e;return r.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-brightgray bg-white",children:[r.jsxs("div",{className:"flex items-center justify-between bg-primary px-7 py-2",children:[r.jsx(j,{variant:"body1",color:"secondary",text:t}),r.jsx(r4,{text:"Live",state:a?"active":"locked",variant:"filled"})]}),r.jsxs("div",{className:"py-6 md:py-4 flex flex-col gap-3 md:gap-4 pr-3 pl-7",children:[r.jsx(j,{variant:"h4",color:"black",text:s}),r.jsxs("div",{className:"flex items-center justify-between ",children:[r.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[r.jsx(r4,{text:n,state:a?"active":"info",variant:"outlined",iconName:"timer"}),r.jsx(j,{variant:"caption",color:"slategray",text:o})]}),r.jsx("div",{children:r.jsx(o1,{variant:"ghost",text:"View",iconName:"caretRight",textColor:"techBlue",size:"small",onClick:()=>l==null?void 0:l(i)})})]})]})]})},l0={matchOdds:{supportsLimits:!0},bookmaker:{supportsLimits:!0},fancy:{supportsLimits:!1}},C0=e=>{const{eventId:t,eventName:n,eventStartTime:s,betTiming:o,betLimits:i,visible:a,onToggle:l,onEdit:C,onView:c}=e,{isMobile:d}=V1();return r.jsxs("div",{className:"w-full max-w-lg mx-auto bg-white rounded-xl shadow-sm border border-brightgray overflow-hidden",children:[r.jsxs("div",{className:"bg-primary p-2 flex flex-col md:flex-row justify-between items-start sm:items-center gap-1 md:gap-4",children:[r.jsxs("div",{className:"flex w-full justify-between md:flex-col",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:n,color:"white"}),r.jsx(j,{variant:"caption",text:s,color:"white"})]}),r.jsxs("div",{className:"flex flex-row-reverse w-full mt-1 md:w-auto md:flex-row justify-between gap-1 md:gap-4 items-center",children:[r.jsx(h3,{checked:a,onChange:u=>l(t,u)}),r.jsx(o1,{text:"Edit",iconName:"edit",variant:"secondary",iconPosition:"right",size:"small",onClick:()=>C(t)})]})]}),r.jsxs("div",{className:"py-1 md:py-2",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Timer"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:o.map(({key:u,label:f,value:h})=>r.jsxs("div",{className:"flex flex-col items-center text-center space-y-1",children:[r.jsx(j,{variant:"caption",text:f,color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:h,color:"smokyblack"})]},u))})]}),r.jsx("div",{className:"h-px w-full bg-brightgray"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Limits"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:Object.keys(l0).map(u=>{const f=i[u];return r.jsx("div",{className:"text-center space-y-1 md:space-y-2 flex justify-end flex-col",children:f?r.jsxs(r.Fragment,{children:[r.jsx(j,{variant:"caption",text:"Min / Max",color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:`${f.min} / ${X1(f.max)}`,color:"black"})]}):r.jsx(o1,{size:"small",variant:"ghost",text:"View",textColor:"techBlue",iconName:"caretRight",onClick:()=>c(t)})},u)})})]})]})]})};var w1=function(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,i;s<o;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))},c0=["onCopy","onCut","onPaste"],d0=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],u0=["onFocus","onBlur"],f0=["onInput","onInvalid","onReset","onSubmit"],h0=["onLoad","onError"],g0=["onKeyDown","onKeyPress","onKeyUp"],m0=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],p0=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],x0=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],v0=["onSelect"],w0=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],j0=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],y0=["onScroll"],M0=["onWheel"],b0=["onAnimationStart","onAnimationEnd","onAnimationIteration"],L0=["onTransitionEnd"],S0=["onToggle"],k0=["onChange"],N0=w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1([],c0,!0),d0,!0),u0,!0),f0,!0),h0,!0),g0,!0),m0,!0),p0,!0),x0,!0),v0,!0),w0,!0),j0,!0),y0,!0),M0,!0),b0,!0),L0,!0),k0,!0),S0,!0);function H0(e,t){var n={};return N0.forEach(function(s){var o=e[s];o&&(n[s]=o)}),n}function A5(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=A5(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function A2(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=A5(e))&&(s&&(s+=" "),s+=t);return s}function L1(e){if(e instanceof Date)return e.getHours();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var s=parseInt(n,10);if(!isNaN(s))return s}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function K1(e){if(e instanceof Date)return e.getMinutes();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function f2(e){if(e instanceof Date)return e.getSeconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function Z4(e){if(e instanceof Date)return e.getMilliseconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=n.split(".")[1]||"0",o=parseInt(s,10);if(!isNaN(o))return o}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function B2(e,t){t===void 0&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function W5(e){var t=B2(L1(e)),n=B2(K1(e));return"".concat(t,":").concat(n)}function Y5(e){var t=B2(L1(e)),n=B2(K1(e)),s=B2(f2(e));return"".concat(t,":").concat(n,":").concat(s)}function O4(e){var t=e.angle,n=t===void 0?0:t,s=e.name,o=e.length,i=o===void 0?100:o,a=e.oppositeLength,l=a===void 0?10:a,C=e.width,c=C===void 0?1:C;return r.jsx("div",{className:"react-clock__hand react-clock__".concat(s,"-hand"),style:{transform:"rotate(".concat(n,"deg)")},children:r.jsx("div",{className:"react-clock__hand__body react-clock__".concat(s,"-hand__body"),style:{width:"".concat(c,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-l/2,"%")}})})}var F3=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.width,C=l===void 0?1:l;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__body react-clock__".concat(a,"-mark__body"),style:{width:"".concat(C,"px"),top:0,bottom:"".concat(100-i/2,"%")}})})}),V0=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.number;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(s,"deg)"),top:"".concat(i/2,"%")},children:l})})}),_4,B3;function E0(){if(B3)return _4;B3=1;const e=(C,c,d,u)=>{if(d==="length"||d==="prototype"||d==="arguments"||d==="caller")return;const f=Object.getOwnPropertyDescriptor(C,d),h=Object.getOwnPropertyDescriptor(c,d);!t(f,h)&&u||Object.defineProperty(C,d,h)},t=function(C,c){return C===void 0||C.configurable||C.writable===c.writable&&C.enumerable===c.enumerable&&C.configurable===c.configurable&&(C.writable||C.value===c.value)},n=(C,c)=>{const d=Object.getPrototypeOf(c);d!==Object.getPrototypeOf(C)&&Object.setPrototypeOf(C,d)},s=(C,c)=>`/* Wrapped ${C}*/
66
+ ${y?"bg-yellow":""}`,children:[r.jsx(j,{variant:"smallBold",color:"black",text:i!=null&&i.odds?i.odds:"-"}),d&&r.jsx(j,{variant:"smallMedium",color:"black",text:i!=null&&i.oddsSize?X1(i.oddsSize):"-"})]})},e0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,notes:l="",batb:C=[],batl:c=[],showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,isYesNO:p=!0,onRowClick:y=()=>{},onOddClick:M=()=>{}})=>{const w=u||f,N=a!==0,b=Math.max((C==null?void 0:C.length)??0,(c==null?void 0:c.length)??0,1),v=Array.from({length:b},(E,H)=>C[H]),L=Array.from({length:b},(E,H)=>c[H]),k=p?C1.YES:C1.EVEN,Z=p?C1.NO:C1.ODD;return r.jsx("div",{className:"w-full border-x border-b border-brightgray py-1 px-2 md:px-4",children:r.jsxs("div",{className:"flex items-start gap-2 justify-between align-center",children:[r.jsxs("div",{className:"flex justify-between w-full cursor-pointer",onClick:()=>y(s),onKeyDown:()=>y(s),children:[r.jsxs("div",{className:"break-all",children:[r.jsx(j,{variant:"subtitle2",color:"black",text:o}),l&&r.jsx(j,{variant:"smallMedium",color:"black",text:l})]}),(i||N)&&r.jsx(j,{text:Number((i+a).toFixed(2)),variant:"captionBold",isNumberTypography:!0})]}),r.jsxs("div",{className:"flex gap-1 md:gap-2 items-start",children:[r.jsxs("div",{className:"relative",children:[u&&r.jsx("div",{className:"absolute inset-0 bg-freeze-pattern rounded pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsxs("div",{className:"flex gap-1",children:[r.jsx("div",{className:"flex flex-col gap-1",children:L.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.NO_COLOR:A1.ODD_COLOR,type:Z,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.NO)))}),r.jsx("div",{className:"flex flex-col gap-1",children:v.map((E,H)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:E,index:H,color:p?A1.YES_COLOR:A1.ODD_COLOR,type:k,disabled:w,showSize:d,min:m,max:x,onClick:M},n2(C1.YES)))})]})]}),r.jsxs("div",{className:"text-right w-14",children:[r.jsx(j,{variant:"smallMedium",text:"Min/Max"}),r.jsx(j,{variant:"smallMedium",text:`${X1(m)}/${X1(x)}`})]})]})]})})},t0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,batb:l=[],batl:C=[],level:c=3,showOddsSize:d=!1,isFreezed:u=!1,isSuspended:f=!1,suspendedMsg:h="Suspended",min:m=10,max:x=100,onOddClick:p=()=>{},notes:y=""})=>{const M=u||f,w=i!==0,N=a!==0,b=Array.from({length:c},(L,k)=>l[k]),v=Array.from({length:c},(L,k)=>C[k]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:items-center gap-2 min-[420px]:justify-between",children:[r.jsxs("div",{className:"flex min-[420px]:flex-col justify-between",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!w&&!N?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(w||N)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),N&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[u&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),f&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:h})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:b.map((L,k)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:L,color:A1.BACK_COLORS[k],index:k,type:C1.BACK,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${e}-${k+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((L,k)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:L,index:k,color:A1.LAY_COLORS[k],type:C1.LAY,disabled:M,showSize:d,min:m,max:x,onClick:p},`${s}-${k+1}`))})]})]}),y&&r.jsx(j,{variant:"caption",color:"black",text:y})]})},n0=({id:e,eventName:t="",inPlay:n=!1,openDate:s="",showBookmakerIcon:o=!1,showFancyIcon:i=!1,showTotalMatched:a=!1,totalMatched:l=0,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,pinned:f=!1,isFreezed:h=!1,isSuspended:m=!1,suspendedMsg:x="Suspended",onClickRedirect:p=()=>{},onOddClick:y=()=>{},onPinClick:M=()=>{}})=>{const{isMobile:w}=V1(),N=Array.from({length:d},(b,v)=>({Back:C[v],Lay:c[v]}));return r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-2 w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:`flex justify-between gap-1 ${n?"md:flex-col":"flex-col"}`,children:[r.jsx("button",{onClick:()=>p(e),type:"button",className:"cursor-pointer text-left",children:r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:w?"captionBold":"body1",text:t,underline:!0,color:"techBlue"})})}),r.jsxs("div",{className:"flex gap-1 items-center",children:[r.jsxs("div",{className:"",children:[n&&r.jsx("div",{className:"hidden md:block",children:r.jsx(j,{variant:"caption",text:R3.IN_PLAY_MSG,color:"success"})}),s&&r.jsx(j,{variant:"caption",text:s,color:"neutralGray"})]}),r.jsxs("div",{className:"flex gap-1 items-center",children:[o&&r.jsx(Y,{icon:"letterB",size:16}),i&&r.jsx(Y,{icon:"letterF",size:16}),n&&r.jsxs("span",{className:"md:hidden relative flex size-3",children:[r.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-success opacity-75"}),r.jsx("span",{className:"relative inline-flex size-3 rounded-full bg-success"})]})]})]})]}),r.jsxs("div",{className:"flex flex-row md:items-center justify-between gap-1",children:[a&&!w&&r.jsx("div",{className:"min-w-10 px-2",children:r.jsx(j,{variant:"caption",color:"slategray",text:`${R3.MATCHED_POINTS} ${X1(l)}`})}),r.jsxs("div",{className:"relative flex gap-1 flex-1",children:[h&&r.jsx("div",{className:"absolute inset-0 z-level-1 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),m&&r.jsx("div",{className:"absolute inset-0 z-level-1 flex items-center justify-center rounded border-2 border-error backdrop-blur-xs",children:r.jsx(j,{variant:"captionBold",color:"error",text:x})}),N.map(b=>r.jsx("div",{className:"flex gap-1 flex-1",children:[C1.BACK,C1.LAY].map(v=>{const L=b[v],k=v===C1.BACK,Z=k?"bg-babyBlue":"bg-peachyPink";return r.jsxs("button",{type:"button",disabled:!(L!=null&&L.odds)||h||m,onClick:()=>!h&&!m&&(y==null?void 0:y(k?C1.BACK:C1.LAY,L==null?void 0:L.odds)),className:`${Z} flex-1 min-[420px]:px-1 md:px-2 min-[420px]:py-1 rounded min-w-10 min-[420px]:min-w-12 md:min-w-18 min-h-8 text-center cursor-pointer disabled:cursor-not-allowed`,children:[r.jsx(j,{variant:"smallBold",color:"black",text:L!=null&&L.odds?L.odds:"-"}),u&&r.jsx(j,{variant:"smallMedium",color:"black",text:L!=null&&L.oddsSize?X1(L.oddsSize):"-"})]},n2(v))})},n2("Pair_Odds")))]}),r.jsx("button",{type:"button",onClick:()=>M==null?void 0:M(!f),className:"sm:ml-2",children:r.jsx(Y,{icon:f?"pinned":"pin",color:f?"error":"slategray",size:w?20:24})})]})]})},r0=e=>{const{marketId:t="0",eventId:n="0",providerId:s="0",runnerId:o,serialNo:i,position:a,details:l=[],runnerName:C="",currentValue:c=0,projectedValue:d=0,batb:u=[],batl:f=[],level:h=3,showOddsSize:m=!1,isFreezed:x=!1,isSuspended:p=!1,suspendedMsg:y="Suspended",min:M=10,max:w=100,onOddClick:N=()=>{},notes:b=""}=e,v=x||p,L=c!==0,k=d!==0,[Z,E]=g.useState(!1),H=Array.from({length:h},(_,U)=>u[3-h+U]),V=Array.from({length:h},(_,U)=>f[U]),D=()=>!L&&!k?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(L||k)&&r.jsx(j,{variant:"captionBold",text:c,isNumberTypography:!0}),k&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((c+d).toFixed(2))})]})]}),I=()=>!Z&&!l?null:r.jsx(r.Fragment,{children:l==null?void 0:l.map(_=>r.jsxs("div",{className:"flex gap-1 bg-brightgray px-1",children:[r.jsx(j,{text:_.label,variant:"captionBold",color:"black"}),r.jsx(j,{text:_.value,variant:"caption",color:"black"})]},_.label))});return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsx("div",{className:"flex items-center gap-2",children:r.jsxs("div",{className:"flex flex-col",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(j,{text:i,variant:"caption",color:"black"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{text:C,variant:"subtitle2",color:"black"})}),r.jsx("div",{className:"flex md:hidden items-center",children:r.jsx(Y,{icon:Z?"caretUp":"caretDown",size:16,onClick:()=>E(_=>!_)})}),r.jsx("div",{className:"hidden md:block",children:D()})]}),r.jsxs("div",{className:"flex items-start gap-1",children:[r.jsx(j,{text:`(${a})`,variant:"caption",color:"black"}),r.jsx("div",{className:"hidden md:flex flex-wrap gap-1",children:I()}),r.jsx("div",{className:"block md:hidden",children:D()})]})]})}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[x&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),p&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:y})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:H.map((_,U)=>r.jsx(s2,{marketId:t,eventId:n,providerId:s,runnerId:o,runnerName:C,item:_,color:A1.BACK_COLORS[3-h+U],index:3-h+U,type:C1.BACK,disabled:v,showSize:m,min:M,max:w,onClick:N},`${o}-${t}-${U+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:V.map((_,U)=>r.jsx(s2,{runnerId:o,runnerName:C,marketId:t,eventId:n,providerId:s,item:_,index:U,color:A1.LAY_COLORS[U],type:C1.LAY,disabled:v,showSize:m,min:M,max:w,onClick:N},`${o}-${U+1}`))})]})]}),r.jsx("div",{className:"block md:hidden",children:Z&&I()}),b&&r.jsx(j,{variant:"caption",color:"black",text:b})]})},s0=({marketId:e="0",eventId:t="0",providerId:n="0",runnerId:s,runnerName:o="",currentValue:i=0,projectedValue:a=0,iconName:l,batb:C=[],batl:c=[],level:d=3,showOddsSize:u=!1,isFreezed:f=!1,isSuspended:h=!1,suspendedMsg:m="Suspended",min:x=10,max:p=100,onOddClick:y=()=>{},notes:M=""})=>{const w=f||h,N=i!==0,b=a!==0,v=Array.from({length:d},(k,Z)=>C[3-d+Z]),L=Array.from({length:d},(k,Z)=>c[Z]);return r.jsxs("div",{className:"w-full border-x border-b border-brightgray py-1 px-1 md:px-4",children:[r.jsxs("div",{className:"flex flex-row items-center gap-2 justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:l,cursorPointer:!1}),r.jsxs("div",{className:"flex flex-col min-[420px]:flex-row min-[420px]:gap-2",children:[r.jsx("div",{className:"break-all",children:r.jsx(j,{text:o,variant:"subtitle2",color:"black"})}),!N&&!b?null:r.jsxs("div",{className:"flex gap-1 items-center",children:[(N||b)&&r.jsx(j,{variant:"captionBold",text:i,isNumberTypography:!0}),b&&r.jsxs(r.Fragment,{children:[r.jsx(Y,{icon:"forwardArrow",size:12,cursorPointer:!1}),r.jsx(j,{variant:"captionBold",isNumberTypography:!0,text:Number((i+a).toFixed(2))})]})]})]})]}),r.jsxs("div",{className:"relative flex gap-0.5 sm:gap-1",children:[f&&r.jsx("div",{className:"absolute inset-0 rounded bg-freeze-pattern pointer-events-auto cursor-not-allowed"}),h&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center rounded border-2 border-error bg-white/30 backdrop-blur-sm",children:r.jsx(j,{variant:"captionBold",color:"error",text:m})}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:v.map((k,Z)=>r.jsx(s2,{marketId:e,eventId:t,providerId:n,runnerId:s,runnerName:o,item:k,color:A1.BACK_COLORS[3-d+Z],index:3-d+Z,type:C1.BACK,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${e}-${Z+1}`))}),r.jsx("div",{className:"flex gap-0.5 sm:gap-1 flex-1",children:L.map((k,Z)=>r.jsx(s2,{runnerId:s,runnerName:o,marketId:e,eventId:t,providerId:n,item:k,index:Z,color:A1.LAY_COLORS[Z],type:C1.LAY,disabled:w,showSize:u,min:x,max:p,onClick:y},`${s}-${Z+1}`))})]})]}),M&&r.jsx(j,{variant:"caption",color:"black",text:M})]})},o0=e=>{const{id:t,eventName:n,racingEvents:s,isTV:o=!1,onClickRedirect:i=()=>{}}=e,{isMobile:a}=V1();return r.jsx(r.Fragment,{children:r.jsxs("div",{className:"flex border border-brightgray flex-col px-4 gap-1 py-1 md:flex-row md:px-10 md:gap-2 md:py-3",children:[r.jsxs("div",{className:"flex gap-2 md:min-w-80 shrink-0",children:[o&&r.jsx(Y,{icon:"tv"}),r.jsx("div",{className:"break-all",children:r.jsx(j,{variant:"subtitle1",text:n})})]}),r.jsx("div",{className:"flex gap-1 md:gap-2 flex-wrap",children:s&&s.length>0&&s.map(l=>r.jsx("button",{type:"button",onClick:()=>i(l.raceId,t),className:"bg-slategray py-1 px-3 rounded-sm cursor-pointer",children:r.jsx(j,{variant:a?"caption":"subtitle1",text:l.time,color:"white"})},n2(l.raceId)))})]})})},i0=e=>{switch(e.variant){case"fancy":return r.jsx(e0,{...e});case"layered":return r.jsx(t0,{...e});case"pair":return r.jsx(n0,{...e});case"racing":return r.jsx(o0,{...e});case"raceLayered":return r.jsx(s0,{...e});case"raceDetailsLayered":return r.jsx(r0,{...e});default:return null}},h3=e=>{var u,f;const{checked:t,onChange:n,disabled:s=!1,ariaLabel:o="Toggle",size:i="md",variant:a="default",content:l}=e,C=()=>{s||n==null||n(!t)},c=t?((u=l==null?void 0:l.on)==null?void 0:u.color)??"secondary":((f=l==null?void 0:l.off)==null?void 0:f.color)??"primary",d=t?l==null?void 0:l.on:l==null?void 0:l.off;return a==="compound"?r.jsxs("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:C,className:`relative ${i==="sm"?"w-16 h-6.5":"w-18 h-8"} rounded-full transition-colors duration-200 bg-white border border-offwhite shadow-lg ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[r.jsx("span",{className:`absolute top-0 left-0 ${i==="sm"?"w-6 h-6":"w-7.5 h-7.5"} rounded-full transition-all duration-200 ease-in-out flex items-center justify-center bg-${c} ${t?i==="sm"?"translate-x-9.5":"translate-x-10":"translate-x-0"}`,children:r.jsx(Y,{icon:(d==null?void 0:d.icon)??(t?"current":"currentOff"),color:"white",size:i==="sm"?16:20})}),r.jsx("span",{className:`absolute top-1/2 -translate-y-1/2 text-xs ${t?"left-2":"right-2"}`,children:r.jsx(j,{text:(d==null?void 0:d.text)??(t?"ON":"OFF"),variant:"captionBold"})})]}):r.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":o,disabled:s,onClick:C,className:`relative ${i==="sm"?"w-12 h-6":"w-16 h-8"} rounded-full transition-colors duration-200 bg-offwhite border border-neutralGray ${s?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:r.jsx("span",{className:`absolute top-0.75 left-1 ${i==="sm"?"w-4 h-4":"w-6 h-6"} rounded-full transition-all duration-200 ease-in-out bg-${c} ${t?i==="sm"?"translate-x-6":"translate-x-8":"translate-x-0"}`})})},a0=e=>{const{competition:t,startStatus:n,title:s,time:o,id:i,isLive:a,onClick:l}=e;return r.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-brightgray bg-white",children:[r.jsxs("div",{className:"flex items-center justify-between bg-primary px-7 py-2",children:[r.jsx(j,{variant:"body1",color:"secondary",text:t}),r.jsx(r4,{text:"Live",state:a?"active":"locked",variant:"filled"})]}),r.jsxs("div",{className:"py-6 md:py-4 flex flex-col gap-3 md:gap-4 pr-3 pl-7",children:[r.jsx(j,{variant:"h4",color:"black",text:s}),r.jsxs("div",{className:"flex items-center justify-between ",children:[r.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[r.jsx(r4,{text:n,state:a?"active":"info",variant:"outlined",iconName:"timer"}),r.jsx(j,{variant:"caption",color:"slategray",text:o})]}),r.jsx("div",{children:r.jsx(o1,{variant:"ghost",text:"View",iconName:"caretRight",textColor:"techBlue",size:"small",onClick:()=>l==null?void 0:l(i)})})]})]})]})},l0={matchOdds:{supportsLimits:!0},bookmaker:{supportsLimits:!0},fancy:{supportsLimits:!1}},C0=e=>{const{eventId:t,eventName:n,eventStartTime:s,betTiming:o,betLimits:i,visible:a,onToggle:l,onEdit:C,onView:c}=e,{isMobile:d}=V1();return r.jsxs("div",{className:"w-full max-w-lg mx-auto bg-white rounded-xl shadow-sm border border-brightgray overflow-hidden",children:[r.jsxs("div",{className:"bg-primary p-2 flex flex-col md:flex-row justify-between items-start sm:items-center gap-1 md:gap-4",children:[r.jsxs("div",{className:"flex w-full justify-between md:flex-col",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:n,color:"white"}),r.jsx(j,{variant:"caption",text:s,color:"white"})]}),r.jsxs("div",{className:"flex flex-row-reverse w-full mt-1 md:w-auto md:flex-row justify-between gap-1 md:gap-4 items-center",children:[r.jsx(h3,{checked:a,onChange:u=>l(t,u)}),r.jsx(o1,{text:"Edit",iconName:"edit",variant:"secondary",iconPosition:"right",size:"small",onClick:()=>C(t)})]})]}),r.jsxs("div",{className:"py-1 md:py-2",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Timer"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:o.map(({key:u,label:f,value:h})=>r.jsxs("div",{className:"flex flex-col items-center text-center space-y-1",children:[r.jsx(j,{variant:"caption",text:f,color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:h,color:"smokyblack"})]},u))})]}),r.jsx("div",{className:"h-px w-full bg-brightgray"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-1 md:gap-6 items-center px-2 py-1",children:[r.jsx(j,{variant:d?"captionBold":"subtitle1",text:"Bet Limits"}),r.jsx("div",{className:"col-span-1 md:col-span-3 grid grid-cols-3 gap-3 md:gap-6",children:Object.keys(l0).map(u=>{const f=i[u];return r.jsx("div",{className:"text-center space-y-1 md:space-y-2 flex justify-end flex-col",children:f?r.jsxs(r.Fragment,{children:[r.jsx(j,{variant:"caption",text:"Min / Max",color:"smokyblack"}),r.jsx(j,{variant:d?"captionBold":"subtitle2",text:`${f.min} / ${X1(f.max)}`,color:"black"})]}):r.jsx(o1,{size:"small",variant:"ghost",text:"View",textColor:"techBlue",iconName:"caretRight",onClick:()=>c(t)})},u)})})]})]})]})};var w1=function(e,t,n){if(n||arguments.length===2)for(var s=0,o=t.length,i;s<o;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))},c0=["onCopy","onCut","onPaste"],d0=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],u0=["onFocus","onBlur"],f0=["onInput","onInvalid","onReset","onSubmit"],h0=["onLoad","onError"],g0=["onKeyDown","onKeyPress","onKeyUp"],m0=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],p0=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],x0=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],v0=["onSelect"],w0=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],j0=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],y0=["onScroll"],M0=["onWheel"],b0=["onAnimationStart","onAnimationEnd","onAnimationIteration"],L0=["onTransitionEnd"],S0=["onToggle"],k0=["onChange"],N0=w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1(w1([],c0,!0),d0,!0),u0,!0),f0,!0),h0,!0),g0,!0),m0,!0),p0,!0),x0,!0),v0,!0),w0,!0),j0,!0),y0,!0),M0,!0),b0,!0),L0,!0),k0,!0),S0,!0);function H0(e,t){var n={};return N0.forEach(function(s){var o=e[s];o&&(n[s]=o)}),n}function A5(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=A5(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function A2(){for(var e,t,n=0,s="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=A5(e))&&(s&&(s+=" "),s+=t);return s}function L1(e){if(e instanceof Date)return e.getHours();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[0];if(n){var s=parseInt(n,10);if(!isNaN(s))return s}}}throw new Error("Failed to get hours from date: ".concat(e,"."))}function K1(e){if(e instanceof Date)return e.getMinutes();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[1]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get minutes from date: ".concat(e,"."))}function f2(e){if(e instanceof Date)return e.getSeconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=parseInt(n,10);if(!isNaN(s))return s}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function Z4(e){if(e instanceof Date)return e.getMilliseconds();if(typeof e=="string"){var t=e.split(":");if(t.length>=2){var n=t[2]||"0",s=n.split(".")[1]||"0",o=parseInt(s,10);if(!isNaN(o))return o}}throw new Error("Failed to get seconds from date: ".concat(e,"."))}function B2(e,t){t===void 0&&(t=2);var n="".concat(e);return n.length>=t?e:"0000".concat(n).slice(-t)}function W5(e){var t=B2(L1(e)),n=B2(K1(e));return"".concat(t,":").concat(n)}function Y5(e){var t=B2(L1(e)),n=B2(K1(e)),s=B2(f2(e));return"".concat(t,":").concat(n,":").concat(s)}function O4(e){var t=e.angle,n=t===void 0?0:t,s=e.name,o=e.length,i=o===void 0?100:o,a=e.oppositeLength,l=a===void 0?10:a,C=e.width,c=C===void 0?1:C;return r.jsx("div",{className:"react-clock__hand react-clock__".concat(s,"-hand"),style:{transform:"rotate(".concat(n,"deg)")},children:r.jsx("div",{className:"react-clock__hand__body react-clock__".concat(s,"-hand__body"),style:{width:"".concat(c,"px"),top:"".concat(50-i/2,"%"),bottom:"".concat(50-l/2,"%")}})})}var F3=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.width,C=l===void 0?1:l;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__body react-clock__".concat(a,"-mark__body"),style:{width:"".concat(C,"px"),top:0,bottom:"".concat(100-i/2,"%")}})})}),V0=g.memo(function(t){var n=t.angle,s=n===void 0?0:n,o=t.length,i=o===void 0?10:o,a=t.name,l=t.number;return r.jsx("div",{className:"react-clock__mark react-clock__".concat(a,"-mark"),style:{transform:"rotate(".concat(s,"deg)")},children:r.jsx("div",{className:"react-clock__mark__number",style:{transform:"rotate(-".concat(s,"deg)"),top:"".concat(i/2,"%")},children:l})})}),_4,B3;function E0(){if(B3)return _4;B3=1;const e=(C,c,d,u)=>{if(d==="length"||d==="prototype"||d==="arguments"||d==="caller")return;const f=Object.getOwnPropertyDescriptor(C,d),h=Object.getOwnPropertyDescriptor(c,d);!t(f,h)&&u||Object.defineProperty(C,d,h)},t=function(C,c){return C===void 0||C.configurable||C.writable===c.writable&&C.enumerable===c.enumerable&&C.configurable===c.configurable&&(C.writable||C.value===c.value)},n=(C,c)=>{const d=Object.getPrototypeOf(c);d!==Object.getPrototypeOf(C)&&Object.setPrototypeOf(C,d)},s=(C,c)=>`/* Wrapped ${C}*/
67
67
  ${c}`,o=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),i=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),a=(C,c,d)=>{const u=d===""?"":`with ${d.trim()}() `,f=s.bind(null,u,c.toString());Object.defineProperty(f,"name",i),Object.defineProperty(C,"toString",{...o,value:f})};return _4=(C,c,{ignoreNonConfigurable:d=!1}={})=>{const{name:u}=C;for(const f of Reflect.ownKeys(c))e(C,c,f,d);return n(C,c),a(C,c,u),C},_4}var P2={exports:{}},D4,$3;function Z0(){return $3||($3=1,D4=()=>{const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}),D4}var J2=P2.exports,T3;function O0(){return T3||(T3=1,(function(e,t){var n=J2&&J2.__awaiter||function(a,l,C,c){return new(C||(C=Promise))(function(d,u){function f(x){try{m(c.next(x))}catch(p){u(p)}}function h(x){try{m(c.throw(x))}catch(p){u(p)}}function m(x){x.done?d(x.value):new C(function(p){p(x.value)}).then(f,h)}m((c=c.apply(a,l||[])).next())})},s=J2&&J2.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(t,"__esModule",{value:!0});const o=s(Z0());function i(a,l="maxAge"){let C,c,d;const u=()=>n(this,void 0,void 0,function*(){if(C!==void 0)return;const m=x=>n(this,void 0,void 0,function*(){d=o.default();const p=x[1][l]-Date.now();if(p<=0){a.delete(x[0]),d.resolve();return}return C=x[0],c=setTimeout(()=>{a.delete(x[0]),d&&d.resolve()},p),typeof c.unref=="function"&&c.unref(),d.promise});try{for(const x of a)yield m(x)}catch{}C=void 0}),f=()=>{C=void 0,c!==void 0&&(clearTimeout(c),c=void 0),d!==void 0&&(d.reject(void 0),d=void 0)},h=a.set.bind(a);return a.set=(m,x)=>{a.has(m)&&a.delete(m);const p=h(m,x);return C&&C===m&&f(),u(),p},u(),a}t.default=i,e.exports=i,e.exports.default=i})(P2,P2.exports)),P2.exports}var R4,I3;function _0(){if(I3)return R4;I3=1;const e=E0(),t=O0(),n=new WeakMap,s=new WeakMap,o=(i,{cacheKey:a,cache:l=new Map,maxAge:C}={})=>{typeof C=="number"&&t(l);const c=function(...d){const u=a?a(d):d[0],f=l.get(u);if(f)return f.data;const h=i.apply(this,d);return l.set(u,{data:h,maxAge:C?Date.now()+C:Number.POSITIVE_INFINITY}),h};return e(c,i,{ignoreNonConfigurable:!0}),s.set(c,l),c};return o.decorator=(i={})=>(a,l,C)=>{const c=a[l];if(typeof c!="function")throw new TypeError("The decorated value must be a function");delete C.value,delete C.writable,C.get=function(){if(!n.has(this)){const d=o(c,i);return n.set(this,d),d}return n.get(this)}},o.clear=i=>{const a=s.get(i);if(!a)throw new TypeError("Can't clear a function that was not memoized!");if(typeof a.clear!="function")throw new TypeError("The cache Map can't be cleared!");a.clear()},R4=o,R4}var D0=_0();const z5=e5(D0);function R0(e){return typeof e=="string"}function P0(e,t,n){return n.indexOf(e)===t}function F0(e){return e.toLowerCase()===e}function A3(e){return e.indexOf(",")===-1?e:e.split(",")}function K4(e){if(!e)return e;if(e==="C"||e==="posix"||e==="POSIX")return"en-US";if(e.indexOf(".")!==-1){var t=e.split(".")[0],n=t===void 0?"":t;return K4(n)}if(e.indexOf("@")!==-1){var s=e.split("@")[0],n=s===void 0?"":s;return K4(n)}if(e.indexOf("-")===-1||!F0(e))return e;var o=e.split("-"),i=o[0],a=o[1],l=a===void 0?"":a;return"".concat(i,"-").concat(l.toUpperCase())}function B0(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,s=n===void 0?!0:n,o=t.fallbackLocale,i=o===void 0?"en-US":o,a=[];if(typeof navigator<"u"){for(var l=navigator.languages||[],C=[],c=0,d=l;c<d.length;c++){var u=d[c];C=C.concat(A3(u))}var f=navigator.language,h=f&&A3(f);a=a.concat(C,h)}return s&&a.push(i),a.filter(R0).map(K4).filter(P0)}var $0=z5(B0,{cacheKey:JSON.stringify});function T0(e){return $0(e)[0]||null}var g3=z5(T0,{cacheKey:JSON.stringify});function I0(e,t){return t.toLocaleString(e||g3()||void 0)}function A0(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function W0(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(A0))}function Y0(e){var t=e.className,n=e.formatHour,s=n===void 0?I0:n,o=e.hourHandLength,i=o===void 0?50:o,a=e.hourHandOppositeLength,l=e.hourHandWidth,C=l===void 0?4:l,c=e.hourMarksLength,d=c===void 0?10:c,u=e.hourMarksWidth,f=u===void 0?3:u,h=e.locale,m=e.minuteHandLength,x=m===void 0?70:m,p=e.minuteHandOppositeLength,y=e.minuteHandWidth,M=y===void 0?2:y,w=e.minuteMarksLength,N=w===void 0?6:w,b=e.minuteMarksWidth,v=b===void 0?1:b,L=e.renderHourMarks,k=L===void 0?!0:L,Z=e.renderMinuteHand,E=Z===void 0?!0:Z,H=e.renderMinuteMarks,V=H===void 0?!0:H,D=e.renderNumbers,I=e.renderSecondHand,_=I===void 0?!0:I,U=e.secondHandLength,g1=U===void 0?90:U,x1=e.secondHandOppositeLength,J=e.secondHandWidth,s1=J===void 0?1:J,S=e.size,P=S===void 0?150:S,G=e.useMillisecondPrecision,$=e.value;function h1(){if(!V)return null;for(var f1=[],i1=1;i1<=60;i1+=1){var Y1=k&&!(i1%5);Y1||f1.push(r.jsx(F3,{angle:i1*6,length:N,name:"minute",width:v},"minute_".concat(i1)))}return f1}function F(){if(!k)return null;for(var f1=[],i1=1;i1<=12;i1+=1)f1.push(r.jsx(F3,{angle:i1*30,length:d,name:"hour",width:f},"hour_".concat(i1)));return f1}function R(){if(!D)return null;for(var f1=[],i1=1;i1<=12;i1+=1)f1.push(r.jsx(V0,{angle:i1*30,length:W0(k&&d,V&&N,0),name:"number",number:s(h,i1)},"number_".concat(i1)));return f1}function l1(){return r.jsxs("div",{className:"react-clock__face",children:[h1(),F(),R()]})}function m1(){var f1=$?L1($)*30+K1($)/2+f2($)/120+(G?Z4($)/12e4:0):0;return r.jsx(O4,{angle:f1,length:i,name:"hour",oppositeLength:a,width:C})}function u1(){if(!E)return null;var f1=$?L1($)*360+K1($)*6+f2($)/10+(G?Z4($)/1e4:0):0;return r.jsx(O4,{angle:f1,length:x,name:"minute",oppositeLength:p,width:M})}function F1(){if(!_)return null;var f1=$?K1($)*360+f2($)*6+(G?Z4($)*.006:0):0;return r.jsx(O4,{angle:f1,length:g1,name:"second",oppositeLength:x1,width:s1})}return r.jsxs("time",{className:A2("react-clock",t),dateTime:$ instanceof Date?$.toLocaleTimeString("en",{hourCycle:"h23",hour:"2-digit",minute:E?"2-digit":void 0,second:_?"2-digit":void 0}):$||void 0,style:{width:P,height:P},children:[l1(),m1(),u1(),F1()]})}function M1(e){return e.getBoundingClientRect()}function W3(e,t){return{get collidedTop(){return M1(e).top<M1(t).top},get collidedBottom(){return M1(e).bottom>M1(t).bottom},get collidedLeft(){return M1(e).left<M1(t).left},get collidedRight(){return M1(e).right>M1(t).right},get overflowTop(){return M1(t).top-M1(e).top},get overflowBottom(){return M1(e).bottom-M1(t).bottom},get overflowLeft(){return M1(t).left-M1(e).left},get overflowRight(){return M1(e).right-M1(t).right}}}var P4,Y3;function z0(){if(Y3)return P4;Y3=1;var e=process.env.NODE_ENV!=="production",t=function(){};if(e){var n=function(o,i){var a=arguments.length;i=new Array(a>1?a-1:0);for(var l=1;l<a;l++)i[l-1]=arguments[l];var C=0,c="Warning: "+o.replace(/%s/g,function(){return i[C++]});typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}};t=function(s,o,i){var a=arguments.length;i=new Array(a>2?a-2:0);for(var l=2;l<a;l++)i[l-2]=arguments[l];if(o===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");s||n.apply(null,[o].concat(i))}}return P4=t,P4}var G0=z0();const z3=e5(G0);var t2=function(){return t2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},t2.apply(this,arguments)},q0=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n},U0=typeof document<"u",K0=U0&&"MutationObserver"in window;function e4(e){return e.charAt(0).toUpperCase()+e.slice(1)}function X0(e){for(var t=e.parentElement;t;){var n=window.getComputedStyle(t).overflow;if(n.split(" ").every(function(s){return s==="auto"||s==="scroll"}))return t;t=t.parentElement}return document.documentElement}function G5(e){var t=e.axis,n=e.container,s=e.element,o=e.invertAxis,i=e.scrollContainer,a=e.secondary,l=e.spacing,C=window.getComputedStyle(s),c=n.parentElement;if(!c)return;var d=W3(c,i),u=W3(c,document.documentElement),f=t==="x",h=f?"left":"top",m=f?"right":"bottom",x=f?"width":"height",p="overflow".concat(e4(h)),y="overflow".concat(e4(m)),M="scroll".concat(e4(h)),w=e4(x),N="offset".concat(w),b="client".concat(w),v="min-".concat(x),L=i[N]-i[b],k=typeof l=="object"?l[h]:l,Z=-Math.max(d[p],u[p]+document.documentElement[M])-k,E=typeof l=="object"?l[m]:l,H=-Math.max(d[y],u[y]-document.documentElement[M])-E-L;a&&(Z+=c[b],H+=c[b]);var V=s[N];function D(){s.style[h]="auto",s.style[m]=a?"0":"100%"}function I(){s.style[h]=a?"0":"100%",s.style[m]="auto"}function _(s1,S){var P=V<=s1;return P&&S(),P}function U(){return _(Z,D)}function g1(){return _(H,I)}function x1(){var s1=Z>H,S=C.getPropertyValue(v),P=S?parseInt(S,10):null;function G($){z3(!P||$>=P,"<Fit />'s child will not fit anywhere with its current ".concat(v," of ").concat(P,"px."));var h1=Math.max($,P||0);z3(!1,"<Fit />'s child needed to have its ".concat(x," decreased to ").concat(h1,"px.")),s.style[x]="".concat(h1,"px")}s1?(G(Z),D()):(G(H),I())}var J;o?J=U()||g1():J=g1()||U(),J||x1()}function Q0(e){G5(e)}function J0(e){G5(t2(t2({},e),{axis:e.axis==="x"?"y":"x",secondary:!0}))}function et(e){var t=e.invertAxis,n=e.invertSecondaryAxis,s=q0(e,["invertAxis","invertSecondaryAxis"]);Q0(t2(t2({},s),{invertAxis:t})),J0(t2(t2({},s),{invertAxis:n}))}function tt(e){var t=e.children,n=e.invertAxis,s=e.invertSecondaryAxis,o=e.mainAxis,i=o===void 0?"y":o,a=e.spacing,l=a===void 0?8:a,C=g.useRef(void 0),c=g.useRef(void 0),d=g.useRef(void 0),u=g.useRef(void 0),f=g.useRef(void 0),h=g.useCallback(function(){if(!(!f.current||!C.current||!c.current)){var p=c.current.clientWidth,y=c.current.clientHeight;if(!(d.current===p&&u.current===y)){d.current=p,u.current=y;var M=C.current.parentElement;if(M){var w=window.getComputedStyle(c.current),N=w.position;N!=="absolute"&&(c.current.style.position="absolute");var b=window.getComputedStyle(M),v=b.position;v!=="relative"&&v!=="absolute"&&(M.style.position="relative"),et({axis:i,container:C.current,element:c.current,invertAxis:n,invertSecondaryAxis:s,scrollContainer:f.current,spacing:l})}}}},[n,s,i,l]),m=g.Children.only(t);g.useEffect(function(){h();function p(){h()}if(K0&&c.current){var y=new MutationObserver(p);y.observe(c.current,{attributes:!0,attributeFilter:["class","style"]})}},[h]);function x(p){!p||!(p instanceof HTMLElement)||(c.current=p,f.current=X0(p))}return r.jsx("span",{ref:function(p){if(p){C.current=p;var y=p==null?void 0:p.firstElementChild;x(y)}},style:{display:"contents"},children:m})}function nt(e){var t=e.children;return r.jsx("span",{className:"react-time-picker__inputGroup__divider",children:t})}var rt=["normal","small-caps"];function q5(e){if(!e)return"";var t=window.getComputedStyle(e);if(t.font)return t.font;var n=t.fontFamily!=="";if(!n)return"";var s=rt.includes(t.fontVariant)?t.fontVariant:"normal";return"".concat(t.fontStyle," ").concat(s," ").concat(t.fontWeight," ").concat(t.fontSize," / ").concat(t.lineHeight," ").concat(t.fontFamily)}var G3;function st(e,t){var n=G3||(G3=document.createElement("canvas")),s=n.getContext("2d");if(!s)return null;s.font=t;var o=s.measureText(e).width;return Math.ceil(o)}function s4(e){if(typeof document>"u"||!e)return null;var t=q5(e),n=e.value||e.placeholder,s=st(n,t);return s===null?null:(e.style.width="".concat(s,"px"),s)}var m3=typeof document<"u",ot=m3?g.useLayoutEffect:g.useEffect,it=m3&&/(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent),at=m3&&/Firefox/.test(navigator.userAgent);function lt(e){var t=e.target;it?requestAnimationFrame(function(){return t.select()}):t.select()}function Ct(e){if(document.readyState==="complete")return;function t(){s4(e)}window.addEventListener("load",t)}function ct(e){if(!document.fonts)return;var t=q5(e);if(!t)return;var n=document.fonts.check(t);if(n)return;function s(){s4(e)}document.fonts.addEventListener("loadingdone",s)}function dt(e){if(e&&"selectionStart"in e&&e.selectionStart!==null&&"selectionEnd"in e&&e.selectionEnd!==null)return e.value.slice(e.selectionStart,e.selectionEnd);if("getSelection"in window){var t=window.getSelection();return t&&t.toString()}return null}function ut(e){if(e!==null)return function(n){if(!at){var s=n.key,o=n.target,i=o.value,a=s.length===1&&/\d/.test(s),l=dt(o);(!a||!(l||i.length<e))&&n.preventDefault()}}}function l4(e){var t=e.ariaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.inputRef,a=e.max,l=e.min,C=e.name,c=e.nameForClass,d=e.onChange,u=e.onKeyDown,f=e.onKeyUp,h=e.placeholder,m=h===void 0?"--":h,x=e.required,p=e.showLeadingZeros,y=e.step,M=e.value;ot(function(){!i||!i.current||(s4(i.current),Ct(i.current),ct(i.current))},[i,M]);var w=p&&M&&Number(M)<10&&(M==="0"||!M.toString().startsWith("0")),N=a?a.toString().length:null;return r.jsxs(r.Fragment,{children:[w?r.jsx("span",{className:"".concat(s,"__leadingZero"),children:"0"}):null,r.jsx("input",{"aria-label":t,autoComplete:"off",autoFocus:n,className:A2("".concat(s,"__input"),"".concat(s,"__").concat(c||C),w&&"".concat(s,"__input--hasLeadingZero")),"data-input":"true",disabled:o,inputMode:"numeric",max:a,min:l,name:C,onChange:d,onFocus:lt,onKeyDown:u,onKeyPress:ut(N),onKeyUp:function(b){s4(b.target),f&&f(b)},placeholder:m,ref:i,required:x,step:y,type:"number",value:M!==null?M:""})]})}function q3(e,t){var n=Number(e);return t==="am"&&n===12?n=0:t==="pm"&&n<12&&(n+=12),n}function y2(e){var t=Number(e)%12||12;return[t,Number(e)<12?"am":"pm"]}var F4=new Map;function U5(e){return function(n,s){var o=n||g3();F4.has(o)||F4.set(o,new Map);var i=F4.get(o);return i.has(e)||i.set(e,new Intl.DateTimeFormat(o||void 0,e).format),i.get(e)(s)}}var B4=new Map;function ft(e){return function(t,n){var s=t||g3();B4.has(s)||B4.set(s,new Map);var o=B4.get(s);return o.has(e)||o.set(e,new Intl.NumberFormat(s||void 0,e).format),o.get(e)(n)}}var ht=["9","٩"],U3=new RegExp("[".concat(ht.join(""),"]")),K3=U5({hour:"numeric"});function K5(e){var t=K3(e,new Date(2017,0,1,9)),n=K3(e,new Date(2017,0,1,21)),s=t.split(U3),o=s[0],i=s[1],a=n.split(U3),l=a[0],C=a[1];if(C!==void 0){if(o!==l)return[o,l].map(function(c){return c.trim()});if(i!==C)return[i,C].map(function(c){return c.trim()})}return["AM","PM"]}function X5(e){return e!==null&&e!==!1&&!Number.isNaN(Number(e))}function C4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.min.apply(Math,e.filter(X5))}function c4(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Math.max.apply(Math,e.filter(X5))}var X4=function(){return X4=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},X4.apply(this,arguments)},gt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function mt(e){var t=e.amPm,n=e.maxTime,s=e.minTime,o=e.value,i=gt(e,["amPm","maxTime","minTime","value"]),a=C4(12,n&&(function(){var c=y2(L1(n)),d=c[0],u=c[1];return u!==t?null:d})()),l=c4(1,s&&(function(){var c=y2(L1(s)),d=c[0],u=c[1];return u!==t||d===12?null:d})()),C=o?y2(o)[0].toString():"";return r.jsx(l4,X4({max:a,min:l,name:"hour12",nameForClass:"hour",value:C},i))}var Q4=function(){return Q4=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Q4.apply(this,arguments)},pt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function xt(e){var t=e.maxTime,n=e.minTime,s=pt(e,["maxTime","minTime"]),o=C4(23,t&&L1(t)),i=c4(0,n&&L1(n));return r.jsx(l4,Q4({max:o,min:i,name:"hour24",nameForClass:"hour"},s))}var J4=function(){return J4=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},J4.apply(this,arguments)},vt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function wt(e){var t=e.hour,n=e.maxTime,s=e.minTime,o=e.showLeadingZeros,i=o===void 0?!0:o,a=vt(e,["hour","maxTime","minTime","showLeadingZeros"]);function l(d){return t===L1(d).toString()}var C=C4(59,n&&l(n)&&K1(n)),c=c4(0,s&&l(s)&&K1(s));return r.jsx(l4,J4({max:C,min:c,name:"minute",showLeadingZeros:i},a))}var e3=function(){return e3=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},e3.apply(this,arguments)},jt=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n};function yt(e){var t=e.hour,n=e.maxTime,s=e.minTime,o=e.minute,i=e.showLeadingZeros,a=i===void 0?!0:i,l=jt(e,["hour","maxTime","minTime","minute","showLeadingZeros"]);function C(u){return t===L1(u).toString()&&o===K1(u).toString()}var c=C4(59,n&&C(n)&&f2(n)),d=c4(0,s&&C(s)&&f2(s));return r.jsx(l4,e3({max:c,min:d,name:"second",showLeadingZeros:a},l))}function Mt(e){var t=e.ariaLabel,n=e.disabled,s=e.maxTime,o=e.minTime,i=e.name,a=e.onChange,l=e.required,C=e.value,c=e.valueType,d=(function(){switch(c){case"hour":return function(h){return"".concat(L1(h),":00")};case"minute":return W5;case"second":return Y5;default:throw new Error("Invalid valueType")}})(),u=(function(){switch(c){case"hour":return 3600;case"minute":return 60;case"second":return 1;default:throw new Error("Invalid valueType")}})();function f(h){h.stopPropagation()}return r.jsx("input",{"aria-label":t,disabled:n,hidden:!0,max:s?d(s):void 0,min:o?d(o):void 0,name:i,onChange:a,onFocus:f,required:l,step:u,style:{visibility:"hidden",position:"absolute",zIndex:"-999"},type:"time",value:C?d(C):""})}function bt(e){var t=e.ariaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.inputRef,a=e.locale,l=e.maxTime,C=e.minTime,c=e.onChange,d=e.onKeyDown,u=e.required,f=e.value,h=C?y2(L1(C))[1]==="pm":!1,m=l?y2(L1(l))[1]==="am":!1,x="amPm",p=K5(a),y=p[0],M=p[1];return r.jsxs("select",{"aria-label":t,autoFocus:n,className:A2("".concat(s,"__input"),"".concat(s,"__").concat(x)),"data-input":"true","data-select":"true",disabled:o,name:x,onChange:c,onKeyDown:d,ref:i,required:u,value:f!==null?f:"",children:[!f&&r.jsx("option",{value:"",children:"--"}),r.jsx("option",{disabled:h,value:"am",children:y}),r.jsx("option",{disabled:m,value:"pm",children:M})]})}var d2=function(){return d2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},d2.apply(this,arguments)},X3={},Lt=["hour","minute","second"];function St(e){return e.dataset.input==="true"}function Q3(e,t){var n=e;do n=n[t];while(n&&!St(n));return n}function $4(e){e&&e.focus()}function kt(e,t,n){var s=[],o=new RegExp(Object.keys(t).map(function(a){return"".concat(a,"+")}).join("|"),"g"),i=e.match(o);return e.split(o).reduce(function(a,l,C){var c=l&&r.jsx(nt,{children:l},"separator_".concat(C));a.push(c);var d=i&&i[C];if(d){var u=t[d]||t[Object.keys(t).find(function(f){return d.match(f)})];if(!u)return a;!n&&s.includes(u)?a.push(d):(a.push(u(d,C)),s.push(u))}return a},[])}var t4=ft({useGrouping:!1});function Nt(e){var t=e.amPmAriaLabel,n=e.autoFocus,s=e.className,o=e.disabled,i=e.format,a=e.hourAriaLabel,l=e.hourPlaceholder,C=e.isClockOpen,c=C===void 0?null:C,d=e.locale,u=e.maxDetail,f=u===void 0?"minute":u,h=e.maxTime,m=e.minTime,x=e.minuteAriaLabel,p=e.minutePlaceholder,y=e.name,M=y===void 0?"time":y,w=e.nativeInputAriaLabel,N=e.onChange,b=e.onInvalidChange,v=e.required,L=e.secondAriaLabel,k=e.secondPlaceholder,Z=e.value,E=g.useState(null),H=E[0],V=E[1],D=g.useState(null),I=D[0],_=D[1],U=g.useState(null),g1=U[0],x1=U[1],J=g.useState(null),s1=J[0],S=J[1],P=g.useState(null),G=P[0],$=P[1],h1=g.useRef(null),F=g.useRef(null),R=g.useRef(null),l1=g.useRef(null),m1=g.useRef(null),u1=g.useState(c),F1=u1[0],f1=u1[1],i1=g.useRef(void 0);g.useEffect(function(){f1(c)},[c]),g.useEffect(function(){var O=Z;O?(V(y2(L1(O))[1]),_(L1(O).toString()),x1(K1(O).toString()),S(f2(O).toString()),$(O)):(V(null),_(null),x1(null),S(null),$(null))},[Z,m,h,f,F1]);var Y1=f,O1=(function(){var O=Lt.indexOf(f),q=X3[O]||(function(){var t1={hour:"numeric"};return O>=1&&(t1.minute="numeric"),O>=2&&(t1.second="numeric"),X3[O]=t1,t1})();return U5(q)})();function L2(O){var q=(function(){switch(Y1){case"hour":case"minute":return W5;case"second":return Y5;default:throw new Error("Invalid valueType")}})();return q(O)}var o2=i||(function(){var O=21,q=9,t1=13,a1=14,C2=new Date(2017,0,1,O,t1,a1);return O1(d,C2).replace(t4(d,q),"h").replace(t4(d,O),"H").replace(t4(d,t1),"mm").replace(t4(d,a1),"ss").replace(new RegExp(K5(d).join("|")),"a")})(),S2=(function(){var O=o2.match(/[^0-9a-z]/i);return O?O[0]:null})();function i2(O){if(O.target===O.currentTarget){var q=O.target.children[1];$4(q)}}function k2(O){switch(i1.current=O.key,O.key){case"ArrowLeft":case"ArrowRight":case S2:{O.preventDefault();var q=O.target,t1=O.key==="ArrowLeft"?"previousElementSibling":"nextElementSibling",a1=Q3(q,t1);$4(a1);break}}}function g2(O){var q=O.key,t1=O.target,a1=i1.current===q;if(a1){var C2=!isNaN(Number(q));if(C2){var Q1=t1.getAttribute("max");if(Q1){var z=t1.value;if(Number(z)*10>Number(Q1)||z.length>=Q1.length){var X="nextElementSibling",T=Q3(t1,X);$4(T)}}}}}function a2(){if(!N)return;function O(v1){return!!v1}var q=[h1.current,F.current,R.current,l1.current,m1.current].filter(O),t1=q.slice(1),a1={};q.forEach(function(v1){a1[v1.name]=v1.type==="number"?"valueAsNumber"in v1?v1.valueAsNumber:Number(v1.value):v1.value});var C2=t1.every(function(v1){return!v1.value});if(C2){N(null,!1);return}var Q1=q.every(function(v1){return v1.value}),z=q.every(function(v1){return v1.validity.valid});if(Q1&&z){var X=Number(a1.hour24||a1.hour12&&a1.amPm&&q3(a1.hour12,a1.amPm)||0),T=Number(a1.minute||0),Q=Number(a1.second||0),j1=function(v1){return"0".concat(v1).slice(-2)},K="".concat(j1(X),":").concat(j1(T),":").concat(j1(Q)),u4=L2(K);N(u4,!1);return}b&&b()}function z1(O){var q=O.target,t1=q.name,a1=q.value;switch(t1){case"amPm":V(a1);break;case"hour12":_(a1?q3(a1,H||"am").toString():"");break;case"hour24":_(a1);break;case"minute":x1(a1);break;case"second":S(a1);break}a2()}function l2(O){var q=O.target.value;if(N){var t1=q||null;N(t1,!1)}}var _1={className:s,disabled:o,maxTime:h,minTime:m,onChange:z1,onKeyDown:k2,onKeyUp:g2,required:!!(v||F1)};function N2(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(mt,d2({},_1,{amPm:H,ariaLabel:a,autoFocus:q===0&&n,inputRef:F,placeholder:l,showLeadingZeros:t1,value:I}),"hour12")}function e1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(xt,d2({},_1,{ariaLabel:a,autoFocus:q===0&&n,inputRef:R,placeholder:l,showLeadingZeros:t1,value:I}),"hour24")}function c1(O,q){return/h/.test(O)?N2(O,q):e1(O,q)}function E1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!1;return r.jsx(wt,d2({},_1,{ariaLabel:x,autoFocus:q===0&&n,hour:I,inputRef:l1,placeholder:p,showLeadingZeros:t1,value:g1}),"minute")}function B1(O,q){if(O&&O.length>2)throw new Error("Unsupported token: ".concat(O));var t1=O?O.length===2:!0;return r.jsx(yt,d2({},_1,{ariaLabel:L,autoFocus:q===0&&n,hour:I,inputRef:m1,minute:g1,placeholder:k,showLeadingZeros:t1,value:s1}),"second")}function m2(O,q){return r.jsx(bt,d2({},_1,{ariaLabel:t,autoFocus:q===0&&n,inputRef:h1,locale:d,onChange:z1,value:H}),"ampm")}function H2(){var O={h:c1,H:c1,m:E1,s:B1,a:m2},q=typeof i<"u";return kt(o2,O,q)}function p2(){return r.jsx(Mt,{ariaLabel:w,disabled:o,maxTime:h,minTime:m,name:M,onChange:l2,required:v,value:G,valueType:Y1},"time")}return r.jsxs("div",{className:s,onClick:i2,children:[p2(),H2()]})}var h2=function(){return h2=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},h2.apply(this,arguments)},Ht=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n},S1="react-time-picker",Vt=["mousedown","focusin","touchstart"],Q5={xmlns:"http://www.w3.org/2000/svg",width:19,height:19,viewBox:"0 0 19 19",stroke:"black",strokeWidth:2},Et=r.jsxs("svg",h2({},Q5,{className:"".concat(S1,"__clock-button__icon ").concat(S1,"__button__icon"),fill:"none",children:[r.jsx("circle",{cx:"9.5",cy:"9.5",r:"7.5"}),r.jsx("path",{d:"M9.5 4.5 v5 h4"})]})),Zt=r.jsxs("svg",h2({},Q5,{className:"".concat(S1,"__clear-button__icon ").concat(S1,"__button__icon"),children:[r.jsx("line",{x1:"4",x2:"15",y1:"4",y2:"15"}),r.jsx("line",{x1:"15",x2:"4",y1:"4",y2:"15"})]}));function Ot(e){var t=e.amPmAriaLabel,n=e.autoFocus,s=e.className,o=e.clearAriaLabel,i=e.clearIcon,a=i===void 0?Zt:i,l=e.clockAriaLabel,C=e.clockIcon,c=C===void 0?Et:C,d=e.closeClock,u=d===void 0?!0:d,f=e["data-testid"],h=e.hourAriaLabel,m=e.hourPlaceholder,x=e.disableClock,p=e.disabled,y=e.format,M=e.id,w=e.isOpen,N=w===void 0?null:w,b=e.locale,v=e.maxTime,L=e.maxDetail,k=L===void 0?"minute":L,Z=e.minTime,E=e.minuteAriaLabel,H=e.minutePlaceholder,V=e.name,D=V===void 0?"time":V,I=e.nativeInputAriaLabel,_=e.onClockClose,U=e.onClockOpen,g1=e.onChange,x1=e.onFocus,J=e.onInvalidChange,s1=e.openClockOnFocus,S=s1===void 0?!0:s1,P=e.required,G=e.value,$=e.secondAriaLabel,h1=e.secondPlaceholder,F=e.shouldCloseClock,R=e.shouldOpenClock,l1=Ht(e,["amPmAriaLabel","autoFocus","className","clearAriaLabel","clearIcon","clockAriaLabel","clockIcon","closeClock","data-testid","hourAriaLabel","hourPlaceholder","disableClock","disabled","format","id","isOpen","locale","maxTime","maxDetail","minTime","minuteAriaLabel","minutePlaceholder","name","nativeInputAriaLabel","onClockClose","onClockOpen","onChange","onFocus","onInvalidChange","openClockOnFocus","required","value","secondAriaLabel","secondPlaceholder","shouldCloseClock","shouldOpenClock"]),m1=g.useState(N),u1=m1[0],F1=m1[1],f1=g.useRef(null),i1=g.useRef(null);g.useEffect(function(){F1(N)},[N]);function Y1(e1){var c1=e1.reason;R&&!R({reason:c1})||(F1(!0),U&&U())}var O1=g.useCallback(function(e1){var c1=e1.reason;F&&!F({reason:c1})||(F1(!1),_&&_())},[_,F]);function L2(){u1?O1({reason:"buttonClick"}):Y1({reason:"buttonClick"})}function o2(e1,c1){c1===void 0&&(c1=u),c1&&O1({reason:"select"}),g1&&g1(e1)}function S2(e1){x1&&x1(e1),!(p||u1||!S||e1.target.dataset.select==="true")&&Y1({reason:"focus"})}var i2=g.useCallback(function(e1){e1.key==="Escape"&&O1({reason:"escape"})},[O1]);function k2(){o2(null)}function g2(e1){e1.stopPropagation()}var a2=g.useCallback(function(e1){var c1=f1.current,E1=i1.current,B1="composedPath"in e1?e1.composedPath()[0]:e1.target;B1&&c1&&!c1.contains(B1)&&(!E1||!E1.contains(B1))&&O1({reason:"outsideAction"})},[i1,O1,f1]),z1=g.useCallback(function(e1){e1===void 0&&(e1=u1),Vt.forEach(function(c1){e1?document.addEventListener(c1,a2):document.removeEventListener(c1,a2)}),e1?document.addEventListener("keydown",i2):document.removeEventListener("keydown",i2)},[u1,a2,i2]);g.useEffect(function(){return z1(),function(){z1(!1)}},[z1]);function l2(){var e1=(Array.isArray(G)?G:[G])[0],c1={amPmAriaLabel:t,hourAriaLabel:h,minuteAriaLabel:E,nativeInputAriaLabel:I,secondAriaLabel:$},E1={hourPlaceholder:m,minutePlaceholder:H,secondPlaceholder:h1};return r.jsxs("div",{className:"".concat(S1,"__wrapper"),children:[r.jsx(Nt,h2({},c1,E1,{autoFocus:n,className:"".concat(S1,"__inputGroup"),disabled:p,format:y,isClockOpen:u1,locale:b,maxDetail:k,maxTime:v,minTime:Z,name:D,onChange:o2,onInvalidChange:J,required:P,value:e1})),a!==null&&r.jsx("button",{"aria-label":o,className:"".concat(S1,"__clear-button ").concat(S1,"__button"),disabled:p,onClick:k2,onFocus:g2,type:"button",children:typeof a=="function"?g.createElement(a):a}),c!==null&&!x&&r.jsx("button",{"aria-expanded":u1||!1,"aria-label":l,className:"".concat(S1,"__clock-button ").concat(S1,"__button"),disabled:p,onClick:L2,onFocus:g2,type:"button",children:typeof c=="function"?g.createElement(c):c})]})}function _1(){if(u1===null||x)return null;var e1=e.clockProps,c1=e.portalContainer,E1=e.value,B1="".concat(S1,"__clock"),m2=A2(B1,"".concat(B1,"--").concat(u1?"open":"closed")),H2=(Array.isArray(E1)?E1:[E1])[0],p2=r.jsx(Y0,h2({locale:b,value:H2},e1));return c1?J3.createPortal(r.jsx("div",{ref:i1,className:m2,children:p2}),c1):r.jsx(tt,{children:r.jsx("div",{ref:function(O){O&&!u1&&O.removeAttribute("style")},className:m2,children:p2})})}var N2=g.useMemo(function(){return H0(l1)},[l1]);return r.jsxs("div",h2({className:A2(S1,"".concat(S1,"--").concat(u1?"open":"closed"),"".concat(S1,"--").concat(p?"disabled":"enabled"),s),"data-testid":f,id:M},N2,{onFocus:S2,ref:f1,children:[l2(),_1()]}))}const _t=e=>{const{title:t="Select Time",selectedTime:n,value:s,fullWidth:o,errorMessage:i="Invalid time range. Start time must be earlier than end time."}=e,[a,l]=g.useState(!1),[C,c]=g.useState(null),[d,u]=g.useState(null),[f,h]=g.useState(t),[m,x]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{c((s==null?void 0:s.from)??null),u((s==null?void 0:s.to)??null),!(s!=null&&s.from)&&!(s!=null&&s.to)&&h(t)},[s,t]),g.useEffect(()=>{const v=L=>{p.current&&!p.current.contains(L.target)&&l(!1)};return document.addEventListener("click",v),()=>document.removeEventListener("click",v)},[]);const y=()=>!C||!d?!0:new Date(`1970-01-01T${d}`).getTime()<new Date(`1970-01-01T${C}`).getTime(),M=v=>{const[L,k,Z]=v.split(":").map(Number);let E=L;const H=E>=12?"PM":"AM";return E=E%12,E===0&&(E=12),`${E.toString().padStart(2,"0")}:${k.toString().padStart(2,"0")}:${Z.toString().padStart(2,"0")} ${H}`},w=()=>{h(t),c(null),u(null),n({from:null,to:null})},N=()=>{if(!y()&&C&&d){const v=m?{from:C,to:d}:{from:M(C),to:M(d)};n(v),h(m?`${C} - ${d}`:`${M(C)} - ${M(d)}`),l(!1)}},b=(v,L)=>r.jsx(Ot,{onChange:k=>L(k),value:v,format:m?"HH:mm:ss":"hh:mm:ss a",locale:"en-US",maxDetail:"second",clearIcon:null,disableClock:!0,amPmAriaLabel:"Select AM/PM",className:m?"w-30":"min-w-max",hourPlaceholder:"hh",minutePlaceholder:"mm",secondPlaceholder:"ss"});return r.jsxs("div",{ref:p,className:`relative inline-block ${o?"w-full":""}`,children:[r.jsx("div",{className:o?"w-full":"w-auto",children:r.jsx(o1,{type:"button",variant:"outline",onClick:()=>l(v=>!v),text:f,iconName:"timer",fullWidth:o})}),a&&r.jsxs("div",{className:"absolute left-0 top-full z-level-3 mt-3 bg-white border border-brightgray shadow-2xl rounded-lg px-2 py-2 space-y-5 min-w-72 md:min-w-80 overflow-auto no-scrollbar",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(j,{variant:"body1",text:"Select Time Range"}),r.jsx("button",{type:"button",onClick:()=>x(v=>!v),className:`cursor-pointer text-xs px-3 py-1 rounded-full border transition-all ${m?"bg-black text-white border-black":"bg-white text-gray-600 border-gray-300 hover:bg-gray-100"}`,children:m?"24H":"12H"})]}),r.jsxs("div",{className:`flex flex-row items-center justify-center ${m?"gap-2":"gap-1"}`,children:[r.jsx("div",{className:"flex items-center",children:b(C,c)}),r.jsx("div",{className:"flex items-center",children:r.jsx(j,{variant:"body1",text:"To"})}),r.jsx("div",{className:"flex items-center",children:b(d,u)})]}),C&&d&&y()&&r.jsx(j,{variant:"caption",color:"error",text:i}),r.jsxs("div",{className:"flex justify-between gap-3",children:[r.jsx(o1,{text:"Clear",size:"extraSmall",variant:"ghost",onClick:w}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(o1,{text:"Cancel",size:"extraSmall",variant:"outline",onClick:()=>l(!1)}),r.jsx(o1,{text:"Apply",size:"extraSmall",variant:"primary",disabled:y(),onClick:N})]})]})]})]})},d4=e=>{const{title:t="",children:n,position:s="top"}=e,[o,i]=g.useState(!1),[a,l]=g.useState(s),[C,c]=g.useState({top:0,left:0}),d=g.useRef(null),u=g.useRef(null),f=g.useCallback(()=>{if(!d.current||!u.current)return;const p=d.current.getBoundingClientRect(),y=document.elementFromPoint(p.left+p.width/2,p.top+p.height/2);if(!d.current.contains(y)){i(!1);return}const M=d.current.parentElement;if(M){const V=M.getBoundingClientRect();if(p.right<V.left||p.left>V.right||p.bottom<V.top||p.top>V.bottom){i(!1);return}}if(p.right<0||p.left>window.innerWidth||p.bottom<0||p.top>window.innerHeight){i(!1);return}const w=u.current.getBoundingClientRect(),N=p.top,b=window.innerHeight-p.bottom,v=p.left,L=window.innerWidth-p.right;let k=s;s==="top"&&N<w.height&&(k="bottom"),s==="bottom"&&b<w.height&&(k="top"),s==="left"&&v<w.width&&(k="right"),s==="right"&&L<w.width&&(k="left"),l(k);let Z=0,E=0;k==="top"&&(Z=p.top-w.height-8,E=p.left+p.width/2-w.width/2),k==="bottom"&&(Z=p.bottom+8,E=p.left+p.width/2-w.width/2),k==="left"&&(Z=p.top+p.height/2-w.height/2,E=p.left-w.width-8),k==="right"&&(Z=p.top+p.height/2-w.height/2,E=p.right+8);const H=8;E<H&&(E=H),E+w.width>window.innerWidth-H&&(E=window.innerWidth-w.width-H),Z<H&&(Z=H),Z+w.height>window.innerHeight-H&&(Z=window.innerHeight-w.height-H),c({top:Z,left:E})},[s]);g.useLayoutEffect(()=>{o&&f()},[o,f]),g.useLayoutEffect(()=>{if(!o)return;const p=()=>{f()};return window.addEventListener("resize",p),window.addEventListener("scroll",p,!0),()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p,!0)}},[o,f]);const h={top:{arrow:"left-1/2 -bottom-1 translate-x-[-50%]"},bottom:{arrow:"left-1/2 -top-1 translate-x-[-50%]"},left:{arrow:"top-1/2 -right-1 translate-y-[-50%]"},right:{arrow:"top-1/2 -left-1 translate-y-[-50%]"}},m="fixed z-level-2 p-3 max-w-2xs md:max-w-sm break-words rounded-lg bg-white shadow-md",x=`absolute h-3 w-3 bg-white shadow-lg rotate-45 ${h[a].arrow}`;return r.jsxs("div",{className:"relative inline-block",ref:d,children:[r.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:n}),o&&r.jsxs("div",{ref:u,className:m,style:{top:C.top,left:C.left},children:[r.jsx("div",{className:x}),r.jsx("div",{className:"wrap-break-word whitespace-normal",children:typeof t=="string"||typeof t=="number"?r.jsx(j,{text:String(t),variant:"caption"}):t})]})]})},Dt=e=>{const{title:t,image:n,buttonProps:s,iconProps:o}=e;return r.jsx("div",{className:"w-full h-72 rounded-2xl bg-cover bg-center shadow-lg flex items-end px-5 py-10",style:{backgroundImage:`url(${n})`},children:r.jsxs("div",{className:"flex flex-col w-full items-center gap-2 sm:flex-row sm:justify-between",children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsx(j,{variant:"subtitle2",text:t,color:"white"}),o&&r.jsx(Y,{...o})]}),s&&r.jsx(o1,{...s})]})})},Rt=e=>{const{imageUrl:t,title:n,onClick:s}=e,{isMobile:o}=V1();return r.jsxs("div",{onClick:s,onKeyDown:i=>i.key==="Enter"&&(s==null?void 0:s()),className:"w-26 md:w-40 cursor-pointer active:scale-95 transition shadow-md",children:[r.jsx("div",{className:"overflow-hidden h-26 md:h-40",children:r.jsx("img",{src:t,alt:n,className:"w-full object-cover"})}),r.jsx("div",{className:"bg-primary flex items-center justify-center p-0.5 md:p-1",children:r.jsx(j,{variant:o?"smallCaps":"captionBold",text:n,color:"white"})})]})},n4={approved:"Approved",pending:"Pending",rejected:"Rejected"},J5={[n4.approved]:"active",[n4.pending]:"pending",[n4.rejected]:"suspended"},Pt=({variant:e,title:t,amount:n,details:s,qrCode:o,status:i,toDelete:a,toggle:l,handleDelete:C})=>{const c=p=>{navigator.clipboard.writeText(p)},d=J5[i]??"pending",u=e==="crypto",f=e==="bank",h=u&&o,m=u&&n,x=p=>{const y=f||u&&!p.copyable;return r.jsxs("div",{className:f?"grid grid-cols-[1fr_minmax(150px,auto)_auto] gap-3 items-center":"flex items-center justify-between gap-3",children:[y&&r.jsx(j,{variant:"body2",text:p.label,color:"white"}),r.jsx("div",{className:"break-all text-left",children:r.jsx(j,{variant:"body2",text:p.value,color:"white"})}),p.copyable?r.jsx(Y,{icon:"copy",onClick:()=>c(p.value),size:24,color:"white",className:"transition-transform duration-100 active:scale-95"}):!u&&r.jsx("div",{className:"w-6"})]})};return r.jsxs("div",{className:"rounded-2xl bg-black text-white m-1",children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 pt-3 px-3 sm:px-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"size-10 flex items-center justify-center rounded-full bg-white",children:r.jsx(Y,{icon:"bank",color:"slategray"})}),r.jsx(j,{variant:"subtitle2",text:t,color:"white"})]}),m&&r.jsx(j,{variant:"subtitle2",text:n,color:"white"}),r.jsxs("div",{className:"flex items-center gap-2",children:[l&&r.jsx(h3,{...l,size:"sm"}),i&&r.jsx(r4,{variant:"outlined",text:i,state:d,size:"xs"}),a&&r.jsx(Y,{icon:"delete",color:"white",onClick:C})]})]}),r.jsx("div",{className:"mt-2 mb-3 sm:mt-3 sm:mb-4 border-b border-dashed border-slateGray"}),r.jsxs("div",{className:"flex items-start justify-between gap-3 sm:gap-25 flex-wrap px-3 sm:px-6 pb-4",children:[r.jsx("div",{className:"flex-1 space-y-3",children:s.map(p=>r.jsx("div",{children:x(p)},p.label))}),h&&r.jsx("div",{className:"w-full sm:w-auto flex justify-center sm:justify-end",children:r.jsx("img",{src:o,alt:"QR",className:"w-36 h-36 object-contain"})})]})]})};exports.AdminBetSlip=Pe;exports.Avatar=t3;exports.BankingDetailsCard=Pt;exports.BannerCard=Dt;exports.BetSlip=Ie;exports.BetSlipModal=Qe;exports.Button=o1;exports.CHIP_STATE_MAP=J5;exports.Checkbox=I2;exports.Chip=r4;exports.CommonMarketHeader=I5;exports.CommonMarketRow=i0;exports.DatePicker=a8;exports.Dropdown=l8;exports.EventCard=C0;exports.EventDisplayCard=Se;exports.EventInfoCard=a0;exports.FileUploader=Ke;exports.FlashNotification=Je;exports.Icon=Y;exports.ImageCard=Rt;exports.InputField=A4;exports.Loader=be;exports.MaintenancePage=Re;exports.Menu=Ge;exports.Modal=m8;exports.MultiSelectDropdown=ke;exports.NotFoundPage=De;exports.NotificationBanner=Be;exports.NullState=Z5;exports.Pagination=j8;exports.PasswordFieldGroup=y8;exports.PaymentStatus=n4;exports.PhoneNumberInput=Ye;exports.ProgressBar=qe;exports.RadioGroup=Fe;exports.SearchBar=b8;exports.Skeleton=R2;exports.SnackbarProvider=_e;exports.StatsList=L8;exports.StatusDisplayCard=Me;exports.Swiper=Te;exports.TabList=je;exports.Table=ve;exports.TimePicker=_t;exports.TitleBar=Ne;exports.Toggle=h3;exports.Tooltip=Le;exports.TooltipExt=d4;exports.Typography=j;exports.UserBetSlip=$e;exports.WalletInfo=Ue;exports.ZIndexPreview=Xe;exports.snackbar=Ve;
package/dist/index.js CHANGED
@@ -13360,7 +13360,7 @@ const E4 = {
13360
13360
  onOddClick: y = () => {
13361
13361
  }
13362
13362
  }) => {
13363
- const v = u || f, S = l !== 0, M = Math.max(C == null ? void 0 : C.length, c == null ? void 0 : c.length), x = Array.from({ length: M }, (V, N) => C[N]), b = Array.from({ length: M }, (V, N) => c[N]), k = m ? u1.YES : u1.EVEN, Z = m ? u1.NO : u1.ODD;
13363
+ const v = u || f, S = l !== 0, M = Math.max((C == null ? void 0 : C.length) ?? 0, (c == null ? void 0 : c.length) ?? 0, 1), x = Array.from({ length: M }, (V, N) => C[N]), b = Array.from({ length: M }, (V, N) => c[N]), k = m ? u1.YES : u1.EVEN, Z = m ? u1.NO : u1.ODD;
13364
13364
  return /* @__PURE__ */ r.jsx("div", { className: "w-full border-x border-b border-brightgray py-1 px-2 md:px-4", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-2 justify-between align-center", children: [
13365
13365
  /* @__PURE__ */ r.jsxs(
13366
13366
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sy-ui-lib",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",