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