Shinekoko commited on
Commit
4e36f8f
·
verified ·
1 Parent(s): a708138

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +309 -513
index.html CHANGED
@@ -1,521 +1,317 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
  <head>
4
- <meta charset="UTF-8">
5
- <title>bigwin</title>
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
8
-
9
- <style>
10
- *{margin:0;padding:0;box-sizing:border-box;}
11
- html,body{
12
- width:100%;
13
- height:100%;
14
- font-family:'Inter',sans-serif;
15
- background:#0d0d0d;
16
- color:#eee;
17
- }
18
-
19
- .bg-web{
20
- position:fixed;
21
- inset:0;
22
- width:100%;
23
- height:100%;
24
- border:none;
25
- z-index:1;
26
- filter:brightness(0.9);
27
- }
28
-
29
- .float-btn{
30
- display:none;
31
- position:fixed;
32
- bottom:45px;
33
- right:20px;
34
- padding:12px 22px;
35
- border-radius:10px;
36
- background:rgba(30,30,30,0.85);
37
- color:#FFD700;
38
- font-weight:700;
39
- font-size:14px;
40
- cursor:move;
41
- z-index:999;
42
- border:1px solid rgba(255,215,0,0.4);
43
- user-select: none;
44
- touch-action: none;
45
- }
46
-
47
- .panel-wrap{
48
- position:fixed;
49
- inset:0;
50
- display:flex;
51
- justify-content:center;
52
- align-items:center;
53
- background:rgba(0,0,0,0.55);
54
- z-index:998;
55
- opacity:0;
56
- pointer-events:none;
57
- transition:.3s;
58
- }
59
- .panel-wrap.show{
60
- opacity:1;
61
- pointer-events:auto;
62
- }
63
-
64
- .panel{
65
- width:300px;
66
- max-height:70vh;
67
- overflow-y:auto;
68
- background:rgba(20,20,20,0.95);
69
- border-radius:18px;
70
- padding:18px;
71
- border:1px solid rgba(255,215,0,0.15);
72
- }
73
-
74
- .result-text{
75
- font-size:1.5rem;
76
- margin:8px 0;
77
- border-radius:10px;
78
- padding:10px;
79
- text-align:center;
80
- font-weight:700;
81
- background:rgba(40,40,40,0.75);
82
- }
83
- .big-res{color:#4caf50;}
84
- .small-res{color:#f44336;}
85
- .skip-res{color:#999;}
86
-
87
- table{
88
- width:100%;
89
- border-collapse:collapse;
90
- margin-top:10px;
91
- font-size:0.85rem;
92
- }
93
- th, td{
94
- padding:6px;
95
- text-align:center;
96
- border-bottom:1px solid rgba(255,215,0,0.2);
97
- }
98
- th{color:#FFD700;}
99
-
100
- .res-circle{
101
- width:26px;
102
- height:26px;
103
- border-radius:50%;
104
- display:flex;
105
- justify-content:center;
106
- align-items:center;
107
- margin:0 auto;
108
- font-weight:600;
109
- font-size:0.8rem;
110
- }
111
- .bg-g{background:#4caf50;}
112
- .bg-r{background:#f44336;}
113
-
114
- .inner-alert{
115
- display: none;
116
- font-size: 1.2rem;
117
- font-weight: bold;
118
- text-align: center;
119
- margin: 10px 0;
120
- padding: 10px;
121
- border-radius: 8px;
122
- border: 2px solid;
123
- }
124
- .inner-alert.win{
125
- display: block;
126
- color:#4caf50;
127
- border-color: #4caf50;
128
- background: rgba(76,175,80,0.1);
129
- }
130
- .inner-alert.lose{
131
- display: block;
132
- color:#f44336;
133
- border-color: #f44336;
134
- background: rgba(244,67,54,0.1);
135
- }
136
-
137
- /* Login Pane */
138
- .login-overlay{
139
- position:fixed;
140
- inset:0;
141
- background:#0d0d0d;
142
- z-index:9999;
143
- display:flex;
144
- justify-content:center;
145
- align-items:center;
146
- flex-direction: column;
147
- }
148
-
149
- .marquee-wrapper {
150
- position: absolute;
151
- top: 40px;
152
- width: 90%;
153
- max-width: 500px;
154
- background: rgba(20, 20, 20, 0.8);
155
- border: 1px solid rgba(255, 215, 0, 0.4);
156
- border-radius: 25px;
157
- padding: 12px 0;
158
- overflow: hidden;
159
- box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
160
- }
161
- .marquee-text {
162
- display: inline-block;
163
- white-space: nowrap;
164
- font-size: 1.05rem;
165
- font-weight: 700;
166
- color: #FFD700;
167
- text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
168
- padding-left: 100%;
169
- animation: scrollMarquee 20s linear infinite;
170
- }
171
-
172
- /* Login ဝင်ပြီးနောက် ဂိမ်းမျက်နှာပြင်ပေါ်တွင် ပြေးမည့် စာတန်းအတွက် CSS */
173
- .in-game-marquee-wrapper {
174
- display: none;
175
- position: fixed;
176
- top: 20px;
177
- left: 50%;
178
- transform: translateX(-50%);
179
- width: 90%;
180
- max-width: 600px;
181
- background: linear-gradient(90deg, rgba(20,20,20,0.9), rgba(40,10,10,0.95), rgba(20,20,20,0.9));
182
- border: 1px solid rgba(255, 68, 68, 0.6);
183
- border-radius: 30px;
184
- padding: 10px 0;
185
- overflow: hidden;
186
- box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
187
- z-index: 997;
188
- }
189
- .in-game-marquee-text {
190
- display: inline-block;
191
- white-space: nowrap;
192
- font-size: 1.1rem;
193
- font-weight: bold;
194
- color: #ffcccc;
195
- text-shadow: 0 0 10px rgba(255, 68, 68, 0.8), 0 0 20px rgba(255, 0, 0, 0.5);
196
- padding-left: 100%;
197
- animation: scrollMarquee 25s linear infinite;
198
- }
199
-
200
- @keyframes scrollMarquee {
201
- 0% { transform: translateX(0); }
202
- 100% { transform: translateX(-100%); }
203
- }
204
-
205
- .login-box{
206
- background:rgba(20,20,20,0.95);
207
- border:1px solid rgba(255,215,0,0.4);
208
- padding:30px;
209
- border-radius:15px;
210
- text-align:center;
211
- width:300px;
212
- box-shadow: 0 4px 15px rgba(0,0,0,0.5);
213
- }
214
- .login-box h2{
215
- color:#FFD700;
216
- margin-bottom:10px;
217
- font-size: 1.3rem;
218
- }
219
- .login-box p{
220
- color: #eee;
221
- font-size: 0.9rem;
222
- margin-bottom: 20px;
223
- line-height: 1.4;
224
- }
225
- .login-input{
226
- width:100%;
227
- padding:12px;
228
- margin-bottom:20px;
229
- border-radius:8px;
230
- border:1px solid rgba(255,215,0,0.2);
231
- background:#1a1a1a;
232
- color:#fff;
233
- font-size:16px;
234
- outline:none;
235
- }
236
- .login-input:focus{
237
- border-color:#FFD700;
238
- }
239
- .login-btn{
240
- width:100%;
241
- padding:12px;
242
- background:#FFD700;
243
- color:#000;
244
- font-weight:700;
245
- font-size:16px;
246
- border:none;
247
- border-radius:8px;
248
- cursor:pointer;
249
- transition:0.2s;
250
- }
251
- .login-btn:active{
252
- transform:scale(0.98);
253
- }
254
- .error-msg{
255
- color:#f44336;
256
- font-size:0.85rem;
257
- margin-top:10px;
258
- display:none;
259
- }
260
- .telegram-link {
261
- display: inline-block;
262
- margin-top: 20px;
263
- color: #4caf50;
264
- text-decoration: none;
265
- font-weight: 600;
266
- font-size: 0.95rem;
267
- border-bottom: 1px solid #4caf50;
268
- padding-bottom: 2px;
269
- }
270
- </style>
271
  </head>
272
-
273
  <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
274
 
275
- <div class="login-overlay" id="loginOverlay">
276
- <div class="marquee-wrapper">
277
- <div class="marquee-text">Hello Shine BigWin Hack User မင်္ဂလာပါခင်ဗျ 777 BIG WIN (WIN GO_HACK) ဂိမ်းဆိုဒ်ကြီးမှ ကြိုဆိုပါတယ် ပွဲစဥ်တိုင်း အနိုင်ရပါစေကြောင်းနှင့် အမြတ်ငွေများစွာ ထုပ်ယူနိုင်ပါစေကြောင်း ဆုမွန်ကောင်းတောင်းပေးလိုက်ပါတယ် ခင်​ဗျ</div>
278
- </div>
279
-
280
- <div class="login-box">
281
- <h2>777 BIG WIN (WIN GO_HACK)</h2>
282
- <p>စက္ကန့် ၃၀ အခန်းကို 99% hack ထားပေးပါတယ်။</p>
283
-
284
- <input type="password" id="passInput" class="login-input" placeholder="Enter Password">
285
- <button class="login-btn" onclick="checkLogin()">LOGIN</button>
286
- <div id="errorMsg" class="error-msg">Incorrect Password!</div>
287
-
288
- <a href="https://t.me/shinemovierecap1" target="_blank" class="telegram-link">Telegram Channel Join ရန်နှိပ်ပါ</a>
289
- </div>
290
- </div>
291
-
292
- <div class="in-game-marquee-wrapper" id="inGameMarquee">
293
- <div class="in-game-marquee-text">
294
- Hello လူကြီးမင်းများ ခင်ဗျာ 777 Wingo Hack ဂိမ်းကို အနည်းဆုံး ( ၁၀၀ ) ကနေဘဲ ထိုးပေးကြပါ လောဘမကြီးရန် မေတ္တာရပ်ခံအပ်ပါတယ်ဗျ လောဘကြီး ကိုယ့်ရဲ့ ပိုက်ဆံ ဆုံးရှုံးနိုင်ပါတယ် အားလုံးကိုကျေးဇူးတင်ပါတယ်ဗျ
295
- </div>
296
- </div>
297
-
298
- <iframe class="bg-web" src="https://bigwingame.win/#/register?invitationCode=38683259145"></iframe>
299
-
300
- <div class="float-btn" id="floatBtn">SHOW PANEL</div>
301
-
302
- <div class="panel-wrap" id="panelWrap">
303
- <div class="panel">
304
- <h2 style="text-align:center;color:#FFD700;">WINGO HACK</h2>
305
- <div style="text-align:center;margin:8px 0;color:#FFD700;">
306
- Bet Amounts: <span id="martingaleLevel" style="color:white; font-weight:bold;">100 ထိုးပါ</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  </div>
308
- <div id="timer" style="text-align:center;font-size:1.2rem;font-weight:700;margin-bottom:8px;">00:30</div>
309
- <div id="innerAlert" class="inner-alert"></div>
310
- <div id="mainPred" class="result-text">--</div>
311
- <table>
312
- <thead>
313
- <tr><th>Period</th><th>Number</th><th>Result</th></tr>
314
- </thead>
315
- <tbody id="histBody"></tbody>
316
- </table>
317
- </div>
318
  </div>
319
-
320
- <script>
321
- // --- Simple Login Logic ---
322
- function checkLogin() {
323
- const pass = document.getElementById("passInput").value.trim();
324
- const errorMsg = document.getElementById("errorMsg");
325
-
326
- // Password ကို admin113224 သို့ ပြောင်းလဲထားပါသည်
327
- if (pass === "admin113224") {
328
- // Login အောင်မြင်ပါက
329
- document.getElementById("loginOverlay").style.display = "none";
330
- document.getElementById("floatBtn").style.display = "block";
331
- document.getElementById("inGameMarquee").style.display = "block";
332
- } else {
333
- // Password မှားယွင်းပါက
334
- errorMsg.style.display = "block";
335
- errorMsg.innerText = "Incorrect Password!";
336
- }
337
- }
338
-
339
- // --- Drag Function for SHOW PANEL button ---
340
- const floatBtn = document.getElementById("floatBtn");
341
- let isDragging = false;
342
- let hasMoved = false;
343
- let offsetX, offsetY;
344
-
345
- floatBtn.addEventListener('mousedown', function(e) {
346
- isDragging = true;
347
- hasMoved = false;
348
- offsetX = e.clientX - floatBtn.getBoundingClientRect().left;
349
- offsetY = e.clientY - floatBtn.getBoundingClientRect().top;
350
- });
351
-
352
- document.addEventListener('mousemove', function(e) {
353
- if (isDragging) {
354
- hasMoved = true;
355
- let left = e.clientX - offsetX;
356
- let top = e.clientY - offsetY;
357
-
358
- if (left < 0) left = 0;
359
- if (top < 0) top = 0;
360
- if (left + floatBtn.offsetWidth > window.innerWidth) left = window.innerWidth - floatBtn.offsetWidth;
361
- if (top + floatBtn.offsetHeight > window.innerHeight) top = window.innerHeight - floatBtn.offsetHeight;
362
-
363
- floatBtn.style.left = left + 'px';
364
- floatBtn.style.top = top + 'px';
365
- floatBtn.style.bottom = 'auto';
366
- floatBtn.style.right = 'auto';
367
- }
368
- });
369
-
370
- document.addEventListener('mouseup', function() {
371
- isDragging = false;
372
- });
373
-
374
- floatBtn.addEventListener('touchstart', function(e) {
375
- isDragging = true;
376
- hasMoved = false;
377
- const touch = e.touches[0];
378
- offsetX = touch.clientX - floatBtn.getBoundingClientRect().left;
379
- offsetY = touch.clientY - floatBtn.getBoundingClientRect().top;
380
- });
381
-
382
- document.addEventListener('touchmove', function(e) {
383
- if (isDragging) {
384
- hasMoved = true;
385
- const touch = e.touches[0];
386
- let left = touch.clientX - offsetX;
387
- let top = touch.clientY - offsetY;
388
-
389
- if (left < 0) left = 0;
390
- if (top < 0) top = 0;
391
- if (left + floatBtn.offsetWidth > window.innerWidth) left = window.innerWidth - floatBtn.offsetWidth;
392
- if (top + floatBtn.offsetHeight > window.innerHeight) top = window.innerHeight - floatBtn.offsetHeight;
393
-
394
- floatBtn.style.left = left + 'px';
395
- floatBtn.style.top = top + 'px';
396
- floatBtn.style.bottom = 'auto';
397
- floatBtn.style.right = 'auto';
398
- }
399
- });
400
-
401
- document.addEventListener('touchend', function() {
402
- isDragging = false;
403
- });
404
-
405
- floatBtn.addEventListener('click', function() {
406
- if (!hasMoved) {
407
- panelWrap.classList.add("show");
408
- }
409
- });
410
-
411
-
412
- // --- Original Hack Logic ---
413
- const panelWrap=document.getElementById("panelWrap");
414
- const martingaleLevel=document.getElementById("martingaleLevel");
415
-
416
- let martingale=1;
417
- let lossCount=0;
418
-
419
- function updateMartingale(isWin){
420
- if(isWin){
421
- martingale=1;
422
- lossCount=0;
423
- }else{
424
- lossCount++;
425
- martingale=Math.pow(3,lossCount);
426
- }
427
- martingaleLevel.innerText = (martingale * 100) + " ထိုးပါ";
428
- }
429
-
430
- function showResult(isWin){
431
- const innerAlert=document.getElementById("innerAlert");
432
- innerAlert.className="inner-alert "+(isWin?"win":"lose");
433
- innerAlert.innerHTML=isWin?"YOU WIN<br><span style='font-size:0.9rem;'>(သင်နိုင်ပါသည်)</span>":"YOU LOSS<br><span style='font-size:0.9rem;'>(သင်ရှုံးပါသည်)</span>";
434
- updateMartingale(isWin);
435
-
436
- setTimeout(()=>{
437
- innerAlert.className="inner-alert";
438
- },3000);
439
- }
440
-
441
- const API="https://api.bigwinqaz.com/api/webapi/GetNoaverageEmerdList";
442
-
443
- async function getData(){
444
- try{
445
- const res=await fetch(API,{
446
- method:"POST",
447
- headers:{"Content-Type":"application/json;charset=UTF-8"},
448
- body:JSON.stringify({
449
- pageSize:10,
450
- pageNo:1,
451
- typeId:30,
452
- language:7,
453
- random:"af4891107ce347699396d1f61b3f8780",
454
- signature:"397E8F97C9D82D26A6D97A833666071A",
455
- timestamp:Math.floor(Date.now()/1000)
456
- })
457
- });
458
- const d=await res.json();
459
- return d.data?.list||[];
460
- }catch{return [];}
461
- }
462
-
463
- function predict(results){
464
- if(!results.length) return "--";
465
- return results[0];
466
- }
467
-
468
- function render(list){
469
- if(!list.length) return;
470
-
471
- const results=list.map(r=>Number(r.number)>=5?"BIG":"SMALL");
472
- const pred=predict(results);
473
-
474
- const prev=localStorage.getItem("pred");
475
- if(prev && prev!=="SKIP"){
476
- showResult(prev===results[0]);
477
- }
478
- localStorage.removeItem("pred");
479
-
480
- localStorage.setItem("pred",pred);
481
-
482
- const el=document.getElementById("mainPred");
483
-
484
- if (lossCount === 0) {
485
- el.innerText = pred + " ပြန်ထိုးပါ";
486
- } else {
487
- el.innerText = pred + " " + martingale + "ဆ ထိုးပေးပါ";
488
- }
489
-
490
- if(pred==="BIG") el.className="result-text big-res";
491
- else if(pred==="SMALL") el.className="result-text small-res";
492
- else el.className="result-text skip-res";
493
-
494
- const tbody=document.getElementById("histBody");
495
- tbody.innerHTML=list.slice(0,7).map(r=>{
496
- const n=Number(r.number);
497
- const bs=n>=5?"BIG":"SMALL";
498
- const cls=n>=5?"bg-g":"bg-r";
499
- return `<tr>
500
- <td>${r.issueNumber}</td>
501
- <td><div class="res-circle ${cls}">${n}</div></td>
502
- <td class="${bs==="BIG"?"big-res":"small-res"}">${bs}</td>
503
- </tr>`;
504
- }).join("");
505
- }
506
-
507
- setInterval(()=>{
508
- const t=30-(Math.floor(Date.now()/1000)%30);
509
- document.getElementById("timer").innerText="00:"+(t<10?"0"+t:t);
510
- if(t===30) getData().then(render);
511
- },1000);
512
-
513
- panelWrap.addEventListener('click', function(e) {
514
- if (e.target === panelWrap) {
515
- panelWrap.classList.remove('show');
516
- }
517
- });
518
- </script>
519
-
520
  </body>
521
- </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="my">
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>Recap Maker - Secure Mode</title>
7
+
8
+ <style>
9
+ :root {
10
+ --bg-color: #0f172a; --card-bg: #1e293b; --text-main: #e2e8f0;
11
+ --text-muted: #94a3b8; --accent: #f43f5e; --border: #334155;
12
+ --danger: #ef4444; --success: #22c55e;
13
+ }
14
+ body { background-color: var(--bg-color); color: var(--text-main); font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; padding: 15px; overscroll-behavior: none; }
15
+ .container { max-width: 600px; margin: 0 auto; padding-bottom: 80px; }
16
+ h2 { text-align: center; color: var(--accent); letter-spacing: 2px; margin-bottom: 5px; font-weight: 900; text-transform: uppercase; }
17
+ .user-badge { text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 20px; display: block; }
18
+ .card { background: var(--card-bg); border-radius: 16px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--border); }
19
+ .card-title { font-size: 14px; font-weight: bold; color: var(--text-muted); margin-bottom: 10px; display: block; text-transform: uppercase; }
20
+ input[type="text"], textarea, select { width: 100%; padding: 14px; background: #020617; border: 1px solid var(--border); border-radius: 10px; color: white; font-size: 16px; outline: none; box-sizing: border-box; margin-bottom: 10px; }
21
+ .btn { width: 100%; padding: 16px; border: none; border-radius: 12px; font-weight: bold; font-size: 16px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; text-decoration: none; transition: 0.2s;}
22
+ .btn-primary { background: var(--accent); color: white; }
23
+ .btn-success { background: var(--success); color: #000; }
24
+ .btn-outline { background: transparent; border: 2px solid var(--border); color: var(--text-muted); }
25
+ .btn-outline.active { border-color: var(--accent); color: var(--accent); background: rgba(244, 63, 94, 0.1); }
26
+
27
+ .video-box { width: 100%; background: #000; border-radius: 12px; border: 2px dashed var(--border); position: relative; overflow: hidden; margin-top: 15px; min-height: 150px; display: flex; justify-content: center; align-items: center; }
28
+ video { width: 100%; height: auto; display: block; }
29
+ .placeholder-text { position: absolute; color: var(--text-muted); font-size: 14px; pointer-events: none; }
30
+ .drag-box { position: absolute; display: none; z-index: 50; touch-action: none; }
31
+ .resize-handle { width: 30px; height: 30px; background: white; position: absolute; bottom: -10px; right: -10px; border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.5); z-index: 60;}
32
+
33
+ .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
34
+ .checkbox-wrapper { display: flex; align-items: center; background: #020617; padding: 12px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
35
+ .checkbox-wrapper input { width: auto; margin-right: 10px; accent-color: var(--accent); }
36
+ .switch-group { display: flex; justify-content: space-between; align-items: center; background: #020617; padding: 15px; border-radius: 10px; border: 1px solid var(--accent); }
37
+ .switch { position: relative; display: inline-block; width: 50px; height: 26px; }
38
+ .switch input { opacity: 0; width: 0; height: 0; }
39
+ .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 34px; }
40
+ .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
41
+ input:checked + .slider { background-color: var(--accent); }
42
+ input:checked + .slider:before { transform: translateX(24px); }
43
+ #result-section { display: none; border-color: var(--success); }
44
+ #loader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.95); z-index: 9999; text-align: center; padding-top: 35vh; color: var(--accent); font-size: 1.2rem; }
45
+ </style>
46
+
47
+ <script>
48
+ function switchSource(type) {
49
+ document.getElementById('src-link').style.display = 'none'; document.getElementById('src-file').style.display = 'none';
50
+ document.getElementById('btnSrcLink').classList.remove('active'); document.getElementById('btnSrcFile').classList.remove('active');
51
+ if(type === 'link') { document.getElementById('src-link').style.display = 'block'; document.getElementById('btnSrcLink').classList.add('active'); }
52
+ else { document.getElementById('src-file').style.display = 'block'; document.getElementById('btnSrcFile').classList.add('active'); }
53
+ }
54
+ function loader(show, msg="Processing...") {
55
+ const el = document.getElementById('loader');
56
+ el.innerHTML = `<div>${msg}</div><div style="font-size:14px; color:#94a3b8; margin-top:10px;">(Do not close this page)</div>`;
57
+ el.style.display = show ? 'block' : 'none';
58
+ }
59
+ function statusMsg(text) { const el = document.getElementById('statusMsg'); el.innerText = text; el.style.display = text ? 'block' : 'none'; }
60
+
61
+ async function showResult(serverUrl) {
62
+ loader(true, "📥 Saving to Browser Memory...");
63
+ try {
64
+ const response = await fetch(serverUrl);
65
+ if (!response.ok) throw new Error("File transfer failed.");
66
+ const blob = await response.blob();
67
+ const objectUrl = URL.createObjectURL(blob);
68
+ const section = document.getElementById('result-section');
69
+ const player = document.getElementById('resultVideo');
70
+ const dlBtn = document.getElementById('downloadBtn');
71
+ player.src = objectUrl; dlBtn.href = objectUrl; dlBtn.download = "recap_" + new Date().getTime() + ".mp4";
72
+ section.style.display = 'block'; section.scrollIntoView({behavior: "smooth"});
73
+ statusMsg("✅ Video Ready!");
74
+ } catch (e) { alert("Error: " + e); } finally { loader(false); }
75
+ }
76
+
77
+ async function downloadVideo() {
78
+ const u = document.getElementById('videoUrl').value; if(!u) return alert("Enter URL");
79
+ statusMsg("Downloading Video..."); loader(true, "Downloading...");
80
+ try {
81
+ const res = await fetch('/download-video', {method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify({url:u})});
82
+ handleRes(await res.json());
83
+ } catch(e) { alert("Error: " + e); } loader(false);
84
+ }
85
+
86
+ async function uploadVideoFile() {
87
+ const f = document.getElementById('videoFileInput').files[0]; if(!f) return alert("Select File");
88
+ const fd = new FormData(); fd.append('video_file', f);
89
+ statusMsg("Uploading..."); loader(true, "Uploading...");
90
+ try {
91
+ const res = await fetch('/upload-video', {method:'POST', body:fd});
92
+ handleRes(await res.json());
93
+ } catch(e) { alert("Error"); } loader(false);
94
+ }
95
+
96
+ function handleRes(d) {
97
+ if(d.status === 'success') {
98
+ document.getElementById('videoFilename').value = d.filename;
99
+ document.querySelector('.placeholder-text').style.display = 'none';
100
+ const old = document.getElementById('mainVideo'); if(old) old.remove();
101
+ const v = document.createElement('video');
102
+ v.id = 'mainVideo'; v.src = d.path; v.controls = true; v.style.width = '100%';
103
+ document.getElementById('videoContainer').prepend(v);
104
+
105
+ v.onloadedmetadata = () => {
106
+ updateCoords('blurBox'); updateCoords('logoBox');
107
+ };
108
+
109
+ statusMsg("✅ Video Uploaded! Checking AI...");
110
+ if(!d.translated_text) reloadTranslation(); else document.querySelector('textarea[name="ai_text"]').value = d.translated_text;
111
+ } else { alert(d.message); }
112
+ }
113
+
114
+ async function reloadTranslation() {
115
+ const fname = document.getElementById('videoFilename').value;
116
+ if(!fname) return;
117
+ const btn = document.getElementById('btnReloadAI'); btn.innerHTML = "⏳ Fixing..."; btn.disabled = true;
118
+ document.querySelector('textarea[name="ai_text"]').value = "⏳ AI Analyzing...";
119
+ try {
120
+ const fd = new FormData(); fd.append('filename', fname);
121
+ const res = await fetch('/re-analyze', {method:'POST', body:fd});
122
+ const d = await res.json();
123
+ document.querySelector('textarea[name="ai_text"]').value = d.translated_text || d.message;
124
+ } catch(e) { alert("Connection Error"); }
125
+ btn.innerHTML = "↻ Retry AI"; btn.disabled = false;
126
+ }
127
+
128
+ async function startProcessing() {
129
+ if(!document.getElementById('videoFilename').value) return alert("No Video!");
130
+ document.getElementById('result-section').style.display = 'none'; loader(true, "Joining Queue...");
131
+ const fd = new FormData(document.getElementById('processForm'));
132
+ try {
133
+ const res = await fetch('/process', {method:'POST', body:fd});
134
+ const d = await res.json();
135
+ if(d.status === 'queued') checkStatus(d.job_id); else { alert(d.message); loader(false); }
136
+ } catch(e) { alert("Error"); loader(false); }
137
+ }
138
+
139
+ function checkStatus(jobId) {
140
+ const interval = setInterval(async () => {
141
+ try {
142
+ const res = await fetch('/status/' + jobId);
143
+ const d = await res.json();
144
+ if(d.status === 'success') { clearInterval(interval); loader(false); showResult(d.url); }
145
+ else if(d.status === 'failed') { clearInterval(interval); loader(false); alert("Failed: " + d.message); }
146
+ } catch(e) {}
147
+ }, 3000);
148
+ }
149
+
150
+ function toggleBox(id, show) {
151
+ const el = document.getElementById(id); if(el) { el.style.display = show ? 'block' : 'none'; if(show) updateCoords(id); }
152
+ }
153
+ function loadLogo(e) {
154
+ if(e.target.files[0]) {
155
+ const r = new FileReader();
156
+ r.onload = function(ev) { document.getElementById('previewLogo').src=ev.target.result; toggleBox('logoBox', true); };
157
+ r.readAsDataURL(e.target.files[0]);
158
+ }
159
+ }
160
+
161
+ function updateCoords(id) {
162
+ const v = document.getElementById('mainVideo');
163
+ const box = document.getElementById(id);
164
+ if(!v || !box || v.videoWidth === 0) return;
165
+
166
+ const vr = v.getBoundingClientRect();
167
+ const br = box.getBoundingClientRect();
168
+
169
+ const scaleX = v.videoWidth / vr.width;
170
+ const scaleY = v.videoHeight / vr.height;
171
+
172
+ const x = Math.round((br.left - vr.left) * scaleX);
173
+ const y = Math.round((br.top - vr.top) * scaleY);
174
+ const w = Math.round(br.width * scaleX);
175
+ const h = Math.round(br.height * scaleY);
176
+
177
+ if(id==='blurBox') {
178
+ document.getElementById('blur_x').value=x; document.getElementById('blur_y').value=y;
179
+ document.getElementById('blur_w').value=w; document.getElementById('blur_h').value=h;
180
+ } else {
181
+ document.getElementById('logo_x').value=x; document.getElementById('logo_y').value=y;
182
+ document.getElementById('logo_w').value=w; document.getElementById('logo_h').value=h;
183
+ }
184
+ }
185
+
186
+ function makeInteractive(id) {
187
+ const box = document.getElementById(id);
188
+ const handle = box.querySelector('.resize-handle');
189
+ if(!box || !handle) return;
190
+ let isDrag=false, isResize=false, startX, startY, sl, st, sw, sh;
191
+ const start = (e) => {
192
+ if(e.target === handle) return;
193
+ isDrag = true; const p = e.type.includes('mouse') ? e : e.touches[0];
194
+ startX = p.clientX; startY = p.clientY; sl = box.offsetLeft; st = box.offsetTop;
195
+ };
196
+ const resizeStart = (e) => {
197
+ e.stopPropagation(); isResize = true; const p = e.type.includes('mouse') ? e : e.touches[0];
198
+ startX = p.clientX; startY = p.clientY; sw = box.offsetWidth; sh = box.offsetHeight;
199
+ };
200
+ const move = (e) => {
201
+ const c = document.getElementById('videoContainer');
202
+ if(!isDrag && !isResize) return;
203
+ if(e.cancelable) e.preventDefault();
204
+ const p = e.type.includes('mouse') ? e : e.touches[0];
205
+ if(isDrag) {
206
+ let nl = sl + (p.clientX - startX); let nt = st + (p.clientY - startY);
207
+ nl = Math.max(0, Math.min(nl, c.clientWidth - box.offsetWidth));
208
+ nt = Math.max(0, Math.min(nt, c.clientHeight - box.offsetHeight));
209
+ box.style.left = nl + 'px'; box.style.top = nt + 'px'; updateCoords(id);
210
+ }
211
+ if(isResize) {
212
+ let nw = sw + (p.clientX - startX); let nh = sh + (p.clientY - startY);
213
+ nw = Math.max(30, nw); nh = Math.max(30, nh);
214
+ box.style.width = nw + 'px'; box.style.height = nh + 'px'; updateCoords(id);
215
+ }
216
+ };
217
+ const end = () => { isDrag = false; isResize = false; };
218
+ box.addEventListener('mousedown', start); box.addEventListener('touchstart', start, {passive: false});
219
+ handle.addEventListener('mousedown', resizeStart); handle.addEventListener('touchstart', resizeStart, {passive: false});
220
+ window.addEventListener('mousemove', move); window.addEventListener('touchmove', move, {passive: false});
221
+ window.addEventListener('mouseup', end); window.addEventListener('touchend', end);
222
+ }
223
+
224
+ document.addEventListener('DOMContentLoaded', () => {
225
+ makeInteractive('blurBox'); makeInteractive('logoBox');
226
+ window.addEventListener('resize', () => { updateCoords('blurBox'); updateCoords('logoBox'); });
227
+ });
228
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  </head>
 
230
  <body>
231
+ <div id="loader">Processing...</div>
232
+ <div class="container">
233
+ <h2>Recap Maker</h2>
234
+ <span class="user-badge">User Session: {{ user_id }}</span>
235
+
236
+ <div id="result-section" class="card" style="border: 2px solid var(--success);">
237
+ <span class="card-title" style="color:var(--success);">✅ Result Video</span>
238
+ <div class="video-box" style="border-color:var(--success);">
239
+ <video id="resultVideo" controls style="width:100%; height:auto;"></video>
240
+ </div>
241
+ <br>
242
+ <a id="downloadBtn" href="#" download class="btn btn-success" style="color:white; font-weight:bold;">⬇️ Download Video</a>
243
+ </div>
244
 
245
+ <div id="view-editor">
246
+ <div class="card">
247
+ <span class="card-title">Video Source</span>
248
+ <div class="grid-2">
249
+ <button id="btnSrcLink" class="btn btn-outline active" onclick="switchSource('link')">🔗 URL Link</button>
250
+ <button id="btnSrcFile" class="btn btn-outline" onclick="switchSource('file')">📂 Upload File</button>
251
+ </div>
252
+ <div id="src-link" style="margin-top:15px;">
253
+ <input type="text" id="videoUrl" placeholder="https://youtube.com/...">
254
+ <button onclick="downloadVideo()" class="btn btn-primary">⬇️ Fetch Video</button>
255
+ </div>
256
+ <div id="src-file" style="margin-top:15px; display:none;">
257
+ <input type="file" id="videoFileInput" style="margin-bottom:10px;">
258
+ <button onclick="uploadVideoFile()" class="btn btn-primary">⬆️ Upload Video</button>
259
+ </div>
260
+ <p id="statusMsg" style="text-align:center; color:var(--accent); margin-top:10px; display:none;"></p>
261
+ <div class="video-box" id="videoContainer">
262
+ <span class="placeholder-text">Video Preview Area</span>
263
+ <div id="blurBox" class="drag-box" style="width:100px; height:50px; background:rgba(239, 68, 68, 0.4); border:2px solid var(--danger);"><div class="resize-handle"></div></div>
264
+ <div id="logoBox" class="drag-box" style="width:80px; height:80px; border:2px dashed var(--success);"><img id="previewLogo" style="width:100%; height:100%; object-fit:contain; pointer-events:none;"><div class="resize-handle"></div></div>
265
+ </div>
266
+ </div>
267
+
268
+ <form id="processForm">
269
+ <input type="hidden" name="video_filename" id="videoFilename">
270
+ <input type="hidden" name="blur_x" id="blur_x" value="0"><input type="hidden" name="blur_y" id="blur_y" value="0">
271
+ <input type="hidden" name="blur_w" id="blur_w" value="0"><input type="hidden" name="blur_h" id="blur_h" value="0">
272
+ <input type="hidden" name="logo_x" id="logo_x" value="0"><input type="hidden" name="logo_y" id="logo_y" value="0">
273
+ <input type="hidden" name="logo_w" id="logo_w" value="100"><input type="hidden" name="logo_h" id="logo_h" value="100">
274
+
275
+ <div class="card">
276
+ <span class="card-title">🛡️ Copyright Bypass Tools</span>
277
+ <div class="grid-2">
278
+ <label class="checkbox-wrapper"><input type="checkbox" name="bypass_flip"> Flip</label>
279
+ <label class="checkbox-wrapper"><input type="checkbox" name="bypass_zoom"> Zoom</label>
280
+ <label class="checkbox-wrapper"><input type="checkbox" name="bypass_speed"> Speed</label>
281
+ <label class="checkbox-wrapper"><input type="checkbox" name="bypass_color"> Color</label>
282
+ </div>
283
+ </div>
284
+
285
+ <div class="switch-group">
286
+ <div style="display:flex; align-items:center; gap:10px;">
287
+ <span style="font-size:20px;">💰</span>
288
+ <div><strong style="color:white;">Monezlation Mode</strong><small style="color:var(--text-muted); display:block;">Sync & Loop (1:10 min)</small></div>
289
+ </div>
290
+ <label class="switch"><input type="checkbox" name="monezlation"><span class="slider"></span></label>
291
+ </div>
292
+ <br>
293
+ <div class="card">
294
+ <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;">
295
+ <span class="card-title" style="margin:0;">AI Dubbing</span>
296
+ <button type="button" id="btnReloadAI" onclick="reloadTranslation()" class="btn btn-outline" style="padding:6px 12px; font-size:12px; width:auto;">↻ Retry AI</button>
297
+ </div>
298
+ <textarea name="ai_text" rows="4" placeholder="Translated Burmese script..."></textarea>
299
+ <select name="voice_gender"><option value="male">Male Voice</option><option value="female">Female Voice</option></select>
300
+ </div>
301
+ <div class="card">
302
+ <span class="card-title">Overlays</span>
303
+ <div style="position:relative; margin-bottom:10px;">
304
+ <label style="color:var(--text-muted); font-size:12px; display:block;">Text Watermark</label>
305
+ <input type="text" name="text_watermark" value="Shine Movie Recap" readonly style="color:var(--accent); background:#1e293b; font-weight:bold;">
306
+ <span style="position:absolute; right:15px; top:35px; font-size:12px; color:var(--accent);">🔒 LOCKED</span>
307
+ </div>
308
+ <label class="checkbox-wrapper" style="margin-bottom:10px;"><input type="checkbox" onclick="toggleBox('blurBox', this.checked)" name="blur_enabled"> Enable Blur Mask (Red Box)</label>
309
+ <label style="color:var(--text-muted); font-size:14px;">Logo Overlay:</label>
310
+ <input type="file" name="logo_file" accept="image/*" onchange="loadLogo(event)">
311
+ </div>
312
+ <button type="button" onclick="startProcessing()" class="btn btn-primary">🚀 START PROCESSING</button>
313
+ </form>
314
  </div>
 
 
 
 
 
 
 
 
 
 
315
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  </body>
317
+ </html>