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U,EAAiB,aAEpF,OAAK,EAAO,gBAAkB,EAAO,eAAe,iBAC9C,SAAU,EAAO,eAAe,iBAAkB,SAC/C,KAGD,EAAO,eAAe,iBAGvB,IACR,EAEA,KAAM,SAAgB,GACrB,GAAK,IAAO,SACX,OAAO,CAET,EAEA,UAAW,SAAqB,EAAM,GACrC,IAAM,EAAQ,GAAS,OAAO,KAE9B,IAAI,EAAc,EAAW,gBAAiB,EAAM,CACnD,SAAU,EACV,mBAAmB,EACnB,gBAAiB,IAId,EAAc,EAAY,YAC7B,EAAY,YAAY,QAAQ,SAAU,GAAc,OAA2B,OAApB,EAAW,IAAe,IAAM,GAE5F,GAAa,EAoBjB,GAlBA,EAAY,SAAS,SAAU,GAC9B,IAAI,EAAU,EAAW,6BAA6B,EAAW,YAAa,MAE9E,GAAK,EAAW,KAAO,CACtB,IAAI,EAAM,EAAW,KAAK,8BAA+B,EAAW,OAChE,EAAO,EAAI,KACX,EAAY,EAAI,UAEpB,QAAQ,MAAS,EAAW,KAAa,SAAI,KAAO,EAAO,GAAK,KAAO,EAAY,GAAK,cAAiB,EAAe,KAAI,KAAO,EACpI,MACC,QAAQ,MAAQ,UAAY,GAGxB,EAAW,WAAa,GAAG,mBAAmB,QAClD,GAAa,EAEf,IAEK,EACJ,MAAM,IAAI,MAAO,4CAGlB,MAAO,CACN,KAAM,EAAY,WAGlB,IAAK,EAAY,cAAgB,KAAK,MAAM,EAAY,eAAiB,KAE3E,EAEF,CAEA,OAAO,QAAU","file":"/npm/rollup-plugin-typescript@1.0.1/dist/rollup-plugin-typescript.cjs.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/rollup-plugin-typescript@1.0.1/dist/rollup-plugin-typescript.cjs.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar ts = require('typescript');\nvar rollupPluginutils = require('rollup-pluginutils');\nvar fs = require('fs');\nvar resolveId = _interopDefault(require('resolve'));\nvar path = require('path');\n\nfunction endsWith ( str, tail ) {\n\treturn !tail.length || str.slice( -tail.length ) === tail;\n}\n\nfunction getDefaultOptions () {\n\treturn {\n\t\tnoEmitHelpers: true,\n\t\tmodule: 'ESNext',\n\t\tsourceMap: true,\n\t\timportHelpers: true\n\t};\n}\n\n// Gratefully lifted from 'look-up', due to problems using it directly:\n//   https://github.com/jonschlinkert/look-up/blob/master/index.js\n//   MIT Licenced\nfunction findFile ( cwd, filename ) {\n\tvar fp = cwd ? ( cwd + '/' + filename ) : filename;\n\n\tif ( fs.existsSync( fp ) ) {\n\t\treturn fp;\n\t}\n\n\tvar segs = cwd.split( path.sep );\n\tvar len = segs.length;\n\n\twhile ( len-- ) {\n\t\tcwd = segs.slice( 0, len ).join( '/' );\n\t\tfp = cwd + '/' + filename;\n\t\tif ( fs.existsSync( fp ) ) {\n\t\t\treturn fp;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction getCompilerOptionsFromTsConfig (typescript, tsconfigPath) {\n\tif (tsconfigPath && !fs.existsSync(tsconfigPath)) {\n\t\tthrow new Error((\"Could not find specified tsconfig.json at \" + tsconfigPath));\n\t}\n\tvar existingTsConfig = tsconfigPath || findFile( process.cwd(), 'tsconfig.json' );\n\tif (!existingTsConfig) {\n\t\treturn {};\n\t}\n\tvar tsconfig = typescript.readConfigFile( existingTsConfig, function (path) { return fs.readFileSync( path, 'utf8' ); } );\n\n\tif ( !tsconfig.config || !tsconfig.config.compilerOptions ) { return {}; }\n\treturn tsconfig.config.compilerOptions;\n}\n\nfunction adjustCompilerOptions ( typescript, options ) {\n\t// Set `sourceMap` to `inlineSourceMap` if it's a boolean\n\t// under the assumption that both are never specified simultaneously.\n\tif ( typeof options.inlineSourceMap === 'boolean' ) {\n\t\toptions.sourceMap = options.inlineSourceMap;\n\t\tdelete options.inlineSourceMap;\n\t}\n\n\t// Delete the `declaration` option to prevent compilation error.\n\t// See: https://github.com/rollup/rollup-plugin-typescript/issues/45\n\tdelete options.declaration;\n}\n\nvar resolveHost = {\n\tdirectoryExists: function directoryExists ( dirPath ) {\n\t\ttry {\n\t\t\treturn fs.statSync( dirPath ).isDirectory();\n\t\t} catch ( err ) {\n\t\t\treturn false;\n\t\t}\n\t},\n\tfileExists: function fileExists ( filePath ) {\n\t\ttry {\n\t\t\treturn fs.statSync( filePath ).isFile();\n\t\t} catch ( err ) {\n\t\t\treturn false;\n\t\t}\n\t}\n};\n\nvar TSLIB_ID = '\\0tslib';\n\nfunction typescript ( options ) {\n\tif ( options === void 0 ) options = {};\n\n\toptions = Object.assign( {}, options );\n\n\tvar filter = rollupPluginutils.createFilter(\n\t\toptions.include || [ '*.ts+(|x)', '**/*.ts+(|x)' ],\n\t\toptions.exclude || [ '*.d.ts', '**/*.d.ts' ] );\n\n\tdelete options.include;\n\tdelete options.exclude;\n\n\t// Allow users to override the TypeScript version used for transpilation and tslib version used for helpers.\n\tvar typescript = options.typescript || ts;\n\tvar tslib = options.tslib ||\n\t\tfs.readFileSync(resolveId.sync('tslib/tslib.es6.js', { basedir: __dirname }), 'utf-8' );\n\n\tdelete options.typescript;\n\tdelete options.tslib;\n\n\t// Load options from `tsconfig.json` unless explicitly asked not to.\n\tvar tsconfig = options.tsconfig === false ?\n\t\t{} :\n\t\tgetCompilerOptionsFromTsConfig( typescript, options.tsconfig );\n\n\tdelete options.tsconfig;\n\n\t// Since the CompilerOptions aren't designed for the Rollup\n\t// use case, we'll adjust them for use with Rollup.\n\tadjustCompilerOptions( typescript, tsconfig );\n\tadjustCompilerOptions( typescript, options );\n\n\toptions = Object.assign( tsconfig, getDefaultOptions(), options );\n\n\t// Verify that we're targeting ES2015 modules.\n\tvar moduleType = options.module.toUpperCase();\n\tif ( moduleType !== 'ES2015' && moduleType !== 'ES6' && moduleType !== 'ESNEXT' && moduleType !== 'COMMONJS' ) {\n\t\tthrow new Error( (\"rollup-plugin-typescript: The module kind should be 'ES2015' or 'ESNext, found: '\" + (options.module) + \"'\") );\n\t}\n\n\tvar parsed = typescript.convertCompilerOptionsFromJson( options, process.cwd() );\n\n\tif ( parsed.errors.length ) {\n\t\tparsed.errors.forEach( function (error) { return console.error( (\"rollup-plugin-typescript: \" + (error.messageText)) ); } );\n\n\t\tthrow new Error( \"rollup-plugin-typescript: Couldn't process compiler options\" );\n\t}\n\n\tvar compilerOptions = parsed.options;\n\n\treturn {\n\t\tname: 'typescript',\n\n\t\tresolveId: function resolveId ( importee, importer ) {\n\t\t\tif ( importee === 'tslib' ) {\n\t\t\t\treturn TSLIB_ID;\n\t\t\t}\n\n\t\t\tif ( !importer ) { return null; }\n\t\t\timporter = importer.split('\\\\').join('/');\n\n\t\t\tvar result = typescript.nodeModuleNameResolver(importee, importer, compilerOptions, resolveHost);\n\n\t\t\tif ( result.resolvedModule && result.resolvedModule.resolvedFileName ) {\n\t\t\t\tif ( endsWith( result.resolvedModule.resolvedFileName, '.d.ts' ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn result.resolvedModule.resolvedFileName;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\n\t\tload: function load ( id ) {\n\t\t\tif ( id === TSLIB_ID ) {\n\t\t\t\treturn tslib;\n\t\t\t}\n\t\t},\n\n\t\ttransform: function transform ( code, id ) {\n\t\t\tif ( !filter( id ) ) { return null; }\n\n\t\t\tvar transformed = typescript.transpileModule( code, {\n\t\t\t\tfileName: id,\n\t\t\t\treportDiagnostics: true,\n\t\t\t\tcompilerOptions: compilerOptions\n\t\t\t});\n\n\t\t\t// All errors except `Cannot compile modules into 'es6' when targeting 'ES5' or lower.`\n\t\t\tvar diagnostics = transformed.diagnostics ?\n\t\t\t\ttransformed.diagnostics.filter( function (diagnostic) { return diagnostic.code !== 1204; } ) : [];\n\n\t\t\tvar fatalError = false;\n\n\t\t\tdiagnostics.forEach( function (diagnostic) {\n\t\t\t\tvar message = typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\\n');\n\n\t\t\t\tif ( diagnostic.file ) {\n\t\t\t\t\tvar ref = diagnostic.file.getLineAndCharacterOfPosition( diagnostic.start );\n\t\t\t\t\tvar line = ref.line;\n\t\t\t\t\tvar character = ref.character;\n\n\t\t\t\t\tconsole.error( ((diagnostic.file.fileName) + \"(\" + (line + 1) + \",\" + (character + 1) + \"): error TS\" + (diagnostic.code) + \": \" + message) );\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error( (\"Error: \" + message) );\n\t\t\t\t}\n\n\t\t\t\tif ( diagnostic.category === ts.DiagnosticCategory.Error ) {\n\t\t\t\t\tfatalError = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tif ( fatalError ) {\n\t\t\t\tthrow new Error( \"There were TypeScript errors transpiling\" );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcode: transformed.outputText,\n\n\t\t\t\t// Rollup expects `map` to be an object so we must parse the string\n\t\t\t\tmap: transformed.sourceMapText ? JSON.parse(transformed.sourceMapText) : null\n\t\t\t};\n\t\t}\n\t};\n}\n\nmodule.exports = typescript;\n"]}