PageSourceSearch

https://dustbit.com/static/SpinWheelModalContent.1b456cda7e06973c5b32.js

js dustbit.com collected 2026-10-07 00:08:39 UTC 36,241 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[258],{51e3(e,t,l){l.r(t),l.d(t,{SpinWheelModalContent:()=>Re,default:()=>Ne});var n=l(58168),r=l(96540),i=l(71468),a=l(22563),o=l(99553),s=l(57647),c=l(53469),d=l(26213);const p=l(26650).A.child(d.C.SpinTheWheel,{wheelConfig:{key:()=>"spin-the-wheel",staleTime:()=>c.A.duration.lg}});var u=l(77805);const m=Object.freeze({animation:Object.freeze({duration:6200,turns:5,roulettePocketsPerReward:6,freeSpinSpeedDegPerSec:1e3,rouletteWheelSpeedRatio:.08,rouletteBallSpeedRatio:1.5,minSpinMs:1200,postResponseDelayMs:900}),defaults:Object.freeze({preset:"carnival",size:504}),geometry:Object.freeze({viewBox:"-14 -14 248 248",cx:110,cy:110,r:100}),confetti:Object.freeze({zIndex:10001,particleCount:160,spread:90})}),h=Object.freeze({carnival:{className:"spin-wheel--carnival",mode:"wheel",pointer:"arrow",bulbs:!0,bolts:!0,bezel:"metal",sliceHighlight:!1,gloss:1,rays:!1,lightSlices:[0,2,4]},neon:{className:"spin-wheel--neon",mode:"wheel",pointer:"wedge",bulbs:!1,bolts:!1,bezel:"metal",sliceHighlight:!1,gloss:.25,rays:!1,lightSlice
1s:[]},arcade:{className:"spin-wheel--arcade",mode:"wheel",pointer:"none",bulbs:!1,bolts:!1,bezel:"dark",sliceHighlight:!0,gloss:.18,rays:!1,lightSlices:[]},roulette:{className:"spin-wheel--roulette",mode:"ball",pointer:"none",bulbs:!1,bolts:!0,bezel:"metal",sliceHighlight:!1,gloss:.45,rays:!1,lightSlices:[]}});var f=l(84140);const w=/#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|hsla?\([^)]*\)/g,g=e=>{if(!e)return!1;const t=(0,f.A)(e);return!!t.isValid()&&t.isLight()};var _=l(4906),y=l(85716),v=l(43871),b=l(68151),k=l(93949);const E=Object.freeze({name:"title",description:"description"});class $ extends y.A{constructor(){super("spin_wheel_templates_translations",E)}}const x=new $,C=Object.freeze({id:"id",slug:"slug",status:"status",date_created:"dateCreated",preset:"preset",background_color:"backgroundColor",background_gradient:"backgroundGradient",accent_color:"accentColor",post_response_delay_ms:"postResponseDelayMs",spin_speed_deg_per_sec:"spinSpeedDegPerSec",image:y.A.asset("image"),reward_configs:y.A.relation("rewardConfigs",k.A,"gamification_reward_configs_id"),translations:y.A.translation("translation",x)});class S extends y.A{constructor(){super("spin_wheel_templates",C,{shouldFilterByBrand:!0,defaultDeep:()=>({reward_configs:{gamification_reward_configs_id:{_filter:(0,_.K)(),rewards_config_rakebacks:{_filter:{loyalty_rakeback_id:(0,_.K)()}},rewards_config_bonus_promotions:{_filter:{bonus_promotions_id:(0,_.K)()}},instant_money_credit_config_rewards:{_filter:{instant_money_credit_id:(0,_.K)()}}}}})})}async getWheelBySlug(e,t){return await this.get({fields:["id","slug","preset","background_color","background_gradient","accent_color","post_response_delay_ms","spin_speed_deg_per_sec","image","translations.name","translations.description","reward_configs.gamification_reward_configs_id.id","reward_configs.gamification_reward_configs_id.slug","reward_configs.gamification_reward_configs_id.type","reward_configs.gamification_reward_configs_id.background_color","reward_configs.gamification_reward_configs_id.background_gradient","reward_configs.gamification_reward_configs_id.accent_color","reward_configs.gamification_reward_configs_id.rewards_config_rakebacks.loyalty_rakeback_id.percentage","reward_configs.gamification_reward_configs_id.rewards_config_rakebacks.loyalty_rakeback_id.frequency","reward_configs.gamification_reward_configs_id.rewards_config_rakebacks.loyalty_rakeback_id.thumbnail","reward_configs.gamification_reward_configs_id.rewards_config_rakebacks.loyalty_rakeback_id.translations.value_display_label","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.bonus_money_amount","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.amount_of_real_money_to_reward","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.free_spins.*","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.currency_code.code","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.currency_code.icon","reward_configs.gamification_reward_configs_id.rewards_config_bonus_promotions.bonus_promotions_id.translations.value_display_label","reward_configs.gamification_reward_configs_id.instant_money_credit_config_rewards.instant_money_credit_id.amount","reward_configs.gamification_reward_configs_id.instant_money_credit_config_rewards.instant_money_credit_id.currency.code","reward_configs.gamification_reward_configs_id.instant_money_credit_config_rewards.instant_money_credit_id.currency.icon","reward_configs.gamification_reward_configs_id.instant_money_credit_config_rewards.instant_money_credit_id.translations.value_display_label"],filter:{slug:e},deep:(0,b.A)(t)}).then(e=>e[0])}get statuses(){return v.b}}const M=new S,A={carnaval:"carnival"},L=e=>{var t;const l=e?null!==(t=A[e])&&void 0!==t?t:e:m.defaults.preset;return h[l]?l:m.defaults.preset},R=(e,t=0)=>{if(null==e||""===e)return;const l=Number(e);return Number.isFinite(l)&&l>=t?l:void 0},N=(e,t,l,n)=>{const r=(n-90)*Math.PI/180,i=e=>Math.round(1e3*e)/1e3;return{x:i(e+l*Math.cos(r)),y:i(t+l*Math.sin(r))}},D=(e,t,l,n,r,i)=>{const a=N(e,t,n,r),o=N(e,t,n,i),s=N(e,t,l,i),c=N(e,t,l,r);return`M ${a.x} ${a.y} A ${n} ${n} 0 0 1 ${o.x} ${o.y} L ${s.x} ${s.y} A ${l} ${l} 0 0 0 ${c.x} ${c.y} Z`};var z=l(31521),P=l(6373);const I=e=>{if(null==e||"boolean"==typeof e)return"";if("string"==typeof e||"number"==typeof e)return String(e);if(Array.isArray(e))return e.map(I).join("");if(r.isValidElement(e)){const t=e.props,l="string"==typeof t.currencyCode?t.currencyCode:null,n=I(t.children);return l?`${l} ${n}`.replace(/\s+/g," ").trim():n}return""},W=e=>(e%360+360)%360;var O=l(64076),B=l(97286);const F=Object.freeze({CARNIVAL:"carnival",NEON:"neon",ARCADE:"arcade",ROULETTE:"roulette"}),j=({slug:e,onSpin:t,lang:l,onError:n,onWon:a,size:o,animationDuration:s,turns:c,spinLabel:d,acceptLabel:u})=>{var h;const{data:f,isLoading:w,error:g,refetch:_}=(0,B.I)({queryKey:p.items.wheelConfig.key(e),queryFn:()=>(async(e,t)=>{try{const l=await M.getWheelBySlug(e,t);return l?(e=>{var t,l,n,r,i,a,o;return{id:String(null!==(t=null==e?void 0:e.id)&&void 0!==t?t:""),slug:String(null!==(l=null==e?void 0:e.slug)&&void 0!==l?l:""),preset
1:L(null==e?void 0:e.preset),title:null!==(n=null!==(r=null==e||null===(i=e.translation)||void 0===i?void 0:i.title)&&void 0!==r?r:null==e?void 0:e.slug)&&void 0!==n?n:"",description:null==e||null===(a=e.translation)||void 0===a?void 0:a.description,backgroundColor:null==e?void 0:e.backgroundColor,backgroundGradient:null==e?void 0:e.backgroundGradient,accentColor:null==e?void 0:e.accentColor,postResponseDelayMs:R(null==e?void 0:e.postResponseDelayMs),spinSpeedDegPerSec:R(null==e?void 0:e.spinSpeedDegPerSec,1),image:null==e?void 0:e.image,rewardConfigs:null!==(o=null==e?void 0:e.rewardConfigs)&&void 0!==o?o:[]}})(l):null}catch(e){throw e}})(e,l),staleTime:p.items.wheelConfig.staleTime(),enabled:!!e}),{build:y}=(0,O.l)(),v=(0,r.useCallback)(e=>{var t;const l=y(e.rewardsConfigInstantMoneyCredit,e.rewardsConfigRakebacks,e.rewardsConfigBonusPromotions).map(e=>I(e).replace(/\s+/g," ").trim()).filter(Boolean),n=(null===(t=(e=>{var t,l,n,r,i,a,o,s,c;return e.type===P.e.RAKEBACKS?null===(t=e.rewardsConfigRakebacks)||void 0===t||null===(l=t.find(Boolean))||void 0===l||null===(n=l.translation)||void 0===n?void 0:n.valueDisplayLabel:e.type===P.e.BONUS?null===(r=e.rewardsConfigBonusPromotions)||void 0===r||null===(i=r.find(Boolean))||void 0===i||null===(a=i.translation)||void 0===a?void 0:a.valueDisplayLabel:e.type===P.e.INSTANT_MONEY_CREDIT?null===(o=e.rewardsConfigInstantMoneyCredit)||void 0===o||null===(s=o.find(Boolean))||void 0===s||null===(c=s.translation)||void 0===c?void 0:c.valueDisplayLabel:void 0})(e))||void 0===t?void 0:t.trim())||l[0]||"";return{label:n,rewardsSummary:l}},[y]),b=null!==(h=null==f?void 0:f.preset)&&void 0!==h?h:m.defaults.preset,k=(0,r.useMemo)(()=>f?((e=[],t,{includeRewardColors:l=!0}={})=>{const n=[];return Array.isArray(e)?(e.forEach(e=>{var r;if(!e)return;const{label:i,rewardsSummary:a}=t(e);if(null==a||!a.length)return;const o=((e,t=!0)=>{var l,n,r;const i=null===(l=e.rewardsConfigRakebacks)||void 0===l?void 0:l.find(Boolean),a=null===(n=e.rewardsConfigBonusPromotions)||void 0===n?void 0:n.find(Boolean),o=null===(r=e.rewardsConfigInstantMoneyCredit)||void 0===r?void 0:r.find(Boolean),s=t?{backgroundColor:e.backgroundColor,backgroundGradient:e.backgroundGradient,accentColor:e.accentColor}:{};return e.type===P.e.RAKEBACKS?{icon:null==i?void 0:i.thumbnail,...s}:e.type===P.e.BONUS?{icon:null==a||null===(c=a.currency)||void 0===c?void 0:c.icon,...s}:e.type===P.e.INSTANT_MONEY_CREDIT?{icon:null==o||null===(d=o.currency)||void 0===d?void 0:d.icon,...s}:s;var c,d})(e,l);n.push({id:String(null!==(r=e.id)&&void 0!==r?r:`${e.type}-${n.length}`),label:i,rewardsSummary:a,...o})}),n):n})(f.rewardConfigs,v,{includeRewardColors:b!==F.ROULETTE}):[],[f,v,b]),E=(0,r.useCallback)(e=>{f&&(null==a||a(e,f))},[f,a]),$=(({preset:e,items:t,onSpin:l,onError:n,onWon:a,size:o=m.defaults.size,animationDuration:s=m.animation.duration,turns:c=m.animation.turns,postResponseDelayMs:d=m.animation.postResponseDelayMs,spinSpeedDegPerSec:p=m.animation.freeSpinSpeedDegPerSec,spinLabel:u="SPIN",acceptLabel:h="ACCEPT",slug:f})=>{const w=(0,i.wA)(),{spin:g,isSpinning:_,error:y,winner:v,spinState:b,handleSpinComplete:k,clearError:E}=(({items:e,onSpin:t,onError:l,onWon:n,postResponseDelayMs:i=m.animation.postResponseDelayMs})=>{const[a,o]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1),[d,p]=(0,r.useState)(null),[u,h]=(0,r.useState)(null),f=(0,r.useRef)(0),w=(0,r.useCallback)(async()=>{if(s||!e.length)return;c(!0),p(null),h(null),f.current+=1;const n=f.current,r=Date.now();o({targetIndex:null,runId:n});try{const l=await t(e.map(e=>e.id)),a=((e,t)=>t&&e.length?e.findIndex(e=>e.id===t):-1)(e,null==l?void 0:l.itemId);if(a<0)throw new Error(`spin-the-wheel: winning item "${null==l?void 0:l.itemId}" not found in the wheel items`);const s=Date.now()-r,c=Math.max(0,m.animation.minSpinMs-s)+i;c>0&&await new Promise(e=>window.setTimeout(e,c)),o({targetIndex:a,runId:n})}catch(e){p(e),c(!1),o(null),null==l||l(e)}},[s,e,t,l,i]),g=(0,r.useCallback)(t=>{var l;const r=null!==(l=e[t])&&void 0!==l?l:null;c(!1),o(null),h(r),r&&(null==n||n(r))},[e,n]),_=(0,r.useCallback)(()=>p(null),[]);return{spin:w,isSpinning:s,error:d,winner:u,spinState:a,handleSpinComplete:g,clearError:_}})({items:t,onSpin:l,onError:n,onWon:a,postResponseDelayMs:d}),$=(0,r.useMemo)(()=>({items:t,preset:e,size:o,spinState:b,onSpinComplete:k,animationDuration:s,turns:c,spinSpeedDegPerSec:p,spinLabel:u,acceptLabel:h,isSpinning:_,hasWon:!!v,onSpinClick:()=>{g()}}),[t,e,o,b,k,s,c,p,u,h,_,v,g]),x=(0,r.useCallback)(()=>
1{if(!f)throw new Error("spin-the-wheel: a `slug` is required to open the wheel as a modal");w((0,z.T)(f))},[w,f]),C=(0,r.useCallback)(()=>{w((0,z.v)())},[w]);return{spin:g,isSpinning:_,error:y,winner:v,clearError:E,wheelProps:$,openModal:x,closeModal:C}})({preset:b,items:k,onSpin:t,onError:n,onWon:E,size:o,animationDuration:s,turns:c,postResponseDelayMs:null==f?void 0:f.postResponseDelayMs,spinSpeedDegPerSec:null==f?void 0:f.spinSpeedDegPerSec,spinLabel:d,acceptLabel:u,slug:e});return{config:f,isLoading:w,configError:g,refetch:_,...$}};var T=l(46942),G=l.n(T);const K=({presetConfig:e,spinning:t,tick:l,idPrefix:n})=>{const{cx:i,cy:a,r:o}=m.geometry;return r.createElement("g",{key:`sw-pointer-tick-${l}`,className:t?"spin-wheel__pointer spin-wheel__pointer--ticking":"spin-wheel__pointer",style:{transformOrigin:`${i}px ${a-o-18}px`}},"blade"===e.pointer?r.createElement(r.Fragment,null,r.createElement("path",{d:`M ${i} ${a-o-2} L ${i-24} ${a-o-30} L ${i+24} ${a-o-30} Z`,fill:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",opacity:.3,filter:`url(#sw-blur-${n})`}),r.createElement("path",{d:`M ${i-26} ${a-o-32} L ${i+26} ${a-o-32} L ${i+26} ${a-o-27} L ${i} ${a-o-2} L ${i-26} ${a-o-27} Z`,fill:"none",stroke:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",strokeWidth:"2.6",strokeLinejoin:"round"}),r.createElement("path",{d:`M ${i} ${a-o-6} L ${i-19} ${a-o-28} L ${i+19} ${a-o-28} Z`,fill:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))"})):"wedge"===e.pointer?r.createElement(r.Fragment,null,r.createElement("path",{d:`M ${i} ${a-o+10} L ${i-18} ${a-o-22} L ${i+18} ${a-o-22} Z`,fill:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",opacity:.35,filter:`url(#sw-blur-${n})`}),r.createElement("path",{d:`M ${i} ${a-o+8} L ${i-15} ${a-o-20} L ${i+15} ${a-o-20} Z`,fill:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",stroke:"var(--ip-spin-wheel-pointer-edge, var(--ip-spin-wheel-pointer-edge-default))",strokeWidth:"1.4",strokeLinejoin:"round"}),r.createElement("path",{d:`M ${i} ${a-o+1} L ${i-8} ${a-o-15} L ${i+8} ${a-o-15} Z`,fill:"oklch(1 0 0 / 0.28)"})):r.createElement(r.Fragment,null,r.createElement("path",{d:`M ${i} ${a-o+6} L ${i-12} ${a-o-18} L ${i+12} ${a-o-18} Z`,fill:`url(#sw-metal-${n})`,stroke:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))",strokeWidth:"1.2",strokeLinejoin:"round"}),r.createElement("path",{d:`M ${i} ${a-o+1} L ${i-7} ${a-o-14} L ${i+7} ${a-o-14} Z`,fill:"oklch(1 0.02 80 / 0.35)"})))},Z=({item:e,index:t,sliceAngle:l,presetConfig:n,layout:i,lightSlice
1s:a,isWinner:o,dimmed:s,idPrefix:c})=>{var d,p,u;const{cx:h,cy:f,r:_}=m.geometry,y=t*l,v=y+l,b=y+l/2,k=(0,r.useMemo)(()=>((e,t,l,n,r)=>{const i=N(e,t,l,n),a=N(e,t,l,r),o=r-n>180?1:0;return`M ${e} ${t} L ${i.x} ${i.y} A ${l} ${l} 0 ${o} 1 ${a.x} ${a.y} Z`})(h,f,_,y,v),[h,f,_,y,v]),E=(0,r.useMemo)(()=>(e=>{if(!e)return null;const t=e.match(w);return null==t||!t.length||t.length<2?null:t})(e.backgroundGradient),[e.backgroundGradient]),$=`sw-slice-grad-${c}-${t}`,x=(0,r.useMemo)(()=>e.backgroundColor?g(e.backgroundColor):null!=E&&E.length?g(E[0]):a.includes(t%6),[e.backgroundColor,E,a,t]),C="ball"===n.mode?.7*_:.88*_,S=.21*_+3,M=C-i.iconRadius-3,A=(0,r.useMemo)(()=>N(h,f,(S+M)/2,b),[h,f,S,M,b]),L=(0,r.useMemo)(()=>N(h,f,C,b),[h,f,b,C]),R=E?`url(#${$})`:null!==(d=e.backgroundColor)&&void 0!==d?d:`var(--ip-spin-wheel-slice-${t%6+1}, var(--ip-spin-wheel-slice-${t%6+1}-default))`,D=e.label,z=Math.max(0,(null!==(p=null===(u=e.rewardsSummary)||void 0===u?void 0:u.length)&&void 0!==p?p:1)-1),P=(0,r.useMemo)(()=>((e,t=2)=>{const l=e.split(/\s+/).filter(Boolean);if(l.length<=1)return[e||""];if(e.length<=12)return[e];if(l.length<=t)return l;let n=[l[0],l.slice(1).join(" ")],r=Math.max(n[0].length,n[1].length);for(let e=1;e<l.length-1;e++){const t=l.slice(0,e+1).join(" "),i=l.slice(e+1).join(" "),a=Math.max(t.length,i.length);a<r&&(r=a,n=[t,i])}return n})(D,2),[D]),I=z>0?` +${z}`:"",W=P.length,O=P.reduce((e,t,l)=>{const n=t.length+(l===W-1?I.length:0);return Math.max(e,n)},0),B=(S+M)/2*2*Math.sin(l*Math.PI/360),F=Math.min(i.labelFontSize,(M-S)/Math.max(1,O)/.6,B/(1.2*W)),j=1.2*F,T=b-90;return r.createElement("g",{className:"spin-wheel__slice",style:s?{opacity:.42}:void 0},E?r.createElement("defs",null,r.createElement("linearGradient",{id:$,x1:"0%",y1:"0%",x2:"100%",y2:"100%"},E.map((e,t)=>r.createElement("stop",{key:`${$}-${t}`,offset:`${Math.round(t/(E.length-1)*100)}%`,stopColor:e})))):null,r.createElement("path",{d:k,fill:R,style:o?{filter:"brightness(1.14) saturate(1.2)"}:void 0}),r.createElement("path",{d:k,fill:`url(#sw-slice-gloss-${c})`,opacity:(x?.4:1)*n.gloss}),r.createElement("path",{d:k,fill:"none",stroke:"dark"===n.bezel?"var(--ip-spin-wheel-spoke, var(--ip-spin-wheel-spoke-default))":"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))",strokeWidth:"dark"===n.bezel?1.6:.6,strokeOpacity:"0.5"}),i.showIcon&&e.icon?r.createElement("g",{transform:`rotate(${b} ${L.x} ${L.y})`},r.createElement("circle",{cx:L.x,cy:L.y,r:i.iconRadius,fill:x?"oklch(0.42 0.23 292 / 0.14)":"oklch(0.99 0.02 300 / 0.16)"}),r.createElement("circle",{cx:L.x,cy:L.y,r:i.iconRadius,fill:"none",stroke:"var(--ip-spin-wheel-metal-middle, var(--ip-spin-wheel-metal-middle-default))",strokeWidth:"1",strokeOpacity:"0.9"}),r.createElement("image",{href:e.icon,x:L.x-i.iconRadius+2,y:L.y-i.iconRadius+2,width:2*i.iconRadius-4,height:2*i.iconRadius-4,preserveAspectRatio:"xMidYMid meet"})):null,r.createElement("g",{transform:`rotate(${T} ${A.x} ${A.y})`},r.createElement("text",{x:A.x,y:A.y-(W-1)*j/2,textAnchor:"middle",dominantBaseline:"middle",className:"spin-wheel__slice-label",style:{fontSize:F,letterSpacing:"0.02em",fill:"var(--ip-spin-wheel-label, var(--ip-spin-wheel-label-default))",paintOrder:"stroke",stroke:"oklch(0.18 0.04 260 / 0.8)",strokeWidth:1}},P.map((e,t)=>r.createElement("tspan",{key:t,x:A.x,dy:0===t?0:j},e,t===W-1&&z>0?r.createElement("tspan",{className:"spin-wheel__slice-more-label",style:{fill:"var(--ip-spin-wheel-config-accent, var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default)))"}},` +${z}`):null)))))},q=r.memo(Z);var H,U,Y,V,X,J,Q,ee,te,le,ne,re,ie,ae,oe,se,ce,de,pe,ue,me,he,fe,we,ge,_e,ye,ve,be,ke,Ee,$e;const xe=97,Ce=92,Se=({items:e,preset:t=m.defaults.preset,size:l=m.defaults.size,spinState:n=null,animationDuration:i=m.animation.duration,turns:a=m.animation.turns,spinSpeedDegPerSec:o=m.animation.freeSpinSpeedDegPerSec,disabled:s=!1,onSpinComplete:c,className:d="",spinLabel:p="SPIN",acceptLabel:u="ACCEPT",isSpinning:f=!1,hasWon:w=!1,onSpinClick:g})=>{var _,y;const v=null!==(_=h[t])&&void 0!==_?_:h[m.defaults.preset],{cx:b,cy:k,r:E}=m.geometry,$=e.length,x=(0,r.useMemo)(()=>(e=>{const t=Math.max(1,e);return{sliceAngle:360/t,labelFontSize:Math.min(7.8,Math.max(3.6,7.8*(t<=6?1:6/t))),showIcon:t<=12,iconRadius:t<=8?7:6,maxLabelLength:16}})($),[$]),{sliceAngle:C}=x,S="ball"===v.mode,M=!S&&"none"!==v.pointer,A=(0,r.useId)().replace(/[^a-zA-Z0-9]/g,""),[L,R]=(0,r.useState)(!1),[z,P]=(0,r.useState)(null),[I,O]=(0,r.useState)(0),[B,F]=(0,r.useState)(null),[j,T]=(0,r.useState)({x:0,y:0}),Z=(0,r.useRef)(0),Se=(0,r.useRef)(0),Me=(0,r.useRef)(null),Ae=(0,r.useRef)(null),Le=(0,r.useRef)(null),Re=(0,r.useRef)(null),Ne=(0,r.useRef)(null),De=(0,r.useRef)(null),ze=(0,r.useCallback)(e=>{var t;null===(t=Me.current)||void 0===t||t.setAttribute("style",`transform: rotate(${e}deg); transform-origin: ${b}px ${k}px`)},[b,k]),Pe=(0,r.useCallback)((e,t)=>{var l;null===(l=Ae.current)||void 0===l||l.setAttribute("transform",`rotate(${e} ${b} ${k}) translate(0 ${(xe-t).toFixed(2)})`)},[b,k]),Ie=(0,r.useRef)(c);Ie.current=c;const We=(0,r.useCallback)(e=>{var t;R(!1),P(e),null===(t=Ie.current)||void 0===t||t.call(Ie,e)}
1,[]),Oe=(0,r.useCallback)(()=>{s||f||null==g||g()},[s,f,g]),Be=(0,r.useCallback)(e=>{if(L||0===$)return void F(null);const t=Le.current;if(!t)return;const l=t.getBoundingClientRect(),[n,r,i,a]=m.geometry.viewBox.split(/\s+/).map(Number),o=n+(e.clientX-l.left)/l.width*i,s=r+(e.clientY-l.top)/l.height*a,c=o-b,d=s-k,p=Math.hypot(c,d);if(p>E||p<.3*E)return void F(null);const u=(((180*Math.atan2(c,-d)/Math.PI+360)%360-Z.current)%360+360)%360;F(Math.floor(u/C));const h=e.clientX-l.left,f=e.clientY-l.top;T({x:Math.min(h,Math.max(0,l.width-300-14)),y:f})},[L,$,C,b,k,E]),Fe=(0,r.useCallback)(()=>{F(null)},[]),je=w?u:p;(0,r.useEffect)(()=>{if(!n||0===$||s)return;const{targetIndex:e}=n;if(P(null),R(!0),F(null),M&&(De.current=setInterval(()=>O(e=>e+1),120)),null===e){let e=performance.now();const t=l=>{const n=Math.min(50,l-e)/1e3;if(e=l,S){const e=o*m.animation.rouletteWheelSpeedRatio,t=o*m.animation.rouletteBallSpeedRatio;Z.current+=e*n,Se.current-=t*n,ze(Z.current),Pe(Se.current,xe)}else Z.current+=o*n,ze(Z.current);Ne.current=requestAnimationFrame(t)};Ne.current=requestAnimationFrame(t)}else if(S){const t=m.animation.roulettePocketsPerReward,l=C/t,n=Math.floor(t/2),r=e*C+n*l+l/2,a=Z.current,s=o*m.animation.rouletteWheelSpeedRatio/1e3*i,c=e=>a+s*e,d=Se.current,p=.9,u=e=>1-Math.pow(1-e/p,2.9),h=c(p)+r,f=o*m.animation.rouletteBallSpeedRatio*i/(2.9/p*1e3),w=((d-h)%360+360)%360,g=-(w+360*Math.max(1,Math.round((f-w)/360))),_=xe,y=84,v=.62,b=performance.now(),k=()=>{const t=Math.min(1,(performance.now()-b)/i),n=c(t);let a,o;if(ze(n),t<p){a=d+g*u(t);const e=Math.max(0,(t-v)/(p-v));if(o=_-e*e*(3-2*e)*(_-y),o<Ce){const t=Math.min(1,(Ce-o)/(Ce-y)),n=a/l,r=Math.pow(1-e,1.8)*t;o+=6*r*Math.abs(Math.sin(n*Math.PI))+3*r*Math.max(0,Math.sin(n*Math.PI*3)),o=Math.min(o,Ce)}}else{const e=(t-p)/(1-p),i=Math.pow(1-e,2.2);a=n+r+i*l*.5*Math.sin(e*Math.PI*7),o=y+3.2*i*Math.abs(Math.cos(e*Math.PI*5))}Se.current=a,Pe(a,o),t<1?Re.current=requestAnimationFrame(k):(Re.current=null,Z.current=c(1),ze(c(1)),We(e))};Re.current=requestAnimationFrame(k)}else{const t=Math.max(1,o),l=Z.current,n=Math.max(1,Math.round(a*(t/m.animation.freeSpinSpeedDegPerSec))),r=(({currentRotation:e,targetIndex:t,count:l,turns:n,jitterDeg:r=0})=>{const i=360/Math.max(1,l),a=W(e),o=W(360-(t*i+i/2+r));return e+360*n+W(o-a)})({currentRotation:l,targetIndex:e,count:$,turns:n,jitterDeg:(Math.random()-.5)*C*.5}),i=r-l,s=Math.min(16e3,3*i*1e3/t),c=performance.now(),d=()=>{const t=Math.min(1,(performance.now()-c)/s),n=1-Math.pow(1-t,3),a=l+i*n;Z.current=a,ze(a),t<1?Re.current=requestAnimationFrame(d):(Re.current=null,Z.current=r,ze(r),We(e))};Re.current=requestAnimationFrame(d)}return()=>{Re.current&&cancelAnimationFrame(Re.current),Re.current=null,Ne.current&&cancelAnimationFrame(Ne.current),Ne.current=null,De.current&&clearInterval(De.current),De.current=null}},[n,$,s,S,M,C,i,a,o,We,b,k,ze,Pe]);const Te=null!==B?e[B]:null;return r.createElement("div",{className:G()("spin-wheel",v.className,d),style:{width:l},role:"img","aria-label":"Spin the wheel"},r.createElement("div",{className:"spin-wheel__canvas"},v.rays?r.createElement("div",{className:G()("spin-wheel__rays",L&&"spin-wheel__rays--active"),"aria-hidden":"true"}):null,r.createElement("div",{className:G()("spin-wheel__halo",L&&"spin-wheel__halo--active"),"aria-hidden":"true"}),r.createElement("svg",{ref:Le,viewBox:m.geometry.viewBox,className:"spin-wheel__svg",onMouseMove:Be,onMouseLeave:Fe},r.createElement("defs",null,r.createElement("linearGradient",{id:`sw-ball-apron-${A}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%"},H||(H=r.createElement("stop",{offset:"0%",stopColor:"oklch(0.52 0.09 60)"})),U||(U=r.createElement("stop",{offset:"35%",stopColor:"oklch(0.4 0.07 55)"})),Y||(Y=r.createElement("stop",{offset:"60%",stopColor:"oklch(0.58 0.1 62)"})),V||(V=r.createElement("stop",{offset:"100%",stopColor:"oklch(0.36 0.06 52)"}))),r.createElement("linearGradient",{id:`sw-metal-${A}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%"},X||(X=r.createElement("stop",{offset:"0%",stopColor:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))"})),J||(J=r.createElement("stop",{offset:"22%",stopColor:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))"})),Q||(Q=r.createElement("stop",{offset:"45%",stopColor:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))"})),ee||(ee=r.createElement("stop",{offset:"62%",stopColor:"var(--ip-spin-wheel-metal-middle, var(--ip-spin-wheel-metal-middle-default))"})),te||(te=r.createElement("stop",{offset:"80%",stopColor:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))"})),le||(le=r.createElement("stop",{offset:"100%",stopColor:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))"}))),r.createElement("linearGradient",{id:`sw-metal-inner-${A}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},ne||(ne=r.createElement("stop",{offset:"0%",stopColor:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))"})),re||(re=r.createElement("stop",{offset:"40%",stopColor:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))"})),ie||(ie=r.createElement("stop",{offset:"100%",stopColor:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))"}))),r.createElement("linearGradient",{id:`sw-slice-gloss-${A}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},ae||(ae=r.createElement("stop",{offset:"0%",stopColor:"oklch(1 0 0 / 0.34)"})),oe||(oe=r.createElement("stop",{offset:"42%",stopColor:"oklch(1 0 0 / 0.06)"})),se||(se=r.createElement("stop",{offset:"100%",stopColor:"oklch(0 0 0 / 0.28)"}))),r.createElement("radialGradient",{id:`sw-sheen-${A}`,cx:"32%",cy:"20%",r:"82%"},ce||(ce=r.createElement("stop",{offset:"0%",stopColor:"oklch(1 0 0 / 0.3)"})),de||(de=r.createElement("stop",{offset:"55%",stopColor:"oklch(1 0 0 / 0)"})),pe||(pe=r.createElement("stop",{offset:"100%",stopColor:"oklch(0 0 0 / 0.3)"}))),r.createElement("radialGradient",{id:`sw-hub-metal-${A}`,cx:"34%",cy:"24%",r:"80%"},ue||(ue=r.createElement("stop",{offset:"0%",stopColor:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))"})),me||(me=r.createElement("stop",{offset:"55%",stopColor:"var(--ip-spin-wheel-metal-middle, var(--ip-spin-wheel-metal-middle-default))"})),he||(he=r.createElement("stop",{offset:"100%",stopColor:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))"}))),r.createElement("radialGradient",{id:`sw-bulb-face-${A}`,cx:"35%",cy:"30%",r:"75%"},fe||(fe=r.createElement("stop",{offset:"0%",stopColor:"oklch(1 0 0)"})),we||(we=r.createElement("stop",{offset:"55%",stopColor:"var(--ip-spin-wheel-bulb, var(--ip-spin-wheel-bulb-default))"})),ge||(ge=r.createElement("stop",{offset:"100%",stopColor:"oklch(0.76 0.11 62)"}))),r.createElement("radialGradient",{id:`sw-ball-${A}`,cx:"32%",cy:"26%",r:"80%"},_e||(_e=r.createElement("stop",{offset:"0%",stopColor:"oklch(1 0 0)"})),ye||(ye=r.createElement("stop",{offset:"55%",stopColor:"var(--ip-spin-wheel-ball, var(--ip-spin-wheel-ball-default))"})),ve||(ve=r.createElement("stop",{offset:"100%",stopColor:"var(--ip-spin-wheel-ball-shade, var(--ip-spin-wheel-ball-shade-default))"}))),r.createElement("filter",{id:`sw-blur-${A}`,x:"-30%",y:"-30%",width:"160%",height:"160%"},be||(be=r.createElement("feGaussianBlur",{stdDeviation:"2.2"}))),r.createElement("filter",{id:`sw-bulb-glow-${A}`,x:"-120%",y:"-120%",width:"340%",height:"340%"},ke||(ke=r.createElement("feGaussianBlur",{stdDeviation:"1.4"})))),"dark"===v.bezel?r.createElement(r.Fragment,null,r.createElement("circle",{cx:b,cy:k,r:E+17,fill:"var(--ip-spin-wheel-rim, var(--ip-spin-wheel-rim-default))"}),r.createElement("circle",{cx:b,cy:k,r:E+17,fill:"none",stroke:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))",strokeWidth:"1",strokeOpacity:"0.7"}),r.createElement("circle",{cx:b,cy:k,r:E+5,fill:"none",stroke:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))",strokeWidth:"1.2",strokeOpacity:"0.8"})):r.createElement(r.Fragment,null,r.createElement("circle",{cx:b,cy:k,r:E+16,fill:`url(#sw-metal-${A})`}),r.createElement("circle",{cx:b,cy:k,r:E+16,fill:"none",stroke:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))",strokeWidth:"1.2",strokeOpacity:"0.55"}),r.createElement("circle",{cx:b,cy:k,r:E+9,fill:"none",stroke:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))",strokeWidth:"1.6",strokeOpacity:"0.55"}),r.createElement("circle",{cx:b,cy:k,r:E+2.5,fill:"none",stroke:"var(--ip-spin-wheel-metal-low, var(--ip-spin-wheel-metal-low-default))",strokeWidth:"1.6",strokeOpacity:"0.5"})),v.bulbs?r.createElement("g",null,Array.from({length:28}).map((e,t)=>{const l=N(b,k,E+6,360/28*t);return r.createElement("g",{key:`sw-bulb-${t}`,className:L?"spin-wheel__bulb":void 0,style:L?{animationDelay:t%4*.15+"s"}:void 0},r.createElement("circle",{cx:l.x,cy:l.y,r:3.4,fill:"var(--ip-spin-wheel-bulb, var(--ip-spin-wheel-bulb-default))",opacity:.35,filter:`url(#sw-bulb-glow-${A})`}),r.createElement("circle",{cx:l.x,cy:l.y,r:1.5,fill:`url(#sw-bulb-face-${A})`}))})):null,v.bolts?r.createElement("g",null,Array.from({length:8}).map((e,t)=>{const l=N(b,k,E+12.5,45*t+22.5);return r.createElement("g",{key:`sw-bolt-${t}`},r.createElement("circle",{cx:l.x,cy:l.y,r:4.6,fill:"var(--ip-spin-wheel-bulb, var(--ip-spin-wheel-bulb-default))",opacity:.22,filter:`url(#sw-bulb-glow-${A})`}),r.createElement("circle",{cx:l.x,cy:l.y,r:2.9,fill:`url(#sw-bulb-face-${A})`}))})):null,r.createElement("g",{ref:Me,style:{transform:"rotate(0deg)",transformOrigin:`${b}px ${k}px`}}
1,e.map((e,t)=>r.createElement(q,{key:`sw-slice-${e.id}`,item:e,index:t,sliceAngle:C,presetConfig:v,layout:x,lightSlices:v.lightSlices,isWinner:z===t,dimmed:null!==z&&z!==t,idPrefix:A})),e.map((e,t)=>{const l=N(b,k,E,t*C);return r.createElement("line",{key:`sw-spoke-${e.id}`,x1:b,y1:k,x2:l.x,y2:l.y,stroke:"dark"===v.bezel?"var(--ip-spin-wheel-spoke, var(--ip-spin-wheel-spoke-default))":`url(#sw-metal-${A})`,strokeWidth:"dark"===v.bezel?2.6:1.4,strokeOpacity:"0.9"})}),"dark"===v.bezel||S?null:e.map((e,t)=>{const l=N(b,k,E-3.2,t*C);return r.createElement("g",{key:`sw-peg-${e.id}`},r.createElement("circle",{cx:l.x,cy:l.y,r:3.4,fill:"oklch(0 0 0 / 0.28)"}),r.createElement("circle",{cx:l.x,cy:l.y,r:2.6,fill:`url(#sw-hub-metal-${A})`}),r.createElement("circle",{cx:l.x-.7,cy:l.y-.7,r:.9,fill:"oklch(1 0.02 95 / 0.85)"}))}),S?r.createElement("g",null,r.createElement("circle",{cx:b,cy:k,r:(Ce+E)/2,fill:"none",stroke:`url(#sw-ball-apron-${A})`,strokeWidth:E-Ce+3}),r.createElement("circle",{cx:b,cy:k,r:92.6,fill:"none",stroke:"oklch(1 0.03 95 / 0.35)",strokeWidth:"0.9"}),r.createElement("circle",{cx:b,cy:k,r:86,fill:"none",stroke:"oklch(0 0 0 / 0.55)",strokeWidth:12}),Array.from({length:$*m.animation.roulettePocketsPerReward}).map((t,l)=>{var n,i;const a=m.animation.roulettePocketsPerReward,o=C/a,s=l*o,c=Math.floor(l/a),d=null!==(n=null===(i=e[c])||void 0===i?void 0:i.backgroundColor)&&void 0!==n?n:`var(--ip-spin-wheel-slice-${c%6+1}, var(--ip-spin-wheel-slice-${c%6+1}-default))`,p=N(b,k,79,s),u=N(b,k,Ce,s),h=N(b,k,84,s+o/2);return r.createElement("g",{key:`sw-fret-${l}`},r.createElement("path",{d:D(b,k,79,Ce,s,s+o),fill:l%2==0?d:"oklch(0.16 0.02 260)",fillOpacity:l%2==0?.92:1}),r.createElement("line",{x1:p.x,y1:p.y,x2:u.x,y2:u.y,stroke:`url(#sw-metal-${A})`,strokeWidth:"1.7",strokeLinecap:"round"}),r.createElement("circle",{cx:h.x,cy:h.y,r:1.1,fill:"oklch(0 0 0 / 0.4)"}))}),r.createElement("circle",{cx:b,cy:k,r:79,fill:"none",stroke:`url(#sw-metal-${A})`,strokeWidth:"1.6"})):null),r.createElement("circle",{cx:b,cy:k,r:E,fill:`url(#sw-sheen-${A})`,pointerEvents:"none"}),r.createElement("g",{className:"spin-wheel__hub",pointerEvents:"none"},r.createElement("circle",{cx:b,cy:k,r:19,fill:`url(#sw-hub-metal-${A})`}),r.createElement("circle",{cx:b,cy:k,r:19,fill:"none",stroke:"var(--ip-spin-wheel-metal-high, var(--ip-spin-wheel-metal-high-default))",strokeWidth:"0.8",strokeOpacity:"0.8"})),v.sliceHighlight&&$>0?(()=>{const e=C/2,t=N(b,k,21,-e),l=N(b,k,E,-e),n=N(b,k,E,e),i=N(b,k,21,e),a=`M ${t.x} ${t.y} L ${l.x} ${l.y} A ${E} ${E} 0 0 1 ${n.x} ${n.y} L ${i.x} ${i.y}`;return r.createElement("g",null,r.createElement("path",{d:a,fill:"none",stroke:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",strokeWidth:"6",strokeOpacity:"0.35",filter:`url(#sw-blur-${A})`}),r.createElement("path",{d:a,fill:"none",stroke:"var(--ip-spin-wheel-pointer, var(--ip-spin-wheel-pointer-default))",strokeWidth:"2.6",strokeLinejoin:"round"}))})():null,S?r.createElement(r.Fragment,null,r.createElement("circle",{cx:b,cy:k,r:92,fill:"none",stroke:"oklch(0 0 0 / 0.3)",strokeWidth:"9"}),r.createElement("circle",{cx:b,cy:k,r:92,fill:"none",stroke:`url(#sw-metal-${A})`,strokeWidth:"1",strokeOpacity:"0.5"}),r.createElement("g",{ref:Ae,transform:`rotate(0 ${b} ${k}) translate(0 0)`},r.createElement("ellipse",{cx:b,cy:k-xe+4,rx:5,ry:2.4,fill:"oklch(0 0 0 / 0.45)",filter:`url(#sw-blur-${A})`}),r.createElement("circle",{cx:b,cy:k-xe,r:6,fill:"var(--ip-spin-wheel-ball-glow, var(--ip-spin-wheel-ball-glow-default))",opacity:L?.55:.3,filter:`url(#sw-blur-${A})`}),r.createElement("circle",{cx:b,cy:k-xe,r:4.2,fill:`url(#sw-ball-${A})`}),r.createElement("circle",{cx:b-1.3,cy:k-xe-1.4,r:1.3,fill:"oklch(1 0 0 / 0.9)"}))):null,S||"none"===v.pointer?null:r.createElement(K,{presetConfig:v,spinning:L,tick:I,idPrefix:A})),null!=Te&&null!==(y=Te.rewardsSummary)&&void 0!==y&&y.length?r.createElement("div",{className:"spin-wheel__tooltip",style:{left:j.x,top:j.y},role:"tooltip"},Te.rewardsSummary.map((e,t)=>r.createElement(r.Fragment,{key:t},e,t<Te.rewardsSummary.length-1?", ":""))):null,L?Ee||(Ee=r.createElement("div",{className:"spin-w
1heel__hub-ring","aria-hidden":"true"})):null,r.createElement("div",{className:"spin-wheel__hub-control"},r.createElement("button",{type:"button",className:"spin-wheel__hub-button",onClick:Oe,disabled:s||f,"aria-label":je},f?$e||($e=r.createElement("span",{className:"spin-wheel__hub-dots","aria-hidden":"true"},r.createElement("span",null),r.createElement("span",null),r.createElement("span",null))):r.createElement("span",null,je)))))};var Me,Ae=l(64572);const Le=()=>{if("undefined"==typeof window)return m.defaults.size;const e=Math.floor(.9*window.innerHeight)-210;return Math.max(240,Math.min(m.defaults.size,e))},Re=({slug:e,modalActions:t})=>{var c,d;const p=(0,s.UA)(),{lang:h}=(0,s.uU)(),{fireConfetti:f,preloadConfetti:w}=(()=>{const e=(0,r.useCallback)(()=>{l.e(96).then(l.bind(l,14685))},[]);return{fireConfetti:(0,r.useCallback)(async(e={})=>{var t,n;const{default:r}=await l.e(96).then(l.bind(l,14685)),i=m.confetti.zIndex,a=null===(t=e.colors)||void 0===t?void 0:t.filter(Boolean);r({zIndex:i,particleCount:null!==(n=e.particleCount)&&void 0!==n?n:m.confetti.particleCount,spread:m.confetti.spread,origin:{y:.55},...null!=a&&a.length?{colors:a}:{}}),window.setTimeout(()=>{r({zIndex:i,particleCount:90,angle:60,spread:60,origin:{x:0,y:.7},...null!=a&&a.length?{colors:a}:{}})},180),window.setTimeout(()=>{r({zIndex:i,particleCount:90,angle:120,spread:60,origin:{x:1,y:.7},...null!=a&&a.length?{colors:a}:{}})},320)},[]),preloadConfetti:e}})(),g=(0,i.d4)(e=>{var t,l,n;return!(null==e||null===(t=e.ui)||void 0===t||null===(l=t.modal)||void 0===l||null===(n=l.stack)||void 0===n||!n.length)}),[_,y]=(0,r.useState)(Le);(0,r.useEffect)(()=>{const e=()=>y(Le());return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,r.useEffect)(()=>{},[e]);const v=(0,r.useCallback)(t=>(w(),(async(e,t=[])=>await u.A.wheel.spin({slug:e,itemIds:t}))(e,t)),[e,w]),b=(0,r.useCallback)((e,t)=>
1{const l=[e.accentColor,t.accentColor].filter(Boolean);f({colors:l})},[f]),{config:k,isLoading:E,configError:$,refetch:x,error:C,winner:S,wheelProps:M}=j({slug:e,lang:h,onSpin:v,onWon:b,spinLabel:p("spin_the_wheel.wheel.spin.button.label"),acceptLabel:p("spin_the_wheel.wheel.accept.button.label")}),A=(0,r.useCallback)(()=>{g?t.popModal():t.closeModal()},[g,t]),L=(0,r.useMemo)(()=>({"--ip-spin-wheel-config-accent":null==k?void 0:k.accentColor}),[k]);return E?Me||(Me=r.createElement("div",{className:"spin-the-wheel-modal__inner spin-the-wheel-modal__inner--loading"},r.createElement(Ae.x,{size:400}))):$||!k?r.createElement("div",{className:"spin-the-wheel-modal__inner"},r.createElement("p",{className:"spin-the-wheel-modal__error"},p("spin_the_wheel.wheel.error.message")),r.createElement(o.$n,{className:"spin-the-wheel-modal__action",onClick:()=>{x()}},p("generic.retry"))):r.createElement("div",{className:"spin-the-wheel-modal__inner",style:L},r.createElement("header",{className:"spin-the-wheel-modal__header"},r.createElement(a.A,{className:"spin-the-wheel-modal__title"},k.title),k.description?r.createElement("p",{className:"spin-the-wheel-modal__description"},k.description):null),r.createElement("div",{className:"spin-the-wheel-modal__stage"},r.createElement(Se,(0,n.A)({},M,{size:_,onSpinClick:S?A:M.onSpinClick}))),r.createElement("div",{className:"spin-the-wheel-modal__result","aria-live":"polite"},S?r.createElement("p",{className:"spin-the-wheel-modal__won"},p("spin_the_wheel.wheel.you_won.message")," ",r.createElement("strong",null,null!==(c=null===(d=S.rewardsSummary)||void 0===d?void 0:d.join(", "))&&void 0!==c?c:S.label)):null),C?r.createElement("p",{className:"spin-the-wheel-modal__error"},p("spin_the_wheel.wheel.error.message")):null)},Ne=Re}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.