isaikr 0.0.1

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.
Files changed (51) hide show
  1. package/README.md +35 -0
  2. package/cdn/api.js +19 -0
  3. package/cdn/character.js +254 -0
  4. package/cdn/chat.js +33 -0
  5. package/cdn/code-editor.js +1131 -0
  6. package/cdn/community-compose.js +270 -0
  7. package/cdn/games/2048/index.html +12 -0
  8. package/cdn/games/breakout/index.html +13 -0
  9. package/cdn/games/clicker/index.html +26 -0
  10. package/cdn/games/flappy/index.html +11 -0
  11. package/cdn/games/memory/index.html +34 -0
  12. package/cdn/games/pong/index.html +13 -0
  13. package/cdn/games/reaction/index.html +38 -0
  14. package/cdn/games/runner/index.html +11 -0
  15. package/cdn/games/snake/index.html +11 -0
  16. package/cdn/games/tetris/index.html +14 -0
  17. package/cdn/games/whack/index.html +8 -0
  18. package/cdn/go.js +126 -0
  19. package/cdn/go2.js +127 -0
  20. package/cdn/header3_behavior.js +1167 -0
  21. package/cdn/header3_layout.js +1004 -0
  22. package/cdn/header3_layout.js.bak +1004 -0
  23. package/cdn/header3_style.css +3524 -0
  24. package/cdn/header3_style.css.bak +3514 -0
  25. package/cdn/lang.js +198 -0
  26. package/cdn/loading.js +143 -0
  27. package/cdn/loading2.js +144 -0
  28. package/cdn/local-model.js +2941 -0
  29. package/cdn/main.js +4 -0
  30. package/cdn/main_asset.js +1849 -0
  31. package/cdn/main_asset.js.bak +6999 -0
  32. package/cdn/main_index.css +287 -0
  33. package/cdn/re_board3.css +733 -0
  34. package/cdn/re_board3.js +734 -0
  35. package/cdn/re_chat_tts.js +652 -0
  36. package/cdn/re_local_runtime.js +2246 -0
  37. package/cdn/re_local_runtime.js.bak +2246 -0
  38. package/cdn/re_share.js +577 -0
  39. package/cdn/re_voice.js +542 -0
  40. package/cdn/utils.js +36 -0
  41. package/cdn/view.js +321 -0
  42. package/header3_behavior.js +804 -0
  43. package/header3_layout.js +998 -0
  44. package/header3_style.css +2740 -0
  45. package/index.js +0 -0
  46. package/lang.js +179 -0
  47. package/main_asset.js +2416 -0
  48. package/main_index.css +274 -0
  49. package/package.json +14 -0
  50. package/re_chat_tts.js +1419 -0
  51. package/re_voice.js +430 -0
package/cdn/go2.js ADDED
@@ -0,0 +1,127 @@
1
+ function createRandomBackground() {
2
+ const container = document.getElementById('bg-characters-container');
3
+ if (!container) return;
4
+ for (let i = 0; i < 20; i++) {
5
+ const img = document.createElement('img');
6
+ const randNum = Math.floor(Math.random() * 14) + 1;
7
+ img.src = `https://cdn.jsdelivr.net/gh/sllkx/icons@main/char/${randNum}.png`;
8
+ img.className = "absolute select-none opacity-20 pointer-events-none transition-opacity duration-500";
9
+ const randSize = Math.floor(Math.random() * 90) + 40;
10
+ img.style.width = `${randSize}px`;
11
+ img.style.height = 'auto';
12
+ img.style.top = `${Math.random() * 100}%`;
13
+ img.style.left = `${Math.random() * 100}%`;
14
+ img.style.transform = `translate(-50%, -50%) rotate(${Math.floor(Math.random() * 360)}deg)`;
15
+ container.appendChild(img);
16
+ }
17
+ }
18
+ window.addEventListener('DOMContentLoaded', createRandomBackground);
19
+
20
+ const userLang = typeof appConfig !== 'undefined' ? appConfig.userLang : 'en';
21
+ const targetUrl = typeof appConfig !== 'undefined' ? appConfig.targetUrl : 'https://isai.kr/';
22
+
23
+ const cheeringMessages = {
24
+ ko: { r1: "시작! 클릭해 속도 올리기 (TAP!)", r2: "절반 달성! 계속 탭하기 (TAP!)", r3: "거의 다 왔어요! 힘내세요 (TAP!)", r4: "마지막 스퍼트! 조금만 더 (TAP!)", r5: "이동 준비 완료!", r6: "★ 완료! 클릭해서 이동하기 (Go!) ★" },
25
+ en: { r1: "Start! Tap to speed up (TAP!)", r2: "Halfway! Keep tapping (TAP!)", r3: "Almost there! Keep going (TAP!)", r4: "Final sprint! Just a bit more (TAP!)", r5: "Ready to go!", r6: "★ Complete! Click to Proceed (Go!) ★" },
26
+ es: { r1: "¡Iniciar! Toca para acelerar (TAP!)", r2: "¡Mitad! Sigue tocando (TAP!)", r3: "¡Casi listo! ¡Vamos! (TAP!)", r4: "¡Esprint final! Un poco más (TAP!)", r5: "¡Listo para ir!", r6: "★ ¡Completo! Haz clic para continuar ★" },
27
+ hi: { r1: "शुरू! गति बढ़ाएं (TAP!)", r2: "आधा रास्ता! टैप करते रहें (TAP!)", r3: "बस पहुंचने वाले हैं! चलो! (TAP!)", r4: "अंतिम प्रयास! बस थोड़ा और (TAP!)", r5: "जाने के लिए तैयार!", r6: "★ पूरा हुआ! आगे बढ़ने के लिए क्लिक करें ★" },
28
+ ja: { r1: "開始!タップで高速化 (TAP!)", r2: "半分達成!タップ継続! (TAP!)", r3: "あと少し!がんばって! (TAP!)", r4: "ラストスパート!一息! (TAP!)", r5: "移動します!", r6: "★ 完了!クリックして移動する ★" }
29
+ };
30
+
31
+ function getCheeringText(pct) {
32
+ const langData = cheeringMessages[userLang] || cheeringMessages['en'];
33
+ const msg = pct <= 30 ? langData.r1 : pct <= 60 ? langData.r2 : pct <= 90 ? langData.r3 : pct < 100 ? langData.r4 : langData.r5;
34
+ return `${pct}% - ${msg}`;
35
+ }
36
+
37
+ function getFinalClickText() {
38
+ return (cheeringMessages[userLang] || cheeringMessages['en']).r6;
39
+ }
40
+
41
+ let progress = 0, isReadyToRedirect = false, isCompleted = false, isCooldown = false, score = 0;
42
+
43
+ const progressBar = document.getElementById('progress-bar');
44
+ const progressText = document.getElementById('progress-text');
45
+ const loadingTrigger = document.getElementById('loading-trigger');
46
+ const characterGame = document.getElementById('character-game');
47
+ const gameCharImg = document.getElementById('game-char-img');
48
+ const cardContainer = document.getElementById('card-container');
49
+ const scoreBoard = document.getElementById('game-score');
50
+
51
+ function updateProgress(value) {
52
+ if (isCompleted || isReadyToRedirect) return;
53
+ progress = Math.min(100, Math.max(0, value));
54
+ progressBar.style.width = progress + '%';
55
+ progressText.textContent = getCheeringText(progress);
56
+
57
+ if (progress >= 100) {
58
+ isReadyToRedirect = true;
59
+ clearInterval(autoIncrementInterval);
60
+ progressBar.classList.add('bg-emerald-500');
61
+ progressBar.classList.remove('bg-white');
62
+ loadingTrigger.classList.remove('opacity-40', 'cursor-not-allowed');
63
+ loadingTrigger.classList.add('cursor-pointer', 'animate-pulse');
64
+ progressText.textContent = getFinalClickText();
65
+ }
66
+ }
67
+
68
+ function handleFinalRedirect() {
69
+ if (isCompleted) return;
70
+ isCompleted = true;
71
+ window.open('https://omg10.com/4/10628199', '_blank');
72
+ window.location.href = targetUrl;
73
+ }
74
+
75
+ function spawnFloatingEffect(triggerElement, text) {
76
+ const rect = triggerElement.getBoundingClientRect();
77
+ const cardRect = cardContainer.getBoundingClientRect();
78
+ const x = rect.left - cardRect.left + (rect.width / 2);
79
+ const top = rect.top - cardRect.top;
80
+ const effectEl = document.createElement('div');
81
+ effectEl.textContent = text;
82
+ effectEl.className = "absolute text-amber-300 font-black text-xs pointer-events-none select-none z-50 transition-all duration-500 ease-out";
83
+ effectEl.style.left = `${x}px`;
84
+ effectEl.style.top = `${top}px`;
85
+ effectEl.style.transform = 'translateX(-50%)';
86
+ cardContainer.appendChild(effectEl);
87
+ effectEl.offsetHeight;
88
+ effectEl.style.top = `${top - 40}px`;
89
+ effectEl.style.opacity = '0';
90
+ setTimeout(() => effectEl.remove(), 500);
91
+ }
92
+
93
+ updateProgress(0);
94
+
95
+ const autoIncrementInterval = setInterval(() => {
96
+ if (!isReadyToRedirect) updateProgress(progress + 1);
97
+ }, 3000);
98
+
99
+ loadingTrigger.addEventListener('click', () => {
100
+ if (isReadyToRedirect) {
101
+ handleFinalRedirect();
102
+ return;
103
+ }
104
+ if (isCompleted || isCooldown) return;
105
+ isCooldown = true;
106
+ loadingTrigger.classList.add('opacity-40', 'cursor-not-allowed');
107
+ loadingTrigger.classList.remove('cursor-pointer');
108
+ spawnFloatingEffect(loadingTrigger, '+3%');
109
+ updateProgress(progress + 3);
110
+ setTimeout(() => {
111
+ isCooldown = false;
112
+ if (!isReadyToRedirect) {
113
+ loadingTrigger.classList.remove('opacity-40', 'cursor-not-allowed');
114
+ loadingTrigger.classList.add('cursor-pointer');
115
+ }
116
+ }, 2000);
117
+ });
118
+
119
+ characterGame.addEventListener('click', () => {
120
+ if (isCompleted) return;
121
+ score++;
122
+ scoreBoard.textContent = score;
123
+ gameCharImg.classList.add('animate-squish');
124
+ gameCharImg.addEventListener('animationend', () => gameCharImg.classList.remove('animate-squish'), { once: true });
125
+ gameCharImg.src = `https://cdn.jsdelivr.net/gh/sllkx/icons@main/char/${Math.floor(Math.random() * 14) + 1}.png`;
126
+ spawnFloatingEffect(characterGame, '+1');
127
+ });