{"version":3,"sources":["jsdelivr-header.js","/npm/nuxt-seo-module@1.0.0/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,MAAQ,QAAQ,QAAR,CAAiB,YACzB,QAAU,QAAQ,mBAClB,OAAS,QAAQ,kBAEvB,OAAO,QAAU,SAAU,GACzB,MAAM,EAAU,IACX,KAAK,WACL,EACH,QAAS,KAEuC,KAA3C,GAAiB,KAAK,SAAS,QAC9B,CAAC,CACC,KAAM,cACN,SAAU,KACV,UAAU,EACV,QAAS,GACT,OAAQ,GACR,UAAW,OAEZ,GAAiB,KAAK,SAAS,QAAQ,KAAI,IACnC,CACL,KAAM,cACN,SAAU,KACV,UAAU,EACV,QAAS,GACT,OAAQ,GACR,UAAW,OACR,OAKb,OAAQ,CACN,UAAW,IACX,SAAU,MACP,KAAK,QAAQ,WACZ,GAAiB,CAAC,GAAG,SAKzB,EAAQ,SAAW,EAAQ,SAAW,EAAQ,gCAChD,EAAQ,OAAO,QAAU,IACnB,EAAQ,OAAO,SAAW,MAC3B,EAAQ,QAAQ,KAAI,GAAM,EAAG,SAKpC,EAAQ,SAAW,QAAQ,oBAAoB,EAAS,MACxD,EAAQ,QAAU,OAAO,oBAAoB,EAAS,MACtD,MAAM,2BAGF,EAAQ,KAAQ,EAAQ,WAI5B,EAAQ,SAAW,MAAM,mCACzB,EAAQ,QAAU,MAAM,gCAExB,KAAK,KAAK,KAAK,iBAAiB,IACvB,QAAQ,IAAI,CACjB,EAAQ,SAAW,QAAQ,WAAW,EAAS,MAC/C,EAAQ,QAAU,OAAO,WAAW,EAAS,QAE5C,MAAK,KACJ,EAAQ,SAAW,MAAM,oCACzB,EAAQ,QAAU,MAAM,gCAAgC,MAGhE","file":"/npm/nuxt-seo-module@1.0.0/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/nuxt-seo-module@1.0.0/src/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';\n\nconst debug = require('debug')('nuxt:seo');\nconst sitemap = require('./sitemap/index');\nconst robots = require('./robots/index');\n\nmodule.exports = function (moduleOptions) {\n  const options = {\n    ...this.options,\n    ...moduleOptions,\n    sitemap: [\n      ...(\n        (moduleOptions || this.options).sitemap === true ?\n          [{\n            path: 'sitemap.xml',\n            hostname: null,\n            generate: true,\n            exclude: [],\n            routes: [],\n            cacheTime: 1000 * 60 * 15\n          }] :\n          (moduleOptions || this.options).sitemap.map(sitemap => {\n            return {\n              path: 'sitemap.xml',\n              hostname: null,\n              generate: true,\n              exclude: [],\n              routes: [],\n              cacheTime: 1000 * 60 * 15,\n              ...sitemap\n            };\n          })\n      )\n    ],\n    robots: {\n      UserAgent: '*',\n      Disallow: '',\n      ...this.options.robots,\n      ...(moduleOptions || {}).robots\n    }\n  };\n\n  // Add generated sitemap into robots.txt\n  if (options.sitemap && options.robots && !options.noGeneratedSitemapInRobotsTxT) {\n    options.robots.Sitemap = [\n      ...(options.robots.sitemap || []),\n      ...options.sitemap.map(sm => sm.path)\n    ];\n  }\n\n  // Register middlewares\n  options.sitemap && sitemap.registerMiddlewares(options, this);\n  options.robots && robots.registerMiddlewares(options, this);\n  debug('Middlewares registered');\n\n  // Stop there if it's not generate mode\n  if (options.dev || !options.generate) {\n    return;\n  }\n\n  options.sitemap && debug('Starting generate sitemap files');\n  options.robots && debug('Starting generate robots.txt');\n\n  this.nuxt.hook('build:compile', () => {\n    return Promise.all([\n      options.sitemap && sitemap.writeFiles(options, this),\n      options.robots && robots.writeFiles(options, this)\n    ])\n      .then(() => {\n        options.sitemap && debug('Finishing generate sitemap files');\n        options.robots && debug('Finishing generate robots.txt');\n      });\n  });\n};\n"]}