Help
RSS
API
Feed
Maltego
Contact
Domain > afterspinwheel88.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2025-12-11
172.67.201.95
(
ClassC
)
Port 443
HTTP/1.1 200 OKDate: Thu, 11 Dec 2025 17:59:04 GMTContent-Type: text/html; charsetUTF-8Transfer-Encoding: chunkedConnection: keep-aliveServer: cloudflareSet-Cookie: PHPSESSIDomi8jrs3qsq998pjla3fv2g8gq; path/; HttpOnly; SameSiteStrictExpires: Thu, 19 Nov 1981 08:52:00 GMTCache-Control: no-store, no-cache, must-revalidatePragma: no-cacheX-Content-Type-Options: nosniffX-Frame-Options: DENYX-XSS-Protection: 1; modeblockReferrer-Policy: strict-origin-when-cross-originVary: Accept-EncodingNel: {report_to:cf-nel,success_fraction:0.0,max_age:604800}Report-To: {group:cf-nel,max_age:604800,endpoints:{url:https://a.nel.cloudflare.com/report/v4?sGRiUWfC1ReQ8Ih%2BXFymXN9J2bzzm9j1dVDNiLUx4pZJZ4i63bSZ0rfWHxKoxxydRE1Ja2YvXLjrX1DvqVjYShomYsGALo1riwY4OvNKmKCaVsg%3D%3D}}cf-cache-status: DYNAMICCF-RAY: 9ac6dfac7869fef8-PDXalt-svc: h3:443; ma86400 !DOCTYPE html>html langid>head> meta charsetUTF-8> meta nameviewport contentwidthdevice-width, initial-scale1.0> title>Lucky Spin Afterwin88/title> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css> link relpreconnect hrefhttps://fonts.googleapis.com> link relpreconnect hrefhttps://fonts.gstatic.com crossorigin> link hrefhttps://fonts.googleapis.com/css2?familyPoppins:wght@400;500;600;700&displayswap relstylesheet> style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Poppins, sans-serif; background-color: #0F172A; color: #fff; line-height: 1.6; overflow-x: hidden; min-height: 100vh; } body::before { content: ; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: url(https://angkaku.b-cdn.net/rtp/spinwheel/bgdesktop/aw88_desktop_1750247676.jpg) center/cover no-repeat; opacity: 1; z-index: -1; } @media (max-width: 768px) { body::before { background: url(https://angkaku.b-cdn.net/rtp/spinwheel/bgmobile/aw88mobile_mobile_1750247676.jpg) center/cover no-repeat; } } .container { width: 100%; max-width: 100%; padding: 10px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; position: relative; overflow-x: hidden; } h1 { font-size: 1.8rem; margin-bottom: 10px; color: #ffd700; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); text-align: center; } .code-section { text-align: center; margin-bottom: 10px; width: 100%; max-width: 500px; background: #00000033; padding: 1rem; border-radius: 20px; position: relative; } .code-options { margin-bottom: 20px; } .option-buttons { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; } .option-button { padding: 12px 20px; background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid #667eea4D; border-radius: 25px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; font-size: 0.9rem; } .option-button:hover, .option-button.active { background: #667eea33; /* 33 20% opacity */ border-color: #667eea; transform: translateY(-2px); } .form-container { display: none; } .form-container.active { display: block; } .code-input, .user-input { width: 100%; max-width: 400px; padding: 15px 20px; font-size: 1.1rem; border: 2px solid rgba(255, 215, 0, 0.3); border-radius: 15px; background: rgba(255, 255, 255, 0.1); color: #fff; text-align: center; margin-bottom: 15px; transition: all 0.3s ease; backdrop-filter: blur(5px); } .code-input:focus, .user-input:focus { outline: none; border-color: #ffd700; box-shadow: 0 0 20px #ffd7004D; /* 4D 30% opacity */ } .code-input::placeholder, .user-input::placeholder { color: rgba(255, 255, 255, 0.6); } .action-btn { display: inline-block; padding: 15px 40px; background: linear-gradient(135deg, #ffd700, #FFA500); color: #000; font-weight: bold; font-size: 1.1rem; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px #ffd7004D; /* 4D 30% opacity */ margin: 5px; } .action-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 25px #ffd70080; /* 80 50% opacity */ } .action-btn:active { transform: translateY(1px); } .action-btn:disabled { background: #6c757d; cursor: not-allowed; transform: none; box-shadow: none; } .wheel-container { display: none !important; max-width: 100%; margin: 0 auto; position: relative; width: 100%; visibility: hidden; } .wheel-container.show { display: block !important; visibility: visible !important; } .wheel-canvas-container { width: 526px; height: 698px; position: relative; margin: 0 auto; overflow: hidden; background-size: cover; background-position: center; background-repeat: no-repeat; } .wheel-canvas-container.has-gif-bg { background-image: var(--gif-url); } #wheel-canvas { width: 100%; height: 100%; display: block; background: transparent; } #spin-btn { margin-top: 15px; display: block; margin-left: auto; margin-right: auto; position: relative; z-index: 10; } .wheel-arrow-container { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: 50px; height: 40px; z-index: 4; filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7)); } .message-box { padding: 8px 15px; border-radius: 12px; margin-bottom: 8px; text-align: center; display: none; backdrop-filter: blur(10px); font-size: 0.9rem; max-width: 90%; margin-left: auto; margin-right: auto; } .message-box.error { background: rgba(231, 74, 59, 0.2); border: 1px solid #e74a3b; color: #ffcdd2; } .message-box.success { background: rgba(28, 200, 138, 0.2); border: 1px solid #1cc88a; color: #c8e6c9; } .loading-spinner { display: none; margin: 20px auto; text-align: center; } .spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid #FFD700; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px; } .popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(5px); } .popup-overlay.show { opacity: 1; visibility: visible; } .popup-content { background: linear-gradient(135deg, #2a3a6a, #0F172A); border-radius: 20px; padding: 2rem; text-align: center; max-width: 90%; width: 450px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); transform: scale(0.8); transition: transform 0.3s ease; position: relative; border: 2px solid #FFD700; } .popup-overlay.show .popup-content { transform: scale(1); } .popup-close { position: absolute; top: 15px; right: 20px; font-size: 24px; font-weight: bold; color: #aaa; cursor: pointer; z-index: 10; transition: color 0.3s ease; } .popup-close:hover { color: #fff; } .popup-image { max-width: calc(100% - 20px); width: 90%; max-height: 200px; margin: 15px auto 20px; border-radius: 15px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); display: block; object-fit: contain; } .popup-title { color: #ffd700 !important; font-size: 1.8rem; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); text-align: center; } .user-name-highlight { color: #ffd700 !important; font-weight: bold; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } .popup-message { font-size: 1.3rem; color: #fff; margin-bottom: 20px; animation: pulse 1.5s infinite; } .popup-button { padding: 15px 35px; background: linear-gradient(135deg, #ffd700, #FFA500); color: #000; font-weight: bold; font-size: 1.1rem; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; margin-top: 20px; letter-spacing: 1px; } .popup-button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px #ffd70066; /* 66 40% opacity */ } .user-name-highlight { color: #FFD700; font-weight: bold; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } .redirect-info { margin-top: 15px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); } #countdown { font-weight: bold; color: #FFD700; } .toast-notification { position: fixed; z-index: 1000; max-width: 350px; min-width: 250px; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); backdrop-filter: blur(10px); transform: translateX(-100%); opacity: 0; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); font-family: Poppins, sans-serif; font-size: 0.9rem; line-height: 1.4; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); } .toast-notification.show { transform: translateX(0); opacity: 1; } .toast-notification.top-left { top: 20px; left: 20px; } .toast-notification.top-right { top: 20px; right: 20px; transform: translateX(100%); } .toast-notification.top-right.show { transform: translateX(0); } .toast-notification.top-center { top: 20px; left: 50%; transform: translateX(-50%) translateY(-100%); } .toast-notification.top-center.show { transform: translateX(-50%) translateY(0); } .toast-notification.bottom-left { bottom: 20px; left: 20px; } .toast-notification.bottom-right { bottom: 20px; right: 20px; transform: translateX(100%); } .toast-notification.bottom-right.show { transform: translateX(0); } .toast-notification.bottom-center { position: absolute; bottom: -80px; left: 50%; transform: translateX(-50%) translateY(100%); z-index: 1000; } .toast-notification.bottom-center.show { transform: translateX(-50%) translateY(0); } .toast-close { position: absolute; top: 8px; right: 12px; cursor: pointer; font-size: 16px; opacity: 0.7; font-weight: bold; color: inherit; transition: opacity 0.3s ease; } .toast-close:hover { opacity: 1; } .toast-loop-settings { margin-top: 1rem; padding: 1rem; background: #f1f3f4; border-radius: 8px; border: 1px solid #e9ecef; border-left: 4px solid #667eea; } .toast-loop-settings .form-row { display: flex; gap: 1rem; } .toast-loop-settings .form-group { flex: 1; margin-bottom: 1rem; } @media (max-width: 768px) { body { overflow-x: hidden; } .container { padding: 5px 10px; min-height: 100vh; justify-content: center; padding-top: 5px; padding-bottom: 5px; } h1 { font-size: 1.3rem; margin-bottom: 5px; line-height: 1.2; } .code-section { padding: 0.8rem; margin-bottom: 5px; max-width: 100%; } .message-box { padding: 8px 12px; margin-bottom: 8px; font-size: 0.85rem; max-width: 95%; margin-left: auto; margin-right: auto; } .wheel-container { transform: scale(0.8); margin-top: 0; margin-bottom: -20px; width: 100%; overflow: visible; display: flex; flex-direction: column; align-items: center; } .wheel-canvas-container { width: 526px; height: 698px; position: relative; margin: 0 auto; overflow: visible; left: 50%; transform: translateX(-50%); } #spin-btn { margin-top: -10px; padding: 12px 25px; font-size: 0.95rem; position: relative; z-index: 20; transform: scale(1.05); align-self: center; display: block; margin-left: auto; margin-right: auto; } .option-buttons { margin-bottom: 8px; gap: 6px; } .option-button { padding: 6px 12px; font-size: 0.8rem; } .code-input, .user-input { font-size: 0.95rem; padding: 10px 15px; margin-bottom: 10px; max-width: 100%; } .action-btn { padding: 10px 25px; font-size: 0.95rem; margin: 3px; } .popup-content { width: 95%; padding: 1.2rem; max-height: 90vh; overflow-y: auto; } .popup-title { font-size: 1.3rem; line-height: 1.3; margin-bottom: 10px; } .popup-message { font-size: 1rem; line-height: 1.4; margin-bottom: 15px; } .popup-image { max-width: calc(100% - 10px); width: 95%; max-height: 150px; margin: 10px auto 15px; } .popup-button { padding: 12px 30px; font-size: 1rem; } footer { position: relative; margin-top: 10px; width: 100%; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.75rem; padding: 5px 0; } .loading-spinner { margin: 5px auto; } .spinner { width: 35px; height: 35px; } .toast-loop-settings .form-row { flex-direction: column; } .toast-notification.top-center { top: 10px; max-width: calc(100vw - 40px); left: 50%; } .toast-notification.bottom-center { bottom: -60px; max-width: calc(100vw - 40px); left: 50%; } } @media (max-width: 480px) { .container { padding: 5px 10px; padding-top: 8px; } h1 { font-size: 1.2rem; margin-bottom: 5px; } .code-section { padding: 0.8rem; margin-bottom: 5px; } .wheel-container { transform: scale(0.5); margin-top: -40px; margin-bottom: -100px; } .option-button { font-size: 0.75rem; padding: 6px 12px; min-width: 100px; } .code-input, .user-input { font-size: 0.95rem; padding: 8px 12px; margin-bottom: 8px; max-width: 100%; } .action-btn { padding: 8px 20px; font-size: 0.9rem; margin: 2px; } #spin-btn { transform: scale(1.15); } .popup-title { font-size: 1.1rem; } .popup-message { font-size: 0.95rem; } .popup-image { max-width: calc(100% - 8px); width: 98%; max-height: 120px; margin: 8px auto 12px; } .toast-notification { max-width: calc(100vw - 40px); min-width: calc(100vw - 40px); left: 20px !important; right: 20px !important; } .toast-notification.top-right, .toast-notification.bottom-right { transform: translateX(-100%); } .toast-notification.top-center, .toast-notification.bottom-center { max-width: calc(100vw - 20px); left: 50%; } .toast-notification.bottom-center { bottom: -50px; } .toast-notification.top-center { max-width: calc(100vw - 20px); left: 50%; } .toast-notification.bottom-center { bottom: -50px; max-width: calc(100vw - 20px); left: 50%; } } @media (max-width: 768px) and (orientation: landscape) { .container { justify-content: flex-start; padding-top: 5px; padding-bottom: 5px; } h1 { font-size: 1.1rem; margin-bottom: 3px; } .code-section { padding: 0.5rem; margin-bottom: 3px; } .message-box { margin-bottom: 5px; padding: 5px 10px; font-size: 0.8rem; } .wheel-container { transform: scale(0.35); margin-top: -80px; margin-bottom: -160px; } #spin-btn { margin-top: 5px; transform: scale(1.05); } .option-buttons { margin-bottom: 8px; gap: 6px; } .popup-content { max-height: 85vh; padding: 1rem; } } @media (-webkit-min-device-pixel-ratio: 2) and (max-width: 768px), (min-resolution: 192dpi) and (max-width: 768px) { #wheel-canvas { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes confettiDrop { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } } .confetti { position: fixed; animation: confettiDrop 4s ease-out forwards; z-index: 999; } footer { position: absolute; bottom: 10px; width: 100%; text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; } #show-prizes-btn { background: linear-gradient(135deg, #667eea, #764ba2) !important; } #show-prizes-btn:hover { background: linear-gradient(135deg, #5a67d8, #6c5b7b) !important; transform: translateY(-3px); } #back-to-code-btn { background: linear-gradient(135deg, #6c757d, #495057) !important; } /style> script> (function() { document.addEventListener(contextmenu, function(e) { e.preventDefault(); return false; }); document.addEventListener(keydown, function(e) { if (e.keyCode 123) { e.preventDefault(); return false; } if ((e.ctrlKey && e.shiftKey && e.keyCode 73) || (e.metaKey && e.altKey && e.keyCode 73)) { e.preventDefault(); return false; } if ((e.ctrlKey && e.shiftKey && e.keyCode 74) || (e.metaKey && e.altKey && e.keyCode 74)) { e.preventDefault(); return false; } if ((e.ctrlKey && e.shiftKey && e.keyCode 67) || (e.metaKey && e.altKey && e.keyCode 67)) { e.preventDefault(); return false; } if ((e.ctrlKey && e.keyCode 85) || (e.metaKey && e.keyCode 85)) { e.preventDefault(); return false; } }); })(); /script>/head>body> div classcontainer> h1>Lucky Spin Afterwin88/h1> div classmessage-box error iderror-message>/div> div classmessage-box success idsuccess-message>/div> div classcode-section idcode-section> div classcode-options> div classoption-buttons> div classoption-button active idvalidate-option>Masukkan Kode Baru/div> div classoption-button idcheck-option>Lupa SS Reward/div> /div> /div> div classform-container active idvalidate-container> input typetext classcode-input idcode-input placeholderMasukkan Kode Spinwheel maxlength20> input typetext classuser-input iduser-input placeholderMasukkan ID / Username maxlength50> button classaction-btn idvalidate-btn>Validasi Kode/button> button classaction-btn idshow-prizes-btn stylebackground: linear-gradient(135deg, #667eea, #764ba2); margin-top: 10px;>Tampilkan Hadiah/button> /div> div classform-container idcheck-code-container> input typetext classcode-input idcheck-code-input placeholderMasukkan Kode Yang Sudah Digunakan maxlength20> button classaction-btn idcheck-code-btn>Cek Reward/button> /div> /div> div classloading-spinner idloading-spinner> div classspinner>/div> p>Mohon tunggu.../p> /div> div classwheel-container idwheel-container> div classwheel-canvas-container> canvas idwheel-canvas>/canvas> /div> button classaction-btn idspin-btn>Putar Wheel/button> /div> div classpopup-overlay idresult-popup> div classpopup-content> div classpopup-close>×/div> div idpopup-image-container>/div> h2 classpopup-title>Selamat Anda Mendapatkan/h2> p classpopup-message idpopup-message>/p> button classpopup-button idpopup-close-btn>OK/button> /div> /div> div classpopup-overlay idcheck-result-popup> div classpopup-content> div classpopup-close>×/div> h2 classpopup-title>Hasil Reward/h2> div idcheck-image-container>/div> p classpopup-message idcheck-message>/p> p idcheck-details stylecolor: #fff; font-size: 0.9rem; margin-top: 10px;>/p> button classpopup-button idcheck-popup-close-btn>OK/button> /div> /div> footer> p>© 2025 Spinwheel. All Rights Reserved./p> /footer> /div> script>var SPINWHEEL_CONFIG { spinwheelId: 30, rewards: {id:71,name:5.000,image_url:https:\/\/angkaku.b-cdn.net\/rtp\/spinwheel\/rewards\/LUCKY_SPIN_AFTERWIN_1_reward_1750247477.png,probability:94,sort_order:1,color:#4caf50},{id:72,name:IPHONE 16 PRO,image_url:null,probability:0,sort_order:2,color:#bbff00},{id:73,name:25.000,image_url:https:\/\/angkaku.b-cdn.net\/rtp\/spinwheel\/rewards\/LUCKY_SPIN_AFTERWIN_3_reward_1750247501.png,probability:1,sort_order:3,color:#2196f3},{id:74,name:10.000,image_url:https:\/\/angkaku.b-cdn.net\/rtp\/spinwheel\/rewards\/LUCKY_SPIN_AFTERWIN_2_reward_1750247488.png,probability:5,sort_order:4,color:#b30000},{id:75,name:100.000,image_url:null,probability:0,sort_order:5,color:#ff9800},{id:76,name:500.000,image_url:null,probability:0,sort_order:6,color:#9c27b0},{id:77,name:EMAS 1 GRAM,image_url:null,probability:0,sort_order:7,color:#00a7b3},{id:78,name:HONDA PCX,image_url:null,probability:0,sort_order:8,color:#607d8b}, customColors: { popupTitleColor: #ffd700, popupUsernameColor: #ffd700, titleColor: #ffd700, buttonPrimaryColor: #ffd700, buttonSecondaryColor: #667eea, inputBorderColor: #ffd700, containerBgColor: #000000 }, toast: { enabled: 0, position: top-left, duration: 5000, delay: 1000, bgColor: #333333, textColor: #FFFFFF, loopEnabled: 0, loopInterval: 30000, loopCount: 0, winnerNames: , winnerPrizes: }};var API_ENDPOINTS { validateCode: ?actionvalidate_code, executeSpin: ?actionexecute_spin, checkUsedCode: ?actioncheck_used_code};var validatedCodeId null;var rotationAngle 0;var isSpinning false;var spinResult null;var wheelBackgroundImage null;function applyCustomColors() { const colors SPINWHEEL_CONFIG.customColors; const titleElements document.querySelectorAll(h1); titleElements.forEach(element > { element.style.color colors.titleColor; }); applyButtonColors(); applyInputColors(); applyContainerColors();}function applyButtonColors() { const colors SPINWHEEL_CONFIG.customColors; const primaryButtons document.querySelectorAll(.action-btn); primaryButtons.forEach(button > { const primaryColor colors.buttonPrimaryColor; const secondaryColor lightenColor(primaryColor, 20); button.style.background `linear-gradient(135deg, ${primaryColor}, ${secondaryColor})`; button.style.boxShadow `0 4px 15px ${hexToRgba(primaryColor, 0.3)}`; button.addEventListener(mouseenter, function() { this.style.boxShadow `0 6px 25px ${hexToRgba(primaryColor, 0.5)}`; }); button.addEventListener(mouseleave, function() { this.style.boxShadow `0 4px 15px ${hexToRgba(primaryColor, 0.3)}`; }); }); const secondaryButtons document.querySelectorAll(.option-button); secondaryButtons.forEach(button > { const secondaryColor colors.buttonSecondaryColor; button.style.borderColor `${hexToRgba(secondaryColor, 0.3)}`; button.addEventListener(mouseenter, function() { this.style.background hexToRgba(secondaryColor, 0.2); this.style.borderColor secondaryColor; }); button.addEventListener(mouseleave, function() { if (!this.classList.contains(active)) { this.style.background rgba(255, 255, 255, 0.1); this.style.borderColor `${hexToRgba(secondaryColor, 0.3)}`; } }); if (button.classList.contains(active)) { button.style.background hexToRgba(secondaryColor, 0.2); button.style.borderColor secondaryColor; } }); const popupButtons document.querySelectorAll(.popup-button); popupButtons.forEach(button > { const primaryColor colors.buttonPrimaryColor; const secondaryColor lightenColor(primaryColor, 20); button.style.background `linear-gradient(135deg, ${primaryColor}, ${secondaryColor})`; button.addEventListener(mouseenter, function() { this.style.boxShadow `0 6px 20px ${hexToRgba(primaryColor, 0.4)}`; }); });}function applyInputColors() { const colors SPINWHEEL_CONFIG.customColors; const borderColor colors.inputBorderColor; const inputs document.querySelectorAll(.code-input, .user-input); inputs.forEach(input > { input.style.borderColor hexToRgba(borderColor, 0.3); input.addEventListener(focus, function() { this.style.borderColor borderColor; this.style.boxShadow `0 0 20px ${hexToRgba(borderColor, 0.3)}`; }); input.addEventListener(blur, function() { this.style.borderColor hexToRgba(borderColor, 0.3); this.style.boxShadow none; }); });}function applyContainerColors() { const colors SPINWHEEL_CONFIG.customColors; const bgColor colors.containerBgColor; const codeSection document.getElementById(code-section); if (codeSection) { const rgbaColor hexToRgba(bgColor, 0.1); codeSection.style.background `${rgbaColor}`; codeSection.style.backdropFilter blur(10px); codeSection.style.border `1px solid ${hexToRgba(bgColor, 0.2)}`; }}function applyPopupColors() { const colors SPINWHEEL_CONFIG.customColors; const popupTitles document.querySelectorAll(.popup-title); popupTitles.forEach(title > { title.style.color colors.popupTitleColor; }); const usernameHighlights document.querySelectorAll(.user-name-highlight); usernameHighlights.forEach(highlight > { highlight.style.color colors.popupUsernameColor; });}function hexToRgba(hex, alpha) { if (!hex || hex ) { return `rgba(255, 215, 0, ${alpha})`; } hex hex.replace(#, ); var r, g, b; if (hex.length 3) { r parseInt(hex0 + hex0, 16); g parseInt(hex1 + hex1, 16); b parseInt(hex2 + hex2, 16); } else if (hex.length 6) { r parseInt(hex.slice(0, 2), 16); g parseInt(hex.slice(2, 4), 16); b parseInt(hex.slice(4, 6), 16); } else { return `rgba(255, 215, 0, ${alpha})`; } return `rgba(${r}, ${g}, ${b}, ${alpha})`;}function lightenColor(hex, percent) { if (!hex || hex ) { return #FFA500; } hex hex.replace(#, ); var r parseInt(hex.slice(0, 2), 16); var g parseInt(hex.slice(2, 4), 16); var b parseInt(hex.slice(4, 6), 16); r Math.min(255, Math.floor(r + (255 - r) * (percent / 100))); g Math.min(255, Math.floor(g + (255 - g) * (percent / 100))); b Math.min(255, Math.floor(b + (255 - b) * (percent / 100))); return `#${r.toString(16).padStart(2, 0)}${g.toString(16).padStart(2, 0)}${b.toString(16).padStart(2, 0)}`;}function darkenColor(hex, percent) { if (!hex || hex ) { return #B8860B; } hex hex.replace(#, ); var r parseInt(hex.slice(0, 2), 16); var g parseInt(hex.slice(2, 4), 16); var b parseInt(hex.slice(4, 6), 16); r Math.max(0, Math.floor(r * (1 - percent / 100))); g Math.max(0, Math.floor(g * (1 - percent / 100))); b Math.max(0, Math.floor(b * (1 - percent / 100))); return `#${r.toString(16).padStart(2, 0)}${g.toString(16).padStart(2, 0)}${b.toString(16).padStart(2, 0)}`;}function isLightColor(hex) { if (!hex || hex ) { return true; } hex hex.replace(#, ); var r parseInt(hex.slice(0, 2), 16); var g parseInt(hex.slice(2, 4), 16); var b parseInt(hex.slice(4, 6), 16); var luminance (0.299 * r + 0.587 * g + 0.114 * b) / 255; return luminance > 0.5;}function isMobileDevice() { return window.innerWidth 768;}function isSmallDevice() { return window.innerWidth 480;}function getResponsiveWheelSize() { if (isSmallDevice()) { return { containerWidth: 526, canvasWidth: 526, canvasHeight: 698, centerX: 263, centerY: 349, radius: 220, scale: 0.5 }; } else if (isMobileDevice()) { return { containerWidth: 526, canvasWidth: 526, canvasHeight: 698, centerX: 263, centerY: 349, radius: 220, scale: 0.8 }; } return { containerWidth: 600, canvasWidth: 600, canvasHeight: 800, centerX: 300, centerY: 400, radius: 250, scale: 1.2 };}var wheelSize getResponsiveWheelSize();function showError(message) { var errorEl document.getElementById(error-message); var successEl document.getElementById(success-message); if (errorEl) { errorEl.textContent message; errorEl.style.display block; if (isMobileDevice()) { setTimeout(function() { errorEl.style.display none; }, 5000); } } if (successEl) { successEl.style.display none; } if (isMobileDevice() && errorEl) { errorEl.scrollIntoView({ behavior: smooth, block: center }); }}function showSuccess(message) { var successEl document.getElementById(success-message); var errorEl document.getElementById(error-message); if (successEl) { successEl.textContent message; successEl.style.display block; if (isMobileDevice()) { setTimeout(function() { successEl.style.display none; }, 3000); } } if (errorEl) { errorEl.style.display none; } if (isMobileDevice() && successEl) { successEl.scrollIntoView({ behavior: smooth, block: center }); }}function hideMessages() { var errorEl document.getElementById(error-message); var successEl document.getElementById(success-message); if (errorEl) errorEl.style.display none; if (successEl) successEl.style.display none;}function setLoading(show) { var loadingEl document.getElementById(loading-spinner); if (loadingEl) { loadingEl.style.display show ? block : none; } var inputs document.querySelectorAll(input, button); for (var i 0; i inputs.length; i++) { inputsi.disabled show; }}function makeApiRequest(url, data) { return fetch(url, { method: POST, headers: { Content-Type: application/json, Accept: application/json }, body: JSON.stringify(data) }) .then(function(response) { if (!response.ok) { throw new Error(HTTP + response.status + : + response.statusText); } return response.json(); }) .catch(function(error) { console.error(API Request failed:, error); throw new Error(Koneksi gagal. Silakan coba lagi.); });}function initCanvas() { var canvas document.getElementById(wheel-canvas); var container canvas.parentElement; if (!canvas) return; wheelSize getResponsiveWheelSize(); var bgSpinwheelUrl https://angkaku.b-cdn.net/rtp/spinwheel/mainimage/bgaw88_main_1750247676.png; if (bgSpinwheelUrl && bgSpinwheelUrl.toLowerCase().includes(.gif)) { container.classList.add(has-gif-bg); container.style.setProperty(--gif-url, `url(${bgSpinwheelUrl})`); canvas.width wheelSize.canvasWidth; canvas.height wheelSize.canvasHeight; drawTransparentWheel(); } else { container.classList.remove(has-gif-bg); canvas.width wheelSize.canvasWidth; canvas.height wheelSize.canvasHeight; if (bgSpinwheelUrl && bgSpinwheelUrl.trim() ! ) { loadWheelBackground(bgSpinwheelUrl); } else { drawWheel(); } }}function loadWheelBackground(imageUrl) { wheelBackgroundImage new Image(); wheelBackgroundImage.crossOrigin anonymous; wheelBackgroundImage.onload function() { drawWheel(); }; wheelBackgroundImage.onerror function() { console.warn(Failed to load wheel background image, using manual draw); wheelBackgroundImage null; drawWheel(); }; wheelBackgroundImage.src imageUrl;}function drawWheel() { var canvas document.getElementById(wheel-canvas); if (!canvas) return; var ctx canvas.getContext(2d); var rewards SPINWHEEL_CONFIG.rewards; if (!rewards || rewards.length 0) return; ctx.clearRect(0, 0, canvas.width, canvas.height); if (wheelBackgroundImage && wheelBackgroundImage.complete) { drawBackgroundLayer(ctx); } drawWheelBorder(ctx); drawPrizeLayerWithClipping(ctx, rewards);}function drawTransparentWheel() { var canvas document.getElementById(wheel-canvas); if (!canvas) return; canvas.width wheelSize.canvasWidth; canvas.height wheelSize.canvasHeight; var ctx canvas.getContext(2d); var rewards SPINWHEEL_CONFIG.rewards; if (!rewards || rewards.length 0) return; ctx.clearRect(0, 0, canvas.width, canvas.height); drawWheelBorder(ctx); drawPrizeLayerTransparent(ctx, rewards);}function drawBackgroundLayer(ctx) { ctx.save(); ctx.drawImage(wheelBackgroundImage, 0, 0, wheelSize.canvasWidth, wheelSize.canvasHeight); ctx.restore();}function drawWheelBorder(ctx) { var centerX wheelSize.centerX; var centerY wheelSize.centerY; var radius wheelSize.radius; const borderColor SPINWHEEL_CONFIG.customColors.titleColor || #FFD700; ctx.save(); ctx.translate(centerX, centerY); ctx.beginPath(); ctx.arc(0, 0, radius, 0, Math.PI * 2); ctx.strokeStyle borderColor; ctx.lineWidth 6; ctx.stroke(); ctx.shadowColor borderColor; ctx.shadowBlur 15; ctx.shadowOffsetX 0; ctx.shadowOffsetY 0; ctx.stroke(); ctx.shadowColor transparent; ctx.shadowBlur 0; ctx.shadowOffsetX 0; ctx.shadowOffsetY 0; ctx.beginPath(); ctx.arc(0, 0, radius - 3, 0, Math.PI * 2); ctx.strokeStyle darkenColor(borderColor, 20); ctx.lineWidth 2; ctx.stroke(); var innerRadius wheelSize.radius * 0.4; ctx.beginPath(); ctx.arc(0, 0, innerRadius, 0, Math.PI * 2); ctx.strokeStyle borderColor; ctx.lineWidth 4; ctx.stroke(); ctx.shadowColor borderColor; ctx.shadowBlur 10; ctx.stroke(); ctx.restore();}function drawPrizeLayerWithClipping(ctx, rewards) { var centerX wheelSize.centerX; var centerY wheelSize.centerY; var outerRadius wheelSize.radius; var innerRadius wheelSize.radius * 0.4; ctx.save(); ctx.translate(centerX, centerY); ctx.rotate(rotationAngle * Math.PI / 180); var totalRewards rewards.length; var sectionAngle (Math.PI * 2) / totalRewards; var startOffset -Math.PI / 2; for (var i 0; i rewards.length; i++) { var reward rewardsi; var startAngle startOffset + (i * sectionAngle); var endAngle startAngle + sectionAngle; ctx.beginPath(); ctx.arc(0, 0, outerRadius, startAngle, endAngle, false); ctx.lineTo( Math.cos(endAngle) * innerRadius, Math.sin(endAngle) * innerRadius ); ctx.arc(0, 0, innerRadius, endAngle, startAngle, true); ctx.closePath(); var fillColor reward.color || (i % 2 0 ? #FFDC00 : #FF5722); ctx.fillStyle fillColor; ctx.fill(); ctx.lineWidth 2; ctx.strokeStyle rgba(255, 255, 255, 0.6); ctx.stroke(); } var textOuterRadius outerRadius - 0; var textInnerRadius innerRadius + 0; for (var i 0; i rewards.length; i++) { var reward rewardsi; var startAngle startOffset + (i * sectionAngle); var endAngle startAngle + sectionAngle; ctx.save(); ctx.beginPath(); ctx.arc(0, 0, textOuterRadius, startAngle, endAngle, false); ctx.lineTo( Math.cos(endAngle) * textInnerRadius, Math.sin(endAngle) * textInnerRadius ); ctx.arc(0, 0, textInnerRadius, endAngle, startAngle, true); ctx.closePath(); ctx.clip(); drawClippedSectionText(ctx, reward, startAngle, sectionAngle, textInnerRadius, textOuterRadius, i); ctx.restore(); } ctx.restore();}function drawPrizeLayerTransparent(ctx, rewards) { var centerX wheelSize.centerX; var centerY wheelSize.centerY; var outerRadius wheelSize.radius; var innerRadius wheelSize.radius * 0.4; ctx.save(); ctx.translate(centerX, centerY); ctx.rotate(rotationAngle * Math.PI / 180); var totalRewards rewards.length; var sectionAngle (Math.PI * 2) / totalRewards; var startOffset -Math.PI / 2; for (var i 0; i rewards.length; i++) { var reward rewardsi; var startAngle startOffset + (i * sectionAngle); var endAngle startAngle + sectionAngle; ctx.beginPath(); ctx.arc(0, 0, outerRadius, startAngle, endAngle, false); ctx.lineTo( Math.cos(endAngle) * innerRadius, Math.sin(endAngle) * innerRadius ); ctx.arc(0, 0, innerRadius, endAngle, startAngle, true); ctx.closePath(); var fillColor reward.color || (i % 2 0 ? #FFDC00 : #FF5722); ctx.fillStyle fillColor; ctx.fill(); ctx.lineWidth 2; ctx.strokeStyle rgba(255, 255, 255, 0.8); ctx.stroke(); } var textOuterRadius outerRadius - 0; var textInnerRadius innerRadius + 0; for (var i 0; i rewards.length; i++) { var reward rewardsi; var startAngle startOffset + (i * sectionAngle); var endAngle startAngle + sectionAngle; ctx.save(); ctx.beginPath(); ctx.arc(0, 0, textOuterRadius, startAngle, endAngle, false); ctx.lineTo( Math.cos(endAngle) * textInnerRadius, Math.sin(endAngle) * textInnerRadius ); ctx.arc(0, 0, textInnerRadius, endAngle, startAngle, true); ctx.closePath(); ctx.clip(); drawClippedSectionTextTransparent(ctx, reward, startAngle, sectionAngle, textInnerRadius, textOuterRadius, i); ctx.restore(); } ctx.restore();}function drawClippedSectionText(ctx, reward, startAngle, sectionAngle, innerRadius, outerRadius, index) { ctx.save(); ctx.rotate(startAngle + sectionAngle / 2); ctx.textAlign center; ctx.textBaseline middle; var fontSize isMobileDevice() ? (isSmallDevice() ? 14 : 14) : 15; ctx.font bold + fontSize + px Poppins; ctx.fillStyle #FFFFFF; ctx.shadowColor rgba(0, 0, 0, 0.9); ctx.shadowBlur 6; ctx.shadowOffsetX 2; ctx.shadowOffsetY 2; var safeTextRadius (innerRadius + outerRadius) / 2; var displayText reward.name || Prize + (index + 1); var maxLength isMobileDevice() ? 14 : 25; var lineSpacing isMobileDevice() ? (isSmallDevice() ? 6 : 8) : 15; if (displayText.length > maxLength) { var words displayText.split( ); if (words.length > 1) { var bestSplit findBestTextSplit(words, maxLength); var line1 bestSplit.line1; var line2 bestSplit.line2; var currentAngle startAngle + sectionAngle / 2; var normalizedAngle ((currentAngle % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); if (normalizedAngle > Math.PI / 2 && normalizedAngle 3 * Math.PI / 2) { ctx.rotate(Math.PI); ctx.fillText(line1, -safeTextRadius, -lineSpacing); ctx.fillText(line2, -safeTextRadius, lineSpacing); } else { ctx.fillText(line1, safeTextRadius, -lineSpacing); ctx.fillText(line2, safeTextRadius, lineSpacing); } ctx.restore(); return; } else { if (displayText.length > maxLength) { displayText displayText.substring(0, maxLength - 3) + ...; } } } var currentAngle startAngle + sectionAngle / 2; var normalizedAngle ((currentAngle % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); if (normalizedAngle > Math.PI / 2 && normalizedAngle 3 * Math.PI / 2) { ctx.rotate(Math.PI); ctx.fillText(displayText, -safeTextRadius, 0); } else { ctx.fillText(displayText, safeTextRadius, 0); } ctx.restore();}function drawClippedSectionTextTransparent(ctx, reward, startAngle, sectionAngle, innerRadius, outerRadius, index) { ctx.save(); ctx.rotate(startAngle + sectionAngle / 2); ctx.textAlign center; ctx.textBaseline middle; var fontSize isMobileDevice() ? (isSmallDevice() ? 14 : 14) : 15; ctx.font bold + fontSize + px Poppins; ctx.fillStyle #FFFFFF; ctx.strokeStyle #000000; ctx.lineWidth 3; ctx.shadowColor rgba(0, 0, 0, 0.9); ctx.shadowBlur 8; ctx.shadowOffsetX 2; ctx.shadowOffsetY 2; var safeTextRadius (innerRadius + outerRadius) / 2; var displayText reward.name || Prize + (index + 1); var maxLength isMobileDevice() ? 14 : 25; var lineSpacing isMobileDevice() ? (isSmallDevice() ? 6 : 8) : 15; if (displayText.length > maxLength) { var words displayText.split( ); if (words.length > 1) { var bestSplit findBestTextSplit(words, maxLength); var line1 bestSplit.line1; var line2 bestSplit.line2; var currentAngle startAngle + sectionAngle / 2; var normalizedAngle ((currentAngle % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); if (normalizedAngle > Math.PI / 2 && normalizedAngle 3 * Math.PI / 2) { ctx.rotate(Math.PI); ctx.strokeText(line1, -safeTextRadius, -lineSpacing); ctx.fillText(line1, -safeTextRadius, -lineSpacing); ctx.strokeText(line2, -safeTextRadius, lineSpacing); ctx.fillText(line2, -safeTextRadius, lineSpacing); } else { ctx.strokeText(line1, safeTextRadius, -lineSpacing); ctx.fillText(line1, safeTextRadius, -lineSpacing); ctx.strokeText(line2, safeTextRadius, lineSpacing); ctx.fillText(line2, safeTextRadius, lineSpacing); } ctx.restore(); return; } else { if (displayText.length > maxLength) { displayText displayText.substring(0, maxLength - 3) + ...; } } } var currentAngle startAngle + sectionAngle / 2; var normalizedAngle ((currentAngle % (Math.PI * 2)) + Math.PI * 2) % (Math.PI * 2); if (normalizedAngle > Math.PI / 2 && normalizedAngle 3 * Math.PI / 2) { ctx.rotate(Math.PI); ctx.strokeText(displayText, -safeTextRadius, 0); ctx.fillText(displayText, -safeTextRadius, 0); } else { ctx.strokeText(displayText, safeTextRadius, 0); ctx.fillText(displayText, safeTextRadius, 0); } ctx.restore();}function findBestTextSplit(words, maxLength) { var bestScore 999; var bestSplit { line1: words.join( ), line2: }; for (var i 1; i words.length; i++) { var line1 words.slice(0, i).join( ); var line2 words.slice(i).join( ); var maxLineLength Math.max(line1.length, line2.length); var lengthDiff Math.abs(line1.length - line2.length); var score maxLineLength + (lengthDiff * 2); if (line1.length maxLength && line2.length maxLength && score bestScore) { bestScore score; bestSplit { line1: line1, line2: line2 }; } } return bestSplit;}function animateWheel(finalRotation, duration) { duration duration || (isMobileDevice() ? 3500 : 4000); var startRotation rotationAngle; var startTime performance.now(); isSpinning true; var spinBtn document.getElementById(spin-btn); if (spinBtn) { spinBtn.disabled true; spinBtn.innerHTML i classfas fa-spinner fa-spin>/i> Berputar...; const colors SPINWHEEL_CONFIG.customColors; const primaryColor colors.buttonPrimaryColor; spinBtn.style.background `linear-gradient(135deg, ${darkenColor(primaryColor, 20)}, ${primaryColor})`; } function update(currentTime) { var elapsed currentTime - startTime; var progress Math.min(elapsed / duration, 1); var easeOutCubic function(t) { return 1 - Math.pow(1 - t, 3); }; rotationAngle startRotation + (finalRotation - startRotation) * easeOutCubic(progress); drawWheel(); if (progress 1) { requestAnimationFrame(update); } else { isSpinning false; rotationAngle finalRotation; drawWheel(); setTimeout(function() { showConfetti(); setTimeout(function() { showResultPopup(); }, 500); }, 200); } } requestAnimationFrame(update);}function showConfetti() { var confettiCount isMobileDevice() ? 100 : 200; const colors SPINWHEEL_CONFIG.customColors; var confettiColors colors.titleColor || #FFD700, colors.buttonPrimaryColor || #FFD700, colors.buttonSecondaryColor || #667eea, #FF4500, #32CD32, #FF1493 ; for (var i 0; i confettiCount; i++) { var confetti document.createElement(div); confetti.className confetti; confetti.style.width (Math.random() * 8 + 4) + px; confetti.style.height (Math.random() * 8 + 4) + px; confetti.style.background confettiColorsMath.floor(Math.random() * confettiColors.length); confetti.style.left (Math.random() * 100) + %; confetti.style.top -10px; var duration Math.random() * 1.5 + 1.5; confetti.style.animation confettiDrop + duration + s ease-out forwards; document.body.appendChild(confetti); setTimeout(function(element) { return function() { if (element.parentNode) { element.parentNode.removeChild(element); } }; }(confetti), duration * 1000); }}function showResultPopup() { if (!spinResult) return; var popup document.getElementById(result-popup); var message document.getElementById(popup-message); var imageContainer document.getElementById(popup-image-container); var title popup.querySelector(.popup-title); if (popup && message && title) { message.textContent spinResult.prize.name; const usernameColor SPINWHEEL_CONFIG.customColors.popupUsernameColor; title.innerHTML Selamat span classuser-name-highlight stylecolor: + usernameColor + !important;> + spinResult.userName + /span> Anda Mendapatkan; if (imageContainer) { imageContainer.innerHTML ; if (spinResult.prize.image) { var img document.createElement(img); img.src spinResult.prize.image; img.alt spinResult.prize.name; img.className popup-image; img.onload function() { this.style.opacity 1; }; img.style.opacity 0; img.style.transition opacity 0.3s ease; imageContainer.appendChild(img); } } applyPopupColors(); popup.classList.add(show); if (isMobileDevice()) { document.body.style.overflow hidden; } }}function showCheckResult(data) { var popup document.getElementById(check-result-popup); var message document.getElementById(check-message); var details document.getElementById(check-details); var imageContainer document.getElementById(check-image-container); if (popup && message && details) { message.textContent data.reward.name; var formattedDate Tanggal tidak tersedia; if (data.usedAt) { try { var usedDate; if (data.usedAt.includes(T) || data.usedAt.includes(-)) { usedDate new Date(data.usedAt); } else { usedDate new Date(data.usedAt + UTC); } if (!isNaN(usedDate.getTime())) { formattedDate usedDate.toLocaleString(id-ID, { timeZone: Asia/Jakarta, year: numeric, month: long, day: numeric, hour: 2-digit, minute: 2-digit, hour12: false }); } else { formattedDate data.usedAt; } } catch (error) { console.error(Date parsing error:, error); formattedDate data.usedAt || Tanggal tidak tersedia; } } var usedBy data.usedBy || Unknown User; details.innerHTML Digunakan oleh: strong> + usedBy + /strong>br>Pada: + formattedDate + WIB; if (imageContainer) { imageContainer.innerHTML ; if (data.reward.image) { var img document.createElement(img); img.src data.reward.image; img.alt data.reward.name; img.className popup-image; imageContainer.appendChild(img); } } applyPopupColors(); popup.classList.add(show); if (isMobileDevice()) { document.body.style.overflow hidden; } }}function closePopup(popupId) { var popup document.getElementById(popupId); if (popup) { popup.classList.remove(show); if (isMobileDevice()) { document.body.style.overflow auto; } if (popupId result-popup) { setTimeout(function() { resetWheel(); window.location.reload(); }, 300); } }}function resetWheel() { var wheelContainer document.getElementById(wheel-container); var codeSection document.getElementById(code-section); if (wheelContainer) { wheelContainer.style.display none; wheelContainer.style.visibility hidden; wheelContainer.classList.remove(show); } if (codeSection) { codeSection.style.display block; } validatedCodeId null; hideMessages();}function handleResultPopupClose() { if (spinResult && spinResult.customDomain) { var targetUrl spinResult.customDomain.startsWith(http) ? spinResult.customDomain : https:// + spinResult.customDomain; window.location.href targetUrl; } else { closePopup(result-popup); }}function handleValidateCode() { var code document.getElementById(code-input).value.trim(); var userName document.getElementById(user-input).value.trim(); if (!code) { showError(Silakan masukkan kode spinwheel); return; } if (!userName) { showError(Silakan masukkan nama Anda); return; } setLoading(true); hideMessages(); var data { code: code, spinwheel_id: SPINWHEEL_CONFIG.spinwheelId }; makeApiRequest(API_ENDPOINTS.validateCode, data) .then(function(response) { setLoading(false); if (response.valid) { validatedCodeId response.codeId; showSuccess(Kode valid! Silakan putar spinwheel.); setTimeout(function() { var codeSection document.getElementById(code-section); var wheelContainer document.getElementById(wheel-container); if (codeSection) { codeSection.style.display none; } if (wheelContainer) { wheelContainer.style.display block; wheelContainer.style.visibility visible; wheelContainer.classList.add(show); } initCanvas(); if (isMobileDevice()) { setTimeout(function() { wheelContainer.scrollIntoView({ behavior: smooth, block: center }); }, 300); } }, 1500); } else { showError(response.message || Kode tidak valid); } }) .catch(function(error) { setLoading(false); showError(error.message); });}function handleExecuteSpin() { if (isSpinning) return; var spinBtn document.getElementById(spin-btn); var userName document.getElementById(user-input).value.trim(); if (!validatedCodeId || !userName) { showError(Data tidak lengkap untuk spin); return; } if (!SPINWHEEL_CONFIG.rewards || SPINWHEEL_CONFIG.rewards.length 0) { showError(Tidak ada hadiah yang tersedia); return; } spinBtn.disabled true; spinBtn.innerHTML i classfas fa-spinner fa-spin>/i> Memproses...; hideMessages(); var data { spinwheelId: SPINWHEEL_CONFIG.spinwheelId, codeId: validatedCodeId, userName: userName }; makeApiRequest(API_ENDPOINTS.executeSpin, data) .then(function(response) { if (!response.success) { throw new Error(response.message || Terjadi kesalahan saat spin); } spinResult { prize: response.reward, userName: response.userName || userName, customDomain: response.customDomain }; animateWheel(response.reward.rotation_angle); }) .catch(function(error) { console.error(Execute spin error:, error); showError(error.message); resetSpinButton(); });}function resetSpinButton() { var spinBtn document.getElementById(spin-btn); if (spinBtn) { spinBtn.disabled false; spinBtn.innerHTML Putar Wheel; const colors SPINWHEEL_CONFIG.customColors; const primaryColor colors.buttonPrimaryColor; const secondaryColor lightenColor(primaryColor, 20); spinBtn.style.background `linear-gradient(135deg, ${primaryColor}, ${secondaryColor})`; }}function handleCheckUsedCode() { var code document.getElementById(check-code-input).value.trim(); if (!code) { showError(Silakan masukkan kode spinwheel); return; } setLoading(true); hideMessages(); var data { code: code }; makeApiRequest(API_ENDPOINTS.checkUsedCode, data) .then(function(response) { setLoading(false); if (response.valid) { if (response.used) { showCheckResult(response); } else { showError(Kode belum digunakan); } } else { showError(response.message || Kode tidak valid); } }) .catch(function(error) { setLoading(false); showError(error.message); });}function handleResize() { wheelSize getResponsiveWheelSize(); if (document.getElementById(wheel-container).style.display ! none) { setTimeout(initCanvas, 100); }}var toastLoopCounter 0;var toastLoopTimer null;function showToastNotification() { const toastConfig SPINWHEEL_CONFIG.toast; if (!toastConfig.enabled || !toastConfig.winnerNames || !toastConfig.winnerPrizes) { return; } toastLoopCounter 0; setTimeout(() > { createToast(toastConfig); if (toastConfig.loopEnabled) { setupToastLoop(toastConfig); } }, toastConfig.delay);}function createToast(toastConfig) { let messageToShow Sample toast message; const fakeMessage generateFakeWinnerMessage(); if (fakeMessage) { messageToShow fakeMessage; } const toast document.createElement(div); toast.className `toast-notification ${toastConfig.position}`; toast.style.backgroundColor toastConfig.bgColor; toast.style.color toastConfig.textColor; toast.innerHTML ` div classtoast-close>×/div> div classtoast-message>${escapeHtml(messageToShow)}/div> `; let parentContainer document.body; if (toastConfig.position bottom-center) { const codeSection document.getElementById(code-section); if (codeSection) { parentContainer codeSection; } } parentContainer.appendChild(toast); setTimeout(() > { toast.classList.add(show); }, 100); const hideTimeout setTimeout(() > { hideToast(toast); }, toastConfig.duration); toast.addEventListener(click, () > { clearTimeout(hideTimeout); hideToast(toast); }); const closeBtn toast.querySelector(.toast-close); if (closeBtn) { closeBtn.addEventListener(click, (e) > { e.stopPropagation(); clearTimeout(hideTimeout); hideToast(toast); if (toastLoopTimer) { clearTimeout(toastLoopTimer); toastLoopTimer null; } }); }}function setupToastLoop(toastConfig) { toastLoopCounter++; if (toastConfig.loopCount > 0 && toastLoopCounter > toastConfig.loopCount) { return; } toastLoopTimer setTimeout(() > { const existingToasts document.querySelectorAll(.toast-notification); if (existingToasts.length 0) { createToast(toastConfig); setupToastLoop(toastConfig); } else { toastLoopTimer setTimeout(() > { createToast(toastConfig); setupToastLoop(toastConfig); }, 2000); } }, toastConfig.loopInterval);}function stopToastLoop() { if (toastLoopTimer) { clearTimeout(toastLoopTimer); toastLoopTimer null; } const existingToasts document.querySelectorAll(.toast-notification); existingToasts.forEach(toast > { hideToast(toast); }); toastLoopCounter 0;}function hideToast(toast) { toast.classList.remove(show); setTimeout(() > { if (toast.parentNode) { toast.parentNode.removeChild(toast); } }, 400);}function escapeHtml(text) { const div document.createElement(div); div.textContent text; return div.innerHTML;}var fakeWinnerNames ;var fakeWinnerPrizes ;function initializeFakeWinnerData() { const toastConfig SPINWHEEL_CONFIG.toast; if (toastConfig.enabled && toastConfig.winnerNames && toastConfig.winnerPrizes) { fakeWinnerNames toastConfig.winnerNames.split(,) .map(name > name.trim()) .filter(name > name.length > 0); fakeWinnerPrizes ; toastConfig.winnerPrizes.split(,).forEach(item > { const parts item.split(:); if (parts.length 2) { const prizeName parts0.trim(); const quantity parseInt(parts1.trim()); if (prizeName && !isNaN(quantity) && quantity > 0) { for (let i 0; i quantity; i++) { fakeWinnerPrizes.push(prizeName); } } } }); }}function generateFakeWinnerMessage() { if (fakeWinnerNames.length 0 || fakeWinnerPrizes.length 0) { return null; } const randomName fakeWinnerNamesMath.floor(Math.random() * fakeWinnerNames.length); const randomPrize fakeWinnerPrizesMath.floor(Math.random() * fakeWinnerPrizes.length); const maskedName maskWinnerName(randomName); return `${maskedName} Memenangkan Hadiah ${randomPrize}`;}function maskWinnerName(name) { if (name.length 3) { return name.charAt(0) + *.repeat(name.length - 1); } else if (name.length 5) { return name.substring(0, 2) + *.repeat(name.length - 2); } else { return name.substring(0, 3) + *.repeat(name.length - 5) + name.slice(-2); }}window.addEventListener(load, function() { showToastNotification(); setTimeout(resetWheel, 100);});var resizeTimeout;window.addEventListener(resize, function() { clearTimeout(resizeTimeout); resizeTimeout setTimeout(handleResize, 250);});window.addEventListener(orientationchange, function() { setTimeout(function() { wheelSize getResponsiveWheelSize(); if (document.getElementById(wheel-container).style.display ! none) { initCanvas(); } }, 500);});function handleShowPrizes() { var codeSection document.getElementById(code-section); var wheelContainer document.getElementById(wheel-container); hideMessages(); if (codeSection) { codeSection.style.display none; } if (wheelContainer) { wheelContainer.style.display block; wheelContainer.style.visibility visible; wheelContainer.classList.add(show); } initCanvas(); var spinBtn document.getElementById(spin-btn); if (spinBtn) { spinBtn.style.display none; } addBackButton(); if (isMobileDevice()) { setTimeout(function() { wheelContainer.scrollIntoView({ behavior: smooth, block: center }); }, 300); }}function addBackButton() { var wheelContainer document.getElementById(wheel-container); var existingBackBtn document.getElementById(back-to-code-btn); if (existingBackBtn) { existingBackBtn.remove(); } var backBtn document.createElement(button); backBtn.id back-to-code-btn; backBtn.className action-btn; backBtn.innerHTML Kembali ke Validasi; backBtn.style.marginTop 15px; backBtn.style.background linear-gradient(135deg, #6c757d, #495057); backBtn.addEventListener(click, function() { var codeSection document.getElementById(code-section); var wheelContainer document.getElementById(wheel-container); var spinBtn document.getElementById(spin-btn); if (wheelContainer) { wheelContainer.style.display none; wheelContainer.style.visibility hidden; wheelContainer.classList.remove(show); } if (codeSection) { codeSection.style.display block; } if (spinBtn) { spinBtn.style.display block; } backBtn.remove(); hideMessages(); }); if (wheelContainer) { wheelContainer.appendChild(backBtn); }}document.addEventListener(DOMContentLoaded, function() { var wheelContainer document.getElementById(wheel-container); if (wheelContainer) { wheelContainer.style.display none; wheelContainer.style.visibility hidden; wheelContainer.classList.remove(show); } if (!SPINWHEEL_CONFIG.rewards || SPINWHEEL_CONFIG.rewards.length 0) { showError(Konfigurasi wheel tidak valid); return; } validatedCodeId null; wheelSize getResponsiveWheelSize(); var codeSection document.getElementById(code-section); if (codeSection) { codeSection.style.display block; } setTimeout(function() { applyCustomColors(); }, 100); var validateOption document.getElementById(validate-option); var checkOption document.getElementById(check-option); var validateContainer document.getElementById(validate-container); var checkContainer document.getElementById(check-code-container); if (validateOption && checkOption && validateContainer && checkContainer) { validateOption.addEventListener(click, function() { validateOption.classList.add(active); checkOption.classList.remove(active); validateContainer.classList.add(active); checkContainer.classList.remove(active); hideMessages(); setTimeout(applyCustomColors, 50); }); checkOption.addEventListener(click, function() { checkOption.classList.add(active); validateOption.classList.remove(active); checkContainer.classList.add(active); validateContainer.classList.remove(active); hideMessages(); setTimeout(applyCustomColors, 50); }); } var validateBtn document.getElementById(validate-btn); var spinBtn document.getElementById(spin-btn); var checkCodeBtn document.getElementById(check-code-btn); if (validateBtn) { validateBtn.addEventListener(click, handleValidateCode); } if (spinBtn) { spinBtn.addEventListener(click, handleExecuteSpin); } if (checkCodeBtn) { checkCodeBtn.addEventListener(click, handleCheckUsedCode); } var showPrizesBtn document.getElementById(show-prizes-btn); if (showPrizesBtn) { showPrizesBtn.addEventListener(click, handleShowPrizes); } var resultCloseBtn document.getElementById(popup-close-btn); var checkCloseBtn document.getElementById(check-popup-close-btn); if (resultCloseBtn) { resultCloseBtn.addEventListener(click, function() { handleResultPopupClose(); }); } if (checkCloseBtn) { checkCloseBtn.addEventListener(click, function() { closePopup(check-result-popup); }); } var closeButtons document.querySelectorAll(.popup-close); for (var i 0; i closeButtons.length; i++) { closeButtonsi.addEventListener(click, function() { var popup this.closest(.popup-overlay); if (popup) { if (popup.id result-popup) { handleResultPopupClose(); } else { closePopup(popup.id); } } }); } var popupOverlays document.querySelectorAll(.popup-overlay); for (var i 0; i popupOverlays.length; i++) { popupOverlaysi.addEventListener(click, function(e) { if (e.target this) { if (this.id result-popup) { handleResultPopupClose(); } else { closePopup(this.id); } } }); } document.addEventListener(keypress, function(e) { if (e.key Enter) { var activeContainer document.querySelector(.form-container.active); if (activeContainer) { if (activeContainer.id validate-container) { handleValidateCode(); } else if (activeContainer.id check-code-container) { handleCheckUsedCode(); } } } }); if (isMobileDevice()) { var touchElements document.querySelectorAll(.action-btn, .option-button); for (var i 0; i touchElements.length; i++) { touchElementsi.addEventListener(touchstart, function() { this.style.transform scale(0.95); }); touchElementsi.addEventListener(touchend, function() { this.style.transform ; }); } var inputs document.querySelectorAll(input); for (var i 0; i inputs.length; i++) { inputsi.addEventListener(focus, function() { var viewport document.querySelector(metanameviewport); if (viewport) { viewport.content widthdevice-width, initial-scale1, maximum-scale1, user-scalableno; } }); inputsi.addEventListener(blur, function() { var viewport document.querySelector(metanameviewport); if (viewport) { viewport.content widthdevice-width, initial-scale1; } }); } } initializeFakeWinnerData(); hideMessages();});/script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]