"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class Decode extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['b'],
            o: ['a'],
        }, {}, system, _ids_1.ID_DECODE);
    }
    f({ b }, done) {
        let a;
        try {
            a = atob(b);
        }
        catch (_a) {
            done(undefined, 'string not correctly encoded');
            return;
        }
        done({ a });
    }
}
exports.default = Decode;
//# sourceMappingURL=index.js.map