define(["require","exports","tslib","../../Validation"],function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(o.prototype.execute=function(r){return n.__awaiter(this,void 0,void 0,function(){var t;return n.__generator(this,function(e){switch(e.label){case 0:return(t=i.validation.exists("file",r.file))instanceof ArrayBuffer&&(t=new Blob([t],{type:"application/octet-binary"})),[4,this.getBase64(t)];case 1:return[2,{result:e.sent()}]}})})},o.prototype.getBase64=function(i){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,new Promise(function(t,r){var n=new FileReader;n.onload=function(){var e=(e=n.result).substring(e.indexOf("base64,")+7);return t(e)},n.onerror=function(e){return r(e)},n.readAsDataURL(i)})]})})},o.action="gcx:wf:core::GetBase64StringFromFile",o.suite="gcx:wf:builtin",o);function o(){}t.GetBase64StringFromFile=r});