{"version":3,"sources":["jsdelivr-header.js","/npm/@yookue/babel-plugin-remove-comment@0.1.6/dist/cjs/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,MAAM,OAAS,QAAQ,eACvB,QAAQ,QAAU,CAAC,EAAQ,EAAU,CAAE,MAAO,WACnC,CACH,KAAM,sCACN,QAAS,CACL,OAAA,CAAQ,GACJ,GAAK,EAAQ,OAA2B,SAAlB,EAAQ,MAA9B,CAGA,IAAK,CAAC,MAAO,QAAS,OAAQ,QAAQ,SAAS,EAAQ,OACnD,MAAM,YAAY,4BAA4B,EAAQ,iEAE1D,EAAK,SAAS,CACV,KAAA,CAAM,GACF,MAAM,EAAU,EAAK,KAAK,gBACpB,EAAW,EAAK,KAAK,kBACrB,GAA8B,IAAnB,EAAQ,QAAmB,GAAgC,IAApB,EAAS,UAG3C,QAAlB,EAAQ,MACR,OAAO,MAAM,eAAe,EAAK,MAEV,UAAlB,EAAQ,OACT,GAAW,EAAQ,OAAS,IAC5B,EAAK,KAAK,gBAAkB,EAAQ,QAAO,GAAsB,iBAAd,EAAK,QAExD,GAAY,EAAS,OAAS,IAC9B,EAAK,KAAK,iBAAmB,EAAS,QAAO,GAAsB,iBAAd,EAAK,SAGvC,SAAlB,EAAQ,QACT,GAAW,EAAQ,OAAS,IAC5B,EAAK,KAAK,gBAAkB,EAAQ,QAAO,GAAsB,gBAAd,EAAK,QAExD,GAAY,EAAS,OAAS,IAC9B,EAAK,KAAK,iBAAmB,EAAS,QAAO,GAAsB,gBAAd,EAAK,SAGtE,GA9BJ,CAgCJ","file":"/npm/@yookue/babel-plugin-remove-comment@0.1.6/dist/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@yookue/babel-plugin-remove-comment@0.1.6/dist/cjs/index.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\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core_1 = require(\"@babel/core\");\r\nexports.default = (_babel, options = { scope: 'none' }) => {\r\n    return {\r\n        name: '@yookue/babel-plugin-remove-comment',\r\n        visitor: {\r\n            Program(path) {\r\n                if (!options.scope || options.scope === 'none') {\r\n                    return;\r\n                }\r\n                if (!['all', 'block', 'line', 'none'].includes(options.scope)) {\r\n                    throw SyntaxError(`Invalid scope parameter '${options.scope}', it should be one of 'all' | 'block' | 'line' | 'none'`);\r\n                }\r\n                path.traverse({\r\n                    enter(path) {\r\n                        const leading = path.node.leadingComments;\r\n                        const trailing = path.node.trailingComments;\r\n                        if ((!leading || leading.length === 0) && (!trailing || trailing.length === 0)) {\r\n                            return;\r\n                        }\r\n                        if (options.scope === 'all') {\r\n                            core_1.types.removeComments(path.node);\r\n                        }\r\n                        else if (options.scope === 'block') {\r\n                            if (leading && leading.length > 0) {\r\n                                path.node.leadingComments = leading.filter(item => item.type !== 'CommentBlock');\r\n                            }\r\n                            if (trailing && trailing.length > 0) {\r\n                                path.node.trailingComments = trailing.filter(item => item.type !== 'CommentBlock');\r\n                            }\r\n                        }\r\n                        else if (options.scope === 'line') {\r\n                            if (leading && leading.length > 0) {\r\n                                path.node.leadingComments = leading.filter(item => item.type !== 'CommentLine');\r\n                            }\r\n                            if (trailing && trailing.length > 0) {\r\n                                path.node.trailingComments = trailing.filter(item => item.type !== 'CommentLine');\r\n                            }\r\n                        }\r\n                    }\r\n                });\r\n            }\r\n        }\r\n    };\r\n};\r\n"]}