<commit_before>import "operative";

export class CardplayStrategyProxy {
	constructor() {
		let imports = [];
				
		if (System.baseURL)
			operative.setBaseURL(System.baseURL);
			
		if (System.towerOptions && System.towerOptions.bundle) {
			imports = ["jspm_packages/system.js", System.towerOptions.bundle, "src/stores/strategy-worker.js"];
		}
		else {
			imports = ["jspm_packages/system.js", "config.js", "src/stores/strategy-worker.js"];						
		}
		
		this._operative = operative({
			getCard: function(cb) {
				instance
					.then((strategy) => {
						return strategy.getCard();
					})
					.then((card) => {
						cb(card);
					})<commit_msg>fix(baseURL): fix for baseURL not being set on System<commit_after>import "operative";


function getBaseUrl() {
	let bases = document.getElementsByTagName('base');
	return bases.length > 0 ? bases[0].href : undefined;
}

export class CardplayStrategyProxy {
	constructor() {
		let imports = [];
		
		let baseURL = getBaseUrl();

		if (baseURL)
			operative.setBaseURL(baseURL);

		if (System.towerOptions && System.towerOptions.bundle) {
			imports = ["jspm_packages/system.js", System.towerOptions.bundle, "src/stores/strategy-worker.js"];
		}
		else {
			imports = ["jspm_packages/system.js", "config.js", "src/stores/strategy-worker.js"];						
		}
		
		this._operative = operative({
			getCard: function(cb) {
				instance
					.then((strategy) => {
						return strategy.getCard();
					})
					.then((card) => {
						cb(card);
					})
{'fraction_non_alphanumeric': 0.15353805073431243, 'fraction_numerical': 0.0013351134846461949, 'mean_word_length': 3.307471264367816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6174078', 'n_tokens_mistral': 617, 'n_tokens_neox': 489, 'n_words': 87}