This repository has been archived by the owner on May 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
LoriDashboard.js
2013 lines (2013 loc) · 94.9 KB
/
LoriDashboard.js
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
if (typeof kotlin === 'undefined') {
throw new Error("Error loading module 'LoriDashboard'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'LoriDashboard'.");
}
if (typeof this['kotlinx-html-js'] === 'undefined') {
throw new Error("Error loading module 'LoriDashboard'. Its dependency 'kotlinx-html-js' was not found. Please, check whether 'kotlinx-html-js' is loaded prior to 'LoriDashboard'.");
}
if (typeof LoriUtils === 'undefined') {
throw new Error("Error loading module 'LoriDashboard'. Its dependency 'LoriUtils' was not found. Please, check whether 'LoriUtils' is loaded prior to 'LoriDashboard'.");
}
var LoriDashboard = function (_, Kotlin, $module$kotlinx_html_js, $module$LoriUtils) {
'use strict';
var equals = Kotlin.equals;
var StringBuilder = Kotlin.kotlin.text.StringBuilder;
var appendHTML = $module$kotlinx_html_js.kotlinx.html.stream.appendHTML_9kwp7w$;
var anonymous = $module$LoriUtils;
var Unit = Kotlin.kotlin.Unit;
var h2 = $module$kotlinx_html_js.kotlinx.html.h2_eh5gi3$;
var p = $module$kotlinx_html_js.kotlinx.html.p_8pggrc$;
var div = $module$kotlinx_html_js.kotlinx.html.div_ri36nr$;
var set_style = $module$kotlinx_html_js.kotlinx.html.set_style_ueiko3$;
var ins = $module$kotlinx_html_js.kotlinx.html.ins_g1dqgd$;
var script = $module$kotlinx_html_js.kotlinx.html.script_fglb7v$;
var img = $module$kotlinx_html_js.kotlinx.html.img_evw26v$;
var hr = $module$kotlinx_html_js.kotlinx.html.hr_17yvwq$;
var joinToString = Kotlin.kotlin.collections.joinToString_cgipc5$;
var div_0 = $module$kotlinx_html_js.kotlinx.html.div_59el9d$;
var println = Kotlin.kotlin.io.println_s8jyv4$;
var jq = $module$LoriUtils.jq_61zpoe$;
var Kind_OBJECT = Kotlin.Kind.OBJECT;
var throwUPAE = Kotlin.throwUPAE;
var toString = Kotlin.toString;
var contains = Kotlin.kotlin.collections.contains_mjy6jw$;
var replace = Kotlin.kotlin.text.replace_680rmw$;
var json = Kotlin.kotlin.js.json_pyyo18$;
var lazy = Kotlin.kotlin.lazy_klfg04$;
var listOf = Kotlin.kotlin.collections.listOf_mh5how$;
var listOf_0 = Kotlin.kotlin.collections.listOf_i5x0yv$;
var hashCode = Kotlin.hashCode;
var throwCCE = Kotlin.throwCCE;
var toInt = Kotlin.kotlin.text.toInt_pdl1vz$;
var roundToInt = Kotlin.kotlin.math.roundToInt_yrwdxr$;
var last = Kotlin.kotlin.collections.last_2p1efm$;
var numberToInt = Kotlin.numberToInt;
var Kind_CLASS = Kotlin.Kind.CLASS;
var to = Kotlin.kotlin.to_ujzrz7$;
var mapOf = Kotlin.kotlin.collections.mapOf_qfcya0$;
var Enum = Kotlin.kotlin.Enum;
var throwISE = Kotlin.throwISE;
ModerationConfig$PunishmentAction.prototype = Object.create(Enum.prototype);
ModerationConfig$PunishmentAction.prototype.constructor = ModerationConfig$PunishmentAction;
CommandCategory.prototype = Object.create(Enum.prototype);
CommandCategory.prototype.constructor = CommandCategory;
LorittaPartner$Keyword.prototype = Object.create(Enum.prototype);
LorittaPartner$Keyword.prototype.constructor = LorittaPartner$Keyword;
LorittaPartner$Language.prototype = Object.create(Enum.prototype);
LorittaPartner$Language.prototype.constructor = LorittaPartner$Language;
LorittaPartner$Type.prototype = Object.create(Enum.prototype);
LorittaPartner$Type.prototype.constructor = LorittaPartner$Type;
function CommandsView() {
CommandsView_instance = this;
}
function CommandsView$start$lambda$lambda$addCommandInformation$lambda$lambda(closure$category) {
return function ($receiver) {
$receiver.unaryPlus_pdl1vz$(anonymous.locale.get_25kzsl$(closure$category.fancyTitle, []));
return Unit;
};
}
function CommandsView$start$lambda$lambda$addCommandInformation$lambda$lambda_0(closure$category) {
return function ($receiver) {
$receiver.unaryPlus_pdl1vz$(anonymous.locale.get_25kzsl$(closure$category.description, []));
return Unit;
};
}
function CommandsView$start$lambda$lambda$addCommandInformation$lambda(closure$category) {
return function ($receiver) {
h2($receiver, 'sectionHeader', CommandsView$start$lambda$lambda$addCommandInformation$lambda$lambda(closure$category));
p($receiver, void 0, CommandsView$start$lambda$lambda$addCommandInformation$lambda$lambda_0(closure$category));
return Unit;
};
}
function CommandsView$start$lambda$lambda$addCommandInformation(closure$category, this$) {
return function () {
div(this$, 'sectionText', CommandsView$start$lambda$lambda$addCommandInformation$lambda(closure$category));
};
}
function CommandsView$start$lambda$lambda$lambda$lambda($receiver) {
set_style($receiver, 'display:block');
$receiver.attributes.put_xwzc9p$('data-ad-client', 'ca-pub-9989170954243288');
$receiver.attributes.put_xwzc9p$('data-ad-slot', '4611100335');
$receiver.attributes.put_xwzc9p$('data-ad-format', 'auto');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda_0($receiver) {
$receiver.unaryPlus_pdl1vz$('(adsbygoogle = window.adsbygoogle || []).push({});');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda($receiver) {
set_style($receiver, 'width: 100%;');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda(closure$image) {
return function ($receiver) {
img($receiver, null, closure$image.v, 'animate-on-scroll-left is-invisible', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda);
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$addCommandInformation) {
return function ($receiver) {
closure$addCommandInformation();
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$addCommandInformation) {
return function ($receiver) {
closure$addCommandInformation();
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda_0($receiver) {
set_style($receiver, 'width: 100%;');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_2(closure$image) {
return function ($receiver) {
img($receiver, null, closure$image.v, 'animate-on-scroll-right is-invisible', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda_0);
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda(closure$index, closure$image, closure$addCommandInformation) {
return function ($receiver) {
if (closure$index % 2 === 0) {
div($receiver, 'pure-u-1 pure-u-md-1-4', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda(closure$image));
div($receiver, 'pure-u-1 pure-u-md-3-4', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_0(closure$addCommandInformation));
}
else {
div($receiver, 'pure-u-1 pure-u-md-3-4', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_1(closure$addCommandInformation));
div($receiver, 'pure-u-1 pure-u-md-1-4', CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_2(closure$image));
}
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda_1(closure$index, closure$image, closure$addCommandInformation) {
return function ($receiver) {
div($receiver, 'pure-g vertically-centered-content', CommandsView$start$lambda$lambda$lambda$lambda$lambda(closure$index, closure$image, closure$addCommandInformation));
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda_2($receiver) {
set_style($receiver, 'display:block');
$receiver.attributes.put_xwzc9p$('data-ad-client', 'ca-pub-9989170954243288');
$receiver.attributes.put_xwzc9p$('data-ad-slot', '4611100335');
$receiver.attributes.put_xwzc9p$('data-ad-format', 'auto');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda_3($receiver) {
$receiver.unaryPlus_pdl1vz$('(adsbygoogle = window.adsbygoogle || []).push({});');
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda_4($receiver) {
return Unit;
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_3(closure$command, closure$usage) {
return function ($receiver) {
set_style($receiver, 'font-weight: bold; font-size: 1.1em;');
$receiver.unaryPlus_pdl1vz$('+' + closure$command.label + ' ' + closure$usage.v);
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda_1(it) {
return '+' + it;
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_4(closure$command) {
return function ($receiver) {
set_style($receiver, 'opacity: 0.6;');
$receiver.unaryPlus_pdl1vz$(joinToString(closure$command.aliases, ', ', void 0, void 0, void 0, void 0, CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda$lambda_1));
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_5(closure$command) {
return function ($receiver) {
$receiver.unaryPlus_pdl1vz$(closure$command.description);
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda$lambda_0(closure$command) {
return function ($receiver) {
var tmp$;
var usage = {v: (tmp$ = closure$command.usage) != null ? tmp$ : ''};
p($receiver, void 0, CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_3(closure$command, usage));
p($receiver, void 0, CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_4(closure$command));
p($receiver, void 0, CommandsView$start$lambda$lambda$lambda$lambda$lambda$lambda_5(closure$command));
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda$lambda_5(closure$filteredCommands) {
return function ($receiver) {
var tmp$;
tmp$ = closure$filteredCommands.iterator();
while (tmp$.hasNext()) {
var command = tmp$.next();
div($receiver, 'pure-u-1 pure-u-md-1-2', CommandsView$start$lambda$lambda$lambda$lambda$lambda_0(command));
}
return Unit;
};
}
function CommandsView$start$lambda$lambda$lambda(closure$index, closure$image, closure$addCommandInformation, closure$filteredCommands) {
return function ($receiver) {
ins($receiver, 'adsbygoogle', CommandsView$start$lambda$lambda$lambda$lambda);
script($receiver, void 0, void 0, CommandsView$start$lambda$lambda$lambda$lambda_0);
div($receiver, 'vertically-centered-content', CommandsView$start$lambda$lambda$lambda$lambda_1(closure$index, closure$image, closure$addCommandInformation));
ins($receiver, 'adsbygoogle', CommandsView$start$lambda$lambda$lambda$lambda_2);
script($receiver, void 0, void 0, CommandsView$start$lambda$lambda$lambda$lambda_3);
hr($receiver, void 0, CommandsView$start$lambda$lambda$lambda$lambda_4);
div($receiver, 'pure-g', CommandsView$start$lambda$lambda$lambda$lambda_5(closure$filteredCommands));
return Unit;
};
}
function CommandsView$start$lambda$lambda(closure$category, closure$index, closure$image, closure$filteredCommands) {
return function ($receiver) {
var addCommandInformation = CommandsView$start$lambda$lambda$addCommandInformation(closure$category, $receiver);
div($receiver, 'contentWrapper', CommandsView$start$lambda$lambda$lambda(closure$index, closure$image, addCommandInformation, closure$filteredCommands));
return Unit;
};
}
var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;
function CommandsView$start$lambda(data, b, c) {
var tmp$;
LoriDashboard_getInstance().hideLoadingBar();
var commands = toJson(data);
tmp$ = CommandCategory$values();
for (var index = 0; index !== tmp$.length; ++index) {
var category = tmp$[index];
var tmp$_0, tmp$_1;
var destination = ArrayList_init();
var tmp$_2;
for (tmp$_2 = 0; tmp$_2 !== commands.length; ++tmp$_2) {
var element = commands[tmp$_2];
if (equals(element.category.toString(), category.toString()))
destination.add_11rb$(element);
}
var filteredCommands = destination;
var stringBuilder = new StringBuilder();
switch (category.name) {
case 'SOCIAL':
tmp$_0 = 'https://loritta.website/assets/img/social.png';
break;
case 'POKEMON':
tmp$_0 = 'https://loritta.website/assets/img/pokemon.png';
break;
case 'MINECRAFT':
tmp$_0 = 'https://loritta.website/assets/img/loritta_pudim.png';
break;
case 'FUN':
tmp$_0 = 'https://loritta.website/assets/img/vieirinha.png';
break;
case 'UTILS':
tmp$_0 = 'https://loritta.website/assets/img/utils.png';
break;
case 'MUSIC':
tmp$_0 = 'https://loritta.website/assets/img/loritta_headset.png';
break;
case 'ANIME':
tmp$_0 = 'https://loritta.website/assets/img/loritta_anime.png';
break;
default:tmp$_0 = 'https://loritta.website/assets/img/loritta_gabizinha_v1.png';
break;
}
var image = {v: tmp$_0};
div_0(appendHTML(stringBuilder), index % 2 === 0 ? 'evenWrapper' : 'oddWrapper', CommandsView$start$lambda$lambda(category, index, image, filteredCommands));
tmp$_1 = filteredCommands.iterator();
while (tmp$_1.hasNext()) {
var cmd = tmp$_1.next();
}
println(category);
jq('#wrapper').append(stringBuilder.toString());
}
return Unit;
}
CommandsView.prototype.start = function () {
LoriDashboard_getInstance().showLoadingBar_pdl1vj$('Carregando...');
jQuery.post('https://loritta.website/api/v1/misc/get-commands', CommandsView$start$lambda);
};
CommandsView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'CommandsView',
interfaces: []
};
var CommandsView_instance = null;
function CommandsView_getInstance() {
if (CommandsView_instance === null) {
new CommandsView();
}
return CommandsView_instance;
}
function ConfigureAutoroleView() {
ConfigureAutoroleView_instance = this;
this.serverConfig_jibg2x$_0 = this.serverConfig_jibg2x$_0;
}
Object.defineProperty(ConfigureAutoroleView.prototype, 'serverConfig', {
get: function () {
if (this.serverConfig_jibg2x$_0 == null)
return throwUPAE('serverConfig');
return this.serverConfig_jibg2x$_0;
},
set: function (serverConfig) {
this.serverConfig_jibg2x$_0 = serverConfig;
}
});
var wrapFunction = Kotlin.wrapFunction;
var mapNotNullTo$lambda = wrapFunction(function () {
return function (closure$transform, closure$destination) {
return function (element) {
var tmp$;
if ((tmp$ = closure$transform(element)) != null) {
closure$destination.add_11rb$(tmp$);
}
return Unit;
};
};
});
function ConfigureAutoroleView$start$lambda(this$ConfigureAutoroleView) {
return function (data, b, c) {
LoriDashboard_getInstance().hideLoadingBar();
println('Data: ' + toString(data));
this$ConfigureAutoroleView.serverConfig = JSON.parse(data);
var $receiver = this$ConfigureAutoroleView.serverConfig.roles;
var destination = ArrayList_init();
var tmp$;
for (tmp$ = 0; tmp$ !== $receiver.length; ++tmp$) {
var element = $receiver[tmp$];
if (!element.isPublicRole)
destination.add_11rb$(element);
}
var tmp$_0;
tmp$_0 = destination.iterator();
while (tmp$_0.hasNext()) {
var element_0 = tmp$_0.next();
var this$ConfigureAutoroleView_0 = this$ConfigureAutoroleView;
var option = jq('<option>').attr('value', element_0.id).text(element_0.name);
if (!element_0.canInteract || element_0.isManaged || contains(this$ConfigureAutoroleView_0.serverConfig.autoroleConfig.roles, element_0.id)) {
option.attr('disabled', 'disabled');
}
jq('#chooseRole').append(option);
}
var $receiver_0 = this$ConfigureAutoroleView.serverConfig.autoroleConfig.roles;
var destination_0 = ArrayList_init();
var tmp$_1;
for (tmp$_1 = 0; tmp$_1 !== $receiver_0.length; ++tmp$_1) {
var element_1 = $receiver_0[tmp$_1];
var tmp$_0_0;
var $receiver_1 = this$ConfigureAutoroleView.serverConfig.roles;
var firstOrNull$result;
firstOrNull$break: do {
var tmp$_2;
for (tmp$_2 = 0; tmp$_2 !== $receiver_1.length; ++tmp$_2) {
var element_2 = $receiver_1[tmp$_2];
if (equals(element_2.id, element_1)) {
firstOrNull$result = element_2;
break firstOrNull$break;
}
}
firstOrNull$result = null;
}
while (false);
if ((tmp$_0_0 = firstOrNull$result) != null) {
destination_0.add_11rb$(tmp$_0_0);
}
}
var roleList = destination_0;
var tmp$_3;
tmp$_3 = roleList.iterator();
while (tmp$_3.hasNext()) {
var element_3 = tmp$_3.next();
this$ConfigureAutoroleView.addRoleToAutoroleList_xat1sd$(element_3);
}
LoriDashboard_getInstance().applyBlur_puj7f4$('#hiddenIfDisabled', '#cmn-toggle-1');
return Unit;
};
}
ConfigureAutoroleView.prototype.start = function () {
LoriDashboard_getInstance().showLoadingBar_pdl1vj$('Carregando...');
jQuery.post('https://loritta.website/api/v1/config/get-server-config?guildId=' + guildId, ConfigureAutoroleView$start$lambda(this));
};
function ConfigureAutoroleView$addRoleToAutoroleList$lambda(closure$tr) {
return function (it) {
closure$tr.remove();
return Unit;
};
}
ConfigureAutoroleView.prototype.addRoleToAutoroleList_xat1sd$ = function (role) {
var tr = jq('<tr>').append(jq('<td>').text(role.name).attr('role-id', role.id).addClass('role-entry'));
tr.click(ConfigureAutoroleView$addRoleToAutoroleList$lambda(tr));
jq('#roleTable').append(tr);
};
ConfigureAutoroleView.prototype.addRoleFromSelection = function () {
var roleId = jq('#chooseRole').val();
var $receiver = this.serverConfig.roles;
var firstOrNull$result;
firstOrNull$break: do {
var tmp$;
for (tmp$ = 0; tmp$ !== $receiver.length; ++tmp$) {
var element = $receiver[tmp$];
if (equals(element.id, roleId)) {
firstOrNull$result = element;
break firstOrNull$break;
}
}
firstOrNull$result = null;
}
while (false);
var role = firstOrNull$result;
if (role != null) {
this.addRoleToAutoroleList_xat1sd$(role);
}
};
function ConfigureAutoroleView$prepareSave$lambda$lambda(closure$roles) {
return function (index, elem) {
var el = jQuery(elem);
var entry = el.find('.role-entry');
return closure$roles.add_11rb$(entry.attr('role-id'));
};
}
function ConfigureAutoroleView$prepareSave$lambda(payload) {
var roles = ArrayList_init();
var rolesVoteRewards = ArrayList_init();
jq('#roleTable').children().each(ConfigureAutoroleView$prepareSave$lambda$lambda(roles));
payload['roles'] = roles;
payload['rolesVoteRewards'] = rolesVoteRewards;
return Unit;
}
ConfigureAutoroleView.prototype.prepareSave = function () {
SaveStuff_getInstance().prepareSave('autorole', ConfigureAutoroleView$prepareSave$lambda);
};
ConfigureAutoroleView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'ConfigureAutoroleView',
interfaces: []
};
var ConfigureAutoroleView_instance = null;
function ConfigureAutoroleView_getInstance() {
if (ConfigureAutoroleView_instance === null) {
new ConfigureAutoroleView();
}
return ConfigureAutoroleView_instance;
}
function ConfigureModerationView() {
ConfigureModerationView_instance = this;
}
function ConfigureModerationView$start$lambda$lambda(this$ConfigureModerationView) {
return function (it) {
this$ConfigureModerationView.addPunishment_a3smtl$(new ModerationConfig$WarnAction(1, ModerationConfig$PunishmentAction$BAN_getInstance(), null));
return Unit;
};
}
function ConfigureModerationView$start$lambda(this$ConfigureModerationView) {
return function (data, b, c) {
var tmp$, tmp$_0;
LoriDashboard_getInstance().hideLoadingBar();
println('Data: ' + toString(data));
var serverConfig = JSON.parse(data);
tmp$ = serverConfig.moderationConfig.punishmentActions;
for (tmp$_0 = 0; tmp$_0 !== tmp$.length; ++tmp$_0) {
var punishment = tmp$[tmp$_0];
this$ConfigureModerationView.addPunishment_a3smtl$(punishment);
}
LoriDashboard_getInstance().applyBlur_puj7f4$('#hiddenIfDisabled', '#cmn-toggle-2');
return jq('.add-new-action').click(ConfigureModerationView$start$lambda$lambda(this$ConfigureModerationView));
};
}
ConfigureModerationView.prototype.start = function () {
LoriDashboard_getInstance().showLoadingBar_pdl1vj$('Carregando...');
jQuery.post('https://loritta.website/api/v1/config/get-server-config?guildId=' + guildId, ConfigureModerationView$start$lambda(this));
};
function ConfigureModerationView$addPunishment$lambda(closure$action) {
return function (it) {
closure$action.remove();
return Unit;
};
}
function ConfigureModerationView$addPunishment$lambda_0(closure$action) {
return function (it) {
var punishmentAction = ModerationConfig$PunishmentAction$valueOf(closure$action.find('.apply-punishment').val());
if (equals(punishmentAction.toString(), ModerationConfig$PunishmentAction$MUTE_getInstance().toString())) {
closure$action.find('.customMetadata').css('height', '48px');
}
else {
closure$action.find('.customMetadata').css('height', '0px');
}
return Unit;
};
}
ConfigureModerationView.prototype.addPunishment_a3smtl$ = function (warnAction) {
var tmp$, tmp$_0;
var action = jq('<div>').append(jq('<button>').attr('class', 'button-discord button-discord-info pure-button remove-action').html('<i class="fas fa-trash"><\/i>')).append(' Ao chegar em ').append(jq('<input>').attr('type', 'number').attr('min', 1).val(warnAction.warnCount).attr('class', 'warnCount')).append(' avisos, ').append("<select class='apply-punishment'>").append(' o usu\xE1rio').append(jq('<div>').css('height', '0px').css('overflow', 'hidden').css('transition', '2s').addClass('customMetadata').append('O usu\xE1rio dever\xE1 ser silenciado por ').append(jq('<input>').attr('type', 'text').attr('placeholder', '30 minutos').val(warnAction.customMetadata0).attr('class', 'customMetadata0')));
if (equals(warnAction.punishmentAction.toString(), ModerationConfig$PunishmentAction$MUTE_getInstance().toString())) {
action.find('.customMetadata').css('height', '48px');
}
jq('#warnActions').append(action);
action.find('.remove-action').click(ConfigureModerationView$addPunishment$lambda(action));
var applyPunishment = action.find('.apply-punishment');
tmp$ = ModerationConfig$PunishmentAction$values();
for (tmp$_0 = 0; tmp$_0 !== tmp$.length; ++tmp$_0) {
var punishment = tmp$[tmp$_0];
var option = jq('<option>').attr('name', anonymous.locale.get_25kzsl$(replace(punishment.toString(), '_', '') + '_PunishName', [])).attr('value', punishment.toString()).text(anonymous.locale.get_25kzsl$(replace(punishment.toString(), '_', '') + '_PunishName', []));
if (equals(warnAction.punishmentAction.toString(), punishment.toString())) {
option.attr('selected', 'selected');
}
applyPunishment.append(option);
}
jq('.apply-punishment').click(ConfigureModerationView$addPunishment$lambda_0(action));
};
function ConfigureModerationView$prepareSave$lambda$lambda(closure$actions) {
return function (index, elem) {
var el = jQuery(elem);
var json_0 = json([]);
var punishmentAction = ModerationConfig$PunishmentAction$valueOf(el.find('.apply-punishment').val());
json_0['punishmentAction'] = punishmentAction.toString();
json_0['warnCount'] = el.find('.warnCount').val();
if (equals(punishmentAction.toString(), ModerationConfig$PunishmentAction$MUTE_getInstance().toString())) {
json_0['customMetadata0'] = el.find('.customMetadata0').val();
}
return closure$actions.add_11rb$(json_0);
};
}
function ConfigureModerationView$prepareSave$lambda(payload) {
var actions = ArrayList_init();
var warnActions = jq('#warnActions');
var children = warnActions.children();
children.each(ConfigureModerationView$prepareSave$lambda$lambda(actions));
payload['punishmentActions'] = actions;
return Unit;
}
ConfigureModerationView.prototype.prepareSave = function () {
SaveStuff_getInstance().prepareSave('moderation', ConfigureModerationView$prepareSave$lambda);
};
ConfigureModerationView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'ConfigureModerationView',
interfaces: []
};
var ConfigureModerationView_instance = null;
function ConfigureModerationView_getInstance() {
if (ConfigureModerationView_instance === null) {
new ConfigureModerationView();
}
return ConfigureModerationView_instance;
}
function ConfigurePartnerView() {
ConfigurePartnerView_instance = this;
this.vanityUrlInput_jrj3bh$_0 = lazy(ConfigurePartnerView$vanityUrlInput$lambda);
this.vanityUrlExample_i46b83$_0 = lazy(ConfigurePartnerView$vanityUrlExample$lambda);
this.addKeyword_7t6lhx$_0 = lazy(ConfigurePartnerView$addKeyword$lambda);
this.keywords_k89ksp$_0 = lazy(ConfigurePartnerView$keywords$lambda);
this.keywordList_xlo49m$_0 = lazy(ConfigurePartnerView$keywordList$lambda);
this.uploadBackground_valcxw$_0 = lazy(ConfigurePartnerView$uploadBackground$lambda);
this.isPartner = false;
}
Object.defineProperty(ConfigurePartnerView.prototype, 'vanityUrlInput', {
get: function () {
return this.vanityUrlInput_jrj3bh$_0.value;
}
});
Object.defineProperty(ConfigurePartnerView.prototype, 'vanityUrlExample', {
get: function () {
return this.vanityUrlExample_i46b83$_0.value;
}
});
Object.defineProperty(ConfigurePartnerView.prototype, 'addKeyword', {
get: function () {
return this.addKeyword_7t6lhx$_0.value;
}
});
Object.defineProperty(ConfigurePartnerView.prototype, 'keywords', {
get: function () {
return this.keywords_k89ksp$_0.value;
}
});
Object.defineProperty(ConfigurePartnerView.prototype, 'keywordList', {
get: function () {
return this.keywordList_xlo49m$_0.value;
}
});
Object.defineProperty(ConfigurePartnerView.prototype, 'uploadBackground', {
get: function () {
return this.uploadBackground_valcxw$_0.value;
}
});
function ConfigurePartnerView$start$lambda$lambda(this$ConfigurePartnerView) {
return function (f, f_0) {
var vanityUrl = this$ConfigurePartnerView.vanityUrlInput.val();
vanityUrl = replace(vanityUrl, ' ', '-');
vanityUrl = vanityUrl.toLowerCase();
this$ConfigurePartnerView.vanityUrlInput.val(vanityUrl);
this$ConfigurePartnerView.changeVanityUrlText();
return Unit;
};
}
function ConfigurePartnerView$start$lambda(this$ConfigurePartnerView) {
return function (data, b, c) {
var tmp$, tmp$_0, tmp$_1, tmp$_2, tmp$_3, tmp$_4, tmp$_5, tmp$_6, tmp$_7;
LoriDashboard_getInstance().hideLoadingBar();
println('Data: ' + toString(data));
var serverConfig = JSON.parse(data);
var serverListConfig = serverConfig.serverListConfig;
this$ConfigurePartnerView.isPartner = serverListConfig.isPartner;
println('Keywords: ' + joinToString(serverListConfig.keywords, ', '));
tmp$ = LorittaPartner$Keyword$values();
for (tmp$_0 = 0; tmp$_0 !== tmp$.length; ++tmp$_0) {
var keyword = tmp$[tmp$_0];
println('Adding keyword ' + keyword + '...');
tmp$_5 = this$ConfigurePartnerView.keywords;
tmp$_4 = jq('<div>').addClass('pure-u-1').addClass('pure-u-md-1-3');
var tmp$_8 = jq('<label>');
var tmp$_9 = jq('<input>').attr('type', 'checkbox').attr('name', keyword.toString()).attr('value', 'keywords').attr('data-keyword-checkbox', 'true');
var $receiver = serverListConfig.keywords;
var firstOrNull$result;
firstOrNull$break: do {
var tmp$_10;
for (tmp$_10 = 0; tmp$_10 !== $receiver.length; ++tmp$_10) {
var element = $receiver[tmp$_10];
if (equals(element.toString(), keyword.toString())) {
firstOrNull$result = element;
break firstOrNull$break;
}
}
firstOrNull$result = null;
}
while (false);
tmp$_3 = tmp$_8.append(tmp$_9.prop('checked', firstOrNull$result != null));
tmp$_2 = jq('<span>').text(' ' + anonymous.locale.get_25kzsl$('KEYWORD_' + keyword.toString(), [])).addClass('keyword');
if (keyword === LorittaPartner$Keyword$NSFW_getInstance()) {
tmp$_1 = 'background-color: rgb(163, 48, 48);';
}
else {
tmp$_1 = '';
}
tmp$_5.append(tmp$_4.append(tmp$_3.append(tmp$_2.attr('style', 'margin-left: 6px;' + tmp$_1))));
}
this$ConfigurePartnerView.vanityUrlInput.on('input', ConfigurePartnerView$start$lambda$lambda(this$ConfigurePartnerView));
this$ConfigurePartnerView.changeVanityUrlText();
LoriDashboard_getInstance().applyBlur_puj7f4$('#hiddenIfDisabled', '#cmn-toggle-1');
LoriDashboard_getInstance().applyBlur_puj7f4$('#hiddenIfDisabled3', '#cmn-toggle-2');
LoriDashboard_getInstance().applyBlur_puj7f4$('#hiddenIfDisabled4', '#cmn-toggle-3');
tmp$_6 = serverConfig.textChannels;
for (tmp$_7 = 0; tmp$_7 !== tmp$_6.length; ++tmp$_7) {
var textChannel = tmp$_6[tmp$_7];
var option = jq('<option>').attr('value', textChannel.id).text('#' + textChannel.name);
if (!textChannel.canTalk) {
option.attr('disabled', 'disabled');
}
var voteSel = option.clone();
var promoteSel = option.clone();
if (equals(serverConfig.serverListConfig.voteBroadcastChannelId, textChannel.id)) {
voteSel.attr('selected', 'selected');
}
if (serverConfig.serverListConfig.promoteBroadcastChannelId == textChannel.id) {
promoteSel.attr('selected', 'selected');
}
jq('#chooseChannel').append(voteSel.clone());
jq('#chooseChannel2').append(promoteSel.clone());
}
if (!serverListConfig.isPartner && !serverListConfig.isSponsored) {
jq('#hiddenIfDisabled2').addClass('blurSection');
jq('#hiddenInfo2').text('Fun\xE7\xF5es exclusivas para partners e patrocinadores');
}
return Unit;
};
}
ConfigurePartnerView.prototype.start = function () {
LoriDashboard_getInstance().showLoadingBar_pdl1vj$('Carregando...');
jQuery.post('https://loritta.website/api/v1/config/get-server-config?guildId=' + guildId, ConfigurePartnerView$start$lambda(this));
};
ConfigurePartnerView.prototype.changeVanityUrlText = function () {
var vanityUrl = this.vanityUrlInput.val();
this.vanityUrlExample.text('https://loritta.website/s/' + vanityUrl);
this.vanityUrlExample.attr('src', 'https://loritta.website/s/' + vanityUrl);
};
function ConfigurePartnerView$prepareSave$lambda(closure$reader, this$ConfigurePartnerView) {
return function (it) {
var imageAsBase64 = closure$reader.result;
this$ConfigurePartnerView.save_pdl1vj$(imageAsBase64);
return Unit;
};
}
ConfigurePartnerView.prototype.prepareSave = function () {
println('Preparing save... wow!');
var file = this.uploadBackground.get()[0].files[0];
if (file != null) {
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = ConfigurePartnerView$prepareSave$lambda(reader, this);
}
else {
this.save_pdl1vj$(null);
}
};
var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;
function ConfigurePartnerView$save$lambda(this$ConfigurePartnerView, closure$imageAsBase64) {
return function (payload) {
var $receiver = this$ConfigurePartnerView.keywords.find('[data-keyword-checkbox]').toArray();
var destination = ArrayList_init();
var tmp$;
for (tmp$ = 0; tmp$ !== $receiver.length; ++tmp$) {
var element = $receiver[tmp$];
if (element.checked)
destination.add_11rb$(element);
}
var destination_0 = ArrayList_init(collectionSizeOrDefault(destination, 10));
var tmp$_0;
tmp$_0 = destination.iterator();
while (tmp$_0.hasNext()) {
var item = tmp$_0.next();
destination_0.add_11rb$(item.getAttribute('name'));
}
var addedKeywords = destination_0;
payload['keywords'] = addedKeywords;
if (closure$imageAsBase64 != null) {
payload['backgroundImage'] = closure$imageAsBase64;
}
payload['isPartner'] = this$ConfigurePartnerView.isPartner;
return Unit;
};
}
ConfigurePartnerView.prototype.save_pdl1vj$ = function (imageAsBase64) {
SaveStuff_getInstance().prepareSave('server_list', ConfigurePartnerView$save$lambda(this, imageAsBase64));
};
function ConfigurePartnerView$vanityUrlInput$lambda() {
return jq('#vanityUrl');
}
function ConfigurePartnerView$vanityUrlExample$lambda() {
return jq('#vanityUrlExample');
}
function ConfigurePartnerView$addKeyword$lambda() {
return jq('#addKeyword');
}
function ConfigurePartnerView$keywords$lambda() {
return jq('#keywords');
}
function ConfigurePartnerView$keywordList$lambda() {
return jq('#keywordList');
}
function ConfigurePartnerView$uploadBackground$lambda() {
return jq('#uploadBackground');
}
ConfigurePartnerView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'ConfigurePartnerView',
interfaces: []
};
var ConfigurePartnerView_instance = null;
function ConfigurePartnerView_getInstance() {
if (ConfigurePartnerView_instance === null) {
new ConfigurePartnerView();
}
return ConfigurePartnerView_instance;
}
function ConfigureProfileView() {
ConfigureProfileView_instance = this;
}
ConfigureProfileView.prototype.start = function () {
};
ConfigureProfileView.prototype.prepareSave = function () {
println('Preparing save... wow!');
SaveStuff_getInstance().prepareSave('profile', void 0, void 0, 'https://loritta.website/api/v1/lori/save-self-profile');
};
ConfigureProfileView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'ConfigureProfileView',
interfaces: []
};
var ConfigureProfileView_instance = null;
function ConfigureProfileView_getInstance() {
if (ConfigureProfileView_instance === null) {
new ConfigureProfileView();
}
return ConfigureProfileView_instance;
}
function DonateView() {
DonateView_instance = this;
}
function DonateView$start$handleRangeChange$lambda(it) {
return it.minimum;
}
var sortedWith = Kotlin.kotlin.collections.sortedWith_eknfly$;
var compareBy$lambda = wrapFunction(function () {
var compareValues = Kotlin.kotlin.comparisons.compareValues_s00gnj$;
return function (closure$selector) {
return function (a, b) {
var selector = closure$selector;
return compareValues(selector(a), selector(b));
};
};
});
var Comparator = Kotlin.kotlin.Comparator;
function Comparator$ObjectLiteral(closure$comparison) {
this.closure$comparison = closure$comparison;
}
Comparator$ObjectLiteral.prototype.compare = function (a, b) {
return this.closure$comparison(a, b);
};
Comparator$ObjectLiteral.$metadata$ = {kind: Kind_CLASS, interfaces: [Comparator]};
function DonateView$start$handleRangeChange(closure$tiers, closure$tierName, closure$tierIcon, closure$donationRewardsWrapper) {
return function () {
var tmp$;
var value = toInt(typeof (tmp$ = jq('#donation-range').val()) === 'string' ? tmp$ : throwCCE());
var price = value.toString();
price += '+';
jq('#donation-value').text(price);
var validTier = sortedWith(closure$tiers, new Comparator$ObjectLiteral(compareBy$lambda(DonateView$start$handleRangeChange$lambda))).get_za3lpa$(value);
if (validTier != null) {
closure$tierName.text(validTier.title);
closure$tierIcon.attr('src', validTier.icon);
jq('#donation-value').text(validTier.minimum.toString() + '+');
jq('#donation-value-2').text(validTier.minimum.toString());
jq('#donation-value-machine').text(validTier.minimum.toString());
var daysInAMonth = 730;
var percentage = validTier.minimum / 315;
var daysPaid = daysInAMonth * percentage;
jq('#donation-value-hours').text(roundToInt(daysPaid));
var lastHashCode = hashCode(last(validTier.rewards));
var lastReward = jq('#reward-' + hashCode(validTier) + '-' + lastHashCode);
var rewardPosition = lastReward.position().top;
var newHeight = rewardPosition;
println('New height is ' + newHeight + 'px');
closure$donationRewardsWrapper.css('height', (numberToInt(newHeight) + numberToInt(lastReward.height()) | 0).toString() + 'px');
}
};
}
function DonateView$start$lambda(closure$handleRangeChange) {
return function (event, any) {
closure$handleRangeChange();
return Unit;
};
}
DonateView.prototype.start = function () {
var tmp$, tmp$_0;
var tiers = ArrayList_init();
var reward1 = listOf('Obrigado por ajudar a Loritta a ficar online!');
var reward3 = listOf_0(['A sensa\xE7\xE3o de ser incr\xEDvel!', "Seu nome ser\xE1 adicionado ao comando de <code class='inline'>+contribuidores<\/code>!", "Voc\xEA ter\xE1 acesso a um canal de texto e voz exclusivo apenas para quem contribui para mim, com v\xE1rios assuntos exclusivos para contribuidores! <img src='https://cdn.discordapp.com/emojis/353898172923510784.png?v=1' class='inline-emoji'>", "Voc\xEA ir\xE1 ganhar um cargo exclusivo no <a href='https://loritta.website/support'>meu servidor<\/a>!", "Voc\xEA ir\xE1 receber uma badge exclusiva no <code class='inline'>+perfil<\/code>!", "Voc\xEA poder\xE1 deixar o seu servidor como patrocinado na <a href='https://loritta.website/servers'>Lori's Server List<\/a> por 30 dias! (Quanto mais voc\xEA doar, mais chance de voc\xEA aparecer no topo da lista de servidores patrocinados!)", "Voc\xEA poder\xE1 participar de sorteios que poder\xE3o acontecer no <a href='https://loritta.website/support'>meu servidor<\/a>!", 'Eu n\xE3o queria dizer nada, mas quem doa tem um b\xF4nus:<br><iframe width="280" height="157" src="https://www.youtube.com/embed/J8gWll4ItiU?start=334" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen><\/iframe>']);
var reward10 = listOf_0(["Voc\xEA poder\xE1 usar o <code class='inline'>+volume<\/code>, para controlar o som do seu batid\xE3o! <img src='https://cdn.discordapp.com/emojis/422448021016543232.gif?v=1' class='inline-emoji'>", "Voc\xEA poder\xE1 alterar a cor do seu nome no <a href='https://loritta.website/support'>meu servidor<\/a>! <img src='https://cdn.discordapp.com/emojis/446735085161545728.gif?v=1' class='inline-emoji'>", "Voc\xEA ter\xE1 o seu nome nos finais dos v\xEDdeos do <a href='https://www.youtube.com/c/MrPowerGamerBR'>meu canal<\/a>! (As vezes... quando ele lembrar de colocar... j\xE1 que ele quase nem grava v\xEDdeos <img src='https://cdn.discordapp.com/emojis/396521773178552331.png?v=1' class='inline-emoji'>)", 'Voc\xEA ter\xE1 prioridade nas sugest\xF5es, precisa de uma fun\xE7\xE3o na Loritta? Ent\xE3o vou fazer ela! (Desde que seja poss\xEDvel fazer, que n\xE3o seja in\xE9tico, que n\xE3o fuja do prop\xF3sito da Loritta e, \xE9 claro, se eu tenho tempo para fazer ela!)']);
tiers.add_11rb$(new DonateView$RewardTier('\xC9 pouco, mas espero que ajude!', 'https://cdn.discordapp.com/emojis/396521772691881987.png?v=1', 0.01, reward1));
tiers.add_11rb$(new DonateView$RewardTier('Eu quero ajudar a Loritta!', 'https://cdn.discordapp.com/emojis/425371746930262018.png?v=1', 4.99, reward3));
tiers.add_11rb$(new DonateView$RewardTier('Eu gosto da Loritta (Como amiga, \xE9 claro)', 'https://cdn.discordapp.com/emojis/414222275223617546.png?v=1', 9.99, reward10));
tiers.add_11rb$(new DonateView$RewardTier('Eu amo a Loritta! (Como amiga, \xE9 claro)', 'https://cdn.discordapp.com/emojis/417813932380520448.png?v=1', 19.99, listOf_0(['O limite m\xE1ximo de sonhos que voc\xEA pode ganhar no sonhos di\xE1rio ser\xE1 aumentado de 3600 sonhos para 3900 sonhos!', "Tempo de espera entre comandos reduzido na maioria dos comandos! <img src='https://discordemoji.com/assets/emoji/SonicWaiting.gif' class='inline-emoji'>", "Ao receber uma reputa\xE7\xE3o, voc\xEA ter\xE1 5% de chance de eu te dar uma reputa\xE7\xE3o tamb\xE9m! <img src='https://cdn.discordapp.com/emojis/393755269890310164.gif?v=1' class='inline-emoji'>", "Seu nome ficar\xE1 em negrito no <code class='inline'>+contribuidores<\/code>!"])));
tiers.add_11rb$(new DonateView$RewardTier('Eu adoro a Loritta! (Como amiga, \xE9 claro)', 'https://cdn.discordapp.com/emojis/331179879582269451.png?v=1', 29.99, listOf_0(["Voc\xEA ganhar\xE1 x1.25 XP global! <img src='https://cdn.discordapp.com/emojis/432531424671694849.png?v=1' class='inline-emoji'>", 'Voc\xEA ganhar\xE1 7500 sonhos!', "Caso voc\xEA queria virar um parceiro na Lori's Server List, o requisito de membros ser\xE1 abaixado de 850 membros para 500 membros! (Mas cuidado, voc\xEA ainda ter\xE1 que ter um servidor ativo!)", 'Voc\xEA poder\xE1 adicionar uma vers\xE3o premium minha no seu servidor! ...o que a vers\xE3o premium faz? Nada! Mas voc\xEA pode mostrar como voc\xEA \xE9 ostentador no seu servidor!'])));
tiers.add_11rb$(new DonateView$RewardTier('Eu venero a Loritta!', 'https://cdn.discordapp.com/emojis/338679059188023296.png?v=1', 39.99, listOf_0(['O limite m\xE1ximo de sonhos que voc\xEA pode ganhar no sonhos di\xE1rio ser\xE1 aumentado de 3600 sonhos para 4200 sonhos!', 'Como b\xF4nus pela sua generosidade, voc\xEA ir\xE1 ganhar +1 key da Loritta para voc\xEA dar para os seus amigos!', "Ao receber uma reputa\xE7\xE3o, voc\xEA ter\xE1 25% de chance de eu te dar uma reputa\xE7\xE3o tamb\xE9m! <img src='https://cdn.discordapp.com/emojis/393755269890310164.gif?v=1' class='inline-emoji'>"])));
tiers.add_11rb$(new DonateView$RewardTier('Eu cultuo a Loritta!', 'https://cdn.discordapp.com/emojis/357939361079230464.png?v=1', 49.99, listOf_0(["Voc\xEA ganhar\xE1 x1.5 XP global! <img src='https://cdn.discordapp.com/emojis/432531424671694849.png?v=1' class='inline-emoji'>", 'Voc\xEA ganhar\xE1 7500 sonhos!', "Voc\xEA poder\xE1 colocar uma resposta personalizada em todos os servidores ao falar \"@Loritta Morenitta \uD83D\uDE18 insira algo aqui\" e ela ir\xE1 responder algo que voc\xEA queria! (Desde que n\xE3o seja uma resposta inapropriada ou que seja divulga\xE7\xE3o) <a href='https://cdn.discordapp.com/emojis/396521401860751362.png?v=1' class='inline-emoji'>", "Voc\xEA poder\xE1 colocar um convite ao lado do seu nome no <code class='inline'>+contribuidores<\/code>!", "Voc\xEA ganhar\xE1 mais outro cargo exclusivo no <a href='https://loritta.website/support'>meu servidor<\/a>! A diferen\xE7a entre o antigo cargo e novo? O novo \xE9 <b>super<\/b>! <img src='https://cdn.discordapp.com/emojis/429715687317962772.png?v=1' class='inline-emoji'>"])));
tiers.add_11rb$(new DonateView$RewardTier('Eu idolatro a Loritta!', 'https://cdn.discordapp.com/emojis/432530033186308106.png?v=1', 59.99, listOf_0(['O limite m\xE1ximo de sonhos que voc\xEA pode ganhar no sonhos di\xE1rio ser\xE1 aumentado de 3600 sonhos para 4500 sonhos!', "Voc\xEA poder\xE1 colocar uma rea\xE7\xE3o personalizada em todos os servidores ao falar algo que voc\xEA escolher e ela ir\xE1 reagir com um emoji que voc\xEA escolher! (Existem exce\xE7\xF5es para quando ela vai fazer isto, mas desde que seja uma frase n\xE3o t\xE3o pequena, pode colocar!) <a href='https://cdn.discordapp.com/emojis/396521401860751362.png?v=1' class='inline-emoji'>"])));
tiers.add_11rb$(new DonateView$RewardTier('Jamais quero ver a Loritta offline!', 'https://cdn.discordapp.com/emojis/441355739307442186.png?v=1', 69.99, listOf_0(["Voc\xEA ganhar\xE1 x1.75 XP global! <img src='https://cdn.discordapp.com/emojis/432531424671694849.png?v=1' class='inline-emoji'>", 'Voc\xEA ganhar\xE1 7500 sonhos!', "Como b\xF4nus pela sua generosidade, voc\xEA ir\xE1 ganhar +1 key da Loritta para voc\xEA dar aos seus amigos! <img src='https://cdn.discordapp.com/emojis/330958171436744716.png?v=1' class='inline-emoji'>"])));
tiers.add_11rb$(new DonateView$RewardTier('A Loritta ir\xE1 dominar o mundo!', 'https://cdn.discordapp.com/emojis/391738326312550401.png?v=1', 79.99, listOf_0(["Voc\xEA poder\xE1 criar uma badge exclusiva para voc\xEA e para os seus amigos! Quer criar uma badge exclusiva que apenas os membros do seu servidor tem? Voc\xEA poder\xE1 ter isto! <img src='https://cdn.discordapp.com/emojis/430179755304943649.png?v=1' class='inline-emoji'>", 'O limite m\xE1ximo de sonhos que voc\xEA pode ganhar no sonhos di\xE1rio ser\xE1 aumentado de 3600 sonhos para 4800 sonhos!'])));
tiers.add_11rb$(new DonateView$RewardTier('A Loritta ir\xE1 dominar a gal\xE1xia!', 'https://cdn.discordapp.com/emojis/439868811190206495.png?v=1', 89.99, listOf_0(["Voc\xEA ganhar\xE1 x2.00 XP global! <img src='https://cdn.discordapp.com/emojis/432531424671694849.png?v=1' class='inline-emoji'>", 'Voc\xEA ganhar\xE1 7500 sonhos!', "Voc\xEA poder\xE1 fazer o seu pr\xF3prio design do jeito que voc\xEA quiser (desde que n\xE3o seja algo inapropriado) para o seu <code class='inline'>+perfil<\/code>!"])));
tiers.add_11rb$(new DonateView$RewardTier('A Loritta \xE9 a minha Deusa!', 'https://cdn.discordapp.com/emojis/412577132007653383.gif?v=1', 99.99, listOf_0(['Eu irei divulgar o seu servidor (desde que n\xE3o seja sobre conte\xFAdo NSFW) em todas as mensagens que eu fizer de @everyone ou para Notificar Novidades que tiverem no meu servidor!', "Voc\xEA ganhar\xE1 mais outro cargo exclusivo no <a href='https://loritta.website/support'>meu servidor<\/a> mostrando o quanto voc\xEA adora a nossa Deusa Loritta! <img src='https://cdn.discordapp.com/emojis/441390573501546497.png?v=1' class='inline-emoji'>"])));
tiers.add_11rb$(new DonateView$RewardTier('SimSimi > Gaybriela', 'https://cdn.discordapp.com/emojis/383742012559589387.png?v=1', 119.99, listOf_0(["Voc\xEA poder\xE1 usar o <code class='inline'>+simsimi<\/code> no seu servidor!", "Como b\xF4nus pela sua generosidade, voc\xEA ir\xE1 ganhar +1 key da Loritta para voc\xEA dar aos seus amigos e espalhar a maldade do SimSimi para outros servidores. <img src='https://cdn.discordapp.com/emojis/330958171436744716.png?v=1' class='inline-emoji'>", "O convite do seu servidor ser\xE1 mostrado para todos que utilizarem o comando <code class='inline'>+ajuda<\/code>!", 'Seu servidor ser\xE1 colocado em um de nossos banners de propaganda aqui no meu website!'])));
var donationRewards = jq('#donation-rewards');
var donationRewardsWrapper = jq('#donation-rewards-wrapper');
var tierName = jq('#tier-name');
var tierIcon = jq('#tier-icon');
tmp$ = tiers.iterator();
while (tmp$.hasNext()) {
var tier = tmp$.next();
donationRewards.append(jq('<div>').addClass('tier-reward-header').text(tier.title + ' (R' + '$' + ' ' + tier.minimum + '+)'));
donationRewards.append(jq('<img>').css('width', '64px').attr('src', tier.icon));
tmp$_0 = tier.rewards.iterator();
while (tmp$_0.hasNext()) {
var reward = tmp$_0.next();
donationRewards.append(jq('<li>').html(reward).attr('id', 'reward-' + hashCode(tier) + '-' + hashCode(reward)));
}
}
var donationRange = jq('#donation-range');
donationRange.attr('max', tiers.size - 1 | 0);
var handleRangeChange = DonateView$start$handleRangeChange(tiers, tierName, tierIcon, donationRewardsWrapper);
jq('#donation-range').on('input', DonateView$start$lambda(handleRangeChange));
handleRangeChange();
};
function DonateView$RewardTier(title, icon, minimum, rewards) {
this.title = title;
this.icon = icon;
this.minimum = minimum;
this.rewards = rewards;
}
DonateView$RewardTier.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'RewardTier',
interfaces: []
};
DonateView.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'DonateView',
interfaces: []
};
var DonateView_instance = null;
function DonateView_getInstance() {
if (DonateView_instance === null) {
new DonateView();
}
return DonateView_instance;
}
function LoriDashboard() {
LoriDashboard_instance = this;
this.wrapper_e2dk2j$_0 = lazy(LoriDashboard$wrapper$lambda);
this.leftSidebar_bu0mf$_0 = lazy(LoriDashboard$leftSidebar$lambda);
this.rightSidebar_6drdtm$_0 = lazy(LoriDashboard$rightSidebar$lambda);
this.loadingScreen_dfu46y$_0 = lazy(LoriDashboard$loadingScreen$lambda);
}
Object.defineProperty(LoriDashboard.prototype, 'wrapper', {
get: function () {
return this.wrapper_e2dk2j$_0.value;
}
});
Object.defineProperty(LoriDashboard.prototype, 'leftSidebar', {
get: function () {
return this.leftSidebar_bu0mf$_0.value;
}
});
Object.defineProperty(LoriDashboard.prototype, 'rightSidebar', {
get: function () {
return this.rightSidebar_6drdtm$_0.value;
}
});
Object.defineProperty(LoriDashboard.prototype, 'loadingScreen', {
get: function () {
return this.loadingScreen_dfu46y$_0.value;
}
});
LoriDashboard.prototype.showLoadingBar_pdl1vj$ = function (text) {
if (text === void 0)
text = 'Salvando...';
this.leftSidebar.css('filter', 'blur(7px)');
this.rightSidebar.css('filter', 'blur(7px)');
if (text != null)
this.loadingScreen.find('#loading-screen-text').text(text);
this.loadingScreen.fadeIn(250);
};
LoriDashboard.prototype.hideLoadingBar = function () {
this.leftSidebar.css('filter', '');
this.rightSidebar.css('filter', '');
this.loadingScreen.fadeOut(250);
};
function LoriDashboard$applyBlur$lambda(closure$toBeHidden, closure$toggle, this$LoriDashboard) {
return function (it) {
this$LoriDashboard.toggleBlur_puj7f4$(closure$toBeHidden, closure$toggle);
return Unit;
};
}
LoriDashboard.prototype.applyBlur_puj7f4$ = function (toBeHidden, toggle) {
jq(toggle).click(LoriDashboard$applyBlur$lambda(toBeHidden, toggle, this));
this.toggleBlur_puj7f4$(toBeHidden, toggle);
};
LoriDashboard.prototype.toggleBlur_puj7f4$ = function (toBeHidden, toggle) {
var hide = jq(toBeHidden);
if (jq(toggle).is(':checked')) {
hide.removeClass('blurSection');
hide.addClass('noBlur');
}
else {
hide.removeClass('noBlur');
hide.addClass('blurSection');
}
};
function LoriDashboard$wrapper$lambda() {
return jq('#server-configuration');
}
function LoriDashboard$leftSidebar$lambda() {
return jq('#left-sidebar');
}
function LoriDashboard$rightSidebar$lambda() {
return jq('#right-sidebar');
}
function LoriDashboard$loadingScreen$lambda() {
return jq('#loading-screen');
}
LoriDashboard.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'LoriDashboard',
interfaces: []
};
var LoriDashboard_instance = null;
function LoriDashboard_getInstance() {
if (LoriDashboard_instance === null) {
new LoriDashboard();
}
return LoriDashboard_instance;
}
function toJson($receiver) {
return JSON.parse(JSON.stringify($receiver));
}
function toJson_0($receiver) {
return JSON.parse(JSON.stringify($receiver));
}
function stringify($receiver) {
return JSON.stringify($receiver);
}
function SaveStuff() {
SaveStuff_instance = this;
}
function SaveStuff$prepareSave$lambda(closure$config) {
return function (index, _elem) {
var elem = jQuery(_elem);
println(elem.attr('type') + ' - ' + elem.attr('id') + ' - ' + toString(elem.val()));
if (equals(elem.attr('type'), 'checkbox')) {