Files
Laca-City/frontend/node_modules/es-abstract/2023/CompareArrayElements.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

51 lines
1.2 KiB
JavaScript

'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsLessThan = require('./IsLessThan');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparearrayelements
module.exports = function CompareArrayElements(x, y, compareFn) {
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof x === 'undefined' && typeof y === 'undefined') {
return 0; // step 1
}
if (typeof x === 'undefined') {
return 1; // step 2
}
if (typeof y === 'undefined') {
return -1; // step 3
}
if (typeof compareFn !== 'undefined') { // step 4
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 4.a
if (isNaN(v)) {
return 0; // step 4.b
}
return v; // step 4.c
}
var xString = ToString(x); // step 5
var yString = ToString(y); // step 6
var xSmaller = IsLessThan(xString, yString, true); // step 7
if (xSmaller) {
return -1; // step 8
}
var ySmaller = IsLessThan(yString, xString, true); // step 9
if (ySmaller) {
return 1; // step 10
}
return 0; // step 11
};