@everymatrix/casino-engagement-suite-luckywheel 0.11.3 → 0.13.0
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/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-f5786bfe.js +1 -0
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/index.esm.js +1 -1
- package/dist/cjs/{casino-engagement-suite-luckywheel-990cb87a.js → casino-engagement-suite-luckywheel-1190dd66.js} +16 -15
- package/dist/cjs/casino-engagement-suite-luckywheel.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.js +15 -13
- package/dist/collection/utils/class.svgcalc.js +1 -2
- package/dist/esm/{casino-engagement-suite-luckywheel-af14a77c.js → casino-engagement-suite-luckywheel-f5786bfe.js} +16 -15
- package/dist/esm/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/types/utils/class.svgcalc.d.ts +1 -1
- package/package.json +1 -1
- package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-af14a77c.js +0 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/packages/stencil/casino-engagement-suite-luckywheel/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-f5786bfe.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./index-48c42d04.js";var s,r,a,n,o,h;!function(t){t.Arrow="Arrow",t.Partition="Partition"}(s||(s={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(a||(a={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(n||(n={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(o||(o={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(h||(h={}));const c=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},d=t=>new Promise((i=>{let e=document.createElementNS("http://www.w3.org/2000/svg","image");e.onload=()=>i(e),e.onerror=()=>i(e),e.href.baseVal=t})),l=t=>({x:t,y:t}),u=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),g={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},b=async(t,i)=>{let e=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s]&&(e["Image1"===s?"Image":s]=t[s][i]||t[s]["*"])})),e}));return(t=>{let i=0;return t.map((t=>{i+=Number(t.probability)})),i})(t)<1&&e.push(g),e})(t.Program.WheelOfFortune.Partitions,i);return e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?e.map((t=>{if(t.Image){const i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.href.baseVal=t.Image,Object.assign(Object.assign({},t),{Image:i})}return t})):await Promise.all(e.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{Image:await d(t)}:{})(t.Image))))),e},p={in:{quad:t=>Math.pow(t,2),cubic:t=>Math.pow(t,3),quart:t=>Math.pow(t,4),quint:t=>Math.pow(t,5),sine:t=>1-Math.cos(t*Math.PI/2),expo:t=>0===t?0:Math.pow(2,10*t-10),circ:t=>1-Math.sqrt(1-Math.pow(t,2))},out:{quad:t=>1-Math.pow(1-t,2),cubic:t=>1-Math.pow(1-t,3),quart:t=>1-Math.pow(1-t,4),quint:t=>1-Math.pow(1-t,5),sine:t=>Math.sin(t*Math.PI/2),expo:t=>1===t?1:1-Math.pow(2,-10*t),circ:t=>Math.sqrt(1-Math.pow(t-1,2))}},f={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={in:{quad:t=>2*t,cubic:t=>3*t**2,quart:t=>4*t**3,quint:t=>5*t**4,sine:t=>Math.PI/2*Math.sin(Math.PI/2*t),expo:t=>10*Math.LN2*2**(10*t-10),circ:t=>-.5*(1-t**2)**-.5},out:{cubic:t=>3*t**2-6*t+3}},y=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],v=t=>Object.keys(t).map((i=>t[i]));var x;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(x||(x={}));class w{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:a}){this.arrowmode=r.DownFromTop,this.convertDegToArc=t=>t*Math.PI/180,this.convertArcToDeg=t=>180*t/Math.PI%360,this.getArcDelta=t=>2*Math.PI/t,this.findDeg=(t,i)=>t*this.convertArcToDeg(this.getArcDelta(i)),this.angleTransform=t=>{switch(t){case r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=a,this.center=t/2,this.ratio=t/375,this.options=e,this.length=e.length,this.themeIndex=s,this.radius=i}get sizeImage(){const t=t=>48*this.ratio*5/t;if(this.length<=3)return t(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return t(this.length)}}getSizeImageByPartition(t){return this.options[t].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(t,i=1.25){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Name?this.radius-e/2-3*this.ratio:(this.radius-e/2)/Number(i)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(t,this.getOffsetImage(e),s,n.outward)),{width:e,height:e})}getSvgTextProps(t,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(t){return{center:0,position:{x:-1*t/2,y:-1*t/2},transform:{x:0,y:0}}}get direction(){return x.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:n[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,r=((t,i,e)=>{const s=l(e);return{x:s.x+t*Math.cos(i),y:s.y+t*Math.sin(i)}})(i||this.radius-9*this.ratio,s,this.center+e.center);return{transformOrigin:u(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:a,transformOrigin:n}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},a),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?a.x:a.x-100}px, ${a.y-50}px)`,"transform-origin":`${o=n,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=l(this.center),e=l(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),a=l(s),n=l(e);return{x:a.x+n.x*Math.cos(r),y:a.y+n.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...v(i),"L",...v(s),"A",...v(e),"0 0 1",...v(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-t,this.length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class k{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=y[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=o.halt,this.cb=()=>{i(),this.setDeg(t,0)},this.degTarget=t+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const t=this.param.loopSpeed,i=t=>33*f[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,p.in[this.easingType],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,p.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,f[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,f[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let a=null;const n=()=>{let o=(new Date).getTime();a||(a=o);const h=o-a,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,r)=>{let a=null;window.cancelAnimationFrame(a);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?a=window.requestAnimationFrame(o):this.cb()};a=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=o.launch,this.ticker()}}const P=class{constructor(i){t(this,i),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.host.prepend(i)}),1)})).catch((t=>{console.log("Error ",t)}))},this.renderImage=(t,i)=>{const e=this.options[i].Image;c(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{if(this.luckywheel.Current){if(Number(this.luckywheel.Current.RemainingTimes)>0)return void(this.spinable=!0);window.postMessage({type:"ShowNoSpinLeftModal"})}this.spinable=!1},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(t){const{type:i,success:e,data:s}=null==t?void 0:t.data;"SpinLuckyWheelRes"===i&&this.isSpinning&&(e?this.handleSpinResult(s):this.handleSpinError())}handleSpinError(){this.spinner.halt(0,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0}})}))}handleSpinResult(t){if(this.luckywheel.Program.Id===t.LotteryProgramID){const i=+t.Result.WheelOfFortunePartitionIndex,e=this.settings.getDeg(i);this.spinner.halt(e,(()=>{this.isSpinning=!1,this.updateSpinable();const t=this.luckywheel.Program.WheelOfFortune.Partitions[i];window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeText:(null==t?void 0:t.PrizeText[this.language])||(null==t?void 0:t.PrizeText["*"]),PrizeMessage:(null==t?void 0:t.Name[this.language])||(null==t?void 0:t.Name["*"]),HasError:!1}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,a.en),this.settings=new w({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new k({tick:(t,i)=>{c(this.spinContainer,{style:[`transform: rotate(${t}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*i}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(t){if(!t||!this.size)return;const i=this.size.toString();t.getAttribute("width")!==i&&t.setAttribute("width",i),t.getAttribute("height")!==i&&t.setAttribute("height",i)}render(){const t={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"b6136edfd7add14e24354d5d429e6b120c752703",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"8ced6524641989578eac427e49b96b32b05afb7e",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",{key:"1bf19a0e9114a3f28a4fa991fea492621d608e63",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},i("div",{key:"4ed19149d56ededcf304264e817e2ca11f27cdd3",style:t})),i("g",Object.assign({key:"e29b5fd47073124eda6b69464d5e80c776f5c3fa",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"bff210be57b131b4716873beb9be0b30e0eab3bc",class:"PartitionsBackgrounds"},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},t)},i("div",{style:t}))))),i("g",{key:"72ca2e0ab6daea08bd7cfd5494aef1e6730bc090",class:"PartitionsBackgroundStrokes"},this.options.map(((t,e)=>i("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(e),{width:this.size,height:this.size}))))),i("g",{key:"93ee593c8cdc9cd90caedc79ef98243ff5658ed7",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((t,e)=>[t.Image&&i("g",{class:`PartitionImage PartitionImage${e}`,ref:t=>this.renderImage(t,e)}),t.Name&&i("foreignObject",Object.assign({class:"PartitionText",ref:t=>{if(t){const i=this.options[e].Image?"80":"100";t.setAttribute("width",i),t.setAttribute("height",i)}}},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"7e3de34870e47efe6b734724a018efbd77ead91e",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("g",{key:"c824d9aa998a3b130bf82f754fac96706a5a6cd4",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("foreignObject",{key:"bb40a660810bf97d1efe221c9cd07c8375662360",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:t},i("div",{key:"54e4c470a9c6cf07dae7461202d4a40444e94a2a",style:t})),i("foreignObject",{key:"53a6d7853ad783030d275b4de8d070588f3021fd",ref:this.setSvgSize.bind(this),class:"Top Customable",style:t},i("div",{key:"5521d2e5e5d06d5386c5d546e5e726d7ca1b3b02",style:t})),i("g",{key:"51fe3d7e0dc2f2b27d49d1d69a4fd05347d3d0da",class:{spinning:this.isSpinning,Center:!0}},i("foreignObject",{key:"20f5bbb9f2259f30b606013068747e8f76afe69c",ref:t=>{t&&(t.setAttribute("width","100"),t.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},i("div",{key:"ee3bc5e723aa9be084dd7f93fe0a1ec3a27c8ed1",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),i("g",{key:"c679b904e588c20484e353ba855172ca4077f057"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};P.style=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 14px);font-weight:900}';export{P as C}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as casino_engagement_suite_luckywheel}from"./casino-engagement-suite-luckywheel-
|
|
1
|
+
export{C as casino_engagement_suite_luckywheel}from"./casino-engagement-suite-luckywheel-f5786bfe.js";import"./index-48c42d04.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoEngagementSuiteLuckywheel}from"./casino-engagement-suite-luckywheel-
|
|
1
|
+
export{C as CasinoEngagementSuiteLuckywheel}from"./casino-engagement-suite-luckywheel-f5786bfe.js";import"./index-48c42d04.js";
|
|
@@ -396,8 +396,7 @@ class SvgCalc {
|
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
getDeg(index) {
|
|
399
|
-
|
|
400
|
-
return this.findDeg(this.length - i, this.length);
|
|
399
|
+
return this.findDeg(this.length - index, this.length);
|
|
401
400
|
}
|
|
402
401
|
getSpinnerProps() {
|
|
403
402
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -634,16 +633,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
634
633
|
handleSpinResult(data) {
|
|
635
634
|
if (this.luckywheel.Program.Id === data.LotteryProgramID) {
|
|
636
635
|
const index = +data.Result.WheelOfFortunePartitionIndex;
|
|
637
|
-
this.
|
|
638
|
-
|
|
636
|
+
const partitionDegree = this.settings.getDeg(index);
|
|
637
|
+
this.spinner.halt(partitionDegree, () => {
|
|
639
638
|
this.isSpinning = false;
|
|
640
639
|
this.updateSpinable();
|
|
641
|
-
const partition =
|
|
642
|
-
const prizeText = partition[this.language] || partition['*'];
|
|
640
|
+
const partition = this.luckywheel.Program.WheelOfFortune.Partitions[index];
|
|
641
|
+
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
642
|
+
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
643
643
|
window.postMessage({
|
|
644
644
|
type: 'ShowLuckywheelRewardModal',
|
|
645
645
|
data: {
|
|
646
|
-
|
|
646
|
+
PrizeText: prizeText,
|
|
647
|
+
PrizeMessage: prizeName,
|
|
647
648
|
HasError: false
|
|
648
649
|
}
|
|
649
650
|
});
|
|
@@ -698,13 +699,13 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
698
699
|
}
|
|
699
700
|
render() {
|
|
700
701
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
701
|
-
return (index.h("div", { key: '
|
|
702
|
+
return (index.h("div", { key: 'b6136edfd7add14e24354d5d429e6b120c752703', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: '8ced6524641989578eac427e49b96b32b05afb7e', width: this.size, height: this.size, ref: (el) => {
|
|
702
703
|
this.svg = el;
|
|
703
|
-
} }, index.h("foreignObject", { key: '
|
|
704
|
+
} }, index.h("foreignObject", { key: '1bf19a0e9114a3f28a4fa991fea492621d608e63', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, index.h("div", { key: '4ed19149d56ededcf304264e817e2ca11f27cdd3', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: 'e29b5fd47073124eda6b69464d5e80c776f5c3fa', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: 'bff210be57b131b4716873beb9be0b30e0eab3bc', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
|
|
704
705
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index$1.toString() }, foreignObjectAgentProps) }, index.h("div", { style: foreignObjectAgentProps })));
|
|
705
|
-
})), index.h("g", { key: '
|
|
706
|
+
})), index.h("g", { key: '72ca2e0ab6daea08bd7cfd5494aef1e6730bc090', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
|
|
706
707
|
return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
|
|
707
|
-
})), index.h("g", { key: '
|
|
708
|
+
})), index.h("g", { key: '93ee593c8cdc9cd90caedc79ef98243ff5658ed7', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
|
|
708
709
|
return [
|
|
709
710
|
el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
|
|
710
711
|
el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -715,18 +716,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
715
716
|
}
|
|
716
717
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
717
718
|
];
|
|
718
|
-
}))), index.h("g", { key: '
|
|
719
|
+
}))), index.h("g", { key: '7e3de34870e47efe6b734724a018efbd77ead91e', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index$1) => {
|
|
719
720
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
|
|
720
|
-
})), index.h("g", { key: '
|
|
721
|
+
})), index.h("g", { key: 'c824d9aa998a3b130bf82f754fac96706a5a6cd4', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index$1) => {
|
|
721
722
|
return (index.h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index$1.toString() } }, index.h("div", { style: foreignObjectAgentProps })));
|
|
722
|
-
})), index.h("foreignObject", { key: '
|
|
723
|
+
})), index.h("foreignObject", { key: 'bb40a660810bf97d1efe221c9cd07c8375662360', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, index.h("div", { key: '54e4c470a9c6cf07dae7461202d4a40444e94a2a', style: foreignObjectAgentProps })), index.h("foreignObject", { key: '53a6d7853ad783030d275b4de8d070588f3021fd', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, index.h("div", { key: '5521d2e5e5d06d5386c5d546e5e726d7ca1b3b02', style: foreignObjectAgentProps })), index.h("g", { key: '51fe3d7e0dc2f2b27d49d1d69a4fd05347d3d0da', class: { spinning: this.isSpinning, Center: true } }, index.h("foreignObject", { key: '20f5bbb9f2259f30b606013068747e8f76afe69c', ref: (el) => {
|
|
723
724
|
if (el) {
|
|
724
725
|
el.setAttribute('width', '100');
|
|
725
726
|
el.setAttribute('height', '100');
|
|
726
727
|
}
|
|
727
728
|
}, style: {
|
|
728
729
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
729
|
-
} }, index.h("div", { key: '
|
|
730
|
+
} }, index.h("div", { key: 'ee3bc5e723aa9be084dd7f93fe0a1ec3a27c8ed1', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), index.h("g", { key: 'c679b904e588c20484e353ba855172ca4077f057' }, this.options.map((_el, index$1) => {
|
|
730
731
|
return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
|
|
731
732
|
})))));
|
|
732
733
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-1190dd66.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-
|
|
5
|
+
const casinoEngagementSuiteLuckywheel = require('./casino-engagement-suite-luckywheel-1190dd66.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -107,16 +107,18 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
107
107
|
handleSpinResult(data) {
|
|
108
108
|
if (this.luckywheel.Program.Id === data.LotteryProgramID) {
|
|
109
109
|
const index = +data.Result.WheelOfFortunePartitionIndex;
|
|
110
|
-
this.
|
|
111
|
-
|
|
110
|
+
const partitionDegree = this.settings.getDeg(index);
|
|
111
|
+
this.spinner.halt(partitionDegree, () => {
|
|
112
112
|
this.isSpinning = false;
|
|
113
113
|
this.updateSpinable();
|
|
114
|
-
const partition =
|
|
115
|
-
const prizeText = partition[this.language] || partition['*'];
|
|
114
|
+
const partition = this.luckywheel.Program.WheelOfFortune.Partitions[index];
|
|
115
|
+
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
116
|
+
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
116
117
|
window.postMessage({
|
|
117
118
|
type: 'ShowLuckywheelRewardModal',
|
|
118
119
|
data: {
|
|
119
|
-
|
|
120
|
+
PrizeText: prizeText,
|
|
121
|
+
PrizeMessage: prizeName,
|
|
120
122
|
HasError: false
|
|
121
123
|
}
|
|
122
124
|
});
|
|
@@ -171,13 +173,13 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
171
173
|
}
|
|
172
174
|
render() {
|
|
173
175
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
174
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: 'b6136edfd7add14e24354d5d429e6b120c752703', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '8ced6524641989578eac427e49b96b32b05afb7e', width: this.size, height: this.size, ref: (el) => {
|
|
175
177
|
this.svg = el;
|
|
176
|
-
} }, h("foreignObject", { key: '
|
|
178
|
+
} }, h("foreignObject", { key: '1bf19a0e9114a3f28a4fa991fea492621d608e63', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: '4ed19149d56ededcf304264e817e2ca11f27cdd3', style: foreignObjectAgentProps })), h("g", Object.assign({ key: 'e29b5fd47073124eda6b69464d5e80c776f5c3fa', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'bff210be57b131b4716873beb9be0b30e0eab3bc', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
177
179
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
178
|
-
})), h("g", { key: '
|
|
180
|
+
})), h("g", { key: '72ca2e0ab6daea08bd7cfd5494aef1e6730bc090', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
179
181
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
180
|
-
})), h("g", { key: '
|
|
182
|
+
})), h("g", { key: '93ee593c8cdc9cd90caedc79ef98243ff5658ed7', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
181
183
|
return [
|
|
182
184
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
183
185
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -188,18 +190,18 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
188
190
|
}
|
|
189
191
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
190
192
|
];
|
|
191
|
-
}))), h("g", { key: '
|
|
193
|
+
}))), h("g", { key: '7e3de34870e47efe6b734724a018efbd77ead91e', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
192
194
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
193
|
-
})), h("g", { key: '
|
|
195
|
+
})), h("g", { key: 'c824d9aa998a3b130bf82f754fac96706a5a6cd4', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
194
196
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
195
|
-
})), h("foreignObject", { key: '
|
|
197
|
+
})), h("foreignObject", { key: 'bb40a660810bf97d1efe221c9cd07c8375662360', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '54e4c470a9c6cf07dae7461202d4a40444e94a2a', style: foreignObjectAgentProps })), h("foreignObject", { key: '53a6d7853ad783030d275b4de8d070588f3021fd', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: '5521d2e5e5d06d5386c5d546e5e726d7ca1b3b02', style: foreignObjectAgentProps })), h("g", { key: '51fe3d7e0dc2f2b27d49d1d69a4fd05347d3d0da', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: '20f5bbb9f2259f30b606013068747e8f76afe69c', ref: (el) => {
|
|
196
198
|
if (el) {
|
|
197
199
|
el.setAttribute('width', '100');
|
|
198
200
|
el.setAttribute('height', '100');
|
|
199
201
|
}
|
|
200
202
|
}, style: {
|
|
201
203
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
202
|
-
} }, h("div", { key: '
|
|
204
|
+
} }, h("div", { key: 'ee3bc5e723aa9be084dd7f93fe0a1ec3a27c8ed1', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: 'c679b904e588c20484e353ba855172ca4077f057' }, this.options.map((_el, index) => {
|
|
203
205
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
204
206
|
})))));
|
|
205
207
|
}
|
|
@@ -169,8 +169,7 @@ export class SvgCalc {
|
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
171
|
getDeg(index) {
|
|
172
|
-
|
|
173
|
-
return this.findDeg(this.length - i, this.length);
|
|
172
|
+
return this.findDeg(this.length - index, this.length);
|
|
174
173
|
}
|
|
175
174
|
getSpinnerProps() {
|
|
176
175
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -394,8 +394,7 @@ class SvgCalc {
|
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
396
|
getDeg(index) {
|
|
397
|
-
|
|
398
|
-
return this.findDeg(this.length - i, this.length);
|
|
397
|
+
return this.findDeg(this.length - index, this.length);
|
|
399
398
|
}
|
|
400
399
|
getSpinnerProps() {
|
|
401
400
|
const centerPoint = getSymmetricalPointFromScalar(this.center);
|
|
@@ -632,16 +631,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
632
631
|
handleSpinResult(data) {
|
|
633
632
|
if (this.luckywheel.Program.Id === data.LotteryProgramID) {
|
|
634
633
|
const index = +data.Result.WheelOfFortunePartitionIndex;
|
|
635
|
-
this.
|
|
636
|
-
|
|
634
|
+
const partitionDegree = this.settings.getDeg(index);
|
|
635
|
+
this.spinner.halt(partitionDegree, () => {
|
|
637
636
|
this.isSpinning = false;
|
|
638
637
|
this.updateSpinable();
|
|
639
|
-
const partition =
|
|
640
|
-
const prizeText = partition[this.language] || partition['*'];
|
|
638
|
+
const partition = this.luckywheel.Program.WheelOfFortune.Partitions[index];
|
|
639
|
+
const prizeText = (partition === null || partition === void 0 ? void 0 : partition.PrizeText[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.PrizeText['*']);
|
|
640
|
+
const prizeName = (partition === null || partition === void 0 ? void 0 : partition.Name[this.language]) || (partition === null || partition === void 0 ? void 0 : partition.Name['*']);
|
|
641
641
|
window.postMessage({
|
|
642
642
|
type: 'ShowLuckywheelRewardModal',
|
|
643
643
|
data: {
|
|
644
|
-
|
|
644
|
+
PrizeText: prizeText,
|
|
645
|
+
PrizeMessage: prizeName,
|
|
645
646
|
HasError: false
|
|
646
647
|
}
|
|
647
648
|
});
|
|
@@ -696,13 +697,13 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
696
697
|
}
|
|
697
698
|
render() {
|
|
698
699
|
const foreignObjectAgentProps = { height: `${this.size}px`, width: `${this.size}px` };
|
|
699
|
-
return (h("div", { key: '
|
|
700
|
+
return (h("div", { key: 'b6136edfd7add14e24354d5d429e6b120c752703', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: '8ced6524641989578eac427e49b96b32b05afb7e', width: this.size, height: this.size, ref: (el) => {
|
|
700
701
|
this.svg = el;
|
|
701
|
-
} }, h("foreignObject", { key: '
|
|
702
|
+
} }, h("foreignObject", { key: '1bf19a0e9114a3f28a4fa991fea492621d608e63', ref: this.setSvgSize.bind(this), class: "Bottom Customable" }, h("div", { key: '4ed19149d56ededcf304264e817e2ca11f27cdd3', style: foreignObjectAgentProps })), h("g", Object.assign({ key: 'e29b5fd47073124eda6b69464d5e80c776f5c3fa', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: 'bff210be57b131b4716873beb9be0b30e0eab3bc', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
702
703
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: Object.assign({ '--index': index.toString() }, foreignObjectAgentProps) }, h("div", { style: foreignObjectAgentProps })));
|
|
703
|
-
})), h("g", { key: '
|
|
704
|
+
})), h("g", { key: '72ca2e0ab6daea08bd7cfd5494aef1e6730bc090', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
704
705
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
705
|
-
})), h("g", { key: '
|
|
706
|
+
})), h("g", { key: '93ee593c8cdc9cd90caedc79ef98243ff5658ed7', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
706
707
|
return [
|
|
707
708
|
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
708
709
|
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText", ref: (el) => {
|
|
@@ -713,18 +714,18 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
713
714
|
}
|
|
714
715
|
} }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
715
716
|
];
|
|
716
|
-
}))), h("g", { key: '
|
|
717
|
+
}))), h("g", { key: '7e3de34870e47efe6b734724a018efbd77ead91e', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable1: true } }, this.options.map((_el, index) => {
|
|
717
718
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition1 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
718
|
-
})), h("g", { key: '
|
|
719
|
+
})), h("g", { key: 'c824d9aa998a3b130bf82f754fac96706a5a6cd4', class: { active: this.isPartitionsCustomableReady, PartitionsCustomable2: true } }, this.options.map((_el, index) => {
|
|
719
720
|
return (h("foreignObject", { ref: this.setSvgSize.bind(this), class: "Partition2 Customable", style: { '--index': index.toString() } }, h("div", { style: foreignObjectAgentProps })));
|
|
720
|
-
})), h("foreignObject", { key: '
|
|
721
|
+
})), h("foreignObject", { key: 'bb40a660810bf97d1efe221c9cd07c8375662360', ref: this.setSvgSize.bind(this), class: "Middle Customable", style: foreignObjectAgentProps }, h("div", { key: '54e4c470a9c6cf07dae7461202d4a40444e94a2a', style: foreignObjectAgentProps })), h("foreignObject", { key: '53a6d7853ad783030d275b4de8d070588f3021fd', ref: this.setSvgSize.bind(this), class: "Top Customable", style: foreignObjectAgentProps }, h("div", { key: '5521d2e5e5d06d5386c5d546e5e726d7ca1b3b02', style: foreignObjectAgentProps })), h("g", { key: '51fe3d7e0dc2f2b27d49d1d69a4fd05347d3d0da', class: { spinning: this.isSpinning, Center: true } }, h("foreignObject", { key: '20f5bbb9f2259f30b606013068747e8f76afe69c', ref: (el) => {
|
|
721
722
|
if (el) {
|
|
722
723
|
el.setAttribute('width', '100');
|
|
723
724
|
el.setAttribute('height', '100');
|
|
724
725
|
}
|
|
725
726
|
}, style: {
|
|
726
727
|
transform: `translate(${Number(this.size) / 2 - 100 / 2}px, ${Number(this.size) / 2 - 100 / 2}px)`
|
|
727
|
-
} }, h("div", { key: '
|
|
728
|
+
} }, h("div", { key: 'ee3bc5e723aa9be084dd7f93fe0a1ec3a27c8ed1', style: { width: '100px', height: '100px', cursor: 'pointer' }, onClick: this.eventSpin }))), h("g", { key: 'c679b904e588c20484e353ba855172ca4077f057' }, this.options.map((_el, index) => {
|
|
728
729
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
729
730
|
})))));
|
|
730
731
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as casino_engagement_suite_luckywheel } from './casino-engagement-suite-luckywheel-f5786bfe.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-
|
|
1
|
+
export { C as CasinoEngagementSuiteLuckywheel } from './casino-engagement-suite-luckywheel-f5786bfe.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/package.json
CHANGED
package/dist/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel-af14a77c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as e}from"./index-48c42d04.js";var s,r,n,a,o,h;!function(t){t.Arrow="Arrow",t.Partition="Partition"}(s||(s={})),function(t){t.DownFromTop="DownFromTop",t.UpFromCenter="UpFromCenter",t.DownFromCenter="DownFromCenter",t.UpFromBottom="UpFromBottom"}(r||(r={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(n||(n={})),function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise",t[t.outward=0]="outward"}(a||(a={})),function(t){t.launch="launch",t.loop="loop",t.halt="halt"}(o||(o={})),function(t){t.quad="quad",t.cubic="cubic",t.quart="quart",t.quint="quint",t.expo="expo",t.sine="sine",t.circ="circ"}(h||(h={}));const c=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},d=t=>new Promise((i=>{let e=document.createElementNS("http://www.w3.org/2000/svg","image");e.onload=()=>i(e),e.onerror=()=>i(e),e.href.baseVal=t})),l=t=>({x:t,y:t}),u=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),g={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},b=async(t,i)=>{let e=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s]&&(e["Image1"===s?"Image":s]=t[s][i]||t[s]["*"])})),e}));return(t=>{let i=0;return t.map((t=>{i+=Number(t.probability)})),i})(t)<1&&e.push(g),e})(t.Program.WheelOfFortune.Partitions,i);return e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?e.map((t=>{if(t.Image){const i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.href.baseVal=t.Image,Object.assign(Object.assign({},t),{Image:i})}return t})):await Promise.all(e.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{Image:await d(t)}:{})(t.Image))))),e},p={in:{quad:t=>Math.pow(t,2),cubic:t=>Math.pow(t,3),quart:t=>Math.pow(t,4),quint:t=>Math.pow(t,5),sine:t=>1-Math.cos(t*Math.PI/2),expo:t=>0===t?0:Math.pow(2,10*t-10),circ:t=>1-Math.sqrt(1-Math.pow(t,2))},out:{quad:t=>1-Math.pow(1-t,2),cubic:t=>1-Math.pow(1-t,3),quart:t=>1-Math.pow(1-t,4),quint:t=>1-Math.pow(1-t,5),sine:t=>Math.sin(t*Math.PI/2),expo:t=>1===t?1:1-Math.pow(2,-10*t),circ:t=>Math.sqrt(1-Math.pow(t-1,2))}},f={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},m={in:{quad:t=>2*t,cubic:t=>3*t**2,quart:t=>4*t**3,quint:t=>5*t**4,sine:t=>Math.PI/2*Math.sin(Math.PI/2*t),expo:t=>10*Math.LN2*2**(10*t-10),circ:t=>-.5*(1-t**2)**-.5},out:{cubic:t=>3*t**2-6*t+3}},y=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],v=t=>Object.keys(t).map((i=>t[i]));var x;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(x||(x={}));class w{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:n}){this.arrowmode=r.DownFromTop,this.convertDegToArc=t=>t*Math.PI/180,this.convertArcToDeg=t=>180*t/Math.PI%360,this.getArcDelta=t=>2*Math.PI/t,this.findDeg=(t,i)=>t*this.convertArcToDeg(this.getArcDelta(i)),this.angleTransform=t=>{switch(t){case r.DownFromTop:case r.UpFromCenter:return-Math.PI/2;case r.DownFromCenter:case r.UpFromBottom:return Math.PI/2}},this.contentdirection=n,this.center=t/2,this.ratio=t/375,this.options=e,this.length=e.length,this.themeIndex=s,this.radius=i}get sizeImage(){const t=t=>48*this.ratio*5/t;if(this.length<=3)return t(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return t(this.length)}}getSizeImageByPartition(t){return this.options[t].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(t,i=1.25){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Name?this.radius-e/2-3*this.ratio:(this.radius-e/2)/Number(i)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(t,this.getOffsetImage(e),s,a.outward)),{width:e,height:e})}getSvgTextProps(t,i){const e=this.getSizeImageByPartition(t);let s;return s=this.options[t].Image?this.radius-e-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,s,void 0,i))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t,this.options[t].Image?80:100);return Object.assign({},i)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(t){return{center:0,position:{x:-1*t/2,y:-1*t/2},transform:{x:0,y:0}}}get direction(){return x.clockwise}getAngleSelf(t,i){return 360*t/this.length*this.direction+90*(void 0!==i?i:a[this.contentdirection])}getPartitionPositions(t,i,e){const s=this.angleTransform(this.arrowmode)+this.direction*t*2*Math.PI/this.length,r=((t,i,e)=>{const s=l(e);return{x:s.x+t*Math.cos(i),y:s.y+t*Math.sin(i)}})(i||this.radius-9*this.ratio,s,this.center+e.center);return{transformOrigin:u(r,e.transform),point:u(r,e.position)}}getPropsForPartitionInfo(t,i,e,s,r){const{point:n,transformOrigin:a}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},n),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg) translate(${"clockwise"===this.contentdirection?n.x:n.x-100}px, ${n.y-50}px)`,"transform-origin":`${o=a,Object.keys(o).map((t=>`${o[t]}px`)).join(" ")}`,height:`${r}px`,width:`${r}px`}});var o}getPartitionDraw(t){const i=l(this.center),e=l(this.radius),{point:s,pointNext:r}=((t,i,e,s)=>{const r=t=>((t,i,e,s)=>{const r=Math.PI/180*(360/i*(t-.5)-90),n=l(s),a=l(e);return{x:n.x+a.x*Math.cos(r),y:n.y+a.y*Math.sin(r)}})(t,i,e,s);return{point:r(t),pointNext:r(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...v(i),"L",...v(s),"A",...v(e),"0 0 1",...v(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(this.length-(t||this.length-1),this.length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class k{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=y[2],this.halt=(t,i=(()=>{}))=>{this.shouldHalt=()=>{this.step=o.halt,this.cb=()=>{i(),this.setDeg(t,0)},this.degTarget=t+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const t=this.param.loopSpeed,i=t=>33*f[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,p.in[this.easingType],m.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,p.out[this.easingType],m.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,f[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,f[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():r()},[o.halt]:()=>{this.deg===360-t?s():r()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,r)=>{let n=null;const a=()=>{let o=(new Date).getTime();n||(n=o);const h=o-n,c=e*s(h/t)+i,d=Math.abs(r(h/t));this.setDeg(c,d),h<t?setTimeout((()=>a()),30):this.cb()};a()},this.animate=(t,i,e,s,r)=>{let n=null;window.cancelAnimationFrame(n);let a=null;const o=h=>{a||(a=h);const c=h-a,d=e*s(c/t)+i,l=Math.abs(r(c/t));this.setDeg(d,l),c<t?n=window.requestAnimationFrame(o):this.cb()};n=window.requestAnimationFrame(o)},this.tick=t.tick}launch(){this.shouldHalt=void 0,this.step=o.launch,this.ticker()}}const P=class{constructor(i){t(this,i),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.host.prepend(i)}),1)})).catch((t=>{console.log("Error ",t)}))},this.renderImage=(t,i)=>{const e=this.options[i].Image;c(e,this.settings.getSvgImageProps(i)),t.innerHTML=null,t.appendChild(e)},this.updateSpinable=()=>{if(this.luckywheel.Current){if(Number(this.luckywheel.Current.RemainingTimes)>0)return void(this.spinable=!0);window.postMessage({type:"ShowNoSpinLeftModal"})}this.spinable=!1},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(t){const{type:i,success:e,data:s}=null==t?void 0:t.data;"SpinLuckyWheelRes"===i&&this.isSpinning&&(e?this.handleSpinResult(s):this.handleSpinError())}handleSpinError(){this.spinner.halt(0,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0}})}))}handleSpinResult(t){if(this.luckywheel.Program.Id===t.LotteryProgramID){const i=+t.Result.WheelOfFortunePartitionIndex;this.spinner.halt(this.settings.getDeg(i),(()=>{var t;this.isSpinning=!1,this.updateSpinable();const e=null===(t=this.luckywheel.Program.WheelOfFortune.Partitions[i])||void 0===t?void 0:t.PrizeText;window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:e[this.language]||e["*"],HasError:!1}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,n.en),this.settings=new w({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new k({tick:(t,i)=>{c(this.spinContainer,{style:[`transform: rotate(${t}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*i}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(t){if(!t||!this.size)return;const i=this.size.toString();t.getAttribute("width")!==i&&t.setAttribute("width",i),t.getAttribute("height")!==i&&t.setAttribute("height",i)}render(){const t={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"5a2bd14583c0203c1f0c1bf08b1e0bfb03f6b67c",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"a126763387e8e0b2cf17114611683a96f88c19d0",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",{key:"6e1d4403bfd457531dd7796985a53a21a06e5170",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},i("div",{key:"76ddd407e5fb8ca8b45d941e484517fce1e9ac81",style:t})),i("g",Object.assign({key:"54db6c2dff0f2b04eebcea9c172c5b31b03cced1",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"0e6b85cb47c5a5d93ea6ea83fb79940c2a3b8a36",class:"PartitionsBackgrounds"},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:Object.assign({"--index":s.toString()},t)},i("div",{style:t}))))),i("g",{key:"4a80e2032c9ae8c098959fd4d840990852c274ad",class:"PartitionsBackgroundStrokes"},this.options.map(((t,e)=>i("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(e),{width:this.size,height:this.size}))))),i("g",{key:"1627351fb8ca3c8bf14a0a094b23a66ff229ed41",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((t,e)=>[t.Image&&i("g",{class:`PartitionImage PartitionImage${e}`,ref:t=>this.renderImage(t,e)}),t.Name&&i("foreignObject",Object.assign({class:"PartitionText",ref:t=>{if(t){const i=this.options[e].Image?"80":"100";t.setAttribute("width",i),t.setAttribute("height",i)}}},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"9613e4e8d20d71b7f4235d8525fc37c81ce31888",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("g",{key:"ce76408c4d29c88e52f5ad63e6a82656764d382d",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((e,s)=>i("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":s.toString()}},i("div",{style:t}))))),i("foreignObject",{key:"0b04e8ec26b833c76f1cce80434de36a8fbdd1f3",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:t},i("div",{key:"4f73cd8bf70df4aca04be1a39fa6d86ad3b310bf",style:t})),i("foreignObject",{key:"4424537d5b9e6580f1992bb6b0e20b888a108466",ref:this.setSvgSize.bind(this),class:"Top Customable",style:t},i("div",{key:"97ea30e77c51acc82057029d329dc439b3f0f40b",style:t})),i("g",{key:"c380d42505a1db3bb3e579de26815617451f3f17",class:{spinning:this.isSpinning,Center:!0}},i("foreignObject",{key:"b0b8b2d4dd157290942fc02392db8846ba7175b8",ref:t=>{t&&(t.setAttribute("width","100"),t.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},i("div",{key:"5989d7a1345891594a4c0e4d1b1355e7b4944779",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),i("g",{key:"5d43bb8ecefc96b9a382e5a8801b98c71a1ffe2c"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};P.style=':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 14px);font-weight:900}';export{P as C}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|