@fkn/lib 0.9.43 → 0.9.45

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 (56) hide show
  1. package/{api-H1TzWitc.d.ts → api-Cuf3ynZX.d.ts} +83 -30
  2. package/api.d.ts +2 -2
  3. package/attach-policy.d.ts +11 -15
  4. package/cloud/dns.d.ts +1 -1
  5. package/cloud/fetch.d.ts +1 -1
  6. package/cloud/fs/promises.d.ts +1 -1
  7. package/cloud/fs.d.ts +3 -3
  8. package/cloud/net.d.ts +1 -1
  9. package/cloud-CKCrMMB_.cjs +1 -0
  10. package/cloud-CVWGyZRT.js +559 -0
  11. package/{cloud-Y0FzWpFT.d.ts → cloud-KBzjWzt1.d.ts} +4 -4
  12. package/cloud.cjs +1 -1
  13. package/cloud.d.ts +4 -4
  14. package/cloud.js +1 -1
  15. package/{contract-DJxGa8lb.d.ts → contract-DP_jc5pZ.d.ts} +161 -27
  16. package/contract.cjs +1 -1
  17. package/contract.d.ts +4 -4
  18. package/contract.js +9 -3
  19. package/dgram.d.ts +7 -14
  20. package/dns.d.ts +1 -1
  21. package/extension-Dmnh5pcs.js +94 -0
  22. package/{extension-BtDg-F2g.d.ts → extension-X8cnvZej.d.ts} +19 -37
  23. package/extension-YBe6Q6r_.cjs +1 -0
  24. package/extension.cjs +1 -1
  25. package/extension.d.ts +2 -2
  26. package/extension.js +3 -3
  27. package/fs/promises.d.ts +1 -1
  28. package/{fs-D0MMRnHC.d.ts → fs-KA1Mgisv.d.ts} +2 -2
  29. package/fs.d.ts +3 -3
  30. package/http.d.ts +1 -1
  31. package/{index-Cgnfjh9o.d.ts → index-C8Y-YHrU.d.ts} +42 -58
  32. package/{index-D2lvaQDs.d.ts → index-DKr9L2RI.d.ts} +6 -11
  33. package/index.cjs +1 -1
  34. package/index.d.ts +35 -38
  35. package/index.js +12 -12
  36. package/lib-D4uqe_rb.cjs +53 -0
  37. package/{lib-C3UwxjVs.js → lib-H5-e2A1h.js} +483 -468
  38. package/messages-d7pvCXPn.d.ts +34 -0
  39. package/messages.d.ts +1 -1
  40. package/{net-BOswhyfE.d.ts → net-eyWUIVn2.d.ts} +3 -19
  41. package/net.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/packages.d.ts +1 -1
  44. package/{proxy-ylK5lpw8.d.ts → proxy-8Zp-G5da.d.ts} +2 -2
  45. package/rooms.cjs +1 -1
  46. package/rooms.d.ts +94 -15
  47. package/rooms.js +118 -90
  48. package/{storage-BVr2Rb-d.d.ts → storage-BLBsmkmp.d.ts} +14 -28
  49. package/{wire-Gbo-D74t.d.ts → wire-BwA4JjZH.d.ts} +6 -12
  50. package/wire.d.ts +1 -1
  51. package/cloud-Bx64HSkQ.cjs +0 -1
  52. package/cloud-D-vDUzzx.js +0 -552
  53. package/extension-CzZn0bY2.js +0 -94
  54. package/extension-DvFf7uoG.cjs +0 -1
  55. package/lib-fqQfEPk6.cjs +0 -53
  56. package/messages-CRcziTuC.d.ts +0 -46
@@ -1,5 +1,5 @@
1
- import { D as IpFamily, Dt as UdpSocketOptions, Et as UdpDatagram, H as ProxyFetchInput, I as PackagesErrorCode, J as RoomClaimOptions, K as Resolvers, N as OverlayState, Nt as WriteData, P as PackageQuery, Q as RoomEvent, R as PickOptions, St as TcpSocketListenerOptions, T as InstallOptions, V as ProxyFetchInit, a as AccountChange, at as RoomPermission, b as FrameConsentAnswer, c as AdoptRequest, d as ConflictRequest, et as RoomJoinOptions, it as RoomOpenOptions, l as AdoptState, m as ConnectOptions, o as AccountPinOptions, p as ConnectAvailability, st as RoomsErrorCode, tt as RoomMailbox, u as ConflictChoice, wt as TcpSocketOptions, x as FrameConsentRequest, z as Placement } from "./contract-DJxGa8lb.js";
2
- import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-Gbo-D74t.js";
1
+ import { At as UdpDatagram, B as Placement, D as IpFamily, Et as TcpSocketListenerOptions, F as PackageQuery, H as ProxyFetchInit, K as ProxyJarRefusal, L as PackagesErrorCode, Lt as WriteData, N as OverlayState, Ot as TcpSocketOptions, Q as RoomClaimOptions, T as InstallOptions, U as ProxyFetchInput, X as Resolvers, a as AccountChange, at as RoomMailbox, b as FrameConsentAnswer, c as AdoptRequest, ct as RoomOpenOptions, d as ConflictRequest, dt as RoomsErrorCode, it as RoomJoinOptions, jt as UdpSocketOptions, l as AdoptState, lt as RoomPermission, m as ConnectOptions, nt as RoomEvent, o as AccountPinOptions, p as ConnectAvailability, u as ConflictChoice, x as FrameConsentRequest, z as PickOptions } from "./contract-DP_jc5pZ.js";
2
+ import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-BwA4JjZH.js";
3
3
  import { Remote } from "osra";
4
4
  //#region src/api-epochs.d.ts
5
5
  type EpochListener<T> = (remote: T, epoch: number) => void;
@@ -8,10 +8,9 @@ type EpochListener<T> = (remote: T, epoch: number) => void;
8
8
  declare const hasTransport: boolean;
9
9
  type Api = Remote<Resolvers>;
10
10
  /**
11
- * The broker api. Settles when the first connection exists, exactly as before, but resolves with a
12
- * stable facade that always routes to the NEWEST connection, so holding the resolved value across a
13
- * broker replacement is safe. A call in flight at the moment of replacement rejects with a named
14
- * error instead of hanging.
11
+ * The broker api. Settles when the first connection exists and resolves with a stable facade that
12
+ * always routes to the NEWEST connection, so holding the resolved value across a broker replacement
13
+ * is safe. A call in flight at the moment of replacement rejects with a named error instead of hanging.
15
14
  *
16
15
  * A window realm that relays its channel to a worker (`relayWorker`) moves its own calls to a channel
17
16
  * of their own, never back to the relayed one. There it also settles once the realm relays, a call in
@@ -21,23 +20,14 @@ type Api = Remote<Resolvers>;
21
20
  */
22
21
  declare const apiPromise: Promise<Api>;
23
22
  /**
24
- * `apiPromise` bounded by a deadline, for call sites that must not park forever.
23
+ * The deadline of `apiWithin`, for call sites that own a socket, a timer or a UI and must not park.
24
+ * `apiPromise` NEVER REJECTS: a broker frame that never bridges leaves it pending for the realm's
25
+ * life. In a worker the transport `{receive: self, emit: self}` is inert until the page bridges it,
26
+ * so an unbridged worker parks every socket call with no `listening`, `error` or rejection, which
27
+ * presents as a transport fault invisible from every counter.
25
28
  *
26
- * `apiPromise` NEVER REJECTS: `epochs.first` settles only when a broker connection exists, so a
27
- * broker frame that never bridges leaves it pending for the life of the realm. Awaiting it directly
28
- * is correct wherever hanging is the honest answer, and wrong wherever the caller owns a socket, a
29
- * timer or a UI that has to say something.
30
- *
31
- * That distinction is not academic. In a WORKER realm the osra transport is `{receive: self,
32
- * emit: self}`, which is inert until the page bridges it, so an unbridged worker parks every socket
33
- * call here with no `listening`, no `error` and no rejection. The engine then reports a listener
34
- * that neither succeeded nor failed, its reopen counters stay at 0 because reopen only runs from an
35
- * `error` or `close` that never arrives, and the relay is never contacted at all. That state cost a
36
- * long diagnosis: it presents as a transport fault and is invisible from every counter.
37
- *
38
- * The latch mirrors `storage.ts`: once the broker has missed one deadline, later calls stop paying
39
- * the full wait. `net.ts` needs it especially, because its listen path is `bind('::').catch(() =>
40
- * bind('0.0.0.0'))`, so an unbounded-then-rejecting version would charge the deadline twice.
29
+ * Once one deadline is missed, later calls wait only the retry deadline (as `storage.ts` does):
30
+ * `net.ts` listens with `bind('::').catch(() => bind('0.0.0.0'))` and would otherwise pay it twice.
41
31
  */
42
32
  declare const API_DEADLINE_MS = 8000;
43
33
  declare class BrokerUnreachableError extends Error {
@@ -45,15 +35,14 @@ declare class BrokerUnreachableError extends Error {
45
35
  }
46
36
  /**
47
37
  * A page's own call, refused because the page relays its FKN channel to a worker (`relayWorker`) and
48
- * the broker it reached never answered on the page's own channel within the deadline: a broker
49
- * document from before that channel, as fkn.app's service worker can still serve from its cache. The
50
- * page's own calls never fall back to the relayed channel, so this is the answer until a reload
51
- * reaches a newer broker. The relayed worker's calls are unaffected.
38
+ * the broker never answered on the page's own channel within the deadline: a broker document from
39
+ * before that channel, as fkn.app's service worker can still serve from its cache. The page's own
40
+ * calls never fall back to the relayed channel, so this is the answer until a reload reaches a newer
41
+ * broker. The relayed worker's calls are unaffected.
52
42
  *
53
- * What the page registered on the relayed channel went with it, and nothing registers it again until
54
- * then: FKN's UI on this page (the prompts and header the broker draws over it, those the worker's
55
- * calls raise included) is no longer placed, and account changes are no longer heard. So the realm also logs this error
56
- * once with `console.error` when the deadline passes, whether or not the page calls.
43
+ * What the page registered on the relayed channel went with it: FKN's UI over this page is no longer
44
+ * placed and account changes are no longer heard. So the realm also logs this error once with
45
+ * `console.error` when the deadline passes, whether or not the page calls.
57
46
  */
58
47
  declare class OwnChannelUnavailableError extends Error {
59
48
  constructor();
@@ -322,6 +311,7 @@ declare const onApiEpoch: (listener: EpochListener<{
322
311
  claimed: boolean;
323
312
  mailbox: RoomMailbox | null;
324
313
  temporaryClaims?: true;
314
+ mailboxSwitch?: true;
325
315
  defaults: () => Promise<{
326
316
  readonly send: boolean;
327
317
  readonly receive: boolean;
@@ -410,6 +400,12 @@ declare const onApiEpoch: (listener: EpochListener<{
410
400
  } | {
411
401
  ok: true;
412
402
  }>;
403
+ setMailbox: (on: boolean) => Promise<{
404
+ error: RoomsErrorCode;
405
+ message: string;
406
+ } | {
407
+ ok: true;
408
+ }>;
413
409
  release: () => Promise<{
414
410
  error: RoomsErrorCode;
415
411
  message: string;
@@ -453,6 +449,7 @@ declare const onApiEpoch: (listener: EpochListener<{
453
449
  claimed: boolean;
454
450
  mailbox: RoomMailbox | null;
455
451
  temporaryClaims?: true;
452
+ mailboxSwitch?: true;
456
453
  defaults: () => Promise<{
457
454
  readonly send: boolean;
458
455
  readonly receive: boolean;
@@ -541,6 +538,12 @@ declare const onApiEpoch: (listener: EpochListener<{
541
538
  } | {
542
539
  ok: true;
543
540
  }>;
541
+ setMailbox: (on: boolean) => Promise<{
542
+ error: RoomsErrorCode;
543
+ message: string;
544
+ } | {
545
+ ok: true;
546
+ }>;
544
547
  release: () => Promise<{
545
548
  error: RoomsErrorCode;
546
549
  message: string;
@@ -584,6 +587,7 @@ declare const onApiEpoch: (listener: EpochListener<{
584
587
  claimed: boolean;
585
588
  mailbox: RoomMailbox | null;
586
589
  temporaryClaims?: true;
590
+ mailboxSwitch?: true;
587
591
  defaults: () => Promise<{
588
592
  readonly send: boolean;
589
593
  readonly receive: boolean;
@@ -672,6 +676,12 @@ declare const onApiEpoch: (listener: EpochListener<{
672
676
  } | {
673
677
  ok: true;
674
678
  }>;
679
+ setMailbox: (on: boolean) => Promise<{
680
+ error: RoomsErrorCode;
681
+ message: string;
682
+ } | {
683
+ ok: true;
684
+ }>;
675
685
  release: () => Promise<{
676
686
  error: RoomsErrorCode;
677
687
  message: string;
@@ -714,6 +724,17 @@ declare const onApiEpoch: (listener: EpochListener<{
714
724
  onUpdateTaken: (callback: () => void) => Promise<() => Promise<void>>;
715
725
  applyUpdate: () => Promise<boolean>;
716
726
  };
727
+ proxyJar: {
728
+ key: (options?: {
729
+ prompt?: boolean;
730
+ } | undefined) => Promise<{
731
+ key: Uint8Array;
732
+ jar: string;
733
+ verified: boolean;
734
+ } | {
735
+ refused: ProxyJarRefusal;
736
+ }>;
737
+ };
717
738
  proxyFetch: (input: ProxyFetchInput, init: ProxyFetchInit) => Promise<Response>;
718
739
  webVpnTcpSocket: (options: TcpSocketOptions) => Promise<{
719
740
  localAddress: string;
@@ -1039,6 +1060,7 @@ declare const currentApiEpoch: () => {
1039
1060
  claimed: boolean;
1040
1061
  mailbox: RoomMailbox | null;
1041
1062
  temporaryClaims?: true;
1063
+ mailboxSwitch?: true;
1042
1064
  defaults: () => Promise<{
1043
1065
  readonly send: boolean;
1044
1066
  readonly receive: boolean;
@@ -1127,6 +1149,12 @@ declare const currentApiEpoch: () => {
1127
1149
  } | {
1128
1150
  ok: true;
1129
1151
  }>;
1152
+ setMailbox: (on: boolean) => Promise<{
1153
+ error: RoomsErrorCode;
1154
+ message: string;
1155
+ } | {
1156
+ ok: true;
1157
+ }>;
1130
1158
  release: () => Promise<{
1131
1159
  error: RoomsErrorCode;
1132
1160
  message: string;
@@ -1170,6 +1198,7 @@ declare const currentApiEpoch: () => {
1170
1198
  claimed: boolean;
1171
1199
  mailbox: RoomMailbox | null;
1172
1200
  temporaryClaims?: true;
1201
+ mailboxSwitch?: true;
1173
1202
  defaults: () => Promise<{
1174
1203
  readonly send: boolean;
1175
1204
  readonly receive: boolean;
@@ -1258,6 +1287,12 @@ declare const currentApiEpoch: () => {
1258
1287
  } | {
1259
1288
  ok: true;
1260
1289
  }>;
1290
+ setMailbox: (on: boolean) => Promise<{
1291
+ error: RoomsErrorCode;
1292
+ message: string;
1293
+ } | {
1294
+ ok: true;
1295
+ }>;
1261
1296
  release: () => Promise<{
1262
1297
  error: RoomsErrorCode;
1263
1298
  message: string;
@@ -1301,6 +1336,7 @@ declare const currentApiEpoch: () => {
1301
1336
  claimed: boolean;
1302
1337
  mailbox: RoomMailbox | null;
1303
1338
  temporaryClaims?: true;
1339
+ mailboxSwitch?: true;
1304
1340
  defaults: () => Promise<{
1305
1341
  readonly send: boolean;
1306
1342
  readonly receive: boolean;
@@ -1389,6 +1425,12 @@ declare const currentApiEpoch: () => {
1389
1425
  } | {
1390
1426
  ok: true;
1391
1427
  }>;
1428
+ setMailbox: (on: boolean) => Promise<{
1429
+ error: RoomsErrorCode;
1430
+ message: string;
1431
+ } | {
1432
+ ok: true;
1433
+ }>;
1392
1434
  release: () => Promise<{
1393
1435
  error: RoomsErrorCode;
1394
1436
  message: string;
@@ -1431,6 +1473,17 @@ declare const currentApiEpoch: () => {
1431
1473
  onUpdateTaken: (callback: () => void) => Promise<() => Promise<void>>;
1432
1474
  applyUpdate: () => Promise<boolean>;
1433
1475
  };
1476
+ proxyJar: {
1477
+ key: (options?: {
1478
+ prompt?: boolean;
1479
+ } | undefined) => Promise<{
1480
+ key: Uint8Array;
1481
+ jar: string;
1482
+ verified: boolean;
1483
+ } | {
1484
+ refused: ProxyJarRefusal;
1485
+ }>;
1486
+ };
1434
1487
  proxyFetch: (input: ProxyFetchInput, init: ProxyFetchInit) => Promise<Response>;
1435
1488
  webVpnTcpSocket: (options: TcpSocketOptions) => Promise<{
1436
1489
  localAddress: string;
package/api.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { K as Resolvers } from "./contract-DJxGa8lb.js";
2
- import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-H1TzWitc.js";
1
+ import { X as Resolvers } from "./contract-DP_jc5pZ.js";
2
+ import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-Cuf3ynZX.js";
3
3
  export { API_DEADLINE_MS, BrokerUnreachableError, OwnChannelUnavailableError, type Resolvers, apiInFlight, apiLastCall, apiPromise, apiWithin, currentApiEpoch, hasTransport, onApiEpoch };
@@ -2,9 +2,8 @@
2
2
  /** What `normalizeHosts` keeps beyond a bare hostname. */
3
3
  type NormalizeHostsOptions = {
4
4
  /**
5
- * Keep a bracketed IPv6 literal, in the canonical form `URL.hostname` reports, because that is
6
- * the value a document or a fetch is compared against. Off by default: only the extension's own
7
- * callers pass it, so the cloud's declared hosts (`normalizeDeclaredHosts`) stay what they were.
5
+ * Keep a bracketed IPv6 literal, in the canonical form `URL.hostname` reports (what a document or
6
+ * fetch is compared against). Off by default; only the extension's own callers pass it.
8
7
  */
9
8
  ipv6?: boolean;
10
9
  };
@@ -18,12 +17,11 @@ declare const normalizeHosts: (raw: readonly string[], { ipv6 }?: NormalizeHosts
18
17
  //#endregion
19
18
  //#region src/attach-policy.d.ts
20
19
  /**
21
- * The pure half of the middle page's frame.fetch gate: everything that can be decided from the
22
- * attachment's own facts, with no broker and no UI. The middle page enforces this on EVERY fetch
23
- * call, because any app can drive the 'fkn-attach-frame' channel directly and skip the client
24
- * library's copy of the same checks.
20
+ * The pure half of the middle page's frame.fetch gate: what can be decided from the attachment's own
21
+ * facts, with no broker and no UI. The middle page enforces it on EVERY fetch call, because any app
22
+ * can drive the 'fkn-attach-frame' channel directly and skip the library's copy of the checks.
25
23
  *
26
- * Refusals here must surface under a TERMINAL locator error name (the caller maps them through
24
+ * Refusals must surface under a TERMINAL locator error name (callers map them through
27
25
  * `locatorDeniedError`), or the shared dispatch loop retries them to its 30 second deadline and
28
26
  * reports a timeout that names neither the operation nor the reason.
29
27
  */
@@ -44,13 +42,11 @@ export type FrameFetchVerdict = {
44
42
  promptHosts: string[];
45
43
  };
46
44
  /**
47
- * How a fetch url is read.
48
- *
49
- * `'no-base'` is `new URL(url)`, which accepts the two base-dependent forms `https:h/x` and
50
- * `http:h/x` as if they named `h`. `'fetchTarget'` is the shared classifier, which calls those
51
- * relative and refuses them here. The middle page keeps `'no-base'` until the contract deploy, so
52
- * an application on an older library is refused nothing it was not refused before; the library's
53
- * own gate passes `'fetchTarget'`.
45
+ * How a fetch url is read. `'no-base'` is `new URL(url)`, which accepts the base-dependent forms
46
+ * `https:h/x` and `http:h/x` as if they named `h`. `'fetchTarget'` is the shared classifier, which
47
+ * calls those relative and refuses them. The middle page keeps `'no-base'` until the contract deploy,
48
+ * so an application on an older library is refused nothing new; the library's own gate passes
49
+ * `'fetchTarget'`.
54
50
  */
55
51
  export type FrameFetchClassifier = 'no-base' | 'fetchTarget';
56
52
  export declare const frameFetchVerdict: (policy: FrameFetchPolicy, url: unknown, { classifier }?: {
package/cloud/dns.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { s as AddressLookupResult } from "../contract-DJxGa8lb.js";
1
+ import { s as AddressLookupResult } from "../contract-DP_jc5pZ.js";
2
2
  import { lookup } from "../dns.js";
3
3
  export { type AddressLookupResult, lookup };
package/cloud/fetch.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as cloudFetch } from "../proxy-ylK5lpw8.js";
1
+ import { t as cloudFetch } from "../proxy-8Zp-G5da.js";
2
2
  export { cloudFetch as fetch };
@@ -1,5 +1,5 @@
1
1
  import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../../index-BQgZVQl7.js";
2
- import "../../fs-D0MMRnHC.js";
2
+ import "../../fs-KA1Mgisv.js";
3
3
  //#region src/cloud/fs-promises.d.ts
4
4
  export declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (_path?: import("node:fs").PathLike, _options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
5
5
  recursive?: boolean;
package/cloud/fs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as Stats } from "../index-BQgZVQl7.js";
2
- import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "../storage-BVr2Rb-d.js";
3
- import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-CRcziTuC.js";
4
- import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-D0MMRnHC.js";
2
+ import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, f as encryption, h as quota, i as SealedRead, l as StorageQuota, m as isNotFound, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isAccountChanged, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "../storage-BLBsmkmp.js";
3
+ import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-d7pvCXPn.js";
4
+ import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-KA1Mgisv.js";
5
5
  export { type CloudAvailability, type EncryptionStatus, type FileEntry, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, STORAGE_NOT_FOUND, type SealedRead, type Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, StorageLockedError, StorageNotFoundError, type StorageQuota, availability, available, encryption, isAccountChanged, isNotFound, list, mkdir, promises, quota, readFile, readFileSealed, readdir, rename, rm, stat, unlink, unlock, writeFile };
package/cloud/net.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-BOswhyfE.js";
1
+ import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-eyWUIVn2.js";
2
2
  export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-D4uqe_rb.cjs"),n=require("./hosts-GNBhZO3-.cjs"),r=require("./api--LOXTOpv.cjs"),i=require("./busy-Dv8wzE5M.cjs"),a=require("./proxy-CFK-KiwE.cjs"),o=require("./attach-policy.cjs"),s=require("./contract.cjs"),c=require("./dns.cjs"),l=require("./cloud/fs.cjs"),u=require("./net.cjs"),d=require("./dgram.cjs"),f=require("./http.cjs");let p=require("osra");var m=async()=>{let e=()=>r.s(`frame consent`);try{let t=await e();return{request:typeof t.frameConsent.request==`function`?t.frameConsent.request:void 0,ensure:t.frameConsent.ensure}}catch(t){if(!(t instanceof r.n))throw t;return{request:void 0,ensure:t=>e().then(e=>e.frameConsent.ensure(t))}}},h=[`interaction`,`storage`],g=e=>h.includes(e),_=`frame: this frame no longer holds the document the app attached it to`,v=!1,y=()=>{v||(v=!0,console.warn(`[fkn-frame] this FKN broker is too old to ask for permission categories, so nothing was asked for upfront and each capability is asked for as it is first used. Reloading the page picks up the current broker.`))},b=e=>[...e].flatMap(e=>{try{return[new URL(e).hostname]}catch{return[]}}),x=e=>{try{return t.N(t.T,e)===null}catch{return!1}},S=(e,t,n)=>n===null?`frame.${e}: the user did not grant ${t} here`:`frame.${e}: the user did not grant ${t} on ${n}`,C=e=>{let{assertLive:r,attach:i,consent:a,current:s,declaredHosts:c,documentHost:l,freshBlank:u,session:d,approvedOrigins:f}=e,p=new Set,m=()=>{try{return new URL(s()).hostname}catch{return``}},h=async()=>l?await l():m(),v=()=>n.t([...c,...b(f)]),C=async(e,t)=>(await e([t]))[0]??!1;return{gate:async({parts:e,operation:s,args:l,phase:y})=>{r();let b=n.m(s,l);if(b===null)return;let w=t.h(b);if(w===void 0||w===`auto`)return;if(s===`fetch`){let e=o.frameFetchVerdict({session:d,declaredHosts:c,approvedOrigins:f},y===`ensure`?void 0:l[0],{classifier:`fetchTarget`});if(y===`ensure`&&!d)throw t.k(e.kind===`refuse`?e.reason:``,`fetch`);if(y!==`ensure`&&e.kind===`refuse`)throw t.k(e.reason,`fetch`);let{request:r,ensure:i}=await a();if(!r){if(e.kind===`refuse`)throw t.k(e.reason,`fetch`);if(!await i({scope:n.c(l[0],l[1]).scope,hosts:e.promptHosts}))throw t.k(`frame.fetch: the user did not grant this`,`fetch`);return}let s=e.kind===`consent`?e.targetHost:await h(),u=n.t([s,...c]);if(!u.length)throw t.k(`frame: navigate the frame before fetch`,`fetch`);if(await C(r,{category:`network`,hosts:u})===!1)throw t.k(S(`fetch`,`network`,s||null),`fetch`);return}let T=await h();if(!T)throw t.k(`frame: navigate the frame before ${s}`,s);if(!v().includes(T))throw t.k(_,s);let E=t.m(b);if(E===void 0||E===`evaluation`&&T===m()&&await u?.()||w===`critical`&&p.has(`${b} ${T}`))return;let{request:D}=await a();if(!D)return;let O=n.t([T,...c]),k=w===`critical`?{key:b,hosts:O,attach:i}:{category:E,hosts:O,...g(E)&&x(e)?{attach:i}:{}},A=await C(D,k);if(A===!1)throw t.k(S(s,E,null),s);if(A===`once`&&y!==`ensure`)for(let e of O)p.add(`${b} ${e}`)},requestCategories:async e=>{r(),t.f(`frame.requestPermissions`,e);let o=await h(),s=n.t(o?[o,...c]:c);if(!s.length)throw TypeError(`frame.requestPermissions: navigate the frame or declare domains first`);let l=e.map(e=>{let n=e.key;return n===void 0?{named:void 0,critical:!1,category:e.category}:{named:n,critical:t.h(n)===`critical`,category:t.p(n)}}),u=({named:e,critical:t,category:n},r)=>({category:n,...t?{key:e}:{},hosts:s,allow:r}),{request:d}=await a();if(!d)return y(),l.map(e=>u(e,!1));let f=await d(l.map(({named:e,critical:t,category:n})=>t?{key:e,hosts:s,attach:i}:{category:n,hosts:s}));return l.map((e,t)=>u(e,f[t]!==void 0&&f[t]!==!1))},boundary:v}},w=e=>e,T=5e3,E=new Set([]),D=()=>`https://fkn.app`,O=e=>e===`persistent`?``:`incognito-${crypto.randomUUID()}`,k=(e,n,r)=>{let i,a=new Promise((e,a)=>{i=setTimeout(()=>a(typeof r==`string`?new t.E(r):r()),n)});return Promise.race([e,a]).finally(()=>clearTimeout(i))},A=e=>Object.assign(Error(e),{name:t.D}),j=`frame.postMessage: this FKN page predates frame messaging; reload the app to load the current one`,M=`frame.addScriptTag: this render proxy predates addScriptTag; reload the app`,N=`frame.addScriptTag: no answer within ${t.l}ms; the script may or may not have run`,P=`frame.clearCookies: this FKN page predates clearCookies; reload the app to load the current one`,F=`frame.clearCookies: this attachment reaches no site yet; attach a url, goto one, or declare it in domains`,I=3e4,L=`attachFrame: this FKN page predates storageState; reload the app to load the current one`,ee=2e4,R=async(e,n)=>{if(typeof e.seed!=`function`)throw t.P(L,`storageState`,`cloud`);try{await k(e.seed(n),ee,`attachFrame: the render proxy did not take the storageState seed`)}catch(e){throw t.O(e)?t.P(L,`storageState`,`cloud`):e}},te=`frame.clearCookies: the render proxy did not answer within ${I}ms; the cookies may or may not be gone, and calling it again is safe`,ne=e=>t.O(e)&&e.message===t.j(`addScriptTag`).message,z=!1,re=()=>{z||(z=!0,console.warn(`[fkn-frame] this FKN page predates frame messaging, so the page's messages and documents are never reported. Reloading the app loads the current one.`))},B=({from:e,origin:t,attach:n,signal:r})=>i=>{let a=r=>{if(r.source===null||r.source!==e()||r.origin!==t)return;let a=r.data;typeof a==`object`&&a&&a.type===`fkn-frame-message`&&a.attach===n&&typeof a.origin==`string`&&(a.kind===`message`?i({type:`message`,data:a.data,origin:a.origin,ports:r.ports}):a.kind===`document`&&i({type:`document`,origin:a.origin}))};return window.addEventListener(`message`,a,{signal:r}),()=>window.removeEventListener(`message`,a)},ie=e=>{if(typeof e!=`function`)return()=>Promise.resolve(e);let t=null;return()=>t??=e().catch(e=>{throw t=null,e})},V=({control:e,target:n,blank:r=!1,session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,guard:l,consent:u,onNavigated:d,relay:f})=>{let p=n,m=r&&i!==``,h=async()=>{if(!m)return!1;let t=typeof e.blank==`function`?await l(()=>e.blank()):``;return(typeof t!=`string`||t.split(`#`)[0]!==n.split(`#`)[0])&&(m=!1),m},g=Promise.resolve(),{gate:v,requestCategories:y,boundary:b}=C({session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,documentHost:typeof e.documentHost==`function`?()=>l(()=>e.documentHost()):void 0,current:()=>p,consent:ie(u),freshBlank:h});return t.y({backend:`cloud`,executor:{execute:(n,r,i)=>E.has(r)?Promise.reject(t.j(r,`cloud`)):(c(),l(()=>e.executeLocator(n,r,i))),highlight:async()=>{}},gate:v,requestPermissions:y,evaluate:async(n,r)=>(c(),await v({parts:[],operation:`evaluate`,args:[n,r],phase:`execute`}),k(l(()=>e.executeLocator([],`evaluate`,[n,r])),t.l,t.u)),addScriptTag:async(n,r)=>{c();let i=[n,r];await v({parts:[],operation:`addScriptTag`,args:i,phase:`execute`});try{await k(l(()=>e.executeLocator([],`addScriptTag`,i)),t.l,N)}catch(e){throw ne(e)?t.P(M,`addScriptTag`,`cloud`):e}},clearCookies:async n=>{if(c(),typeof e.clearCookies!=`function`)throw t.P(P,`clearCookies`,`cloud`);if(b().length===0)throw t.k(F,`clearCookies`);await k(l(()=>e.clearCookies(n)),I,te)},postMessage:(n,r,i)=>{if(c(),typeof e.messaging!=`function`)throw t.P(j,`postMessage`,`cloud`);if(r!==`*`&&!b().includes(new URL(r).hostname))throw t.k(_,`postMessage`);let{port1:a,port2:o}=new MessageChannel;a.postMessage({data:n,transfer:i},i);let s=[o,r],u=g.then(async()=>(await v({parts:[],operation:`postMessage`,args:s,phase:`execute`}),{answer:l(()=>e.executeLocator([],`postMessage`,s))}));return g=u.catch(()=>{}),u.then(async({answer:e})=>{await e})},listen:t=>(typeof e.messaging!=`function`&&re(),f(t)),goto:async(n,{timeout:r,...i}={})=>{let a=new URL(n,location.href).href;c(),m=!1;let s=(()=>{try{return new URL(a).origin}catch{return``}})(),u=s!==``&&!o.has(s);u&&o.add(s);try{await k(l(()=>e.goto(a,r===void 0?i:{...i,timeoutMs:r})),(r??3e4)+T,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`)}catch(e){throw u&&o.delete(s),t.c(e)}p=a,d()},url:()=>p})},ae=250,oe=500,se=65e3,ce=2e3,le=2e3,ue=2,H=2e3,de=2e3,fe=({origin:e,target:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-window`,e);return a.searchParams.set(`attach`,i),t&&a.searchParams.set(`url`,t),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.href},pe=(e,t)=>{let n=document.createElement(`iframe`),r=new URL(`/attach-jar`,e);return r.searchParams.set(`attach`,t),n.src=r.href,n.tabIndex=-1,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`style`,`display:none`),(document.body??document.documentElement).appendChild(n),n},me=(e,t)=>{let n=new MutationObserver(()=>{e.isConnected||t.aborted||(n.disconnect(),console.warn(`cloud.attachFrame: the window's jar anchor was removed from this page, so a sign-in in the window no longer reaches this app's cookie jar`))});e.parentNode&&n.observe(e.parentNode,{childList:!0}),n.observe(document.documentElement,{childList:!0}),t.addEventListener(`abort`,()=>n.disconnect(),{once:!0})},U=()=>A(`cloud.attachFrame: the attached window closed, reloaded or left the page FKN attached; attach a fresh window`),W=()=>A(`cloud.attachFrame: the attached window stopped answering; attach a fresh window`),he=()=>A(`cloud.attachFrame: the window went away before it connected; attach a fresh window`),ge=()=>A(`cloud.attachFrame: the window closed before it connected. Either the user closed it, or this page's Cross-Origin-Opener-Policy cut its link to the window`),_e=async(e,r,a)=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);let{domains:o=[],permissions:c}=e,{url:l,width:u,height:d}=t.s(e.window);if(window.origin===`null`)throw new t._(`opaque-opener`);let f=D(),m=crypto.randomUUID(),h=O(r),g=n.t(o),_=new Set;l&&_.add(new URL(l).origin);let v=r===`persistent`?pe(f,m):null,y=window.open(fe({origin:f,target:a===void 0?l:``,session:h,domains:g,attach:m}),`_blank`,`popup,width=${u},height=${d}`);if(!y)throw v?.remove(),new t.g;let b=new AbortController,x=!1,S=null,C=(e,t=!1)=>{if(S===null){S=e,b.abort(t?W():U());try{y.closed||y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.detach,attach:m,...t?{unanswered:t}:{}},f)}catch{}v&&setTimeout(()=>v.remove(),de)}};v&&me(v,b.signal);let T=new Promise((e,t)=>{b.signal.addEventListener(`abort`,()=>t(b.signal.reason),{once:!0})});T.catch(()=>{});let E=T.then(()=>{},()=>{}),A=()=>{if(b.signal.aborted)throw b.signal.reason},j=e=>b.signal.aborted?Promise.reject(b.signal.reason):Promise.race([e(),T]),M=e=>e.source===y&&e.origin===f;window.addEventListener(`message`,e=>{if(!M(e))return;let n=e.data;typeof n==`object`&&n&&n.attach===m&&(n.type===s.ATTACH_WINDOW_MESSAGE.refused?C(new t._(n.reason)):n.type===s.ATTACH_WINDOW_MESSAGE.gone&&C(x?U():he()))},{signal:b.signal}),window.addEventListener(`pagehide`,()=>C(U()),{signal:b.signal});let N=()=>{try{y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.hello,attach:m},f)}catch{}};N();let P=setInterval(N,ae),F=setInterval(()=>{y.closed&&C(x?U():ge())},oe);b.signal.addEventListener(`abort`,()=>{clearInterval(P),clearInterval(F)},{once:!0});let I=async e=>{try{return await Promise.race([e,T])}catch(e){throw S??e}};try{let e=await I(k((0,p.expose)({},{key:s.ATTACH_WINDOW_KEY,transport:{emit:(e,t)=>y.postMessage(e,f,t??[]),receive:e=>{let t=t=>{M(t)&&e(t.data,{source:t.source,origin:t.origin})};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)}},unregisterSignal:b.signal,revivableModules:w(t.dt)}),s.WINDOW_HANDSHAKE_TIMEOUT_MS,`cloud.attachFrame: timed out connecting to the window`));x=!0,clearInterval(P);let n=0,r=setInterval(()=>{k(j(()=>e.ping()),le,`ping`).then(()=>{n=0},()=>{b.signal.aborted||(document.visibilityState===`hidden`?n=0:++n>=ue&&C(W(),!0))})},ce);b.signal.addEventListener(`abort`,()=>clearInterval(r),{once:!0}),await I(k(e.ready(),se,`cloud.attachFrame: the window never became ready`)),a!==void 0&&await I(R(e,a));let o=i.t(`attached frame`);b.signal.aborted?o():b.signal.addEventListener(`abort`,o,{once:!0});let u=V({control:e,target:l,session:h,declaredHosts:g,approvedOrigins:_,attach:m,assertLive:A,guard:j,consent:{request:t=>j(()=>e.requestConsent(t)),ensure:t=>j(()=>e.requestConsent([t])).then(([e])=>e!==void 0&&e!==!1)},onNavigated:()=>{},relay:B({from:()=>y,origin:f,attach:m,signal:b.signal})}),d=null,v=Object.assign(u,{close:()=>d??=(async()=>{b.signal.aborted||await k(Promise.allSettled([j(()=>e.flushCookies()),j(()=>e.sweepStorage())]),H,`close`).catch(()=>{});try{y.close()}catch{}C(U())})(),closed:E});return a!==void 0&&l&&await I(v.goto(l)),c?.length&&await I(v.requestPermissions(c)),v}catch(e){let n=S??e;if(!(n instanceof t._))try{y.close()}catch{}throw C(n),n}},ve=2e4,G=65e3,K=e=>!e||e===`about:blank`,ye=`cloud.attachFrame: this FKN page predates blank pages; reload the app to load the current one`,be=`cloud.attachFrame: cookies: 'native' needs the FKN browser extension; the cloud render proxy has no browser cookies`,q=e=>e.split(`#`)[0]??``,J=({iframe:e,lockdown:n,cookies:r,blank:i})=>{if(i===void 0)return``;if(typeof i!=`object`||!i)throw TypeError(`attachFrame: blank must be an object { url }`);let a=Object.keys(i).find(e=>e!==`url`);if(a!==void 0)throw TypeError(`attachFrame: blank takes { url }, not "${a}"`);let{url:o}=i,s=(()=>{try{return typeof o==`string`?new URL(o):null}catch{return null}})();if(!s||s.protocol!==`http:`&&s.protocol!==`https:`)throw TypeError(`attachFrame: blank.url must be an absolute http or https url, not "${String(o)}"`);let c=e.getAttribute(`src`)??``;if(!K(c))throw TypeError(`attachFrame: blank needs an iframe with no src; this one has "${c}"`);if(n)throw TypeError(`attachFrame: blank does not combine with lockdown`);if(r===`native`)throw TypeError(`attachFrame: blank runs on the cloud render proxy, which has no browser cookies; pass cookies: 'persistent' or 'ephemeral'`);if(t.x(s.href),!Oe())throw Error(`attachFrame: a blank page is served by the cloud render proxy, which this build does not configure`);return s.href},xe=({target:e,blank:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-frame`,D());return t?a.searchParams.set(`blank`,t):e&&a.searchParams.set(`url`,e),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.searchParams.set(`attach`,i),a.href},Se=(e,t)=>{let n=()=>{a(),t()},r=e.parentNode,i=new MutationObserver(()=>{(!e.isConnected||e.parentNode!==r)&&(a(),t())}),a=()=>{window.removeEventListener(`pagehide`,n),i.disconnect()};window.addEventListener(`pagehide`,n,{once:!0}),r&&i.observe(r,{childList:!0}),e.isConnected||(a(),t())},Ce=()=>A(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),we=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},Y=[300,1200,4e3],X=e=>{let t=()=>{if(!e.isConnected)return;let t=e.style.height,n=e.getBoundingClientRect();n.height&&(e.style.height=`${n.height-1}px`,setTimeout(()=>{e.style.height=t},50))};t();for(let e of Y)setTimeout(t,e)},Te=e=>{let t=e.getAttribute(`sandbox`);if(t===null)return;let n=new Set(t.toLowerCase().split(/\s+/).filter(Boolean)),r=[`allow-scripts`,`allow-same-origin`].filter(e=>!n.has(e));if(r.length)throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(` and `)} for the render proxy to load`)},Ee=async(e,n)=>{let r=typeof e.blank==`function`?await k(e.blank(),G,`cloud.attachFrame: the render proxy never became ready`):``;if(typeof r!=`string`||q(r)!==q(n))throw t.P(ye,`blank`,`cloud`)},De=async(e,a,o)=>{let c=J(e),{iframe:l,domains:u=[],permissions:d}=e;if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(!l.isConnected)throw Error(`cloud.attachFrame: the iframe must be connected to the document before attaching`);Te(l);let f=l.getAttribute(`src`)??``,h=(()=>{if(K(f))return null;try{return new URL(l.src||f,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${f}`)}})();if(h){let e=new URL(`/attach-frame`,D());if(h.origin===e.origin&&h.pathname===e.pathname)throw Error(`cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe`)}let g=h?.href??``;g&&t.x(g);let _=o===void 0?g:``,v=O(a),y=n.t(u),b=new Set;try{b.add(new URL(c||g).origin)}catch{}let x=new AbortController,S=l.referrerPolicy,C=l.allow,T=crypto.randomUUID();if(l.referrerPolicy=`origin`,l.allow=we(r.m(),l.allow),l.src=xe({target:_,blank:c,session:v,domains:y,attach:T}),!l.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let e=await k((0,p.expose)({},{key:s.ATTACH_FRAME_KEY,origin:D(),transport:{receive:window,emit:l.contentWindow},unregisterSignal:x.signal,revivableModules:w(t.dt)}),ve,`cloud.attachFrame: timed out connecting to the render proxy page`);await k(e.ready(),G,`cloud.attachFrame: the render proxy never became ready`),c&&await Ee(e,c),o!==void 0&&await R(e,o),(g||c)&&X(l),Se(l,()=>x.abort());let n=i.t(`attached frame`);x.signal.aborted?n():x.signal.addEventListener(`abort`,n,{once:!0});let r=l.contentWindow,a=V({control:e,target:c||g,blank:c!==``,session:v,declaredHosts:y,approvedOrigins:b,attach:T,assertLive:()=>{if(x.signal.aborted||!l.isConnected||l.contentWindow!==r)throw x.abort(),Ce()},guard:e=>e(),consent:m,onNavigated:()=>X(l),relay:B({from:()=>r,origin:D(),attach:T,signal:x.signal})});return o!==void 0&&g&&await a.goto(g),d?.length&&await a.requestPermissions(d),a}catch(e){throw x.abort(),l.referrerPolicy=S,l.allow=C,l.src=_||`about:blank`,e}},Z=(async e=>{let{kind:n,cookies:r,storageState:i}=t.o(e);if(r===`native`)throw TypeError(be);return n===`window`?_e(e,r,i):De(e,r,i)}),Oe=()=>typeof window<`u`&&!0,Q=async()=>{let e=await r.o.then(e=>e.cloud.quota());return{premium:e.premium,overQuota:e.overQuota,throttled:e.overQuota&&!e.premium,usedBytes:e.usedBytes,limitBytes:e.limitBytes,remainingBytes:e.remaining,bytesPerSecond:e.bytesPerSecond,bitsPerSecond:e.bytesPerSecond*8}},ke=e.t({attachFrame:()=>Z,available:()=>$,dgram:()=>d.t,dns:()=>c.t,fetch:()=>a.t,fs:()=>l.t,http:()=>f.t,net:()=>u.t,quota:()=>Q}),$=()=>r.l;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});