Add progressive web app companion for cross-platform access
Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
46365b713b
commit
e8428de775
12051 changed files with 1799735 additions and 0 deletions
74
pwa/node_modules/es-abstract/2021/Number/exponentiate.js
generated
vendored
Normal file
74
pwa/node_modules/es-abstract/2021/Number/exponentiate.js
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
'use strict';
|
||||
|
||||
// var isNegativeZero = require('math-intrinsics/isNegativeZero');
|
||||
var $pow = require('math-intrinsics/pow');
|
||||
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
/*
|
||||
var abs = require('math-intrinsics/abs');
|
||||
var isFinite = require('math-intrinsics/isFinite');
|
||||
var isNaN = require('math-intrinsics/isNaN');
|
||||
|
||||
var IsInteger = require('math-intrinsics/isInteger');
|
||||
*/
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-exponentiate
|
||||
|
||||
/* eslint max-lines-per-function: 0, max-statements: 0 */
|
||||
|
||||
module.exports = function NumberExponentiate(base, exponent) {
|
||||
if (typeof base !== 'number' || typeof exponent !== 'number') {
|
||||
throw new $TypeError('Assertion failed: `base` and `exponent` arguments must be Numbers');
|
||||
}
|
||||
return $pow(base, exponent);
|
||||
/*
|
||||
if (isNaN(exponent)) {
|
||||
return NaN;
|
||||
}
|
||||
if (exponent === 0) {
|
||||
return 1;
|
||||
}
|
||||
if (isNaN(base)) {
|
||||
return NaN;
|
||||
}
|
||||
var aB = abs(base);
|
||||
if (aB > 1 && exponent === Infinity) {
|
||||
return Infinity;
|
||||
}
|
||||
if (aB > 1 && exponent === -Infinity) {
|
||||
return 0;
|
||||
}
|
||||
if (aB === 1 && (exponent === Infinity || exponent === -Infinity)) {
|
||||
return NaN;
|
||||
}
|
||||
if (aB < 1 && exponent === Infinity) {
|
||||
return +0;
|
||||
}
|
||||
if (aB < 1 && exponent === -Infinity) {
|
||||
return Infinity;
|
||||
}
|
||||
if (base === Infinity) {
|
||||
return exponent > 0 ? Infinity : 0;
|
||||
}
|
||||
if (base === -Infinity) {
|
||||
var isOdd = true;
|
||||
if (exponent > 0) {
|
||||
return isOdd ? -Infinity : Infinity;
|
||||
}
|
||||
return isOdd ? -0 : 0;
|
||||
}
|
||||
if (exponent > 0) {
|
||||
return isNegativeZero(base) ? Infinity : 0;
|
||||
}
|
||||
if (isNegativeZero(base)) {
|
||||
if (exponent > 0) {
|
||||
return isOdd ? -0 : 0;
|
||||
}
|
||||
return isOdd ? -Infinity : Infinity;
|
||||
}
|
||||
if (base < 0 && isFinite(base) && isFinite(exponent) && !IsInteger(exponent)) {
|
||||
return NaN;
|
||||
}
|
||||
*/
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue