const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/arrow-left-hw5Z95Ur.js","static/vendor-B22eZgQ-.js","static/page-FortuneWheel.ts-CaqHFvhq.js","static/vendor-CV3Dtpuz.css","static/page-index.tsx-CjqyYYGG.js","static/page-FortuneWheelWinModalContent.tsx-Cc83DJT7.js","static/page-FortuneWheelErrorModalContent.tsx-B1cp3K3D.js","static/page-FortuneWheelConditionsItem.tsx-BVHKG1ji.js","static/page-styles-CLvUmTNl.css","static/page-FortuneWheelContainer.tsx-BQ1hkbDN.js","static/page-useConfigWheel.tsx-uXtcNW6R.js","static/page-fortuneWheel.ts-Dkf6sEIT.js","static/page-useWheelAvailable.tsx-ClxoE8nV.js","static/page-FortuneWheelErrorModalContent-BFVkXo22.css","static/page-FortuneWheelWinModalContent-nEuHBONv.css","static/page-hooks.ts-CvrpULRU.js","static/page-FortuneWheelConditionsModal.tsx-BArBg5SA.js","static/page-FortuneWheelConditionsModalContent.tsx-BNO77XoW.js","static/page-FortuneWheelConditionsModal-BW25NRgp.css","static/page-RewardsItem.skeleton.tsx-DQ0OqWjL.js","static/page-useWheelSpin.ts-4YMORRk5.js","static/page-easing.ts-qWcoVlrb.js","static/page-animation.ts-s8nj4IKz.js","static/page-math.ts-ELjSTDm6.js","static/page-geometry.ts-DTjSgsdU.js","static/page-useFortuneWheelSpinMutation.ts-DUUpW1li.js","static/page-wheel.ts-iP8trLQk.js","static/page-index-7wt-OMY3.css","static/page-styley-CfBxOYOg.css"])))=>i.map(i=>d[i]);
import{r as u,e as V,f as M,s as K,b as R,c as y,j as i,g as G,a as W,h as j,i as J,k as Q}from"./vendor-B22eZgQ-.js";import"./page-FortuneWheel.ts-CaqHFvhq.js";import{P as X}from"./page-FortuneWheelConditionsModal.tsx-BArBg5SA.js";import{u as Z}from"./page-FortuneWheelConditionsItem.tsx-BVHKG1ji.js";import{F as ee}from"./page-FortuneWheelConditionsModalContent.tsx-BNO77XoW.js";/* empty css                         */try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="9192c380-2c2e-4bdd-a47e-945ba4aca0cc",n._sentryDebugIdIdentifier="sentry-dbid-9192c380-2c2e-4bdd-a47e-945ba4aca0cc")}catch{}const te="modulepreload",ne=function(n){return"/"+n},D={},A=function(t,o,m){let f=Promise.resolve();if(o&&o.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),c=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=Promise.allSettled(o.map(r=>{if(r=ne(r),r in D)return;D[r]=!0;const h=r.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${p}`))return;const d=document.createElement("link");if(d.rel=h?"stylesheet":te,h||(d.as="script"),d.crossOrigin="",d.href=r,c&&d.setAttribute("nonce",c),document.head.appendChild(d),h)return new Promise((w,_)=>{d.addEventListener("load",w),d.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${r}`)))})}))}function a(e){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=e,window.dispatchEvent(c),!c.defaultPrevented)throw e}return f.then(e=>{for(const c of e||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})},se=n=>{const{refs:t=[],handler:o,isDisable:m=!1}=n;u.useEffect(()=>{if(!m){const f=a=>{var c;let e=!1;for(let r=0;r<t.length;r++)(!t[r].current||t[r].current&&((c=t[r].current)!=null&&c.contains(a.target)))&&(e=!0);e||o(a)};return document.addEventListener("mousedown",f),document.addEventListener("touchstart",f),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("touchstart",f)}}},[t,o,m])},oe=V()(M(n=>({isOpen:!1,isDialogWindowOpen:!1,setIsOpen:t=>{n({isOpen:t})},setIsDialogWindowOpen:t=>{n({isDialogWindowOpen:t})}}),{name:"DialogWindowStore"}),K),re=u.lazy(()=>A(()=>import("./arrow-left-hw5Z95Ur.js"),__vite__mapDeps([0,1,2,3]))),ie=u.lazy(()=>A(()=>import("./page-index.tsx-CjqyYYGG.js").then(n=>n.cO),__vite__mapDeps([4,2,1,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]))),ae=n=>{const{backText:t,title:o,titleComponent:m,className:f,onBack:a,onClose:e}=n,c=Z(),r=R(),h=b=>{b.preventDefault(),a&&a()},p=b=>{b.preventDefault(),e&&e()},d=y("PageTitle",f,{withBackText:!!t,withoutClose:!e&&!a,withTitle:!!o&&(!!a||!!e),onlyTitle:!a&&!e}),w=y("PageTitle__title",{onlyTitle:!a&&!e}),_=y("PageTitle__back",{onlyTitle:!a&&!e}),x=o!=="wheel.popup.again.header"&&(r==null?void 0:r.pathname.includes("chicks-azerbaijan"));return i.jsxs("div",{className:d,children:[i.jsxs("button",{type:"button",className:_,onClick:h,children:[a&&i.jsx(u.Suspense,{fallback:"",children:i.jsx(re,{})})," ",t&&i.jsx("div",{className:"PageTitle__back_text",children:c(t)})]}),i.jsx("div",{className:w,children:o&&(typeof o=="string"?c(o):o)}),!!m&&m,!e&&a&&i.jsx("div",{className:"PageTitle__back_placeholder"}),(e||x)&&i.jsx("button",{type:"button",className:"PageTitle__close",onClick:p,children:i.jsx(u.Suspense,{fallback:"",children:i.jsx(ie,{})})})]})},N="ReactModal__Body--open",ce=n=>{const{children:t,height:o="max",variation:m="primary",title:f,onClose:a,className:e,classNameHeader:c,classNameChildren:r,lock:h=!1,bottomOffset:p=76,closeOnOutsideClick:d=!1}=n,w=R(),[_,x]=u.useState(()=>typeof o=="number"?o:0),[b,H]=u.useState(0),I=oe(s=>s.isDialogWindowOpen);u.useEffect(()=>{P({canceled:!0})},[]),u.useEffect(()=>(document.body.classList.add(N),()=>{document.body.classList.remove(N)}),[]);const S=u.useMemo(()=>o==="max"?window.innerHeight-85:_+p,[o,_,p]),[{y:k},C]=G(()=>({y:S})),$=W(),L=u.useRef(null),l=u.useRef(null);u.useEffect(()=>{if(o==="auto"&&t){const s=l.current.childNodes;let g=0;for(let v=0;v<s.length;v++)g+=s[v].clientHeight;x(g)}},[o,t]);const P=({canceled:s})=>{C.start({y:0,immediate:!1,config:s?j.default:j.stiff})},E=(s=0)=>{h||(C.start({y:S,immediate:!1,config:{...j.stiff,velocity:s}}),setTimeout(()=>{a?a():$(w.pathname)},500))};u.useEffect(()=>{const s=g=>{H(g.target.scrollTop)};return l.current&&l.current.addEventListener("scroll",s),()=>{l.current&&l.current.removeEventListener("scroll",s)}},[]);const O=s=>{if(!s.touches||s.touches.length<1||!s.touches[0].clientY)return;const g=s.touches[0].clientY;l.current&&b===l.current.scrollHeight-l.current.clientHeight&&g<s.touches[0].clientY&&s.preventDefault()};u.useEffect(()=>(l.current&&l.current.addEventListener("touchmove",O,{passive:!1}),()=>{l.current&&l.current.removeEventListener("touchmove",O)}),[b]);const z=J(({event:s,last:g,velocity:[,v],direction:[,q],offset:[,T],cancel:B,canceled:U})=>{if(l.current&&l.current.contains(s.target)||h){B();return}T<-70&&B(),g?T>S*.5||v>.5&&q>0?E(v):P({canceled:U}):C.start({y:T,immediate:!0})},{from:()=>[0,k.get()],filterTaps:!0,bounds:{top:0},rubberband:!0}),F=y("BottomSheet__content",e,{[`BottomSheet__content_${m}`]:m});se({refs:[L],handler:()=>{!d||I||E(0)}});const Y=()=>navigator.userAgent.toLowerCase().indexOf("samsungbrowser")!==-1;return i.jsx(X,{children:i.jsx("div",{className:"BottomSheet",children:i.jsxs(Q.div,{className:F,ref:L,...z(),style:{height:`${Y()?window.innerHeight-85:S}px`,bottom:"0px",y:k},children:[!h&&i.jsx("div",{className:"BottomSheet__swipe"}),i.jsx("div",{className:y("BottomSheet__header",c),children:i.jsx(ae,{title:f,onClose:h?null:()=>E(0)})}),i.jsx("div",{ref:l,className:y("BottomSheet__children",r),children:t})]})})})},le=()=>{const n=W(),t=()=>{n(-1)};return i.jsx(ce,{title:"wheel.fortune.faq.header",height:"auto",onClose:t,children:i.jsx(ee,{})})},pe=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"}));export{ce as B,pe as F,ae as P,A as _,oe as a,se as u};