summaryrefslogtreecommitdiff
path: root/play.js
blob: 3acf3e83b8cf129230ee0581a21efad16969e0f4 (plain)
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
"use strict"

let action_register = []

function register_action(target, action, id) {
	target.my_action = action
	target.my_id = id
	target.onmousedown = on_click_action
	action_register.push(target)
}

function is_action(action, arg) {
	return !!(view.actions && view.actions[action] && view.actions[action].includes(arg))
}

function on_click_action(evt) {
	if (evt.button === 0)
		send_action(evt.target.my_action, evt.target.my_id)
}

const last_space = 74
const last_card = 110
const last_power_card = 54

const countries = [ "Poland", "Hungary", "East_Germany", "Bulgaria", "Czechoslovakia", "Romania" ]
const board_events = [ 2, 9, 69, 97 ]
const box_events = [ 15, 24, 26, 39, 48, 49, 53, 58, 59, 65, 70, 73, 100, 101, 104 ]

const ui = {
	favicon: document.getElementById("favicon"),
	turn_info: document.getElementById("turn_info"),

	turn: document.getElementById("marker_turn"),
	round: document.getElementById("marker_action_round"),
	stability: document.getElementById("marker_stability_track"),
	dem_tst: document.getElementById("marker_dem_tst"),
	com_tst: document.getElementById("marker_com_tst"),
	vp: document.getElementById("marker_vp"),

	event_reminder_list: document.getElementById("event_reminder_list"),

	played_card: document.getElementById("played_card"),
	scoring_card: document.getElementById("scoring_card"),
	played_power_card: document.getElementById("played_power_card"),
	hand: document.getElementById("hand"),
	power_hand: document.getElementById("power_hand"),
	opp_hand: document.getElementById("opp_hand"),
	opp_power_hand: document.getElementById("opp_power_hand"),
	discard: document.getElementById("discard"),
	removed: document.getElementById("removed"),
	table_cards: document.getElementById("table_cards"),

	ceausescu_hand: document.getElementById("ceausescu_hand"),
	samizdat_card: document.getElementById("samizdat_card"),
}

function create_country(id, name) {
	let [ x, y, w, h ] = LAYOUT[name]
	let xc = Math.round(x + w / 2)
	let yc = Math.round(y + h / 2)

	let e = document.createElement("div")
	e.className = "marker demInfl"
	e.style.left = xc - 25 + "px"
	e.style.top = yc - 25 + "px"
	ui.countries[id] = e
	document.getElementById("markers").appendChild(e)
}

function create_ui() {
	ui.layout_xy = []
	ui.spaces = []
	ui.dem_inf = []
	ui.com_inf = []

	for (let s = 1; s <= last_space; ++s) {
		let info = spaces[s]
		let [ x, y, w, h ] = LAYOUT[info.ascii_name]
		let xc = Math.round( x + w / 2 )
		let yc = Math.round( y + h / 2 )
		x -= 6
		y -= 6
		w += 12
		h += 12

		ui.layout_xy[s] = [ xc, yc ]

		let space_e = document.createElement("div")
		register_action(space_e, "space", s)
		space_e.className = "space " + info.country
		space_e.style.left = x + "px"
		space_e.style.top = y + "px"
		space_e.style.width = w + "px"
		space_e.style.height = h + "px"
		ui.spaces[s] = space_e

		let com_e = document.createElement("div")
		com_e.className = "marker comInfl hide"
		com_e.style.left = (xc + 32 - 25) + "px"
		com_e.style.top = (yc + 12 - 25) + "px"
		ui.com_inf[s] = com_e

		let dem_e = document.createElement("div")
		dem_e.className = "marker demInfl hide"
		dem_e.style.left = (xc - 32 - 25) + "px"
		dem_e.style.top = (yc + 12 - 25) + "px"
		ui.dem_inf[s] = dem_e

		document.getElementById("spaces").append(space_e)
		document.getElementById("markers").appendChild(com_e)
		document.getElementById("markers").appendChild(dem_e)
	}


	ui.cards = []
	for (let c = 1; c <= last_card; ++c) {
		const card_e = document.createElement("div")
		register_action(card_e, "card", c)
		card_e.className = "card event_" + c
		ui.cards[c] = card_e
	}

	ui.power_cards = []
	for (let c = 1; c <= last_power_card; ++c) {
		const power_card_e = document.createElement("div")
		register_action(power_card_e, "power_card", c)
		power_card_e.className = "card power_" + c
		ui.power_cards[c] = power_card_e
	}

	ui.events = []
	for (let id of box_events) {
		ui.events[id] = document.createElement("div")
		ui.events[id].id = "event_" + id
		ui.events[id].className = "marker event aside"
	}
	for (let id of board_events) {
		ui.events[id] = document.createElement("div")
		ui.events[id].id = "event_" + id
		ui.events[id].className = "marker event"
		document.getElementById("markers").appendChild(ui.events[id])
	}

	ui.countries = []
	create_country(0, "country_poland")
	create_country(1, "country_hungary")
	create_country(2, "country_east_germany")
	create_country(3, "country_bulgaria")
	create_country(4, "country_czechoslovakia")
	create_country(5, "country_romania")
}

// SUPPORTING FUNCTIONS

function on_click_space(evt) {
	if (evt.button === 0) {
		const space = evt.target.my_space
		//console.log('on_click_space_called with space:', space);
		if (send_action("space", space)) {
			console.log('send_action with space:', space);
			evt.stopPropagation()
		} else if (send_action("sc", space)) {
			//console.log('send_action with sc:', space);
			evt.stopPropagation()
		} else {
			// console.log('send_action failed for space:', space);
		}
	}
	//hide_popup_menu();
}

function on_log(text) {
	// eslint-disable-line no-unused-vars

	let p = document.createElement("div")

	if (text.match(/^>/)) {
		text = text.substring(1)
		p.className = "i"
	}

	text = text.replace(/_/g, " ")
	text = text.replace(/C(\d+)/g, sub_card_name)
	text = text.replace(/P(\d+)/g, sub_power_card_name)
	text = text.replace(/V(\d+)/g, sub_power_card_value)
	text = text.replace(/%(\d+)/g, sub_space_name)
	text = text.replace(/D[1-6]/g, sub_die)

	if (text.match(/^\.h1/)) {
		text = text.substring(4)
		p.className = "h1"
	} else if (text.match(/^\.h2d/)) {
		text = text.substring(5)
		p.className = "h2 dem"
	} else if (text.match(/^\.h2c/)) {
		text = text.substring(5)
		p.className = "h2 com"
	} else if (text.match(/^\.h2/)) {
		text = text.substring(4)
		p.className = "h2"
	} else if (text.match(/^\.h3/)) {
		text = text.substring(4)
		p.className = "h3"
	}

	p.innerHTML = text
	return p
}

function layout_turn_marker() {
	let x = 654 + 24 + (view.turn - 1) * 53
	let y = 80 + 24
	ui.turn.style.left = (x - 25) + "px"
	ui.turn.style.top = (y - 25) + "px"
}

function layout_round_marker() {
	let x = 709 + 24 + (view.turn - 1) * 53
	let y = 142 + 24
	ui.round.style.left = (x - 25) + "px"
	ui.round.style.top = (y - 25) + "px"
	if (view.round_player === "Democrat") // TODO: bit flag?
		ui.round.className = "marker dem"
	else
		ui.round.className = "marker com"
}

function layout_stability_marker() {
	let x = 24 + 1381
	let y = 24 + 1081 + view.stability * 54
	ui.stability.style.left = (x - 25) + "px"
	ui.stability.style.top = (y - 25) + "px"
}

let TST_X = [ 53, 53+69, 53+69*2, 53+69*3, 53+69*4, 53+69*5, 53+69*6, 556 ]
let TST_Y = [ 2128, 2257 ]

function layout_tst_marker(e, v, top) {
	let x = TST_X[v] + 24
	let y = TST_Y[top] + 24
	e.style.left = (x - 25) + "px"
	e.style.top = (y - 25) + "px"
}

function layout_vp_marker() {
	let x, y
	if (view.vp === 0) {
		y = 2425 + 25
		x = 843 + 28
	}
	else if (view.vp < 0) {
		if (view.vp & 1) {
			y = 2456 + 25
			x = 803 + 28 - (-view.vp - 1)/2 * 62
		} else {
			y = 2395 + 25
			x = 772 + 28 - (-view.vp - 2)/2 * 62
		}
	}
	else if (view.vp > 0) {
		if (view.vp & 1) {
			y = 2396 + 25
			x = 883 + 28  + (view.vp - 1)/2 * 62
		} else {
			y = 2455 + 25
			x = 913 + 28 + (view.vp - 2)/2 * 62
		}
	}
	ui.vp.style.left = (x - 25) + "px"
	ui.vp.style.top = (y - 25) + "px"
}

function layout_country(id) {
	for (let i = 0; i < 6; i++) {
		// TODO: what number to display?
		if (view.revolutions[id])
			ui.countries[id].className = "marker demInfl ctl v" + view.times_held[id]
		else if (view.times_held[id] > 0)
			ui.countries[id].className = "marker comInfl ctl v" + view.times_held[id]
		else
			ui.countries[id].className = "marker hide"
	}
}

function on_update() {
	if (!ui.spaces)
		create_ui()

	// UPDATE PLAYER INFO

	if (view.is_pwr_struggle) {
		roles.Democrat.stat.textContent = `${view.democrat_power_hand} Power cards`
		roles.Communist.stat.textContent = `${view.communist_power_hand} Power cards`
	} else {
		roles.Democrat.stat.textContent = `${view.democrat_hand} cards`
		roles.Communist.stat.innerText = `${view.communist_hand} cards`
	}

	ui.turn_info.innerText = `Strategy deck: ${view.strategy_deck} cards`

	// UPDATE TRACK MARKERS

	layout_turn_marker()
	layout_round_marker()
	layout_stability_marker()
	layout_vp_marker()
	layout_tst_marker(ui.dem_tst, view.dem_tst, 0)
	layout_tst_marker(ui.com_tst, view.com_tst, 1)

	// UPDATE EVENT MARKERS ON THE BOARD

	if (view.persistent_events.includes(2))
		ui.events[2].style.display = "block"
	else
		ui.events[2].style.display = "none"

	if (view.persistent_events.includes(9))
		ui.events[9].style.display = "block"
	else
		ui.events[9].style.display = "none"

	if (view.persistent_events.includes(69)) {
		ui.events[69].style.display = "block"
		ui.events[69].style.left = ui.layout_xy[view.systematization][0] - 25 + "px"
		ui.events[69].style.top = ui.layout_xy[view.systematization][1] - 25 + "px"
	} else {
		ui.events[69].style.display = "none"
	}

	if (view.persistent_events.includes(97)) {
		ui.events[97].style.display = "block"
		ui.events[97].style.left = ui.layout_xy[view.the_tyrant_is_gone][0] - 25 + "px"
		ui.events[97].style.top = ui.layout_xy[view.the_tyrant_is_gone][1] - 25 + "px"
	} else {
		ui.events[97].style.display = "none"
	}

	// EVENT REMINDER LIST

	ui.event_reminder_list.replaceChildren()
	for (let id of box_events)
		if (view.persistent_events.includes(id))
			ui.event_reminder_list.appendChild(ui.events[id])

	// UPDATE INFLUENCE VALUES

	for (let s = 1; s <= last_space; ++s) {
		const demInfl = view.demInfl[s]
		const comInfl = view.comInfl[s]

		if (demInfl - comInfl >= spaces[s].stability)
			ui.dem_inf[s].className = "marker demInfl ctl v" + demInfl
		else if (demInfl > 0)
			ui.dem_inf[s].className = "marker demInfl v" + demInfl
		else
			ui.dem_inf[s].className = "marker demInfl hide"

		if (comInfl - demInfl >= spaces[s].stability)
			ui.com_inf[s].className = "marker comInfl ctl v" + comInfl
		else if (comInfl > 0)
			ui.com_inf[s].className = "marker comInfl v" + comInfl
		else
			ui.com_inf[s].className = "marker comInfl hide"
	}

	// UPDATE COUNTRY MARKERS

	for (let i = 0; i < 6; ++i)
		layout_country(i)

	// UPDATE CARD DISPLAYS

	ui.played_card.replaceChildren()
	
	if (!view.is_pwr_struggle) {
		if (view.played_card > 0)
			ui.played_card.appendChild(ui.cards[view.played_card])
	} else {
		if (view.played_card > 0)
			ui.scoring_card.appendChild(ui.cards[view.played_card])
	}
	ui.played_power_card.replaceChildren()
	if (view.played_power_card > 0)
		ui.played_power_card.appendChild(ui.power_cards[view.played_power_card])

	ui.samizdat_card.replaceChildren()
	if (view.samizdat > 0)
		ui.samizdat_card.appendChild(ui.cards[view.samizdat])

	ui.hand.replaceChildren()
	for (let c of view.hand)
		ui.hand.appendChild(ui.cards[c])

	ui.power_hand.replaceChildren()
	if (view.power_hand)
		for (let c of view.power_hand)
			ui.power_hand.appendChild(ui.power_cards[c])

	ui.opp_hand.replaceChildren()
	if (view.opp_hand)
		for (let c of view.opp_hand)
			ui.opp_hand.appendChild(ui.cards[c])

	// TODO: fix rules to set view.opp_power_hand
	ui.opp_power_hand.replaceChildren()
	if (view.opp_power_hand)
		for (let c of view.opp_power_hand)
			ui.opp_hand.appendChild(ui.power_cards[c])

	ui.ceausescu_hand.replaceChildren()
	if (view.ceausescu_cards)
		for (let c of view.ceausescu_cards)
			ui.ceausescu_hand.appendChild(ui.power_cards[c])

	ui.discard.replaceChildren()
	for (let c of view.strategy_discard)
		ui.discard.appendChild(ui.cards[c])

	ui.removed.replaceChildren()
	for (let c of view.strategy_removed)
		ui.discard.appendChild(ui.cards[c])

	ui.table_cards.replaceChildren()
	if (view.table_cards)
		for (let c of view.table_cards)
			ui.table_cards.appendChild(ui.cards[c])

	for (let e of action_register)
		e.classList.toggle("action", is_action(e.my_action, e.my_id))

	action_button("yes", "Yes")
	action_button("no", "No")
	action_button("start", "Start")
	action_button("check", "Check held cards")
	action_button("tst_7", "Cancel opponent event")
	action_button("tst_8", "Event and operations")
	action_button("end", "End Game")
	action_button("continue", "Continue playing")
	action_button("east_germany", "East Germany")
	action_button("poland", "Poland")
	action_button("czechoslovakia", "Czechoslovakia")
	action_button("hungary", "Hungary")
	action_button("romania", "Romania")
	action_button("bulgaria", "Bulgaria")
	action_button("extra", "Take action round")
	action_button("pass", "Pass")
	action_button("remove", "Remove SPs")
	action_button("add", "Add SPs")
	action_button("ops", "Operations")
	action_button("discard", "Discard")
	action_button("strike", "Strike")
	action_button("march", "March")
	action_button("rally", "Rally in the Square")
	action_button("petition", "Petition")
	action_button("bonus", "Calculate VP bonus")
	action_button("scoring", "Score country")
	action_button("retain", "Retain Power")
	action_button("surrender", "Surrender Power")
	action_button("take", "Take Power")
	action_button("concede", "Concede")
	action_button("struggle", "Begin power struggle")
	action_button("raise", "Raise the stakes")
	action_button("draw", "Draw")
	action_button("scoring", "Scoring")
	action_button("event", "Event")
	action_button("opp_event", "Resolve opponent event")
	action_button("influence", "Place SPs")
	action_button("support_check", "Support Checks")
	action_button("tst", "Tiananmen Square Track")
	action_button("roll", "Roll a die")
	action_button("done", "Done")
	action_button("end_round", "End Round")
	action_button("undo", "Undo")
}

// =========================== LOG FUNCTIONS ==============================================

function sub_card_name(match, p1) {
	let x = p1 | 0
	return `<span class="card_name" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip()">${cards[x].name}</span>`
}

function sub_power_card_name(match, p1) {
	let x = p1 | 0
	return `<span class="card_name" onmouseenter="on_focus_power_card_tip(${x})" onmouseleave="on_blur_power_card_tip()">${power_cards[x].name}</span>`
}

function sub_power_card_value(match, p1) {
	let x = p1 | 0
	return `<span class="card_name">${x}</span>`
}

function sub_space_name(match, p1) {
	let id = p1 | 0
	let name = spaces[id].name_unique
	return `<span class="space_tip" onmouseenter="on_focus_space_tip(${id})" onmouseleave="on_blur_space_tip(${id})" onclick="on_click_space_tip(${id})">${name}</span>`
}

function sub_die(match) {
	return die[match] || match
}

const die = {
	D1: '<span class="die white d1"></span>',
	D2: '<span class="die white d2"></span>',
	D3: '<span class="die white d3"></span>',
	D4: '<span class="die white d4"></span>',
	D5: '<span class="die white d5"></span>',
	D6: '<span class="die white d6"></span>',
}

// =========================== VISUAL FUNCTIONS ==========================================#

function on_focus_card_tip(card_number) {
	document.getElementById("tooltip").className = "card event_" + card_number
}

function on_blur_card_tip() {
	document.getElementById("tooltip").classList = "card hide"
}

function on_focus_power_card_tip(card_number) {
	document.getElementById("tooltip").className = "card power_" + card_number
}

function on_blur_power_card_tip() {
	document.getElementById("tooltip").classList = "card hide"
}

function on_focus_space_tip(id) {
	ui.spaces[id].classList.add("tip")
}

function on_blur_space_tip(id) {
	ui.spaces[id].classList.remove("tip")
}

function on_click_space_tip(id) {
	scroll_into_view(ui.spaces[id])
}

function toggle_discard() {
	document.getElementById("discard_panel").classList.toggle("hide")
}

function toggle_removed() {
	document.getElementById("removed_panel").classList.toggle("hide")
}

function find_country_index(country) {
	return countries.indexOf(country)
}

// #region GENERATED LAYOUT DATA

var LAYOUT = {
	"Babes-Bolyai University": [958,1529,127,75],
	"Berlin": [329,148,127,75],
	"Bialystok": [1202,436,127,76],
	"Brasov": [1339,1556,127,75],
	"Bratislava": [539,1013,127,76],
	"Brno": [521,904,127,76],
	"Bucuresti": [1186,1837,127,76],
	"Budapest": [809,1249,127,76],
	"Bulgarian Writers": [838,2192,127,76],
	"Burgas": [1289,2152,127,76],
	"Bydgoszcz": [872,388,127,76],
	"Catholic Church, Czechoslovakia": [692,1010,127,75],
	"Catholic Church, Hungary": [409,1126,127,76],
	"Catholic Church, Poland": [802,558,127,75],
	"Ceske Budejovice": [260,765,127,77],
	"Charles University": [491,677,128,76],
	"Cluj-Napoca": [970,1429,127,76],
	"Constanta": [1443,1925,127,76],
	"Craiova": [977,1793,127,76],
	"Czech Writers": [573,773,127,76],
	"Debrecen": [1000,1192,127,76],
	"Dresden": [343,479,127,76],
	"Eotvos Lorand University": [658,1314,127,76],
	"Erfurt": [38,455,127,76],
	"Galati": [1409,1778,127,76],
	"Gdansk": [896,277,127,76],
	"German Writers": [81,239,127,76],
	"Gyor": [560,1129,127,76],
	"Halle": [231,357,127,75],
	"Harghita/Covasna": [1186,1560,127,75],
	"Hungarian Writers": [452,1322,127,76],
	"Iasi": [1369,1395,127,76],
	"Jagiellonian University": [870,867,127,76],
	"Karl-Marx-Stadt": [184,492,127,75],
	"Katowice": [733,723,127,76],
	"Kosice": [995,1037,127,76],
	"Krakow": [911,761,127,76],
	"Leipzig": [387,379,127,76],
	"Lodz": [959,620,127,76],
	"Lublin": [1124,754,127,76],
	"Lutheran Church": [391,271,127,76],
	"Magdeburg": [79,352,127,75],
	"Miskolc": [851,1146,127,76],
	"Orthodox Church, Bulgaria": [1130,1956,127,76],
	"Orthodox Church, Romania": [1094,1700,127,76],
	"Ostrava": [673,868,127,75],
	"Pecs": [626,1406,127,75],
	"Pleven": [979,1948,127,76],
	"Ploiesti": [1356,1671,127,76],
	"Plovdiv": [987,2209,127,75],
	"Plzen": [211,615,127,76],
	"Polish Writers": [1051,883,127,75],
	"Poznan": [671,452,127,76],
	"Praha": [412,782,127,75],
	"Presov": [844,1010,127,75],
	"Razgrad": [1219,2057,127,76],
	"Romanian Writers": [947,1625,127,75],
	"Rostock": [299,53,127,76],
	"Ruse": [1277,1956,127,76],
	"Schwerin": [148,86,127,76],
	"Sliven": [1144,2251,127,75],
	"Sofia": [983,2098,127,76],
	"Sofia University": [828,2095,127,76],
	"Stara Zagora": [1133,2153,127,75],
	"Szczecin": [574,263,127,75],
	"Szeged": [812,1364,127,76],
	"Szekesfehervar": [571,1223,127,75],
	"Szombathely": [410,1224,127,76],
	"Targu Mures": [1169,1443,127,76],
	"Tatabanya": [706,1126,127,75],
	"Timisoara": [767,1531,127,76],
	"Varna": [1387,2051,127,76],
	"Walter Ulbricht Academy": [234,240,127,76],
	"Warszawa": [1032,490,127,75],
	"Wroclaw": [595,565,127,75],
	"action_1": [708,143,48,44],
	"action_8": [1080,143,47,43],
	"country_bulgaria": [915,1999,46,41],
	"country_czechoslovakia": [463,624,44,39],
	"country_east_germany": [560,160,43,37],
	"country_hungary": [1034,1319,44,39],
	"country_poland": [1188,292,44,39],
	"country_romania": [1287,1349,44,39],
	"event_solidarity_legalized": [779,270,44,43],
	"event_the_wall": [222,179,40,41],
	"tst_com_1": [53,2257,47,47],
	"tst_com_7": [469,2257,47,47],
	"tst_com_8": [556,2257,47,47],
	"tst_dem_1": [53,2128,47,47],
	"tst_dem_7": [469,2128,47,47],
	"tst_dem_8": [556,2128,47,47],
	"turn_1": [655,81,47,48],
	"turn_10": [1133,80,48,48],
	"ussr_1": [1381,1080,48,48],
	"ussr_2": [1381,1134,48,48],
	"ussr_3": [1381,1188,48,48],
	"ussr_4": [1381,1243,48,48],
	"ussr_5": [1381,1297,48,48],
	"vp_0": [843,2425,55,51],
	"vp_1": [883,2395,55,50],
	"vp_19": [1440,2395,55,50],
	"vp_2": [913,2455,56,51],
	"vp_20": [1471,2455,55,51],
	"vp_neg_1": [803,2455,56,51],
	"vp_neg_19": [246,2456,55,50],
	"vp_neg_2": [772,2395,56,51],
	"vp_neg_20": [215,2395,55,51],
}