✨ 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
90 lines
2.4 KiB
JavaScript
90 lines
2.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
0 && (module.exports = {
|
|
getCloneableBody: null,
|
|
requestToBodyStream: null
|
|
});
|
|
function _export(target, all) {
|
|
for(var name in all)Object.defineProperty(target, name, {
|
|
enumerable: true,
|
|
get: all[name]
|
|
});
|
|
}
|
|
_export(exports, {
|
|
getCloneableBody: function() {
|
|
return getCloneableBody;
|
|
},
|
|
requestToBodyStream: function() {
|
|
return requestToBodyStream;
|
|
}
|
|
});
|
|
const _stream = require("stream");
|
|
function requestToBodyStream(context, KUint8Array, stream) {
|
|
return new context.ReadableStream({
|
|
start: async (controller)=>{
|
|
for await (const chunk of stream){
|
|
controller.enqueue(new KUint8Array(chunk));
|
|
}
|
|
controller.close();
|
|
}
|
|
});
|
|
}
|
|
function replaceRequestBody(base, stream) {
|
|
for(const key in stream){
|
|
let v = stream[key];
|
|
if (typeof v === "function") {
|
|
v = v.bind(base);
|
|
}
|
|
base[key] = v;
|
|
}
|
|
return base;
|
|
}
|
|
function getCloneableBody(readable) {
|
|
let buffered = null;
|
|
const endPromise = new Promise((resolve, reject)=>{
|
|
readable.on("end", resolve);
|
|
readable.on("error", reject);
|
|
}).catch((error)=>{
|
|
return {
|
|
error
|
|
};
|
|
});
|
|
return {
|
|
/**
|
|
* Replaces the original request body if necessary.
|
|
* This is done because once we read the body from the original request,
|
|
* we can't read it again.
|
|
*/ async finalize () {
|
|
if (buffered) {
|
|
const res = await endPromise;
|
|
if (res && typeof res === "object" && res.error) {
|
|
throw res.error;
|
|
}
|
|
replaceRequestBody(readable, buffered);
|
|
buffered = readable;
|
|
}
|
|
},
|
|
/**
|
|
* Clones the body stream
|
|
* to pass into a middleware
|
|
*/ cloneBodyStream () {
|
|
const input = buffered ?? readable;
|
|
const p1 = new _stream.PassThrough();
|
|
const p2 = new _stream.PassThrough();
|
|
input.on("data", (chunk)=>{
|
|
p1.push(chunk);
|
|
p2.push(chunk);
|
|
});
|
|
input.on("end", ()=>{
|
|
p1.push(null);
|
|
p2.push(null);
|
|
});
|
|
buffered = p2;
|
|
return p1;
|
|
}
|
|
};
|
|
}
|
|
|
|
//# sourceMappingURL=body-streams.js.map
|