Modified Stellarium Web — corresponding source
==============================================

Meade County Local (meadecountylocal.com) serves a modified build of
stellarium-web-engine. stellarium-web-engine is licensed AGPL-3.0, whose
section 13 requires that anyone interacting with a modified version over a
network be offered the corresponding source. This directory is that offer.

UPSTREAM
  https://github.com/Stellarium/stellarium-web-engine
  built from commit e7201246bdf7289c50a3ec59e98f69f0f9383b05

WHAT WE CHANGED  (see meade-county-local.patch for the exact diff)

  1. apps/web-frontend/package.json
     "vue" pinned back to ^2.6.12.

     Upstream commit 51db29dc is a Dependabot PR, "Bump vue from 2.6.12 to
     3.0.0", which changed that one dependency and nothing else. The rest of
     the application is still Vue 2 (vue-router 3, vuex 3, vuetify 2,
     vue-i18n 8, vue-template-compiler 2.6), so vue-cli-service fails with
     "Vue packages version mismatch" and the frontend does not build at all.
     This reverts that bump. It is a fix for an upstream breakage rather than
     a feature of ours.

  2. apps/web-frontend/src/App.vue
     Additional sky-survey data sources, bracketed in the file by
     "---- MEADE COUNTY LOCAL ----" comments.

     The bundled dataset covers stars to magnitude 7. We add the public HiPS
     surveys the upstream hosted application itself uses, on top of it: two
     star packs (magnitude 8 and 11.5) plus Gaia (roughly magnitude 20), two
     deep-sky-object packs, DSS photographic sky, the Milky Way survey, and
     surface imagery for the Sun, Moon, planets and Galilean moons. These are
     added, never substituted, so the planetarium still works from the local
     files if the CDN is unreachable.

  3. apps/web-frontend/src/main.js
     Vue Router base changed from a hardcoded '/' to process.env.BASE_URL,
     bracketed by "---- MEADE COUNTY LOCAL ----" comments.

     We serve the application under /stellarium/ rather than at a domain root.
     With the base hardcoded the router strips nothing from the path, matches
     no route, and renders an empty component -- a black screen with no console
     error. Reading it from BASE_URL keeps it correct wherever the app is
     mounted, including the root, so this is arguably a fix rather than a
     customisation.

  4. apps/web-frontend/src/assets/sw_helpers.js
     Default observing location, and removal of a third-party geolocation
     beacon. Bracketed by "---- MEADE COUNTY LOCAL ----" comments.

     getGeolocation() made a JSONP request to freegeoip.stellarium.org on every
     page load in order to guess the visitor's position from their IP address.
     Two problems for a county platform: the guess is poor (a rural Kentucky
     address resolved about eleven miles away, and was then labelled "Near Lat
     37.859 Lon -86.007"), and JSONP injects a script tag, so every visit sent
     an IP address to an unrelated host that could then run code in the page.

     It now opens on Brandenburg, Kentucky and makes no external request.
     Browser geolocation is neither removed nor disabled — it is used when the
     visitor has already granted permission, checked via the Permissions API so
     that no dialog appears unprompted, and the location picker is untouched.
     geoCodePosition() short-circuits for that default position rather than
     asking OpenStreetMap what we already know.

  5. SConstruct
     -Werror removed.

     The vendored zlib and other bundled C libraries use K&R-style function
     prototypes, which modern clang rejects. This is a local build
     accommodation, not a behaviour change.

BUILDING
  The engine needs emscripten 3.1.20 (later versions removed
  EXTRA_EXPORTED_RUNTIME_METHODS and the allocate/writeAsciiToMemory exports
  this tree uses). The frontend needs Node 18 with --openssl-legacy-provider,
  because Vue CLI 4 runs on webpack 4, which calls crypto.createHash('md4').

  Full build scripts, with every workaround explained, are in the Meade County
  Local repository under notes/md/.

LICENCE
  stellarium-web-engine is AGPL-3.0. A copy of the licence ships with the
  upstream repository as LICENSE-AGPL-3.0.txt and is included here.

Questions: legal@echelonts.net
