Files
Laca-City/frontend/node_modules/next/dist/esm/server/send-response.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

47 lines
2.0 KiB
JavaScript

import { pipeToNodeResponse } from "./pipe-readable";
import { splitCookiesString } from "./web/utils";
/**
* Sends the response on the underlying next response object.
*
* @param req the underlying request object
* @param res the underlying response object
* @param response the response to send
*/ export async function sendResponse(req, res, response, waitUntil) {
// Don't use in edge runtime
if (process.env.NEXT_RUNTIME !== "edge") {
var // Copy over the response headers.
_response_headers;
// Copy over the response status.
res.statusCode = response.status;
res.statusMessage = response.statusText;
(_response_headers = response.headers) == null ? void 0 : _response_headers.forEach((value, name)=>{
// `x-middleware-set-cookie` is an internal header not needed for the response
if (name.toLowerCase() === "x-middleware-set-cookie") {
return;
}
// The append handling is special cased for `set-cookie`.
if (name.toLowerCase() === "set-cookie") {
// TODO: (wyattjoh) replace with native response iteration when we can upgrade undici
for (const cookie of splitCookiesString(value)){
res.appendHeader(name, cookie);
}
} else {
res.appendHeader(name, value);
}
});
/**
* The response can't be directly piped to the underlying response. The
* following is duplicated from the edge runtime handler.
*
* See packages/next/server/next-server.ts
*/ const originalResponse = res.originalResponse;
// A response body must not be sent for HEAD requests. See https://httpwg.org/specs/rfc9110.html#HEAD
if (response.body && req.method !== "HEAD") {
await pipeToNodeResponse(response.body, originalResponse, waitUntil);
} else {
originalResponse.end();
}
}
}
//# sourceMappingURL=send-response.js.map