cexp-gamification 1.0.1-beta.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/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Gamification SDK
2
+
3
+ A comprehensive, plug-and-play solution for integrating engagement campaigns into your website. This SDK automatically fetches your pre-configured campaign template (Lucky Wheel, Flip Cards, etc.) based on your Client ID and handles the entire user lifecycle from eligibility checks to reward distribution.
4
+
5
+ ## 📖 Overview
6
+
7
+ This SDK is designed for **instant integration**. You do not need to code the game logic or design the UI.
8
+
9
+ For more information check out our [website](https://cexp.fpt.com/)
10
+
11
+ 1. **Dynamic Loading:** The SDK receives your unique `Client ID`, connects to our servers, and retrieves the specific game template configured for your current campaign.
12
+ 2. **Eligibility Management:** Automatically checks if a user has already participated to prevent spam and duplicate entries.
13
+ 3. **Lead Generation:** securely collects user information (Name, Phone, etc.) and synchronizes it with your CRM/Data backend.
14
+
15
+ ## 📦 Installation
16
+
17
+ Include the SDK script directly into your HTML page (usually before the closing `</body>` tag).
18
+
19
+ ```html
20
+ <script src="https://cdn.jsdelivr.net/npm/@cexp/gamification@1.0.0/dist/instantHook.js"></script>
21
+ ```
22
+
23
+ ## 🚀 Usage
24
+
25
+ Once the script is loaded, the SDK initializes automatically. It will:
26
+
27
+ 1. Identify the user context.
28
+ 2. Check the campaign configuration associated with your Account.
29
+ 3. Render the appropriate engagement module (e.g., a Trigger Button or Pop-up) if the user is eligible to play.
30
+
31
+ ### Configuration
32
+
33
+ The SDK operates based on the `clientId` provided during the build or initialization process. It fetches the following configurations remotely:
34
+
35
+ - **Game Type:** (e.g., Wheel, Flip Card, Scratch Card) determined by your backend settings.
36
+ - **Visual Assets:** Background images, icons, and colors.
37
+ - **Rewards & Logic:** Winning probabilities and voucher codes.
38
+
39
+ ## ⚠️ Important Notes
40
+
41
+ ### 🔒 No Code Modification Required
42
+
43
+ This package is provided as a **compiled, ready-to-use solution**.
44
+
45
+ - **Do not** attempt to decompile, modify, or inject custom CSS/JS into the SDK wrapper.
46
+ - The UI, game logic, and form validation are managed centrally via your Campaign Dashboard to ensure security and data integrity.
47
+
48
+ ### 📞 Customization & Support
49
+
50
+ This SDK supports standard campaign templates.
51
+
52
+ **Have a specific requirement?**
53
+ If you need a custom game type, specialized form fields, or a unique integration flow that is not currently supported by your template configuration:
54
+
55
+ > **Please contact our Sales or Customer Success Team.**
56
+ > Custom developments require a tailored implementation plan and cannot be achieved by modifying this client-side package.
57
+
58
+ ---
59
+
60
+ ## 📄 License
61
+
62
+ Property of [FPT corporation]. All rights reserved.
63
+ Unauthorized copying or modification of this file is strictly prohibited.
@@ -0,0 +1 @@
1
+ !function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";const t=n;function n(t,e){const s=r();return(n=function(t,n){return s[t-=478]})(t,e)}!function(t){const e=n,r=t();for(;;)try{if(747095===parseInt(e(482))/1+-parseInt(e(487))/2+-parseInt(e(486))/3+parseInt(e(481))/4*(-parseInt(e(485))/5)+-parseInt(e(483))/6+parseInt(e(480))/7+parseInt(e(478))/8)break;r.push(r.shift())}catch(s){r.push(r.shift())}}(r);const e=n=>t(479)+n;function r(){const t=["pl/games/reward","1175NMEUzz","2433876qHBKhs","290454PyhVJT","17055352UnSIOx","pl/games/","3942631vbHrTk","22392PZFMiP","738606SNDFPP","2487684mwKDek"];return(r=function(){return t})()}const s=t(484);function o(t,n){const e=i();return(o=function(t,n){return e[t-=361]})(t,n)}function i(){const t=["27RbdvQM","appendChild","fill","toString","0 0 24 24","2631075UCIiqY","6861912cooGzF","xmlns","ZAixP","610160zvvaLX","932678uyxvbR","class","MVaQd","Shape","YXvut","var(--neutral-gray-900)","height","srxCK","CZbGZ","CAOfk","24hcsnUw","setAttribute","1625334klCGyH","RSaLP","viewBox","none","Vsbyw","1851913gMtZAC","path","createElementNS","http://www.w3.org/2000/svg","width","YFiUF","62195LiQxFm","M4.2097 4.3871L4.29289 4.29289C4.65338 3.93241 5.22061 3.90468 5.6129 4.2097L5.70711 4.29289L12 10.585L18.2929 4.29289C18.6834 3.90237 19.3166 3.90237 19.7071 4.29289C20.0976 4.68342 20.0976 5.31658 19.7071 5.70711L13.415 12L19.7071 18.2929C20.0676 18.6534 20.0953 19.2206 19.7903 19.6129L19.7071 19.7071C19.3466 20.0676 18.7794 20.0953 18.3871 19.7903L18.2929 19.7071L12 13.415L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071C3.90237 19.3166 3.90237 18.6834 4.29289 18.2929L10.585 12L4.29289 5.70711C3.93241 5.34662 3.90468 4.77939 4.2097 4.3871L4.29289 4.29289L4.2097 4.3871Z","size-4","DIlVG","FwSDr"];return(i=function(){return t})()}function a(t){const n=o,e={UztaF:n(392),XDTlp:n(374),CAOfk:function(t,n){return t||n},YFiUF:n(369),MVaQd:"svg",ZAixP:n(370),FwSDr:n(393),RSaLP:n(363),DIlVG:n(381),Vsbyw:n(388),srxCK:n(367),YXvut:n(390),CZbGZ:n(379)},{size:r=24,fill:s=e.UztaF,className:i=e.XDTlp}=e[n(396)](t,{}),a=e[n(371)],c=document.createElementNS(a,e[n(389)]);c[n(398)](e[n(385)],r[n(380)]()),c.setAttribute(e[n(376)],r[n(380)]()),c[n(398)](e[n(362)],e[n(375)]),c[n(398)](n(379),n(364)),c[n(398)](n(384),a),i&&c[n(398)](e[n(365)],i);const u=document.createElementNS(a,"g");u.setAttribute("id","Dismiss");const p=document[n(368)](a,e[n(394)]);return p[n(398)]("id",e[n(391)]),p[n(398)]("d",n(373)),p.setAttribute(e[n(395)],s),u[n(378)](p),c[n(378)](u),c}function c(t,n){const e=p();return(c=function(t,n){return e[t-=183]})(t,n)}!function(t){const n=o,e=t();for(;;)try{if(658046===-parseInt(n(387))/1+parseInt(n(361))/2+-parseInt(n(382))/3+parseInt(n(386))/4+-parseInt(n(372))/5+parseInt(n(397))/6*(-parseInt(n(366))/7)+parseInt(n(383))/8*(parseInt(n(377))/9))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(i);const u=c;function p(){const t=["36IBAMeQ","8212810GNnTtI","283577bsytSi","237947kFqBYn","11ZlzFGb","3LYWYDR","1269Uiauhc","110632yRtJrk","304814qiMZMf","gamification_played_campaign_","192YIOgFY","1445249hVfDFY","removeItem","10tGETSO","15624ZisvxK","setItem"];return(p=function(){return t})()}!function(t){const n=c,e=t();for(;;)try{if(590142===-parseInt(n(194))/1+-parseInt(n(183))/2*(parseInt(n(196))/3)+parseInt(n(198))/4*(parseInt(n(188))/5)+-parseInt(n(191))/6*(-parseInt(n(193))/7)+parseInt(n(189))/8*(-parseInt(n(197))/9)+parseInt(n(192))/10*(-parseInt(n(195))/11)+-parseInt(n(185))/12*(-parseInt(n(186))/13))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(p);const h=t=>localStorage[u(190)](u(184)+t,"true"),l=t=>localStorage.getItem(u(184)+t),f=t=>localStorage[u(187)](u(184)+t),d=g;!function(t){const n=g,e=t();for(;;)try{if(883130===parseInt(n(327))/1+-parseInt(n(323))/2+parseInt(n(312))/3*(parseInt(n(325))/4)+-parseInt(n(322))/5*(-parseInt(n(309))/6)+parseInt(n(306))/7*(parseInt(n(316))/8)+-parseInt(n(311))/9+-parseInt(n(310))/10*(parseInt(n(324))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(m);function m(){const t=["VITE_API_URL","985flMMDa","1827136XMtJeU","363561sYCJff","36hSyOcq","substring","1093212dGLcGZ","error","headers","266fyPsgb","MonWv","text","53538jNPNtl","670jwbbwh","7694505HcniZR","279183LQIRJa","application/json","status",". Message: ","247888YUCsBS","Content-Type","body","API Call Failed (","env"];return(m=function(){return t})()}function g(t,n){const e=m();return(g=function(t,n){return e[t-=306]})(t,n)}const I={env:{VITE_API_URL:"http://10.69.3.64:8123"}}[d(320)][d(321)];async function b(t,n,e={}){const r=d,s={MonWv:r(317),SOGfK:r(313)},o=I+"/"+t,i={"X-Client-Key":n,...e[r(318)]&&!e[r(329)]?.[s[r(307)]]?{"Content-Type":s.SOGfK}:{}},a=await fetch(o,{...e,headers:{...i,...e[r(329)]}});if(!a.ok){const t=await a[r(308)]();throw console[r(328)](r(319)+a.status+"): "+o,t),new Error("HTTP error! Status: "+a[r(314)]+r(315)+t[r(326)](0,100))}return a.json()}const y=k;function x(){const t=["display","xPgvo","11QMSoyR","VtzvS","4jltsEJ","screen","Xin chúc mừng","value","gDrlW","map","text-white b1-medium","Failure","nYsKY","addEventListener","Tab","off","className","formState","wrap-text","text-white hight-light","\n width: 300px;\n height: 300px;\n background: url(","../assets/wheel.png","stringify","innerText",");\n background-size: cover;\n background-repeat: no-repeat;\n display:flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n ","pxbSv","style","phone","pZIYV","b2-medium text-white","YUCZq","TsojS","div","ZGFkE","qsPov","111646nMGJur","\n position: absolute;\n top: -16px;\n right: -16px;\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 50%;\n ","\n position: absolute;\n bottom: 20px;\n right: 20px;\n width: 60px;\n height: 60px;\n cursor: pointer;\n border-radius: 8px\n ","4006035tVzTJo","\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n ","MfKzg","3654610epWGPu","aiRcJ","text-field ","XqqhO","absolute px-4","677574USiXnL","\n position: absolute;\n bottom: 65px;\n right: 5px;\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 50%;\n z-index: 1;\n ","EiJKy","NafhT","POST","615921HPSIbi","appendChild","wrFfq","text","createElement","preventDefault","kKicP","cover","tUGzf","key","Xem thể lệ","Săn ngay","errors","avuYz","qBRXx","14HyVRbe","\n position: relative;\n width: 100%;\n height: 90vh;\n ","10116880Wkelvi","rxkFh","linear","AbbDp","XUnaK","Vui lòng nhập số điện thoại","isValid","XjidG","config","absolute px-4 text-white pb-16","EpVMn","NLfnv","backdropResult","\n width:321px;\n right: 0;\n bottom: 0;\n padding-bottom:20px\n ","\n flex-direction: column\n ",");\n background-size: cover;\n border-radius: 50%;\n transform: translateX(-251px);\n ","DrNhm","backgroundSize","button","body","kIWCX","ctXlD","form","mfTDv","\n position: relative;\n aspect-ratio: ","\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-image: url(","none","aahch","button-root b2-medium bg-black","translateX(-251px) rotate(360deg)","^(0|+84)(3[2-9]|5[6|8|9]|7[0|6-9]|8[1-5]|9[0-9])[0-9]{7}$","wheel_result_background","Đội ngũ tư vấn sẽ liên hệ qua số điện thoại và gửi mã sử dụng đến bạn.\n Hoặc gọi tổng đài miễn phí 1800.6601 để được hỗ trợ nhanh hơn nhé.","nCwXA","OQidE","ySlSW","headerTitle","d-flex gap-2","2cvAbqr","ZNmul","target","pattern","animate","button-root","wHYpv","5775440ereVij","flex","type","Zhdom","alert","\n width: 321px;\n right: 0;\n text-align: center;\n ","qGGUd","cssText","../assets/wheel_background.png","input",");\n background-size: cover !important;\n background-repeat: no-repeat !important;\n background-position: 50% 50% !important;\n background-color: rgba(255, 255, 255, 0) !important;\n width: 320px;\n ","catch","mHoYf","TfagW","\n background: url('../assets/wheel_text.png');\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n width: 100%;\n max-width: calc(70%);\n height: 30%;\n top: 0;\n right: 0;\n ","WWFhh","GUdPL","disabled","then","placeholder",";\n width: 600px;\n min-height:400px;\n height:100%;\n background-image: url(","game_id","submit","HYURZ","../assets/wheel_trigger.png","IkMWG","#333","click","translateX(-251px) rotate(0deg)","apKrK","fboJa","href","backgroundImage","title","ArrowRight","SUQJa","labAO","\n position: absolute;\n top: -10px;\n right: -10px;\n width: 32px;\n height: 32px;\n padding: 0;\n border-radius: 50%;\n ","SOkZn","BzlRO","AoOJh","absolute","name","keydown"];return(x=function(){return t})()}!function(t){const n=k,e=t();for(;;)try{if(425384===-parseInt(n(593))/1*(parseInt(n(507))/2)+-parseInt(n(452))/3*(-parseInt(n(562))/4)+-parseInt(n(442))/5+parseInt(n(447))/6*(-parseInt(n(467))/7)+parseInt(n(514))/8+-parseInt(n(439))/9+parseInt(n(469))/10*(parseInt(n(560))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(x);const v={isValid:!1,disabled:!1,errors:[{name:"name",message:""},{name:y(585),message:""}]};class w{#t=!1;#n=void 0;#e;#r="";constructor(t){const n=y,{clientId:e,gameConfig:r}=t;this.#r=e,this.#e=r,this[n(575)]=v}async#s(t){const n=y,e={fboJa:function(t,n){return t(n)},SOkZn:function(t,n,e,r){return t(n,e,r)},xPgvo:n(451)};this.#n&&e[n(544)](clearInterval,this.#n);try{return await e[n(552)](b,s,this.#r,{method:e[n(559)],body:JSON[n(580)]({customer:t,game_id:this.#e[n(535)]})})}catch(r){throw r}}#o(){const t=y,n={qGGUd:t(474),OJKrX:"Delete",Zhdom:"Escape",WSwWl:"Enter",GUdPL:"ArrowLeft",Zujsi:t(548),AbbDp:t(495),BxYfy:t(542),BtBxw:t(498),jtgki:t(471),meQEy:function(t,n,e){return t(n,e)},HYURZ:t(515),XjidG:"block",VnqhX:t(538),aiRcJ:t(579),IkMWG:t(522),EiJKy:t(590),SUQJa:t(487),cnZDe:"button-root",qsPov:function(t,n){return t(n)},ctXlD:t(459),VFBMv:t(540),NLfnv:t(478),YUCZq:function(t,n){return t??n},XqqhO:t(555),ojYVv:t(491),TfagW:t(523),BzlRO:t(446),wrFfq:"text-field",tUGzf:t(556),apKrK:"Nhập họ và tên",TsojS:t(573),bjVsR:"phone",wHYpv:t(455),mHoYf:"Nhập số điện thoại",WWFhh:t(499),aahch:t(497),AoOJh:t(463),nYsKY:t(536),yBbnD:t(462),TvaAr:"https://fptshop.com.vn/tin-tuc/tin-khuyen-mai/minigame-chao-khach-hang-moi-trung-voucher-den-200k-190260",MfKzg:"_blank",OQidE:t(557),EpVMn:t(541)},{backgroundTrigger:e=n.VnqhX,backgroundWheel:r=n[t(443)],backgroundModal:s=n[t(539)],title:o}=this.#e[t(477)]??{},i=document.createElement(n[t(449)]),c=document[t(456)](n[t(449)]);c[t(584)][t(521)]=t(438);const u=document[t(456)](n[t(549)]);u.className=n.cnZDe,u[t(584)][t(521)]=t(448);const p=n[t(592)](a,{size:12,fill:"#333"});u.appendChild(p),i[t(453)](u),i[t(453)](c),e&&(c[t(584)][t(546)]="url("+e+")",c.style[t(486)]=n[t(490)]);const l=document[t(456)](n[t(449)]);l[t(584)][t(521)]=t(468);const d=document[t(456)](t(590));d.style[t(521)]=t(440);const{width:m,height:g}=window[t(563)],I=document[t(456)](n.EiJKy);I[t(584)].cssText=t(493)+1300+"/760"+t(534)+s+t(582),d[t(453)](I);const b=document[t(456)]("button");b[t(574)]=t(512),b[t(584)][t(521)]=t(437);const x=a({size:16,fill:n.VFBMv});b[t(453)](x),I[t(453)](b);const v=document[t(456)](n[t(449)]);v[t(584)][t(521)]=t(578)+r+t(484);const w=document[t(456)]("h1");w.className=n[t(480)],w.style[t(521)]=t(519),w.innerText=n[t(588)](o,"");const k=document[t(456)](n[t(449)]);k.className=n[t(445)],k[t(584)][t(521)]=t(528);const C=document.createElement(n[t(449)]),S=document[t(456)](n.ojYVv),E=document.createElement(n[t(527)]),T=document[t(456)](n[t(527)]),X=document[t(456)](n[t(549)]),L=document[t(456)]("a");C[t(574)]=n[t(553)],C[t(584)].cssText=t(482);const Y=document.createElement(n.EiJKy);Y[t(574)]=n[t(454)],E[t(556)]=n[t(460)],E[t(516)]="text",E[t(533)]=n[t(543)],E.autocomplete=n[t(589)],Y[t(453)](E);const D=document.createElement(n.EiJKy);D[t(574)]=t(444),T.name=n.bjVsR,T[t(516)]=n[t(513)],T.placeholder=n[t(526)],T[t(510)]=n[t(529)],T[t(547)]=n[t(526)],T.autocomplete=n[t(589)],D[t(453)](T),X[t(574)]=n[t(496)],X[t(581)]=n[t(554)],X[t(516)]=n.nYsKY,L[t(574)]=t(568),L[t(581)]=n.yBbnD,L[t(545)]=n.TvaAr,L[t(509)]=n[t(441)],S.className=t(506),S[t(584)].cssText=t(483),S[t(453)](Y),S[t(453)](D),S.appendChild(X),S[t(453)](L),C.appendChild(S);let O=!1;T[t(571)](n[t(503)],e=>{const r=t,s={mfTDv:function(t,n){return t===n},labAO:"phone",cZpXL:n[r(520)]};if(["Backspace",n.OJKrX,r(572),n[r(517)],n.WSwWl,n[r(530)],n.Zujsi].includes(e.key))return;const o=/^[0-9]$/.test(e[r(461)]);this[r(575)]={isValid:o,disabled:!o,errors:this[r(575)][r(464)]?.[r(567)](t=>{const n=r;return s[n(492)](t[n(556)],s[n(550)])?{...t,message:o?"":s.cZpXL}:t})},!/^[0-9]$/.test(e.key)&&e[r(457)]()}),S[t(571)](n[t(570)],async e=>{const r=t,s={XUnaK:n[r(472)],ySlSW:function(t,n){return t(n)},qBRXx:function(t,n){return t(n)}};e.preventDefault();const o={name:E[r(565)],phone:T[r(565)]};this.formState[r(475)]&&(!O&&v[r(511)]([{transform:n.BxYfy},{transform:n.BtBxw}],{duration:3e3,easing:n.jtgki,iterations:1/0}),O=!0,X[r(531)]=!0,this.#n||(this.#n=n.meQEy(setInterval,()=>{const t=r,n={pxbSv:s[t(473)],DrNhm:function(n,e){return s[t(504)](n,e)},JEHpc:function(n,e){return s[t(466)](n,e)}};this.#s(o)[t(532)](e=>{const r=t;d[r(584)].display=n[r(583)],c[r(584)].display=n[r(583)],this.#i(!0,e),n[r(485)](h,this.#r)})[t(525)](e=>{const r=t;d[r(584)][r(558)]=n[r(583)],c.style[r(558)]=n[r(583)],this.#i(!1),n.JEHpc(f,this.#r)})},2e3)))}),b[t(571)]("click",()=>{const e=t;this.#t?(d.style[e(558)]=n[e(472)],c[e(584)][e(558)]=n[e(472)]):(d.style[e(558)]=n[e(537)],c[e(584)][e(558)]="none"),this.#t=!this.#t}),c[t(571)](n[t(479)],()=>{const e=t;this.#t?(d[e(584)].display=n[e(472)],c[e(584)][e(558)]=n[e(476)],u[e(584)][e(558)]=e(495)):(d[e(584)][e(558)]=n[e(537)],c[e(584)][e(558)]=n.AbbDp,u[e(584)][e(558)]=n[e(472)]),this.#t=!this.#t}),u.addEventListener(n[t(479)],()=>{const e=t;d.style.display=n[e(472)],c[e(584)][e(558)]=n[e(472)],u.style[e(558)]=n.AbbDp}),I.appendChild(v),I.appendChild(k),I[t(453)](w),I[t(453)](C),l[t(453)](d),document[t(488)][t(453)](l),document[t(488)].appendChild(i)}#i(t,n){const e=y,r={nCwXA:"none",gDrlW:"../assets/wheel_result_background.png",rxkFh:e(564),NafhT:e(590),ZNmul:e(512),ZGFkE:function(t,n){return t(n)},kKicP:"#333",kIWCX:e(576),avuYz:e(587),VtzvS:e(577),xsCgk:"Xem thể lệ>>",pZIYV:e(541)};if(!t)return window[e(518)](e(569));const s=this.#e?.[e(477)]?.[e(481)]?.[e(500)]??r[e(566)],o=this.#e?.[e(477)]?.[e(481)]?.[e(505)]??r[e(470)],i=document[e(456)](r[e(450)]);i[e(584)][e(521)]=e(494)+s+e(524);const c=document[e(456)](r[e(450)]);c.style[e(521)]="\n position: relative;\n display: block;\n min-height: 215px;\n ";const u=document[e(456)](r.NafhT);u[e(584)][e(521)]="\n display: block;\n font-weight: 500 !important;\n color: #fff;\n min-height: 40px;\n text-align: center;\n ",u[e(581)]=o;const p=document[e(456)](e(487));p[e(574)]=r[e(508)],p.style[e(521)]=e(551);const h=r[e(591)](a,{size:16,fill:r[e(458)]});p[e(453)](h);const l=document[e(456)](e(590));l.className=r.kIWCX;const f=document.createElement("p");f.className=r[e(465)],f[e(581)]=(n?.[e(547)]??"")+": ";const d=document[e(456)]("a");d.className=r[e(561)],d.innerText=n?.voucher??"",f[e(453)](d);const m=document[e(456)](r[e(450)]);m[e(574)]=r[e(489)];const g=document[e(456)]("p");g.className=r.avuYz,g[e(581)]=e(501);const I=document[e(456)]("a");I[e(574)]=r[e(561)],I[e(581)]=r.xsCgk,g[e(453)](I),l.appendChild(f),m[e(453)](g),i[e(453)](c),i[e(453)](p),i[e(453)](u),i[e(453)](l),i[e(453)](m),p[e(571)](r[e(586)],()=>{const t=e;this.#t=!1,i[t(584)][t(558)]=r[t(502)]}),document.body.appendChild(i)}async init(){this.#o()}}function k(t,n){const e=x();return(k=function(t,n){return e[t-=437]})(t,n)}function C(t,n){var e=S();return(C=function(t,n){return e[t-=444]})(t,n)}function S(){var t=["1eCXCRX","2024082LrBzxu","2414454yicDQX","2177VomLhC","20184aRZnIw","2638431ZOZMCD","2983605nWKjGW","1419NeIuXh","50530DpEEDE","330288BdBSAF","36oaAZow"];return(S=function(){return t})()}function E(){var t=["CARD","786032OPcOKY","450681ohuHnV","Bnasz","17785YvwRDX","GwTiJ","523386Jjqzqs","WHEEL","7580uEBYEk","478244kRwFtZ","12mLUHJf","296sxReCo","830pMtexF","puzzle","76338hLvGFU","card"];return(E=function(){return t})()}function T(t,n){var e=E();return(T=function(t,n){return e[t-=328]})(t,n)}!function(t){for(var n=C,e=t();;)try{if(577800===parseInt(n(448))/1*(parseInt(n(449))/2)+parseInt(n(447))/3*(parseInt(n(446))/4)+-parseInt(n(454))/5+-parseInt(n(450))/6+parseInt(n(451))/7*(-parseInt(n(452))/8)+-parseInt(n(453))/9+parseInt(n(445))/10*(parseInt(n(444))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(S),function(t){for(var n=T,e=t();;)try{if(557500===-parseInt(n(331))/1+parseInt(n(330))/2*(parseInt(n(332))/3)+-parseInt(n(333))/4*(-parseInt(n(342))/5)+parseInt(n(328))/6+parseInt(n(340))/7+-parseInt(n(339))/8+-parseInt(n(336))/9*(-parseInt(n(334))/10))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(E);var X,L,Y,D=(X=D||{},Y={Bnasz:(L=T)(338),fbPOc:L(337),GwTiJ:L(335)},X[L(329)]="wheel",X[Y[L(341)]]=Y.fbPOc,X.PUZZEL=Y[L(343)],X);function O(){var t=["190324BSlfSq","30kiYrvl","803058hgTnfI","2024HtWDQy","25003LsUBIs","3320880rQNoVf","7CrpkPM","24iFNUWN","7875290TaTHip","7932XqRgdV","57123gvyVKR","15761tiBSEI"];return(O=function(){return t})()}function V(t,n){var e=O();return(V=function(t,n){return e[t-=297]})(t,n)}!function(t){for(var n=V,e=t();;)try{if(818800===parseInt(n(305))/1*(parseInt(n(301))/2)+parseInt(n(307))/3*(parseInt(n(306))/4)+-parseInt(n(299))/5+parseInt(n(308))/6*(parseInt(n(300))/7)+parseInt(n(297))/8*(-parseInt(n(304))/9)+parseInt(n(302))/10+-parseInt(n(298))/11*(-parseInt(n(303))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(O);const A=M;function M(t,n){const e=U();return(M=function(t,n){return e[t-=208]})(t,n)}!function(t){const n=M,e=t();for(;;)try{if(749627===parseInt(n(231))/1*(parseInt(n(208))/2)+-parseInt(n(217))/3*(-parseInt(n(247))/4)+-parseInt(n(232))/5*(-parseInt(n(214))/6)+-parseInt(n(226))/7+parseInt(n(237))/8*(-parseInt(n(210))/9)+-parseInt(n(248))/10+-parseInt(n(234))/11*(parseInt(n(252))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}}(U);var R={env:{VITE_API_URL:A(223)}};function U(){const t=["env","clevertap","MjkpL","278DAeaMD","65FGrhHK","OhKSs","397705pkgEJE","getAttribute","MALQU","720088unGGPp","Error:","rwgem","info","init","function","wMfJr","exports","HTTP error! status: ","TWCao","4wafCjX","2116750OFaBHu",'Missing client_id. Did you miss data-client-id="YOU_CLIENT_ID" in script tag?',"rMYje","QyVSp","120jAFEGd","VITE_API_URL","undefined","game_id","error","object","6418nimoqJ","XSYlv","36fUQccl","qonuB","yNaPA","querySelector","527934rPwCXs","script[data-client-id]","Your game not available!","1724901utXroA","Missing config fetching","currentScript","forEach","status","amd","http://10.69.3.64:8123","ibIII","json","6496210YaksHY","TRUeV"];return(U=function(){return t})()}!function(t,n){const e=A,r={OhKSs:function(t,n){return t===n},ibIII:function(t,n){return t!==n},XDxiQ:e(254),TRUeV:e(242),wMfJr:function(t){return t()}};if(r.OhKSs(typeof exports,e(257))&&r.ibIII(typeof module,r.XDxiQ))module[e(244)]=n();else if(r[e(233)](typeof define,r[e(227)])&&define[e(222)])define(n);else{(r.ibIII(typeof globalThis,r.XDxiQ)?globalThis:t||(r[e(224)](typeof self,e(254))?self:{}))[e(229)]=r[e(243)](n)}}(typeof window!==A(254)?window:void 0,()=>{const t=A,n={QyVSp:function(t,n,e){return t(n,e)},TWCao:t(238),rPfEl:function(t,n){return t(n)},CQbch:t(216),qonuB:function(t){return t()},XSYlv:t(215),yNaPA:t(249),MALQU:t(218),MjkpL:function(t,n){return t(n)}},r=R[t(228)][t(253)],s=document[t(219)]||document[t(213)](n[t(209)]),o=s?.[t(235)]("data-client-id")??"";if(!o)return console.error(n[t(212)]);if(!r)return console[t(256)](n[t(236)]);function i(){const e=t;try{return n[e(251)](b,"pl/games",o)}catch(r){throw console[e(256)](n[e(246)],r),r}}function a(r){const s=t;try{const t=n.rPfEl(e,r);return n[s(251)](b,t,o)}catch(i){throw console[s(256)](n[s(246)],i),i}}!n[t(230)](l,o)&&n.qonuB(async function(){const e=t;try{const r=await n[e(211)](i);r.length&&function(e){const r=t,s={rMYje:function(t,n){return t(n)},rwgem:n.CQbch};e[r(220)](async t=>{const n=r;try{const e=await s[n(250)](a,t[n(255)]);e&&t.type===D.WHEEL?new w({clientId:o,gameConfig:e})[n(241)]():e&&console[n(240)](s[n(239)])}catch(e){console[n(256)](e)}})}(r)}catch(r){}})})});
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "cexp-gamification",
3
+ "files": [
4
+ "dist",
5
+ "README.md",
6
+ "LICENSE",
7
+ "package.json"
8
+ ],
9
+ "version": "1.0.1-beta.0",
10
+ "description": "Gamification modules made with love by CExP.fpt.com",
11
+ "main": "main.js",
12
+ "type": "module",
13
+ "scripts": {
14
+ "test": "echo \"Error: no test specified\" && exit 1",
15
+ "dev": "vite",
16
+ "build": "vite build",
17
+ "preview": "vite preview"
18
+ },
19
+ "keywords": [
20
+ "Gamification"
21
+ ],
22
+ "author": "Binh Tran Hai",
23
+ "license": "ISC",
24
+ "devDependencies": {
25
+ "@types/node": "^24.10.0",
26
+ "path": "^0.12.7",
27
+ "terser": "^5.44.1",
28
+ "typescript": "^5.9.3",
29
+ "vite": "^7.1.12",
30
+ "vite-plugin-css-injected-by-js": "^3.5.2",
31
+ "vite-plugin-javascript-obfuscator": "^3.1.0"
32
+ },
33
+ "dependencies": {
34
+ "clevertap-web-sdk": "^2.3.2"
35
+ }
36
+ }