<commit_before>part of couclient;

class Buff {
	/// Buffs panel
	static final Element _buffContainer = querySelector("#buffHolder");

	/// List of running buffs
	static Map<String, Buff> _running = new Map();

	/// Whether the player has the specified buff
	static bool isRunning(String id) {
		return _running.containsKey(id);
	}

	/// Download existing buffs from server
	static void _loadExisting() {
		HttpRequest.getString(
			"http://${Configs.utilServerAddress}/buffs/get/${game.email}"
		).then((String json) {
			JSON.decode(json).forEach((Map buff) => new Buff.fromMap(buff));
		});
	}

	/// Display a buff
	Buff(this.id, this.name, this.description, this.length, this.remaining) {
		_running.addAll({id: this});
		_display();
		_animate();
	}

	/// Parse an encoded buff (and display it)
	Buff.fromMap(Map<String, dynamic> map) {<commit_msg>require Penpersonship I to edit notes<commit_after>part of couclient;

class Buff {
	/// Buffs panel
	static final Element _buffContainer = querySelector("#buffHolder");

	/// List of running buffs
	static Map<String, Buff> _running = new Map();

	/// Whether the player has the specified buff
	static bool isRunning(String id) {
		return _running.containsKey(id);
	}

	/// Download existing buffs from server
	static void loadExisting() {
		HttpRequest.getString(
			"http://${Configs.utilServerAddress}/buffs/get/${game.email}"
		).then((String json) {
			JSON.decode(json).forEach((Map buff) => new Buff.fromMap(buff));
		});
	}

	/// Display a buff
	Buff(this.id, this.name, this.description, this.length, this.remaining) {
		_running.addAll({id: this});
		_display();
		_animate();
	}

	/// Parse an encoded buff (and display it)
	Buff.fromMap(Map<String, dynamic> map) {
{'fraction_non_alphanumeric': 0.14459224985540775, 'fraction_numerical': 0.0, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7556622', 'n_tokens_mistral': 575, 'n_tokens_neox': 543, 'n_words': 151}