@everymatrix/casino-engagement-suite-luckywheel 0.2.1 → 0.3.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.esm.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/index.esm.js +1 -1
- package/dist/casino-engagement-suite-luckywheel/p-927567e0.js +15 -0
- package/dist/casino-engagement-suite-luckywheel/p-d8bd2f95.entry.js +1 -0
- package/dist/cjs/{casino-engagement-suite-luckywheel-8e04ce53.js → casino-engagement-suite-luckywheel-9aaa09f9.js} +28 -43
- 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 +18 -33
- package/dist/collection/utils/utils.js +11 -11
- package/dist/esm/{casino-engagement-suite-luckywheel-a8c23787.js → casino-engagement-suite-luckywheel-88d531c4.js} +28 -43
- package/dist/esm/casino-engagement-suite-luckywheel.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/storybook/main.js +30 -4
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-luckywheel/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/components/casino-engagement-suite-luckywheel/casino-engagement-suite-luckywheel.d.ts +0 -1
- package/dist/types/models/luckywheel.d.ts +24 -24
- package/dist/types/utils/types.d.ts +4 -4
- package/package.json +1 -1
- package/dist/casino-engagement-suite-luckywheel/p-e1ff4a5e.entry.js +0 -1
- package/dist/casino-engagement-suite-luckywheel/p-eb7c14fc.js +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-7d1170ae.js";export{s as setNonce}from"./p-7d1170ae.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-
|
|
1
|
+
import{p as e,b as n}from"./p-7d1170ae.js";export{s as setNonce}from"./p-7d1170ae.js";import{g as i}from"./p-e1255160.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["p-d8bd2f95",[[1,"casino-engagement-suite-luckywheel",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],luckywheel:[16],size:[1],contentdirection:[1],limitStylingAppends:[32],isPartitionsCustomableReady:[32],isSpinning:[32],options:[32],radius:[32],speed:[32],settings:[32],svg:[32],spinContainer:[32],spinable:[32],spinner:[32]},[[8,"message","handleEvent"]]]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CasinoEngagementSuiteLuckywheel}from"./p-
|
|
1
|
+
export{C as CasinoEngagementSuiteLuckywheel}from"./p-927567e0.js";import"./p-7d1170ae.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{r as t,h as i,g as e}from"./p-7d1170ae.js";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var s,a,r,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"}(a||(a={})),function(t){t.en="en",t.fr="fr",t.de="de",t.tr="tr"}(r||(r={})),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},f={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))}},m={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},p={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 k{constructor({size:t,radius:i,options:e,themeIndex:s,contentdirection:r}){this.arrowmode=a.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 a.DownFromTop:case a.UpFromCenter:return-Math.PI/2;case a.DownFromCenter:case a.UpFromBottom:return Math.PI/2}},this.contentdirection=r||"anticlockwise",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){const i=this.getSizeImageByPartition(t);let e;return e=this.options[t].image?this.radius-i-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,e))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t),e=this.options[t].image?80:100,s={width:e,height:e};return Object.assign(Object.assign(Object.assign({},i),s),{x:"clockwise"===this.contentdirection?i.x:i.x-s.width,y:i.y-s.height/2})}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,a=((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(a,e.transform),point:u(a,e.position)}}getPropsForPartitionInfo(t,i,e,s){const{point:a,transformOrigin:r}=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)`,"transform-origin":`${n=r,Object.keys(n).map((t=>`${n[t]}px`)).join(" ")}`}});var n}getPartitionDraw(t){const i=l(this.center),e=l(this.radius),{point:s,pointNext:a}=((t,i,e,s)=>{const a=t=>((t,i,e,s)=>{const a=Math.PI/180*(360/i*(t-.5)-90),r=l(s),n=l(e);return{x:r.x+n.x*Math.cos(a),y:r.y+n.y*Math.sin(a)}})(t,i,e,s);return{point:a(t),pointNext:a(t+1)}})(t,this.length,this.radius,this.center);return{d:["M",...v(i),"L",...v(s),"A",...v(e),"0 0 1",...v(a),"Z"].join(" ")}}getDeg(t){return this.findDeg(length-(t||this.length-1),length)}getSpinnerProps(){const t=l(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class w{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*m[this.easingType]*t/this.param.loopSpeed,e=()=>{const t=360*this.param.launchTurns-this.deg,e=i(t);this.animateF(e,this.deg,t,f.in[this.easingType],p.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,f.out[this.easingType],p.out[this.easingType])},a=()=>{this.setDeg((this.deg+t)%360,m[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,m[this.easingType]),this.continueRepeat()},e()},[o.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():a()},[o.halt]:()=>{this.deg===360-t?s():a()}})[this.step]()},this.setDeg=(t,i)=>{this.deg=t,this.tick(t,i)},this.animateF=(t,i,e,s,a)=>{let r=null;const n=()=>{let o=(new Date).getTime();r||(r=o);const h=o-r,c=e*s(h/t)+i,d=Math.abs(a(h/t));this.setDeg(c,d),h<t?setTimeout((()=>n()),30):this.cb()};n()},this.animate=(t,i,e,s,a)=>{let r=null;window.cancelAnimationFrame(r);let n=null;const o=h=>{n||(n=h);const c=h-n,d=e*s(c/t)+i,l=Math.abs(a(c/t));this.setDeg(d,l),c<t?r=window.requestAnimationFrame(o):this.cb()};r=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 i=null==t?void 0:t.data,{type:e}=i,s=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(t);a<s.length;a++)i.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(e[s[a]]=t[s[a]])}return e}(i,["type"]);"SpinLuckyWheelRes"===e&&this.spinner.halt(this.settings.getDeg(s.data.Result.WheelOfFortunePartitionIndex),(()=>{this.isSpinning=!1,this.updateSpinable();const t=this.luckywheel.Program.WheelOfFortune.Partitions[s.data.Result.WheelOfFortunePartitionIndex].PrizeText;window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:t.en||t["*"],HasError:s.success}})}))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await b(this.luckywheel,r.en),this.settings=new k({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new w({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}`}}render(){const t={height:this.size,width:this.size},e={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"014cf34ad67ed718b064797ec5497f93cd8e8fc8",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"ae62d34ee98360bd6da52cad54819813fb714555"},t,{class:"Bottom Customable"}),i("div",{key:"ec3ae09161a1a20956ebf9bb91340c3f77647770",style:e})),i("g",Object.assign({key:"ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"99ca797756be5a290f0951127904489ad6b21c9e",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:{"--index":s.toString()},width:this.size,height:this.size},i("div",{style:e}))))),i("g",{key:"b197f9f51c2a8a1b2337ae180b987ad0896d42ae",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:"00435c08f614ae78ab63d2f9fee0c81ff29730ac",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"},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.Name})))])))),i("g",{key:"a89ea859fd16d72ec6a38c780548a4aade0b26db",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,a)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":a.toString()}},t),i("div",{style:e}))))),i("g",{key:"b77eaeb0043f72ab39c5bcec7b76543871057c28",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,a)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":a.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"f5fbab79d3c2867c20d9aa05a026be3838fcd39b",class:"Middle Customable"},t),i("div",{key:"b6ad416c3ebfd53e2cbbec6de17b085424a15b0e",style:e})),i("foreignObject",Object.assign({key:"fafc4d94ce9fd81eb57cef4670d0a2bee763128a",class:"Top Customable"},t),i("div",{key:"e1fd86da7c3657863271643354bdf6bd8a325791",style:e})),i("g",{key:"383cf401f171986ec7799e98ca048b8aca8dea83",class:{spinning:this.isSpinning,Center:!0},onClick:this.eventSpin},i("foreignObject",{key:"13f1eecbb754f80c6a649f4a57339ae84f4fb09e",x:Number(this.size)/2-50,y:Number(this.size)/2-50,width:100,height:100})),i("g",{key:"b739f94ed6f4d63eeb30ee2c905ad638fa79694a"},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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{C as casino_engagement_suite_luckywheel}from"./p-927567e0.js";import"./p-7d1170ae.js";
|
|
@@ -126,10 +126,10 @@ const pointPlus = (point1, point2) => ({
|
|
|
126
126
|
y: point1.y + point2.y
|
|
127
127
|
});
|
|
128
128
|
const optionCompliment = {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
Image: '',
|
|
130
|
+
Name: 'Thank you',
|
|
131
|
+
PrizeText: '',
|
|
132
|
+
PrizeImage: ''
|
|
133
133
|
};
|
|
134
134
|
const getSumProbability = (partitions) => {
|
|
135
135
|
let probabilityAll = 0;
|
|
@@ -143,8 +143,8 @@ const getOptionsFromPartitions = (partitions, lang) => {
|
|
|
143
143
|
const option = {};
|
|
144
144
|
Object.keys(_partition).map((_key) => {
|
|
145
145
|
if (typeof _partition[_key] === 'object' &&
|
|
146
|
-
_partition[_key]
|
|
147
|
-
const targetKey = _key === '
|
|
146
|
+
!!_partition[_key]) {
|
|
147
|
+
const targetKey = _key === 'Image1' ? 'Image' : _key;
|
|
148
148
|
option[targetKey] = _partition[_key][lang] || _partition[_key]['*'];
|
|
149
149
|
}
|
|
150
150
|
});
|
|
@@ -163,14 +163,14 @@ const preloadImage = async (src) => {
|
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
165
|
const getOptions = async (bonus, lang) => {
|
|
166
|
-
const
|
|
166
|
+
const partitions = bonus.Program.WheelOfFortune.Partitions;
|
|
167
167
|
let options = getOptionsFromPartitions(partitions, lang);
|
|
168
168
|
if (isSafari()) {
|
|
169
169
|
options = options.map(option => {
|
|
170
|
-
if (option.
|
|
170
|
+
if (option.Image) {
|
|
171
171
|
const img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
|
172
|
-
img.href.baseVal = option.
|
|
173
|
-
return Object.assign(Object.assign({}, option), {
|
|
172
|
+
img.href.baseVal = option.Image;
|
|
173
|
+
return Object.assign(Object.assign({}, option), { Image: img });
|
|
174
174
|
}
|
|
175
175
|
else {
|
|
176
176
|
return option;
|
|
@@ -178,7 +178,7 @@ const getOptions = async (bonus, lang) => {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
|
-
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.
|
|
181
|
+
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.Image))))));
|
|
182
182
|
}
|
|
183
183
|
return options;
|
|
184
184
|
};
|
|
@@ -572,14 +572,14 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
572
572
|
});
|
|
573
573
|
};
|
|
574
574
|
this.renderImage = (node, index) => {
|
|
575
|
-
const image = this.options[index].
|
|
575
|
+
const image = this.options[index].Image;
|
|
576
576
|
setProps(image, this.settings.getSvgImageProps(index));
|
|
577
577
|
node.innerHTML = null;
|
|
578
578
|
node.appendChild(image);
|
|
579
579
|
};
|
|
580
580
|
this.updateSpinable = () => {
|
|
581
|
-
if (!!this.luckywheel.
|
|
582
|
-
if (Number(this.luckywheel.
|
|
581
|
+
if (!!this.luckywheel.Current) {
|
|
582
|
+
if (Number(this.luckywheel.Current.RemainingTimes) > 0) {
|
|
583
583
|
this.spinable = true;
|
|
584
584
|
return;
|
|
585
585
|
}
|
|
@@ -599,25 +599,10 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
599
599
|
this.spinner.launch();
|
|
600
600
|
window.postMessage({
|
|
601
601
|
type: 'SpinLuckyWheel',
|
|
602
|
-
|
|
602
|
+
data: {
|
|
603
|
+
lotteryProgramID: this.luckywheel.Program.Id,
|
|
604
|
+
}
|
|
603
605
|
});
|
|
604
|
-
// todo: this code below simulates the server response,
|
|
605
|
-
// delete after implementation with GLС
|
|
606
|
-
setTimeout(() => {
|
|
607
|
-
window.postMessage({
|
|
608
|
-
type: 'SpinLuckyWheelRes',
|
|
609
|
-
data: {
|
|
610
|
-
item: { result: { wheelOfFortunePartitionIndex: 1 } },
|
|
611
|
-
success: false
|
|
612
|
-
}
|
|
613
|
-
});
|
|
614
|
-
}, 2500);
|
|
615
|
-
};
|
|
616
|
-
this.handleSpinClick = () => {
|
|
617
|
-
if (isSafari()) {
|
|
618
|
-
return;
|
|
619
|
-
}
|
|
620
|
-
this.eventSpin();
|
|
621
606
|
};
|
|
622
607
|
this.clientStyling = '';
|
|
623
608
|
this.clientStylingUrl = '';
|
|
@@ -642,15 +627,15 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
642
627
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
643
628
|
switch (type) {
|
|
644
629
|
case 'SpinLuckyWheelRes':
|
|
645
|
-
this.spinner.halt(this.settings.getDeg(rest.data.
|
|
630
|
+
this.spinner.halt(this.settings.getDeg(rest.data.Result.WheelOfFortunePartitionIndex), () => {
|
|
646
631
|
this.isSpinning = false;
|
|
647
632
|
this.updateSpinable();
|
|
648
|
-
const prizeText = this.luckywheel.
|
|
633
|
+
const prizeText = this.luckywheel.Program.WheelOfFortune.Partitions[rest.data.Result.WheelOfFortunePartitionIndex].PrizeText;
|
|
649
634
|
window.postMessage({
|
|
650
635
|
type: 'ShowLuckywheelRewardModal',
|
|
651
636
|
data: {
|
|
652
637
|
PrizeMessage: prizeText['en'] || prizeText['*'],
|
|
653
|
-
HasError: rest.
|
|
638
|
+
HasError: rest.success,
|
|
654
639
|
}
|
|
655
640
|
});
|
|
656
641
|
});
|
|
@@ -699,20 +684,20 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
699
684
|
render() {
|
|
700
685
|
const sizeProps = { height: this.size, width: this.size };
|
|
701
686
|
const foreignObjectAgentProps = { 'height': `${this.size}px`, 'width': `${this.size}px` };
|
|
702
|
-
return (index.h("div", { key: '
|
|
687
|
+
return (index.h("div", { key: '014cf34ad67ed718b064797ec5497f93cd8e8fc8', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, index.h("svg", { key: 'b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b', width: this.size, height: this.size, ref: (el) => { this.svg = el; } }, index.h("foreignObject", Object.assign({ key: 'ae62d34ee98360bd6da52cad54819813fb714555' }, sizeProps, { class: "Bottom Customable" }), index.h("div", { key: 'ec3ae09161a1a20956ebf9bb91340c3f77647770', style: foreignObjectAgentProps })), index.h("g", Object.assign({ key: 'ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), index.h("g", { key: '99ca797756be5a290f0951127904489ad6b21c9e', class: "PartitionsBackgrounds" }, this.options.map((_el, index$1) => {
|
|
703
688
|
return (index.h("foreignObject", { "clip-path": `url(#clip${index$1})`, class: "PartitionBackground Customable", style: { '--index': index$1.toString() }, width: this.size, height: this.size }, index.h("div", { style: foreignObjectAgentProps })));
|
|
704
|
-
})), index.h("g", { key: '
|
|
689
|
+
})), index.h("g", { key: 'b197f9f51c2a8a1b2337ae180b987ad0896d42ae', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index$1) => {
|
|
705
690
|
return (index.h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index$1), { width: this.size, height: this.size })));
|
|
706
|
-
})), index.h("g", { key: '
|
|
691
|
+
})), index.h("g", { key: '00435c08f614ae78ab63d2f9fee0c81ff29730ac', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index$1) => {
|
|
707
692
|
return ([
|
|
708
|
-
el.
|
|
709
|
-
el.
|
|
693
|
+
el.Image && (index.h("g", { class: `PartitionImage PartitionImage${index$1}`, ref: (el) => this.renderImage(el, index$1) })),
|
|
694
|
+
el.Name && (index.h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index$1)), index.h("div", { class: "PartitionTextEntityContainer" }, index.h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
710
695
|
]);
|
|
711
|
-
}))), index.h("g", { key: '
|
|
696
|
+
}))), index.h("g", { key: 'a89ea859fd16d72ec6a38c780548a4aade0b26db', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable1': true } }, this.options.map((_el, index$1) => {
|
|
712
697
|
return (index.h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
713
|
-
})), index.h("g", { key: '
|
|
698
|
+
})), index.h("g", { key: 'b77eaeb0043f72ab39c5bcec7b76543871057c28', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable2': true } }, this.options.map((_el, index$1) => {
|
|
714
699
|
return (index.h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index$1.toString() } }, sizeProps), index.h("div", { style: foreignObjectAgentProps })));
|
|
715
|
-
})), index.h("foreignObject", Object.assign({ key: '
|
|
700
|
+
})), index.h("foreignObject", Object.assign({ key: 'f5fbab79d3c2867c20d9aa05a026be3838fcd39b', class: "Middle Customable" }, sizeProps), index.h("div", { key: 'b6ad416c3ebfd53e2cbbec6de17b085424a15b0e', style: foreignObjectAgentProps })), index.h("foreignObject", Object.assign({ key: 'fafc4d94ce9fd81eb57cef4670d0a2bee763128a', class: "Top Customable" }, sizeProps), index.h("div", { key: 'e1fd86da7c3657863271643354bdf6bd8a325791', style: foreignObjectAgentProps })), index.h("g", { key: '383cf401f171986ec7799e98ca048b8aca8dea83', class: { 'spinning': this.isSpinning, 'Center': true }, onClick: this.eventSpin }, index.h("foreignObject", { key: '13f1eecbb754f80c6a649f4a57339ae84f4fb09e', x: Number(this.size) / 2 - 100 / 2, y: Number(this.size) / 2 - 100 / 2, width: 100, height: 100 })), index.h("g", { key: 'b739f94ed6f4d63eeb30ee2c905ad638fa79694a' }, this.options.map((_el, index$1) => {
|
|
716
701
|
return (index.h("clipPath", { id: `clip${index$1}` }, index.h("path", Object.assign({}, this.settings.getPartitionDraw(index$1)))));
|
|
717
702
|
})))));
|
|
718
703
|
}
|
|
@@ -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-9aaa09f9.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-9aaa09f9.js');
|
|
6
6
|
require('./index-6096cc4b.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
import { SvgCalc } from "../../utils/class.svgcalc";
|
|
4
4
|
import { Lang } from "../../utils/types";
|
|
5
|
-
import { getOptions,
|
|
5
|
+
import { getOptions, setProps } from "../../utils/utils";
|
|
6
6
|
import { Spinner } from "../../utils/class.spinner";
|
|
7
7
|
export class CasinoEngagementSuiteLuckywheel {
|
|
8
8
|
constructor() {
|
|
@@ -25,14 +25,14 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
this.renderImage = (node, index) => {
|
|
28
|
-
const image = this.options[index].
|
|
28
|
+
const image = this.options[index].Image;
|
|
29
29
|
setProps(image, this.settings.getSvgImageProps(index));
|
|
30
30
|
node.innerHTML = null;
|
|
31
31
|
node.appendChild(image);
|
|
32
32
|
};
|
|
33
33
|
this.updateSpinable = () => {
|
|
34
|
-
if (!!this.luckywheel.
|
|
35
|
-
if (Number(this.luckywheel.
|
|
34
|
+
if (!!this.luckywheel.Current) {
|
|
35
|
+
if (Number(this.luckywheel.Current.RemainingTimes) > 0) {
|
|
36
36
|
this.spinable = true;
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
@@ -52,25 +52,10 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
52
52
|
this.spinner.launch();
|
|
53
53
|
window.postMessage({
|
|
54
54
|
type: 'SpinLuckyWheel',
|
|
55
|
-
|
|
55
|
+
data: {
|
|
56
|
+
lotteryProgramID: this.luckywheel.Program.Id,
|
|
57
|
+
}
|
|
56
58
|
});
|
|
57
|
-
// todo: this code below simulates the server response,
|
|
58
|
-
// delete after implementation with GLС
|
|
59
|
-
setTimeout(() => {
|
|
60
|
-
window.postMessage({
|
|
61
|
-
type: 'SpinLuckyWheelRes',
|
|
62
|
-
data: {
|
|
63
|
-
item: { result: { wheelOfFortunePartitionIndex: 1 } },
|
|
64
|
-
success: false
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}, 2500);
|
|
68
|
-
};
|
|
69
|
-
this.handleSpinClick = () => {
|
|
70
|
-
if (isSafari()) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
this.eventSpin();
|
|
74
59
|
};
|
|
75
60
|
this.clientStyling = '';
|
|
76
61
|
this.clientStylingUrl = '';
|
|
@@ -95,15 +80,15 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
95
80
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
96
81
|
switch (type) {
|
|
97
82
|
case 'SpinLuckyWheelRes':
|
|
98
|
-
this.spinner.halt(this.settings.getDeg(rest.data.
|
|
83
|
+
this.spinner.halt(this.settings.getDeg(rest.data.Result.WheelOfFortunePartitionIndex), () => {
|
|
99
84
|
this.isSpinning = false;
|
|
100
85
|
this.updateSpinable();
|
|
101
|
-
const prizeText = this.luckywheel.
|
|
86
|
+
const prizeText = this.luckywheel.Program.WheelOfFortune.Partitions[rest.data.Result.WheelOfFortunePartitionIndex].PrizeText;
|
|
102
87
|
window.postMessage({
|
|
103
88
|
type: 'ShowLuckywheelRewardModal',
|
|
104
89
|
data: {
|
|
105
90
|
PrizeMessage: prizeText['en'] || prizeText['*'],
|
|
106
|
-
HasError: rest.
|
|
91
|
+
HasError: rest.success,
|
|
107
92
|
}
|
|
108
93
|
});
|
|
109
94
|
});
|
|
@@ -152,20 +137,20 @@ export class CasinoEngagementSuiteLuckywheel {
|
|
|
152
137
|
render() {
|
|
153
138
|
const sizeProps = { height: this.size, width: this.size };
|
|
154
139
|
const foreignObjectAgentProps = { 'height': `${this.size}px`, 'width': `${this.size}px` };
|
|
155
|
-
return (h("div", { key: '
|
|
140
|
+
return (h("div", { key: '014cf34ad67ed718b064797ec5497f93cd8e8fc8', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b', width: this.size, height: this.size, ref: (el) => { this.svg = el; } }, h("foreignObject", Object.assign({ key: 'ae62d34ee98360bd6da52cad54819813fb714555' }, sizeProps, { class: "Bottom Customable" }), h("div", { key: 'ec3ae09161a1a20956ebf9bb91340c3f77647770', style: foreignObjectAgentProps })), h("g", Object.assign({ key: 'ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '99ca797756be5a290f0951127904489ad6b21c9e', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
156
141
|
return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: { '--index': index.toString() }, width: this.size, height: this.size }, h("div", { style: foreignObjectAgentProps })));
|
|
157
|
-
})), h("g", { key: '
|
|
142
|
+
})), h("g", { key: 'b197f9f51c2a8a1b2337ae180b987ad0896d42ae', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
158
143
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
159
|
-
})), h("g", { key: '
|
|
144
|
+
})), h("g", { key: '00435c08f614ae78ab63d2f9fee0c81ff29730ac', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
160
145
|
return ([
|
|
161
|
-
el.
|
|
162
|
-
el.
|
|
146
|
+
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
147
|
+
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
163
148
|
]);
|
|
164
|
-
}))), h("g", { key: '
|
|
149
|
+
}))), h("g", { key: 'a89ea859fd16d72ec6a38c780548a4aade0b26db', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable1': true } }, this.options.map((_el, index) => {
|
|
165
150
|
return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
166
|
-
})), h("g", { key: '
|
|
151
|
+
})), h("g", { key: 'b77eaeb0043f72ab39c5bcec7b76543871057c28', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable2': true } }, this.options.map((_el, index) => {
|
|
167
152
|
return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
168
|
-
})), h("foreignObject", Object.assign({ key: '
|
|
153
|
+
})), h("foreignObject", Object.assign({ key: 'f5fbab79d3c2867c20d9aa05a026be3838fcd39b', class: "Middle Customable" }, sizeProps), h("div", { key: 'b6ad416c3ebfd53e2cbbec6de17b085424a15b0e', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: 'fafc4d94ce9fd81eb57cef4670d0a2bee763128a', class: "Top Customable" }, sizeProps), h("div", { key: 'e1fd86da7c3657863271643354bdf6bd8a325791', style: foreignObjectAgentProps })), h("g", { key: '383cf401f171986ec7799e98ca048b8aca8dea83', class: { 'spinning': this.isSpinning, 'Center': true }, onClick: this.eventSpin }, h("foreignObject", { key: '13f1eecbb754f80c6a649f4a57339ae84f4fb09e', x: Number(this.size) / 2 - 100 / 2, y: Number(this.size) / 2 - 100 / 2, width: 100, height: 100 })), h("g", { key: 'b739f94ed6f4d63eeb30ee2c905ad638fa79694a' }, this.options.map((_el, index) => {
|
|
169
154
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
170
155
|
})))));
|
|
171
156
|
}
|
|
@@ -68,10 +68,10 @@ export const pointPlus = (point1, point2) => ({
|
|
|
68
68
|
y: point1.y + point2.y
|
|
69
69
|
});
|
|
70
70
|
const optionCompliment = {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
Image: '',
|
|
72
|
+
Name: 'Thank you',
|
|
73
|
+
PrizeText: '',
|
|
74
|
+
PrizeImage: ''
|
|
75
75
|
};
|
|
76
76
|
const getSumProbability = (partitions) => {
|
|
77
77
|
let probabilityAll = 0;
|
|
@@ -85,8 +85,8 @@ const getOptionsFromPartitions = (partitions, lang) => {
|
|
|
85
85
|
const option = {};
|
|
86
86
|
Object.keys(_partition).map((_key) => {
|
|
87
87
|
if (typeof _partition[_key] === 'object' &&
|
|
88
|
-
_partition[_key]
|
|
89
|
-
const targetKey = _key === '
|
|
88
|
+
!!_partition[_key]) {
|
|
89
|
+
const targetKey = _key === 'Image1' ? 'Image' : _key;
|
|
90
90
|
option[targetKey] = _partition[_key][lang] || _partition[_key]['*'];
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -105,14 +105,14 @@ const preloadImage = async (src) => {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
export const getOptions = async (bonus, lang) => {
|
|
108
|
-
const
|
|
108
|
+
const partitions = bonus.Program.WheelOfFortune.Partitions;
|
|
109
109
|
let options = getOptionsFromPartitions(partitions, lang);
|
|
110
110
|
if (isSafari()) {
|
|
111
111
|
options = options.map(option => {
|
|
112
|
-
if (option.
|
|
112
|
+
if (option.Image) {
|
|
113
113
|
const img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
|
114
|
-
img.href.baseVal = option.
|
|
115
|
-
return Object.assign(Object.assign({}, option), {
|
|
114
|
+
img.href.baseVal = option.Image;
|
|
115
|
+
return Object.assign(Object.assign({}, option), { Image: img });
|
|
116
116
|
}
|
|
117
117
|
else {
|
|
118
118
|
return option;
|
|
@@ -120,7 +120,7 @@ export const getOptions = async (bonus, lang) => {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
else {
|
|
123
|
-
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.
|
|
123
|
+
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.Image))))));
|
|
124
124
|
}
|
|
125
125
|
return options;
|
|
126
126
|
};
|
|
@@ -124,10 +124,10 @@ const pointPlus = (point1, point2) => ({
|
|
|
124
124
|
y: point1.y + point2.y
|
|
125
125
|
});
|
|
126
126
|
const optionCompliment = {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
Image: '',
|
|
128
|
+
Name: 'Thank you',
|
|
129
|
+
PrizeText: '',
|
|
130
|
+
PrizeImage: ''
|
|
131
131
|
};
|
|
132
132
|
const getSumProbability = (partitions) => {
|
|
133
133
|
let probabilityAll = 0;
|
|
@@ -141,8 +141,8 @@ const getOptionsFromPartitions = (partitions, lang) => {
|
|
|
141
141
|
const option = {};
|
|
142
142
|
Object.keys(_partition).map((_key) => {
|
|
143
143
|
if (typeof _partition[_key] === 'object' &&
|
|
144
|
-
_partition[_key]
|
|
145
|
-
const targetKey = _key === '
|
|
144
|
+
!!_partition[_key]) {
|
|
145
|
+
const targetKey = _key === 'Image1' ? 'Image' : _key;
|
|
146
146
|
option[targetKey] = _partition[_key][lang] || _partition[_key]['*'];
|
|
147
147
|
}
|
|
148
148
|
});
|
|
@@ -161,14 +161,14 @@ const preloadImage = async (src) => {
|
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
const getOptions = async (bonus, lang) => {
|
|
164
|
-
const
|
|
164
|
+
const partitions = bonus.Program.WheelOfFortune.Partitions;
|
|
165
165
|
let options = getOptionsFromPartitions(partitions, lang);
|
|
166
166
|
if (isSafari()) {
|
|
167
167
|
options = options.map(option => {
|
|
168
|
-
if (option.
|
|
168
|
+
if (option.Image) {
|
|
169
169
|
const img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
|
170
|
-
img.href.baseVal = option.
|
|
171
|
-
return Object.assign(Object.assign({}, option), {
|
|
170
|
+
img.href.baseVal = option.Image;
|
|
171
|
+
return Object.assign(Object.assign({}, option), { Image: img });
|
|
172
172
|
}
|
|
173
173
|
else {
|
|
174
174
|
return option;
|
|
@@ -176,7 +176,7 @@ const getOptions = async (bonus, lang) => {
|
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
else {
|
|
179
|
-
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.
|
|
179
|
+
options = await Promise.all(options.map(async (o) => (Object.assign(Object.assign({}, o), (await preloadImage(o.Image))))));
|
|
180
180
|
}
|
|
181
181
|
return options;
|
|
182
182
|
};
|
|
@@ -570,14 +570,14 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
570
570
|
});
|
|
571
571
|
};
|
|
572
572
|
this.renderImage = (node, index) => {
|
|
573
|
-
const image = this.options[index].
|
|
573
|
+
const image = this.options[index].Image;
|
|
574
574
|
setProps(image, this.settings.getSvgImageProps(index));
|
|
575
575
|
node.innerHTML = null;
|
|
576
576
|
node.appendChild(image);
|
|
577
577
|
};
|
|
578
578
|
this.updateSpinable = () => {
|
|
579
|
-
if (!!this.luckywheel.
|
|
580
|
-
if (Number(this.luckywheel.
|
|
579
|
+
if (!!this.luckywheel.Current) {
|
|
580
|
+
if (Number(this.luckywheel.Current.RemainingTimes) > 0) {
|
|
581
581
|
this.spinable = true;
|
|
582
582
|
return;
|
|
583
583
|
}
|
|
@@ -597,25 +597,10 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
597
597
|
this.spinner.launch();
|
|
598
598
|
window.postMessage({
|
|
599
599
|
type: 'SpinLuckyWheel',
|
|
600
|
-
|
|
600
|
+
data: {
|
|
601
|
+
lotteryProgramID: this.luckywheel.Program.Id,
|
|
602
|
+
}
|
|
601
603
|
});
|
|
602
|
-
// todo: this code below simulates the server response,
|
|
603
|
-
// delete after implementation with GLС
|
|
604
|
-
setTimeout(() => {
|
|
605
|
-
window.postMessage({
|
|
606
|
-
type: 'SpinLuckyWheelRes',
|
|
607
|
-
data: {
|
|
608
|
-
item: { result: { wheelOfFortunePartitionIndex: 1 } },
|
|
609
|
-
success: false
|
|
610
|
-
}
|
|
611
|
-
});
|
|
612
|
-
}, 2500);
|
|
613
|
-
};
|
|
614
|
-
this.handleSpinClick = () => {
|
|
615
|
-
if (isSafari()) {
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
|
-
this.eventSpin();
|
|
619
604
|
};
|
|
620
605
|
this.clientStyling = '';
|
|
621
606
|
this.clientStylingUrl = '';
|
|
@@ -640,15 +625,15 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
640
625
|
const _a = e === null || e === void 0 ? void 0 : e.data, { type } = _a, rest = __rest(_a, ["type"]);
|
|
641
626
|
switch (type) {
|
|
642
627
|
case 'SpinLuckyWheelRes':
|
|
643
|
-
this.spinner.halt(this.settings.getDeg(rest.data.
|
|
628
|
+
this.spinner.halt(this.settings.getDeg(rest.data.Result.WheelOfFortunePartitionIndex), () => {
|
|
644
629
|
this.isSpinning = false;
|
|
645
630
|
this.updateSpinable();
|
|
646
|
-
const prizeText = this.luckywheel.
|
|
631
|
+
const prizeText = this.luckywheel.Program.WheelOfFortune.Partitions[rest.data.Result.WheelOfFortunePartitionIndex].PrizeText;
|
|
647
632
|
window.postMessage({
|
|
648
633
|
type: 'ShowLuckywheelRewardModal',
|
|
649
634
|
data: {
|
|
650
635
|
PrizeMessage: prizeText['en'] || prizeText['*'],
|
|
651
|
-
HasError: rest.
|
|
636
|
+
HasError: rest.success,
|
|
652
637
|
}
|
|
653
638
|
});
|
|
654
639
|
});
|
|
@@ -697,20 +682,20 @@ const CasinoEngagementSuiteLuckywheel = class {
|
|
|
697
682
|
render() {
|
|
698
683
|
const sizeProps = { height: this.size, width: this.size };
|
|
699
684
|
const foreignObjectAgentProps = { 'height': `${this.size}px`, 'width': `${this.size}px` };
|
|
700
|
-
return (h("div", { key: '
|
|
685
|
+
return (h("div", { key: '014cf34ad67ed718b064797ec5497f93cd8e8fc8', class: `WheelContainer ${this.device}`, style: this.defineGeneralVariables() }, h("svg", { key: 'b7eedc15f6290740b3cfa85b784dcb3ed6c59b9b', width: this.size, height: this.size, ref: (el) => { this.svg = el; } }, h("foreignObject", Object.assign({ key: 'ae62d34ee98360bd6da52cad54819813fb714555' }, sizeProps, { class: "Bottom Customable" }), h("div", { key: 'ec3ae09161a1a20956ebf9bb91340c3f77647770', style: foreignObjectAgentProps })), h("g", Object.assign({ key: 'ca9edc54e36206aaf04d8645efa9aeb8b2a7aa9a', class: "PartitionsContainer" }, this.settings.getSpinnerProps()), h("g", { key: '99ca797756be5a290f0951127904489ad6b21c9e', class: "PartitionsBackgrounds" }, this.options.map((_el, index) => {
|
|
701
686
|
return (h("foreignObject", { "clip-path": `url(#clip${index})`, class: "PartitionBackground Customable", style: { '--index': index.toString() }, width: this.size, height: this.size }, h("div", { style: foreignObjectAgentProps })));
|
|
702
|
-
})), h("g", { key: '
|
|
687
|
+
})), h("g", { key: 'b197f9f51c2a8a1b2337ae180b987ad0896d42ae', class: "PartitionsBackgroundStrokes" }, this.options.map((_el, index) => {
|
|
703
688
|
return (h("path", Object.assign({ class: "PartitionBackgroundStroke" }, this.settings.getPartitionDraw(index), { width: this.size, height: this.size })));
|
|
704
|
-
})), h("g", { key: '
|
|
689
|
+
})), h("g", { key: '00435c08f614ae78ab63d2f9fee0c81ff29730ac', class: "Partitions", style: { filter: this.speed > 0.3 ? `blur(${this.speed}px)` : '' } }, this.options.map((el, index) => {
|
|
705
690
|
return ([
|
|
706
|
-
el.
|
|
707
|
-
el.
|
|
691
|
+
el.Image && (h("g", { class: `PartitionImage PartitionImage${index}`, ref: (el) => this.renderImage(el, index) })),
|
|
692
|
+
el.Name && (h("foreignObject", Object.assign({ class: "PartitionText" }, this.settings.getSvgTextPropsAdjustedByImage(index)), h("div", { class: "PartitionTextEntityContainer" }, h("p", { class: `PartitionTextEntity${this.settings.contentdirection === 'clockwise' ? '' : ' Anticlockwise'}`, innerHTML: el.Name }))))
|
|
708
693
|
]);
|
|
709
|
-
}))), h("g", { key: '
|
|
694
|
+
}))), h("g", { key: 'a89ea859fd16d72ec6a38c780548a4aade0b26db', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable1': true } }, this.options.map((_el, index) => {
|
|
710
695
|
return (h("foreignObject", Object.assign({ class: "Partition1 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
711
|
-
})), h("g", { key: '
|
|
696
|
+
})), h("g", { key: 'b77eaeb0043f72ab39c5bcec7b76543871057c28', class: { 'active': this.isPartitionsCustomableReady, 'PartitionsCustomable2': true } }, this.options.map((_el, index) => {
|
|
712
697
|
return (h("foreignObject", Object.assign({ class: "Partition2 Customable", style: { '--index': index.toString() } }, sizeProps), h("div", { style: foreignObjectAgentProps })));
|
|
713
|
-
})), h("foreignObject", Object.assign({ key: '
|
|
698
|
+
})), h("foreignObject", Object.assign({ key: 'f5fbab79d3c2867c20d9aa05a026be3838fcd39b', class: "Middle Customable" }, sizeProps), h("div", { key: 'b6ad416c3ebfd53e2cbbec6de17b085424a15b0e', style: foreignObjectAgentProps })), h("foreignObject", Object.assign({ key: 'fafc4d94ce9fd81eb57cef4670d0a2bee763128a', class: "Top Customable" }, sizeProps), h("div", { key: 'e1fd86da7c3657863271643354bdf6bd8a325791', style: foreignObjectAgentProps })), h("g", { key: '383cf401f171986ec7799e98ca048b8aca8dea83', class: { 'spinning': this.isSpinning, 'Center': true }, onClick: this.eventSpin }, h("foreignObject", { key: '13f1eecbb754f80c6a649f4a57339ae84f4fb09e', x: Number(this.size) / 2 - 100 / 2, y: Number(this.size) / 2 - 100 / 2, width: 100, height: 100 })), h("g", { key: 'b739f94ed6f4d63eeb30ee2c905ad638fa79694a' }, this.options.map((_el, index) => {
|
|
714
699
|
return (h("clipPath", { id: `clip${index}` }, h("path", Object.assign({}, this.settings.getPartitionDraw(index)))));
|
|
715
700
|
})))));
|
|
716
701
|
}
|
|
@@ -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-88d531c4.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-88d531c4.js';
|
|
2
2
|
import './index-48c42d04.js';
|
package/dist/storybook/main.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
|
|
2
3
|
const config = {
|
|
3
4
|
stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
|
|
4
|
-
addons: [
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'storybook-dark-mode'
|
|
9
|
+
],
|
|
5
10
|
docs: {
|
|
6
11
|
defaultName: 'Documentation',
|
|
7
12
|
autodocs: 'tag'
|
|
@@ -10,10 +15,31 @@ const config = {
|
|
|
10
15
|
name: '@storybook/web-components-vite',
|
|
11
16
|
options: {}
|
|
12
17
|
},
|
|
18
|
+
// Async viteFinal to build dependent packages before finalizing configuration.
|
|
13
19
|
viteFinal: async (config) => {
|
|
20
|
+
const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
|
|
21
|
+
const usedPackages = detectUsedPackages(storyFiles);
|
|
22
|
+
const buildPromises = usedPackages.map(async (pkg) => {
|
|
23
|
+
try {
|
|
24
|
+
console.log(`Building package ${pkg}...`);
|
|
25
|
+
const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
|
|
26
|
+
console.log(`Built package ${pkg}: ${stdout}`);
|
|
27
|
+
if (stderr) {
|
|
28
|
+
console.error(`Build warning/error for package ${pkg}: ${stderr}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error(`Error building package ${pkg}:`, error);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
await Promise.all(buildPromises);
|
|
36
|
+
const parsedPaths = parseTsConfig() || {};
|
|
37
|
+
const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
|
|
14
38
|
return Object.assign(Object.assign({}, config), { resolve: {
|
|
15
|
-
alias: {
|
|
16
|
-
|
|
39
|
+
alias: Object.assign({}, filteredParsedPaths)
|
|
40
|
+
}, define: {
|
|
41
|
+
process: {
|
|
42
|
+
env: {}
|
|
17
43
|
}
|
|
18
44
|
} });
|
|
19
45
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { exec as execCallback } from 'child_process';
|
|
3
|
+
export declare const exec: typeof execCallback.__promisify__;
|
|
4
|
+
/**
|
|
5
|
+
* Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
|
|
6
|
+
* @param dir The directory to search.
|
|
7
|
+
* @returns Array of story file paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStoryFiles: (dir: string) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* Detects which internal packages are used in the provided story files.
|
|
12
|
+
* It looks at every import that starts with the given package alias prefix,
|
|
13
|
+
* then extracts the package name (the segment immediately following the prefix).
|
|
14
|
+
*
|
|
15
|
+
* @param stories Array of story file paths.
|
|
16
|
+
* @returns Array of unique package names (e.g. ['foo', 'bar']).
|
|
17
|
+
*/
|
|
18
|
+
export declare const detectUsedPackages: (stories: string[]) => string[];
|
|
19
|
+
/**
|
|
20
|
+
* Extracts all import paths from a file using the TypeScript compiler API.
|
|
21
|
+
* @param filePath The file path to parse.
|
|
22
|
+
* @returns Array of import strings.
|
|
23
|
+
*/
|
|
24
|
+
export declare const extractImports: (filePath: string) => string[];
|
|
25
|
+
/**
|
|
26
|
+
* Parses the tsconfig paths and resolves them to absolute paths.
|
|
27
|
+
* @param tsconfigPath The path to the tsconfig file.
|
|
28
|
+
* @returns An object mapping alias keys to absolute paths.
|
|
29
|
+
*/
|
|
30
|
+
export declare const parseTsConfig: () => Record<string, string> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Filters the parsed tsconfig alias mapping to only include keys that correspond
|
|
33
|
+
* to the used packages.
|
|
34
|
+
*
|
|
35
|
+
* @param parsedPaths The full alias mapping from tsconfig.
|
|
36
|
+
* @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
|
|
37
|
+
* @returns Filtered alias mapping.
|
|
38
|
+
*/
|
|
39
|
+
export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
export interface LuckyWheel {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Program: LuckyWheelProgram;
|
|
3
|
+
Current?: Record<string, string | number>;
|
|
4
|
+
Next?: Record<string, string | number>;
|
|
5
5
|
}
|
|
6
6
|
export interface LuckyWheelProgram {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
BaseCurrency: string;
|
|
8
|
+
Editor: string;
|
|
9
|
+
Id: string;
|
|
10
|
+
Metadata: Record<string, string>;
|
|
11
|
+
Name: Record<string, string>;
|
|
12
|
+
Status: string;
|
|
13
|
+
Time: string;
|
|
14
|
+
Type: string;
|
|
15
|
+
Version: string;
|
|
16
16
|
[key: string]: any;
|
|
17
17
|
}
|
|
18
18
|
export interface WheelOfFortune {
|
|
19
|
-
|
|
19
|
+
Partitions?: Array<WheelOfFortunePartition>;
|
|
20
20
|
}
|
|
21
21
|
export interface WheelOfFortunePartition {
|
|
22
|
-
|
|
22
|
+
Name?: {
|
|
23
23
|
[key: string]: string;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
Image1?: {
|
|
26
26
|
[key: string]: string;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
Image2?: {
|
|
29
29
|
[key: string]: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
Image3?: {
|
|
32
32
|
[key: string]: string;
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
Probability?: number;
|
|
35
|
+
Rules?: Array<WheelOfFortunePartitionRule>;
|
|
36
36
|
}
|
|
37
37
|
export interface WheelOfFortunePartitionRule {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
When?: WhenConditionBase;
|
|
39
|
+
Then?: ActionBase;
|
|
40
|
+
AndThen?: ActionBase;
|
|
41
41
|
}
|
|
42
42
|
export interface WhenConditionBase {
|
|
43
|
-
|
|
43
|
+
Evaluator?: string;
|
|
44
44
|
}
|
|
45
45
|
export interface ActionBase {
|
|
46
|
-
|
|
46
|
+
Type?: string;
|
|
47
47
|
}
|
|
48
48
|
export declare enum CurrentInfo {
|
|
49
49
|
ActiveTickets = "ActiveTickets",
|
|
@@ -33,10 +33,10 @@ export declare enum ContentDirection {
|
|
|
33
33
|
outward = 0
|
|
34
34
|
}
|
|
35
35
|
export interface Option {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
Image: SVGElement | string;
|
|
37
|
+
Name: string;
|
|
38
|
+
PrizeText: string;
|
|
39
|
+
PrizeImage: string;
|
|
40
40
|
}
|
|
41
41
|
export declare enum SpinStep {
|
|
42
42
|
launch = "launch",
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{C as casino_engagement_suite_luckywheel}from"./p-eb7c14fc.js";import"./p-7d1170ae.js";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,g as e}from"./p-7d1170ae.js";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */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=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),d=(t,i)=>{Object.keys(i).map((e=>{t.setAttribute(e.split(/(?=[A-Z])/).map((t=>t.toLocaleLowerCase())).join("-"),i[e])}))},l=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})),u=t=>({x:t,y:t}),g=(t,i)=>({x:t.x+i.x,y:t.y+i.y}),b={image:"",name:"Thank you",prizeText:"",prizeImage:""},f=async(t,i)=>{const{partitions:e}=t.program.wheelOfFortune;let s=((t,i)=>{const e=t.map((t=>{const e={};return Object.keys(t).map((s=>{"object"==typeof t[s]&&t[s].hasOwnProperty("*")&&(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(b),e})(e,i);return s=c()?s.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(s.map((async t=>Object.assign(Object.assign({},t),await(async t=>t?{image:await l(t)}:{})(t.image))))),s},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))}},m={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},y={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}},v=[{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}],x=t=>Object.keys(t).map((i=>t[i]));var w;!function(t){t[t.clockwise=1]="clockwise",t[t.anticlockwise=-1]="anticlockwise"}(w||(w={}));class k{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||"anticlockwise",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){const i=this.getSizeImageByPartition(t);let e;return e=this.options[t].image?this.radius-i-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(t,this.offsetText,e))}getSvgTextPropsAdjustedByImage(t){const i=this.getSvgTextProps(t),e=this.options[t].image?80:100,s={width:e,height:e};return Object.assign(Object.assign(Object.assign({},i),s),{x:"clockwise"===this.contentdirection?i.x:i.x-s.width,y:i.y-s.height/2})}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 w.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=u(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:g(r,e.transform),point:g(r,e.position)}}getPropsForPartitionInfo(t,i,e,s){const{point:r,transformOrigin:n}=this.getPartitionPositions(t,e,i);return Object.assign(Object.assign({},r),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(t,s)}deg)`,"transform-origin":`${a=n,Object.keys(a).map((t=>`${a[t]}px`)).join(" ")}`}});var a}getPartitionDraw(t){const i=u(this.center),e=u(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=u(s),a=u(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",...x(i),"L",...x(s),"A",...x(e),"0 0 1",...x(r),"Z"].join(" ")}}getDeg(t){return this.findDeg(length-(t||this.length-1),length)}getSpinnerProps(){const t=u(this.center);return{"transform-origin":`${t.x} ${t.y}`}}}class P{constructor(t){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=h.cubic,this.param=v[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*m[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],y.in[this.easingType])},s=()=>{const t=i(this.degTarget);this.animateF(t,0,this.degTarget,p.out[this.easingType],y.out[this.easingType])},r=()=>{this.setDeg((this.deg+t)%360,m[this.easingType]),this.continueRepeat()};({[o.launch]:()=>{this.cb=()=>{this.step=o.loop,this.setDeg(t,m[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 j=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;d(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",lotteryProgramID:this.luckywheel.program.id}),setTimeout((()=>{window.postMessage({type:"SpinLuckyWheelRes",data:{item:{result:{wheelOfFortunePartitionIndex:1}},success:!1}})}),2500))},this.handleSpinClick=()=>{c()||this.eventSpin()},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 i=null==t?void 0:t.data,{type:e}=i,s=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(t);r<s.length;r++)i.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(t,s[r])&&(e[s[r]]=t[s[r]])}return e}(i,["type"]);"SpinLuckyWheelRes"===e&&this.spinner.halt(this.settings.getDeg(s.data.item.result.wheelOfFortunePartitionIndex),(()=>{this.isSpinning=!1,this.updateSpinable();const t=this.luckywheel.program.wheelOfFortune.partitions[s.data.item.result.wheelOfFortunePartitionIndex].prizeText;window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeMessage:t.en||t["*"],HasError:s.data.success}})}))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await f(this.luckywheel,n.en),this.settings=new k({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new P({tick:(t,i)=>{d(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}`}}render(){const t={height:this.size,width:this.size},e={height:`${this.size}px`,width:`${this.size}px`};return i("div",{key:"8d964d9a81690d2a22240cb1355abb3c7cf6f665",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},i("svg",{key:"92f44f4659874e1fedaffa32813c57d1c9c04440",width:this.size,height:this.size,ref:t=>{this.svg=t}},i("foreignObject",Object.assign({key:"f042214f1516c688035f650a92ff1437c5d06a36"},t,{class:"Bottom Customable"}),i("div",{key:"6c80c40dfdb80159d75af8f70a75604257039c53",style:e})),i("g",Object.assign({key:"46c01589f440c19727c8364d5e1bdb3a90082cac",class:"PartitionsContainer"},this.settings.getSpinnerProps()),i("g",{key:"fd0e9a65b7ba25db742ff12bb26e389b8d72e4c7",class:"PartitionsBackgrounds"},this.options.map(((t,s)=>i("foreignObject",{"clip-path":`url(#clip${s})`,class:"PartitionBackground Customable",style:{"--index":s.toString()},width:this.size,height:this.size},i("div",{style:e}))))),i("g",{key:"8c116aa611b92b87b98f23aa344025953a27e90d",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:"8907e6529e660e6452328aaa684995719b528ec6",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"},this.settings.getSvgTextPropsAdjustedByImage(e)),i("div",{class:"PartitionTextEntityContainer"},i("p",{class:"PartitionTextEntity"+("clockwise"===this.settings.contentdirection?"":" Anticlockwise"),innerHTML:t.name})))])))),i("g",{key:"62cf4e41e77374dd8f8c1af0833a4143e5d45403",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition1 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("g",{key:"6b0538da5d4f52e4b543205fb64dedda084f81b2",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((s,r)=>i("foreignObject",Object.assign({class:"Partition2 Customable",style:{"--index":r.toString()}},t),i("div",{style:e}))))),i("foreignObject",Object.assign({key:"907db579094a7a192999510ade3150fdadbb94b6",class:"Middle Customable"},t),i("div",{key:"fa66cb96da2f285015fb8afeea5db05313ed832c",style:e})),i("foreignObject",Object.assign({key:"688c0d33ad480ea331847286335a88fd74dbbb26",class:"Top Customable"},t),i("div",{key:"292f6ea3549322a605fc8c3c61a93addcba00890",style:e})),i("g",{key:"22368be98007a7fa820cee96c666c363f85cd32a",class:{spinning:this.isSpinning,Center:!0},onClick:this.handleSpinClick},i("foreignObject",{key:"efffd7edb9ed21d5bd93896a4bead8931d91ff1f",x:Number(this.size)/2-50,y:Number(this.size)/2-50,width:100,height:100})),i("g",{key:"7d8b741cc21d6d07f5736336f147cef2bfdf90ca"},this.options.map(((t,e)=>i("clipPath",{id:`clip${e}`},i("path",Object.assign({},this.settings.getPartitionDraw(e)))))))))}get host(){return e(this)}};j.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{j as C}
|