-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKomariBeautify.html
More file actions
2110 lines (2000 loc) · 81.8 KB
/
KomariBeautify.html
File metadata and controls
2110 lines (2000 loc) · 81.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<style>
::-webkit-scrollbar { width: 5px !important; height: 5px !important; }
::-webkit-scrollbar-track { background-color: transparent !important; }
::-webkit-scrollbar-thumb { background-color: rgba(148, 163, 184, 0.55) !important; border-radius: 8px !important; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(148, 163, 184, 0.85) !important; }
footer {
position: static !important;
background-color: transparent !important;
backdrop-filter: none !important;
box-shadow: none !important;
}
footer p {
color: var(--secondary-foreground) !important;
opacity: 0.7;
}
/* Logo/图片样式 */
header a img[alt="logo"], .bubble-logo-image {
height: 2.5rem;
width: 2.5rem;
border-radius: 50%;
}
.bubble-logo-image {
height: 32px;
width: 32px;
}
/* 气泡/模态框通用容器样式 (共享背景、边框、阴影) */
.welcome-bubble, .custom-alert-modal, .finance-widget {
background-color: var(--purcarte-card-color);
border: 1px solid var(--gray-a5);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 8px 24px var(--gray-a4);
color: var(--gray-12);
}
/* 气泡/模态框通用头部样式 */
.bubble-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
border-bottom: 1px solid var(--gray-a5);
}
.bubble-title {
display: flex;
align-items: center;
gap: 8px;
font-weight: 700;
font-size: 1.1rem;
color: var(--accent-11);
margin: 0;
}
.bubble-close {
background: none;
border: none;
color: var(--gray-20);
cursor: pointer;
font-size: 1.1rem;
padding: 0;
transition: color 0.3s ease, transform 0.3s ease;
}
.bubble-close:hover {
color: var(--accent-9);
transform: rotate(90deg);
}
.bubble-content {
padding: 15px;
}
/* 气泡通用信息行样式 */
.bubble-info {
margin-bottom: 8px;
font-size: 0.85rem;
line-height: 1.5;
display: flex;
align-items: center;
gap: 8px;
}
.bubble-info svg {
flex-shrink: 0;
color: var(--gray-11);
}
.bubble-info:last-child {
margin-bottom: 0;
}
/* 剧透文本样式 */
.spoiler {
background: var(--accent-9);
color: transparent !important;
user-select: none;
cursor: pointer;
border-radius: 4px;
padding: 2px 6px;
transition: all 0.3s ease;
}
.spoiler:hover {
opacity: 0.8;
}
/* 帮助图标/工具提示样式 (HELP ICON/TOOLTIP) */
.help-icon {
cursor: help;
color: var(--gray-10);
display: flex;
align-items: center;
position: relative;
}
.help-icon.show-help {
display: flex;
}
.help-icon:hover {
color: var(--accent-9);
}
.help-icon::after {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
right: -5px;
width: max-content;
max-width: 200px;
padding: 8px 12px;
background-color: var(--purcarte-card-color);
border: 1px solid var(--gray-a5);
border-radius: 8px;
color: var(--gray-12);
font-size: 0.75rem;
line-height: 1.4;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 12px var(--gray-a4);
z-index: 1100;
opacity: 0;
visibility: hidden;
transform: translateY(10px) scale(0.95);
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
pointer-events: none;
white-space: pre-wrap;
text-align: left;
}
.help-icon.active::after {
opacity: 1;
visibility: visible;
transform: translateY(-5px) scale(1);
}
/* 欢迎气泡 (Welcome Bubble) */
.welcome-bubble {
position: fixed;
left: 5px;
bottom: 45px;
z-index: 1050;
max-width: 320px;
border-radius: 16px;
transform: translateY(150%);
opacity: 0;
transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s;
pointer-events: none;
}
.welcome-bubble.show {
transform: translateY(0);
opacity: 1;
pointer-events: auto;
}
/* 资产统计 (Finance Widget) */
/* 容器 */
.finance-widget {
position: fixed;
right: 20px;
top: 70px;
z-index: 1040;
width: 280px;
border-radius: 16px;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
opacity: 0;
transform: translateY(-20px);
pointer-events: none;
}
.finance-widget.show {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
z-index: 1040;
}
/* 悬浮按钮 */
.finance-ball {
position: fixed;
right: 20px;
top: 70px;
width: 45px;
height: 45px;
border-radius: 50%;
background-color: var(--purcarte-card-color);
border: 1px solid var(--gray-a5);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 12px var(--gray-a4);
z-index: 1041;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s ease;
opacity: 0;
transform: scale(0);
pointer-events: none;
color: var(--accent-11);
}
.finance-ball.show {
opacity: 1;
transform: scale(1);
pointer-events: auto;
}
.finance-ball:hover {
transform: scale(1.1);
color: var(--accent-9);
}
/* 统计行 */
.finance-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
font-size: 0.85rem;
}
.finance-row .item-right {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.finance-value {
font-weight: bold;
color: var(--accent-11);
}
/* 分隔线 */
.finance-separator {
height: 1px;
background-color: var(--gray-a5);
margin: 10px 0;
width: 100%;
}
/* 详细列表 */
.finance-list {
max-height: 200px;
overflow-y: auto;
padding-right: 5px;
margin-bottom: 5px;
}
.finance-list-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 6px;
font-size: 0.75rem;
color: var(--gray-11);
}
.finance-list-item .item-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 140px;
color: var(--gray-12);
}
.finance-list-item .item-right {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.finance-list-item .item-value {
font-weight: 500;
color: var(--accent-11);
}
/* 汇率/提示信息 */
.finance-tooltip {
font-size: 0.7rem;
color: var(--gray-11);
margin-top: 2px;
text-align: right;
}
/* 控制区 */
.finance-controls {
display: flex;
gap: 8px;
margin-top: 5px;
padding-top: 10px;
border-top: 1px solid var(--gray-a5);
justify-content: space-between;
align-items: center;
}
.finance-select {
background: transparent;
border: 1px solid var(--gray-a5);
color: var(--gray-12);
border-radius: 4px;
font-size: 0.75rem;
padding: 2px 4px;
outline: none;
}
.finance-btn {
background: transparent;
border: none;
cursor: pointer;
color: var(--gray-11);
transition: color 0.2s;
padding: 2px;
}
.finance-btn:hover {
color: var(--accent-9);
}
.finance-btn.active svg {
color: var(--accent-9);
fill: var(--accent-9);
fill-opacity: 0.2;
}
/* 汇率 */
.finance-exchange-rates {
font-size: 0.7rem;
color: var(--gray-11);
padding: 8px 0;
max-height: 120px;
overflow-y: auto;
}
.finance-rate-item {
display: flex;
justify-content: space-between;
margin-bottom: 4px;
}
.finance-rate-item:last-child {
margin-bottom: 0;
}
.finance-rate-value {
color: var(--accent-11);
font-weight: 500;
}
/* 自定义警告模态框 (Custom Alert Modal) */
/* 警告模态框覆盖层 */
.custom-alert-overlay {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
z-index: 2000; display: none; align-items: center; justify-content: center;
opacity: 0; transition: opacity 0.3s ease;
}
/* 警告模态框内容 */
.custom-alert-modal {
padding: 0; border-radius: 16px; max-width: 350px; width: 90%;
transform: scale(0.95); transition: transform 0.3s ease;
display: flex; flex-direction: column;
}
.alert-reason-text {
font-size: 1.2rem;
font-weight: bold;
margin: 0;
color: var(--red-11);
}
.custom-alert-modal .bubble-content svg {
color: var(--red-9);
}
/* --- 地球渲染组件 (Earth Globe Component) --- */
/* 地球仪悬浮按钮 */
#earth-ball {
top: 125px;
z-index: 1039;
}
/* 地球模态框内容 */
#earth-modal-content {
width: 80vw;
height: 80vh;
max-width: 100%;
background-color: var(--purcarte-card-color);
border: 1px solid var(--gray-a5);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 8px 24px var(--gray-a4);
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
border-radius: 16px;
}
/* 地球渲染区域 */
#earth-render-area {
width: 100%;
height: 100%;
flex: 1;
cursor: grab;
opacity: 0;
transition: opacity 0.5s ease;
background: transparent;
touch-action: none;
position: relative;
overflow: hidden;
}
#earth-render-area.ready {
opacity: 1;
}
#earth-render-area:active {
cursor: grabbing;
}
/* 用户标记点 */
.earth-user-marker {
width: 36px;
height: 36px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.95);
box-shadow: 0 0 15px var(--accent-9), 0 0 30px var(--accent-9);
cursor: pointer;
z-index: 1002;
animation: userPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border: 2px solid var(--accent-9);
}
.earth-user-marker img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
@keyframes userPulse {
0% {
box-shadow: 0 0 0 0 rgba(var(--accent-9-rgb), 0.7);
transform: translate(-50%, -50%) scale(1);
}
50% {
box-shadow: 0 0 0 15px rgba(var(--accent-9-rgb), 0);
transform: translate(-50%, -50%) scale(1.15);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--accent-9-rgb), 0);
transform: translate(-50%, -50%) scale(1);
}
}
/* 旗帜标记点 */
.earth-flag-img {
width: 24px;
height: auto;
display: block;
cursor: pointer;
transform: translate(-50%, -50%);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
filter: drop-shadow(0 0 4px var(--accent-9));
}
/* 地球工具提示 */
#earth-tooltip {
position: absolute;
display: none;
padding: 12px 16px;
background: var(--purcarte-card-color);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--accent-9);
border-radius: 8px;
color: var(--gray-12);
pointer-events: auto;
z-index: 9999;
font-size: 0.85rem;
line-height: 1.5;
box-shadow: 0 8px 24px var(--gray-a4);
max-width: 300px;
min-width: 200px;
}
.earth-tooltip-header {
font-weight: 900;
font-size: 1rem;
margin-bottom: 8px;
color: var(--accent-9);
border-bottom: 1px solid var(--gray-a5);
padding-bottom: 6px;
display: flex;
align-items: center;
gap: 8px;
}
.earth-tooltip-content {
max-height: 200px;
overflow-y: auto;
padding-right: 4px;
}
.earth-tooltip-content::-webkit-scrollbar {
width: 4px;
}
.earth-tooltip-content::-webkit-scrollbar-thumb {
background-color: var(--accent-9);
border-radius: 4px;
}
.earth-tooltip-item {
font-size: 0.95rem;
padding: 4px 0;
color: var(--gray-12);
display: flex;
align-items: center;
gap: 6px;
}
.earth-tooltip-item::before {
content: '•';
color: var(--accent-9);
font-weight: bold;
font-size: 1.4em;
}
/* 计数器覆盖层 */
.earth-overlay-counter {
position: absolute;
top: 20px;
left: 20px;
z-index: 1001;
pointer-events: none;
background: var(--purcarte-card-color);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--gray-a5);
padding: 12px 20px;
border-radius: 12px;
display: flex;
flex-direction: column;
box-shadow: 0 4px 12px var(--gray-a4);
}
.counter-label {
font-size: 0.75rem;
color: var(--gray-11);
text-transform: uppercase;
letter-spacing: 1.5px;
margin-bottom: 4px;
}
.counter-value {
font-size: 2rem;
font-weight: 800;
color: var(--accent-9);
line-height: 1;
}
/* 滚动辅助按钮 (Scroll Helper Buttons) */
.scroll-helper-btn {
position: fixed;
right: 20px;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--purcarte-card-color);
border: 1px solid var(--gray-a5);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
box-shadow: 0 4px 12px var(--gray-a4);
z-index: 1040;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
opacity: 0;
transform: scale(0) translateY(10px);
pointer-events: none;
color: var(--accent-11);
}
.scroll-helper-btn.show {
opacity: 1;
transform: scale(1) translateY(0);
pointer-events: auto;
}
.scroll-helper-btn:hover {
transform: scale(1.1);
color: var(--accent-9);
border-color: var(--accent-9);
}
#scroll-to-bottom {
bottom: 20px;
}
#scroll-to-top {
bottom: 70px;
}
/* 移动设备 (小于 576px) */
@media (max-width: 576px) {
.welcome-bubble { max-width: calc(100vw - 30px); left: 15px; bottom: 15px; }
.finance-widget { width: calc(100vw - 40px); right: 20px; }
.scroll-helper-btn { right: 15px; width: 36px; height: 36px; }
#scroll-to-bottom { bottom: 15px; }
#scroll-to-top { bottom: 60px; }
}
/* 平板设备 (小于 768px) - 主要针对地球组件 */
@media (max-width: 768px) {
#earth-modal-content {
width: 95vw;
height: 75vh;
max-width: none;
border-radius: 16px;
}
.earth-overlay-counter {
top: 10px;
left: 10px;
padding: 8px 12px;
}
.counter-label {
font-size: 0.65rem;
}
.counter-value {
font-size: 1.5rem;
}
.earth-user-marker {
width: 28px;
height: 28px;
}
}
</style>
<!--欢迎气泡 (Welcome Bubble)-->
<div id="welcome-bubble-container" class="welcome-bubble">
<div class="bubble-header">
<h3 class="bubble-title">
<img src="/favicon.ico" class="bubble-logo-image">
阿米诺斯
</h3>
<button class="bubble-close" id="bubbleClose">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
</svg>
</button>
</div>
<div class="bubble-content">
<p class="bubble-info" id="location">欢迎你,朋友!</p>
<p class="bubble-info" id="os">
<span id="os-icon"></span>
<span class="data-text"></span>
</p>
<p class="bubble-info" id="browser">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"></path><path d="M2 12h20"></path></svg>
<span class="data-text"></span>
</p>
<p class="bubble-info" id="ip">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"></path><circle cx="12" cy="10" r="3"></circle></svg>
<span class="data-text"></span>
</p>
<p class="bubble-info" id="isp">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10"></path></svg>
<span class="data-text"></span>
</p>
<p class="bubble-info" id="date">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
<span class="data-text"></span>
</p>
</div>
</div>
<!--资产统计 (Finance Widget)-->
<div id="finance-widget" class="finance-widget">
<div class="bubble-header">
<h3 class="bubble-title">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"/><path d="M12 18V6"/></svg>
资产统计
</h3>
<button class="bubble-close" id="financeClose">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
</svg>
</button>
</div>
<div class="bubble-content">
<div class="finance-row">
<span>服务器数量</span>
<span class="finance-value" id="fin-total-count">...</span>
</div>
<div class="finance-row">
<span>总价值</span>
<span class="finance-value" id="fin-total-price">...</span>
</div>
<div class="finance-row">
<span>月均支出</span>
<span class="finance-value" id="fin-monthly-price">...</span>
</div>
<div class="finance-row">
<span>剩余总价值</span>
<div class="item-right">
<span class="finance-value" id="fin-remain-value">...</span>
<div class="help-icon" id="fin-remain-help">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><path d="M12 17h.01"/></svg>
</div>
</div>
</div>
<div class="finance-separator"></div>
<div id="fin-detail-list" class="finance-list">
</div>
<div class="finance-tooltip" id="fin-ex-rate">汇率更新中...</div>
<div class="finance-separator"></div>
<div id="fin-exchange-rates" class="finance-exchange-rates"></div>
<div class="finance-controls">
<div style="display: flex; gap: 8px;">
<select id="fin-currency" class="finance-select">
<option value="CNY">CNY (¥)</option>
<option value="USD">USD ($)</option>
<option value="HKD">HKD (HK$)</option>
<option value="EUR">EUR (€)</option>
<option value="GBP">GBP (£)</option>
<option value="JPY">JPY (¥)</option>
</select>
<select id="fin-sort" class="finance-select">
<option value="weight_asc">权重 正序</option>
<option value="weight_desc">权重 倒序</option>
<option value="price_asc">价格 正序</option>
<option value="price_desc">价格 倒序</option>
</select>
</div>
<div style="display:flex; gap:5px;">
<button class="finance-btn" id="fin-toggle-free" title="排除白嫖/计入白嫖">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 5c-1.5 0-2.8 0.6-3.8 1.6l-1.2 1.2-1.2-1.2C11.8 5.6 10.5 5 9 5 5.5 5 3 7.6 3 11c0 3.5 3 7.6 9 13 6-5.4 9-9.5 9-13 0-3.4-2.5-6-6-6z"/></svg>
</button>
<button class="finance-btn" id="fin-refresh" title="刷新数据">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.5 2v6h-6M21.34 15.57a10 10 0 1 1-.57-8.38"/></svg>
</button>
</div>
</div>
</div>
</div>
<!--资产悬浮球 (Finance Ball)-->
<div id="finance-ball" class="finance-ball">
<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"><circle cx="12" cy="12" r="10"/><path d="M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8"/><path d="M12 18V6"/></svg>
</div>
<!--地球组件 (Earth Modal Overlay)-->
<div id="earth-modal-overlay" class="custom-alert-overlay">
<div id="earth-modal-content" class="custom-alert-modal">
<div class="earth-overlay-counter">
<span class="counter-label">Total Servers</span>
<span class="counter-value" id="earth-total-count">0</span>
</div>
<div id="earth-render-area"></div>
<div id="earth-tooltip"></div>
</div>
</div>
<!--地球悬浮球 (Earth Ball)-->
<div id="earth-ball" class="finance-ball">
<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">
<circle cx="12" cy="12" r="10"></circle>
<path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
</svg>
</div>
<!--滚动辅助按钮 (Scroll Helper Buttons)-->
<div id="scroll-to-top" class="scroll-helper-btn" title="Top">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m18 15-6-6-6 6"/>
</svg>
</div>
<div id="scroll-to-bottom" class="scroll-helper-btn" title="Bottom">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="m6 9 6 6 6-6"/>
</svg>
</div>
<!--自定义警告 (Custom Alert Overlay)-->
<div id="custom-alert-overlay" class="custom-alert-overlay">
<div id="custom-alert-modal" class="custom-alert-modal">
<div class="bubble-header">
<h3 class="bubble-title">
<img src="/favicon.ico" class="bubble-logo-image">
警告
</h3>
<button class="bubble-close" id="alert-close-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
</svg>
</button>
</div>
<div class="bubble-content" style="display: flex; flex-direction: column; align-items: center;">
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" fill="currentColor" viewBox="0 0 16 16" style="margin-bottom: 1rem;">
<path d="M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.89 0 1.438-.99.982-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
</svg>
<div class="alert-reason-container">
<p id="trigger-reason" class="alert-reason-text"></p>
</div>
</div>
</div>
</div>
<script src="//unpkg.com/globe.gl"></script>
<script>
//保护组件 (Protection)
function initializeProtection() {
const overlay = document.getElementById('custom-alert-overlay');
const modal = document.getElementById('custom-alert-modal');
const closeBtn = document.getElementById('alert-close-btn');
const reasonEl = document.getElementById('trigger-reason');
if (!overlay || !closeBtn || !modal || !reasonEl) return;
const style = document.createElement('style');
style.innerHTML = `* { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }`;
document.head.appendChild(style);
let isAlertShown = false;
let redirectTimer;
function triggerRedirect() {
window.open("about:blank", "_self" )
}
function showCustomAlert(reason) {
if (isAlertShown) return;
isAlertShown = true;
reasonEl.textContent = reason;
overlay.style.display = 'flex';
setTimeout(() => {
overlay.style.opacity = '1';
modal.style.transform = 'scale(1)';
}, 10);
redirectTimer = setTimeout(triggerRedirect, 3000);
}
closeBtn.addEventListener('click', () => {
clearTimeout(redirectTimer);
triggerRedirect();
});
document.addEventListener('contextmenu', event => {
event.preventDefault();
showCustomAlert('右键菜单');
});
document.addEventListener('keydown', event => {
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
let reason = '';
if (event.key === 'F12') reason = '异常行为: F12';
else if (event.ctrlKey && event.shiftKey && ['I', 'J', 'C'].includes(event.key.toUpperCase())) reason = `异常行为: Ctrl+Shift+${event.key.toUpperCase()}`;
else if (event.ctrlKey && event.key.toUpperCase() === 'U') reason = 'Ctrl+U 查看源代码';
else if ((event.ctrlKey || event.metaKey) && event.key.toUpperCase() === 'S') reason = '异常行为: Ctrl/Cmd+S';
else if ((event.ctrlKey || event.metaKey) && event.key.toUpperCase() === 'P') reason = '异常行为: Ctrl/Cmd+P';
else if ((event.ctrlKey || event.metaKey) && event.key.toUpperCase() === 'A') reason = '异常行为: Ctrl/Cmd+A';
else if ((event.ctrlKey || event.metaKey) && event.key.toUpperCase() === 'C') reason = '异常行为: Ctrl/Cmd+C';
else if (isMac && event.metaKey && event.altKey && ['I', 'J', 'C'].includes(event.key.toUpperCase())) reason = `异常行为: Cmd+Option+${event.key.toUpperCase()}`;
if (reason) {
event.preventDefault();
showCustomAlert(reason);
}
});
document.addEventListener('copy', event => {
event.preventDefault();
showCustomAlert('异常行为: 复制');
});
document.addEventListener('dragstart', event => {
event.preventDefault();
showCustomAlert('异常行为: 拖拽内容');
});
window.addEventListener('beforeprint', () => {
showCustomAlert('异常行为: 打印页面');
});
function detectSuspiciousExtensions() {
const suspiciousKeys = ['__REACT_DEVTOOLS_GLOBAL_HOOK__', 'webpackJsonp', 'jQuery321'];
const found = suspiciousKeys.some(key => key in window);
const injected = Array.from(document.querySelectorAll('script[src]')).some(s =>
/^(chrome|moz|safari)-extension:\/\//.test(s.src)
);
const suspiciousDOM = Array.from(document.querySelectorAll('[id],[class]')).some(el => {
const txt = (el.id + ' ' + el.className).toLowerCase();
return txt.includes('supercopy') || txt.includes('copy');
});
return found || injected || suspiciousDOM;
}
function detectHeadless() {
return navigator.webdriver || /HeadlessChrome/.test(navigator.userAgent);
}
function detectDevtoolsOpen() {
const threshold = 160;
return (window.outerWidth - window.innerWidth > threshold) ||
(window.outerHeight - window.innerHeight > threshold);
}
function setupDomTamperDetection() {
const observer = new MutationObserver(mutations => {
for (const m of mutations) {
if (m.addedNodes.length > 0) {
m.addedNodes.forEach(node => {
if (node.nodeType === 1) {
const txt = (node.id + ' ' + node.className).toLowerCase();
if (/supercopy|copy|extension|tamper/i.test(txt)) {
showCustomAlert('环境异常: 可疑 DOM 注入');
}
}
});
}
}
});
observer.observe(document.documentElement, { childList: true, subtree: true });
}
setupDomTamperDetection();
setInterval(() => {
const startTime = Date.now();
debugger;
const endTime = Date.now();
if (endTime - startTime > 100) {
showCustomAlert('环境异常: 调试模式');
}
if (detectSuspiciousExtensions()) {
showCustomAlert('环境异常: 可疑扩展');
}
if (detectHeadless()) {
showCustomAlert('环境异常: 无头浏览器');
}
if (detectDevtoolsOpen()) {
showCustomAlert('环境异常: 开发者工具窗口');
}
}, 500);
}
// 欢迎组件 (Welcome)
function initializeWelcomeBubble() {
if (window.welcomeBubbleInitialized) return;
window.welcomeBubbleInitialized = true;
const bubbleClose = document.getElementById('bubbleClose');
if (bubbleClose) {
bubbleClose.addEventListener('click', function() {
const welcomeBubble = document.getElementById('welcome-bubble-container');
if (welcomeBubble) welcomeBubble.classList.remove('show');
});
}
window.currentUserGeo = { lat: 35.8617, lng: 104.1954, city: 'Unknown' };
async function fetchIpAndInfo() {
if (window.ipInfoFetched) return;
window.ipInfoFetched = true;
const welcomeBubble = document.getElementById('welcome-bubble-container');
const locationEl = document.getElementById('location');
const ipEl = document.querySelector('#ip .data-text');
const ispEl = document.querySelector('#isp .data-text');
const browserEl = document.querySelector('#browser .data-text');
const dateEl = document.querySelector('#date .data-text');
const osEl = document.querySelector('#os .data-text');
let ipHidden = false;
let ispHidden = false;
if (!welcomeBubble || !locationEl || !ipEl || !ispEl || !browserEl || !dateEl) return;
function getOperatingSystem(userAgent) {
if (/android/i.test(userAgent)) return "Android";
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) return "iOS";
if (/macintosh|mac os x/i.test(userAgent)) return "macOS";
if (/windows phone/i.test(userAgent)) return "Windows Phone";
if (/windows/i.test(userAgent)) return "Windows";
if (/linux/i.test(userAgent)) return "Linux";
return "未知设备";
}
if (osEl) {
const osName = getOperatingSystem(navigator.userAgent);
osEl.textContent = osName;
const osIconEl = document.getElementById('os-icon');
if (osIconEl) {
const osLower = osName.toLowerCase();
let iconSVG = '';
if (osLower.includes('windows')) {
iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.9-1.801"/></svg>';
} else if (osLower.includes('mac') || osLower.includes('ios')) {
iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/></svg>';
} else if (osLower.includes('android')) {
iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M17.6 9.48l1.84-3.18c.16-.31.04-.69-.26-.85a.637.637 0 0 0-.83.22l-1.88 3.24a11.43 11.43 0 0 0-8.94 0L5.65 5.67a.643.643 0 0 0-.87-.2c-.28.18-.37.54-.22.83L6.4 9.48A10.81 10.81 0 0 0 1 18h22a10.81 10.81 0 0 0-5.4-8.52zM7 15.25a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5zm10 0a1.25 1.25 0 1 1 0-2.5 1.25 1.25 0 0 1 0 2.5z"/></svg>';
} else if (osLower.includes('linux')) {
iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12.504 0c-.155 0-.315.008-.48.021-4.226.333-3.105 4.807-3.17 6.298-.076 1.092-.3 1.953-1.05 3.02-.885 1.051-2.127 2.75-2.716 4.521-.278.832-.41 1.684-.287 2.489.035.218.094.399.134.54.028.096.063.182.102.258.165.315.435.659.78 1.055 1.66 1.916 5.5 2.444 7.927 2.04.141-.024.195-.093.227-.148.03-.054.046-.117.05-.182.007-.129-.026-.228-.065-.31-.09-.189-.241-.352-.415-.495-.34-.28-.773-.524-1.228-.773-1.017-.557-2.141-1.154-2.141-1.154l-.002-.001c-.076-.045-.154-.09-.232-.135-.309-.178-.617-.357-.925-.535-.77-.446-1.542-.893-2.314-1.339l-.012-.007c-.102-.06-.205-.119-.307-.179l-.01-.006c-.822-.478-1.644-.957-2.466-1.436-.051-.03-.102-.06-.153-.089-.41-.239-.82-.478-1.23-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.411-.239-.821-.478-1.232-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.41-.239-.82-.478-1.231-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.411-.239-.821-.478-1.232-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.411-.239-.821-.478-1.232-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.411-.239-.821-.478-1.232-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716-.051-.03-.102-.06-.153-.089-.41-.239-.82-.478-1.231-.717-.05-.029-.101-.059-.152-.088-.41-.239-.82-.478-1.231-.716-.051-.03-.102-.06-.153-.09-.41-.238-.82-.477-1.23-.716z"/></svg>';
} else {
iconSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>';
}
osIconEl.innerHTML = iconSVG;
}
}
let city = '', region = '', country = '', isp = '', ip = '';
const strategies = [
{
'name': 'api.ip.sb',
'url': 'https://api.ip.sb/geoip',
'check_success': (j) => 'country' in j,