/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/tsify@5.0.4/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var realpath=require("fs.realpath"),log=require("util").debuglog(require("./package").name),through=require("through2"),path=require("path");function tsify(e,r){if("string"==typeof e)throw new Error("tsify appears to have been configured as a transform; it must be configured as a plugin.");var t=r.typescript||require("typescript");("string"==typeof t||t instanceof String)&&(t=require(t));var n=new(require("./lib/Tsifier")(t))(r,e._options);n.on("error",(function(r){e.pipeline.emit("error",r)})),n.on("file",(function(r,t){e.emit("file",r,t)})),o();var i={global:r.global};function o(){n.opts.jsx&&-1===e._extensions.indexOf(".tsx")&&e._extensions.unshift(".tsx"),-1===e._extensions.indexOf(".ts")&&e._extensions.unshift(".ts"),e.pipeline.get("record").push(function(){var e=[];return through.obj(r,t);function r(r,t,n){e.push(r),n()}function t(r){var t=this,i=[],o=e.map((function(e){var r=e.file||e.id;if(r)if(void 0!==e.source)i.push(r);else{if(e.basedir)return path.resolve(e.basedir,r);if(path.isAbsolute(r))return r;i.push(r)}return null})).filter((function(e){return e})).map((function(e){return realpath.realpathSync(e)}));o.length&&(log("Files from browserify entry points:"),o.forEach((function(e){log("  %s",e)}))),i.length&&(log("Ignored browserify entry points:"),i.forEach((function(e){log("  %s",e)}))),n.reset(),n.generateCache(o,i),e.forEach((function(e){t.push(e)})),t.push(null),r()}}())}e.transform(n.transform.bind(n),i),e.on("reset",(function(){o()}))}module.exports=tsify;
//# sourceMappingURL=/sm/73a00a930772b05348916c4d95bb6227c930188f48ff0818a26fae1ac394d12b.map