{
  "version": 3,
  "sources": ["telemetry.js"],
  "sourcesContent": ["/*\n * static/js/telemetry.js \u2014 First-party client telemetry buffer (SNOW-385).\n *\n * Spec \u00A716, non-negotiable \u00A712.11. Client observability owned end-to-end\n * (no third-party posthog-js) so a broken SW / evicted cache / dead push\n * subscription can't leave the app unable to phone home. Writes events\n * to the ``queue:events`` IndexedDB store (SNOW-375) and flushes to the\n * server-side receiver at ``POST /api/telemetry`` (SNOW-381).\n *\n * Public API \u2014 attached to ``window.pwaTelemetry``:\n *\n *   emit(event, properties?)   Enqueue an event. Respects sample rates\n *                              and the opt-in preference. Critical\n *                              events also fire ``sendBeacon`` immediately.\n *   flush()                    Manually drain the buffer. Returns a\n *                              Promise; the periodic timer and lifecycle\n *                              triggers call this too.\n *   setOptIn(bool)             Persist the toggle to ``meta:app``.\n *                              Critical events keep firing regardless\n *                              (spec \u00A716.6) but with ``user_id`` and\n *                              ``session_id`` stripped when opt-out.\n *   isOptIn()                  Read the persisted preference. Returns\n *                              a Promise (the value lives in IndexedDB).\n *\n * All ``pwaTelemetry.emit`` call sites in other scripts use optional\n * chaining (``window.pwaTelemetry?.emit(...)``) so the file is safe to\n * omit on pages that shouldn't emit (admin, staff-only debug).\n *\n * Deliberately no posthog-js\n * --------------------------\n * Spec \u00A716.3. The whole point is a first-party pipeline that survives\n * every failure mode client-side. posthog-js is ~40 KB and would still\n * need our own fallback path for critical events. This file is ~350\n * lines including copy-pasted comments. (PostHog itself was removed by\n * SNOW-1182; the receiver now routes events to fivebar, Sentry and logs.)\n */\n\n(function () {\n  'use strict';\n\n  const ENDPOINT = '/api/telemetry';\n\n  // Batch drain: read up to BATCH_SIZE rows from queue:events per flush.\n  // Chosen well below the server's 32 KiB payload cap \u2014 a 50-event batch\n  // with generous properties is comfortably under.\n  const BATCH_SIZE = 50;\n\n  // Flush cadence: every 30 s while the tab is visible.\n  const FLUSH_INTERVAL_MS = 30 * 1000;\n\n  // Immediate-flush threshold: any single write that pushes the queue\n  // past this depth triggers a flush without waiting for the timer.\n  const FLUSH_QUEUE_THRESHOLD = 50;\n\n  // Meta:app key that persists the opt-in preference.\n  const OPT_IN_KEY = 'telemetry.opt_in';\n\n  // Critical event names (spec \u00A716 explicit list). These fire an\n  // immediate ``navigator.sendBeacon`` even when the buffer flush is a\n  // long way off, and they always fire regardless of the opt-in state\n  // (with ids stripped when opt-out).\n  const CRITICAL_EVENTS = Object.freeze(\n    new Set([\n      'pwa.kill_switch.activated',\n      'pwa.forced_update.triggered',\n      'pwa.reset.user_initiated',\n      'pwa.reset.forced',\n      'pwa.sw.fetch_undefined',\n      'pwa.mutation.failed_permanent',\n      'pwa.push.subscription_lost',\n      'pwa.sw.activation_failed',\n      // SNOW-894: an uncaught exception or unhandled rejection. Critical for\n      // a reason specific to this event: the crash most worth seeing is the\n      // one that kills the page, and a page that has died does not flush its\n      // own buffer, so waiting for the next flush would lose exactly the\n      // reports worth having.\n      //\n      // Firing regardless of opt-in is the cost of that. It is paid down in\n      // static/js/error_reporting.js rather than here: an opted-out visitor's\n      // report carries the path and nothing else \u2014 no message, no file, no\n      // stack \u2014 on top of the id-stripping _buildEnvelope already does for\n      // every critical event.\n      'js.error',\n    ]),\n  );\n\n  // Sample rates per spec \u00A716.3. Any event not listed defaults to 1.0\n  // (always sampled). ``!!isFirstLaunch`` handles the \"100% on first\n  // launch\" branch for the SW lifecycle events.\n  const SAMPLE_RATES = Object.freeze({\n    // 10% \u2014 high-volume signals used only for distribution shape.\n    'pwa.freshness.fresh': 0.1,\n    'pwa.freshness.stale': 0.1,\n    'pwa.storage.evicted_probable': 0.1,\n    // 25% for repeat launches; 100% for first launch (see _sampleRate).\n    'pwa.sw.installed': 0.25,\n    'pwa.sw.activated': 0.25,\n    'pwa.sw.update_available': 0.25,\n    'pwa.sw.update_applied': 0.25,\n  });\n\n  // EU-language prefixes used to default opt-in to FALSE for new\n  // installs in the EU (spec \u00A716.6). Language is a proxy for locale, not\n  // a legal jurisdiction lookup \u2014 the user can flip the toggle on the\n  // manage page. English speakers in the EU default to opt-in; that is\n  // consistent with the settings-toggle-per-user story.\n  const EU_LANG_PREFIXES = Object.freeze([\n    'de', 'fr', 'it', 'es', 'nl', 'pl', 'pt', 'sv', 'da', 'fi',\n    'el', 'hu', 'cs', 'sk', 'ro', 'bg', 'hr', 'sl', 'et', 'lv',\n    'lt', 'mt', 'ga',\n  ]);\n\n  // In-memory opt-in cache \u2014 populated on first ``_optIn`` call and\n  // written through on ``setOptIn``. Nullable while unresolved.\n  let _optInCache = null;\n\n  // In-memory cache for the telemetry master switch (the\n  // ``pwa-telemetry-enabled`` meta tag baked in by\n  // ``public.context_processors.pwa_telemetry``). Resolved once on first\n  // read. Nullable while unresolved.\n  let _enabledCache = null;\n\n  /**\n   * Return whether the telemetry pipeline is enabled for this page load.\n   *\n   * The server renders ``<meta name=\"pwa-telemetry-enabled\" content=\"0\">``\n   * when ``settings.PWA_TELEMETRY_ENABLED`` is false \u2014 an operator-level\n   * off switch (distinct from the per-user opt-in) that silences the\n   * WHOLE pipeline, critical events included. Any value other than the\n   * literal ``\"0\"`` \u2014 including a missing tag \u2014 is treated as enabled so\n   * a page that omits the tag keeps the historical behaviour.\n   *\n   * @returns {boolean}\n   */\n  function _enabled() {\n    if (_enabledCache !== null) return _enabledCache;\n    let value = true;\n    try {\n      const el = document.querySelector('meta[name=\"pwa-telemetry-enabled\"]');\n      if (el && el.getAttribute('content') === '0') value = false;\n    } catch (_e) {\n      // No DOM / querySelector unavailable \u2014 default to enabled.\n    }\n    _enabledCache = value;\n    return value;\n  }\n\n  /**\n   * SNOW-748: true when the app is actually using the network \u2014 the interface\n   * is up AND no offline mode is in force.\n   *\n   * ``navigator.onLine`` answers only the first half, so a mode the user\n   * forced from the network menu's \"Offline mode\" row left this module\n   * beaconing and flushing over a connection the user had just asked the app\n   * not to spend.\n   * ``pwa_offline.js`` owns the answer; ``navigator.onLine`` stays the\n   * fallback for a page where that module has not run.\n   *\n   * Nothing is dropped when this is false \u2014 events still enqueue, and the\n   * ``online`` lifecycle trigger drains them when the network comes back.\n   *\n   * @returns {boolean}\n   */\n  function _networkInUse() {\n    const connectivity = window.pwaConnectivity;\n    return connectivity ? connectivity.isOnline() : navigator.onLine !== false;\n  }\n\n  // Flush-in-progress guard so overlapping triggers don't send the same\n  // rows twice.\n  let _flushInFlight = null;\n\n  /**\n   * Read the persisted opt-in value; on first call, compute the default\n   * from ``navigator.language`` and persist it so a language change\n   * doesn't retroactively flip the default.\n   *\n   * @returns {Promise<boolean>}\n   */\n  async function _optIn() {\n    if (_optInCache !== null) return _optInCache;\n    try {\n      const row = await window.pwaDb.get('meta:app', OPT_IN_KEY);\n      if (row && typeof row.value === 'boolean') {\n        _optInCache = row.value;\n        return row.value;\n      }\n    } catch (_e) {\n      // DB unavailable \u2014 treat as opt-out (fail closed). The value is\n      // NOT cached so a later successful DB call can read it fresh.\n      return false;\n    }\n    // First launch \u2014 compute the default from navigator.language.\n    const lang = (\n      (navigator.languages && navigator.languages[0]) ||\n      navigator.language ||\n      ''\n    ).toLowerCase();\n    const isEu = EU_LANG_PREFIXES.some((p) => lang.startsWith(p));\n    const value = !isEu;\n    try {\n      await window.pwaDb.put('meta:app', { key: OPT_IN_KEY, value });\n    } catch (_e) {\n      // Persistence failure \u2014 keep the in-memory value so this session\n      // is consistent; a later ``setOptIn`` call will retry.\n    }\n    _optInCache = value;\n    return value;\n  }\n\n  async function setOptIn(value) {\n    const bool = !!value;\n    _optInCache = bool;\n    try {\n      await window.pwaDb.put('meta:app', { key: OPT_IN_KEY, value: bool });\n    } catch (_e) {\n      // Non-fatal \u2014 the in-memory cache still reflects the caller's\n      // intent for this session.\n    }\n    return bool;\n  }\n\n  function isOptIn() {\n    return _optIn();\n  }\n\n  /**\n   * Return the sample rate for ``event`` (1.0 default). SW lifecycle\n   * events are always 100% on the first launch after install, per spec\n   * \u2014 a fresh session_id in sessionStorage is the \"first launch\" tell.\n   *\n   * @param {string} event\n   * @returns {number}\n   */\n  function _sampleRate(event) {\n    const rate = SAMPLE_RATES[event];\n    if (rate === undefined) return 1.0;\n    // Cheap first-launch bump for the four SW lifecycle events: if this\n    // page load was the first to allocate the session_id key, treat as\n    // first launch and sample at 100%.\n    if (event.indexOf('pwa.sw.') === 0) {\n      try {\n        // On the very first ``pwaDb.context()`` call in a page load, the\n        // session_id was just allocated by sessionStorage. We can spot\n        // \"first launch after install\" by checking for the install\n        // timestamp \u2014 absent until we set it below.\n        if (!sessionStorage.getItem('pwa.telemetry.first_launch_seen')) {\n          sessionStorage.setItem('pwa.telemetry.first_launch_seen', '1');\n          return 1.0;\n        }\n      } catch (_e) {\n        // sessionStorage blocked \u2014 fall through to configured rate.\n      }\n    }\n    return rate;\n  }\n\n  /**\n   * Build the eight-field envelope for one event. When ``optIn`` is\n   * false, strip user_id and session_id so the operational-safety\n   * signals still fire but don't identify the user (spec \u00A716.6).\n   *\n   * @param {string} event\n   * @param {object} properties\n   * @param {boolean} optIn\n   * @returns {object}\n   */\n  function _buildEnvelope(event, properties, optIn) {\n    const ctx = window.pwaDb.context();\n    return {\n      event,\n      timestamp: new Date().toISOString(),\n      client_version: ctx.client_version || '',\n      session_id: optIn ? ctx.session_id : null,\n      user_id: optIn ? ctx.user_id : null,\n      platform: ctx.platform,\n      install_state: ctx.install_state,\n      sw_state: ctx.sw_state,\n      connection: ctx.connection,\n      properties: properties || {},\n    };\n  }\n\n  /**\n   * Fire ``navigator.sendBeacon`` for one envelope. The receiver accepts\n   * a single-envelope shape as the sendBeacon fast path (see\n   * ``analytics.schema.parse_payload``). Returns true on successful\n   * queueing, false when the browser refused (queue full / body too\n   * large) so the caller can fall back to the buffer if it wants.\n   */\n  function _sendBeacon(envelope) {\n    try {\n      if (typeof navigator === 'undefined' || !navigator.sendBeacon) {\n        return false;\n      }\n      // Offline-integrity: no network sends while offline. The envelope has\n      // already been enqueued by the caller (critical events always enqueue),\n      // so skipping the beacon just defers delivery to the next flush \u2014 which\n      // the ``online`` lifecycle trigger runs on reconnect \u2014 instead of\n      // firing a doomed request that surfaces as a console network error.\n      // SNOW-748: \"offline\" here means the effective connectivity, so a\n      // user-forced offline mode holds the beacon back too.\n      if (!_networkInUse()) {\n        return false;\n      }\n      const blob = new Blob([JSON.stringify(envelope)], {\n        type: 'application/json',\n      });\n      return navigator.sendBeacon(ENDPOINT, blob);\n    } catch (_e) {\n      return false;\n    }\n  }\n\n  /**\n   * Enqueue one event onto the buffer store. Rejects silently on IDB\n   * failure so a broken DB never breaks the caller (analytics never\n   * breaks the app).\n   */\n  async function _enqueue(envelope) {\n    try {\n      await window.pwaDb.put('queue:events', envelope);\n      const depth = await window.pwaDb.count('queue:events');\n      if (depth >= FLUSH_QUEUE_THRESHOLD) {\n        // Fire-and-forget \u2014 we don't want emit() callers to await this.\n        flush().catch(() => {});\n      }\n    } catch (_e) {\n      // Non-fatal.\n    }\n  }\n\n  /**\n   * Enqueue an event, applying opt-in gate + sample rate + critical\n   * sendBeacon. Returns a Promise for tests; production callers do not\n   * need to await it.\n   *\n   * @param {string} event\n   * @param {object} [properties]\n   */\n  async function emit(event, properties) {\n    if (typeof event !== 'string' || !event) return;\n    // Operator-level kill switch \u2014 silences the whole pipeline,\n    // critical events included. Checked before anything touches the DB.\n    if (!_enabled()) return;\n    if (\n      typeof window.pwaDb !== 'object' ||\n      window.pwaDb.isResetRequired()\n    ) {\n      return;\n    }\n    let optIn = false;\n    try {\n      optIn = await _optIn();\n    } catch (_e) {\n      optIn = false;\n    }\n\n    const isCritical = CRITICAL_EVENTS.has(event);\n\n    // Sample-rate gate \u2014 critical events bypass sampling entirely.\n    if (!isCritical) {\n      const rate = _sampleRate(event);\n      if (rate < 1.0 && Math.random() >= rate) return;\n    }\n\n    const envelope = _buildEnvelope(event, properties, optIn);\n\n    if (isCritical) {\n      // Fire immediately AND enqueue for the batch flush so the receiver\n      // sees the event even if the beacon queueing failed (browser\n      // discretion \u2014 no delivery guarantee from sendBeacon).\n      _sendBeacon(envelope);\n    }\n\n    // Standard events only reach the buffer when opt-in. Critical events\n    // always go through so the flush loop retries anything sendBeacon\n    // dropped.\n    if (optIn || isCritical) {\n      await _enqueue(envelope);\n    }\n  }\n\n  /**\n   * Drain the buffer to the server. Serialised \u2014 a call while one is\n   * in flight returns the same promise so overlapping triggers can't\n   * double-POST the same rows.\n   *\n   * @param {object} [opts]\n   * @param {boolean} [opts.keepalive]  Set to true only on the\n   *   ``pagehide`` trigger. Playwright's ``page.route`` interceptor\n   *   cannot see ``keepalive`` fetches \u2014 the browser sends them\n   *   outside the normal fetch pipeline \u2014 so leaving keepalive on by\n   *   default would silently bypass tests. The pagehide path needs it\n   *   because a normal fetch would be cancelled when the tab tears\n   *   down; every other trigger runs while the tab is still alive.\n   */\n  function flush(opts) {\n    // Nothing is ever enqueued while disabled, but guard here too so a\n    // manual ``flush()`` call is a no-op rather than a stray fetch.\n    if (!_enabled()) return Promise.resolve();\n    // Offline-integrity: don't drain to the network while offline \u2014 the POST\n    // can only fail (and litters the console with a network error, as seen\n    // on the offline map). Rows stay queued; the ``online`` lifecycle\n    // trigger drains them on reconnect. The pagehide keepalive path is\n    // included: a keepalive fetch offline can't deliver either.\n    // SNOW-748: a user-forced offline mode counts as offline here \u2014 the\n    // POST would succeed, and spending the connection is exactly what the\n    // user asked the app not to do.\n    if (!_networkInUse()) {\n      return Promise.resolve();\n    }\n    if (_flushInFlight) return _flushInFlight;\n    const keepalive = !!(opts && opts.keepalive);\n    _flushInFlight = (async () => {\n      try {\n        if (\n          typeof window.pwaDb !== 'object' ||\n          window.pwaDb.isResetRequired()\n        ) {\n          return;\n        }\n        const rows = await window.pwaDb.getAll('queue:events', BATCH_SIZE);\n        if (!rows || rows.length === 0) return;\n        const events = rows.map((r) => {\n          // Strip the autoIncrement id \u2014 the server envelope doesn't\n          // want it.\n          const { id: _id, ...envelope } = r;\n          return envelope;\n        });\n        let response;\n        try {\n          const init = {\n            method: 'POST',\n            headers: { 'Content-Type': 'application/json' },\n            body: JSON.stringify({ events }),\n          };\n          if (keepalive) {\n            init.keepalive = true;\n          }\n          response = await fetch(ENDPOINT, init);\n        } catch (_networkErr) {\n          // Network failure \u2014 leave rows in place for the next trigger.\n          return;\n        }\n        if (response.status === 204 || (response.status >= 200 && response.status < 300)) {\n          // Success \u2014 remove exactly the rows we just POSTed.\n          await Promise.all(\n            rows.map((r) => window.pwaDb.delete('queue:events', r.id).catch(() => {})),\n          );\n        } else if (response.status >= 400 && response.status < 500) {\n          // Server rejected \u2014 drop the rows; retrying identical bad\n          // payloads only wastes the rate limit.\n          await Promise.all(\n            rows.map((r) => window.pwaDb.delete('queue:events', r.id).catch(() => {})),\n          );\n        }\n        // 5xx \u2192 leave rows in place, they'll retry on the next trigger.\n      } finally {\n        _flushInFlight = null;\n      }\n    })();\n    return _flushInFlight;\n  }\n\n  // -------------------------------------------------------------------\n  // Lifecycle triggers \u2014 attached once at module load.\n  // -------------------------------------------------------------------\n\n  function _wireLifecycle() {\n    // Don't attach the flush triggers (online / visibilitychange /\n    // interval / pagehide) at all when telemetry is disabled \u2014 there is\n    // nothing to drain and no reason to hold a timer.\n    if (!_enabled()) return;\n    try {\n      window.addEventListener('online', () => {\n        flush().catch(() => {});\n      });\n    } catch (_e) {\n      // Non-fatal.\n    }\n    try {\n      document.addEventListener('visibilitychange', () => {\n        if (document.visibilityState === 'visible') {\n          flush().catch(() => {});\n        }\n      });\n    } catch (_e) {\n      // Non-fatal.\n    }\n    try {\n      // Periodic drain \u2014 only while the tab is active (browsers throttle\n      // background timers hard). ``setInterval`` returns an id we don't\n      // need to clear; the tab close tears down its own timer.\n      setInterval(() => {\n        if (document.visibilityState === 'visible') {\n          flush().catch(() => {});\n        }\n      }, FLUSH_INTERVAL_MS);\n    } catch (_e) {\n      // Non-fatal.\n    }\n    try {\n      // Best-effort drain on ``pagehide`` \u2014 the ONLY trigger that\n      // needs ``keepalive: true`` because a normal fetch would be\n      // cancelled as the tab tears down. This is also the only place\n      // we drain regardless of visibility.\n      window.addEventListener('pagehide', () => {\n        flush({ keepalive: true }).catch(() => {});\n      });\n    } catch (_e) {\n      // Non-fatal.\n    }\n  }\n\n  Object.defineProperty(window, 'pwaTelemetry', {\n    value: Object.freeze({\n      emit,\n      flush,\n      setOptIn,\n      isOptIn,\n      // Exposed for tests + doc reference.\n      CRITICAL_EVENTS,\n      SAMPLE_RATES,\n    }),\n    writable: false,\n    configurable: false,\n  });\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', _wireLifecycle);\n  } else {\n    _wireLifecycle();\n  }\n})();\n"],
  "mappings": "CAqCC,UAAY,CACX,aAEA,MAAMA,EAAW,iBAeXC,EAAa,mBAMbC,EAAkB,OAAO,OAC7B,IAAI,IAAI,CACN,4BACA,8BACA,2BACA,mBACA,yBACA,gCACA,6BACA,2BAYA,UACF,CAAC,CACH,EAKMC,EAAe,OAAO,OAAO,CAEjC,sBAAuB,GACvB,sBAAuB,GACvB,+BAAgC,GAEhC,mBAAoB,IACpB,mBAAoB,IACpB,0BAA2B,IAC3B,wBAAyB,GAC3B,CAAC,EAOKC,EAAmB,OAAO,OAAO,CACrC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KACtD,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KACtD,KAAM,KAAM,IACd,CAAC,EAID,IAAIC,EAAc,KAMdC,EAAgB,KAcpB,SAASC,GAAW,CAClB,GAAID,IAAkB,KAAM,OAAOA,EACnC,IAAIE,EAAQ,GACZ,GAAI,CACF,MAAMC,EAAK,SAAS,cAAc,oCAAoC,EAClEA,GAAMA,EAAG,aAAa,SAAS,IAAM,MAAKD,EAAQ,GACxD,MAAa,CAEb,CACA,OAAAF,EAAgBE,EACTA,CACT,CAkBA,SAASE,GAAgB,CACvB,MAAMC,EAAe,OAAO,gBAC5B,OAAOA,EAAeA,EAAa,SAAS,EAAI,UAAU,SAAW,EACvE,CAIA,IAAIC,EAAiB,KASrB,eAAeC,GAAS,CACtB,GAAIR,IAAgB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AM,CAAC,CAAC,CAE1B,CAAC,CACH,MAAa,CAEb,CACA,GAAI,CAIF,YAAY,IAAM,CACZ,SAAS,kBAAoB,WAC/BA,EAAM,EAAE,MAAM,IAAM,CAAC,CAAC,CAE1B,EAAG,GAAiB,CACtB,MAAa,CAEb,CACA,GAAI,CAKF,OAAO,iBAAiB,WAAY,IAAM,CACxCA,EAAM,CAAE,UAAW,EAAK,CAAC,EAAE,MAAM,IAAM,CAAC,CAAC,CAC3C,CAAC,CACH,MAAa,CAEb,EACF,CAEA,OAAO,eAAe,OAAQ,eAAgB,CAC5C,MAAO,OAAO,OAAO,CACnB,KAAAC,EACA,MAAAD,EACA,SAAAd,EACA,QAAAE,EAEA,gBAAAjB,EACA,aAAAC,CACF,CAAC,EACD,SAAU,GACV,aAAc,EAChB,CAAC,EAEG,SAAS,aAAe,UAC1B,SAAS,iBAAiB,mBAAoBuC,CAAc,EAE5DA,EAAe,CAEnB,GAAG",
  "names": ["ENDPOINT", "OPT_IN_KEY", "CRITICAL_EVENTS", "SAMPLE_RATES", "EU_LANG_PREFIXES", "_optInCache", "_enabledCache", "_enabled", "value", "el", "_networkInUse", "connectivity", "_flushInFlight", "_optIn", "row", "lang", "p", "setOptIn", "bool", "isOptIn", "_sampleRate", "event", "rate", "_buildEnvelope", "properties", "optIn", "ctx", "_sendBeacon", "envelope", "blob", "_enqueue", "flush", "emit", "isCritical", "opts", "keepalive", "rows", "events", "r", "_id", "response", "init", "_wireLifecycle"]
}
