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5F,IAAI,EAAQ,GAER,IAEF,EADY,EAAY,OAAO,EAAY,OAAO,OAAS,GAC7C,OAGhB,IAAI,EAAyB,CAC3B,MAAO,EACP,iBAAkB,EAClB,YAAa,EACb,SAAU,EACV,QAAS,GAEP,GAAsD,IAAvC,EAAM,QAAQ,qBAAgC,QAAQ,qBAAuB,QAAQ,eACpG,EAAO,EAAY,EAAa,GAAa,GAC7C,GAAW,EAAI,OAAO,aAAa,GACnC,EAAM,EAAM,OAAO,SAAS,CAAC,GAAG,EAAI,OAAO,SAAS,EAAS,EAAY,MAAO,CAClF,MAAO,EACP,KAAM,EACN,uBAAwB,EACxB,SAAU,KAGZ,EAAY,OAAO,GAAY,CAC7B,OAAQ,WACN,OAAO,CACT,EACA,KAAM,WACJ,OAAO,EAAI,MACb,EAEJ,GACF,KAAI,OAAM,SAAU,GAClB,GAAI,EAAK,MAAM,CACjB,IAAG,QAAQ,EACb,GACF,GACF,EAEA,OAAO,QAAU","file":"/npm/react-static-webpack-plugin@2.1.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-static-webpack-plugin@2.1.0/dist/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\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }(); /**\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * \n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          *\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * Webpack Plugin Resources:\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * - https://github.com/andreypopp/webpack-stylegen/blob/master/lib/webpack/index.js#L5\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * - https://github.com/webpack/extract-text-webpack-plugin/blob/v1.0.1/loader.js#L62\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * - https://github.com/kevlened/debug-webpack-plugin/blob/master/index.js\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          * - https://github.com/ampedandwired/html-webpack-plugin/blob/v2.0.3/index.js\n                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          */\n\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _server = require('react-dom/server');\n\nvar _reactRouter = require('react-router');\n\nvar _bluebird = require('bluebird');\n\nvar _bluebird2 = _interopRequireDefault(_bluebird);\n\nvar _isFunction = require('lodash/isFunction');\n\nvar _isFunction2 = _interopRequireDefault(_isFunction);\n\nvar _utils = require('./utils.js');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar debug = require('debug')('react-static-webpack-plugin:index');\n\nvar renderToStaticDocument = function renderToStaticDocument(Component, props) {\n  return '<!doctype html>' + (0, _server.renderToStaticMarkup)(_react2.default.createElement(Component, props));\n};\n\nvar validateOptions = function validateOptions(options) {\n  if (!options) {\n    throw new Error('No options provided');\n  }\n  if (!options.routes && !options.component) {\n    throw new Error('No component or routes param provided');\n  }\n  if (!options.template) {\n    throw new Error('No template param provided');\n  }\n  if (options.renderToStaticMarkup && typeof options.renderToStaticMarkup !== 'boolean') {\n    throw new Error('Optional param renderToStaticMarkup must have a value of either true or false');\n  }\n};\n\nfunction StaticSitePlugin(options) {\n  validateOptions(options);\n  this.options = options;\n}\n\n/**\n * The same as the RR match function, but promisified.\n */\nvar promiseMatch = function promiseMatch(args) {\n  return new _bluebird2.default(function (resolve, reject) {\n    (0, _reactRouter.match)(args, function (error, redirectLocation, renderProps) {\n      resolve({ error: error, redirectLocation: redirectLocation, renderProps: renderProps });\n    }, reject);\n  });\n};\n\n/**\n * `compiler` is an instance of the Compiler\n * https://github.com/webpack/webpack/blob/master/lib/Compiler.js#L143\n *\n * NOTE: renderProps.routes is always passed as an array of route elements. For\n * deeply nested routes the last element in the array is the route we want to\n * get the props of, so we grab it out of the array and use it. This lets us do\n * things like:\n *\n *   <Route title='Blah blah blah...' {...moreProps} />\n *\n * Then set the document title to the title defined on that route\n *\n * NOTE: Sometimes when matching routes we do not get an error but nore do we\n * get renderProps. In my experience this usually means we hit an IndexRedirect\n * or some form of Route that doesn't actually have a component to render. In\n * these cases we simply keep on moving and don't render anything.\n *\n * TODO:\n * - Allow passing a function for title?\n *\n */\nStaticSitePlugin.prototype.apply = function (compiler) {\n  var _this = this;\n\n  var compilationPromise = void 0;\n\n  /**\n   * Compile everything that needs to be compiled. This is what the 'make'\n   * plugin is excellent for.\n   */\n  compiler.plugin('make', function (compilation, cb) {\n    var _options = _this.options,\n        component = _options.component,\n        routes = _options.routes,\n        template = _options.template,\n        reduxStore = _options.reduxStore;\n\n    // Promise loggers. These are simply for debugging\n\n    var promiseLog = function promiseLog(str) {\n      return function (x) {\n        debug('COMPILATION LOG: --' + str + '--', x);\n        return x;\n      };\n    };\n\n    var promiseErr = function promiseErr(str) {\n      return function (x) {\n        debug('COMPILATION ERR: --' + str + '--', x);\n        return _bluebird2.default.reject(x);\n      };\n    };\n\n    // Compile routes and template\n    var promises = [(0, _utils.compileAsset)({\n      filepath: routes || component,\n      outputFilename: (0, _utils.prefix)('routes.js'),\n      compilation: compilation,\n      context: compiler.context\n    }).then(promiseLog('routes')).catch(promiseErr('routes')), (0, _utils.compileAsset)({\n      filepath: template,\n      outputFilename: (0, _utils.prefix)('template.js'),\n      compilation: compilation,\n      context: compiler.context\n    }).then(promiseLog('template')).catch(promiseErr('template'))];\n\n    if (reduxStore) {\n      promises.push((0, _utils.compileAsset)({\n        filepath: reduxStore,\n        outputFilename: (0, _utils.prefix)('store.js'),\n        compilation: compilation,\n        context: compiler.context\n      }).then(promiseLog('reduxStore')).catch(promiseErr('reduxStore')));\n    }\n\n    compilationPromise = _bluebird2.default.all(promises).catch(function (err) {\n      return _bluebird2.default.reject(new Error(err));\n    }).finally(cb);\n  });\n\n  /**\n   * NOTE: It turns out that vm.runInThisContext works fine while evaluate\n   * failes. It seems evaluate the routes file in this example as empty, which\n   * it should not be... Not sure if switching to vm from evaluate will cause\n   * breakage so i'm leaving it in here with this note for now.\n   *\n   * compiler seems to be an instance of the Compiler\n   * https://github.com/webpack/webpack/blob/master/lib/Compiler.js#L143\n   *\n   * NOTE: renderProps.routes is always passed as an array of route elements. For\n   * deeply nested routes the last element in the array is the route we want to\n   * get the props of, so we grab it out of the array and use it. This lets us do\n   * things like:\n   *\n   *   <Route title='Blah blah blah...' {...moreProps} />\n   *\n   * Then set the document title to the title defined on that route\n   *\n   * NOTE: Sometimes when matching routes we do not get an error but nore do we\n   * get renderProps. In my experience this usually means we hit an IndexRedirect\n   * or some form of Route that doesn't actually have a component to render. In\n   * these cases we simply keep on moving and don't render anything.\n   *\n   * TODO:\n   * - Allow passing a function for title\n   */\n  compiler.plugin('emit', function (compilation, cb) {\n    compilationPromise.catch(cb) // TODO: Eval failed, likely a syntax error in build\n    .then(function (assets) {\n      if (assets instanceof Error) {\n        throw assets;\n      }\n\n      if (!assets) {\n        debug('Assets failed!', assets);\n        throw new Error('Compilation completed with undefined assets. This likely means\\n' + 'react-static-webpack-plugin had trouble compiling one of the entry\\n' + 'points specified in options. To get more detail, try running again\\n' + 'but prefix your build command with:\\n\\n' + '  DEBUG=react-static-webpack-plugin*\\n\\n' + 'That will enable debug logging and output more detailed information.');\n      }\n\n      // Remove all the now extraneous compiled assets and any sourceamps that\n      // may have been generated for them\n      (0, _utils.getExtraneousAssets)().forEach(function (key) {\n        debug('Removing extraneous asset and associated sourcemap. Asset name: \"' + key + '\"');\n        delete compilation.assets[key];\n        delete compilation.assets[key + '.map'];\n      });\n\n      var _assets = _slicedToArray(assets, 3),\n          routes = _assets[0],\n          template = _assets[1],\n          store = _assets[2];\n\n      if (!routes) {\n        throw new Error('Entry file compiled with empty source: ' + (_this.options.routes || _this.options.component));\n      }\n\n      routes = routes.routes || routes.default || routes;\n\n      if (template) {\n        template = template.default || template;\n      }\n\n      if (store) {\n        store = store.store || store.default || store;\n      }\n\n      if (_this.options.template && !(0, _isFunction2.default)(template)) {\n        throw new Error('Template file did not compile with renderable default export: ' + _this.options.template);\n      }\n\n      // Set up the render function that will be used later on\n      _this.render = function (props) {\n        return renderToStaticDocument(template, props);\n      };\n\n      var manifest = Object.keys(compilation.assets).reduce(function (agg, k) {\n        agg[k] = k;\n        return agg;\n      }, {});\n\n      var manifestKey = _this.options.manifest || 'manifest.json'; // TODO: Is it wise to default this? Maybe it should be explicit?\n      try {\n        var manifestAsset = compilation.assets[manifestKey];\n        if (manifestAsset) {\n          manifest = JSON.parse(manifestAsset.source());\n        } else {\n          debug('No manifest file found so default manifest will be provided');\n        }\n      } catch (err) {\n        debug('Error parsing manifest file:', err);\n      }\n\n      debug('manifest', manifest);\n\n      // Support rendering a single component without the need for react router.\n      if (!_this.options.routes && _this.options.component) {\n        debug('Entrypoint specified with `component` option. Rendering individual component.');\n        var options = _extends({}, (0, _utils.addHash)(_this.options, compilation.hash), {\n          manifest: manifest\n        });\n        compilation.assets['index.html'] = (0, _utils.renderSingleComponent)(routes, options, _this.render, store);\n        return cb();\n      }\n\n      var paths = (0, _utils.getAllPaths)(routes);\n      debug('Parsed routes:', paths);\n\n      // Make sure the user has installed redux dependencies if they passed in a\n      // store\n      var Provider = void 0;\n      if (store) {\n        try {\n          Provider = require('react-redux').Provider;\n        } catch (err) {\n          err.message = 'Looks like you provided the \\'reduxStore\\' option but there was an error importing these dependencies. Did you forget to install \\'redux\\' and \\'react-redux\\'?\\n' + err.message;\n          throw err;\n        }\n      }\n\n      _bluebird2.default.all(paths.map(function (location) {\n        return promiseMatch({ routes: routes, location: location }).then(function (_ref) {\n          var error = _ref.error,\n              redirectLocation = _ref.redirectLocation,\n              renderProps = _ref.renderProps;\n          var options = _this.options;\n\n          var logPrefix = 'react-static-webpack-plugin:';\n          var emptyBodyWarning = 'Route will be rendered with an empty body.';\n          var component = void 0;\n\n          if (redirectLocation) {\n            debug('Redirect encountered. Ignoring route: \"' + location + '\"', redirectLocation);\n            (0, _utils.log)(logPrefix + ' Redirect encountered: ' + location + ' -> ' + redirectLocation.pathname + '. ' + emptyBodyWarning);\n          } else if (error) {\n            debug('Error encountered matching route', location, error, redirectLocation, renderProps);\n            (0, _utils.log)(logPrefix + ' Error encountered rendering route \"' + location + '\". ' + emptyBodyWarning);\n          } else if (!renderProps) {\n            debug('No renderProps found matching route', location, error, redirectLocation, renderProps);\n            (0, _utils.log)(logPrefix + ' No renderProps found matching route \"' + location + '\". ' + emptyBodyWarning);\n          } else if (store) {\n            debug('Redux store provided. Rendering \"' + location + '\" within Provider.');\n            component = _react2.default.createElement(\n              Provider,\n              { store: store },\n              _react2.default.createElement(_reactRouter.RouterContext, renderProps)\n            );\n\n            // Make sure initialState will be provided to the template\n            options = _extends({}, options, { initialState: store.getState() });\n          } else {\n            component = _react2.default.createElement(_reactRouter.RouterContext, renderProps); // Successful render\n          }\n\n          var title = '';\n\n          if (renderProps) {\n            var route = renderProps.routes[renderProps.routes.length - 1]; // See NOTE\n            title = route.title;\n          }\n\n          var reactStaticCompilation = {\n            error: error,\n            redirectLocation: redirectLocation,\n            renderProps: renderProps,\n            location: location,\n            options: options };\n\n          var renderMethod = _this.options.renderToStaticMarkup === true ? _server.renderToStaticMarkup : _server.renderToString;\n          var body = component ? renderMethod(component) : '';\n          var assetKey = (0, _utils.getAssetKey)(location);\n          var doc = _this.render(_extends({}, (0, _utils.addHash)(options, compilation.hash), {\n            title: title,\n            body: body,\n            reactStaticCompilation: reactStaticCompilation,\n            manifest: manifest\n          }));\n\n          compilation.assets[assetKey] = {\n            source: function source() {\n              return doc;\n            },\n            size: function size() {\n              return doc.length;\n            }\n          };\n        });\n      })).catch(function (err) {\n        if (err) throw err;\n      }).finally(cb);\n    });\n  });\n};\n\nmodule.exports = StaticSitePlugin;"]}