@ghostlytools/sdk 1.11.1 → 1.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/app.js +6 -3
  2. package/dist/app.js.map +1 -1
  3. package/dist/core.js +111 -18
  4. package/dist/core.js.map +1 -1
  5. package/dist/{fakes-LaWqqMv4.js → fakes-CK9Ra4X4.js} +3 -3
  6. package/dist/{fakes-LaWqqMv4.js.map → fakes-CK9Ra4X4.js.map} +1 -1
  7. package/dist/fakes.js +1 -1
  8. package/dist/index.js +3 -3
  9. package/dist/{keet-identity-key-CASfmXry.js → keet-identity-key-CDgu84Dj.js} +2 -2
  10. package/dist/{keet-identity-key-CASfmXry.js.map → keet-identity-key-CDgu84Dj.js.map} +1 -1
  11. package/dist/{src-BN4AAuHI.js → src-B9HeOlsG.js} +649 -184
  12. package/dist/src-B9HeOlsG.js.map +1 -0
  13. package/dist/testing.js +4 -4
  14. package/dist/types/browser/src/engine/paymentAdapters/providers/types.d.ts +6 -1
  15. package/dist/types/core/src/appStore.d.ts +5 -0
  16. package/dist/types/core/src/audioMetadata.d.ts +0 -23
  17. package/dist/types/core/src/catchUp.d.ts +2 -0
  18. package/dist/types/core/src/chatFiles.d.ts +6 -0
  19. package/dist/types/core/src/clipboardGuard.d.ts +24 -7
  20. package/dist/types/core/src/dhtDelivery.d.ts +13 -0
  21. package/dist/types/core/src/didDht.d.ts +6 -4
  22. package/dist/types/core/src/frames.d.ts +11 -0
  23. package/dist/types/core/src/ghostlink.d.ts +42 -2
  24. package/dist/types/core/src/groupSession.d.ts +13 -0
  25. package/dist/types/core/src/http.d.ts +16 -2
  26. package/dist/types/core/src/identity.d.ts +16 -1
  27. package/dist/types/core/src/identityProofs.d.ts +7 -0
  28. package/dist/types/core/src/index.d.ts +1 -0
  29. package/dist/types/core/src/linkPreview.d.ts +9 -2
  30. package/dist/types/core/src/miniApp.d.ts +5 -2
  31. package/dist/types/core/src/pairedAppRanges.d.ts +5 -0
  32. package/dist/types/core/src/pairedApps.d.ts +4 -2
  33. package/dist/types/core/src/relay.d.ts +17 -4
  34. package/dist/types/core/src/transport.d.ts +3 -1
  35. package/dist/types/core/src/videoMetadata.d.ts +8 -1
  36. package/dist/types/core/src/viewerGuard.d.ts +6 -0
  37. package/dist/{types-DvtCy3WB.js → types-DYLIIkU8.js} +2 -1
  38. package/dist/types-DYLIIkU8.js.map +1 -0
  39. package/dist/{verify-oCL662ms.js → verify-DZpnNeF7.js} +2 -2
  40. package/dist/{verify-oCL662ms.js.map → verify-DZpnNeF7.js.map} +1 -1
  41. package/package.json +1 -1
  42. package/dist/src-BN4AAuHI.js.map +0 -1
  43. package/dist/types-DvtCy3WB.js.map +0 -1
@@ -383,24 +383,53 @@ function tryDecrypt(encoded, key) {
383
383
  }
384
384
  //#endregion
385
385
  //#region ../core/src/identity.ts
386
- /** How many public keys `identityFromSeed` keeps: a start with 50 chats and 20 groups derives about 400 distinct ones. */
386
+ /** How many public keys `identityFromSeed` keeps however long ago they were used: a start with 50 chats and 20 groups derives about 400 distinct ones. */
387
387
  var IDENTITY_MEMO_SIZE = 1024;
388
388
  /**
389
+ * Past `IDENTITY_MEMO_SIZE`, a key is let go only once it has not been asked for this long: a start asks for all of a
390
+ * profile's keys within seconds (a 600-chat one, ~4,000 of them), then asks again for the running links' ones.
391
+ */
392
+ var IDENTITY_MEMO_IDLE_MS = 6e5;
393
+ /** The most keys kept, used or not: ~410 bytes each in V8 (its id, its key and when it was used), ~6.7 MB in all. */
394
+ var IDENTITY_MEMO_MAX = 16384;
395
+ /**
389
396
  * Public keys already derived, by the SHA-256 of their seed, the most recently used last. A chat's start derives the
390
397
  * same few seeds' keys again and again (its link, its delivery, its capability record): ~0.25 ms each in V8, ~3.4x
391
398
  * that in JSC. The seed itself is never kept, so a seed its owner zeroes leaves nothing behind here.
392
399
  */
393
400
  var publicKeys = /* @__PURE__ */ new Map();
401
+ var publicKeyFastPath = null;
402
+ /** Gives (or, with `null`, takes back) the faster derivation of every public key `identityFromSeed` derives. */
403
+ function setPublicKeyFastPath(derive) {
404
+ publicKeyFastPath = derive;
405
+ }
406
+ function derivePublicKey(seed) {
407
+ if (publicKeyFastPath) try {
408
+ const key = publicKeyFastPath(seed);
409
+ if (key.length === 32) return Uint8Array.from(key);
410
+ } catch {}
411
+ return ed25519.getPublicKey(seed);
412
+ }
394
413
  function publicKeyOf(seed) {
395
414
  const id = toBase64Url(sha256(seed));
396
- let key = publicKeys.get(id);
397
- if (key) publicKeys.delete(id);
398
- else {
399
- key = ed25519.getPublicKey(seed);
400
- if (publicKeys.size >= 1024) publicKeys.delete(publicKeys.keys().next().value);
415
+ const now = Date.now();
416
+ let entry = publicKeys.get(id);
417
+ if (entry) {
418
+ publicKeys.delete(id);
419
+ entry.at = now;
420
+ } else {
421
+ entry = {
422
+ key: derivePublicKey(seed),
423
+ at: now
424
+ };
425
+ for (const [oldest, { at }] of publicKeys) {
426
+ if (publicKeys.size < 1024) break;
427
+ if (publicKeys.size < 16384 && now - at < 6e5) break;
428
+ publicKeys.delete(oldest);
429
+ }
401
430
  }
402
- publicKeys.set(id, key);
403
- return key.slice();
431
+ publicKeys.set(id, entry);
432
+ return entry.key.slice();
404
433
  }
405
434
  function identityFromSeed(seed) {
406
435
  if (seed.length !== 32) throw new Error("Seed must be exactly 32 bytes");
@@ -1245,7 +1274,7 @@ var DEPARTED_READS = 6;
1245
1274
  /**
1246
1275
  * A 1:1 chat's reads of an invite this side made, while its joiner is due and has not shown (`awaited`, `AWAITING_PEER_MS`
1247
1276
  * in link.ts), may go over a relay's minute within the chat's allowance (`SIGNALING_ALLOWANCE_SHARE`) the same way: at
1248
- * most this many of each invite's in a minute, every relay together. And while one asked in the last minute, the departed
1277
+ * most this many in a minute, every invite and every relay together. And while one asked in the last minute, the departed
1249
1278
  * reads leave them half of that on each relay: the last `AWAITED_READS / 2` of the allowance's reads (`DEPARTED_READS`
1250
1279
  * then take at most 3 on a relay of 30, against 5). Read every 2 to 4 s, they cover the seconds in which a joiner that
1251
1280
  * opened the link at once knocks. Within the chats' allowance, they add nothing to what a relay may see in a minute
@@ -1253,6 +1282,9 @@ var DEPARTED_READS = 6;
1253
1282
  * another on relays of 30 spent the minute on both 12 s in (two pairings, about 15 requests a relay each), the departed
1254
1283
  * reads of the contact that had just left took the allowance, and the third invite's key was read once, then not until
1255
1284
  * the minute freed: the joiner's knock 48 s late, and join to live in 60 s, against 2.6 and 4.6 s (CLI lab, 2026-11-07).
1285
+ * Not this many per invite: a web profile with 150 chats added from old sessions, each an invite awaited from that start,
1286
+ * had their reads take the whole allowance at every refill, and a live contact's reads after a reload went once a
1287
+ * minute: the chat came back in 2 to 7 min, against 41 to 69 s before (2026-11-07).
1256
1288
  */
1257
1289
  var AWAITED_READS = 4;
1258
1290
  /**
@@ -1628,8 +1660,8 @@ var RelayTransport = class {
1628
1660
  spentAnswerAllowance = /* @__PURE__ */ new Map();
1629
1661
  /** Per contact, its departed reads past the limit in the last minute, every relay together (`DEPARTED_READS`). */
1630
1662
  departedOver = /* @__PURE__ */ new Map();
1631
- /** Per invite, its awaited reads past the limit in the last minute, every relay together (`AWAITED_READS`). */
1632
- awaitedOver = /* @__PURE__ */ new Map();
1663
+ /** The awaited reads past the limit in the last minute, every invite and every relay together (`AWAITED_READS`). */
1664
+ awaitedOver = [];
1633
1665
  /** When an awaited invite's read last asked: the departed reads leave it room for a minute (`AWAITED_READS`). */
1634
1666
  awaitedAt = -Infinity;
1635
1667
  /**
@@ -1829,6 +1861,8 @@ var RelayTransport = class {
1829
1861
  if (!again && !elsewhere) {
1830
1862
  const held = this.publishWait(key, asker(options, true));
1831
1863
  if (held) throw new DiscoveryBudgetError(held.wait, `Publish held back on every relay: ${held.reasons.join("; ")}`);
1864
+ const refused = this.refusedEverywhere(key, asker(options, true));
1865
+ if (refused) throw refused;
1832
1866
  }
1833
1867
  const timestamp = this.nextTimestamp(key);
1834
1868
  let redated;
@@ -1902,6 +1936,42 @@ var RelayTransport = class {
1902
1936
  reasons
1903
1937
  };
1904
1938
  }
1939
+ /**
1940
+ * A publish that every relay would refuse now without being asked (its network cooling down, left alone after failing,
1941
+ * its rate limit or this asker's budget), and not as a wait alone (`publishWait` says those): the failure `putEverywhere`
1942
+ * would end in, in the same words, said before the packet is signed and dated. Null when some relay would be asked. With
1943
+ * every relay out of reach on a page that is online, each chat signed a packet every few seconds that went nowhere: ~58
1944
+ * a second at 300 chats (bug hunt, 2026-11-12).
1945
+ */
1946
+ refusedEverywhere(pubKeyZ32, who) {
1947
+ const probe = this.breaker.allDownProbe(this.relays);
1948
+ const now = Date.now();
1949
+ const reasons = [], held = [];
1950
+ for (const relay of this.relays) {
1951
+ const refused = this.refusal(relay, relay === probe);
1952
+ if (refused) {
1953
+ reasons.push(String(refused));
1954
+ continue;
1955
+ }
1956
+ if (this.heldFor(relay, who, now, pubKeyZ32) <= 0) return null;
1957
+ held.push(relay);
1958
+ reasons.push(String(new DiscoveryBudgetError(this.heldFor(relay, who))));
1959
+ }
1960
+ for (const relay of held) this.take(relay, who, pubKeyZ32);
1961
+ return new PublishFailedError(`Publish failed on every relay: ${reasons.join("; ")}`, false);
1962
+ }
1963
+ /** What `put` refuses a request to this relay with before its budget is asked; null when it gets that far. */
1964
+ refusal(relay, probe) {
1965
+ if (!probe && this.networkCoolingDown(relay, "PUT")) return new RelayNoAnswerError(`${relay} did not answer a moment ago; retry shortly`, false);
1966
+ const limited = this.rateLimitedFor(relay);
1967
+ if (limited > 0) return new DiscoveryBudgetError(limited, "Discovery relay is cooling down after a 429; retry shortly");
1968
+ const blocked = probe ? 0 : this.breaker.blockedFor(relay);
1969
+ if (blocked > 0) {
1970
+ if (this.breaker.blockedKind(relay) === "throttled") return new DiscoveryBudgetError(blocked, "Discovery relay is throttling this address; retry shortly");
1971
+ return new RelayLeftAloneError(`${relay} is left alone after failing; asked again in ${Math.max(1, Math.ceil(this.breaker.askedAgainIn(relay, this.relays) / 1e3))} s`);
1972
+ }
1973
+ return null;
1974
+ }
1905
1975
  /** One relay's packet for a key, read now: its time, kept for `nextTimestamp`. Null when it has none or does not answer. */
1906
1976
  async heldAt(relay, pubKeyZ32, who) {
1907
1977
  if (!this.take(relay, who, pubKeyZ32)) return null;
@@ -2415,14 +2485,8 @@ var RelayTransport = class {
2415
2485
  }
2416
2486
  /** `sent`: told, once the budget took the request, whether the relay takes the packet (a 2xx). */
2417
2487
  async put(relay, pubKeyZ32, payload, replaces, who, probe = false, sent) {
2418
- if (!probe && this.networkCoolingDown(relay, "PUT")) throw new RelayNoAnswerError(`${relay} did not answer a moment ago; retry shortly`, false);
2419
- const limited = this.rateLimitedFor(relay);
2420
- if (limited > 0) throw new DiscoveryBudgetError(limited, "Discovery relay is cooling down after a 429; retry shortly");
2421
- const blocked = probe ? 0 : this.breaker.blockedFor(relay);
2422
- if (blocked > 0) {
2423
- if (this.breaker.blockedKind(relay) === "throttled") throw new DiscoveryBudgetError(blocked, "Discovery relay is throttling this address; retry shortly");
2424
- throw new RelayLeftAloneError(`${relay} is left alone after failing; asked again in ${Math.max(1, Math.ceil(this.breaker.askedAgainIn(relay, this.relays) / 1e3))} s`);
2425
- }
2488
+ const refused = this.refusal(relay, probe);
2489
+ if (refused) throw refused;
2426
2490
  if (!this.take(relay, who, pubKeyZ32)) throw new DiscoveryBudgetError(this.heldFor(relay, who));
2427
2491
  if (probe) this.breaker.beginAllDown(relay);
2428
2492
  else this.breaker.begin(relay);
@@ -2511,7 +2575,7 @@ var RelayTransport = class {
2511
2575
  if (isGroupSignal(who)) this.spentGroupSignal.get(relay).push(now);
2512
2576
  const departedOver = isDepartedRead(who) && this.spent.get(relay).length >= this.limitOf(relay);
2513
2577
  if (departedOver) this.overAdd(this.departedOver, key, now);
2514
- if (isAwaitedRead(who) && this.spent.get(relay).length >= this.limitOf(relay)) this.overAdd(this.awaitedOver, key, now);
2578
+ if (isAwaitedRead(who) && this.spent.get(relay).length >= this.limitOf(relay)) this.awaitedOver = [...within(this.awaitedOver, now, 6e4), now];
2515
2579
  this.spent.get(relay).push(now);
2516
2580
  if (who.background) this.spentBackground.get(relay).push(now);
2517
2581
  if (who.background && who.write) this.spentBackgroundWrites.get(relay).push(now);
@@ -2555,7 +2619,8 @@ var RelayTransport = class {
2555
2619
  const over = (list, limit) => list.length >= limit ? list[list.length - limit] + 6e4 - now : 0;
2556
2620
  const limit = this.limitOf(relay);
2557
2621
  const departed = isDepartedRead(who) && key !== void 0 && recent.length >= limit && this.overReads(this.departedOver, key, now) < 6;
2558
- const awaited = isAwaitedRead(who) && key !== void 0 && recent.length >= limit && this.overReads(this.awaitedOver, key, now) < 4;
2622
+ if (isAwaitedRead(who)) this.awaitedOver = within(this.awaitedOver, now, 6e4);
2623
+ const awaited = isAwaitedRead(who) && key !== void 0 && recent.length >= limit && this.awaitedOver.length < 4;
2559
2624
  const share = isChatSignal(who) || departed || awaited ? SIGNALING_ALLOWANCE_SHARE : isGroupSignal(who) ? GROUP_SIGNALING_ALLOWANCE_SHARE : 0;
2560
2625
  let allowance = share ? Math.max(0, Math.floor(limit * share) - (who.write ? 0 : 1)) : 0;
2561
2626
  if (departed && now - this.awaitedAt < 6e4) allowance = Math.max(0, allowance - 2);
@@ -2739,7 +2804,7 @@ var RelayTransport = class {
2739
2804
  const since = this.heldBack.get(key)?.since;
2740
2805
  return !who.group && !who.write && !who.door && since !== void 0 && now - since >= READ_STARVED_MS;
2741
2806
  }
2742
- /** This key's departed or awaited reads past the limit in the last minute (`DEPARTED_READS`, `AWAITED_READS`). */
2807
+ /** This key's departed reads past the limit in the last minute (`DEPARTED_READS`). */
2743
2808
  overReads(over, key, now) {
2744
2809
  const reads = within(over.get(key) ?? [], now, 6e4);
2745
2810
  if (reads.length) over.set(key, reads);
@@ -7902,6 +7967,12 @@ var LIMITS = {
7902
7967
  maxPathBytes: 8192,
7903
7968
  /** Requests a host serves at once for one peer. */
7904
7969
  maxConcurrentRequestsPerPeer: 32,
7970
+ /**
7971
+ * Request-body bytes a host holds for one peer at once, from a body's first chunk until its local fetch settles.
7972
+ * Past it a request is refused (`busy`). As much as a client's in-flight requests can carry, so only a peer that
7973
+ * ignores that limit reaches it.
7974
+ */
7975
+ maxHostBodyBytesPerPeer: 134217728,
7905
7976
  /** Requests a client keeps in flight; the rest wait in a queue. */
7906
7977
  maxClientInFlight: 16,
7907
7978
  /**
@@ -7918,6 +7989,11 @@ var LIMITS = {
7918
7989
  maxStoredIncomingBytesPerPeer: 524288e3,
7919
7990
  requestTimeoutMs: 6e4,
7920
7991
  bodyIdleTimeoutMs: 3e4,
7992
+ /**
7993
+ * What a request body must bring in each `bodyIdleTimeoutMs` (unless it ends) to count as moving: a peer that sends a
7994
+ * few bytes at a time is let go like one that stalls.
7995
+ */
7996
+ minRequestBodyBytesPerIdle: 16384,
7921
7997
  /** Stop writing to the channel above this many buffered bytes. */
7922
7998
  sendHighWaterMark: 1048576,
7923
7999
  sendLowWaterMark: 262144
@@ -8437,15 +8513,45 @@ function viewerServicePolicy(relayOnly) {
8437
8513
  return relayOnly ? VIEWER_SERVICE_CSP_RELAY_ONLY : VIEWER_SERVICE_CSP;
8438
8514
  }
8439
8515
  /**
8516
+ * The browser features a contact's app in the extension's viewer tab may not use. Its tab is a site of its own, so
8517
+ * what the person granted it (camera, microphone, location, a device) would be a site setting of the browser's, which
8518
+ * no Delete chat, Clear all data or Delete profile reaches; denied here, the browser never asks and ignores a grant
8519
+ * made before. The web app's view is a frame of another site, which gets none of them, and Desktop's window grants none.
8520
+ */
8521
+ var VIEWER_PERMISSIONS_POLICY = [
8522
+ "camera",
8523
+ "microphone",
8524
+ "display-capture",
8525
+ "geolocation",
8526
+ "midi",
8527
+ "usb",
8528
+ "serial",
8529
+ "hid",
8530
+ "clipboard-read",
8531
+ "idle-detection",
8532
+ "local-fonts",
8533
+ "window-management",
8534
+ "storage-access",
8535
+ "publickey-credentials-create"
8536
+ ].map((feature) => `${feature}=()`).join(", ");
8537
+ /** A contact's headers that would set the page's features: the viewer's own policy takes their place. */
8538
+ var VIEWER_FEATURE_HEADERS = ["permissions-policy", "feature-policy"];
8539
+ /**
8440
8540
  * `headers` with Ghostly's policy after the contact's own, all in one `content-security-policy` joined by commas: a
8441
- * browser enforces every policy of the list, so the contact's can narrow Ghostly's but never widen it.
8541
+ * browser enforces every policy of the list, so the contact's can narrow Ghostly's but never widen it. The page's
8542
+ * features are Ghostly's alone (`VIEWER_PERMISSIONS_POLICY`): a contact's permissions policy could allow them, and one
8543
+ * the browser cannot read would void the whole header, Ghostly's part with it.
8442
8544
  */
8443
8545
  function withViewerPolicy(headers, relayOnly = false) {
8444
8546
  const policies = [];
8445
8547
  const out = [];
8446
- for (const [name, value] of headers) if (name.toLowerCase() === "content-security-policy") policies.push(value);
8447
- else out.push([name, value]);
8548
+ for (const [name, value] of headers) {
8549
+ const lower = name.toLowerCase();
8550
+ if (lower === "content-security-policy") policies.push(value);
8551
+ else if (!VIEWER_FEATURE_HEADERS.includes(lower)) out.push([name, value]);
8552
+ }
8448
8553
  out.push(["content-security-policy", [...policies, viewerServicePolicy(relayOnly)].join(", ")]);
8554
+ out.push(["permissions-policy", VIEWER_PERMISSIONS_POLICY]);
8449
8555
  return out;
8450
8556
  }
8451
8557
  /**
@@ -8495,6 +8601,8 @@ var HttpHost = class {
8495
8601
  * so a stream counts toward the limit until its fetch has settled.
8496
8602
  */
8497
8603
  live = /* @__PURE__ */ new Set();
8604
+ /** Body bytes of the streams in `live`: a peer cannot make the host hold more than `maxHostBodyBytesPerPeer`. */
8605
+ heldBodyBytes = 0;
8498
8606
  constructor(channel, getService, localFetch) {
8499
8607
  this.channel = channel;
8500
8608
  this.getService = getService;
@@ -8521,25 +8629,32 @@ var HttpHost = class {
8521
8629
  url,
8522
8630
  body: [],
8523
8631
  bodyBytes: 0,
8632
+ movedBytes: 0,
8524
8633
  abort: new AbortController(),
8525
8634
  started: false
8526
8635
  };
8527
8636
  this.streams.set(frame.id, stream);
8528
8637
  this.live.add(stream);
8529
- if (frame.b && !BODYLESS_METHODS.has(method)) this.armIdleTimer(stream);
8638
+ if (frame.b && !BODYLESS_METHODS.has(method)) this.watchPace(stream);
8530
8639
  else this.run(stream);
8531
8640
  }
8532
8641
  handleChunk(chunk) {
8533
8642
  const stream = this.streams.get(chunk.id);
8534
8643
  if (!stream || stream.started) return;
8535
- stream.bodyBytes += chunk.payload.length;
8536
- if (stream.bodyBytes > LIMITS.maxRequestBodyBytes) {
8644
+ const bytes = chunk.payload.length;
8645
+ if (stream.bodyBytes + bytes > LIMITS.maxRequestBodyBytes) {
8537
8646
  this.end(stream);
8538
8647
  return this.fail(chunk.id, 413, "request-too-large", "Request body too large.");
8539
8648
  }
8649
+ if (this.heldBodyBytes + bytes > LIMITS.maxHostBodyBytesPerPeer) {
8650
+ this.end(stream);
8651
+ return this.fail(chunk.id, 503, "busy", "Too many request bodies at once.");
8652
+ }
8653
+ stream.bodyBytes += bytes;
8654
+ this.heldBodyBytes += bytes;
8655
+ stream.movedBytes += bytes;
8540
8656
  if (chunk.payload.length > 0) stream.body.push(chunk.payload.slice());
8541
8657
  if (chunk.end) this.run(stream);
8542
- else this.armIdleTimer(stream);
8543
8658
  }
8544
8659
  handleReset(frame) {
8545
8660
  const stream = this.streams.get(frame.id);
@@ -8548,9 +8663,13 @@ var HttpHost = class {
8548
8663
  closeAll() {
8549
8664
  for (const stream of [...this.streams.values()]) this.end(stream);
8550
8665
  }
8551
- armIdleTimer(stream) {
8552
- clearTimeout(stream.idleTimer);
8553
- stream.idleTimer = setTimeout(() => {
8666
+ /** A body that brings less than `minRequestBodyBytesPerIdle` in a `bodyIdleTimeoutMs` is let go, even if it trickles. */
8667
+ watchPace(stream) {
8668
+ stream.paceTimer = setTimeout(() => {
8669
+ if (stream.movedBytes >= LIMITS.minRequestBodyBytesPerIdle) {
8670
+ stream.movedBytes = 0;
8671
+ return this.watchPace(stream);
8672
+ }
8554
8673
  this.end(stream);
8555
8674
  this.fail(stream.frame.id, 408, "request-timeout", "Request body timed out.");
8556
8675
  }, LIMITS.bodyIdleTimeoutMs);
@@ -8560,10 +8679,16 @@ var HttpHost = class {
8560
8679
  return this.streams.get(stream.frame.id) === stream;
8561
8680
  }
8562
8681
  end(stream) {
8563
- clearTimeout(stream.idleTimer);
8682
+ clearTimeout(stream.paceTimer);
8564
8683
  stream.abort.abort();
8565
8684
  if (this.isCurrent(stream)) this.streams.delete(stream.frame.id);
8566
- if (!stream.started) this.live.delete(stream);
8685
+ if (!stream.started) this.release(stream);
8686
+ }
8687
+ /** The stream no longer counts toward the limits: its body is dropped, or its local fetch has settled. */
8688
+ release(stream) {
8689
+ this.live.delete(stream);
8690
+ this.heldBodyBytes -= stream.bodyBytes;
8691
+ stream.bodyBytes = 0;
8567
8692
  }
8568
8693
  fail(id, status, code, message) {
8569
8694
  const body = utf8Encode(`${message}\n`);
@@ -8580,19 +8705,20 @@ var HttpHost = class {
8580
8705
  }
8581
8706
  async run(stream) {
8582
8707
  stream.started = true;
8583
- clearTimeout(stream.idleTimer);
8708
+ clearTimeout(stream.paceTimer);
8584
8709
  const { frame, service } = stream;
8585
8710
  const timeout = setTimeout(() => stream.abort.abort(), LIMITS.requestTimeoutMs);
8586
8711
  let headersSent = false;
8712
+ const body = stream.body.length > 0 ? concatBytes(...stream.body) : null;
8713
+ stream.body = [];
8587
8714
  try {
8588
8715
  const response = await this.localFetch({
8589
8716
  url: stream.url,
8590
8717
  method: frame.m,
8591
8718
  headers: sanitizeRequestHeaders(frame.h),
8592
- body: stream.body.length > 0 ? concatBytes(...stream.body) : null,
8719
+ body,
8593
8720
  signal: stream.abort.signal
8594
8721
  });
8595
- stream.body = [];
8596
8722
  clearTimeout(timeout);
8597
8723
  if (!this.isCurrent(stream)) return;
8598
8724
  if (response.finalUrl && response.finalUrl !== stream.url) {
@@ -8640,7 +8766,7 @@ var HttpHost = class {
8640
8766
  else if (timedOut && error?.name === "AbortError") this.fail(frame.id, 504, "timeout", "The local service did not answer in time.");
8641
8767
  else this.fail(frame.id, 502, "unreachable", "The local service is not reachable.");
8642
8768
  } finally {
8643
- this.live.delete(stream);
8769
+ this.release(stream);
8644
8770
  }
8645
8771
  }
8646
8772
  };
@@ -9013,6 +9139,18 @@ var VIEWER_GUARD_HASH = "'sha256-P3jYgJwfoJ/cAS31rQz7Tk99bBwsSeN2wDDqJubDMZw='";
9013
9139
  * `javascript:` URL to the guard's policy before it runs.
9014
9140
  */
9015
9141
  var VIEWER_GUARD_CSP = "frame-src 'self'; object-src 'self'; require-trusted-types-for 'script'";
9142
+ /**
9143
+ * `VIEWER_GUARD_CSP` for a worker's own script: no Trusted Types. A worker has no `javascript:` URL, no `execCommand`
9144
+ * and no WebRTC for a guard to keep, and no guard runs in it to make the `default` policy, so Trusted Types there
9145
+ * would refuse its every `importScripts`, `eval` and `new Function`.
9146
+ */
9147
+ var VIEWER_WORKER_GUARD_CSP = "frame-src 'self'; object-src 'self'";
9148
+ /** The `destination` of a worker's own script: its answer's policy is the worker's. */
9149
+ var WORKER_DESTINATIONS = /* @__PURE__ */ new Set([
9150
+ "worker",
9151
+ "sharedworker",
9152
+ "serviceworker"
9153
+ ]);
9016
9154
  /** Refuses every script of a page the guard cannot be put first in. */
9017
9155
  var NO_SCRIPTS_CSP = "script-src 'none'";
9018
9156
  /**
@@ -9077,7 +9215,22 @@ var find = (bytes, from, text) => {
9077
9215
  * `head` ends before that is known and more is coming (`done` false).
9078
9216
  */
9079
9217
  function viewerGuardOffset(head, done) {
9080
- let offset = at(head, 0, "") ? 3 : 0;
9218
+ return guardOffsetFrom(head, done, {
9219
+ from: 0,
9220
+ seen: 0
9221
+ });
9222
+ }
9223
+ /** Too short to tell: what starts at `from` is looked at again with more, its close from about `seen` on. */
9224
+ function wait(look, from, seen) {
9225
+ look.from = from;
9226
+ look.seen = seen;
9227
+ return null;
9228
+ }
9229
+ /** `viewerGuardOffset` going on from `look`, which it moves along when the head is too short to tell. */
9230
+ function guardOffsetFrom(head, done, look) {
9231
+ if (look.from === 0 && !done && head.length < 3 && at(head, 0, "".slice(0, head.length))) return null;
9232
+ let offset = look.from === 0 && at(head, 0, "") ? 3 : look.from;
9233
+ const after = (start) => offset === look.from ? Math.max(start, look.seen - 3) : start;
9081
9234
  for (;;) {
9082
9235
  while (offset < head.length && [
9083
9236
  9,
@@ -9086,27 +9239,27 @@ function viewerGuardOffset(head, done) {
9086
9239
  13,
9087
9240
  32
9088
9241
  ].includes(head[offset])) offset++;
9089
- if (offset >= head.length) return done ? offset : null;
9242
+ if (offset >= head.length) return done ? offset : wait(look, offset, head.length);
9090
9243
  let end;
9091
9244
  if (at(head, offset, "<!--")) {
9092
9245
  if (at(head, offset + 4, ">")) end = offset + 5;
9093
9246
  else if (at(head, offset + 4, "->")) end = offset + 6;
9094
9247
  else {
9095
- const ends = ["-->", "--!>"].map((close) => [find(head, offset + 4, close), close.length]).filter(([index]) => index >= 0).sort(([a], [b]) => a - b);
9248
+ const ends = ["-->", "--!>"].map((close) => [find(head, after(offset + 4), close), close.length]).filter(([index]) => index >= 0).sort(([a], [b]) => a - b);
9096
9249
  end = ends.length ? ends[0][0] + ends[0][1] : -1;
9097
9250
  }
9098
9251
  } else if (at(head, offset, "<!doctype", true)) {
9099
- const close = find(head, offset, ">");
9252
+ const close = find(head, after(offset), ">");
9100
9253
  if (close >= 0) return close + 1;
9101
9254
  end = -1;
9102
9255
  } else if (at(head, offset, "<!") || at(head, offset, "<?")) {
9103
- const close = find(head, offset, ">");
9256
+ const close = find(head, after(offset), ">");
9104
9257
  end = close >= 0 ? close + 1 : -1;
9105
9258
  } else if (offset === head.length - 1 && head[offset] === 60) {
9106
- if (!done) return null;
9259
+ if (!done) return wait(look, offset, head.length);
9107
9260
  return offset;
9108
9261
  } else return offset;
9109
- if (end < 0) return done ? offset : null;
9262
+ if (end < 0) return done ? offset : wait(look, offset, head.length);
9110
9263
  offset = end;
9111
9264
  }
9112
9265
  }
@@ -9123,7 +9276,8 @@ var LOOK_BYTES = 65536;
9123
9276
  async function guardViewerAnswer(headers, body, destination, guards = [WEBRTC_GUARD]) {
9124
9277
  const hashes = guards.map((guard) => guard.hash);
9125
9278
  const out = headers.map(([name, value]) => [name, name.toLowerCase() === "content-security-policy" ? allowingViewerGuard(value, hashes) : value]);
9126
- out.push(["content-security-policy", VIEWER_GUARD_CSP]);
9279
+ const worker = destination !== null && WORKER_DESTINATIONS.has(destination.toLowerCase());
9280
+ out.push(["content-security-policy", worker ? VIEWER_WORKER_GUARD_CSP : VIEWER_GUARD_CSP]);
9127
9281
  if (destination !== null && !DOCUMENT_DESTINATIONS.has(destination.toLowerCase())) return {
9128
9282
  headers: out,
9129
9283
  body
@@ -9148,14 +9302,27 @@ async function guardViewerAnswer(headers, body, destination, guards = [WEBRTC_GU
9148
9302
  });
9149
9303
  if (!html || encoded) return noScripts();
9150
9304
  const iterator = body[Symbol.asyncIterator]();
9151
- let head = /* @__PURE__ */ new Uint8Array(0);
9305
+ let room = /* @__PURE__ */ new Uint8Array(0);
9306
+ let head = room;
9152
9307
  let done = false;
9153
9308
  let offset = null;
9309
+ const look = {
9310
+ from: 0,
9311
+ seen: 0
9312
+ };
9154
9313
  while (offset === null) {
9155
9314
  const next = await iterator.next();
9156
9315
  if (next.done) done = true;
9157
- else head = concatBytes(head, next.value);
9158
- offset = viewerGuardOffset(head, done || head.length >= LOOK_BYTES);
9316
+ else {
9317
+ if (head.length + next.value.length > room.length) {
9318
+ const more = new Uint8Array(Math.max(room.length * 2, head.length + next.value.length));
9319
+ more.set(head);
9320
+ room = more;
9321
+ }
9322
+ room.set(next.value, head.length);
9323
+ head = room.subarray(0, head.length + next.value.length);
9324
+ }
9325
+ offset = guardOffsetFrom(head, done || head.length >= LOOK_BYTES, look);
9159
9326
  }
9160
9327
  const rest = { [Symbol.asyncIterator]: () => iterator };
9161
9328
  const resumed = async function* (first) {
@@ -12585,6 +12752,17 @@ var LINK_CLOSERS = {
12585
12752
  var LINK_STOP = /[、。〈-】!(),:;?،؛؟۔]/;
12586
12753
  /** What a link leaves out at its end: a sentence's punctuation ("…", "»", "”" too), never a path's "/". */
12587
12754
  var LINK_TRAILING = /[.,;:!?'"*_>…»’”]/;
12755
+ /**
12756
+ * What a chat puts right after a link with no space and no address ends with: an emoji ("https://x.example/a🔥", with
12757
+ * its skin tone, presentation selector, joiners and flag tags) and characters that draw as nothing. Read one code point
12758
+ * at a time from the end, so an emoji inside an address stays in it.
12759
+ */
12760
+ var LINK_TAIL = /^(?:\p{Extended_Pictographic}|\p{Emoji_Modifier}|\p{Regional_Indicator}|[\u200b\u200c\u2060\ufeff\u{e0020}-\u{e007f}]|\u200d|\ufe0e|\ufe0f)$/u;
12761
+ /** How many UTF-16 units of `url` before `end` are an emoji's or an invisible character's last code point (0: none). */
12762
+ function linkTail(url, end) {
12763
+ const units = end > 1 && /[\udc00-\udfff]/.test(url[end - 1]) && /[\ud800-\udbff]/.test(url[end - 2]) ? 2 : 1;
12764
+ return end > 0 && LINK_TAIL.test(url.slice(end - units, end)) ? units : 0;
12765
+ }
12588
12766
  /** A link up to the first `LINK_STOP`: "https://x.example/a。" opens /a, not /a%E3%80%82. */
12589
12767
  function linkStop(url) {
12590
12768
  const at = url.search(LINK_STOP);
@@ -12592,10 +12770,20 @@ function linkStop(url) {
12592
12770
  }
12593
12771
  /**
12594
12772
  * A link ends where the sentence around it takes over: trailing punctuation ("see https://x.example/a.", in any of
12595
- * the app's languages) and a closing bracket or quote the link did not open ("(https://x.example/a)") are left as
12596
- * text. The same rule as the message bubble's links.
12773
+ * the app's languages), an emoji or invisible character (`linkTail`) and a closing bracket or quote the link did not
12774
+ * open ("(https://x.example/a)") are left as text. The same rule as the message bubble's links.
12597
12775
  */
12598
12776
  function linkEnd(whole) {
12777
+ return trimEnd(whole, true);
12778
+ }
12779
+ /**
12780
+ * A payment link (`bitcoin:`, `monero:`…) ends as a web link does, but keeps an emoji at its end: its label or message
12781
+ * is text written as it is ("…&label=Pizza 🍕"), cut at 140 characters wherever that falls.
12782
+ */
12783
+ function uriEnd(whole) {
12784
+ return trimEnd(whole, false);
12785
+ }
12786
+ function trimEnd(whole, tails) {
12599
12787
  const url = linkStop(whole);
12600
12788
  const count = {
12601
12789
  "(": 0,
@@ -12610,6 +12798,11 @@ function linkEnd(whole) {
12610
12798
  while (end > 0) {
12611
12799
  const last = url[end - 1];
12612
12800
  const opener = LINK_CLOSERS[last];
12801
+ const tail = tails ? linkTail(url, end) : 0;
12802
+ if (tail) {
12803
+ end -= tail;
12804
+ continue;
12805
+ }
12613
12806
  if (!LINK_TRAILING.test(last) && !(opener && count[last] > count[opener])) break;
12614
12807
  if (opener) count[last]--;
12615
12808
  end--;
@@ -14626,7 +14819,8 @@ var DhtDelivery = class DhtDelivery {
14626
14819
  * envelope was seen in the pinned mailbox, the invite's is not read any more.
14627
14820
  */
14628
14821
  async read(background, signal = false) {
14629
- const pinned = this.pinned(), options = signal ? { signal } : background ? { background } : void 0;
14822
+ const departed = !signal && !background && this.departedRead();
14823
+ const pinned = this.pinned(), options = signal ? { signal } : background ? { background } : departed ? { departed } : void 0;
14630
14824
  const before = this.state.peerPinned;
14631
14825
  const boxes = !pinned ? ["invite"] : before === "seen" ? ["pinned"] : before ? ["pinned", "invite"] : ["invite", "pinned"];
14632
14826
  let found = null;
@@ -14761,6 +14955,21 @@ var DhtDelivery = class DhtDelivery {
14761
14955
  return this.state.peerMode === "dht" && this.options.peerDhtPollMs && there ? Math.min(this.options.peerDhtPollMs, STREAM_POLL_MS) : STREAM_POLL_MS;
14762
14956
  }
14763
14957
  /**
14958
+ * The contact is on DHT only and this side is not: a live link waits on the contact's envelope saying it left, and
14959
+ * nothing else of the contact's shows before it (no offer is read, no dial taken, while its mailbox says DHT only). Its
14960
+ * reads that are not background ones (the chat open, a text awaiting its receipt) then say `departed`: a few may go over
14961
+ * the relays' minute (`DEPARTED_READS` in relay.ts, per mailbox, every relay together, 6 at the open chat's 10 s pace).
14962
+ * As plain reads, an extension that stayed on Automatic, its minute spent by what it did before, read nothing of its
14963
+ * contact for 40 s after the contact left DHT only, and the matrix's chat stayed "On DHT · retrying live" (E2E full,
14964
+ * 2026-11-07 and 11-08). No more reads than before: those it made anyway, the minute spent, go within the allowance.
14965
+ * Not while this side is leaving DHT only itself (`signalReads` left, `leavingRead`): its read at the switch stays a
14966
+ * plain one, the rest are signaling, so the few requests past a spent minute stay for the dialling side's read of the
14967
+ * answer. As a departed read, the switch's took one, and both sides leaving went live in 34 s, against 10.
14968
+ */
14969
+ departedRead() {
14970
+ return this.mode !== "dht" && this.state.peerMode === "dht" && this.signalReads === 0 && !!this.options.credentials.peerKey;
14971
+ }
14972
+ /**
14764
14973
  * This side is DHT only, and nothing waits on the contact's mailbox: the contact, pinned, is away (nothing new of its
14765
14974
  * own in `PRESENCE_WINDOW`; it puts a keep-alive every four minutes while there), no text of ours awaits its receipt,
14766
14975
  * and the chat is not on screen. Its mailbox is then read at the background pace, as background reads, not every 4 s:
@@ -15277,18 +15486,23 @@ var DNS_TYPE = {
15277
15486
  TXT: 16,
15278
15487
  AAAA: 28
15279
15488
  };
15489
+ /**
15490
+ * EDNS0 OPT record (RFC 6891) with one Client Subnet option of source prefix 0 (RFC 7871 §7.1.2): a resolver must
15491
+ * not add this device's subnet to its queries to the name's servers, as Google Public DNS otherwise does.
15492
+ */
15493
+ var NO_CLIENT_SUBNET = Uint8Array.of(0, 0, 41, 4, 208, 0, 0, 0, 0, 0, 8, 0, 8, 0, 4, 0, 1, 0, 0);
15280
15494
  /** A recursive query for one name and type. ID 0, as RFC 8484 recommends for caching;
15281
15495
  * the AD bit asks the resolver to report DNSSEC validation (RFC 6840 §5.7). */
15282
15496
  function encodeDnsQuery(name, type) {
15283
15497
  const labels = name.replace(/\.$/, "").split(".");
15284
- const parts = [Uint8Array.of(0, 0, 1, 32, 0, 1, 0, 0, 0, 0, 0, 0)];
15498
+ const parts = [Uint8Array.of(0, 0, 1, 32, 0, 1, 0, 0, 0, 0, 0, 1)];
15285
15499
  for (const label of labels) {
15286
15500
  const bytes = utf8Encode(label);
15287
15501
  if (!bytes.length || bytes.length > 63) throw new Error("Invalid DNS name");
15288
15502
  parts.push(Uint8Array.of(bytes.length), bytes);
15289
15503
  }
15290
15504
  const code = DNS_TYPE[type];
15291
- parts.push(Uint8Array.of(0, code >> 8, code & 255, 0, 1));
15505
+ parts.push(Uint8Array.of(0, code >> 8, code & 255, 0, 1), NO_CLIENT_SUBNET);
15292
15506
  return concatBytes(...parts);
15293
15507
  }
15294
15508
  function readName(data, start) {
@@ -16597,7 +16811,7 @@ async function verifyPeerProof(event, c, readStorage) {
16597
16811
  if (sig.length !== 64 || !verify(sig, data, fromZ32(c.externalKey))) throw new Error("Invalid Pubky signature");
16598
16812
  } else if (c.adapter === "keet-import") {
16599
16813
  if (sig.length !== 107 || sig[0] !== 1 || sig[41] !== 0 || sig[42] !== 1) throw new Error("Unsupported Keet attestation");
16600
- const { default: IdentityKey } = await import("./keet-identity-key-CASfmXry.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
16814
+ const { default: IdentityKey } = await import("./keet-identity-key-CDgu84Dj.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
16601
16815
  if (!IdentityKey.verify(b4a.from(sig), b4a.from(data), { expectedIdentity: b4a.from(unhex(c.externalKey)) })) throw new Error("Invalid Keet attestation");
16602
16816
  } else throw new Error("Unsupported proof adapter");
16603
16817
  }
@@ -17302,6 +17516,7 @@ var IdentityExchange = class {
17302
17516
  id,
17303
17517
  provider,
17304
17518
  subject,
17519
+ account: local.account ?? subject,
17305
17520
  status: "queued",
17306
17521
  at: this.now()
17307
17522
  };
@@ -17460,7 +17675,7 @@ var IdentityExchange = class {
17460
17675
  at: this.now(),
17461
17676
  error
17462
17677
  };
17463
- const replaced = (x) => ok && x.status === "accepted" && x.provider === s.provider && x.subject === s.subject;
17678
+ const replaced = (x) => ok && x.status === "accepted" && x.provider === s.provider && x.account !== void 0 && x.account === s.account;
17464
17679
  await this.options.storage.update((l) => l.shared.filter((x) => x.id !== s.id && replaced(x)).reduce((out, x) => this.log(out, {
17465
17680
  type: "stopped",
17466
17681
  side: "mine",
@@ -19133,9 +19348,6 @@ var RateWindows = class {
19133
19348
  prune(now) {
19134
19349
  for (const [app, window] of this.windows) if (!window.length || now - window[window.length - 1] >= 1e3) this.windows.delete(app);
19135
19350
  }
19136
- clear() {
19137
- this.windows.clear();
19138
- }
19139
19351
  };
19140
19352
  /**
19141
19353
  * The apps of one chat on its live sessions. `open` (this side's apps, by chat app id, with their versions) lasts
@@ -19200,7 +19412,8 @@ var AppSessions = class {
19200
19412
  }
19201
19413
  /**
19202
19414
  * The session ended, or `apps/1` is no longer agreed: what the peer had open is gone, and each such app hears a
19203
- * `close` with `offline`. This side's open apps stay, and say `open` again on the next session.
19415
+ * `close` with `offline`. This side's open apps stay, and say `open` again on the next session. The rate windows
19416
+ * stay too: they are the contact's per app, or turning `apps/1` off and on would give each app a new 50.
19204
19417
  */
19205
19418
  sessionEnded() {
19206
19419
  const closed = [.../* @__PURE__ */ new Set([...this.held.keys(), ...this.peer.keys()])].map((app) => ({
@@ -19210,14 +19423,13 @@ var AppSessions = class {
19210
19423
  }));
19211
19424
  this.peer.clear();
19212
19425
  this.held.clear();
19213
- this.received.clear();
19214
- this.sent.clear();
19215
19426
  return closed;
19216
19427
  }
19217
19428
  /**
19218
19429
  * The session ended or was replaced, and another may follow at once: what the peer had open is held, not closed (no
19219
19430
  * event now). Nothing is sent to a held app; an `open` on the next session takes it back, a `close` closes it, and
19220
- * `heldExpired` closes the rest once `graceMs` has passed since the suspension that held each.
19431
+ * `heldExpired` closes the rest once `graceMs` has passed since the suspension that held each. The rate windows stay,
19432
+ * as in `sessionEnded`.
19221
19433
  */
19222
19434
  sessionSuspended(graceMs = APP_RESUME_GRACE_MS) {
19223
19435
  const until = this.now() + graceMs;
@@ -19226,8 +19438,6 @@ var AppSessions = class {
19226
19438
  until
19227
19439
  });
19228
19440
  this.peer.clear();
19229
- this.received.clear();
19230
- this.sent.clear();
19231
19441
  }
19232
19442
  /** Whether any of the peer's apps is held, waiting for its next session. */
19233
19443
  get holding() {
@@ -19293,7 +19503,12 @@ var APP_RANGE_LIMITS = {
19293
19503
  * The bytes a server takes asks for in one second, its apps together: one more is answered `busy`. Counted as they
19294
19504
  * are asked, so a cancelled one counts as the read it started. Twice the asking app's own budget (16 MiB a second).
19295
19505
  */
19296
- bytesPerSecond: 33554432
19506
+ bytesPerSecond: 33554432,
19507
+ /**
19508
+ * The least one ask counts in `bytesPerSecond`, however few bytes it asked or the file held from its offset: each is
19509
+ * a read on this device, so a contact gets at most 512 a second.
19510
+ */
19511
+ askFloorBytes: 65536
19297
19512
  };
19298
19513
  /**
19299
19514
  * What an `ar-err` says. `not-served`: no serve of that id (never given, or ended); `changed` and
@@ -19574,16 +19789,17 @@ var AppRanges = class {
19574
19789
  old.out = true;
19575
19790
  this.takenBytes -= old.bytes;
19576
19791
  }
19577
- if (this.takenBytes + frame.n > APP_RANGE_LIMITS.bytesPerSecond) {
19792
+ const bytes = Math.max(frame.n, APP_RANGE_LIMITS.askFloorBytes);
19793
+ if (this.takenBytes + bytes > APP_RANGE_LIMITS.bytesPerSecond) {
19578
19794
  this.send(appRangeErrorFrame(app, request, "busy"));
19579
19795
  return null;
19580
19796
  }
19581
19797
  const charge = {
19582
19798
  at,
19583
- bytes: frame.n
19799
+ bytes
19584
19800
  };
19585
19801
  this.taken.push(charge);
19586
- this.takenBytes += frame.n;
19802
+ this.takenBytes += bytes;
19587
19803
  const task = {
19588
19804
  app,
19589
19805
  request,
@@ -19605,7 +19821,7 @@ var AppRanges = class {
19605
19821
  /** Every byte of `task` was sent: `ar-end` goes with the file's size, unless the task was dropped meanwhile. */
19606
19822
  finish(task, size) {
19607
19823
  if (!this.take(task)) return;
19608
- const charge = task.charge, sent = Math.max(0, Math.min(task.length, size - task.offset));
19824
+ const charge = task.charge, sent = Math.max(APP_RANGE_LIMITS.askFloorBytes, Math.min(task.length, size - task.offset));
19609
19825
  if (charge && !charge.out && charge.bytes > sent) {
19610
19826
  this.takenBytes -= charge.bytes - sent;
19611
19827
  charge.bytes = sent;
@@ -21086,6 +21302,12 @@ var ChatFiles = class {
21086
21302
  moving = /* @__PURE__ */ new Set();
21087
21303
  /** Files that stopped sending for the chat's window alone: they go on once another's bytes are confirmed. */
21088
21304
  held = /* @__PURE__ */ new Set();
21305
+ /**
21306
+ * Files this side cancelled while no session carried the cancel (`pf-abort`), said on the next one. The session also
21307
+ * goes for a moment when a move swaps it (its capabilities are agreed again): unsaid, the receiver showed the file
21308
+ * moving, its bytes kept, until its idle nudge asked 30 s later.
21309
+ */
21310
+ unsaid = /* @__PURE__ */ new Set();
21089
21311
  attached = false;
21090
21312
  peerRoomValue = null;
21091
21313
  /** What the chat's files may have in flight, sized by the path. */
@@ -21184,6 +21406,10 @@ var ChatFiles = class {
21184
21406
  this.refill = 0;
21185
21407
  this.host.uplink?.join(this);
21186
21408
  this.sayRoom();
21409
+ for (const id of this.unsaid) if (this.send({
21410
+ t: "pf-abort",
21411
+ id
21412
+ })) this.unsaid.delete(id);
21187
21413
  this.sweep();
21188
21414
  for (const entry of this.entries.values()) {
21189
21415
  if (transferEnded(entry.record)) continue;
@@ -22189,10 +22415,10 @@ var ChatFiles = class {
22189
22415
  const entry = this.entry(direction, id);
22190
22416
  if (transferEnded(entry.record)) return;
22191
22417
  if (direction === "out") {
22192
- this.send({
22418
+ if (!this.send({
22193
22419
  t: "pf-abort",
22194
22420
  id
22195
- });
22421
+ })) this.unsaid.add(id);
22196
22422
  this.end(entry, "cancelled", "You cancelled it");
22197
22423
  } else {
22198
22424
  this.discardStored(entry);
@@ -23727,6 +23953,14 @@ var RACE_DIRECT_MS = 8e3;
23727
23953
  */
23728
23954
  var RACE_RELAYED_MS = 4e4;
23729
23955
  /**
23956
+ * A relayed transport dialled ahead of the others (Automatic's Iroh through its relay, WISP 100 revision 2026-11-08) has
23957
+ * this long before the next ranked one is dialled too, the first still going: whichever goes live first carries the
23958
+ * chat. Through a relay that answers it connects well within it (0.1-0.9 s measured); one that reaches nobody (the
23959
+ * relay down, the contact no longer on it) gives up only at Iroh's connect timeout, 20 s, and held the WebRTC offer back
23960
+ * that long at every return: 26-30 s to live between two CLIs with the Iroh relay down, 4 s with WebRTC chosen.
23961
+ */
23962
+ var RELAYED_FIRST_MS = 3e3;
23963
+ /**
23730
23964
  * A WebRTC offer this side made that was answered, and has not connected this long after the answer was applied: where
23731
23965
  * a path exists ICE finds it in a second or two, so there is none (a VPN's NAT, a firewall that drops UDP, and no TURN
23732
23966
  * server), and every transport ranked after WebRTC is dialled now, the relayed ones too, the attempt still standing.
@@ -23834,6 +24068,22 @@ var QUIET_FRAMES = /* @__PURE__ */ new Set([
23834
24068
  CONTACT_ASKER_FRAME
23835
24069
  ]);
23836
24070
  /**
24071
+ * What a session a move replaced still reads while its channel retires (`SWITCH_RETIRE_MS`): the contact's texts,
24072
+ * reactions, pins and edits, and its receipts of this side's, which it sends on that session until its own side moves.
24073
+ * Its files/3 frames too (a cancel, a pause, a file's check): `ChatFiles` answers them on the session now.
24074
+ */
24075
+ var RETIRING_FRAMES = /* @__PURE__ */ new Set([
24076
+ "paired-message",
24077
+ "paired-received",
24078
+ REACTION_FRAME,
24079
+ REACTED_FRAME,
24080
+ PIN_FRAME,
24081
+ PINNED_FRAME,
24082
+ EDIT_FRAME,
24083
+ EDITED_FRAME,
24084
+ ...FILE_FRAMES
24085
+ ]);
24086
+ /**
23837
24087
  * A ping with nothing at all back this long after it went: the contact may have crashed and started again, with its new
23838
24088
  * offer waiting on the relays, while this side still holds the old session and reads them at a live chat's pace (30 s).
23839
24089
  * They are read now. Nothing more: the session is let go only by `LIVENESS_MISSED_PINGS`, or by the contact's offer
@@ -23891,6 +24141,17 @@ var APP_IN_FLIGHT = 65536;
23891
24141
  /** Largest `paired-message` frame sent with a preview: a session fails on a frame over 60 KiB (`PairedSession`). */
23892
24142
  var MAX_PAIRED_MESSAGE_FRAME = 57344;
23893
24143
  /**
24144
+ * Texts a contact's link takes: a burst per short window (a reconnect flushes every queued text at once) and a total
24145
+ * per hour, both well above what a person or a bot sends. The rest go unconfirmed and come again (the sender's outbox
24146
+ * resends with backoff), so a catch-up only slows.
24147
+ */
24148
+ var MESSAGE_RECEIVE_LIMITS = {
24149
+ burst: 200,
24150
+ burstWindowMs: 1e4,
24151
+ hourly: 1800,
24152
+ hourWindowMs: 36e5
24153
+ };
24154
+ /**
23894
24155
  * A `paired-message` frame. The preview (`pv`) is left out when the frame would pass `MAX_PAIRED_MESSAGE_FRAME`
23895
24156
  * with it: the text matters, the card does not. A reply (`r`, WISP 401 § Replies) is a few hundred bytes at most
23896
24157
  * and always goes, and so does a forwarded message's hop count (`fw`, WISP 401 § Forwards) and a status card (`sc`,
@@ -24108,6 +24369,8 @@ var GhostLink = class {
24108
24369
  pinsReceived = new ReactionWindow(PIN_LIMITS.receive, PIN_LIMITS.windowMs);
24109
24370
  /** Edit frames the contact may send per window; the rest go unconfirmed and come again. */
24110
24371
  editsReceived = new RateWindow(30, EDIT_RATE_WINDOW_MS);
24372
+ /** Text frames the contact may send per window (`MESSAGE_RECEIVE_LIMITS`); the rest go unconfirmed and come again. */
24373
+ messagesReceived = [new RateWindow(MESSAGE_RECEIVE_LIMITS.burst, MESSAGE_RECEIVE_LIMITS.burstWindowMs), new RateWindow(MESSAGE_RECEIVE_LIMITS.hourly, MESSAGE_RECEIVE_LIMITS.hourWindowMs)];
24111
24374
  /** Call signals the contact may send per window; the rest are dropped. */
24112
24375
  callsReceived = new RateWindow(150, CALL_RATE_WINDOW_MS);
24113
24376
  /** WebRTC signals the contact may send on the session (`paired-rtc`) per window; the rest are dropped. */
@@ -24170,7 +24433,8 @@ var GhostLink = class {
24170
24433
  /**
24171
24434
  * The WebRTC offer this side's dial made last, with fallback allowed: what a transport that comes up meanwhile joins.
24172
24435
  * `resume`: the dial that made it is this side back after an absence, over WebRTC (`resuming`); `woke`: the absence
24173
- * was the app's in the background, not a restart (`resumeAfterAbsence`).
24436
+ * was the app's in the background, not a restart (`resumeAfterAbsence`). `knockMissed`: the dial that made it followed a
24437
+ * resume's knock that found nothing (`resumeKnockMissed`).
24174
24438
  */
24175
24439
  offered;
24176
24440
  /**
@@ -24296,6 +24560,8 @@ var GhostLink = class {
24296
24560
  resumeWaitUntil = 0;
24297
24561
  /** The contact's other native transports were knocked on while this resume waited (`knockWhileResuming`). */
24298
24562
  resumeKnocked = false;
24563
+ /** The resume's knock found nothing (`knock`): the next dial is still the resume's, made whatever the key. */
24564
+ resumeKnockMissed = false;
24299
24565
  /** What the last live session ran on, kept after it ended: a wake resumes on it (`resumeAfterAbsence`). */
24300
24566
  lastLiveOn;
24301
24567
  /** `resuming` is a wake's, not a restart's. */
@@ -25136,6 +25402,18 @@ var GhostLink = class {
25136
25402
  });
25137
25403
  }
25138
25404
  /**
25405
+ * Where the receipt of a frame read on `channel` goes: that session while it carries the chat, the one now when a move
25406
+ * replaced it (or moved while the frame was shown), or nowhere.
25407
+ */
25408
+ answerOn(channel) {
25409
+ const live = this.channel;
25410
+ return live && (live === channel || this.retiring.has(channel)) && this.isDataLinkOpen ? live : null;
25411
+ }
25412
+ /** Counts one text the contact sent; false (and not counted) when either of `messagesReceived` is full. */
25413
+ takeMessage() {
25414
+ return this.messagesReceived.every((window) => window.wait() === 0) && this.messagesReceived.every((window) => window.take());
25415
+ }
25416
+ /**
25139
25417
  * The WebRTC session a switch moved off is still retiring (`SWITCH_RETIRE_MS`): its data link is open, and a new offer
25140
25418
  * cannot go until it closes. Resolves once it has (at once when none is).
25141
25419
  */
@@ -25661,9 +25939,15 @@ var GhostLink = class {
25661
25939
  * holds the old session and would notice only when its liveness gives up (a minute); a dial reaches it now and takes
25662
25940
  * over (`attachReplacement`). Once only, and a knock that does not connect counts as no failure: the contact may
25663
25941
  * simply be away. Two dials crossing are settled by key order (see `registerEndpoint`).
25942
+ *
25943
+ * A resume's knock that does not connect leaves its dial whatever the key to the next one (`resumeKnockMissed`), whose
25944
+ * offer knocks on the contact's other transports (`knockMissed`): a contact holding the old session over HyperDHT
25945
+ * announces no listener (endpoint.mjs), so the knock finds nothing, and the higher key waited for the contact to
25946
+ * notice (14.5-15.2 s between two CLI daemons, against 0.8-1.6 s with the lower key; under 5 s now).
25664
25947
  */
25665
25948
  async knock(transport) {
25666
- if (this.resuming === transport) {
25949
+ const resume = this.resuming === transport;
25950
+ if (resume) {
25667
25951
  this.resuming = void 0;
25668
25952
  this.resumingWoke = false;
25669
25953
  }
@@ -25690,6 +25974,7 @@ var GhostLink = class {
25690
25974
  transport,
25691
25975
  error: error instanceof Error ? error.message : String(error)
25692
25976
  });
25977
+ if (resume && epoch === this.connectionEpoch) this.resumeKnockMissed = true;
25693
25978
  } finally {
25694
25979
  if (this.knocking === knocking) this.knocking = null;
25695
25980
  if (epoch === this.connectionEpoch) {
@@ -25855,6 +26140,8 @@ var GhostLink = class {
25855
26140
  return;
25856
26141
  }
25857
26142
  this.dialing = true;
26143
+ const knockMissed = this.resumeKnockMissed;
26144
+ this.resumeKnockMissed = false;
25858
26145
  const epoch = this.connectionEpoch;
25859
26146
  this.attempt = {
25860
26147
  side: "dialled",
@@ -25883,6 +26170,7 @@ var GhostLink = class {
25883
26170
  const now = Date.now(), demoted = (t) => (this.demotedUntil.get(t) ?? 0) > now;
25884
26171
  const ordered = choices.length > 1 ? [...choices.filter((t) => !demoted(t)), ...choices.filter(demoted)] : choices;
25885
26172
  const failedFirst = [];
26173
+ let ahead;
25886
26174
  for (const [index, transport] of ordered.entries()) {
25887
26175
  if (index > 0 && !fallback) break;
25888
26176
  if (transport === "webrtc/1") {
@@ -25897,7 +26185,8 @@ var GhostLink = class {
25897
26185
  epoch,
25898
26186
  at: offeredAt,
25899
26187
  ...resume && { resume },
25900
- ...woke && { woke }
26188
+ ...woke && { woke },
26189
+ ...knockMissed && { knockMissed }
25901
26190
  } : void 0;
25902
26191
  this.offerMade = {
25903
26192
  epoch,
@@ -25929,11 +26218,28 @@ var GhostLink = class {
25929
26218
  for (const joined of next.rest) if (!ordered.includes(joined)) ordered.push(joined);
25930
26219
  continue;
25931
26220
  }
25932
- const result = await this.dialNative(transport, epoch);
26221
+ const dialled = this.dialNative(transport, epoch);
26222
+ let result;
26223
+ if (fallback && !ahead && index < ordered.length - 1 && relayed.includes(transport)) {
26224
+ let headStart;
26225
+ result = await Promise.race([dialled, new Promise((resolve) => {
26226
+ headStart = setTimeout(() => resolve("slow"), RELAYED_FIRST_MS);
26227
+ })]);
26228
+ clearTimeout(headStart);
26229
+ if (result === "slow") {
26230
+ ahead = dialled;
26231
+ continue;
26232
+ }
26233
+ } else result = await dialled;
25933
26234
  if (result === true) return;
25934
26235
  lastError = result;
25935
26236
  failedFirst.push(transport);
25936
26237
  }
26238
+ if (ahead) {
26239
+ const result = await ahead;
26240
+ if (result === true) return;
26241
+ lastError = result;
26242
+ }
25937
26243
  throw lastError ?? /* @__PURE__ */ new Error("No permitted transport could connect");
25938
26244
  } catch (error) {
25939
26245
  if (epoch === this.connectionEpoch) this.attemptEnded(error instanceof Error ? error.message : String(error));
@@ -26081,7 +26387,7 @@ var GhostLink = class {
26081
26387
  const answered = this.answeredAt ? this.answeredAt + RACE_ANSWERED_MS : Infinity;
26082
26388
  const at = next.rest.filter((t) => t !== "webrtc/1").map((t) => Math.max(Math.min(offeredAt + (relayed.includes(t) ? RACE_RELAYED_MS : RACE_DIRECT_MS), answered), this.canDial(t) ? 0 : now + RACE_RETRY_MS));
26083
26389
  if (!at.length) return;
26084
- if (this.offered?.resume && this.knockedEarly !== epoch) setTimeout(() => this.maybeKnockEarly(epoch), 0);
26390
+ if ((this.offered?.resume || this.offered?.knockMissed) && this.knockedEarly !== epoch) setTimeout(() => this.maybeKnockEarly(epoch), 0);
26085
26391
  this.raceTimer = setTimeout(() => {
26086
26392
  this.raceTimer = null;
26087
26393
  this.race(epoch, offeredAt);
@@ -26166,12 +26472,16 @@ var GhostLink = class {
26166
26472
  contactQuiet(ms = EXPECT_PEER_MS) {
26167
26473
  return Date.now() - presenceSeenAt(this.session.peerPresence) >= ms;
26168
26474
  }
26169
- /** The direct transports of an attempt that resumes to a quiet contact, knocked on while its offer stands (`scheduleRace`). */
26475
+ /**
26476
+ * The direct transports of an attempt that resumes to a quiet contact, knocked on while its offer stands (`scheduleRace`).
26477
+ * So are those of the dial after a resume's knock that found nothing (`knockMissed`), relayed ones too, whatever the
26478
+ * contact's newest packet: it holds the old session and reads offers at a live chat's pace.
26479
+ */
26170
26480
  maybeKnockEarly(epoch) {
26171
- const next = this.afterRtc;
26172
- if (!this.offered?.resume || this.offered.epoch !== epoch || this.knockedEarly === epoch || next?.epoch !== epoch || epoch !== this.connectionEpoch) return;
26173
- if (this.dialing || this.channel || this.stopped || !this.offerOut || !(this.offered.woke || this.contactQuiet())) return;
26174
- const relayed = this.upgradesFromRelay() ? [] : this.relayedTransports;
26481
+ const next = this.afterRtc, missed = !!this.offered?.knockMissed;
26482
+ if (!(this.offered?.resume || missed) || this.offered?.epoch !== epoch || this.knockedEarly === epoch || next?.epoch !== epoch || epoch !== this.connectionEpoch) return;
26483
+ if (this.dialing || this.channel || this.stopped || !this.offerOut || !(missed || this.offered.woke || this.contactQuiet())) return;
26484
+ const relayed = missed || this.upgradesFromRelay() ? [] : this.relayedTransports;
26175
26485
  const direct = next.rest.filter((t) => !relayed.includes(t) && this.canDial(t));
26176
26486
  if (!direct.length) return;
26177
26487
  this.knockedEarly = epoch;
@@ -26219,6 +26529,7 @@ var GhostLink = class {
26219
26529
  rest: [...rest, transport]
26220
26530
  };
26221
26531
  traceLink(this.myPubKeyZ32, "race-join", { transport });
26532
+ if (offered.knockMissed && this.canDial(transport)) this.knockEarly(offered.epoch, [transport]);
26222
26533
  if (!this.racing) this.scheduleRace(offered.epoch, offered.at);
26223
26534
  }
26224
26535
  /** WebRTC could not start an attempt here: it goes last in the dial order for `RTC_UNSTARTED_MS`, while another transport remains. */
@@ -26336,7 +26647,7 @@ var GhostLink = class {
26336
26647
  * anyway holds (a first pairing's role, a restart, WebRTC set aside). Its own dial, chosen by hand, is not retried.
26337
26648
  */
26338
26649
  awaitsContactDial() {
26339
- return !(this.firstPairing() ? this.options.pairingProgress?.role : void 0) && this.myPubKeyZ32 > this.options.params.peerPubKeyZ32 && !this.resuming && !this.dialsPastRtc();
26650
+ return !(this.firstPairing() ? this.options.pairingProgress?.role : void 0) && this.myPubKeyZ32 > this.options.params.peerPubKeyZ32 && !this.resuming && !this.resumeKnockMissed && !this.dialsPastRtc();
26340
26651
  }
26341
26652
  /** A transport of the attempt under way did not connect. */
26342
26653
  attemptFailed(transport, error) {
@@ -28031,6 +28342,12 @@ var GhostLink = class {
28031
28342
  if (this.channel === channel && (!this.unproven(channel) && !this.pinnedSince(channel, paired) || paired.state.status === "ready")) this.emitPairingState();
28032
28343
  },
28033
28344
  onFailure: () => {
28345
+ const retiring = this.channel !== channel ? this.retiring.get(channel) : void 0;
28346
+ if (retiring) {
28347
+ clearTimeout(retiring.timer);
28348
+ retiring.close();
28349
+ return;
28350
+ }
28034
28351
  if (paired.state.keyMismatch) this.options.events?.onPeerKeyRefused?.();
28035
28352
  if (this.unproven(channel) || this.pinnedSince(channel, paired) || paired.authTimedOut || paired.overloaded) {
28036
28353
  if (paired.state.keyMismatch) this.dht?.foreignKeySeen("stream");
@@ -28078,11 +28395,12 @@ var GhostLink = class {
28078
28395
  this.paired = paired;
28079
28396
  this.activeBinding = binding;
28080
28397
  this.channelSince = Date.now();
28081
- oldPaired?.stop();
28082
28398
  const oldRtc = oldBinding ? null : this.dataLink.connection;
28083
28399
  if (oldChannel) this.retire(oldChannel, () => {
28400
+ oldPaired?.stop();
28084
28401
  if (oldRtc && this.activeBinding && this.dataLink.connection === oldRtc) this.dataLink.close();
28085
28402
  }, !oldBinding);
28403
+ else oldPaired?.stop();
28086
28404
  if (migration.plan && binding && oldBinding && WEBRTC_ATTEMPT.has(this.dataLink.state)) this.dataLink.close();
28087
28405
  this.session.setDataLinkOpen(true);
28088
28406
  if (migration.plan) switched = {
@@ -28139,6 +28457,7 @@ var GhostLink = class {
28139
28457
  this.rtcCandidateWaiter = null;
28140
28458
  this.autoConnectFailures = 0;
28141
28459
  this.lastAutoConnectAt = 0;
28460
+ this.resumeKnockMissed = false;
28142
28461
  traceLink(this.myPubKeyZ32, "paired-ready");
28143
28462
  this.attempt = null;
28144
28463
  if (this.lastAttempt) {
@@ -28161,10 +28480,13 @@ var GhostLink = class {
28161
28480
  }
28162
28481
  },
28163
28482
  onApplication: async (data) => {
28164
- if (this.channel !== channel) return;
28165
- this.unansweredPings = 0;
28166
- this.heardFromPeer();
28167
- this.framesHeard++;
28483
+ const retired = this.channel !== channel;
28484
+ if (retired && !this.retiring.has(channel)) return;
28485
+ if (!retired) {
28486
+ this.unansweredPings = 0;
28487
+ this.heardFromPeer();
28488
+ this.framesHeard++;
28489
+ } else if (typeof data !== "string") return;
28168
28490
  if (typeof data !== "string") {
28169
28491
  if (data[0] === 5) {
28170
28492
  const range = this.supportsAppRanges && this.supportsBinaryFiles ? decodeAppRangeData(data) : null;
@@ -28187,6 +28509,7 @@ var GhostLink = class {
28187
28509
  } catch {
28188
28510
  return;
28189
28511
  }
28512
+ if (retired && !RETIRING_FRAMES.has(String(frame?.t))) return;
28190
28513
  if (frame && typeof frame === "object" && !QUIET_FRAMES.has(String(frame.t))) this.activityAt = Date.now();
28191
28514
  if (frame?.t === "paired-ping") {
28192
28515
  try {
@@ -28342,8 +28665,9 @@ var GhostLink = class {
28342
28665
  if (!this.supportsReactions || !this.reactionsReceived.take()) return;
28343
28666
  const reaction = parseReactionFrame(frame);
28344
28667
  if (!reaction) return;
28345
- if (await this.options.events?.onReaction?.(reaction) && this.channel === channel && this.isDataLinkOpen) try {
28346
- channel.send(reactedFrame(reaction.n));
28668
+ const reacted = await this.options.events?.onReaction?.(reaction), live = this.answerOn(channel);
28669
+ if (reacted && live) try {
28670
+ live.send(reactedFrame(reaction.n));
28347
28671
  } catch {}
28348
28672
  return;
28349
28673
  }
@@ -28356,8 +28680,9 @@ var GhostLink = class {
28356
28680
  if (!this.supportsPins || !this.pinsReceived.take()) return;
28357
28681
  const pin = parsePinFrame(frame);
28358
28682
  if (!pin) return;
28359
- if (await this.options.events?.onPin?.(pin) && this.channel === channel && this.isDataLinkOpen) try {
28360
- channel.send(pinnedFrame(pin.n));
28683
+ const pinned = await this.options.events?.onPin?.(pin), live = this.answerOn(channel);
28684
+ if (pinned && live) try {
28685
+ live.send(pinnedFrame(pin.n));
28361
28686
  } catch {}
28362
28687
  return;
28363
28688
  }
@@ -28370,7 +28695,8 @@ var GhostLink = class {
28370
28695
  if (!this.supportsEdits || !this.editsReceived.take()) return;
28371
28696
  const edit = parseEditFrame(frame);
28372
28697
  if (!edit) return;
28373
- if (await this.options.events?.onMessageEdit?.(edit) && this.channel === channel && this.isDataLinkOpen) channel.send(editedFrame(edit.id, edit.e));
28698
+ const edited = await this.options.events?.onMessageEdit?.(edit), live = this.answerOn(channel);
28699
+ if (edited && live) live.send(editedFrame(edit.id, edit.e));
28374
28700
  return;
28375
28701
  }
28376
28702
  if (frame?.t === "paired-edited") {
@@ -28466,6 +28792,7 @@ var GhostLink = class {
28466
28792
  return;
28467
28793
  }
28468
28794
  if (!frame || typeof frame.id !== "string" || !/^[A-Za-z0-9_-]{22}$/.test(frame.id)) return;
28795
+ if (frame.t === "paired-message" && !this.takeMessage()) return;
28469
28796
  if (frame.t === "paired-message" && typeof frame.m === "string" && utf8Encode(frame.m).length <= LIMITS.maxChatMessageBytes && typeof frame.ts === "number" && Number.isSafeInteger(frame.ts) && frame.ts > 0) {
28470
28797
  const preview = frame.pv === void 0 ? void 0 : parseLinkPreview(frame.pv, frame.m);
28471
28798
  this.typingReceiver.clear();
@@ -28482,7 +28809,8 @@ var GhostLink = class {
28482
28809
  ...forwarded && { forwarded },
28483
28810
  ...card && { card }
28484
28811
  });
28485
- if (this.channel === channel && this.isDataLinkOpen) channel.send(JSON.stringify({
28812
+ const live = this.answerOn(channel);
28813
+ if (live) live.send(JSON.stringify({
28486
28814
  t: "paired-received",
28487
28815
  id: frame.id
28488
28816
  }));
@@ -28959,6 +29287,7 @@ var GhostLink = class {
28959
29287
  break;
28960
29288
  }
28961
29289
  case "m":
29290
+ if (!this.takeMessage()) break;
28962
29291
  this.options.events?.onMessage?.({
28963
29292
  text: frame.m,
28964
29293
  timestamp: frame.ts,
@@ -29761,7 +30090,9 @@ var VIDEO_METADATA_LIMITS = {
29761
30090
  /** Bytes read first to tell a video from another file. */
29762
30091
  headBytes: 64,
29763
30092
  /** Bytes read at once for a box's header or a small box, so the next headers and `moof`s are read with it. */
29764
- readAhead: 65536
30093
+ readAhead: 65536,
30094
+ /** The most a walk going on from its window reads at once (an Ogg's pages, a live WebM's blocks: the whole file). */
30095
+ readAheadMax: 4194304
29765
30096
  };
29766
30097
  /** Why a video is refused: its metadata could not be removed, so it does not go at all. */
29767
30098
  var NO_VIDEO_METADATA = "This video cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded";
@@ -30202,18 +30533,24 @@ function meets(ranges, start, end) {
30202
30533
  /**
30203
30534
  * `source` read a window at a time: a read that fits in `readAhead` bytes reads that many from where it starts, and
30204
30535
  * the reads after it within them (the next boxes' headers, a fragment's `moof`) are served from it, as copies (they
30205
- * are changed in place). A Blob's read costs about the same whatever its size, so a fragment costs one, not three.
30536
+ * are changed in place). A Blob's read costs most for being one (in Chromium ~0.3 ms, and ~0.9 ms per MiB), so a
30537
+ * fragment costs one, not three.
30538
+ *
30539
+ * A walk that goes on from its window (an Ogg's pages, a live WebM's blocks: headers less than a window apart, through
30540
+ * the whole file) reads twice as much each time, up to `readAheadMax`, so it makes a few large reads, not one per
30541
+ * 64 KiB. One that jumps farther (over a fragment's samples) or back reads `readAhead` again.
30206
30542
  */
30207
30543
  function readingAhead(source) {
30208
- let start = 0, window = /* @__PURE__ */ new Uint8Array(0);
30544
+ let start = 0, window = /* @__PURE__ */ new Uint8Array(0), ahead = VIDEO_METADATA_LIMITS.readAhead;
30209
30545
  return {
30210
30546
  size: source.size,
30211
30547
  async read(offset, length) {
30212
30548
  const end = start + window.length;
30213
30549
  if (offset < start || offset + length > end && end < source.size) {
30214
- if (length > VIDEO_METADATA_LIMITS.readAhead) return source.read(offset, length);
30550
+ ahead = window.length > 0 && offset >= start && offset - end < ahead ? Math.min(ahead * 2, VIDEO_METADATA_LIMITS.readAheadMax) : VIDEO_METADATA_LIMITS.readAhead;
30551
+ if (length > ahead) return source.read(offset, length);
30215
30552
  start = offset;
30216
- window = await source.read(offset, VIDEO_METADATA_LIMITS.readAhead);
30553
+ window = await source.read(offset, ahead);
30217
30554
  }
30218
30555
  return window.slice(offset - start, offset - start + length);
30219
30556
  }
@@ -30392,16 +30729,19 @@ async function videoMetadataPatches(file, mime, audio = false) {
30392
30729
  *
30393
30730
  * - MP4 audio (M4A, a voice note recorded in MP4): videoMetadata.ts's box walk, its `udta` and `meta` emptied.
30394
30731
  * - MP3 and AAC: an ID3v2 tag at the start becomes an empty one (its frames zeros: padding), one at the end (with its
30395
- * footer), an APEv2 tag's items, a Lyrics3v2 tag and an ID3v1 tag's fields become zeros.
30732
+ * footer), an APEv2 tag's items, a Lyrics3v2 tag and an ID3v1 tag's fields become zeros. One typed as MP3 or AAC
30733
+ * whose first bytes are neither (junk before its first frame) still has the tags at its end emptied.
30396
30734
  * - FLAC: every metadata block but its stream info and seek table (a Vorbis comment, a picture, a cue sheet, an
30397
30735
  * application's) becomes padding, zeroed.
30398
- * - Ogg Opus, Vorbis and Speex: the comment header keeps its vendor (the encoder's name) and has no comment, the bytes
30399
- * after it zeros; each page it changed has its checksum made again.
30400
- * - WAV: every chunk but its format, data and the ones of the sound itself (`fact`, `cue `, `smpl`, `inst`) becomes
30401
- * `JUNK`, zeroed (an INFO list, an `id3 ` chunk, a broadcast `bext` with its date and originator, XMP).
30736
+ * - Ogg Opus, Vorbis, Speex and Theora: the comment header keeps its vendor (the encoder's name) and has no comment,
30737
+ * the bytes after it zeros. FLAC in Ogg: its metadata blocks as a FLAC's. Each page changed has its checksum made again.
30738
+ * - WAV (RIFF, RF64 or BW64): every chunk but its format, data and the ones of the sound itself (`fact`, `cue `,
30739
+ * `smpl`, `inst`, an RF64's `ds64`) becomes `JUNK`, zeroed (an INFO list, an `id3 ` chunk, a broadcast `bext` with
30740
+ * its date and originator, iXML, XMP).
30402
30741
  * - WebM and Matroska, audio or video: `Tags`, `Attachments`, `Chapters`, the title, the date, the file names and each
30403
30742
  * track's name become `Void` elements (and the SeekHead's entries for them); the muxer's and the writing app's names
30404
- * are zeroed. Clusters, cues and track settings are kept as they are.
30743
+ * are zeroed. A Vorbis, Theora or FLAC track's CodecPrivate (its Ogg headers or its FLAC metadata blocks) has its
30744
+ * comments emptied as an Ogg's or a FLAC's. Clusters, cues and other track settings are kept as they are.
30405
30745
  *
30406
30746
  * Fail-closed: a file that is one of these by its bytes and whose tags cannot be removed (truncated, malformed) is
30407
30747
  * refused with `NO_AUDIO_METADATA`, never sent as it was. Any other file goes as it is (other audio formats too).
@@ -30558,6 +30898,17 @@ async function trailingTags(read, size, start, patches) {
30558
30898
  return;
30559
30899
  }
30560
30900
  }
30901
+ /** The types an MP3 or AAC file is sent as: one whose first bytes are no frame still has its tags at the end read. */
30902
+ var MPEG_AUDIO = /* @__PURE__ */ new Set([
30903
+ "audio/mpeg",
30904
+ "audio/mp3",
30905
+ "audio/mpeg3",
30906
+ "audio/x-mpeg",
30907
+ "audio/x-mp3",
30908
+ "audio/aac",
30909
+ "audio/x-aac",
30910
+ "audio/aacp"
30911
+ ]);
30561
30912
  /** An MPEG audio frame's or an ADTS header's first bytes: 11 bits set, a version and a layer that are some. */
30562
30913
  var isFrame = (b, at) => b.length >= at + 2 && b[at] === 255 && (b[at + 1] & 224) === 224 && (b[at + 1] & 24) !== 8;
30563
30914
  var FLAC_KEEPS = /* @__PURE__ */ new Set([0, 3]);
@@ -30600,40 +30951,49 @@ function oggCrc(page) {
30600
30951
  return crc;
30601
30952
  }
30602
30953
  /**
30603
- * How a codec's comment header (its second packet) is laid out: its magic's length, and whether a framing bit
30604
- * follows its comments (Vorbis). Known by the first bytes of its first packet.
30605
- */
30606
- var OGG_CODECS = [
30607
- {
30608
- head: "OpusHead",
30609
- comments: "OpusTags",
30610
- framing: false
30611
- },
30612
- {
30613
- head: "vorbis",
30614
- comments: "vorbis",
30615
- framing: true
30616
- },
30617
- {
30618
- head: "Speex ",
30619
- comments: "",
30620
- framing: false
30621
- }
30622
- ];
30623
- /**
30624
30954
  * A comment header with no comment: its magic and vendor kept, its count 0 (and Vorbis's framing bit set), the rest
30625
- * zeros: padding after the comments, which Opus says may be there and Vorbis's and Speex's readers do not read.
30955
+ * zeros: padding after the comments, which Opus says may be there and Vorbis's, Speex's and Theora's readers do not read.
30626
30956
  */
30627
- function noComments(packet, codec) {
30628
- const magic = codec.comments.length;
30629
- check(text(packet, 0, magic) === codec.comments && packet.length >= magic + 4);
30957
+ function noComments(packet, comments, framing) {
30958
+ const magic = comments.length;
30959
+ check(text(packet, 0, magic) === comments && packet.length >= magic + 4);
30630
30960
  const count = magic + 4 + u32le(packet, magic);
30631
- check(count + 4 + (codec.framing ? 1 : 0) <= packet.length);
30961
+ check(count + 4 + (framing ? 1 : 0) <= packet.length);
30632
30962
  const out = new Uint8Array(packet.length);
30633
30963
  out.set(packet.subarray(0, count));
30634
- if (codec.framing) out[count + 4] = 1;
30964
+ if (framing) out[count + 4] = 1;
30635
30965
  return out;
30636
30966
  }
30967
+ /** A FLAC metadata block that is a whole packet (FLAC in Ogg): kept, or made padding as `flac` makes it. */
30968
+ function noFlacBlock(packet) {
30969
+ check(packet.length >= 4 && packet.length === 4 + (packet[1] << 16 | packet[2] << 8 | packet[3]) && (packet[0] & 127) !== 127);
30970
+ const type = packet[0] & 127;
30971
+ if (FLAC_KEEPS.has(type)) return packet;
30972
+ const out = new Uint8Array(packet.length);
30973
+ out[0] = type === 1 ? packet[0] : packet[0] & 128 | 1;
30974
+ return out;
30975
+ }
30976
+ /** A codec whose second packet is its comment header: its magic, and whether a framing bit follows its comments (Vorbis). */
30977
+ var commentHeader = (head, comments, framing) => ({
30978
+ head,
30979
+ tagged: (_, index) => index === 0,
30980
+ empty: (packet) => noComments(packet, comments, framing)
30981
+ });
30982
+ var OGG_CODECS = [
30983
+ commentHeader("OpusHead", "OpusTags", false),
30984
+ commentHeader("vorbis", "vorbis", true),
30985
+ commentHeader("Speex ", "", false),
30986
+ commentHeader("€theora", "theora", false),
30987
+ {
30988
+ head: "FLAC",
30989
+ tagged: (packet, index) => {
30990
+ if (index) return !(packet[0] & 128);
30991
+ check(packet.length >= 17 && text(packet, 9, 4) === "fLaC");
30992
+ return !(packet[13] & 128);
30993
+ },
30994
+ empty: noFlacBlock
30995
+ }
30996
+ ];
30637
30997
  /**
30638
30998
  * An Ogg file's pages walked: each logical stream's comment header (a chained file has one per link) made one with no
30639
30999
  * comment where it is, across the pages it spans, and those pages' checksums made again.
@@ -30664,13 +31024,14 @@ async function ogg(read, size, patches) {
30664
31024
  const serial = u32le(head, 14);
30665
31025
  if (head[5] & 2) streams.set(serial, {
30666
31026
  packet: 0,
30667
- ranges: []
31027
+ ranges: [],
31028
+ tagged: true
30668
31029
  });
30669
31030
  const stream = streams.get(serial);
30670
31031
  check(!!stream);
30671
31032
  let offset = at + 27 + lacing.length;
30672
31033
  for (const length of lacing) {
30673
- if (stream.packet <= 1 && stream.codec !== null) stream.ranges.push([
31034
+ if (stream.tagged) stream.ranges.push([
30674
31035
  offset,
30675
31036
  offset + length,
30676
31037
  at
@@ -30680,8 +31041,10 @@ async function ogg(read, size, patches) {
30680
31041
  if (stream.packet === 0) {
30681
31042
  const first = await packetOf(stream.ranges);
30682
31043
  stream.codec = OGG_CODECS.find((codec) => text(first, 0, codec.head.length) === codec.head) ?? null;
30683
- } else if (stream.packet === 1 && stream.codec) {
30684
- const emptied = noComments(await packetOf(stream.ranges), stream.codec);
31044
+ stream.tagged = !!stream.codec?.tagged(first, 0);
31045
+ } else if (stream.tagged && stream.codec) {
31046
+ const packet = await packetOf(stream.ranges), emptied = stream.codec.empty(packet);
31047
+ stream.tagged = stream.codec.tagged(packet, stream.packet);
30685
31048
  let from = 0;
30686
31049
  for (const [start, until, page] of stream.ranges) {
30687
31050
  if (!pages.has(page)) pages.set(page, []);
@@ -30694,7 +31057,7 @@ async function ogg(read, size, patches) {
30694
31057
  }
30695
31058
  at = end;
30696
31059
  }
30697
- for (const stream of streams.values()) check(stream.codec === null || stream.packet > 1);
31060
+ for (const stream of streams.values()) check(!stream.tagged);
30698
31061
  for (const [start, changes] of pages) {
30699
31062
  const head = await read(start, 27), lacing = await read(start + 27, head[26]);
30700
31063
  const end = start + 27 + lacing.length + lacing.reduce((sum, l) => sum + l, 0);
@@ -30729,16 +31092,23 @@ var WAV_SPACE = /* @__PURE__ */ new Set([
30729
31092
  "PAD ",
30730
31093
  "FLLR"
30731
31094
  ]);
30732
- async function wav(read, size, patches) {
31095
+ /** A WAV's chunks from its `WAVE`; an RF64 or BW64 one (`rf64`) has its `ds64` first, which says `data`'s size when its own is all ones. */
31096
+ async function wav(read, size, rf64, patches) {
31097
+ let dataSize;
31098
+ if (rf64) {
31099
+ const ds64 = await read(12, 24);
31100
+ check(text(ds64, 0, 4) === "ds64" && u32le(ds64, 4) >= 28);
31101
+ dataSize = u32le(ds64, 16) + u32le(ds64, 20) * 2 ** 32;
31102
+ }
30733
31103
  const count = counter();
30734
31104
  for (let at = 12; at + 8 <= size;) {
30735
31105
  count();
30736
31106
  const head = await read(at, 8);
30737
- const id = text(head, 0, 4), length = u32le(head, 4);
30738
- let end = at + 8 + length + (length & 1);
31107
+ const id = text(head, 0, 4), length = id === "data" && dataSize !== void 0 && u32le(head, 4) === 4294967295 ? dataSize : u32le(head, 4);
31108
+ let end = at + 8 + length + length % 2;
30739
31109
  if (id === "data") end = length ? Math.min(end, size) : size;
30740
31110
  else check(at + 8 + length <= size);
30741
- if (!WAV_KEEPS.has(id)) {
31111
+ if (!WAV_KEEPS.has(id) && !(rf64 && at === 12)) {
30742
31112
  if (!WAV_SPACE.has(id)) patches.push({
30743
31113
  start: at,
30744
31114
  end: at + 4,
@@ -30793,8 +31163,12 @@ var INFO_KEEPS = /* @__PURE__ */ new Set([
30793
31163
  var INFO_ZEROED = /* @__PURE__ */ new Set([19840, 22337]);
30794
31164
  var TRACK_ENTRY = 174;
30795
31165
  var TRACK_NAME = 21358;
31166
+ var CODEC_ID = 134;
31167
+ var CODEC_PRIVATE = 25506;
30796
31168
  var SEEK = 19899;
30797
31169
  var SEEK_ID = 21419;
31170
+ /** The codecs whose CodecPrivate is their Ogg headers Xiph-laced: the second a comment header, its magic, and whether a framing bit follows its comments. */
31171
+ var XIPH_PRIVATE = /* @__PURE__ */ new Map([["A_VORBIS", ["vorbis", true]], ["V_THEORA", ["theora", false]]]);
30798
31172
  /** The element whose header is at `at` of `b` (`base` its offset in the file); one of unknown size ends at `limit`. */
30799
31173
  function element(b, at, limit, base = 0) {
30800
31174
  check(at < b.length);
@@ -30853,11 +31227,45 @@ function childrenOf(b, parent) {
30853
31227
  return found;
30854
31228
  }
30855
31229
  /**
31230
+ * A track's CodecPrivate (`b`, changed in it) by its codec: a Vorbis or Theora track's headers (their count less one,
31231
+ * each size but the last's in Xiph lacing, them) with a comment header that has no comment, its sizes kept; a FLAC
31232
+ * track's `fLaC` and metadata blocks as a FLAC's, any byte after the last zeroed. Another codec's is kept as it is.
31233
+ */
31234
+ async function noPrivateTags(b, codec) {
31235
+ const xiph = XIPH_PRIVATE.get(codec);
31236
+ if (xiph) {
31237
+ check(b.length >= 1 && b[0] === 2);
31238
+ let at = 1;
31239
+ const sizes = [];
31240
+ while (sizes.length < 2) {
31241
+ let size = 0;
31242
+ for (let byte = 255; byte === 255; size += byte) {
31243
+ check(at < b.length);
31244
+ byte = b[at++];
31245
+ }
31246
+ sizes.push(size);
31247
+ }
31248
+ const start = at + sizes[0], end = start + sizes[1];
31249
+ check(end <= b.length);
31250
+ b.set(noComments(b.subarray(start, end), ...xiph), start);
31251
+ } else if (codec === "A_FLAC") {
31252
+ check(b.length >= 4 && text(b, 0, 4) === "fLaC");
31253
+ const patches = [];
31254
+ const end = await flac(async (offset, length) => {
31255
+ check(offset >= 0 && length >= 0 && offset + length <= b.length);
31256
+ return b.subarray(offset, offset + length);
31257
+ }, b.length, 0, patches);
31258
+ for (const patch of patches) if (patch.bytes) b.set(patch.bytes, patch.start);
31259
+ else b.fill(0, patch.start, patch.end);
31260
+ b.fill(0, end);
31261
+ }
31262
+ }
31263
+ /**
30856
31264
  * A top-level element of a segment read whole and changed in it: Info without its title, date and file names (its
30857
- * muxer's and writing app's names zeroed), Tracks without their names, a SeekHead without the entries for what
30858
- * became Void. A CRC-32 in them, wrong once they changed, becomes Void too.
31265
+ * muxer's and writing app's names zeroed), Tracks without their names and the comments in their CodecPrivate, a
31266
+ * SeekHead without the entries for what became Void. A CRC-32 in them, wrong once they changed, becomes Void too.
30859
31267
  */
30860
- function stripTopLevel(b) {
31268
+ async function stripTopLevel(b) {
30861
31269
  const top = element(b, 0, b.length);
30862
31270
  check(!top.unknown && top.end === b.length);
30863
31271
  for (const child of childrenOf(b, top)) {
@@ -30866,7 +31274,11 @@ function stripTopLevel(b) {
30866
31274
  if (INFO_ZEROED.has(child.id)) b.fill(0, child.body, child.end);
30867
31275
  else if (!INFO_KEEPS.has(child.id) && child.id !== VOID) voidIn(b, child);
30868
31276
  } else if (top.id === TRACKS && child.id === TRACK_ENTRY) {
30869
- for (const part of childrenOf(b, child)) if (part.id === TRACK_NAME || part.id === CRC32) voidIn(b, part);
31277
+ const parts = childrenOf(b, child), ids = parts.filter((part) => part.id === CODEC_ID);
31278
+ check(ids.length <= 1);
31279
+ const codec = ids[0] ? text(b, ids[0].body, ids[0].end - ids[0].body).replace(/\0+$/, "") : "";
31280
+ for (const part of parts) if (part.id === TRACK_NAME || part.id === CRC32) voidIn(b, part);
31281
+ else if (part.id === CODEC_PRIVATE) await noPrivateTags(b.subarray(part.body, part.end), codec);
30870
31282
  } else if (top.id === SEEK_HEAD && child.id === SEEK) {
30871
31283
  const target = childrenOf(b, child).find((part) => part.id === SEEK_ID);
30872
31284
  let id = 0;
@@ -30925,7 +31337,7 @@ async function matroska(source, read, patches) {
30925
31337
  check(!el.unknown && el.end <= top.end);
30926
31338
  if (el.id === INFO || el.id === TRACKS || el.id === SEEK_HEAD) {
30927
31339
  const bytes = (await read(el.start, el.end - el.start)).slice();
30928
- stripTopLevel(bytes);
31340
+ await stripTopLevel(bytes);
30929
31341
  patches.push({
30930
31342
  start: el.start,
30931
31343
  end: el.end,
@@ -30958,7 +31370,11 @@ async function audioMetadataPatches(file, mime) {
30958
31370
  throw error;
30959
31371
  }
30960
31372
  else if (text(head, 0, 4) === "OggS") await ogg(read, size, patches);
30961
- else if (head.length >= 12 && text(head, 0, 4) === "RIFF" && text(head, 8, 4) === "WAVE") await wav(read, size, patches);
31373
+ else if (head.length >= 12 && [
31374
+ "RIFF",
31375
+ "RF64",
31376
+ "BW64"
31377
+ ].includes(text(head, 0, 4)) && text(head, 8, 4) === "WAVE") await wav(read, size, text(head, 0, 4) !== "RIFF", patches);
30962
31378
  else if (text(head, 0, 4) === "Eߣ") await matroska(source, read, patches);
30963
31379
  else if (text(head, 0, 4) === "fLaC") await trailingTags(read, size, await flac(read, size, 0, patches), patches);
30964
31380
  else if (isId3(head) || isFrame(head, 0)) {
@@ -30970,7 +31386,8 @@ async function audioMetadataPatches(file, mime) {
30970
31386
  }
30971
31387
  if (at + 4 <= size && text(await read(at, 4), 0, 4) === "fLaC") at = await flac(read, size, at, patches);
30972
31388
  await trailingTags(read, size, at, patches);
30973
- } else return void 0;
31389
+ } else if (MPEG_AUDIO.has(baseMime(mime))) await trailingTags(read, size, 0, patches);
31390
+ else return void 0;
30974
31391
  if (!patches.length) return void 0;
30975
31392
  patches.sort((a, b) => a.start - b.start);
30976
31393
  for (let i = 1; i < patches.length; i++) check(patches[i].start >= patches[i - 1].end);
@@ -32456,45 +32873,35 @@ function seqDate(seq) {
32456
32873
  return Number.isNaN(date.getTime()) ? (/* @__PURE__ */ new Date(0)).toISOString() : date.toISOString();
32457
32874
  }
32458
32875
  /**
32459
- * Resolves a did:dht through Pkarr relays: one GET per relay, in turn, the next only when one has
32460
- * nothing, fails or serves a packet that does not check out. The answer is bounded to a BEP44 item,
32461
- * its signature checked against the DID's key and its records parsed strictly. A deactivated DID
32876
+ * Resolves a did:dht through Pkarr relays: one GET to each, all at once, and the newest packet that
32877
+ * checks out wins (the highest sequence number; on a tie, the relay listed first), so a relay holding
32878
+ * an older version cannot bring back a removed key or undo a deactivation. Each answer is bounded to
32879
+ * a BEP44 item, its signature checked against the DID's key and its records parsed strictly; a relay
32880
+ * that has nothing, fails or serves a packet that does not check out does not count. A deactivated DID
32462
32881
  * resolves (`metadata.deactivated`); everything else that goes wrong throws a `DidDhtError`.
32463
32882
  */
32464
32883
  async function resolveDidDht(did, options) {
32465
32884
  const { z32 } = didDhtKey(did);
32466
32885
  const relays = [...new Set((options.relays ?? DEFAULT_RELAYS).map(normalizeRelayUrl).filter((r) => r !== null))];
32467
32886
  if (relays.length === 0) throw new DidDhtError("No Pkarr relay to ask", "unreachable");
32887
+ options.signal?.throwIfAborted();
32888
+ const responses = await Promise.all(relays.map((relay) => options.fetch(`${relay}/${z32}`, {
32889
+ maxBytes: DID_DHT_MAX_PAYLOAD,
32890
+ signal: options.signal,
32891
+ redirect: "error"
32892
+ }).catch(() => void 0)));
32893
+ options.signal?.throwIfAborted();
32468
32894
  let notFound = false;
32469
32895
  let refused;
32470
- for (const relay of relays) {
32471
- options.signal?.throwIfAborted();
32472
- let response;
32473
- try {
32474
- response = await options.fetch(`${relay}/${z32}`, {
32475
- maxBytes: DID_DHT_MAX_PAYLOAD,
32476
- signal: options.signal,
32477
- redirect: "error"
32478
- });
32479
- } catch (error) {
32480
- if (options.signal?.aborted) throw error;
32481
- continue;
32482
- }
32483
- if (response.status === 404) {
32484
- notFound = true;
32485
- continue;
32486
- }
32487
- if (response.status !== 200) continue;
32896
+ let newest;
32897
+ for (const [i, relay] of relays.entries()) {
32898
+ const response = responses[i];
32899
+ if (response?.status === 404) notFound = true;
32900
+ if (response?.status !== 200) continue;
32488
32901
  try {
32489
32902
  const opened = openDidDhtPayload(did, response.bytes);
32490
- return {
32491
- document: opened.document,
32492
- metadata: {
32493
- versionId: opened.seq.toString(),
32494
- updated: seqDate(opened.seq),
32495
- ...opened.deactivated ? { deactivated: true } : {},
32496
- ...opened.types ? { types: opened.types } : {}
32497
- },
32903
+ if (!newest || opened.seq > newest.seq) newest = {
32904
+ ...opened,
32498
32905
  relay
32499
32906
  };
32500
32907
  } catch (error) {
@@ -32502,6 +32909,16 @@ async function resolveDidDht(did, options) {
32502
32909
  refused = error;
32503
32910
  }
32504
32911
  }
32912
+ if (newest) return {
32913
+ document: newest.document,
32914
+ metadata: {
32915
+ versionId: newest.seq.toString(),
32916
+ updated: seqDate(newest.seq),
32917
+ ...newest.deactivated ? { deactivated: true } : {},
32918
+ ...newest.types ? { types: newest.types } : {}
32919
+ },
32920
+ relay: newest.relay
32921
+ };
32505
32922
  if (refused) throw refused;
32506
32923
  if (notFound) throw new DidDhtError("No document is published for this did:dht", "not-found");
32507
32924
  throw new DidDhtError("No Pkarr relay answered for this did:dht", "unreachable");
@@ -35009,6 +35426,17 @@ function indexOf(points, words, from) {
35009
35426
  }
35010
35427
  return -1;
35011
35428
  }
35429
+ //#endregion
35430
+ //#region ../core/src/catchUp.ts
35431
+ /**
35432
+ * Frames of one catch-up answer in a slice, two slices at most not handled yet by the member's app: the next goes once
35433
+ * it handled the one before the last. An app holds 64 frames waiting at most before 2026-10-07 (more ends the session),
35434
+ * and a member back in a busy group was handed over a hundred at once (a private group's answer, WISP 902; a
35435
+ * community's, WISP 903: 258 from a full store).
35436
+ */
35437
+ var CATCH_UP_SLICE = 16;
35438
+ /** Between two slices, when the member's app cannot say it handled one (`handled` resolves `false`). */
35439
+ var CATCH_UP_PAUSE_MS = 500;
35012
35440
  /**
35013
35441
  * Catch-up answers, a slice at a time (`CATCH_UP_SLICE`), with two slices at most not handled yet by the member's app
35014
35442
  * (`hooks.handled`): the next once it handled the one before the last, so the slices follow each other without a round
@@ -35087,6 +35515,10 @@ var CatchUpAnswers = class {
35087
35515
  }
35088
35516
  })();
35089
35517
  }
35518
+ /** Whether an answer to `to` still has frames to send, or sent ones its app has not said it handled yet (`hooks.handled`). */
35519
+ busy(to) {
35520
+ return this.going.has(to) || !!this.onTheirWay.get(to)?.size;
35521
+ }
35090
35522
  /** The next slice of `rest` to `to`, as sent: undefined, and nothing left, when the edge did not take one. */
35091
35523
  sendSlice(to, rest) {
35092
35524
  const slice = rest.splice(0, 16);
@@ -35197,6 +35629,11 @@ var GROUP_READ_NOTE = `Everyone in the group can read everything sent while they
35197
35629
  */
35198
35630
  var ANSWER_WINDOW_MS$1 = 5e3;
35199
35631
  /**
35632
+ * How long a name an edge took away can still come back when I am taken out of the group (`nameKept`): the commit
35633
+ * that removed me comes over the admin's kept edge right after it opens, within the minute that edge stays open.
35634
+ */
35635
+ var UNNAMED_KEPT_MS = 6e4;
35636
+ /**
35200
35637
  * One member's messages (or edits) taken: its whole log handed back at once twice over (`AUTHOR_BURST`: an edge opening
35201
35638
  * hears it, with what the member says live beside it, and the edits its app says again), then
35202
35639
  * `GROUP_LIMITS.messagesPerAuthor` and `messageBytesPerAuthor` per `messageWindowMs`, as a community's `MessagePace`.
@@ -35630,6 +36067,12 @@ var GroupSession = class {
35630
36067
  * said it (`heardName`). In memory only; the records held start it.
35631
36068
  */
35632
36069
  nickAt = /* @__PURE__ */ new Map();
36070
+ /**
36071
+ * Member → the name an edge's empty one took away a moment ago (`setNick`), and when. The admin that removed me while
36072
+ * I was away says no name on the edge it kept to tell me, as its app opens it, and the commit that removes me comes
36073
+ * right after on that edge: that name comes back for the history I keep (`nameKept`). In memory only.
36074
+ */
36075
+ unnamed = /* @__PURE__ */ new Map();
35633
36076
  /** The version of my name record last said to every member (`sayName`). In memory only: said again once per start. */
35634
36077
  nameSaid;
35635
36078
  /** New name records taken per member, a few a minute (`GROUP_LIMITS.namesPerMember`). In memory only. */
@@ -36193,7 +36636,12 @@ var GroupSession = class {
36193
36636
  pruneRelay() {
36194
36637
  if (this.state.relay?.length) this.state.relay = this.state.relay.filter((f) => this.handsOn(f.s));
36195
36638
  if (this.onRows?.length) this.onRows = this.onRows.filter((f) => this.handsOn(f.s));
36196
- if (this.state.relayEdits?.length) this.state.relayEdits = this.state.relayEdits.filter((f) => rosterHas(this.roster, f.s) || this.isRemovalEdit(f));
36639
+ if (this.state.relayEdits?.length) this.state.relayEdits = this.state.relayEdits.filter((f) => rosterHas(this.roster, f.s) || this.carriedUnread(f) || this.isRemovalEdit(f));
36640
+ }
36641
+ /** An edit of an epoch I was not a member of (let in after it): kept and handed on unread (WISP 902 § Edits, "Carried unread"). */
36642
+ carriedUnread(frame) {
36643
+ const commit = this.state.chain[frame.e];
36644
+ return !!commit && !rosterHas(commit.m, this.myKey);
36197
36645
  }
36198
36646
  /** Whether a kept edit is a removal (WISP 400 § Delete for everyone): its box, under its epoch's key, says `rm`. */
36199
36647
  isRemovalEdit(frame) {
@@ -36340,6 +36788,16 @@ var GroupSession = class {
36340
36788
  this.waiting = [];
36341
36789
  this.waitingBytes = 0;
36342
36790
  this.pendingCommits.clear();
36791
+ this.nameKept();
36792
+ }
36793
+ /**
36794
+ * Out of the group: a name an edge took away a moment before comes back, as the history I keep still shows it. The
36795
+ * edge the admin kept to tell me I was removed says no name as it opens, just before the commit that removed me.
36796
+ */
36797
+ nameKept() {
36798
+ const now = this.now();
36799
+ for (const [key, { nick, at }] of this.unnamed) if (now - at <= UNNAMED_KEPT_MS && !this.state.nicks[key]) this.state.nicks[key] = nick;
36800
+ this.unnamed.clear();
36343
36801
  }
36344
36802
  /**
36345
36803
  * Encrypts and signs a text, keeps it for catch-up and sends it to every other member. `mentions`: places of the
@@ -36846,10 +37304,17 @@ var GroupSession = class {
36846
37304
  setNick(key, nick) {
36847
37305
  return this.serialize(async () => {
36848
37306
  const clean = sanitizeNick(nick);
37307
+ if (!clean && this.state.status !== "active") return;
36849
37308
  this.nickAt.set(key, this.now());
36850
- if ((this.state.nicks[key] ?? void 0) === clean) return;
37309
+ const was = this.state.nicks[key];
37310
+ if ((was ?? void 0) === clean) return;
36851
37311
  if (clean) this.state.nicks[key] = clean;
36852
37312
  else delete this.state.nicks[key];
37313
+ if (!clean && was) this.unnamed.set(key, {
37314
+ nick: was,
37315
+ at: this.now()
37316
+ });
37317
+ else this.unnamed.delete(key);
36853
37318
  if (key === this.myKey) await this.persist();
36854
37319
  else this.persistSoon();
36855
37320
  this.hooks.changed();
@@ -37197,9 +37662,9 @@ var GroupSession = class {
37197
37662
  if (!commit || !rosterHas(commit.m, raw.s)) return;
37198
37663
  if (!(this.state.relayEdits ?? []).some((f) => f.s === raw.s && f.e === raw.e && f.n === raw.n && f.v >= raw.v) && !this.paced(this.editPace, raw.s, raw.c.length + 400, raw.s !== from && (this.awaitsAnswer(from) || waited))) return;
37199
37664
  if (!rosterHas(commit.m, this.myKey)) {
37200
- if (member && this.keepEdit(raw)) {
37665
+ if (this.keepEdit(raw)) {
37201
37666
  this.persistSoon();
37202
- this.took(cleanEdit(raw));
37667
+ if (member) this.took(cleanEdit(raw));
37203
37668
  }
37204
37669
  return;
37205
37670
  }
@@ -37593,7 +38058,7 @@ var GroupSession = class {
37593
38058
  answer.push(...edits.slice(-GROUP_LIMITS.handOnEdits));
37594
38059
  }
37595
38060
  const handed = this.leaversHanded.get(from);
37596
- const gone = (this.state.relayEdits ?? []).filter((f) => !rosterHas(this.roster, f.s) && readable(f) && !handed?.has(editKey(f)));
38061
+ const gone = (this.state.relayEdits ?? []).filter((f) => !rosterHas(this.roster, f.s) && (readable(f) || carrier && !!this.state.chain[f.e]) && !handed?.has(editKey(f)));
37597
38062
  answer.push(...gone.slice(-GROUP_LIMITS.handOnEdits));
37598
38063
  answer.push(...metas.map((m) => m.frame));
37599
38064
  answer.push(...this.namesFor(from, frame.nt));
@@ -42539,6 +43004,6 @@ function x401ApprovalDigest(subject) {
42539
43004
  return toBase64Url(sha256(utf8Encode(canonical)));
42540
43005
  }
42541
43006
  //#endregion
42542
- export { COMMUNITY_LIMITS as $, readTurnBody as $C, inviteOwnership as $S, concatBytes as $T, QUICK_REDIAL_MS as $_, ANSWERS_REFUSED_PAUSE_MS as $a, REQUEST_LABEL as $b, WAKE_CALL_INTERVAL_MS as $c, validRingKey as $d, LIVE_POLL_MS as $f, UNUSED_INVITE_READS_PER_MINUTE as $g, sealSecret as $h, isSparkAddress as $i, APP_RESUME_GRACE_MS as $l, appCardUrl as $m, MessageRefusal as $n, readGroupWant as $o, LINK_MAX_CHARS as $p, DidError as $r, refusalText as $s, GROUP_EDIT_TEXT_BYTES as $t, IDENTITY_FRAME_LIMIT as $u, HANDOFF_PAKE as $v, setLinkTraceSink as $w, appRefPublisher as $x, sameDigest as $y, readX401ProofResponseHeader as A, TURN_VISIBLE_MS as AC, createContactLink as AS, identityFromSeed as AT, CHUNK_FLAG_END as A_, findBolt11 as Aa, FLOOD_PER_DAY as Ab, parseTypingActivity as Ac, lastSharedWithMe as Ad, WELL_KNOWN_PATH as Af, DIRECT_PEERS as Ag, commitHash as Ah, jwkThumbprint as Ai, vapidAuthorization as Al, validReactionNumber as Am, parseGroupMetaBody as An, WAKE_ANSWER_GRACE_MS as Ao, formatVideoDuration as Ap, parseAtprotoDidDocument as Ar, mergeBeacon as As, knockRecords as At, parseSessionCapabilities as Au, encodeServices as Av, GROUP_BURST_ONE_LINK as Aw, APP_ICON_PATH as Ax, handoffReleaseFrame as Ay, APP_STORE_KINDS as B, TURN_NAME_BYTES as BC, readDeviceInvite as BS, MAX_AVATAR_LENGTH as BT, wrapDataChannel as B_, audioMetadataPatches as Ba, planKnocks as Bb, PIN_CLOCK_SKEW_MS as Bc, proofCapability as Bd, recordsFromTxt as Bf, IDLE_THRESHOLD as Bg, verifyCommit as Bh, TEST_USDT_FAUCET_AMOUNT as Bi, appRangeEndFrame as Bl, ACTIVE_TASK_STATUSES as Bm, SSH_PUBLIC_KEY_MAX as Bn, engineText as Bo, EDIT_SEND_LIMIT as Bp, parseAtprotoDidKey as Br, CALL_RATE_WINDOW_MS as Bs, groupWakes as Bt, CAPS_REFRESH_MS as Bu, HANDOFF_BUSY_REASONS as Bv, RelaysFailedError as Bw, isAppLicense as Bx, readHandoffAck as By, buildX401TokenObject as C, unsignedDeviceTransports as CC, previewable as CS, signRelayPayload as CT, resolveTargetUrl as C_, parseInvoiceCallback as Ca, enrollHelloFrame as Cb, TYPING_RATE_WINDOW_MS as Cc, newIdentityBinding as Cd, DNS_LABEL as Cf, GATHER_STALL_MS as Cg, GROUP_VERSION_LARGE as Ch, decodeDidDhtPacket as Ci, PUSH_SERVICE_HOSTS as Cl, queueReaction as Cm, groupMetaPicture as Cn, REDESCRIBED_GRACE_MS as Co, voiceDownloadName as Cp, ATPROTO_PROOF_SCOPE as Cr, beaconKeys as Cs, KNOCK_TTL_MS as Ct, SESSION_CAPABILITIES_FRAME as Cu, isEmptyLinkPacket as Cv, CHAT_RESERVE_MOST_SHARE as Cw, seenEntry as Cx, handoffFileMissingFrame as Cy, readX401ProofRequest as D, TURN_PUT_WINDOW_MS as DC, readCanonicalJson as DS, readDnsName as DT, viewerServicePolicy as D_, resolveLightningDestination as Da, readEnrollGrant as Db, TYPING_TIMEOUT_MS as Dc, verifyIdentityPresentation as Dd, DOMAIN_METHODS as Df, STALLED_EVIDENCE_MS as Dg, MEMBER_KEY as Dh, didDhtRecords as Di, encryptPushPayload as Dl, reactionIsNewer as Dm, keepPastGroupMeta as Dn, RTC_UNSTARTED_MS as Do, voicePeaksOf as Dp, checkAtprotoProofRecord as Dr, hubRank as Ds, entryParams as Dt, TYPING_CAPABILITY as Du, MAX_SERVICES as Dv, DEPARTED_READS as Dw, APP_CLIENTS as Dx, handoffManifestFrames as Dy, isX401Protocol as E, webCryptoSigner as EC, canonicalJsonBytes as ES, encodeTxtPacket as ET, viewerResponseHeaders as E_, requestLnurlInvoice as Ea, formatEnrollDigits as Eb, TYPING_STATUS_MAX as Ec, signIdentityPresentation as Ed, DOMAIN_MAX_RECORDS as Ef, REANSWERS as Eg, MAX_GROUP_MEMBERS as Eh, didDhtKey as Ei, decryptPushPayload as El, reactionFrame as Em, groupName as En, RTC_SIGNAL_RECEIVE_LIMIT as Eo, voiceLevelsOf as Ep, atprotoProofRkey as Er, freshHubs as Es, encodeGroupEntryLink as Et, SessionCapabilities as Eu, LEGACY_SERVICES as Ev, DEFAULT_RELAYS as Ew, APP_BUNDLE_MAGIC as Ex, handoffHelloFrame as Ey, appRevocationFor as F, TOMBSTONE_TURN as FC, DEVICE_INVITE_OWN_DEVICE as FS, decrypt as FT, decodeChunk as F_, isFederationId as Fa, REOPEN_BELOW as Fb, typingFrame as Fc, STORAGE_ROOT as Fd, encodeDnsQuery as Ff, DAEMON_WATCH_PEER_IDLE_MS as Fg, rosterAdmin as Fh, EVM_TEST_CHAINS as Fi, APP_RANGE_LIMITS as Fl, groupReplyAuthor as Fm, verifyGroupMetaSignature as Fn, parsePaymentNetworks as Fo, EDIT_BUFFER_MAX as Fp, decodeAtprotoCommit as Fr, readBeacon as Fs, GROUP_WAKE_GROUP_WINDOW_MS as Ft, SESSION_RECEIVE_PENDING as Fu, servicesToWire as Fv, HEDGE_MS as Fw, appViewOf as Fx, handoffVerifiedMessage as Fy, readAppStore as G, TURN_SLOTS as GC, INVITE_VERSION as GS, dropLoneJoiners as GT, buildDataSdp as G_, videoMetadataPatches as Ga, CONTACT_RECORD_TTL as Gb, parsePinFrame as Gc, storageProofPath as Gd, wellKnownUrl as Gf, OFFER_STEP_MAX as Gg, decryptText as Gh, assertWholeSats as Gi, isServeId as Gl, PR_CHECKS as Gm, sshFingerprint as Gn, GROUP_VERSION_FILES as Go, dhtEditId as Gp, verifyAtprotoSignature as Gr, parsePairedCallFrame as Gs, GROUP_READ_NOTE as Gt, capsDescriptors as Gu, HANDOFF_FILE_MISSING as Gv, TURN_SOURCE_TIMEOUT_MS as Gw, readAppBundleAsync as Gx, readHandoffFileFrame as Gy, checkAppListing as H, TURN_REV_LIMIT as HC, INVITE_HRP as HS, jpegSize$1 as HT, DATA_CHANNEL_LABEL as H_, NO_VIDEO_METADATA as Ha, takeRequest as Hb, PIN_LIMITS as Hc, proofStatement as Hd, recordsName as Hf, MAX_DHT_TEXT_BYTES as Hg, GROUP_PROFILE as Hh, WALLET_NETWORKS as Hi, appRangeGetFrame as Hl, BUTTON_STYLES as Hm, parseSshPublicKey as Hn, PairingTracker as Ho, MAX_REMOVAL_NUMBER as Hp, readAtprotoCid as Hr, MAX_PAIRED_CALL_SIGNAL as Hs, parseGroupWakeFrame as Ht, CapsKeys as Hu, HANDOFF_CANCEL_REASONS as Hv, SIGNALING_WINDOW_MS as Hw, isAppUrl as Hx, readHandoffCancel as Hy, appStoreDecision as I, TURN_BODY_BYTES as IC, createDeviceInvite as IS, encrypt as IT, decodeControl as I_, parseCashuRequestPayload as Ia, clearMissed as Ib, typingKindOf as Ic, emptyProofLedger as Id, isPublicAddress as If, DEPARTED_READ_MS as Ig, rosterHas as Ih, ONCHAIN_PROVIDER as Ii, AppRanges as Il, pairedReplyAuthor as Im, wrapGroupMeta as In, publishFailure as Io, EDIT_BUFFER_MS as Ip, decodeDagCbor as Ir, readBeaconHead as Is, GROUP_WAKE_MEMBER_INTERVAL_MS as It, CAPS_ISSUED_BACK_MS as Iu, viewerTag as Iv, PREVIOUS_DEFAULT_RELAYS as Iw, assembleAppBundle as Ix, handoffVersions as Iy, GROUP_TYPING_FRAME as J, TurnRecordError as JC, createLink as JS, sanitizeNick as JT, parseRtcSignal as J_, PICTURE_METADATA_LIMITS as Ja, KNOCK_SLOT_LABEL as Jb, pinIsNewer as Jc, verifyPeerProof as Jd, DHT_FILE_TOO_LARGE as Jf, RELAY_POLL_INTERVALS as Jg, epochKeys as Jh, parsePaymentAmount as Ji, APP_DATA_MAX_BYTES as Jl, ROUTINE_STATES as Jm, verifySshSignature as Jn, fetchesByItself as Jo, parseEditFrame as Jp, DID_GHOSTLY_SERVICE as Jr, FILE_FRAMES as Js, chainPieces as Jt, encodePacketTransports as Ju, HANDOFF_HELLO as Jv, WRITE_FIRST_MS as Jw, APP_NAME as Jx, readHandoffManifest as Jy, readAppStoreSteps as K, TURN_TTL as KC, OwnInviteError as KS, hasVisible as KT, extractRtcParams as K_, withoutVideoMetadata as Ka, ContactRequestError as Kb, parsePinnedFrame as Kc, validExternalKey as Kd, ACTIVE_DHT_POLL_MS as Kf, PRESENCE_HEARTBEAT as Kg, edgeParams as Kh, formatPaymentAmount as Ki, parseAppRangeFrame as Kl, PR_STATES as Km, sshKeyDigestHex as Kn, GROUP_WANT_FRAME as Ko, editFrame as Kp, DID_DOCUMENT_MAX_BYTES as Kr, ChatFiles as Ks, GroupSession as Kt, dialDescriptors as Ku, HANDOFF_FILE_REQUEST as Kv, WATCH_SHARE as Kw, sha256Paced as Kx, readHandoffHave as Ky, appUpdateDecision as L, TURN_LABEL as LC, deviceInviteJoinerKeyZ32 as LS, generateEncryptionKey as LT, encodeChunk as L_, parseFedimintRequestPayload as La, endedRequests as Lb, COMMUNITY_PIN_FRAME as Lc, importedProof as Ld, nip05RootKey as Lf, DHT_POLL_INTERVALS as Lg, signCommit as Lh, PaymentPreflightError as Li, appRangeCancelFrame as Ll, readReply as Lm, SSHSIG_MAX_ARMOR as Ln, ENGINE_ERRORS as Lo, EDIT_FRAME as Lp, encodeDagCbor as Lr, readLobby as Ls, GROUP_WAKE_RECEIVE_LIMIT as Lt, CAPS_LABEL as Lu, HANDOFF_ACK as Lv, RELAY_REQUESTS_PER_MINUTE as Lw, buildAppBundle as Lx, isHandoffPartName as Ly, readX401ProofResultHeader as M, keptAtEqualSequence as MC, readContactLink as MS, publicKeyFromZ32 as MT, LIMITS as M_, cashuRequestPayload as Ma, MAX_MISSED as Mb, plainStatusLine as Mc, PROOF_CAPABILITY as Md, dnsProofName as Mf, directBlocked as Mg, expectedRoster as Mh, resolveDidDht as Mi, APP_RANGE_DATA_KIND as Ml, PAIRED_REPLY_AUTHORS as Mm, parseGroupMetaStatement as Mn, pairedEditFits as Mo, isVideoMime as Mp, AtprotoCid as Mr, newerHead as Ms, readKnocks as Mt, PAIRED_PROFILE as Mu, isViewerTag as Mv, GROUP_RATION_WINDOW_MS as Mw, APP_SCREENSHOTS_DIR as Mx, handoffRetryAfter as My, x401AnswerableRequests as N, turnPutSummary as NC, DEVICE_INVITE_BYTES as NS, sign as NT, MAX_CHUNK_PAYLOAD_BYTES as N_, fedimintRequestPayload as Na, MAX_WAITING as Nb, sanitizeTypingStatus as Nc, PeerProofs as Nd, domainTxtRecord as Nf, symmetricNat as Ng, parseGroupCommit as Nh, signDidDhtPacket as Ni, APP_RANGE_ERRORS as Nl, REPLY_ID as Nm, parseGroupMetaTag as Nn, pairedMessageFits as No, parseVideoMeta as Np, AtprotoProofError as Nr, pickHubs as Ns, GROUP_WAKE_FRAME as Nt, PairedSession as Nu, serviceIdFromName as Nv, GROUP_SIGNALING_ALLOWANCE_SHARE as Nw, APP_VIEWS as Nx, handoffStreamKey as Ny, readX401ProofRequestHeader as O, TURN_RAISE_READ_TIMEOUT_MS as OC, CONTACT_LINK_BYTES as OS, IDENTITY_MEMO_SIZE as OT, webLocalFetch as O_, BOLT11_PATTERN as Oa, readEnrollHello as Ob, TypingReceiver as Oc, IDENTITY_TIMELINE_MAX as Od, DOMAIN_TXT_MAX_BYTES as Of, DIRECT_EVIDENCE_MS as Og, OWN_FRAME_LIMIT as Oh, encodeDidDhtDeactivated as Oi, generateVapidKeys as Ol, readDhtReactions as Om, nextGroupMetaRevision as On, SWITCH_RETIRE_MS as Oo, PLAYABLE_VIDEO as Op, isAtprotoDid as Or, lobbyKeys as Os, groupEntryUrl as Ot, UPGRADE_CAPABILITY as Ou, SERVICES_VERSION as Ov, FRESH_READ_MS as Ow, APP_CLIENT_NAME as Ox, handoffOfferFrame as Oy, addedAppPermissions as P, TOMBSTONE_SEQUENCE as PC, DEVICE_INVITE_LIFETIME_S as PS, verify as PT, PROTOCOL_VERSION as P_, findEndpoint as Pa, NEW_PER_HOUR as Pb, typingActivity as Pc, STORAGE_LIFETIME as Pd, domainWellKnownFile as Pf, AWAITING_PEER_MS as Pg, rememberAlone as Ph, ETHEREUM_USDT as Pi, APP_RANGE_FRAMES as Pl, REPLY_LIMITS as Pm, signGroupMeta as Pn, pairedMessageFrame as Po, EDITED_FRAME as Pp, atprotoCidFor as Pr, rankHubs as Ps, GROUP_WAKE_GROUP_LIMIT as Pt, SESSION_FRAME_MAX as Pu, servicesFromWire as Pv, HEDGE_MISSING_MS as Pw, appDigest as Px, handoffVerifiedFrame as Py, sealGroupTyping as Q, openTurnValue as QC, inviteLink as QS, bytesEqual as QT, PAIRED_CALL_CANDIDATES as Q_, ANSWERS_REFUSED_PAUSES as Qa, REQUEST_CLOCK_SKEW_MS as Qb, DEVICE_WAKE_TTL_SECONDS as Qc, ringEvidence as Qd, DhtDelivery as Qf, TRANSPORTS_GONE_MS as Qg, sealPair as Qh, SPARK_PROVIDER as Qi, APP_RATE_WINDOW_MS as Ql, appCardId as Qm, BIP322_REVISION as Qn, readGroupHave as Qo, validRemovalNumber as Qp, DID_METHODS as Qr, encodeFileData as Qs, GROUP_EDIT_FRAME as Qt, IDENTITY_CLOCK_SKEW as Qu, HANDOFF_OFFER as Qv, relayUrlProblem as Qw, appRef as Qx, readHandoffVerified as Qy, checkAppBeforeRun as R, TURN_LAST_SEQUENCE as RC, deviceInviteJoinerParams as RS, sealedLength as RT, encodeControl as R_, AUDIO_METADATA_LIMITS as Ra, inboxRecord as Rb, GROUP_PIN_FRAME as Rc, isProofAdapter as Rd, normalizeDomain as Rf, EXPECT_PEER_MS as Rg, sortRoster as Rh, SEPOLIA_TEST_USDT as Ri, appRangeChunk as Rl, replySnippet as Rm, SSHSIG_NAMESPACE as Rn, EngineError as Ro, EDIT_RATE_WINDOW_MS as Rp, findInMst as Rr, shouldBeHub as Rs, GroupWakeLimiter as Rt, CAPS_LIMITS as Ru, HANDOFF_ATTEMPTS as Rv, REQUESTS_PER_MINUTE as Rw, checkAppManifest as Rx, newHandoffId as Ry, buildX401ResultArtifact as S, signDeviceTransports as SC, parseImageMeta as SS, readOwnRelayPayload as ST, relativizeLocation as S_, invoiceCallbackUrl as Sa, enrollGrantFrame as Sb, TYPING_RATE_LIMIT as Sc, isIdentityBinding as Sd, readManifest as Sf, GATHER_ATTEMPTS as Sg, GROUP_MEMBER_CAP as Sh, DidDhtError as Si, PUSH_PAD_BYTES as Sl, parseReactionFrame as Sm, groupMetaNewer as Sn, RACE_RELAYED_MS as So, recordingMime as Sp, ATPROTO_PROOF_COLLECTION as Sr, COMMUNITY_TOPOLOGY as Ss, GROUP_ENTRY_PROFILE as St, SERVICES_CAPABILITY as Su, emptyLinkRecords as Sv, CHAT_RESERVE as Sw, requestRecords as Sx, handoffEphemeral as Sy, encodeX401Header as T, seedSigner as TC, canonicalJson as TS, decodeTxtPacket as TT, sanitizeResponseHeaders as T_, parsePayParams as Ta, enrollProofFrame as Tb, TYPING_SEND_LIMIT as Tc, revokesIdentity as Td, DOMAIN_FILE_MAX_BYTES as Tf, OFFER_HOST_GATHER_MS as Tg, MAX_GROUP_CHAIN as Th, didDhtFromPublicKey as Ti, checkPushEndpoint as Tl, reactionEmoji as Tm, groupMetaToHand as Tn, RTC_SIGNAL_RATE_WINDOW_MS as To, voiceLevel as Tp, atprotoProofRecord as Tr, doorHubs as Ts, decodeGroupEntryLink as Tt, STATUS_CARD_CAPABILITY as Tu, HTTP_SERVICE_PROTO as Tv, CHAT_WATCH_SHARE as Tw, APP_BUNDLE_LIMITS as Tx, handoffHaveFrames as Ty, checkAppStoreIndex as U, TURN_SEALED_BYTES as UC, INVITE_LINK_ORIGIN as US, sanitizeAvatar as UT, RTC_SIGNAL_FUTURE_MS as U_, VIDEO_METADATA_LIMITS as Ua, turnOff as Ub, mayPin as Uc, storageProof as Ud, txtValue as Uf, OFFER_FAST_MS as Ug, confirmationMatches as Uh, arkAddressPrefix as Ui, decodeAppRangeData as Ul, CRON_LINE as Um, parseSshSignature as Un, GROUP_FILE_LIMITS as Uo, REMOVED_TEXT as Up, unsignedCommitBytes as Ur, PAIRED_CALL_FRAME as Us, GROUP_LIMITS as Ut, CapsRefusedError as Uu, HANDOFF_DATA as Uv, SLOW_DEMOTE_MS as Uw, pacer as Ux, readHandoffData as Uy, APP_STORE_LIMITS as V, TURN_NO_ACTIVE as VC, DEVICE_INVITE_VERSION as VS, MAX_AVATAR_SIDE as VT, DATA_CHANNEL_ID as V_, withoutAudioMetadata as Va, settleRequest as Vb, PIN_FRAME as Vc, proofHash as Vd, recordsFromWellKnown as Vf, LinkSession as Vg, verifyCommitSignature as Vh, USDT_PUBLIC_RPC as Vi, appRangeErrorFrame as Vl, BUTTON_ID as Vm, SshSigError as Vn, parseEngineError as Vo, MAX_EDITS_PER_MESSAGE as Vp, parseAtprotoVerificationKey as Vr, CALL_RECEIVE_LIMIT as Vs, mentionedMembers as Vt, CapsExchange as Vu, HANDOFF_CANCEL as Vv, SIGNALING_ALLOWANCE_SHARE as Vw, isAppPath as Vx, readHandoffBusy as Vy, readAppListing as W, TURN_SIGNED_BYTES as WC, INVITE_MAX_LENGTH as WS, MAX_NICK_LENGTH as WT, RTC_SIGNAL_MAX_AGE_MS as W_, readingAhead as Wa, CONTACT_ASKER_FRAME as Wb, nextPinNumber as Wc, storageProofBody as Wd, validDomainRecord as Wf, OFFER_LOOK_MS as Wg, confirmationTag as Wh, assertTokenUnits as Wi, encodeAppRangeData as Wl, ITEM_STATES as Wm, sameSshKey as Wn, GROUP_HAVE_FRAME as Wo, RateWindow as Wp, verifyAtprotoRecordProof as Wr, PairedCalls as Ws, GROUP_REACTED_FRAME as Wt, DHT_TEXT_CAPABILITY as Wu, HANDOFF_DONE as Wv, SLOW_MS as Ww, readAppBundle as Wx, readHandoffDone as Wy, groupTypingEpoch as X, firstDeviceSetSecret as XC, encodeGhostlyInvite as XS, trimEndOf as XT, CALL_SIGNAL_FUTURE_MS as X_, stripPictureMetadata as Xa, MAX_SEEN as Xb, pinnedFrame as Xc, ringAuthorization as Xd, DHT_TEXT_BYTES as Xf, SIGNAL_OUT_READS as Xg, openPair as Xh, walletNetworkOf as Xi, APP_PEER_OPEN_MAX as Xl, STATUS_CARD_LIMITS as Xm, legacyMessageHash as Xn, isGroupMessageId as Xo, validEditMessage as Xp, DID_JWS_MAX_LENGTH as Xr, FileUplink as Xs, groupMessageId as Xt, IDENTITY_CHALLENGE_WINDOW as Xu, HANDOFF_LIST_PER_FRAME as Xv, normalizeRelayUrl as Xw, APP_STATEMENT_LIMITS as Xx, readHandoffRelease as Xy, GroupTypingBoard as Y, encodeTurnFields as YC, decodeInviteCode as YS, stripHidden as YT, BURST_RING_MS as Y_, isStrippedPicture as Ya, LINK_RECORD_LABEL as Yb, pinNumberHolds as Yc, RING_LIFETIME as Yd, DHT_MESSAGE_TTL as Yf, SIGNAL_DUE_READS as Yg, newEpochSecret as Yh, validatePaymentTarget as Yi, APP_FRAME as Yl, RUN_RESULTS as Ym, isLegacySignature as Yn, groupFileFallback as Yo, parseEditedFrame as Yp, DID_JWS_ALGS as Yr, FILE_LIMITS as Ys, frameBytes as Yt, parsePacketTransports as Yu, HANDOFF_LATER_BYTES as Yv, currentRelays as Yw, APP_PREFIXES as Yx, readHandoffPake as Yy, openGroupTyping as Z, nextTurnPosition as ZC, encodeInviteCode as ZS, unwrapPasted as ZT, CALL_SIGNAL_MAX_AGE_MS as Z_, withoutPictureMetadata as Za, MAX_SLOT_KNOCKS as Zb, readPin as Zc, ringClaims as Zd, DHT_TEXT_REFUSED as Zf, STALLED_LOOK_MS as Zg, openSecret as Zh, SPARK_NETWORKS as Zi, APP_RATE_LIMIT as Zl, TASK_STATUSES as Zm, verifyBitcoinMessage as Zn, readGroupFileMeta as Zo, validEditNumber as Zp, DID_MAX_LENGTH as Zr, decodeFileData as Zs, COMMUNITY_EDIT_FRAME as Zt, IDENTITY_CHECK_UNAVAILABLE as Zu, HANDOFF_MANIFEST as Zv, readRelayBody as Zw, appFingerprint as Zx, readHandoffTurnFrame as Zy, X401_PROTOCOLS as _, deviceLinkRendezvousSeed as _C, verifyAppStatementBytes as _S, createRelayPayload as _T, VIEWER_DROPPED_HEADERS as __, pubkyHomeserverOf as _a, ENROLL_PROOF as _b, sanitizeStatusText as _c, identityPresentationBytes as _d, HOLD_LIMITS as _f, ratchetUnknownSession as _g, heardTime as _h, strictBase64Url as _i, readWakePayload as _l, REACTION_FRAME as _m, MAX_GROUP_PICTURE_LENGTH as _n, PAIRING_ATTEMPT_MS as _o, downsamplePeaks as _p, u32$1 as _r, meshHubs as _s, shortHash as _t, FILES_BINARY_CAPABILITY as _u, waitForIceGathering as _v, ANSWER_READ_SPACING_MS as _w, mergeContactKnocks as _x, handoffContext as _y, X401_DCQL_LIMITS as a, DEVICES_CAPABILITY as aC, toBase64 as aE, isAppLine as aS, RelayBreaker as aT, unusedInviteWait as a_, PUBKY_PROOF_MAX_BYTES as aa, readSetUpdate as ab, STATUS_FRAME as ac, IDENTITY_MAX_VALIDITY as ad, TRANSPORTS as af, RATCHET_HEADER_BYTES as ag, cardUrl as ah, didWebDocumentUrl as ai, WAKE_ONLINE_BATCH_MS as al, linksIn as am, validEditText as an, DEMOTE_MS as ao, readDhtFile as ap, BitcoinAddressError as ar, SIGNALS_PER_MINUTE as as, communityHasFrame as at, appDataFrame as au, compressSdp as av, turnInstance as aw, STAMP_BITS_MAX as ax, HANDOFF_VERIFIED as ay, buildX401ProofRequest as b, devicePingFrame as bC, imageSize as bS, openRelayPayload as bT, formatLocalTarget as b_, fetchLnurlJson as ba, enrollDigits as bb, TYPING_FRAME as bc, identityStatement as bd, isHoldUrl as bf, DATA_SETTLE_MS as bg, GROUP_ADMIN_OFF_ERROR as bh, DID_DHT_TTL as bi, wakePayload as bl, nextReactionNumber as bm, groupMetaBody as bn, RACE_ANSWERED_MS as bo, isPlayableAudioType as bp, ATPROTO_DECLARED_SCOPE as br, pickMeshHubs as bs, verifyCommunityChainPaced as bt, PIN_CAPABILITY as bu, RECORD_TTL as bv, BACKGROUND_WHILE_SIGNALING as bw, readLinkRecord as bx, handoffDigest as by, readX401DcqlQuery as c, DEVICE_PING_FRAME as cC, utf8Decode as cE, readAppRevocation as cS, budgetRetryMs as cT, VIEWER_GUARD_SCRIPT as c_, isPubkyProofFolder as ca, setUpdateMessage as cb, STATUS_RATE_WINDOW_MS as cc, IDENTITY_REUSE_CHECK_S as cd, dialableIrohRelay as cf, RatchetBox as cg, removedCardText as ch, didWebFileUrl as ci, WAKE_ONLINE_TTL_SECONDS as cl, sanitizePreviewImage as cm, mentionsBytes as cn, FIRST_PAIRING_PACE_MS as co, formatFileSize as cp, decodeAnyBitcoinAddress as cr, SIGNAL_HOLD_MS as cs, communityUntaggedHash as ct, isAppVersion as cu, extractParamsFromSdp as cv, turnPacket as cw, contactAskerHolds as cx, NO_ATTEMPTS as cy, newX401HolderKey as d, deviceEchoFrame as dC, __esmMin as dE, readAppSignature as dS, publishedNowhere as dT, guardViewerAnswer as d_, pubkyProofCapability as da, DEVICE_KINDS as db, StatusReceiver as dc, IDENTITY_SUBJECT as dd, rankTransports as df, ratchetHeard as dg, statusCardText as dh, parseDid as di, WAKE_TTL_SECONDS as dl, forwardedMany as dm, wireMentions as dn, INVITER_DIAL_GRACE_MS as do, sanitizeMime as dp, decodeWitness as dr, groupSignalFrame as ds, encodeCommunityLink as dt, readAppFrame as du, isGlobalIpv4Host as dv, turnSequence as dw, knockSlotIdentity as dx, handoffAckFrame as dy, inviteQrSegments as eC, fromBase64 as eE, appRevocationId as eS, traceLink as eT, UNUSED_INVITE_UPKEEP_MS as e_, sparkAddressKind as ea, sealHandoffPiece as eb, sentWhole as ec, IDENTITY_FRAME_WINDOW_MS as ed, verifyRingAuthorization as ef, sha256Hex as eg, buttonLabelClash as eh, checkDidJws as ei, WAKE_CALL_TTL_SECONDS as el, LINK_PREVIEW_LIMITS as em, carryMentions as en, BLOCKED_DIAL_WAIT_MS as eo, emptyDhtDeliveryState as ep, bip322MessageHash as er, readGroupWantNo as es, COMMUNITY_PROFILE as et, APP_SEND_LIMIT as eu, RTC_CONFIG as ev, readTurnPacket as ew, REQUEST_LIFETIME_MS as ex, HANDOFF_PIECE_BYTES as ey, readX401SdJwtVc as f, deviceEchoNonce as fC, __exportAll as fE, setAppSignatureFastPath as fS, withRequestOptions as fT, viewerGuardOffset as f_, pubkyProofFile as fa, ENROLL_CANCEL as fb, StatusSender as fc, IdentityCheckUnavailable as fd, relayUrl as ff, ratchetOn as fg, taskProgress as fh, parseDidDocument as fi, WakeLimiter as fl, readForwarded as fm, GROUP_META_PAST as fn, INVITE_TAKEN as fo, PLAYABLE_AUDIO as fp, encodeTx as fr, readGroupSignal as fs, leaveStands as ft, APPS_CAPABILITY as fu, keepsToRelays as fv, turnSignedMessage as fw, knockSlotOf as fx, handoffAttemptAllowed as fy, X401_LIMITS as g, deviceLinkParams as gC, verifyAppSignature as gS, RELAY_PAYLOAD_MAX_BYTES as gT, VIEWER_DROPPED_DIRECTIVES as g_, homeserverWebEndpoint as ga, ENROLL_HELLO as gb, sameStatusState as gc, emptyIdentityLedger as gd, HOLD_DATED_BACK_MS as gf, ratchetSessionOf as gg, claimedTime as gh, staticDidDocument as gi, readWake as gl, REACTED_FRAME as gm, MAX_GROUP_NAME_LENGTH as gn, PAIRED_FRAME_TOO_LARGE as go, baseMime as gp, txHash as gr, mayBeHub as gs, rosterHash as gt, EDIT_CAPABILITY as gu, signalHasVideo as gv, ANSWER_READ_FIRST_MS as gw, makeStampPaced as gx, handoffCancelFrame as gy, X401_HEADERS as h, deviceLinkPairing as hC, verifyAppRevocation as hS, PacketTooLargeError as hT, HttpHost as h_, encodeSvcbPacket as ha, ENROLL_GRANT as hb, personStatus as hc, boundVerifiedIdentity as hd, HOLD_CAPABILITY as hf, ratchetSeal as hg, arrivalKey as hh, signingKeys as hi, parseWakeFrame as hl, QUICK_REACTIONS as hm, MAX_GROUP_NAME_BYTES as hn, MAX_PAIRED_MESSAGE_FRAME as ho, VOICE_METER as hp, sha256d as hr, NO_HUB_POLICY as hs, leftStatement as ht, CALLS_CAPABILITY as hu, sdpHasCandidates as hv, ANSWER_READ_ALLOWANCE as hw, makeStamp as hx, handoffBusyFrame as hy, x401ApprovalDigest as i, readInviteCode as iC, randomBytes as iE, isAppKey as iS, BREAKER_THRESHOLD as iT, presenceSeenAt as i_, isBitcoinAddress as ia, encodeSetSlots as ib, STATUS_AVAILABILITIES as ic, IDENTITY_MAX_RECEIVED as id, RELAY_WITH_SECRETS as if, RATCHET_CAPABILITY as ig, cardTimeUtc as ih, didSignedMessages as ii, WAKE_ONLINE_BATCH as il, linkStop as im, parseCommunityEdit as in, DEMOTE_AFTER_FAILURES as io, dhtFileId as ip, verifyBip322 as ir, GROUP_VERSION_SIGNALS as is, communityGroupId as it, appDataBytes as iu, callSignalHeardAt as iv, signTurnRelease as iw, STAMP_BITS_DEFAULT as ix, HANDOFF_TIMINGS as iy, readX401ProofResult as j, classifyTurnRead as jC, encodeContactLink as jS, identityFromSeedB64 as jT, CHUNK_KIND as j_, ENDPOINT as ja, MAX_DONE as jb, parseTypingFrame as jc, PROOF_ADAPTERS as jd, decodeDnsResponse as jf, DirectPathWatch as jg, commitUntaggedHash as jh, openDidDhtPayload as ji, vapidKeysMatch as jl, wireReaction as jm, parseGroupMetaFrame as jn, WAKE_LOST_MS as jo, isPlayableVideoType as jp, shortAtprotoDid as jr, mergeLobby as js, mergeKnocks as jt, sessionCapabilitiesFrame as ju, isValidServiceId as jv, GROUP_OVER_PACE_MS as jw, APP_PERMISSIONS as jx, handoffRequestFrame as jy, readX401ProofResponse as k, TURN_SETTLE_MS as kC, CONTACT_LINK_VERSION as kS, createIdentity as kT, withViewerPolicy as k_, decodeBolt11 as ka, verifyEnrollProof as kb, TypingSender as kc, applyIdentityEvent as kd, NIP05_PATH as kf, DIRECT_OWN_ATTEMPTS as kg, SAID_AGAIN as kh, encodeDidDhtPacket as ki, pushRequest as kl, readReaction as km, openGroupMeta as kn, UNPROVEN_AUTH_MS as ko, VIDEO_LIMITS as kp, normalizeAtprotoHandle as kr, lobbyRecords as ks, knockIdentity as kt, WAKE_SESSION_CAPABILITY as ku, decodeServices as kv, GROUP_BURST_MS as kw, APP_FORBIDDEN_KEYS as kx, handoffPakeFrame as ky, x401VpToken as l, ENROLL_CAPABILITY as lC, utf8Encode as lE, readAppRevocationShape as lS, heldBackError as lT, WEBRTC_GUARD as l_, newPubkyProofFolder as la, signTombstone as lb, STATUS_SEND_INTERVAL_MS as lc, IDENTITY_REVOCATION_LABEL as ld, irohDescriptor as lf, emptyRatchetState as lg, sameButtonText as lh, didWebHost as li, WAKE_RETRY_MS as ll, FORWARD_LIMITS as lm, mentionsMember as ln, GhostLink as lo, safeBlobType as lp, decodeBitcoinAddress as lr, SIGNAL_PROVEN_MS as ls, decodeCommunityLink as lt, isChatAppId as lu, heardCallSignal as lv, turnPayloadSequence as lw, contactDay as lx, filePartDigest as ly, x401HolderJwk as m, deviceKeyZ32 as mC, __toCommonJS as mE, signAppRevocation as mS, PKARR_FUTURE_SKEW_MS as mT, HttpClient as m_, decodeSvcbRecords as ma, ENROLL_DONE as mb, parseStatusFrame as mc, boundIdentityDisplay as md, transportOrder as mf, ratchetRoot as mg, MESSAGE_CLOCK_SKEW_MS as mh, parseDidSignaturePaste as mi, newWakeToken as ml, GROUP_REACTION_FRAME as mm, MAX_GROUP_META_BODY as mn, LIVENESS_PING_MS as mo, VOICE_LIMITS as mp, hash160 as mr, MESH_HUBS as ms, leaveStatement3 as mt, BUTTONS_CAPABILITY as mu, pickCallCandidates as mv, turnVerifierMark as mw, linkRecords as mx, handoffAttemptSucceeded as my, X401_RESPONSE_MODES as n, ownInviteRefusal as nC, fromZ32 as nE, checkAppRevokeStatement as nS, BREAKER_BASE_MS as nT, WATCH_PEER_MS as n_, sparkNetworkOf as na, SET_ACK as nb, transferStalled as nc, IDENTITY_MAX_EVIDENCE as nd, AUTOMATIC_ORDER as nf, MAX_SKIP as ng, cardLine as nh, didGhostlyServiceEntry as ni, WAKE_FRAME as nl, canonicalUrl as nm, communityMessageAuthor as nn, CROSSED_PROBE_MS as no, DHT_FILE_CAPABILITY as np, bip322ToSpend as nr, CarriedTransport as ns, GROUP_READ_NOTE_COMMUNITY as nt, AppSessions as nu, buildSdpFromSignal as nv, signTurnBody as nw, REQUEST_PACKET_BYTES as nx, HANDOFF_RELEASE as ny, matchX401Dcql as o, DEVICE_CAPABILITIES as oC, toBase64Url as oE, isAppRef as oS, DiscoveryBudgetError as oT, VIEWER_GUARD_CSP as o_, PUBKY_PROOF_ROOT as oa, setAckFrame as ob, STATUS_IDLE_AFTER_MS as oc, IDENTITY_PROOF_CAPABILITY as od, automaticTransport as of, RATCHET_KEEP_MS as og, checkStatusCard as oh, didWebFile as oi, WAKE_ONLINE_DELAY_MS as ol, parseLinkPreview as om, MENTION_EVERYONE as on, DHT_PIN_GRACE_MS as oo, FileTransfers as op, ByteReader as or, SIGNAL_CARRIERS as os, communityMessageId as ot, appOpenFrame as ou, contactRtcConfig as ov, turnKeys as ow, STAMP_BITS_MIN as ox, HANDOFF_VERSION as oy, sameX401HolderJwk as p, deviceFrameCapability as pC, __require as pE, signAppObject as pS, MAX_DNS_PACKET_BYTES as pT, GhostlyHttpError as p_, pubkyProofPath as pa, ENROLL_CANCEL_REASONS as pb, liveStatus as pc, IdentityExchange as pd, relayedTransports as pf, ratchetOpen as pg, usageLeft as ph, parseDidJws as pi, deviceWakeRequest as pl, COMMUNITY_REACTION_FRAME as pm, GROUP_META_PAST_CHARS as pn, LIVENESS_MISSED_PINGS as po, RECORDING_TYPES as pp, encodeWitness as pr, GROUP_VERSION_HUBS as ps, leaveStatement as pt, APP_RANGES_CAPABILITY as pu, parseCallSignal as pv, turnStatedVerifier as pw, knockSlotRecords as px, handoffAttemptFailed as py, signAppStore as q, TURN_VERSION as qC, createChatInvite as qS, sanitizeDisplayText as qT, offerIsFresh as q_, NO_PICTURE_METADATA as qa, KNOCK_SLOTS as qb, pinFrame as qc, verifyNostrProof as qd, DHT_FILE_REFUSED as qf, PRESENCE_WINDOW as qg, encryptText as qh, isWalletNetwork as qi, readAppRangeFrame as ql, REMOVABLE_KINDS as qm, sshSignCommand as qn, GROUP_WANT_NO_FRAME as qo, editedFrame as qp, DID_FILE_MAX_BYTES as qr, FILE_DATA_KIND as qs, asWritten as qt, emptyCapsState as qu, HANDOFF_HAVE as qv, WAY_BACK_SHARE as qw, yieldThread as qx, readHandoffHello as qy, readX401OpenId4VpRequest as r, pastedAgain as rC, isZ32Key as rE, isAppHash as rS, BREAKER_MAX_MS as rT, countUnusedInvite as r_, BITCOIN_NETWORKS as ra, SET_UPDATE as rb, PRESENCES as rc, IDENTITY_MAX_FRAME as rd, RELAY_URL as rf, MAX_SKIPPED_KEYS as rg, cardLinkHost as rh, didJwsAlg as ri, WAKE_INTERVAL_MS as rl, linkEnd as rm, meshMessageRef as rn, CROSSED_WAIT_MS as ro, dhtFileElements as rp, decodeBase64 as rr, GROUP_SIGNAL_FRAME as rs, communityCommitHash as rt, appCloseFrame as ru, callRtcConfig as rv, signTurnPacket as rw, REQUEST_TEXT_BYTES as rx, HANDOFF_REQUEST as ry, presentX401SdJwtVc as s, DEVICE_ECHO_FRAME as sC, toZ32 as sE, isAppSignature as sS, PublishFailedError as sT, VIEWER_GUARD_HASH as s_, isPubkyKey as sa, setUpdateFrame as sb, STATUS_RATE_LIMIT as sc, IDENTITY_PROVIDER_ID as sd, checkedDescriptors as sf, RATCHET_OVERHEAD as sg, readStatusCard as sh, didWebFileNames as si, WAKE_ONLINE_INTERVAL_MS as sl, previewImageSize as sm, MENTION_LIMITS as sn, EARLY_DIAL_JOIN_MS as so, PREVIEWABLE_IMAGE as sp, compactSize as sr, SIGNAL_FRESH_MS as ss, communityRoster as st, chatAppId as su, decompressSdp as sv, turnName as sw, contactAskerFrame as sx, HANDOFF_WINDOW as sy, X401_REQUEST_LIMITS as t, inviteQrText as tC, fromBase64Url as tE, appSignedBytes as tS, BREAKER_ALL_DOWN_PROBE_MS as tT, UNUSED_INVITE_WAIT_MAX_MS as t_, sparkInvoiceDetails as ta, sortParts as tb, transferEnded as tc, IDENTITY_MAX_CHECKS_PER_HOUR as td, verifyRingEvidence as tf, FOLLOW_MS as tg, cardEditNumber as th, checkDidSignature as ti, WAKE_CALL_WAIT_MS as tl, LINK_TRAILING as tm, communityEditFrame as tn, CROSSED_FRESH_MS as to, peekDhtMailbox as tp, bip322ToSign as tr, CARRIED_DEFER_MS as ts, CommunitySession as tt, APP_VERSION_MAX as tu, answersOffer as tv, sealTurnBody as tw, REQUEST_NAME_UNITS as tx, HANDOFF_PIECE_OVERHEAD as ty, X401_CREDENTIAL_LIMITS as u, HANDOFF_CAPABILITY as uC, __commonJSMin as uE, readAppRevocations as uS, isDiscoveryBudgetError as uT, allowingViewerGuard as u_, normalizePubkyKey as ua, verifySetUpdate as ub, STATUS_TEXT_MAX as uc, IDENTITY_STATEMENT_PREFIX as ud, irohRelayUrl as uf, isRatcheted as ug, statusCardBytes as uh, normalizeDid as ui, WAKE_SUBJECT as ul, forwardedAgain as um, validMentions as un, HANDLED_WAIT_MS as uo, sanitizeFileName as up, decodeTx as ur, SIGNAL_REPLY_MS as us, derivedSecret as ut, parseAppFrame as uu, isCandidateAddress as uv, turnReleaseMessage as uw, knockHolds as ux, filePartName as uy, X401_SCHEME as v, deviceLinkSealKey as vC, IMAGE_LIMITS as vS, measureRecords as vT, VIEWER_SERVICE_CSP as v_, LIGHTNING_DESTINATION_PATTERN as va, enrollCancelFrame as vb, statusFrame as vc, identityRefusal as vd, HoldKeys as vf, ANSWER_REFUSED_REDIALS as vg, receivedTimestamp as vh, DID_DHT_MAX_PAYLOAD as vi, relayRequest as vl, REACTION_LIMITS as vm, encodeGroupMetaBody as vn, PAIRING_RETRY_MS as vo, fileMessageText as vp, u64 as vr, meshRendezvous as vs, signCommunity as vt, FILES_CAPABILITY as vu, LABEL$1 as vv, AWAITED_READS as vw, openRequest as vx, handoffContextProof as vy, decodeX401Header as w, verifyDeviceTransports as wC, readImageMeta as wS, decodeDnsAnswers as wT, sanitizeRequestHeaders as w_, parseLightningDestination as wa, enrollMessage as wb, TYPING_REFRESH_MS as wc, receivedIdentityStatus as wd, DNS_TYPE as wf, LATE_ANSWER_MS as wg, LEGACY_GROUP_MEMBERS as wh, didDhtDocument as wi, WebPushError as wl, reactedFrame as wm, groupMetaTag as wn, RESUME_WAIT_MS as wo, voiceFileName as wp, atprotoDidMethod as wr, beaconRecords as ws, MAX_KNOCKS as wt, STATUS_CAPABILITY as wu, parseLinkRecords as wv, CHAT_RESERVE_PER_CHAT as ww, stampHolds as wx, handoffFileRequestFrame as wy, buildX401ProofResult as x, newDeviceSetSecret as xC, isImageMime as xS, parseRelayPayload as xT, parseLocalTarget as x_, findLightningDestination as xa, enrollDoneFrame as xb, TYPING_KINDS as xc, identityStatementText as xd, newMailbox as xf, DataLink as xg, GROUP_ID as xh, DID_DHT_VERSION as xi, wakeRequest as xl, parseReactedFrame as xm, groupMetaChange as xn, RACE_DIRECT_MS as xo, parseVoiceMeta as xp, ATPROTO_FULL_SCOPE as xr, wireHubPolicy as xs, verifyCommunityCommit as xt, REACTIONS_CAPABILITY as xu, buildLinkRecords as xv, BACKGROUND_WRITES_SHARE as xw, requestPlaintextBytes as xx, handoffDoneFrame as xy, X401_VERSION as y, deviceLinkSecret as yC, exifOrientation as yS, newerPacket as yT, VIEWER_SERVICE_CSP_RELAY_ONLY as y_, LNURL_LIMITS as ya, enrollCancelReason as yb, statusState as yc, identityRevocationValue as yd, HoldRefusedError as yf, CONNECT_TIMEOUT_MS as yg, shownTime as yh, DID_DHT_PREFIX as yi, wakeFrame as yl, ReactionWindow as ym, groupDisplayName as yn, PONG_WAIT_MS as yo, formatVoiceDuration as yp, varBytes as yr, parseHubPolicy as ys, verifyCommunityChain as yt, KNOWN_SESSION_CAPABILITIES as yu, MAX_MSGS_PAYLOAD_B64 as yv, BACKGROUND_REQUESTS_PER_MINUTE as yw, readKnockSlot as yx, handoffDataFrame as yy, planAppUpdate as z, TURN_MAX as zC, encodeDeviceInvite as zS, tryDecrypt as zT, sendBody as z_, NO_AUDIO_METADATA as za, newInbox as zb, PINNED_FRAME as zc, nostrProofTemplate as zd, parseDomainTxt as zf, FIRST_PUBLISH_MAX_MS as zg, verifyChain as zh, SEPOLIA_TEST_USDT_FAUCET as zi, appRangeDataFrame as zl, wireReply as zm, SSH_KEY_TYPES as zn, engineError as zo, EDIT_RECEIVE_LIMIT as zp, parseAtprotoCar as zr, validHead as zs, groupWakeFrame as zt, CAPS_PUBLISH_SPACING_MS as zu, HANDOFF_BUSY as zv, RelayTransport as zw, findAppForbiddenKey as zx, openHandoffPiece as zy };
43007
+ export { sealGroupTyping as $, TURN_SEALED_BYTES as $C, INVITE_LINK_ORIGIN as $S, MAX_AVATAR_LENGTH as $T, RTC_SIGNAL_FUTURE_MS as $_, isStrippedPicture as $a, turnOff as $b, pinFrame as $c, verifyNostrProof as $d, DHT_FILE_REFUSED as $f, OFFER_STEP_MAX as $g, decryptText as $h, validatePaymentTarget as $i, readAppRangeFrame as $l, PR_CHECKS as $m, isLegacySignature as $n, GROUP_WANT_NO_FRAME as $o, editedFrame as $p, DID_JWS_ALGS as $r, FILE_DATA_KIND as $s, CATCH_UP_SLICE as $t, emptyCapsState as $u, HANDOFF_DATA as $v, SLOW_DEMOTE_MS as $w, pacer as $x, readHandoffData as $y, readX401ProofResponseHeader as A, devicePingFrame as AC, imageSize as AS, openRelayPayload as AT, formatLocalTarget as A_, requestLnurlInvoice as Aa, enrollDigits as Ab, TYPING_REFRESH_MS as Ac, receivedIdentityStatus as Ad, DNS_TYPE as Af, GATHER_ATTEMPTS as Ag, GROUP_MEMBER_CAP as Ah, didDhtKey as Ai, WebPushError as Al, parseReactionFrame as Am, groupName as An, RESUME_WAIT_MS as Ao, voiceFileName as Ap, atprotoProofRkey as Ar, beaconRecords as As, knockIdentity as At, STATUS_CAPABILITY as Au, RECORD_TTL as Av, BACKGROUND_WHILE_SIGNALING as Aw, readLinkRecord as Ax, handoffDigest as Ay, APP_STORE_KINDS as B, TURN_VISIBLE_MS as BC, createContactLink as BS, IDENTITY_MEMO_SIZE as BT, CHUNK_FLAG_END as B_, parseCashuRequestPayload as Ba, FLOOD_PER_DAY as Bb, typingActivity as Bc, STORAGE_LIFETIME as Bd, domainWellKnownFile as Bf, directBlocked as Bg, expectedRoster as Bh, ONCHAIN_PROVIDER as Bi, APP_RANGE_FRAMES as Bl, PAIRED_REPLY_AUTHORS as Bm, wrapGroupMeta as Bn, pairedMessageFrame as Bo, EDITED_FRAME as Bp, decodeDagCbor as Br, rankHubs as Bs, groupWakeFrame as Bt, SESSION_FRAME_MAX as Bu, encodeServices as Bv, GROUP_BURST_ONE_LINK as Bw, APP_ICON_PATH as Bx, handoffReleaseFrame as By, buildX401TokenObject as C, deviceFrameCapability as CC, __commonJSMin as CE, signAppObject as CS, MAX_DNS_PACKET_BYTES as CT, HttpClient as C_, LNURL_LIMITS as Ca, ENROLL_CANCEL_REASONS as Cb, sanitizeStatusText as Cc, identityPresentationBytes as Cd, HOLD_LIMITS as Cf, ratchetSeal as Cg, arrivalKey as Ch, DID_DHT_PREFIX as Ci, readWakePayload as Cl, QUICK_REACTIONS as Cm, groupDisplayName as Cn, PAIRING_RETRY_MS as Co, downsamplePeaks as Cp, varBytes as Cr, meshHubs as Cs, GROUP_ENTRY_PROFILE as Ct, FILES_BINARY_CAPABILITY as Cu, parseCallSignal as Cv, turnStatedVerifier as Cw, knockSlotRecords as Cx, handoffAttemptFailed as Cy, readX401ProofRequest as D, deviceLinkRendezvousSeed as DC, __toCommonJS as DE, verifyAppStatementBytes as DS, createRelayPayload as DT, VIEWER_PERMISSIONS_POLICY as D_, parseInvoiceCallback as Da, ENROLL_PROOF as Db, TYPING_KINDS as Dc, identityStatementText as Dd, newMailbox as Df, CONNECT_TIMEOUT_MS as Dg, shownTime as Dh, decodeDidDhtPacket as Di, wakeRequest as Dl, ReactionWindow as Dm, groupMetaPicture as Dn, RACE_RELAYED_MS as Do, parseVoiceMeta as Dp, ATPROTO_PROOF_SCOPE as Dr, wireHubPolicy as Ds, encodeGroupEntryLink as Dt, REACTIONS_CAPABILITY as Du, waitForIceGathering as Dv, ANSWER_READ_SPACING_MS as Dw, mergeContactKnocks as Dx, handoffContext as Dy, isX401Protocol as E, deviceLinkParams as EC, __require as EE, verifyAppSignature as ES, RELAY_PAYLOAD_MAX_BYTES as ET, VIEWER_DROPPED_HEADERS as E_, invoiceCallbackUrl as Ea, ENROLL_HELLO as Eb, TYPING_FRAME as Ec, identityStatement as Ed, isHoldUrl as Ef, ANSWER_REFUSED_REDIALS as Eg, receivedTimestamp as Eh, DidDhtError as Ei, wakePayload as El, REACTION_LIMITS as Em, groupMetaNewer as En, RACE_DIRECT_MS as Eo, isPlayableAudioType as Ep, ATPROTO_PROOF_COLLECTION as Er, pickMeshHubs as Es, decodeGroupEntryLink as Et, PIN_CAPABILITY as Eu, signalHasVideo as Ev, ANSWER_READ_FIRST_MS as Ew, makeStampPaced as Ex, handoffCancelFrame as Ey, appRevocationFor as F, seedSigner as FC, canonicalJson as FS, decodeTxtPacket as FT, sanitizeResponseHeaders as F_, ENDPOINT as Fa, enrollProofFrame as Fb, TypingSender as Fc, applyIdentityEvent as Fd, NIP05_PATH as Ff, STALLED_EVIDENCE_MS as Fg, MEMBER_KEY as Fh, openDidDhtPayload as Fi, pushRequest as Fl, reactionIsNewer as Fm, parseGroupMetaFrame as Fn, UNPROVEN_AUTH_MS as Fo, VIDEO_LIMITS as Fp, shortAtprotoDid as Fr, lobbyRecords as Fs, GROUP_WAKE_GROUP_LIMIT as Ft, WAKE_SESSION_CAPABILITY as Fu, HTTP_SERVICE_PROTO as Fv, CHAT_WATCH_SHARE as Fw, APP_BUNDLE_LIMITS as Fx, handoffHaveFrames as Fy, readAppStore as G, TOMBSTONE_TURN as GC, DEVICE_INVITE_OWN_DEVICE as GS, setPublicKeyFastPath as GT, decodeChunk as G_, withoutAudioMetadata as Ga, REOPEN_BELOW as Gb, PINNED_FRAME as Gc, nostrProofTemplate as Gd, parseDomainTxt as Gf, DHT_POLL_INTERVALS as Gg, signCommit as Gh, USDT_PUBLIC_RPC as Gi, appRangeDataFrame as Gl, readReply as Gm, SshSigError as Gn, engineError as Go, EDIT_RECEIVE_LIMIT as Gp, parseAtprotoVerificationKey as Gr, validHead as Gs, GROUP_REACTED_FRAME as Gt, CAPS_PUBLISH_SPACING_MS as Gu, servicesToWire as Gv, HEDGE_MS as Gw, appViewOf as Gx, handoffVerifiedMessage as Gy, checkAppListing as H, keptAtEqualSequence as HC, readContactLink as HS, identityFromSeed as HT, LIMITS as H_, AUDIO_METADATA_LIMITS as Ha, MAX_MISSED as Hb, typingKindOf as Hc, emptyProofLedger as Hd, isPublicAddress as Hf, AWAITING_PEER_MS as Hg, rememberAlone as Hh, SEPOLIA_TEST_USDT as Hi, AppRanges as Hl, REPLY_LIMITS as Hm, SSHSIG_NAMESPACE as Hn, publishFailure as Ho, EDIT_BUFFER_MS as Hp, findInMst as Hr, readBeaconHead as Hs, mentionedMembers as Ht, CAPS_ISSUED_BACK_MS as Hu, isViewerTag as Hv, GROUP_RATION_WINDOW_MS as Hw, APP_SCREENSHOTS_DIR as Hx, handoffRetryAfter as Hy, appStoreDecision as I, webCryptoSigner as IC, canonicalJsonBytes as IS, encodeTxtPacket as IT, viewerResponseHeaders as I_, cashuRequestPayload as Ia, formatEnrollDigits as Ib, parseTypingActivity as Ic, lastSharedWithMe as Id, WELL_KNOWN_PATH as If, DIRECT_EVIDENCE_MS as Ig, OWN_FRAME_LIMIT as Ih, resolveDidDht as Ii, vapidAuthorization as Il, readDhtReactions as Im, parseGroupMetaStatement as In, WAKE_ANSWER_GRACE_MS as Io, formatVideoDuration as Ip, AtprotoCid as Ir, mergeBeacon as Is, GROUP_WAKE_GROUP_WINDOW_MS as It, parseSessionCapabilities as Iu, LEGACY_SERVICES as Iv, DEFAULT_RELAYS as Iw, APP_BUNDLE_MAGIC as Ix, handoffHelloFrame as Iy, signAppStore as J, TURN_LAST_SEQUENCE as JC, deviceInviteJoinerParams as JS, decrypt as JT, encodeControl as J_, readingAhead as Ja, inboxRecord as Jb, PIN_LIMITS as Jc, proofStatement as Jd, recordsName as Jf, IDLE_THRESHOLD as Jg, verifyCommit as Jh, assertTokenUnits as Ji, appRangeGetFrame as Jl, ACTIVE_TASK_STATUSES as Jm, sameSshKey as Jn, PairingTracker as Jo, MAX_REMOVAL_NUMBER as Jp, verifyAtprotoRecordProof as Jr, MAX_PAIRED_CALL_SIGNAL as Js, asWritten as Jt, CapsKeys as Ju, HANDOFF_ATTEMPTS as Jv, REQUESTS_PER_MINUTE as Jw, checkAppManifest as Jx, newHandoffId as Jy, readAppStoreSteps as K, TURN_BODY_BYTES as KC, createDeviceInvite as KS, sign as KT, decodeControl as K_, NO_VIDEO_METADATA as Ka, clearMissed as Kb, PIN_CLOCK_SKEW_MS as Kc, proofCapability as Kd, recordsFromTxt as Kf, EXPECT_PEER_MS as Kg, sortRoster as Kh, WALLET_NETWORKS as Ki, appRangeEndFrame as Kl, replySnippet as Km, parseSshPublicKey as Kn, engineText as Ko, EDIT_SEND_LIMIT as Kp, readAtprotoCid as Kr, CALL_RATE_WINDOW_MS as Ks, GROUP_READ_NOTE as Kt, CAPS_REFRESH_MS as Ku, viewerTag as Kv, PREVIOUS_DEFAULT_RELAYS as Kw, assembleAppBundle as Kx, handoffVersions as Ky, appUpdateDecision as L, TURN_PUT_WINDOW_MS as LC, readCanonicalJson as LS, readDnsName as LT, viewerServicePolicy as L_, fedimintRequestPayload as La, readEnrollGrant as Lb, parseTypingFrame as Lc, PROOF_ADAPTERS as Ld, decodeDnsResponse as Lf, DIRECT_OWN_ATTEMPTS as Lg, SAID_AGAIN as Lh, signDidDhtPacket as Li, vapidKeysMatch as Ll, readReaction as Lm, parseGroupMetaTag as Ln, WAKE_LOST_MS as Lo, isPlayableVideoType as Lp, AtprotoProofError as Lr, mergeLobby as Ls, GROUP_WAKE_MEMBER_INTERVAL_MS as Lt, sessionCapabilitiesFrame as Lu, MAX_SERVICES as Lv, DEPARTED_READS as Lw, APP_CLIENTS as Lx, handoffManifestFrames as Ly, readX401ProofResultHeader as M, signDeviceTransports as MC, parseImageMeta as MS, readOwnRelayPayload as MT, relativizeLocation as M_, BOLT11_PATTERN as Ma, enrollGrantFrame as Mb, TYPING_STATUS_MAX as Mc, signIdentityPresentation as Md, DOMAIN_MAX_RECORDS as Mf, LATE_ANSWER_MS as Mg, LEGACY_GROUP_MEMBERS as Mh, encodeDidDhtDeactivated as Mi, decryptPushPayload as Ml, reactedFrame as Mm, nextGroupMetaRevision as Mn, RTC_SIGNAL_RECEIVE_LIMIT as Mo, voiceLevelsOf as Mp, isAtprotoDid as Mr, freshHubs as Ms, mergeKnocks as Mt, SessionCapabilities as Mu, emptyLinkRecords as Mv, CHAT_RESERVE as Mw, requestRecords as Mx, handoffEphemeral as My, x401AnswerableRequests as N, unsignedDeviceTransports as NC, previewable as NS, signRelayPayload as NT, resolveTargetUrl as N_, decodeBolt11 as Na, enrollHelloFrame as Nb, TYPING_TIMEOUT_MS as Nc, verifyIdentityPresentation as Nd, DOMAIN_METHODS as Nf, OFFER_HOST_GATHER_MS as Ng, MAX_GROUP_CHAIN as Nh, encodeDidDhtPacket as Ni, encryptPushPayload as Nl, reactionEmoji as Nm, openGroupMeta as Nn, RTC_UNSTARTED_MS as No, voicePeaksOf as Np, normalizeAtprotoHandle as Nr, hubRank as Ns, readKnocks as Nt, TYPING_CAPABILITY as Nu, isEmptyLinkPacket as Nv, CHAT_RESERVE_MOST_SHARE as Nw, seenEntry as Nx, handoffFileMissingFrame as Ny, readX401ProofRequestHeader as O, deviceLinkSealKey as OC, IMAGE_LIMITS as OS, measureRecords as OT, VIEWER_SERVICE_CSP as O_, parseLightningDestination as Oa, enrollCancelFrame as Ob, TYPING_RATE_LIMIT as Oc, isIdentityBinding as Od, readManifest as Of, DATA_SETTLE_MS as Og, GROUP_ADMIN_OFF_ERROR as Oh, didDhtDocument as Oi, PUSH_PAD_BYTES as Ol, nextReactionNumber as Om, groupMetaTag as On, REDESCRIBED_GRACE_MS as Oo, recordingMime as Op, atprotoDidMethod as Or, COMMUNITY_TOPOLOGY as Os, entryParams as Ot, SERVICES_CAPABILITY as Ou, LABEL$1 as Ov, AWAITED_READS as Ow, openRequest as Ox, handoffContextProof as Oy, addedAppPermissions as P, verifyDeviceTransports as PC, readImageMeta as PS, decodeDnsAnswers as PT, sanitizeRequestHeaders as P_, findBolt11 as Pa, enrollMessage as Pb, TypingReceiver as Pc, IDENTITY_TIMELINE_MAX as Pd, DOMAIN_TXT_MAX_BYTES as Pf, REANSWERS as Pg, MAX_GROUP_MEMBERS as Ph, jwkThumbprint as Pi, generateVapidKeys as Pl, reactionFrame as Pm, parseGroupMetaBody as Pn, SWITCH_RETIRE_MS as Po, PLAYABLE_VIDEO as Pp, parseAtprotoDidDocument as Pr, lobbyKeys as Ps, GROUP_WAKE_FRAME as Pt, UPGRADE_CAPABILITY as Pu, parseLinkRecords as Pv, CHAT_RESERVE_PER_CHAT as Pw, stampHolds as Px, handoffFileRequestFrame as Py, openGroupTyping as Q, TURN_REV_LIMIT as QC, INVITE_HRP as QS, tryDecrypt as QT, DATA_CHANNEL_LABEL as Q_, PICTURE_METADATA_LIMITS as Qa, takeRequest as Qb, parsePinnedFrame as Qc, validExternalKey as Qd, ACTIVE_DHT_POLL_MS as Qf, OFFER_LOOK_MS as Qg, confirmationTag as Qh, parsePaymentAmount as Qi, parseAppRangeFrame as Ql, ITEM_STATES as Qm, verifySshSignature as Qn, GROUP_WANT_FRAME as Qo, editFrame as Qp, DID_GHOSTLY_SERVICE as Qr, ChatFiles as Qs, CATCH_UP_PAUSE_MS as Qt, dialDescriptors as Qu, HANDOFF_CANCEL_REASONS as Qv, SIGNALING_WINDOW_MS as Qw, isAppUrl as Qx, readHandoffCancel as Qy, checkAppBeforeRun as R, TURN_RAISE_READ_TIMEOUT_MS as RC, CONTACT_LINK_BYTES as RS, IDENTITY_MEMO_IDLE_MS as RT, webLocalFetch as R_, findEndpoint as Ra, readEnrollHello as Rb, plainStatusLine as Rc, PROOF_CAPABILITY as Rd, dnsProofName as Rf, DIRECT_PEERS as Rg, commitHash as Rh, ETHEREUM_USDT as Ri, APP_RANGE_DATA_KIND as Rl, validReactionNumber as Rm, signGroupMeta as Rn, pairedEditFits as Ro, isVideoMime as Rp, atprotoCidFor as Rr, newerHead as Rs, GROUP_WAKE_RECEIVE_LIMIT as Rt, PAIRED_PROFILE as Ru, SERVICES_VERSION as Rv, FRESH_READ_MS as Rw, APP_CLIENT_NAME as Rx, handoffOfferFrame as Ry, buildX401ResultArtifact as S, deviceEchoNonce as SC, utf8Encode as SE, setAppSignatureFastPath as SS, withRequestOptions as ST, GhostlyHttpError as S_, LIGHTNING_DESTINATION_PATTERN as Sa, ENROLL_CANCEL as Sb, sameStatusState as Sc, emptyIdentityLedger as Sd, HOLD_DATED_BACK_MS as Sf, ratchetRoot as Sg, MESSAGE_CLOCK_SKEW_MS as Sh, DID_DHT_MAX_PAYLOAD as Si, readWake as Sl, GROUP_REACTION_FRAME as Sm, encodeGroupMetaBody as Sn, PAIRING_ATTEMPT_MS as So, baseMime as Sp, u64 as Sr, mayBeHub as Ss, verifyCommunityCommit as St, EDIT_CAPABILITY as Su, keepsToRelays as Sv, turnSignedMessage as Sw, knockSlotOf as Sx, handoffAttemptAllowed as Sy, encodeX401Header as T, deviceLinkPairing as TC, __exportAll as TE, verifyAppRevocation as TS, PacketTooLargeError as TT, VIEWER_DROPPED_DIRECTIVES as T_, findLightningDestination as Ta, ENROLL_GRANT as Tb, statusState as Tc, identityRevocationValue as Td, HoldRefusedError as Tf, ratchetUnknownSession as Tg, heardTime as Th, DID_DHT_VERSION as Ti, wakeFrame as Tl, REACTION_FRAME as Tm, groupMetaChange as Tn, RACE_ANSWERED_MS as To, formatVoiceDuration as Tp, ATPROTO_FULL_SCOPE as Tr, parseHubPolicy as Ts, MAX_KNOCKS as Tt, KNOWN_SESSION_CAPABILITIES as Tu, sdpHasCandidates as Tv, ANSWER_READ_ALLOWANCE as Tw, makeStamp as Tx, handoffBusyFrame as Ty, checkAppStoreIndex as U, turnPutSummary as UC, DEVICE_INVITE_BYTES as US, identityFromSeedB64 as UT, MAX_CHUNK_PAYLOAD_BYTES as U_, NO_AUDIO_METADATA as Ua, MAX_WAITING as Ub, COMMUNITY_PIN_FRAME as Uc, importedProof as Ud, nip05RootKey as Uf, DAEMON_WATCH_PEER_IDLE_MS as Ug, rosterAdmin as Uh, SEPOLIA_TEST_USDT_FAUCET as Ui, appRangeCancelFrame as Ul, groupReplyAuthor as Um, SSH_KEY_TYPES as Un, ENGINE_ERRORS as Uo, EDIT_FRAME as Up, parseAtprotoCar as Ur, readLobby as Us, parseGroupWakeFrame as Ut, CAPS_LABEL as Uu, serviceIdFromName as Uv, GROUP_SIGNALING_ALLOWANCE_SHARE as Uw, APP_VIEWS as Ux, handoffStreamKey as Uy, APP_STORE_LIMITS as V, classifyTurnRead as VC, encodeContactLink as VS, createIdentity as VT, CHUNK_KIND as V_, parseFedimintRequestPayload as Va, MAX_DONE as Vb, typingFrame as Vc, STORAGE_ROOT as Vd, encodeDnsQuery as Vf, symmetricNat as Vg, parseGroupCommit as Vh, PaymentPreflightError as Vi, APP_RANGE_LIMITS as Vl, REPLY_ID as Vm, SSHSIG_MAX_ARMOR as Vn, parsePaymentNetworks as Vo, EDIT_BUFFER_MAX as Vp, encodeDagCbor as Vr, readBeacon as Vs, groupWakes as Vt, SESSION_RECEIVE_PENDING as Vu, isValidServiceId as Vv, GROUP_OVER_PACE_MS as Vw, APP_PERMISSIONS as Vx, handoffRequestFrame as Vy, readAppListing as W, TOMBSTONE_SEQUENCE as WC, DEVICE_INVITE_LIFETIME_S as WS, publicKeyFromZ32 as WT, PROTOCOL_VERSION as W_, audioMetadataPatches as Wa, NEW_PER_HOUR as Wb, GROUP_PIN_FRAME as Wc, isProofAdapter as Wd, normalizeDomain as Wf, DEPARTED_READ_MS as Wg, rosterHas as Wh, TEST_USDT_FAUCET_AMOUNT as Wi, appRangeChunk as Wl, pairedReplyAuthor as Wm, SSH_PUBLIC_KEY_MAX as Wn, EngineError as Wo, EDIT_RATE_WINDOW_MS as Wp, parseAtprotoDidKey as Wr, shouldBeHub as Ws, GROUP_LIMITS as Wt, CAPS_LIMITS as Wu, servicesFromWire as Wv, HEDGE_MISSING_MS as Ww, appDigest as Wx, handoffVerifiedFrame as Wy, GroupTypingBoard as X, TURN_NAME_BYTES as XC, readDeviceInvite as XS, generateEncryptionKey as XT, wrapDataChannel as X_, withoutVideoMetadata as Xa, planKnocks as Xb, nextPinNumber as Xc, storageProofBody as Xd, validDomainRecord as Xf, MAX_DHT_TEXT_BYTES as Xg, GROUP_PROFILE as Xh, formatPaymentAmount as Xi, encodeAppRangeData as Xl, BUTTON_STYLES as Xm, sshKeyDigestHex as Xn, GROUP_HAVE_FRAME as Xo, RateWindow as Xp, DID_DOCUMENT_MAX_BYTES as Xr, PairedCalls as Xs, frameBytes as Xt, DHT_TEXT_CAPABILITY as Xu, HANDOFF_BUSY_REASONS as Xv, RelaysFailedError as Xw, isAppLicense as Xx, readHandoffAck as Xy, GROUP_TYPING_FRAME as Y, TURN_MAX as YC, encodeDeviceInvite as YS, encrypt as YT, sendBody as Y_, videoMetadataPatches as Ya, newInbox as Yb, mayPin as Yc, storageProof as Yd, txtValue as Yf, LinkSession as Yg, verifyCommitSignature as Yh, assertWholeSats as Yi, decodeAppRangeData as Yl, BUTTON_ID as Ym, sshFingerprint as Yn, GROUP_FILE_LIMITS as Yo, REMOVED_TEXT as Yp, verifyAtprotoSignature as Yr, PAIRED_CALL_FRAME as Ys, chainPieces as Yt, CapsRefusedError as Yu, HANDOFF_BUSY as Yv, RelayTransport as Yw, findAppForbiddenKey as Yx, openHandoffPiece as Yy, groupTypingEpoch as Z, TURN_NO_ACTIVE as ZC, DEVICE_INVITE_VERSION as ZS, sealedLength as ZT, DATA_CHANNEL_ID as Z_, NO_PICTURE_METADATA as Za, settleRequest as Zb, parsePinFrame as Zc, storageProofPath as Zd, wellKnownUrl as Zf, OFFER_FAST_MS as Zg, confirmationMatches as Zh, isWalletNetwork as Zi, isServeId as Zl, CRON_LINE as Zm, sshSignCommand as Zn, GROUP_VERSION_FILES as Zo, dhtEditId as Zp, DID_FILE_MAX_BYTES as Zr, parsePairedCallFrame as Zs, groupMessageId as Zt, capsDescriptors as Zu, HANDOFF_CANCEL as Zv, SIGNALING_ALLOWANCE_SHARE as Zw, isAppPath as Zx, readHandoffBusy as Zy, X401_PROTOCOLS as _, DEVICE_ECHO_FRAME as _C, randomBytes as _E, isAppSignature as _S, PublishFailedError as _T, VIEWER_WORKER_GUARD_CSP as __, pubkyProofPath as _a, setUpdateFrame as _b, StatusReceiver as _c, IDENTITY_SUBJECT as _d, rankTransports as _f, emptyRatchetState as _g, sameButtonText as _h, parseDidJws as _i, WAKE_TTL_SECONDS as _l, FORWARD_LIMITS as _m, GROUP_META_PAST_CHARS as _n, LIVENESS_MISSED_PINGS as _o, sanitizeMime as _p, encodeWitness as _r, groupSignalFrame as _s, rosterHash as _t, readAppFrame as _u, decompressSdp as _v, turnName as _w, contactAskerFrame as _x, HANDOFF_WINDOW as _y, X401_DCQL_LIMITS as a, decodeInviteCode as aC, hasVisible as aE, APP_PREFIXES as aS, currentRelays as aT, STALLED_LOOK_MS as a_, sparkInvoiceDetails as aa, readHandoffPake as ab, refusalText as ac, IDENTITY_FRAME_LIMIT as ad, validRingKey as af, openSecret as ag, TASK_STATUSES as ah, checkDidSignature as ai, WAKE_CALL_INTERVAL_MS as al, LINK_MAX_CHARS as am, communityEditFrame as an, CROSSED_FRESH_MS as ao, LIVE_POLL_MS as ap, bip322ToSign as ar, readGroupWant as as, communityGroupId as at, APP_RESUME_GRACE_MS as au, BURST_RING_MS as av, encodeTurnFields as aw, LINK_RECORD_LABEL as ax, HANDOFF_LATER_BYTES as ay, buildX401ProofRequest as b, HANDOFF_CAPABILITY as bC, toZ32 as bE, readAppRevocations as bS, isDiscoveryBudgetError as bT, guardViewerAnswer as b_, homeserverWebEndpoint as ba, verifySetUpdate as bb, parseStatusFrame as bc, boundIdentityDisplay as bd, transportOrder as bf, ratchetOn as bg, taskProgress as bh, staticDidDocument as bi, newWakeToken as bl, readForwarded as bm, MAX_GROUP_NAME_LENGTH as bn, MESSAGE_RECEIVE_LIMITS as bo, VOICE_LIMITS as bp, txHash as br, MESH_HUBS as bs, verifyCommunityChain as bt, BUTTONS_CAPABILITY as bu, isCandidateAddress as bv, turnReleaseMessage as bw, knockHolds as bx, filePartName as by, readX401DcqlQuery as c, inviteLink as cC, stripHidden as cE, appRef as cS, relayUrlProblem as cT, UNUSED_INVITE_UPKEEP_MS as c_, isBitcoinAddress as ca, readHandoffVerified as cb, transferStalled as cc, IDENTITY_MAX_EVIDENCE as cd, AUTOMATIC_ORDER as cf, sha256Hex as cg, buttonLabelClash as ch, didSignedMessages as ci, WAKE_FRAME as cl, canonicalUrl as cm, parseCommunityEdit as cn, DEMOTE_AFTER_FAILURES as co, DHT_FILE_CAPABILITY as cp, verifyBip322 as cr, CarriedTransport as cs, communityRoster as ct, AppSessions as cu, PAIRED_CALL_CANDIDATES as cv, openTurnValue as cw, REQUEST_CLOCK_SKEW_MS as cx, HANDOFF_OFFER as cy, newX401HolderKey as d, inviteQrText as dC, bytesEqual as dE, appSignedBytes as dS, BREAKER_ALL_DOWN_PROBE_MS as dT, countUnusedInvite as d_, isPubkyKey as da, sortParts as db, STATUS_FRAME as dc, IDENTITY_MAX_VALIDITY as dd, TRANSPORTS as df, MAX_SKIPPED_KEYS as dg, cardLinkHost as dh, didWebFileNames as di, WAKE_ONLINE_BATCH_MS as dl, linkTail as dm, MENTION_LIMITS as dn, EARLY_DIAL_JOIN_MS as do, readDhtFile as dp, compactSize as dr, SIGNALS_PER_MINUTE as ds, derivedSecret as dt, appDataFrame as du, answersOffer as dv, sealTurnBody as dw, REQUEST_NAME_UNITS as dx, HANDOFF_PIECE_OVERHEAD as dy, INVITE_MAX_LENGTH as eC, MAX_AVATAR_SIDE as eE, readAppBundle as eS, SLOW_MS as eT, PRESENCE_HEARTBEAT as e_, walletNetworkOf as ea, readHandoffDone as eb, FILE_FRAMES as ec, encodePacketTransports as ed, verifyPeerProof as ef, edgeParams as eg, PR_STATES as eh, DID_JWS_MAX_LENGTH as ei, pinIsNewer as el, parseEditFrame as em, CatchUpAnswers as en, stripPictureMetadata as eo, DHT_FILE_TOO_LARGE as ep, legacyMessageHash as er, fetchesByItself as es, COMMUNITY_LIMITS as et, APP_DATA_MAX_BYTES as eu, RTC_SIGNAL_MAX_AGE_MS as ev, TURN_SIGNED_BYTES as ew, CONTACT_ASKER_FRAME as ex, HANDOFF_DONE as ey, readX401SdJwtVc as f, ownInviteRefusal as fC, concatBytes as fE, checkAppRevokeStatement as fS, BREAKER_BASE_MS as fT, presenceSeenAt as f_, isPubkyProofFolder as fa, SET_ACK as fb, STATUS_IDLE_AFTER_MS as fc, IDENTITY_PROOF_CAPABILITY as fd, automaticTransport as ff, RATCHET_CAPABILITY as fg, cardTimeUtc as fh, didWebFileUrl as fi, WAKE_ONLINE_DELAY_MS as fl, linksIn as fm, mentionsBytes as fn, FIRST_PAIRING_PACE_MS as fo, FileTransfers as fp, decodeAnyBitcoinAddress as fr, SIGNAL_CARRIERS as fs, encodeCommunityLink as ft, appOpenFrame as fu, buildSdpFromSignal as fv, signTurnBody as fw, REQUEST_PACKET_BYTES as fx, HANDOFF_RELEASE as fy, X401_LIMITS as g, DEVICE_CAPABILITIES as gC, isZ32Key as gE, isAppRef as gS, DiscoveryBudgetError as gT, VIEWER_GUARD_SCRIPT as g_, pubkyProofFile as ga, setAckFrame as gb, STATUS_TEXT_MAX as gc, IDENTITY_STATEMENT_PREFIX as gd, irohRelayUrl as gf, RatchetBox as gg, removedCardText as gh, parseDidDocument as gi, WAKE_SUBJECT as gl, uriEnd as gm, GROUP_META_PAST as gn, INVITE_TAKEN as go, sanitizeFileName as gp, encodeTx as gr, SIGNAL_REPLY_MS as gs, leftStatement as gt, parseAppFrame as gu, contactRtcConfig as gv, turnKeys as gw, STAMP_BITS_MIN as gx, HANDOFF_VERSION as gy, X401_HEADERS as h, DEVICES_CAPABILITY as hC, fromZ32 as hE, isAppLine as hS, RelayBreaker as hT, VIEWER_GUARD_HASH as h_, pubkyProofCapability as ha, readSetUpdate as hb, STATUS_SEND_INTERVAL_MS as hc, IDENTITY_REVOCATION_LABEL as hd, irohDescriptor as hf, RATCHET_OVERHEAD as hg, readStatusCard as hh, parseDid as hi, WAKE_RETRY_MS as hl, sanitizePreviewImage as hm, wireMentions as hn, INVITER_DIAL_GRACE_MS as ho, safeBlobType as hp, decodeWitness as hr, SIGNAL_PROVEN_MS as hs, leaveStatement3 as ht, isChatAppId as hu, compressSdp as hv, turnInstance as hw, STAMP_BITS_MAX as hx, HANDOFF_VERIFIED as hy, x401ApprovalDigest as i, createLink as iC, dropLoneJoiners as iE, APP_NAME as iS, WRITE_FIRST_MS as iT, SIGNAL_OUT_READS as i_, sparkAddressKind as ia, readHandoffManifest as ib, encodeFileData as ic, IDENTITY_CLOCK_SKEW as id, ringEvidence as if, openPair as ig, STATUS_CARD_LIMITS as ih, checkDidJws as ii, DEVICE_WAKE_TTL_SECONDS as il, validRemovalNumber as im, carryMentions as in, BLOCKED_DIAL_WAIT_MS as io, DhtDelivery as ip, bip322MessageHash as ir, readGroupHave as is, communityCommitHash as it, APP_RATE_WINDOW_MS as iu, parseRtcSignal as iv, TurnRecordError as iw, KNOCK_SLOT_LABEL as ix, HANDOFF_HELLO as iy, readX401ProofResult as j, newDeviceSetSecret as jC, isImageMime as jS, parseRelayPayload as jT, parseLocalTarget as j_, resolveLightningDestination as ja, enrollDoneFrame as jb, TYPING_SEND_LIMIT as jc, revokesIdentity as jd, DOMAIN_FILE_MAX_BYTES as jf, GATHER_STALL_MS as jg, GROUP_VERSION_LARGE as jh, didDhtRecords as ji, checkPushEndpoint as jl, queueReaction as jm, keepPastGroupMeta as jn, RTC_SIGNAL_RATE_WINDOW_MS as jo, voiceLevel as jp, checkAtprotoProofRecord as jr, doorHubs as js, knockRecords as jt, STATUS_CARD_CAPABILITY as ju, buildLinkRecords as jv, BACKGROUND_WRITES_SHARE as jw, requestPlaintextBytes as jx, handoffDoneFrame as jy, readX401ProofResponse as k, deviceLinkSecret as kC, exifOrientation as kS, newerPacket as kT, VIEWER_SERVICE_CSP_RELAY_ONLY as k_, parsePayParams as ka, enrollCancelReason as kb, TYPING_RATE_WINDOW_MS as kc, newIdentityBinding as kd, DNS_LABEL as kf, DataLink as kg, GROUP_ID as kh, didDhtFromPublicKey as ki, PUSH_SERVICE_HOSTS as kl, parseReactedFrame as km, groupMetaToHand as kn, RELAYED_FIRST_MS as ko, voiceDownloadName as kp, atprotoProofRecord as kr, beaconKeys as ks, groupEntryUrl as kt, SESSION_CAPABILITIES_FRAME as ku, MAX_MSGS_PAYLOAD_B64 as kv, BACKGROUND_REQUESTS_PER_MINUTE as kw, readKnockSlot as kx, handoffDataFrame as ky, x401VpToken as l, inviteOwnership as lC, trimEndOf as lE, appRefPublisher as lS, setLinkTraceSink as lT, UNUSED_INVITE_WAIT_MAX_MS as l_, PUBKY_PROOF_MAX_BYTES as la, sameDigest as lb, PRESENCES as lc, IDENTITY_MAX_FRAME as ld, RELAY_URL as lf, FOLLOW_MS as lg, cardEditNumber as lh, didWebDocumentUrl as li, WAKE_INTERVAL_MS as ll, linkEnd as lm, validEditText as ln, DEMOTE_MS as lo, dhtFileElements as lp, BitcoinAddressError as lr, GROUP_SIGNAL_FRAME as ls, communityUntaggedHash as lt, appCloseFrame as lu, QUICK_REDIAL_MS as lv, readTurnBody as lw, REQUEST_LABEL as lx, HANDOFF_PAKE as ly, x401HolderJwk as m, readInviteCode as mC, fromBase64Url as mE, isAppKey as mS, BREAKER_THRESHOLD as mT, VIEWER_GUARD_CSP as m_, normalizePubkyKey as ma, encodeSetSlots as mb, STATUS_RATE_WINDOW_MS as mc, IDENTITY_REUSE_CHECK_S as md, dialableIrohRelay as mf, RATCHET_KEEP_MS as mg, checkStatusCard as mh, normalizeDid as mi, WAKE_ONLINE_TTL_SECONDS as ml, previewImageSize as mm, validMentions as mn, HANDLED_WAIT_MS as mo, formatFileSize as mp, decodeTx as mr, SIGNAL_HOLD_MS as ms, leaveStatement as mt, isAppVersion as mu, callSignalHeardAt as mv, signTurnRelease as mw, STAMP_BITS_DEFAULT as mx, HANDOFF_TIMINGS as my, X401_RESPONSE_MODES as n, OwnInviteError as nC, sanitizeAvatar as nE, sha256Paced as nS, WATCH_SHARE as nT, RELAY_POLL_INTERVALS as n_, SPARK_PROVIDER as na, readHandoffHave as nb, FileUplink as nc, IDENTITY_CHALLENGE_WINDOW as nd, ringAuthorization as nf, epochKeys as ng, ROUTINE_STATES as nh, DID_METHODS as ni, pinnedFrame as nl, validEditMessage as nm, GROUP_EDIT_FRAME as nn, ANSWERS_REFUSED_PAUSES as no, DHT_TEXT_BYTES as np, BIP322_REVISION as nr, isGroupMessageId as ns, CommunitySession as nt, APP_PEER_OPEN_MAX as nu, extractRtcParams as nv, TURN_TTL as nw, ContactRequestError as nx, HANDOFF_FILE_REQUEST as ny, matchX401Dcql as o, encodeGhostlyInvite as oC, sanitizeDisplayText as oE, APP_STATEMENT_LIMITS as oS, normalizeRelayUrl as oT, TRANSPORTS_GONE_MS as o_, sparkNetworkOf as oa, readHandoffRelease as ob, sentWhole as oc, IDENTITY_FRAME_WINDOW_MS as od, verifyRingAuthorization as of, sealPair as og, appCardId as oh, didGhostlyServiceEntry as oi, WAKE_CALL_TTL_SECONDS as ol, LINK_PREVIEW_LIMITS as om, communityMessageAuthor as on, CROSSED_PROBE_MS as oo, emptyDhtDeliveryState as op, bip322ToSpend as or, readGroupWantNo as os, communityHasFrame as ot, APP_SEND_LIMIT as ou, CALL_SIGNAL_FUTURE_MS as ov, firstDeviceSetSecret as ow, MAX_SEEN as ox, HANDOFF_LIST_PER_FRAME as oy, sameX401HolderJwk as p, pastedAgain as pC, fromBase64 as pE, isAppHash as pS, BREAKER_MAX_MS as pT, unusedInviteWait as p_, newPubkyProofFolder as pa, SET_UPDATE as pb, STATUS_RATE_LIMIT as pc, IDENTITY_PROVIDER_ID as pd, checkedDescriptors as pf, RATCHET_HEADER_BYTES as pg, cardUrl as ph, didWebHost as pi, WAKE_ONLINE_INTERVAL_MS as pl, parseLinkPreview as pm, mentionsMember as pn, GhostLink as po, PREVIEWABLE_IMAGE as pp, decodeBitcoinAddress as pr, SIGNAL_FRESH_MS as ps, leaveStands as pt, chatAppId as pu, callRtcConfig as pv, signTurnPacket as pw, REQUEST_TEXT_BYTES as px, HANDOFF_REQUEST as py, repeatedJsonKey as q, TURN_LABEL as qC, deviceInviteJoinerKeyZ32 as qS, verify as qT, encodeChunk as q_, VIDEO_METADATA_LIMITS as qa, endedRequests as qb, PIN_FRAME as qc, proofHash as qd, recordsFromWellKnown as qf, FIRST_PUBLISH_MAX_MS as qg, verifyChain as qh, arkAddressPrefix as qi, appRangeErrorFrame as ql, wireReply as qm, parseSshSignature as qn, parseEngineError as qo, MAX_EDITS_PER_MESSAGE as qp, unsignedCommitBytes as qr, CALL_RECEIVE_LIMIT as qs, GroupSession as qt, CapsExchange as qu, HANDOFF_ACK as qv, RELAY_REQUESTS_PER_MINUTE as qw, buildAppBundle as qx, isHandoffPartName as qy, readX401OpenId4VpRequest as r, createChatInvite as rC, MAX_NICK_LENGTH as rE, yieldThread as rS, WAY_BACK_SHARE as rT, SIGNAL_DUE_READS as r_, isSparkAddress as ra, readHandoffHello as rb, decodeFileData as rc, IDENTITY_CHECK_UNAVAILABLE as rd, ringClaims as rf, newEpochSecret as rg, RUN_RESULTS as rh, DidError as ri, readPin as rl, validEditNumber as rm, GROUP_EDIT_TEXT_BYTES as rn, ANSWERS_REFUSED_PAUSE_MS as ro, DHT_TEXT_REFUSED as rp, MessageRefusal as rr, readGroupFileMeta as rs, GROUP_READ_NOTE_COMMUNITY as rt, APP_RATE_LIMIT as ru, offerIsFresh as rv, TURN_VERSION as rw, KNOCK_SLOTS as rx, HANDOFF_HAVE as ry, presentX401SdJwtVc as s, encodeInviteCode as sC, sanitizeNick as sE, appFingerprint as sS, readRelayBody as sT, UNUSED_INVITE_READS_PER_MINUTE as s_, BITCOIN_NETWORKS as sa, readHandoffTurnFrame as sb, transferEnded as sc, IDENTITY_MAX_CHECKS_PER_HOUR as sd, verifyRingEvidence as sf, sealSecret as sg, appCardUrl as sh, didJwsAlg as si, WAKE_CALL_WAIT_MS as sl, LINK_TRAILING as sm, meshMessageRef as sn, CROSSED_WAIT_MS as so, peekDhtMailbox as sp, decodeBase64 as sr, CARRIED_DEFER_MS as ss, communityMessageId as st, APP_VERSION_MAX as su, CALL_SIGNAL_MAX_AGE_MS as sv, nextTurnPosition as sw, MAX_SLOT_KNOCKS as sx, HANDOFF_MANIFEST as sy, X401_REQUEST_LIMITS as t, INVITE_VERSION as tC, jpegSize$1 as tE, readAppBundleAsync as tS, TURN_SOURCE_TIMEOUT_MS as tT, PRESENCE_WINDOW as t_, SPARK_NETWORKS as ta, readHandoffFileFrame as tb, FILE_LIMITS as tc, parsePacketTransports as td, RING_LIFETIME as tf, encryptText as tg, REMOVABLE_KINDS as th, DID_MAX_LENGTH as ti, pinNumberHolds as tl, parseEditedFrame as tm, COMMUNITY_EDIT_FRAME as tn, withoutPictureMetadata as to, DHT_MESSAGE_TTL as tp, verifyBitcoinMessage as tr, groupFileFallback as ts, COMMUNITY_PROFILE as tt, APP_FRAME as tu, buildDataSdp as tv, TURN_SLOTS as tw, CONTACT_RECORD_TTL as tx, HANDOFF_FILE_MISSING as ty, X401_CREDENTIAL_LIMITS as u, inviteQrSegments as uC, unwrapPasted as uE, appRevocationId as uS, traceLink as uT, WATCH_PEER_MS as u_, PUBKY_PROOF_ROOT as ua, sealHandoffPiece as ub, STATUS_AVAILABILITIES as uc, IDENTITY_MAX_RECEIVED as ud, RELAY_WITH_SECRETS as uf, MAX_SKIP as ug, cardLine as uh, didWebFile as ui, WAKE_ONLINE_BATCH as ul, linkStop as um, MENTION_EVERYONE as un, DHT_PIN_GRACE_MS as uo, dhtFileId as up, ByteReader as ur, GROUP_VERSION_SIGNALS as us, decodeCommunityLink as ut, appDataBytes as uu, RTC_CONFIG as uv, readTurnPacket as uw, REQUEST_LIFETIME_MS as ux, HANDOFF_PIECE_BYTES as uy, X401_SCHEME as v, DEVICE_PING_FRAME as vC, toBase64 as vE, readAppRevocation as vS, budgetRetryMs as vT, WEBRTC_GUARD as v_, decodeSvcbRecords as va, setUpdateMessage as vb, StatusSender as vc, IdentityCheckUnavailable as vd, relayUrl as vf, isRatcheted as vg, statusCardBytes as vh, parseDidSignaturePaste as vi, WakeLimiter as vl, forwardedAgain as vm, MAX_GROUP_META_BODY as vn, LIVENESS_PING_MS as vo, PLAYABLE_AUDIO as vp, hash160 as vr, readGroupSignal as vs, shortHash as vt, APPS_CAPABILITY as vu, extractParamsFromSdp as vv, turnPacket as vw, contactAskerHolds as vx, NO_ATTEMPTS as vy, decodeX401Header as w, deviceKeyZ32 as wC, __esmMin as wE, signAppRevocation as wS, PKARR_FUTURE_SKEW_MS as wT, HttpHost as w_, fetchLnurlJson as wa, ENROLL_DONE as wb, statusFrame as wc, identityRefusal as wd, HoldKeys as wf, ratchetSessionOf as wg, claimedTime as wh, DID_DHT_TTL as wi, relayRequest as wl, REACTED_FRAME as wm, groupMetaBody as wn, PONG_WAIT_MS as wo, fileMessageText as wp, ATPROTO_DECLARED_SCOPE as wr, meshRendezvous as ws, KNOCK_TTL_MS as wt, FILES_CAPABILITY as wu, pickCallCandidates as wv, turnVerifierMark as ww, linkRecords as wx, handoffAttemptSucceeded as wy, buildX401ProofResult as x, deviceEchoFrame as xC, utf8Decode as xE, readAppSignature as xS, publishedNowhere as xT, viewerGuardOffset as x_, pubkyHomeserverOf as xa, DEVICE_KINDS as xb, personStatus as xc, boundVerifiedIdentity as xd, HOLD_CAPABILITY as xf, ratchetOpen as xg, usageLeft as xh, strictBase64Url as xi, parseWakeFrame as xl, COMMUNITY_REACTION_FRAME as xm, MAX_GROUP_PICTURE_LENGTH as xn, PAIRED_FRAME_TOO_LARGE as xo, VOICE_METER as xp, u32$1 as xr, NO_HUB_POLICY as xs, verifyCommunityChainPaced as xt, CALLS_CAPABILITY as xu, isGlobalIpv4Host as xv, turnSequence as xw, knockSlotIdentity as xx, handoffAckFrame as xy, X401_VERSION as y, ENROLL_CAPABILITY as yC, toBase64Url as yE, readAppRevocationShape as yS, heldBackError as yT, allowingViewerGuard as y_, encodeSvcbPacket as ya, signTombstone as yb, liveStatus as yc, IdentityExchange as yd, relayedTransports as yf, ratchetHeard as yg, statusCardText as yh, signingKeys as yi, deviceWakeRequest as yl, forwardedMany as ym, MAX_GROUP_NAME_BYTES as yn, MAX_PAIRED_MESSAGE_FRAME as yo, RECORDING_TYPES as yp, sha256d as yr, GROUP_VERSION_HUBS as ys, signCommunity as yt, APP_RANGES_CAPABILITY as yu, heardCallSignal as yv, turnPayloadSequence as yw, contactDay as yx, filePartDigest as yy, planAppUpdate as z, TURN_SETTLE_MS as zC, CONTACT_LINK_VERSION as zS, IDENTITY_MEMO_MAX as zT, withViewerPolicy as z_, isFederationId as za, verifyEnrollProof as zb, sanitizeTypingStatus as zc, PeerProofs as zd, domainTxtRecord as zf, DirectPathWatch as zg, commitUntaggedHash as zh, EVM_TEST_CHAINS as zi, APP_RANGE_ERRORS as zl, wireReaction as zm, verifyGroupMetaSignature as zn, pairedMessageFits as zo, parseVideoMeta as zp, decodeAtprotoCommit as zr, pickHubs as zs, GroupWakeLimiter as zt, PairedSession as zu, decodeServices as zv, GROUP_BURST_MS as zw, APP_FORBIDDEN_KEYS as zx, handoffPakeFrame as zy };
42543
43008
 
42544
- //# sourceMappingURL=src-BN4AAuHI.js.map
43009
+ //# sourceMappingURL=src-B9HeOlsG.js.map