Files
Laca-City/backend/node_modules/webpack/lib/AsyncDependenciesBlock.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

117 lines
3.3 KiB
JavaScript

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const DependenciesBlock = require("./DependenciesBlock");
const makeSerializable = require("./util/makeSerializable");
/** @typedef {import("./ChunkGraph")} ChunkGraph */
/** @typedef {import("./ChunkGroup")} ChunkGroup */
/** @typedef {import("./ChunkGroup").ChunkGroupOptions} ChunkGroupOptions */
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("./Dependency").UpdateHashContext} UpdateHashContext */
/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("./serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./util/Hash")} Hash */
/** @typedef {(ChunkGroupOptions & { entryOptions?: EntryOptions }) | string} GroupOptions */
class AsyncDependenciesBlock extends DependenciesBlock {
/**
* @param {GroupOptions | null} groupOptions options for the group
* @param {(DependencyLocation | null)=} loc the line of code
* @param {(string | null)=} request the request
*/
constructor(groupOptions, loc, request) {
super();
if (typeof groupOptions === "string") {
groupOptions = { name: groupOptions };
} else if (!groupOptions) {
groupOptions = { name: undefined };
}
this.groupOptions = groupOptions;
this.loc = loc;
this.request = request;
this._stringifiedGroupOptions = undefined;
}
/**
* @returns {string | null | undefined} The name of the chunk
*/
get chunkName() {
return this.groupOptions.name;
}
/**
* @param {string | undefined} value The new chunk name
* @returns {void}
*/
set chunkName(value) {
if (this.groupOptions.name !== value) {
this.groupOptions.name = value;
this._stringifiedGroupOptions = undefined;
}
}
/**
* @param {Hash} hash the hash used to track dependencies
* @param {UpdateHashContext} context context
* @returns {void}
*/
updateHash(hash, context) {
const { chunkGraph } = context;
if (this._stringifiedGroupOptions === undefined) {
this._stringifiedGroupOptions = JSON.stringify(this.groupOptions);
}
const chunkGroup = chunkGraph.getBlockChunkGroup(this);
hash.update(
`${this._stringifiedGroupOptions}${chunkGroup ? chunkGroup.id : ""}`
);
super.updateHash(hash, context);
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.groupOptions);
write(this.loc);
write(this.request);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.groupOptions = read();
this.loc = read();
this.request = read();
super.deserialize(context);
}
}
makeSerializable(AsyncDependenciesBlock, "webpack/lib/AsyncDependenciesBlock");
Object.defineProperty(AsyncDependenciesBlock.prototype, "module", {
get() {
throw new Error(
"module property was removed from AsyncDependenciesBlock (it's not needed)"
);
},
set() {
throw new Error(
"module property was removed from AsyncDependenciesBlock (it's not needed)"
);
}
});
module.exports = AsyncDependenciesBlock;