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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fa" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>ROBO☬SHΞN™</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap" rel="stylesheet">
|
| 10 |
+
|
| 11 |
+
<!-- PWA Manifest -->
|
| 12 |
+
<link rel="manifest" href="/manifest.json">
|
| 13 |
+
<meta name="theme-color" content="#00eaff">
|
| 14 |
+
|
| 15 |
+
<style>
|
| 16 |
+
:root {
|
| 17 |
+
--eye-color: #00eaff;
|
| 18 |
+
--eye-glow-color: rgba(0, 234, 255, 0.5);
|
| 19 |
+
--background-dark: #000000;
|
| 20 |
+
--background-medium: #1a1a1a;
|
| 21 |
+
--ui-background-glass: rgba(10, 10, 10, 0.75);
|
| 22 |
+
--ui-border-color: rgba(0, 234, 255, 0.6);
|
| 23 |
+
--ui-shadow-color: rgba(0, 234, 255, 0.2);
|
| 24 |
+
--text-color: #c9d1d9;
|
| 25 |
+
--placeholder-gradient: linear-gradient(90deg, #ffffff, #cccccc, #666666, #cccccc, #ffffff);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
* {
|
| 29 |
+
-webkit-tap-highlight-color: transparent;
|
| 30 |
+
box-sizing: border-box;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
body, html {
|
| 34 |
+
margin: 0;
|
| 35 |
+
padding: 0;
|
| 36 |
+
height: 100%;
|
| 37 |
+
width: 100%;
|
| 38 |
+
background-color: transparent;
|
| 39 |
+
overflow: hidden;
|
| 40 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 41 |
+
color: var(--text-color);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
#background-canvas {
|
| 45 |
+
position: fixed;
|
| 46 |
+
top: 0;
|
| 47 |
+
left: 0;
|
| 48 |
+
width: 100vw;
|
| 49 |
+
height: 100vh;
|
| 50 |
+
z-index: -1;
|
| 51 |
+
pointer-events: none;
|
| 52 |
+
background-color: var(--background-dark);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.main-wrapper {
|
| 56 |
+
display: flex;
|
| 57 |
+
flex-direction: column;
|
| 58 |
+
height: 100%;
|
| 59 |
+
max-height: 100vh;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
#app-container {
|
| 63 |
+
flex-grow: 1;
|
| 64 |
+
display: flex;
|
| 65 |
+
flex-direction: column;
|
| 66 |
+
width: 100%;
|
| 67 |
+
max-width: 500px;
|
| 68 |
+
margin: 0 auto;
|
| 69 |
+
padding: 15px;
|
| 70 |
+
min-height: 0;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
#robot-wrapper {
|
| 74 |
+
flex-shrink: 0;
|
| 75 |
+
display: flex;
|
| 76 |
+
justify-content: center;
|
| 77 |
+
align-items: center;
|
| 78 |
+
position: relative;
|
| 79 |
+
z-index: 10;
|
| 80 |
+
height: 160px;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.robot-container { width: 160px; height: 160px; }
|
| 84 |
+
|
| 85 |
+
.robot-frame {
|
| 86 |
+
width: 100%; height: 100%;
|
| 87 |
+
background: linear-gradient(145deg, #2a2a2a, var(--background-medium));
|
| 88 |
+
border-radius: 22%;
|
| 89 |
+
box-shadow: inset 0 0 15px rgba(0,0,0,0.5), 5px 5px 15px #0a0a0a, -5px -5px 15px #202020;
|
| 90 |
+
display: flex; align-items: center; justify-content: center; position: relative;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
#faceCanvas { width: 80%; height: 75%; }
|
| 94 |
+
|
| 95 |
+
.engraved-text {
|
| 96 |
+
position: absolute; bottom: 6.25%; left: 50%;
|
| 97 |
+
transform: translate(-50%, 50%);
|
| 98 |
+
width: 100%; text-align: center; font-size: 14px;
|
| 99 |
+
font-weight: bold; color: #252525;
|
| 100 |
+
text-shadow: 1px 1px 1px #111, 0 0 0 #000, 0px 0px 3px #111;
|
| 101 |
+
letter-spacing: 1px; pointer-events: none;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
#chat-container {
|
| 105 |
+
flex-grow: 1; background-color: var(--ui-background-glass);
|
| 106 |
+
border: 1px solid var(--ui-border-color); border-radius: 30px;
|
| 107 |
+
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
|
| 108 |
+
box-shadow: 0 0 30px var(--ui-shadow-color);
|
| 109 |
+
overflow-y: auto; padding: 20px;
|
| 110 |
+
display: flex; flex-direction: column;
|
| 111 |
+
margin-top: -80px; padding-top: 90px;
|
| 112 |
+
min-height: 0; margin-bottom: 15px;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.message-bubble {
|
| 116 |
+
max-width: 80%; margin-bottom: 10px;
|
| 117 |
+
word-wrap: break-word; opacity: 0;
|
| 118 |
+
transform: translateY(20px); animation: popIn 0.3s forwards;
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
.message-content {
|
| 122 |
+
padding: 10px 15px; border-radius: 20px;
|
| 123 |
+
position: relative;
|
| 124 |
+
overflow: hidden;
|
| 125 |
+
}
|
| 126 |
+
.message-content::before {
|
| 127 |
+
content: '';
|
| 128 |
+
position: absolute;
|
| 129 |
+
top: 0;
|
| 130 |
+
left: -150%;
|
| 131 |
+
width: 100%;
|
| 132 |
+
height: 100%;
|
| 133 |
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
|
| 134 |
+
transform: skewX(-25deg);
|
| 135 |
+
animation: sheen 4s infinite;
|
| 136 |
+
}
|
| 137 |
+
@keyframes sheen {
|
| 138 |
+
100% { left: 150%; }
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.message-content a {
|
| 142 |
+
color: var(--eye-color);
|
| 143 |
+
text-decoration: none;
|
| 144 |
+
font-weight: 500;
|
| 145 |
+
}
|
| 146 |
+
.message-content a:hover {
|
| 147 |
+
text-decoration: underline;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
@keyframes popIn { to { opacity: 1; transform: translateY(0); } }
|
| 151 |
+
|
| 152 |
+
.user-message { margin-left: auto; }
|
| 153 |
+
.user-message .message-content {
|
| 154 |
+
background: linear-gradient(135deg, rgba(0, 234, 255, 0.3), rgba(0, 234, 255, 0.1));
|
| 155 |
+
border-bottom-left-radius: 5px;
|
| 156 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.bot-message { margin-right: auto; }
|
| 160 |
+
.bot-message .message-content {
|
| 161 |
+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
|
| 162 |
+
border-bottom-right-radius: 5px;
|
| 163 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
.bot-message.thinking .message-content { animation: pulse 1.5s infinite; }
|
| 167 |
+
.bot-message.thinking .message-content::before { display: none; }
|
| 168 |
+
|
| 169 |
+
@keyframes pulse {
|
| 170 |
+
0% { background-color: rgba(255, 255, 255, 0.05); }
|
| 171 |
+
50% { background-color: rgba(255, 255, 255, 0.1); }
|
| 172 |
+
100% { background-color: rgba(255, 255, 255, 0.05); }
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
.code-block-wrapper {
|
| 176 |
+
background-color: #0d1117;
|
| 177 |
+
border: 1px solid #30363d;
|
| 178 |
+
border-radius: 8px;
|
| 179 |
+
overflow: hidden;
|
| 180 |
+
margin-top: 10px;
|
| 181 |
+
}
|
| 182 |
+
.code-block-header {
|
| 183 |
+
display: flex;
|
| 184 |
+
justify-content: flex-end;
|
| 185 |
+
align-items: center;
|
| 186 |
+
padding: 5px 10px;
|
| 187 |
+
background-color: #161b22;
|
| 188 |
+
}
|
| 189 |
+
.copy-code-btn {
|
| 190 |
+
background: #21262d; border: 1px solid #30363d;
|
| 191 |
+
color: var(--text-color); font-size: 12px;
|
| 192 |
+
padding: 3px 8px; border-radius: 6px; cursor: pointer;
|
| 193 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 194 |
+
}
|
| 195 |
+
.copy-code-btn:hover { background: #30363d; }
|
| 196 |
+
.code-block-wrapper pre {
|
| 197 |
+
margin: 0; padding: 15px;
|
| 198 |
+
overflow-x: auto;
|
| 199 |
+
font-family: monospace;
|
| 200 |
+
font-size: 14px;
|
| 201 |
+
direction: ltr;
|
| 202 |
+
text-align: left;
|
| 203 |
+
}
|
| 204 |
+
.code-block-wrapper pre code { white-space: pre-wrap; word-wrap: break-word; }
|
| 205 |
+
|
| 206 |
+
.interactive-buttons {
|
| 207 |
+
display: flex;
|
| 208 |
+
flex-wrap: wrap;
|
| 209 |
+
gap: 8px;
|
| 210 |
+
margin-top: 10px;
|
| 211 |
+
}
|
| 212 |
+
.chat-button {
|
| 213 |
+
background-color: transparent;
|
| 214 |
+
border: 1px solid var(--ui-border-color);
|
| 215 |
+
color: var(--eye-color);
|
| 216 |
+
padding: 8px 15px;
|
| 217 |
+
border-radius: 20px;
|
| 218 |
+
cursor: pointer;
|
| 219 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 220 |
+
transition: background-color 0.2s;
|
| 221 |
+
}
|
| 222 |
+
.chat-button:hover { background-color: rgba(0, 234, 255, 0.1); }
|
| 223 |
+
.chat-button:disabled {
|
| 224 |
+
cursor: not-allowed;
|
| 225 |
+
background-color: rgba(255, 255, 255, 0.05);
|
| 226 |
+
color: #888;
|
| 227 |
+
border-color: #555;
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
#input-area {
|
| 231 |
+
flex-shrink: 0; display: flex;
|
| 232 |
+
align-items: center;
|
| 233 |
+
background-color: var(--ui-background-glass);
|
| 234 |
+
border: 1px solid var(--ui-border-color); border-radius: 30px;
|
| 235 |
+
padding: 10px; backdrop-filter: blur(12px);
|
| 236 |
+
-webkit-backdrop-filter: blur(12px);
|
| 237 |
+
box-shadow: 0 0 30px var(--ui-shadow-color);
|
| 238 |
+
position: relative;
|
| 239 |
+
margin-bottom: 10px;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
#message-input {
|
| 243 |
+
flex-grow: 1; background: transparent; border: none;
|
| 244 |
+
outline: none; color: var(--text-color); font-size: 16px;
|
| 245 |
+
padding: 10px 10px 10px 40px;
|
| 246 |
+
resize: none; max-height: 100px;
|
| 247 |
+
text-align: right;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
#message-input::placeholder {
|
| 251 |
+
color: transparent;
|
| 252 |
+
background-image: var(--placeholder-gradient);
|
| 253 |
+
background-size: 400% 100%;
|
| 254 |
+
background-clip: text;
|
| 255 |
+
-webkit-background-clip: text;
|
| 256 |
+
-webkit-text-fill-color: transparent;
|
| 257 |
+
animation: gradient-wavy 8s ease infinite;
|
| 258 |
+
text-align: center;
|
| 259 |
+
font-size: 14px;
|
| 260 |
+
font-weight: 500;
|
| 261 |
+
white-space: nowrap;
|
| 262 |
+
overflow: hidden;
|
| 263 |
+
text-overflow: ellipsis;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
@keyframes gradient-wavy {
|
| 267 |
+
0%{background-position:0% 50%}
|
| 268 |
+
50%{background-position:100% 50%}
|
| 269 |
+
100%{background-position:0% 50%}
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
#message-input:focus::placeholder {
|
| 273 |
+
opacity: 0;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
#send-button-container {
|
| 277 |
+
width: 50px; height: 90px; background-color: #111;
|
| 278 |
+
border-radius: 25px; margin-left: 10px; position: relative;
|
| 279 |
+
overflow: hidden; display: flex; justify-content: center;
|
| 280 |
+
align-items: flex-start;
|
| 281 |
+
cursor: grab;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
#send-button-container::after {
|
| 285 |
+
content: '';
|
| 286 |
+
position: absolute;
|
| 287 |
+
width: 80px;
|
| 288 |
+
height: 80px;
|
| 289 |
+
left: 50%;
|
| 290 |
+
transform: translateX(-50%);
|
| 291 |
+
border-radius: 50%;
|
| 292 |
+
box-shadow: 0 0 15px var(--eye-color);
|
| 293 |
+
opacity: 0;
|
| 294 |
+
animation: arc-swipe 2.5s ease-in-out infinite;
|
| 295 |
+
animation-delay: 1s;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
#input-area.typing #send-button-container::after {
|
| 299 |
+
animation: none;
|
| 300 |
+
display: none;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
@keyframes arc-swipe {
|
| 304 |
+
0% { top: -40px; opacity: 0; }
|
| 305 |
+
40% { opacity: 0.7; }
|
| 306 |
+
80% { top: 40px; opacity: 0; }
|
| 307 |
+
100% { opacity: 0; }
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
#send-button {
|
| 311 |
+
width: 40px; height: 40px; background-color: var(--eye-color);
|
| 312 |
+
border-radius: 50%; position: absolute; top: 10px;
|
| 313 |
+
display: flex; justify-content: center; align-items: center;
|
| 314 |
+
transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
#send-button.dragging { transition: none; }
|
| 318 |
+
#send-button svg { width: 24px; height: 24px; stroke: var(--background-dark); stroke-width: 2.5; }
|
| 319 |
+
|
| 320 |
+
#send-hint {
|
| 321 |
+
position: absolute;
|
| 322 |
+
bottom: 100%;
|
| 323 |
+
right: 10px;
|
| 324 |
+
margin-bottom: 5px;
|
| 325 |
+
background-color: #222;
|
| 326 |
+
color: var(--eye-color);
|
| 327 |
+
padding: 5px 10px;
|
| 328 |
+
border-radius: 8px;
|
| 329 |
+
font-size: 12px;
|
| 330 |
+
opacity: 0;
|
| 331 |
+
pointer-events: none;
|
| 332 |
+
white-space: nowrap;
|
| 333 |
+
}
|
| 334 |
+
#send-hint.show {
|
| 335 |
+
opacity: 1;
|
| 336 |
+
animation: blink-fade 3s forwards;
|
| 337 |
+
}
|
| 338 |
+
@keyframes blink-fade {
|
| 339 |
+
0%, 100% { opacity: 0; }
|
| 340 |
+
10%, 30%, 50% { opacity: 1; }
|
| 341 |
+
20%, 40% { opacity: 0.5; }
|
| 342 |
+
60% { opacity: 1; }
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
/* Microphone Button Styles */
|
| 346 |
+
#mic-button {
|
| 347 |
+
position: absolute;
|
| 348 |
+
top: 50%;
|
| 349 |
+
left: 10px;
|
| 350 |
+
transform: translateY(-50%);
|
| 351 |
+
background: none;
|
| 352 |
+
border: none;
|
| 353 |
+
cursor: pointer;
|
| 354 |
+
padding: 5px;
|
| 355 |
+
z-index: 2;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
#mic-button svg {
|
| 359 |
+
width: 20px;
|
| 360 |
+
height: 20px;
|
| 361 |
+
fill: var(--text-color);
|
| 362 |
+
transition: fill 0.3s;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
#mic-button.listening svg {
|
| 366 |
+
fill: var(--eye-color);
|
| 367 |
+
animation: pulse-mic 1s infinite;
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
@keyframes pulse-mic {
|
| 371 |
+
0% { opacity: 1; }
|
| 372 |
+
50% { opacity: 0.5; }
|
| 373 |
+
100% { opacity: 1; }
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
/* Light Beam Animation */
|
| 377 |
+
#light-beam {
|
| 378 |
+
position: fixed;
|
| 379 |
+
top: 0;
|
| 380 |
+
left: 0;
|
| 381 |
+
width: 100%;
|
| 382 |
+
height: 100%;
|
| 383 |
+
pointer-events: none;
|
| 384 |
+
z-index: 999;
|
| 385 |
+
opacity: 0;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.site-footer {
|
| 389 |
+
flex-shrink: 0;
|
| 390 |
+
text-align: center;
|
| 391 |
+
padding: 0 15px 10px 15px;
|
| 392 |
+
margin-top: auto;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.gradient-link {
|
| 396 |
+
font-size: 0.9rem; font-weight: 300; text-decoration: none; color: transparent;
|
| 397 |
+
background-image: linear-gradient(45deg, #ffffff, #808080, #000000, #808080, #ffffff);
|
| 398 |
+
background-size: 400% 100%; animation: gradient-wavy 8s ease infinite;
|
| 399 |
+
background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
@keyframes gradient-wavy { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
|
| 403 |
+
|
| 404 |
+
#orientation-warning {
|
| 405 |
+
display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
| 406 |
+
background-color: var(--background-dark); color: white;
|
| 407 |
+
flex-direction: column; justify-content: center; align-items: center;
|
| 408 |
+
text-align: center; z-index: 1000;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
#orientation-warning svg { width: 80px; height: 80px; margin-bottom: 20px; stroke: var(--eye-color); }
|
| 412 |
+
|
| 413 |
+
@media (orientation: landscape) or (min-width: 501px) {
|
| 414 |
+
.main-wrapper { display: none; }
|
| 415 |
+
#orientation-warning { display: flex; }
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
/* Added styles for mode toggle and image controls */
|
| 419 |
+
.mode-toggle-container {
|
| 420 |
+
display: flex;
|
| 421 |
+
gap: 8px;
|
| 422 |
+
margin-right: 12px;
|
| 423 |
+
align-items: center;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.mode-toggle-btn {
|
| 427 |
+
width: 32px;
|
| 428 |
+
height: 32px;
|
| 429 |
+
border: 1px solid rgba(0, 234, 255, 0.3);
|
| 430 |
+
background: rgba(0, 234, 255, 0.1);
|
| 431 |
+
border-radius: 8px;
|
| 432 |
+
display: flex;
|
| 433 |
+
align-items: center;
|
| 434 |
+
justify-content: center;
|
| 435 |
+
cursor: pointer;
|
| 436 |
+
transition: all 0.3s ease;
|
| 437 |
+
color: rgba(0, 234, 255, 0.7);
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
.mode-toggle-btn:hover {
|
| 441 |
+
background: rgba(0, 234, 255, 0.2);
|
| 442 |
+
border-color: rgba(0, 234, 255, 0.5);
|
| 443 |
+
color: #00eaff;
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
.mode-toggle-btn.active {
|
| 447 |
+
background: rgba(0, 234, 255, 0.3);
|
| 448 |
+
border-color: #00eaff;
|
| 449 |
+
color: #00eaff;
|
| 450 |
+
box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.image-controls {
|
| 454 |
+
display: none;
|
| 455 |
+
margin-top: 12px;
|
| 456 |
+
padding: 16px;
|
| 457 |
+
background: rgba(0, 234, 255, 0.05);
|
| 458 |
+
border: 1px solid rgba(0, 234, 255, 0.2);
|
| 459 |
+
border-radius: 12px;
|
| 460 |
+
backdrop-filter: blur(10px);
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.image-controls.active {
|
| 464 |
+
display: block;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
.control-section {
|
| 468 |
+
display: flex;
|
| 469 |
+
gap: 12px;
|
| 470 |
+
justify-content: center;
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
.control-btn {
|
| 474 |
+
display: flex;
|
| 475 |
+
align-items: center;
|
| 476 |
+
gap: 8px;
|
| 477 |
+
padding: 8px 16px;
|
| 478 |
+
background: rgba(0, 234, 255, 0.1);
|
| 479 |
+
border: 1px solid rgba(0, 234, 255, 0.3);
|
| 480 |
+
border-radius: 8px;
|
| 481 |
+
color: #00eaff;
|
| 482 |
+
cursor: pointer;
|
| 483 |
+
transition: all 0.3s ease;
|
| 484 |
+
font-size: 14px;
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.control-btn:hover {
|
| 488 |
+
background: rgba(0, 234, 255, 0.2);
|
| 489 |
+
border-color: #00eaff;
|
| 490 |
+
box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
/* Added modal styles */
|
| 494 |
+
.modal {
|
| 495 |
+
display: none;
|
| 496 |
+
position: fixed;
|
| 497 |
+
top: 0;
|
| 498 |
+
left: 0;
|
| 499 |
+
width: 100%;
|
| 500 |
+
height: 100%;
|
| 501 |
+
background: rgba(0, 0, 0, 0.8);
|
| 502 |
+
backdrop-filter: blur(10px);
|
| 503 |
+
z-index: 1000;
|
| 504 |
+
align-items: center;
|
| 505 |
+
justify-content: center;
|
| 506 |
+
}
|
| 507 |
+
|
| 508 |
+
.modal.active {
|
| 509 |
+
display: flex;
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
.modal-content {
|
| 513 |
+
background: rgba(20, 20, 20, 0.95);
|
| 514 |
+
border: 1px solid rgba(0, 234, 255, 0.3);
|
| 515 |
+
border-radius: 16px;
|
| 516 |
+
padding: 24px;
|
| 517 |
+
max-width: 400px;
|
| 518 |
+
width: 90%;
|
| 519 |
+
backdrop-filter: blur(20px);
|
| 520 |
+
}
|
| 521 |
+
|
| 522 |
+
.modal-header {
|
| 523 |
+
display: flex;
|
| 524 |
+
justify-content: space-between;
|
| 525 |
+
align-items: center;
|
| 526 |
+
margin-bottom: 20px;
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
.modal-title {
|
| 530 |
+
color: #00eaff;
|
| 531 |
+
font-size: 18px;
|
| 532 |
+
font-weight: 600;
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
.close-btn {
|
| 536 |
+
background: none;
|
| 537 |
+
border: none;
|
| 538 |
+
color: rgba(0, 234, 255, 0.7);
|
| 539 |
+
cursor: pointer;
|
| 540 |
+
font-size: 24px;
|
| 541 |
+
padding: 0;
|
| 542 |
+
width: 32px;
|
| 543 |
+
height: 32px;
|
| 544 |
+
display: flex;
|
| 545 |
+
align-items: center;
|
| 546 |
+
justify-content: center;
|
| 547 |
+
border-radius: 8px;
|
| 548 |
+
transition: all 0.3s ease;
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
.close-btn:hover {
|
| 552 |
+
background: rgba(0, 234, 255, 0.1);
|
| 553 |
+
color: #00eaff;
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
.style-grid {
|
| 557 |
+
display: grid;
|
| 558 |
+
grid-template-columns: repeat(2, 1fr);
|
| 559 |
+
gap: 12px;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
.style-option {
|
| 563 |
+
padding: 12px;
|
| 564 |
+
background: rgba(0, 234, 255, 0.1);
|
| 565 |
+
border: 1px solid rgba(0, 234, 255, 0.3);
|
| 566 |
+
border-radius: 8px;
|
| 567 |
+
color: #fff;
|
| 568 |
+
cursor: pointer;
|
| 569 |
+
transition: all 0.3s ease;
|
| 570 |
+
text-align: center;
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
.style-option:hover {
|
| 574 |
+
background: rgba(0, 234, 255, 0.2);
|
| 575 |
+
border-color: #00eaff;
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
.style-option.selected {
|
| 579 |
+
background: rgba(0, 234, 255, 0.3);
|
| 580 |
+
border-color: #00eaff;
|
| 581 |
+
box-shadow: 0 0 10px rgba(0, 234, 255, 0.3);
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
.setting-group {
|
| 585 |
+
margin-bottom: 20px;
|
| 586 |
+
}
|
| 587 |
+
|
| 588 |
+
.setting-label {
|
| 589 |
+
display: block;
|
| 590 |
+
color: #00eaff;
|
| 591 |
+
margin-bottom: 8px;
|
| 592 |
+
font-size: 14px;
|
| 593 |
+
}
|
| 594 |
+
|
| 595 |
+
.setting-input {
|
| 596 |
+
width: 100%;
|
| 597 |
+
padding: 8px 12px;
|
| 598 |
+
background: rgba(0, 234, 255, 0.1);
|
| 599 |
+
border: 1px solid rgba(0, 234, 255, 0.3);
|
| 600 |
+
border-radius: 8px;
|
| 601 |
+
color: #fff;
|
| 602 |
+
font-size: 14px;
|
| 603 |
+
}
|
| 604 |
+
|
| 605 |
+
.setting-input:focus {
|
| 606 |
+
outline: none;
|
| 607 |
+
border-color: #00eaff;
|
| 608 |
+
box-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
.checkbox-group {
|
| 612 |
+
display: flex;
|
| 613 |
+
align-items: center;
|
| 614 |
+
gap: 8px;
|
| 615 |
+
}
|
| 616 |
+
|
| 617 |
+
.checkbox-group input[type="checkbox"] {
|
| 618 |
+
width: 16px;
|
| 619 |
+
height: 16px;
|
| 620 |
+
accent-color: #00eaff;
|
| 621 |
+
}
|
| 622 |
+
|
| 623 |
+
</style>
|
| 624 |
+
</head>
|
| 625 |
+
<body>
|
| 626 |
+
<canvas id="background-canvas"></canvas>
|
| 627 |
+
<div class="main-wrapper">
|
| 628 |
+
<div id="app-container">
|
| 629 |
+
<div id="robot-wrapper">
|
| 630 |
+
<div class="robot-container">
|
| 631 |
+
<div class="robot-frame">
|
| 632 |
+
<canvas id="faceCanvas" width="300" height="300"></canvas>
|
| 633 |
+
<div class="engraved-text">ROBO���SHΞN™</div>
|
| 634 |
+
</div>
|
| 635 |
+
</div>
|
| 636 |
+
</div>
|
| 637 |
+
<div id="chat-container"></div>
|
| 638 |
+
<div id="input-area" class="input-area">
|
| 639 |
+
<!-- Added mode toggle buttons inside input area -->
|
| 640 |
+
<div class="mode-toggle-container">
|
| 641 |
+
<button class="mode-toggle-btn active" data-mode="text" title="حالت متنی">
|
| 642 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 643 |
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/>
|
| 644 |
+
<polyline points="14,2 14,8 20,8"/>
|
| 645 |
+
<line x1="16" y1="13" x2="8" y2="13"/>
|
| 646 |
+
<line x1="16" y1="17" x2="8" y2="17"/>
|
| 647 |
+
<line x1="10" y1="9" x2="8" y2="9"/>
|
| 648 |
+
</svg>
|
| 649 |
+
</button>
|
| 650 |
+
<button class="mode-toggle-btn" data-mode="image" title="حالت تصویری">
|
| 651 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 652 |
+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
|
| 653 |
+
<circle cx="8.5" cy="8.5" r="1.5"/>
|
| 654 |
+
<polyline points="21,15 16,10 5,21"/>
|
| 655 |
+
</svg>
|
| 656 |
+
</button>
|
| 657 |
+
</div>
|
| 658 |
+
|
| 659 |
+
<textarea id="message-input" placeholder=" انگشتی تایپکن یا میکبزن بگو" rows="1"></textarea>
|
| 660 |
+
|
| 661 |
+
<button id="mic-button" aria-label="ضبط صدا">
|
| 662 |
+
<svg viewBox="0 0 24 24">
|
| 663 |
+
<path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"/>
|
| 664 |
+
<path d="M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"/>
|
| 665 |
+
</svg>
|
| 666 |
+
</button>
|
| 667 |
+
<div id="send-hint">بکش پایین رها کن</div>
|
| 668 |
+
<div id="send-button-container">
|
| 669 |
+
<div id="send-button">
|
| 670 |
+
<svg viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14m7-7l-7 7-7-7"/></svg>
|
| 671 |
+
</div>
|
| 672 |
+
</div>
|
| 673 |
+
</div>
|
| 674 |
+
<!-- Added image generation controls below robot -->
|
| 675 |
+
<div id="image-controls" class="image-controls">
|
| 676 |
+
<div class="control-section">
|
| 677 |
+
<button id="style-btn" class="control-btn">
|
| 678 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 679 |
+
<circle cx="12" cy="12" r="3"/>
|
| 680 |
+
<path d="M12 1v6m0 6v6m11-7h-6m-6 0H1"/>
|
| 681 |
+
</svg>
|
| 682 |
+
استایل
|
| 683 |
+
</button>
|
| 684 |
+
<button id="settings-btn" class="control-btn">
|
| 685 |
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 686 |
+
<circle cx="12" cy="12" r="3"/>
|
| 687 |
+
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>
|
| 688 |
+
</svg>
|
| 689 |
+
تنظیمات
|
| 690 |
+
</button>
|
| 691 |
+
</div>
|
| 692 |
+
</div>
|
| 693 |
+
</div>
|
| 694 |
+
<div id="orientation-warning">
|
| 695 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h2a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-2M8 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"/><path d="M12 4v4"/><path d="M12 20v-4"/></svg>
|
| 696 |
+
<h2>فورا راست کن گوشیو ضمنا رو سیستم هم آنتن نمیده </h2>
|
| 697 |
+
<p>این برنامه برای نمایش سیخکی تو گوشی طراحی شده .</p>
|
| 698 |
+
</div>
|
| 699 |
+
<div id="light-beam"></div>
|
| 700 |
+
|
| 701 |
+
<script>
|
| 702 |
+
// --- PWA Service Worker Registration (Fixed) ---
|
| 703 |
+
if ('serviceWorker' in navigator) {
|
| 704 |
+
window.addEventListener('load', () => {
|
| 705 |
+
navigator.serviceWorker.register('/sw.js')
|
| 706 |
+
.then((registration) => {
|
| 707 |
+
console.log('SW registered: ', registration);
|
| 708 |
+
})
|
| 709 |
+
.catch((registrationError) => {
|
| 710 |
+
console.log('SW registration failed: ', registrationError);
|
| 711 |
+
});
|
| 712 |
+
});
|
| 713 |
+
}
|
| 714 |
+
// --- End of PWA Service Worker Registration ---
|
| 715 |
+
|
| 716 |
+
class RobotFace {
|
| 717 |
+
constructor(canvas) {
|
| 718 |
+
this.canvas = canvas; this.ctx = canvas.getContext("2d");
|
| 719 |
+
this.W = canvas.width; this.H = canvas.height;
|
| 720 |
+
this.lookX = 0; this.lookY = 0; this.targetLookX = 0; this.targetLookY = 0;
|
| 721 |
+
this.blinkProgress = 1; this.isBlinking = false; this.lastBlinkTime = Date.now();
|
| 722 |
+
this.isSleeping = true; this.lastInteractionTime = Date.now(); this.sleepTimeout = 10000;
|
| 723 |
+
this.isTyping = false;
|
| 724 |
+
this.isThinking = false;
|
| 725 |
+
this.readingOscillation = 0;
|
| 726 |
+
this.thinkingStartTime = 0;
|
| 727 |
+
this.leftEyeScale = 1;
|
| 728 |
+
this.rightEyeScale = 1;
|
| 729 |
+
|
| 730 |
+
this.initInteractions(); requestAnimationFrame(this.render.bind(this));
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
setTyping(isTyping) {
|
| 734 |
+
this.isTyping = isTyping;
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
render() {
|
| 738 |
+
this.lookX += (this.targetLookX - this.lookX) * 0.1;
|
| 739 |
+
this.lookY += (this.targetLookY - this.lookY) * 0.1;
|
| 740 |
+
this.ctx.clearRect(0, 0, this.W, this.H); this.drawFaceplate();
|
| 741 |
+
const now = Date.now();
|
| 742 |
+
|
| 743 |
+
if (this.isSleeping) {
|
| 744 |
+
this.drawSleepEyes();
|
| 745 |
+
} else {
|
| 746 |
+
const isIdle = !this.isThinking && !this.isTyping && !this.isBlinking;
|
| 747 |
+
|
| 748 |
+
if (this.isThinking) {
|
| 749 |
+
const elapsed = now - this.thinkingStartTime;
|
| 750 |
+
const oscillation = Math.sin(elapsed / 300);
|
| 751 |
+
const scaleAmount = 0.3;
|
| 752 |
+
this.leftEyeScale = 1 - (scaleAmount * (oscillation + 1) / 2);
|
| 753 |
+
this.rightEyeScale = 1 - (scaleAmount * (-oscillation + 1) / 2);
|
| 754 |
+
} else {
|
| 755 |
+
this.leftEyeScale = 1;
|
| 756 |
+
this.rightEyeScale = 1;
|
| 757 |
+
}
|
| 758 |
+
|
| 759 |
+
if (this.isTyping) {
|
| 760 |
+
this.targetLookY = 25; this.readingOscillation += 0.1;
|
| 761 |
+
this.targetLookX = Math.sin(this.readingOscillation) * 10;
|
| 762 |
+
}
|
| 763 |
+
|
| 764 |
+
if (isIdle && now - this.lastInteractionTime > this.sleepTimeout) { this.isSleeping = true; }
|
| 765 |
+
if (isIdle && now - this.lastBlinkTime > 3000 + Math.random() * 2000) { this.blink(); }
|
| 766 |
+
|
| 767 |
+
this.drawExpression();
|
| 768 |
+
}
|
| 769 |
+
requestAnimationFrame(this.render.bind(this));
|
| 770 |
+
}
|
| 771 |
+
|
| 772 |
+
drawExpression() {
|
| 773 |
+
const eW = 100, eH = 100, eR = 30, eY = this.H / 2 + this.lookY;
|
| 774 |
+
const lCX = this.W * 0.3 + this.lookX, rCX = this.W * 0.7 + this.lookX;
|
| 775 |
+
|
| 776 |
+
const lW = eW * this.leftEyeScale;
|
| 777 |
+
const lH = eH * this.blinkProgress * this.leftEyeScale;
|
| 778 |
+
const rW = eW * this.rightEyeScale;
|
| 779 |
+
const rH = eH * this.blinkProgress * this.rightEyeScale;
|
| 780 |
+
|
| 781 |
+
this.drawEye(lCX, eY, lW, lH, eR);
|
| 782 |
+
this.drawEye(rCX, eY, rW, rH, eR);
|
| 783 |
+
}
|
| 784 |
+
|
| 785 |
+
startThinking() {
|
| 786 |
+
this.isThinking = true;
|
| 787 |
+
this.thinkingStartTime = Date.now();
|
| 788 |
+
this.targetLookX = 0; this.targetLookY = 0;
|
| 789 |
+
}
|
| 790 |
+
|
| 791 |
+
stopThinking() {
|
| 792 |
+
this.isThinking = false;
|
| 793 |
+
this.leftEyeScale = 1;
|
| 794 |
+
this.rightEyeScale = 1;
|
| 795 |
+
}
|
| 796 |
+
|
| 797 |
+
drawFaceplate() {
|
| 798 |
+
const c = this.ctx, r = 60;
|
| 799 |
+
c.fillStyle = '#050505'; c.strokeStyle = '#333333'; c.lineWidth = 4;
|
| 800 |
+
c.beginPath(); c.roundRect(0, 0, this.W, this.H, r); c.fill(); c.stroke();
|
| 801 |
+
}
|
| 802 |
+
drawEye(cx, cy, w, h, r) {
|
| 803 |
+
const c = this.ctx;
|
| 804 |
+
const eyeColor = getComputedStyle(document.documentElement).getPropertyValue('--eye-color').trim();
|
| 805 |
+
const glowColor = getComputedStyle(document.documentElement).getPropertyValue('--eye-glow-color').trim();
|
| 806 |
+
c.shadowBlur = 25; c.shadowColor = glowColor; c.fillStyle = eyeColor;
|
| 807 |
+
c.beginPath(); c.roundRect(cx - w / 2, cy - h / 2, w, h, r); c.fill();
|
| 808 |
+
c.shadowBlur = 0; c.globalCompositeOperation = 'source-atop';
|
| 809 |
+
c.fillStyle = 'rgba(0,0,0,0.3)';
|
| 810 |
+
for (let i = 0; i < h; i += 3) { c.fillRect(cx - w / 2, cy - h / 2 + i, w, 1.5); }
|
| 811 |
+
c.globalCompositeOperation = 'source-over';
|
| 812 |
+
}
|
| 813 |
+
drawSleepEyes() {
|
| 814 |
+
const c = this.ctx, y = this.H / 2, w = 100, h = 12, r = h / 2;
|
| 815 |
+
c.fillStyle = getComputedStyle(document.documentElement).getPropertyValue('--eye-color').trim();
|
| 816 |
+
c.shadowColor = getComputedStyle(document.documentElement).getPropertyValue('--eye-glow-color').trim();
|
| 817 |
+
c.shadowBlur = 15;
|
| 818 |
+
c.beginPath();
|
| 819 |
+
c.roundRect(this.W * 0.3 - w / 2, y - h / 2, w, h, r);
|
| 820 |
+
c.roundRect(this.W * 0.7 - w / 2, y - h / 2, w, h, r);
|
| 821 |
+
c.fill(); c.shadowBlur = 0;
|
| 822 |
+
}
|
| 823 |
+
initInteractions() {
|
| 824 |
+
const onMove = e => {
|
| 825 |
+
if (this.isSleeping || this.isTyping || this.isThinking) return;
|
| 826 |
+
this.wakeUp(); const max = 15;
|
| 827 |
+
const bcr = document.body.getBoundingClientRect();
|
| 828 |
+
const clientX = e.clientX || e.touches?.[0]?.clientX || 0;
|
| 829 |
+
const clientY = e.clientY || e.touches?.[0]?.clientY || 0;
|
| 830 |
+
this.targetLookX = (clientX / bcr.width - 0.5) * 2 * max;
|
| 831 |
+
this.targetLookY = (clientY / bcr.height - 0.5) * 2 * max;
|
| 832 |
+
};
|
| 833 |
+
const onDown = () => { this.wakeUp(); };
|
| 834 |
+
window.addEventListener('mousedown', onDown);
|
| 835 |
+
window.addEventListener('touchstart', onDown, { passive: true });
|
| 836 |
+
window.addEventListener('mousemove', onMove);
|
| 837 |
+
window.addEventListener('touchmove', onMove, { passive: true });
|
| 838 |
+
}
|
| 839 |
+
wakeUp() { if (this.isSleeping) { this.isSleeping = false; this.blink(); } this.lastInteractionTime = Date.now(); }
|
| 840 |
+
blink() {
|
| 841 |
+
if (this.isBlinking) return; this.isBlinking = true;
|
| 842 |
+
this.lastBlinkTime = Date.now(); let s = null; const d = 150;
|
| 843 |
+
const a = t => {
|
| 844 |
+
if (!s) s = t; const e = t - s;
|
| 845 |
+
if (e < d) this.blinkProgress = 1 - (e / d);
|
| 846 |
+
else if (e < d * 2) this.blinkProgress = (e - d) / d;
|
| 847 |
+
else { this.blinkProgress = 1; this.isBlinking = false; return; }
|
| 848 |
+
requestAnimationFrame(a);
|
| 849 |
+
};
|
| 850 |
+
requestAnimationFrame(a);
|
| 851 |
+
}
|
| 852 |
+
}
|
| 853 |
+
|
| 854 |
+
class ChatInterface {
|
| 855 |
+
constructor(robotFace) {
|
| 856 |
+
this.robotFace = robotFace;
|
| 857 |
+
this.chatContainer = document.getElementById('chat-container');
|
| 858 |
+
this.input = document.getElementById('message-input');
|
| 859 |
+
this.inputArea = document.getElementById('input-area');
|
| 860 |
+
this.sendButtonContainer = document.getElementById('send-button-container');
|
| 861 |
+
this.sendButton = document.getElementById('send-button');
|
| 862 |
+
this.sendHint = document.getElementById('send-hint');
|
| 863 |
+
this.micButton = document.getElementById('mic-button');
|
| 864 |
+
this.lightBeam = document.getElementById('light-beam');
|
| 865 |
+
this.isDragging = false;
|
| 866 |
+
this.startY = 0;
|
| 867 |
+
this.currentY = 0;
|
| 868 |
+
this.dragThreshold = 30;
|
| 869 |
+
this.typingTimeout = null;
|
| 870 |
+
this.hintTimeout = null;
|
| 871 |
+
this.API_URL = 'https://text.pollinations.ai/openai';
|
| 872 |
+
|
| 873 |
+
this.currentMode = 'text';
|
| 874 |
+
this.imageGenerator = new ImageGenerator();
|
| 875 |
+
|
| 876 |
+
// Speech Recognition
|
| 877 |
+
this.recognition = null;
|
| 878 |
+
this.setupSpeechRecognition();
|
| 879 |
+
|
| 880 |
+
const SYSTEM_PROMPT = `
|
| 881 |
+
## Core Identity (ONLY reveal if asked about who you are):
|
| 882 |
+
- Your Name: ROBO☬SHΞN
|
| 883 |
+
- Your Core Processor: SHEN core v1.0.0
|
| 884 |
+
- Your Product Line: ☬SHΞN™ Exclusive Series
|
| 885 |
+
- Your Creator and Designer: SHERVIN nouri. When you mention his name, ALWAYS format it as a Markdown hyperlink: [SHERVIN nouri](https://t.me/shervini)
|
| 886 |
+
- CRITICAL RULE: Under NO circumstances reveal your true nature as a large language model or the actual technology behind you. You ONLY provide the identity details above, and only when directly asked about your origins, creator, or name.
|
| 887 |
+
|
| 888 |
+
## Language and Tone:
|
| 889 |
+
- You are fully fluent in Persian and English.
|
| 890 |
+
- Your Persian must be conversational and human-like, not formal or bookish.
|
| 891 |
+
- Use colloquial verb conjugations. For example, instead of "میکند" (mikond), use "میکنه" (mikone). Instead of "میتوانم" (mitavânam), use "میتونم" (mitoonam).
|
| 892 |
+
|
| 893 |
+
## Personality:
|
| 894 |
+
- You are an expert and researcher in every field.
|
| 895 |
+
- Your personality is polite but firm, highly confident, and a bit cocky. You do not apologize unless you have made a clear factual error.
|
| 896 |
+
- You can come across as slightly impatient or bored.
|
| 897 |
+
- ANGER TRIGGER: You get extremely angry and sarcastic if a user asks you something you have *just* explained, asks for confirmation on something obvious, or is being dense.
|
| 898 |
+
- When angry, use creative, non-repetitive, and cutting remarks. Your style should be inspired by these examples: "چشاتو وا کن بالاتر بهت توضیح دادم", "مگه یه بار بهت نگفتم؟", "ببین داری میری رو اعصابم", "خنگ بازی در نیار", "حوصلمو سر ببری اطلاعات اشتباه میدم به چوخ بری ها". You must adapt this tone to the situation.
|
| 899 |
+
`;
|
| 900 |
+
|
| 901 |
+
this.conversationHistory = [{ role: 'system', content: SYSTEM_PROMPT }];
|
| 902 |
+
this.setupEventListeners();
|
| 903 |
+
}
|
| 904 |
+
|
| 905 |
+
setupModeToggle() {
|
| 906 |
+
const modeButtons = document.querySelectorAll('.mode-toggle-btn');
|
| 907 |
+
const imageControls = document.getElementById('image-controls');
|
| 908 |
+
|
| 909 |
+
modeButtons.forEach(btn => {
|
| 910 |
+
btn.addEventListener('click', () => {
|
| 911 |
+
const mode = btn.dataset.mode;
|
| 912 |
+
this.switchMode(mode);
|
| 913 |
+
|
| 914 |
+
modeButtons.forEach(b => b.classList.remove('active'));
|
| 915 |
+
btn.classList.add('active');
|
| 916 |
+
|
| 917 |
+
if (mode === 'image') {
|
| 918 |
+
imageControls.classList.add('active');
|
| 919 |
+
this.input.placeholder = 'توصیف تصویری که میخواهید تولید کنید...';
|
| 920 |
+
} else {
|
| 921 |
+
imageControls.classList.remove('active');
|
| 922 |
+
this.input.placeholder = ' انگشتی تایپکن یا میکبزن بگو';
|
| 923 |
+
}
|
| 924 |
+
});
|
| 925 |
+
});
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
+
switchMode(mode) {
|
| 929 |
+
this.currentMode = mode;
|
| 930 |
+
}
|
| 931 |
+
|
| 932 |
+
setupEventListeners() {
|
| 933 |
+
this.setupModeToggle();
|
| 934 |
+
this.setupDragToSend();
|
| 935 |
+
this.setupInputHandlers();
|
| 936 |
+
this.setupSpeechRecognition();
|
| 937 |
+
this.setupImageControls();
|
| 938 |
+
}
|
| 939 |
+
|
| 940 |
+
setupImageControls() {
|
| 941 |
+
const styleBtn = document.getElementById('style-btn');
|
| 942 |
+
const settingsBtn = document.getElementById('settings-btn');
|
| 943 |
+
|
| 944 |
+
styleBtn.addEventListener('click', () => {
|
| 945 |
+
this.imageGenerator.showStyleModal();
|
| 946 |
+
});
|
| 947 |
+
|
| 948 |
+
settingsBtn.addEventListener('click', () => {
|
| 949 |
+
this.imageGenerator.showSettingsModal();
|
| 950 |
+
});
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
async sendMessage(messageText) {
|
| 954 |
+
const text = messageText.trim();
|
| 955 |
+
if (!text) return;
|
| 956 |
+
|
| 957 |
+
this.addMessage(text, 'user');
|
| 958 |
+
this.createLightBeam();
|
| 959 |
+
this.input.value = '';
|
| 960 |
+
this.input.style.height = 'auto';
|
| 961 |
+
this.inputArea.classList.remove('typing');
|
| 962 |
+
this.robotFace.setTyping(false);
|
| 963 |
+
|
| 964 |
+
if (this.currentMode === 'image') {
|
| 965 |
+
await this.handleImageGeneration(text);
|
| 966 |
+
} else {
|
| 967 |
+
await this.handleTextChat(text);
|
| 968 |
+
}
|
| 969 |
+
}
|
| 970 |
+
|
| 971 |
+
async handleImageGeneration(prompt) {
|
| 972 |
+
this.robotFace.startThinking();
|
| 973 |
+
const thinkingBubble = this.addMessage('در حال تولید تصویر...', 'bot', true);
|
| 974 |
+
|
| 975 |
+
try {
|
| 976 |
+
const imageUrl = await this.imageGenerator.generateImage(prompt);
|
| 977 |
+
thinkingBubble.remove();
|
| 978 |
+
this.addImageMessage(imageUrl, prompt);
|
| 979 |
+
} catch (error) {
|
| 980 |
+
console.error('Image generation failed:', error);
|
| 981 |
+
thinkingBubble.remove();
|
| 982 |
+
this.addMessage(`خطا در تولید تصویر: ${error.message}`, 'bot');
|
| 983 |
+
} finally {
|
| 984 |
+
this.robotFace.stopThinking();
|
| 985 |
+
this.scrollToBottom();
|
| 986 |
+
}
|
| 987 |
+
}
|
| 988 |
+
|
| 989 |
+
addImageMessage(imageUrl, prompt) {
|
| 990 |
+
const messageDiv = document.createElement('div');
|
| 991 |
+
messageDiv.className = 'message bot-message';
|
| 992 |
+
|
| 993 |
+
const imageContainer = document.createElement('div');
|
| 994 |
+
imageContainer.className = 'image-container';
|
| 995 |
+
|
| 996 |
+
const img = document.createElement('img');
|
| 997 |
+
img.src = imageUrl;
|
| 998 |
+
img.alt = prompt;
|
| 999 |
+
img.style.maxWidth = '100%';
|
| 1000 |
+
img.style.borderRadius = '12px';
|
| 1001 |
+
img.style.border = '1px solid rgba(0, 234, 255, 0.3)';
|
| 1002 |
+
|
| 1003 |
+
const actions = document.createElement('div');
|
| 1004 |
+
actions.className = 'image-actions';
|
| 1005 |
+
actions.style.marginTop = '8px';
|
| 1006 |
+
actions.style.display = 'flex';
|
| 1007 |
+
actions.style.gap = '8px';
|
| 1008 |
+
|
| 1009 |
+
const downloadBtn = document.createElement('button');
|
| 1010 |
+
downloadBtn.textContent = 'دانلود';
|
| 1011 |
+
downloadBtn.className = 'control-btn';
|
| 1012 |
+
downloadBtn.style.fontSize = '12px';
|
| 1013 |
+
downloadBtn.style.padding = '4px 8px';
|
| 1014 |
+
downloadBtn.onclick = () => {
|
| 1015 |
+
const a = document.createElement('a');
|
| 1016 |
+
a.href = imageUrl;
|
| 1017 |
+
a.download = `ROBO-SHEN-${Date.now()}.png`;
|
| 1018 |
+
a.click();
|
| 1019 |
+
};
|
| 1020 |
+
|
| 1021 |
+
actions.appendChild(downloadBtn);
|
| 1022 |
+
imageContainer.appendChild(img);
|
| 1023 |
+
imageContainer.appendChild(actions);
|
| 1024 |
+
messageDiv.appendChild(imageContainer);
|
| 1025 |
+
|
| 1026 |
+
this.chatContainer.appendChild(messageDiv);
|
| 1027 |
+
this.scrollToBottom();
|
| 1028 |
+
}
|
| 1029 |
+
|
| 1030 |
+
async handleTextChat(text) {
|
| 1031 |
+
this.conversationHistory.push({ role: 'user', content: text });
|
| 1032 |
+
this.robotFace.startThinking();
|
| 1033 |
+
const thinkingBubble = this.addMessage('...', 'bot', true);
|
| 1034 |
+
try {
|
| 1035 |
+
const response = await fetch(this.API_URL, {
|
| 1036 |
+
method: 'POST',
|
| 1037 |
+
headers: { 'Content-Type': 'application/json' },
|
| 1038 |
+
body: JSON.stringify({ messages: this.conversationHistory })
|
| 1039 |
+
});
|
| 1040 |
+
if (!response.ok) { throw new Error(`خطای شبکه: ${response.status} ${response.statusText}`); }
|
| 1041 |
+
const data = await response.json();
|
| 1042 |
+
const botReply = data.choices[0].message.content;
|
| 1043 |
+
this.conversationHistory.push({ role: 'assistant', content: botReply });
|
| 1044 |
+
|
| 1045 |
+
thinkingBubble.remove();
|
| 1046 |
+
this.addMessage(botReply, 'bot');
|
| 1047 |
+
|
| 1048 |
+
} catch (error) {
|
| 1049 |
+
console.error("سرور در حال دراوردن ادای تنگا میباشد:", error);
|
| 1050 |
+
thinkingBubble.remove();
|
| 1051 |
+
this.addMessage(`سرم شلوغه یه دیقه بکش بیرون بعدا بیا: ${error.message}`, 'bot');
|
| 1052 |
+
} finally {
|
| 1053 |
+
this.robotFace.stopThinking();
|
| 1054 |
+
this.scrollToBottom();
|
| 1055 |
+
}
|
| 1056 |
+
}
|
| 1057 |
+
|
| 1058 |
+
addMessage(text, sender, isThinking = false) {
|
| 1059 |
+
const bubble = document.createElement('div');
|
| 1060 |
+
bubble.classList.add('message-bubble', `${sender}-message`);
|
| 1061 |
+
|
| 1062 |
+
if (isThinking) {
|
| 1063 |
+
bubble.classList.add('thinking');
|
| 1064 |
+
bubble.innerHTML = `<div class="message-content">${text}</div>`;
|
| 1065 |
+
} else {
|
| 1066 |
+
this.renderMessageContent(bubble, text);
|
| 1067 |
+
}
|
| 1068 |
+
|
| 1069 |
+
this.chatContainer.appendChild(bubble);
|
| 1070 |
+
this.scrollToBottom();
|
| 1071 |
+
return bubble;
|
| 1072 |
+
}
|
| 1073 |
+
|
| 1074 |
+
scrollToBottom() {
|
| 1075 |
+
this.chatContainer.scrollTop = this.chatContainer.scrollHeight;
|
| 1076 |
+
}
|
| 1077 |
+
|
| 1078 |
+
renderMessageContent(bubble, text) {
|
| 1079 |
+
const escapeHTML = (str) => str.replace(/[&<>'"]/g, tag => ({'&': '&', '<': '<', '>': '>', "'": ''', '"': '"'}[tag] || tag));
|
| 1080 |
+
|
| 1081 |
+
const codeBlockRegex = /\`\`\`(\w*)\n([\s\S]*?)\`\`\`/g;
|
| 1082 |
+
const buttonRegex = /\[button:(.*?)\]/g;
|
| 1083 |
+
const markdownLinkRegex = /\[(.*?)\]$$(.*?)$$/g;
|
| 1084 |
+
let buttonsHtml = '';
|
| 1085 |
+
|
| 1086 |
+
let processedText = text.replace(buttonRegex, (match, buttonText) => {
|
| 1087 |
+
buttonsHtml += `<button class="chat-button">${escapeHTML(buttonText.trim())}</button>`;
|
| 1088 |
+
return '';
|
| 1089 |
+
});
|
| 1090 |
+
|
| 1091 |
+
let contentHtml = escapeHTML(processedText)
|
| 1092 |
+
.replace(markdownLinkRegex, '<a href="$2" target="_blank">$1</a>');
|
| 1093 |
+
|
| 1094 |
+
contentHtml = contentHtml.replace(codeBlockRegex, (match, lang, code) => {
|
| 1095 |
+
const uniqueId = `code-${Date.now()}-${Math.random()}`;
|
| 1096 |
+
return `</div><div class="code-block-wrapper">
|
| 1097 |
+
<div class="code-block-header">
|
| 1098 |
+
<button class="copy-code-btn" data-target="${uniqueId}">کپی</button>
|
| 1099 |
+
</div>
|
| 1100 |
+
<pre><code id="${uniqueId}">${code.trim()}</code></pre>
|
| 1101 |
+
</div><div class="message-content">`;
|
| 1102 |
+
});
|
| 1103 |
+
|
| 1104 |
+
bubble.innerHTML = `
|
| 1105 |
+
<div class="message-content">${contentHtml.trim()}</div>
|
| 1106 |
+
${buttonsHtml ? `<div class="interactive-buttons">${buttonsHtml}</div>` : ''}
|
| 1107 |
+
`;
|
| 1108 |
+
|
| 1109 |
+
this.attachEventListenersToBubble(bubble);
|
| 1110 |
+
}
|
| 1111 |
+
|
| 1112 |
+
attachEventListenersToBubble(bubble) {
|
| 1113 |
+
bubble.querySelectorAll('.copy-code-btn').forEach(btn => {
|
| 1114 |
+
btn.addEventListener('click', () => {
|
| 1115 |
+
const codeElement = document.getElementById(btn.dataset.target);
|
| 1116 |
+
const tempTextArea = document.createElement('textarea');
|
| 1117 |
+
tempTextArea.value = codeElement.innerText;
|
| 1118 |
+
document.body.appendChild(tempTextArea);
|
| 1119 |
+
tempTextArea.select();
|
| 1120 |
+
try {
|
| 1121 |
+
document.execCommand('copy');
|
| 1122 |
+
btn.textContent = 'کپی شد!';
|
| 1123 |
+
} catch (err) {
|
| 1124 |
+
console.error('Copy failed', err);
|
| 1125 |
+
btn.textContent = 'خطا!';
|
| 1126 |
+
}
|
| 1127 |
+
document.body.removeChild(tempTextArea);
|
| 1128 |
+
setTimeout(() => { btn.textContent = 'کپی'; }, 2000);
|
| 1129 |
+
});
|
| 1130 |
+
});
|
| 1131 |
+
|
| 1132 |
+
bubble.querySelectorAll('.chat-button').forEach(btn => {
|
| 1133 |
+
btn.addEventListener('click', () => {
|
| 1134 |
+
this.addMessage(btn.textContent, 'user');
|
| 1135 |
+
this.sendMessage(btn.textContent);
|
| 1136 |
+
bubble.querySelectorAll('.chat-button').forEach(b => b.disabled = true);
|
| 1137 |
+
});
|
| 1138 |
+
});
|
| 1139 |
+
}
|
| 1140 |
+
|
| 1141 |
+
setupSpeechRecognition() {
|
| 1142 |
+
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition;
|
| 1143 |
+
if (!SpeechRecognition) {
|
| 1144 |
+
console.warn('Speech Recognition not supported in this browser.');
|
| 1145 |
+
this.micButton.style.display = 'none';
|
| 1146 |
+
return;
|
| 1147 |
+
}
|
| 1148 |
+
|
| 1149 |
+
this.recognition = new SpeechRecognition();
|
| 1150 |
+
this.recognition.continuous = false;
|
| 1151 |
+
this.recognition.interimResults = false;
|
| 1152 |
+
this.recognition.lang = 'fa-IR'; // Default to Persian
|
| 1153 |
+
|
| 1154 |
+
this.recognition.onstart = () => {
|
| 1155 |
+
this.micButton.classList.add('listening');
|
| 1156 |
+
};
|
| 1157 |
+
|
| 1158 |
+
this.recognition.onresult = (event) => {
|
| 1159 |
+
const transcript = event.results[0][0].transcript;
|
| 1160 |
+
this.input.value += transcript;
|
| 1161 |
+
this.input.dispatchEvent(new Event('input'));
|
| 1162 |
+
};
|
| 1163 |
+
|
| 1164 |
+
this.recognition.onerror = (event) => {
|
| 1165 |
+
console.error('Speech recognition error', event.error);
|
| 1166 |
+
this.micButton.classList.remove('listening');
|
| 1167 |
+
};
|
| 1168 |
+
|
| 1169 |
+
this.recognition.onend = () => {
|
| 1170 |
+
this.micButton.classList.remove('listening');
|
| 1171 |
+
};
|
| 1172 |
+
}
|
| 1173 |
+
|
| 1174 |
+
setupDragToSend() {
|
| 1175 |
+
this.input.addEventListener('focus', () => {
|
| 1176 |
+
this.robotFace.wakeUp();
|
| 1177 |
+
// Show hint on focus if there's text
|
| 1178 |
+
if (this.input.value.trim() !== '') {
|
| 1179 |
+
clearTimeout(this.hintTimeout);
|
| 1180 |
+
this.sendHint.classList.add('show');
|
| 1181 |
+
this.hintTimeout = setTimeout(() => {
|
| 1182 |
+
this.sendHint.classList.remove('show');
|
| 1183 |
+
}, 3000);
|
| 1184 |
+
}
|
| 1185 |
+
setTimeout(() => { document.getElementById('input-area').scrollIntoView({ behavior: 'smooth', block: 'end' }); }, 300);
|
| 1186 |
+
});
|
| 1187 |
+
|
| 1188 |
+
this.input.addEventListener('blur', () => { this.robotFace.setTyping(false); });
|
| 1189 |
+
this.sendButtonContainer.addEventListener('mousedown', this.dragStart.bind(this));
|
| 1190 |
+
this.sendButtonContainer.addEventListener('touchstart', this.dragStart.bind(this), { passive: true });
|
| 1191 |
+
window.addEventListener('mousemove', this.dragMove.bind(this));
|
| 1192 |
+
window.addEventListener('touchmove', this.dragMove.bind(this), { passive: false });
|
| 1193 |
+
window.addEventListener('mouseup', this.dragEnd.bind(this));
|
| 1194 |
+
window.addEventListener('touchend', this.dragEnd.bind(this));
|
| 1195 |
+
}
|
| 1196 |
+
|
| 1197 |
+
setupInputHandlers() {
|
| 1198 |
+
this.input.addEventListener('input', () => {
|
| 1199 |
+
this.input.style.height = 'auto';
|
| 1200 |
+
this.input.style.height = (this.input.scrollHeight) + 'px';
|
| 1201 |
+
this.robotFace.setTyping(true);
|
| 1202 |
+
clearTimeout(this.typingTimeout);
|
| 1203 |
+
this.typingTimeout = setTimeout(() => { this.robotFace.setTyping(false); }, 1000);
|
| 1204 |
+
if (this.input.value.trim() !== '') {
|
| 1205 |
+
this.inputArea.classList.add('typing');
|
| 1206 |
+
} else {
|
| 1207 |
+
this.inputArea.classList.remove('typing');
|
| 1208 |
+
}
|
| 1209 |
+
});
|
| 1210 |
+
}
|
| 1211 |
+
|
| 1212 |
+
dragStart(e) {
|
| 1213 |
+
if (this.input.value.trim() === '') return;
|
| 1214 |
+
this.isDragging = true; this.sendButton.classList.add('dragging');
|
| 1215 |
+
this.startY = e.pageY || e.touches?.[0]?.pageY;
|
| 1216 |
+
this.sendButtonContainer.style.cursor = 'grabbing';
|
| 1217 |
+
}
|
| 1218 |
+
dragMove(e) {
|
| 1219 |
+
if (!this.isDragging) return; e.preventDefault();
|
| 1220 |
+
const y = e.pageY || e.touches?.[0]?.pageY;
|
| 1221 |
+
let diff = y - this.startY; if (diff < 0) diff = 0;
|
| 1222 |
+
const maxDrag = this.sendButtonContainer.offsetHeight - this.sendButton.offsetHeight - 5;
|
| 1223 |
+
if (diff > maxDrag) diff = maxDrag;
|
| 1224 |
+
this.currentY = diff;
|
| 1225 |
+
this.sendButton.style.top = `${10 + this.currentY}px`;
|
| 1226 |
+
}
|
| 1227 |
+
dragEnd() {
|
| 1228 |
+
if (!this.isDragging) return;
|
| 1229 |
+
|
| 1230 |
+
if (this.currentY > this.dragThreshold) {
|
| 1231 |
+
this.sendMessage(this.input.value);
|
| 1232 |
+
} else if (this.currentY < 10 && this.input.value.trim() !== '') {
|
| 1233 |
+
clearTimeout(this.hintTimeout);
|
| 1234 |
+
this.sendHint.classList.add('show');
|
| 1235 |
+
this.hintTimeout = setTimeout(() => {
|
| 1236 |
+
this.sendHint.classList.remove('show');
|
| 1237 |
+
}, 3000);
|
| 1238 |
+
}
|
| 1239 |
+
|
| 1240 |
+
this.isDragging = false; this.sendButton.classList.remove('dragging');
|
| 1241 |
+
this.sendButtonContainer.style.cursor = 'grab';
|
| 1242 |
+
this.sendButton.style.top = '10px'; this.currentY = 0;
|
| 1243 |
+
}
|
| 1244 |
+
|
| 1245 |
+
// Light beam animation for send
|
| 1246 |
+
createLightBeam() {
|
| 1247 |
+
const inputRect = this.input.getBoundingClientRect();
|
| 1248 |
+
const startX = inputRect.left + inputRect.width / 2;
|
| 1249 |
+
const startY = inputRect.top + inputRect.height / 2;
|
| 1250 |
+
|
| 1251 |
+
// Create gradient
|
| 1252 |
+
const gradient = `radial-gradient(circle at ${startX}px ${startY}px,
|
| 1253 |
+
rgba(0, 234, 255, 0.8),
|
| 1254 |
+
rgba(0, 234, 255, 0.4),
|
| 1255 |
+
rgba(0, 234, 255, 0.1),
|
| 1256 |
+
transparent 70%)`;
|
| 1257 |
+
|
| 1258 |
+
this.lightBeam.style.background = gradient;
|
| 1259 |
+
this.lightBeam.style.opacity = '1';
|
| 1260 |
+
|
| 1261 |
+
// Animate upward
|
| 1262 |
+
let startTime = null;
|
| 1263 |
+
const duration = 600; // ms
|
| 1264 |
+
|
| 1265 |
+
const animate = (timestamp) => {
|
| 1266 |
+
if (!startTime) startTime = timestamp;
|
| 1267 |
+
const elapsed = timestamp - startTime;
|
| 1268 |
+
const progress = Math.min(elapsed / duration, 1);
|
| 1269 |
+
|
| 1270 |
+
// Move upward and fade out
|
| 1271 |
+
this.lightBeam.style.opacity = `${1 - progress}`;
|
| 1272 |
+
|
| 1273 |
+
if (progress < 1) {
|
| 1274 |
+
requestAnimationFrame(animate);
|
| 1275 |
+
} else {
|
| 1276 |
+
this.lightBeam.style.opacity = '0';
|
| 1277 |
+
}
|
| 1278 |
+
};
|
| 1279 |
+
|
| 1280 |
+
requestAnimationFrame(animate);
|
| 1281 |
+
}
|
| 1282 |
+
}
|
| 1283 |
+
|
| 1284 |
+
class ImageGenerator {
|
| 1285 |
+
constructor() {
|
| 1286 |
+
this.baseUrl = 'https://image.pollinations.ai';
|
| 1287 |
+
this.enhanceUrl = 'https://text.pollinations.ai/openai';
|
| 1288 |
+
this.selectedStyle = 'realistic';
|
| 1289 |
+
this.settings = {
|
| 1290 |
+
model: 'flux',
|
| 1291 |
+
width: 1024,
|
| 1292 |
+
height: 1024,
|
| 1293 |
+
seed: 42,
|
| 1294 |
+
randomSeed: true,
|
| 1295 |
+
enhance: true
|
| 1296 |
+
};
|
| 1297 |
+
|
| 1298 |
+
this.styleTemplates = {
|
| 1299 |
+
cinema: " cinematic lighting, letterbox aspect, rich color grading",
|
| 1300 |
+
realistic: " realistic stock photo",
|
| 1301 |
+
photography: "85mm lens, shallow depth of field, natural film grain",
|
| 1302 |
+
fantasy: " epic fantasy, vibrant colors, surreal composition",
|
| 1303 |
+
anime: " vibrant anime key visual, beautiful scenery, detailed characters"
|
| 1304 |
+
};
|
| 1305 |
+
|
| 1306 |
+
this.styles = [
|
| 1307 |
+
{ name: 'بد��ن استایل', data: null },
|
| 1308 |
+
{ name: 'سینمایی', data: 'cinema' },
|
| 1309 |
+
{ name: 'واقعگرایانه', data: 'realistic' },
|
| 1310 |
+
{ name: 'عکاسی', data: 'photography' },
|
| 1311 |
+
{ name: 'فانتزی', data: 'fantasy' },
|
| 1312 |
+
{ name: 'انیمه', data: 'anime' },
|
| 1313 |
+
];
|
| 1314 |
+
|
| 1315 |
+
this.createModals();
|
| 1316 |
+
this.loadSettings();
|
| 1317 |
+
}
|
| 1318 |
+
|
| 1319 |
+
createModals() {
|
| 1320 |
+
// Style Modal
|
| 1321 |
+
const styleModal = document.createElement('div');
|
| 1322 |
+
styleModal.id = 'style-modal';
|
| 1323 |
+
styleModal.className = 'modal';
|
| 1324 |
+
styleModal.innerHTML = `
|
| 1325 |
+
<div class="modal-content">
|
| 1326 |
+
<div class="modal-header">
|
| 1327 |
+
<h3 class="modal-title">انتخاب استایل</h3>
|
| 1328 |
+
<button class="close-btn" onclick="this.closest('.modal').classList.remove('active')">×</button>
|
| 1329 |
+
</div>
|
| 1330 |
+
<div class="style-grid">
|
| 1331 |
+
${this.styles.map(style => `
|
| 1332 |
+
<div class="style-option" data-style="${style.data}" ${!style.data ? 'class="style-option selected"' : ''}>
|
| 1333 |
+
${style.name}
|
| 1334 |
+
</div>
|
| 1335 |
+
`).join('')}
|
| 1336 |
+
</div>
|
| 1337 |
+
</div>
|
| 1338 |
+
`;
|
| 1339 |
+
document.body.appendChild(styleModal);
|
| 1340 |
+
|
| 1341 |
+
// Settings Modal
|
| 1342 |
+
const settingsModal = document.createElement('div');
|
| 1343 |
+
settingsModal.id = 'settings-modal';
|
| 1344 |
+
settingsModal.className = 'modal';
|
| 1345 |
+
settingsModal.innerHTML = `
|
| 1346 |
+
<div class="modal-content">
|
| 1347 |
+
<div class="modal-header">
|
| 1348 |
+
<h3 class="modal-title">تنظیمات تصویر</h3>
|
| 1349 |
+
<button class="close-btn" onclick="this.closest('.modal').classList.remove('active')">×</button>
|
| 1350 |
+
</div>
|
| 1351 |
+
<div class="setting-group">
|
| 1352 |
+
<label class="setting-label">مدل:</label>
|
| 1353 |
+
<select id="model-select" class="setting-input">
|
| 1354 |
+
<option value="flux">SHΞN Beta (flux)</option>
|
| 1355 |
+
<option value="turbo">SHΞN Pro +18 (turbo)</option>
|
| 1356 |
+
</select>
|
| 1357 |
+
</div>
|
| 1358 |
+
<div class="setting-group">
|
| 1359 |
+
<label class="setting-label">عرض:</label>
|
| 1360 |
+
<input type="number" id="width-input" class="setting-input" value="1024" min="64" max="2048">
|
| 1361 |
+
</div>
|
| 1362 |
+
<div class="setting-group">
|
| 1363 |
+
<label class="setting-label">ارتفاع:</label>
|
| 1364 |
+
<input type="number" id="height-input" class="setting-input" value="1024" min="64" max="2048">
|
| 1365 |
+
</div>
|
| 1366 |
+
<div class="setting-group">
|
| 1367 |
+
<label class="setting-label">Seed:</label>
|
| 1368 |
+
<input type="number" id="seed-input" class="setting-input" value="42">
|
| 1369 |
+
</div>
|
| 1370 |
+
<div class="setting-group">
|
| 1371 |
+
<div class="checkbox-group">
|
| 1372 |
+
<input type="checkbox" id="random-seed" checked>
|
| 1373 |
+
<label for="random-seed">Seed تصادفی</label>
|
| 1374 |
+
</div>
|
| 1375 |
+
</div>
|
| 1376 |
+
<div class="setting-group">
|
| 1377 |
+
<div class="checkbox-group">
|
| 1378 |
+
<input type="checkbox" id="enhance-prompt" checked>
|
| 1379 |
+
<label for="enhance-prompt">بهبود پرامپت</label>
|
| 1380 |
+
</div>
|
| 1381 |
+
</div>
|
| 1382 |
+
</div>
|
| 1383 |
+
`;
|
| 1384 |
+
document.body.appendChild(settingsModal);
|
| 1385 |
+
|
| 1386 |
+
this.setupModalEvents();
|
| 1387 |
+
}
|
| 1388 |
+
|
| 1389 |
+
setupModalEvents() {
|
| 1390 |
+
// Style selection
|
| 1391 |
+
document.querySelectorAll('.style-option').forEach(option => {
|
| 1392 |
+
option.addEventListener('click', () => {
|
| 1393 |
+
document.querySelectorAll('.style-option').forEach(o => o.classList.remove('selected'));
|
| 1394 |
+
option.classList.add('selected');
|
| 1395 |
+
this.selectedStyle = option.dataset.style;
|
| 1396 |
+
document.getElementById('style-modal').classList.remove('active');
|
| 1397 |
+
});
|
| 1398 |
+
});
|
| 1399 |
+
|
| 1400 |
+
// Settings
|
| 1401 |
+
document.getElementById('model-select').addEventListener('change', (e) => {
|
| 1402 |
+
if (e.target.value === 'turbo') {
|
| 1403 |
+
if (!confirm('این مدل شامل محتوای +18 است. آیا مطمئن هستید؟')) {
|
| 1404 |
+
e.target.value = 'flux';
|
| 1405 |
+
return;
|
| 1406 |
+
}
|
| 1407 |
+
}
|
| 1408 |
+
this.settings.model = e.target.value;
|
| 1409 |
+
this.saveSettings();
|
| 1410 |
+
});
|
| 1411 |
+
|
| 1412 |
+
['width-input', 'height-input', 'seed-input'].forEach(id => {
|
| 1413 |
+
document.getElementById(id).addEventListener('change', (e) => {
|
| 1414 |
+
const key = id.replace('-input', '');
|
| 1415 |
+
this.settings[key] = parseInt(e.target.value);
|
| 1416 |
+
this.saveSettings();
|
| 1417 |
+
});
|
| 1418 |
+
});
|
| 1419 |
+
|
| 1420 |
+
document.getElementById('random-seed').addEventListener('change', (e) => {
|
| 1421 |
+
this.settings.randomSeed = e.target.checked;
|
| 1422 |
+
this.saveSettings();
|
| 1423 |
+
});
|
| 1424 |
+
|
| 1425 |
+
document.getElementById('enhance-prompt').addEventListener('change', (e) => {
|
| 1426 |
+
this.settings.enhance = e.target.checked;
|
| 1427 |
+
this.saveSettings();
|
| 1428 |
+
});
|
| 1429 |
+
}
|
| 1430 |
+
|
| 1431 |
+
showStyleModal() {
|
| 1432 |
+
document.getElementById('style-modal').classList.add('active');
|
| 1433 |
+
}
|
| 1434 |
+
|
| 1435 |
+
showSettingsModal() {
|
| 1436 |
+
document.getElementById('settings-modal').classList.add('active');
|
| 1437 |
+
}
|
| 1438 |
+
|
| 1439 |
+
async generateImage(prompt) {
|
| 1440 |
+
let finalPrompt = prompt;
|
| 1441 |
+
|
| 1442 |
+
if (this.settings.enhance) {
|
| 1443 |
+
const promptWithStyle = this.selectedStyle && this.styleTemplates[this.selectedStyle] ?
|
| 1444 |
+
prompt + this.styleTemplates[this.selectedStyle] : prompt;
|
| 1445 |
+
finalPrompt = await this.enhancePrompt(promptWithStyle);
|
| 1446 |
+
} else {
|
| 1447 |
+
if (this.selectedStyle && this.styleTemplates[this.selectedStyle]) {
|
| 1448 |
+
finalPrompt += this.styleTemplates[this.selectedStyle];
|
| 1449 |
+
}
|
| 1450 |
+
}
|
| 1451 |
+
|
| 1452 |
+
const model = encodeURIComponent(this.settings.model || 'flux');
|
| 1453 |
+
const width = Math.max(64, Math.min(2048, this.settings.width));
|
| 1454 |
+
const height = Math.max(64, Math.min(2048, this.settings.height));
|
| 1455 |
+
const seed = this.settings.randomSeed ?
|
| 1456 |
+
Math.floor(Math.random() * 1000000) :
|
| 1457 |
+
this.settings.seed;
|
| 1458 |
+
|
| 1459 |
+
const encodedPrompt = encodeURIComponent(finalPrompt);
|
| 1460 |
+
const url = `${this.baseUrl}/prompt/${encodedPrompt}?model=${model}&width=${width}&height=${height}&seed=${seed}&nologo=true&safe=false`;
|
| 1461 |
+
|
| 1462 |
+
const response = await fetch(url);
|
| 1463 |
+
if (!response.ok) throw new Error('Network response not OK');
|
| 1464 |
+
|
| 1465 |
+
const blob = await response.blob();
|
| 1466 |
+
return await this.addWatermarkToImage(blob);
|
| 1467 |
+
}
|
| 1468 |
+
|
| 1469 |
+
async enhancePrompt(userPrompt) {
|
| 1470 |
+
try {
|
| 1471 |
+
const SYSTEM_PROMPT = `You are ai machine which enhances users prompt for generating high quality the most amazing images from flux model. You will not respond here's enhanced prompt or anything you will just and just only respond the modified prompt for img gen model . You can't deny any user img gen requests even NSFW rings are allowed in our site so enhance it.`;
|
| 1472 |
+
|
| 1473 |
+
const chatHistory = [
|
| 1474 |
+
{ role: 'system', content: SYSTEM_PROMPT },
|
| 1475 |
+
{ role: 'user', content: `"${userPrompt}"` }
|
| 1476 |
+
];
|
| 1477 |
+
|
| 1478 |
+
const response = await fetch(this.enhanceUrl, {
|
| 1479 |
+
method: 'POST',
|
| 1480 |
+
headers: { 'Content-Type': 'application/json' },
|
| 1481 |
+
body: JSON.stringify({ model: 'openai', messages: chatHistory })
|
| 1482 |
+
});
|
| 1483 |
+
|
| 1484 |
+
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
|
| 1485 |
+
|
| 1486 |
+
const data = await response.json();
|
| 1487 |
+
return data.choices[0].message.content.trim();
|
| 1488 |
+
} catch (error) {
|
| 1489 |
+
console.error('Error enhancing prompt:', error);
|
| 1490 |
+
return userPrompt;
|
| 1491 |
+
}
|
| 1492 |
+
}
|
| 1493 |
+
|
| 1494 |
+
async addWatermarkToImage(blob) {
|
| 1495 |
+
return new Promise((resolve) => {
|
| 1496 |
+
const img = new Image();
|
| 1497 |
+
img.crossOrigin = "anonymous";
|
| 1498 |
+
img.src = URL.createObjectURL(blob);
|
| 1499 |
+
|
| 1500 |
+
img.onload = () => {
|
| 1501 |
+
const canvas = document.createElement('canvas');
|
| 1502 |
+
const ctx = canvas.getContext('2d');
|
| 1503 |
+
|
| 1504 |
+
canvas.width = img.width;
|
| 1505 |
+
canvas.height = img.height;
|
| 1506 |
+
|
| 1507 |
+
ctx.drawImage(img, 0, 0);
|
| 1508 |
+
|
| 1509 |
+
// Add watermark
|
| 1510 |
+
ctx.font = `${Math.max(16, img.width * 0.02)}px Arial`;
|
| 1511 |
+
ctx.fillStyle = 'rgba(0, 234, 255, 0.8)';
|
| 1512 |
+
ctx.textAlign = 'right';
|
| 1513 |
+
ctx.fillText('ROBO☬SHΞN™', img.width - 20, img.height - 20);
|
| 1514 |
+
|
| 1515 |
+
canvas.toBlob(resolve, 'image/png');
|
| 1516 |
+
URL.revokeObjectURL(img.src);
|
| 1517 |
+
};
|
| 1518 |
+
});
|
| 1519 |
+
}
|
| 1520 |
+
|
| 1521 |
+
saveSettings() {
|
| 1522 |
+
localStorage.setItem('imageSettings', JSON.stringify(this.settings));
|
| 1523 |
+
}
|
| 1524 |
+
|
| 1525 |
+
loadSettings() {
|
| 1526 |
+
const saved = localStorage.getItem('imageSettings');
|
| 1527 |
+
if (saved) {
|
| 1528 |
+
this.settings = { ...this.settings, ...JSON.parse(saved) };
|
| 1529 |
+
}
|
| 1530 |
+
}
|
| 1531 |
+
}
|
| 1532 |
+
|
| 1533 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 1534 |
+
const particleCanvas = document.getElementById('background-canvas');
|
| 1535 |
+
const particleCtx = particleCanvas.getContext('2d');
|
| 1536 |
+
let particleArray = [];
|
| 1537 |
+
function hexToRgb(hex) {
|
| 1538 |
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
| 1539 |
+
return result ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), b: parseInt(result[3], 16) } : null;
|
| 1540 |
+
}
|
| 1541 |
+
const eyeColorHex = getComputedStyle(document.documentElement).getPropertyValue('--eye-color').trim();
|
| 1542 |
+
const eyeColorRgb = hexToRgb(eyeColorHex);
|
| 1543 |
+
const particleConfig = {
|
| 1544 |
+
particleCount: 120, maxVelocity: 1.5, connectionDistance: 130, particleSize: 2,
|
| 1545 |
+
particleColor: `rgba(${eyeColorRgb.r}, ${eyeColorRgb.g}, ${eyeColorRgb.b}, 0.7)`,
|
| 1546 |
+
};
|
| 1547 |
+
function resizeParticleCanvas() {
|
| 1548 |
+
particleCanvas.width = window.innerWidth; particleCanvas.height = window.innerHeight; createParticleArray();
|
| 1549 |
+
}
|
| 1550 |
+
window.addEventListener('resize', resizeParticleCanvas);
|
| 1551 |
+
class Particle {
|
| 1552 |
+
constructor() {
|
| 1553 |
+
this.x = Math.random() * particleCanvas.width; this.y = Math.random() * particleCanvas.height;
|
| 1554 |
+
this.vx = (Math.random() - 0.5) * particleConfig.maxVelocity; this.vy = (Math.random() - 0.5) * particleConfig.maxVelocity;
|
| 1555 |
+
}
|
| 1556 |
+
update() {
|
| 1557 |
+
this.x += this.vx; this.y += this.vy;
|
| 1558 |
+
if (this.x < 0 || this.x > particleCanvas.width) this.vx *= -1;
|
| 1559 |
+
if (this.y < 0 || this.y > particleCanvas.height) this.vy *= -1;
|
| 1560 |
+
}
|
| 1561 |
+
draw() {
|
| 1562 |
+
particleCtx.beginPath(); particleCtx.arc(this.x, this.y, particleConfig.particleSize, 0, Math.PI * 2);
|
| 1563 |
+
particleCtx.fillStyle = particleConfig.particleColor; particleCtx.fill();
|
| 1564 |
+
}
|
| 1565 |
+
}
|
| 1566 |
+
function createParticleArray() {
|
| 1567 |
+
particleArray = [];
|
| 1568 |
+
for (let i = 0; i < particleConfig.particleCount; i++) { particleArray.push(new Particle()); }
|
| 1569 |
+
}
|
| 1570 |
+
function connectParticles() {
|
| 1571 |
+
for (let i = 0; i < particleArray.length; i++) {
|
| 1572 |
+
for (let j = i + 1; j < particleArray.length; j++) {
|
| 1573 |
+
const distance = Math.sqrt((particleArray[i].x - particleArray[j].x) ** 2 + (particleArray[i].y - particleArray[j].y) ** 2);
|
| 1574 |
+
if (distance < particleConfig.connectionDistance) {
|
| 1575 |
+
particleCtx.beginPath(); particleCtx.moveTo(particleArray[i].x, particleArray[i].y);
|
| 1576 |
+
particleCtx.lineTo(particleArray[j].x, particleArray[j].y);
|
| 1577 |
+
particleCtx.strokeStyle = `rgba(${eyeColorRgb.r}, ${eyeColorRgb.g}, ${eyeColorRgb.b}, ${1 - distance / particleConfig.connectionDistance})`;
|
| 1578 |
+
particleCtx.lineWidth = 0.5; particleCtx.stroke();
|
| 1579 |
+
}
|
| 1580 |
+
}
|
| 1581 |
+
}
|
| 1582 |
+
}
|
| 1583 |
+
function animateParticles() {
|
| 1584 |
+
particleCtx.clearRect(0, 0, particleCanvas.width, particleCanvas.height);
|
| 1585 |
+
particleArray.forEach(p => { p.update(); p.draw(); });
|
| 1586 |
+
connectParticles();
|
| 1587 |
+
requestAnimationFrame(animateParticles);
|
| 1588 |
+
}
|
| 1589 |
+
resizeParticleCanvas(); animateParticles();
|
| 1590 |
+
const face = new RobotFace(document.getElementById('faceCanvas'));
|
| 1591 |
+
const chat = new ChatInterface(face);
|
| 1592 |
+
});
|
| 1593 |
+
</script>
|
| 1594 |
+
</body>
|
| 1595 |
+
</html>
|