Files
Laca-City/frontend/node_modules/next/dist/client/components/not-found-boundary.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

107 lines
4.4 KiB
JavaScript

"use client";
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NotFoundBoundary", {
enumerable: true,
get: function() {
return NotFoundBoundary;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _navigation = require("./navigation");
const _notfound = require("./not-found");
const _warnonce = require("../../shared/lib/utils/warn-once");
const _approutercontextsharedruntime = require("../../shared/lib/app-router-context.shared-runtime");
class NotFoundErrorBoundary extends _react.default.Component {
componentDidCatch() {
if (process.env.NODE_ENV === "development" && // A missing children slot is the typical not-found case, so no need to warn
!this.props.missingSlots.has("children")) {
let warningMessage = "No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n" + "Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n";
if (this.props.missingSlots.size > 0) {
const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>"@" + slot).join(", ");
warningMessage += "Missing slots: " + formattedSlots;
}
(0, _warnonce.warnOnce)(warningMessage);
}
}
static getDerivedStateFromError(error) {
if ((0, _notfound.isNotFoundError)(error)) {
return {
notFoundTriggered: true
};
}
// Re-throw if error is not for 404
throw error;
}
static getDerivedStateFromProps(props, state) {
/**
* Handles reset of the error boundary when a navigation happens.
* Ensures the error boundary does not stay enabled when navigating to a new page.
* Approach of setState in render is safe as it checks the previous pathname and then overrides
* it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders
*/ if (props.pathname !== state.previousPathname && state.notFoundTriggered) {
return {
notFoundTriggered: false,
previousPathname: props.pathname
};
}
return {
notFoundTriggered: state.notFoundTriggered,
previousPathname: props.pathname
};
}
render() {
if (this.state.notFoundTriggered) {
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
children: [
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
name: "robots",
content: "noindex"
}),
process.env.NODE_ENV === "development" && /*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
name: "next-error",
content: "not-found"
}),
this.props.notFoundStyles,
this.props.notFound
]
});
}
return this.props.children;
}
constructor(props){
super(props);
this.state = {
notFoundTriggered: !!props.asNotFound,
previousPathname: props.pathname
};
}
}
function NotFoundBoundary(param) {
let { notFound, notFoundStyles, asNotFound, children } = param;
const pathname = (0, _navigation.usePathname)();
const missingSlots = (0, _react.useContext)(_approutercontextsharedruntime.MissingSlotContext);
return notFound ? /*#__PURE__*/ (0, _jsxruntime.jsx)(NotFoundErrorBoundary, {
pathname: pathname,
notFound: notFound,
notFoundStyles: notFoundStyles,
asNotFound: asNotFound,
missingSlots: missingSlots,
children: children
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
children: children
});
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=not-found-boundary.js.map