import { __webpack_require__ } from "./465.js";
import "./465.js";
__webpack_require__.add({
    "./node_modules/.pnpm/connect-history-api-fallback@2.0.0/node_modules/connect-history-api-fallback/lib/index.js" (module, exports, __webpack_require__) {
        var url = __webpack_require__("url?b918");
        module.exports = function(options) {
            options = options || {};
            var logger = getLogger(options);
            return function(req, res, next) {
                var headers = req.headers;
                if ('GET' !== req.method && 'HEAD' !== req.method) {
                    logger('Not rewriting', req.method, req.url, 'because the method is not GET or HEAD.');
                    return next();
                }
                if (headers && 'string' == typeof headers.accept) {
                    if (0 === headers.accept.indexOf('application/json')) {
                        logger('Not rewriting', req.method, req.url, 'because the client prefers JSON.');
                        return next();
                    } else if (!acceptsHtml(headers.accept, options)) {
                        logger('Not rewriting', req.method, req.url, 'because the client does not accept HTML.');
                        return next();
                    }
                } else {
                    logger('Not rewriting', req.method, req.url, 'because the client did not send an HTTP accept header.');
                    return next();
                }
                var parsedUrl = url.parse(req.url);
                var rewriteTarget;
                options.rewrites = options.rewrites || [];
                for(var i = 0; i < options.rewrites.length; i++){
                    var rewrite = options.rewrites[i];
                    var match = parsedUrl.pathname.match(rewrite.from);
                    if (null !== match) {
                        rewriteTarget = evaluateRewriteRule(parsedUrl, match, rewrite.to, req);
                        if ('/' !== rewriteTarget.charAt(0)) logger('We recommend using an absolute path for the rewrite target.', 'Received a non-absolute rewrite target', rewriteTarget, 'for URL', req.url);
                        logger('Rewriting', req.method, req.url, 'to', rewriteTarget);
                        req.url = rewriteTarget;
                        return next();
                    }
                }
                var pathname = parsedUrl.pathname;
                if (pathname.lastIndexOf('.') > pathname.lastIndexOf('/') && true !== options.disableDotRule) {
                    logger('Not rewriting', req.method, req.url, 'because the path includes a dot (.) character.');
                    return next();
                }
                rewriteTarget = options.index || '/index.html';
                logger('Rewriting', req.method, req.url, 'to', rewriteTarget);
                req.url = rewriteTarget;
                next();
            };
        };
        function evaluateRewriteRule(parsedUrl, match, rule, req) {
            if ('string' == typeof rule) return rule;
            if ('function' != typeof rule) throw new Error('Rewrite rule can only be of type string or function.');
            return rule({
                parsedUrl: parsedUrl,
                match: match,
                request: req
            });
        }
        function acceptsHtml(header, options) {
            options.htmlAcceptHeaders = options.htmlAcceptHeaders || [
                'text/html',
                '*/*'
            ];
            for(var i = 0; i < options.htmlAcceptHeaders.length; i++)if (-1 !== header.indexOf(options.htmlAcceptHeaders[i])) return true;
            return false;
        }
        function getLogger(options) {
            if (options && options.logger) return options.logger;
            if (options && options.verbose) return console.log.bind(console);
            return function() {};
        }
    }
});
__webpack_require__("./node_modules/.pnpm/connect-history-api-fallback@2.0.0/node_modules/connect-history-api-fallback/lib/index.js");
