@fkn/lib 0.9.40 → 0.9.42
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.
- package/account-generation-B-6Pn0b5.cjs +1 -0
- package/account-generation-XNWOvLea.js +28 -0
- package/account.cjs +1 -1
- package/account.d.ts +11 -0
- package/account.js +8 -20
- package/api--LOXTOpv.cjs +3 -0
- package/{api-Dp-2AT3u.js → api-DIgTslNb.js} +154 -114
- package/{api-BE5zPvFZ.d.ts → api-SwxtiYVU.d.ts} +38 -14
- package/api.cjs +1 -1
- package/api.d.ts +3 -3
- package/api.js +2 -2
- package/attach-policy.cjs +1 -1
- package/attach-policy.js +2 -2
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -1
- package/cloud/fs/promises.d.ts +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +4 -4
- package/cloud/fs.js +31 -24
- package/cloud/net.d.ts +1 -1
- package/cloud-868OlBKn.cjs +1 -0
- package/{cloud-5eldoFxK.d.ts → cloud-DUH-v10C.d.ts} +6 -4
- package/cloud-f3j4s8yZ.js +545 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +4 -4
- package/cloud.js +2 -2
- package/{contract-Cvr_8gCL.d.ts → contract-CCxPKIC7.d.ts} +105 -13
- package/contract.d.ts +3 -2
- package/dgram.cjs +1 -1
- package/dgram.d.ts +2 -2
- package/dgram.js +1 -1
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -1
- package/dns.js +1 -1
- package/extension-BOBuYwZc.js +92 -0
- package/extension-hoUs5yJ7.cjs +1 -0
- package/{extension-DMU-CwMw.d.ts → extension-yhwDSIiD.d.ts} +22 -3
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +3 -3
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +1 -1
- package/fs/promises.js +1 -1
- package/fs-CVnmXRf7.js +513 -0
- package/{fs--NhtUyYa.d.ts → fs-D0MMRnHC.d.ts} +8 -4
- package/fs-p0bOOj5n.cjs +1 -0
- package/fs.cjs +1 -1
- package/fs.d.ts +4 -3
- package/fs.js +4 -2
- package/{hosts-9dYv63ud.cjs → hosts-GNBhZO3-.cjs} +1 -1
- package/{hosts-BzbzOhG8.js → hosts-t7CKGTRz.js} +4 -1
- package/http.d.ts +1 -1
- package/{index-D2CA-NX5.d.ts → index-BtFiGoVQ.d.ts} +465 -51
- package/{index-kuPqkS_-.d.ts → index-D2lvaQDs.d.ts} +28 -38
- package/index.cjs +1 -1
- package/index.d.ts +17 -17
- package/index.js +62 -59
- package/lib-CfdmsLoI.cjs +53 -0
- package/{lib-C4Eeg9eM.js → lib-DppqX10G.js} +470 -302
- package/{messages-C66ghz_A.d.ts → messages-CRcziTuC.d.ts} +17 -1
- package/messages.cjs +1 -1
- package/messages.d.ts +2 -2
- package/messages.js +2 -2
- package/{net-zThwNoA8.d.ts → net-DcLF-6E-.d.ts} +2 -2
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +1 -1
- package/{node-fs-BZy9bzKd.js → node-fs-CK2wWIYS.js} +140 -137
- package/node-fs-nfX7wisL.cjs +1 -0
- package/opfs.cjs +1 -1
- package/opfs.js +1 -1
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.d.ts +1 -1
- package/packages.js +14 -14
- package/{proxy-Dc0gDOxz.d.ts → proxy-CE46SkyA.d.ts} +2 -2
- package/{proxy-DjoPtJH9.cjs → proxy-CFK-KiwE.cjs} +1 -1
- package/{proxy-DMTdQ4dN.js → proxy-Dixbk1WL.js} +1 -1
- package/rooms.cjs +1 -1
- package/rooms.d.ts +1 -1
- package/rooms.js +11 -11
- package/storage-BVr2Rb-d.d.ts +167 -0
- package/storage-D2cUJlVH.cjs +1 -0
- package/storage-Dn1gTLSZ.js +123 -0
- package/api-jOTOA-5n.cjs +0 -3
- package/cloud-BLv19j-W.js +0 -480
- package/cloud-D7aQY4GH.cjs +0 -1
- package/extension-B9v933cT.js +0 -89
- package/extension-D2zMdc2f.cjs +0 -1
- package/fs-CaQFRiIT.cjs +0 -1
- package/fs-D3IsGdnN.js +0 -360
- package/lib-BfAg9mHD.cjs +0 -53
- package/node-fs-BNTPsX5c.cjs +0 -1
- package/storage-BJd-mWHE.cjs +0 -1
- package/storage-DSvL-t80.js +0 -67
- package/storage-ZrY4Y4L5.d.ts +0 -88
|
@@ -1,36 +1,21 @@
|
|
|
1
|
-
import { a as WriteData
|
|
2
|
-
import { d as storage_d_exports,
|
|
3
|
-
|
|
4
|
-
type FileEntry = {
|
|
5
|
-
path: string;
|
|
6
|
-
size: number;
|
|
7
|
-
contentType: string | null;
|
|
8
|
-
updatedAt: string | null;
|
|
9
|
-
};
|
|
10
|
-
type WriteData = Blob | ArrayBuffer | Uint8Array | string;
|
|
11
|
-
type FileSystem = {
|
|
12
|
-
available: () => Promise<boolean>;
|
|
13
|
-
list: () => Promise<FileEntry[]>;
|
|
14
|
-
readFile: (path: string) => Promise<Blob>;
|
|
15
|
-
writeFile: (path: string, data: WriteData, opts?: {
|
|
16
|
-
contentType?: string;
|
|
17
|
-
}) => Promise<void>;
|
|
18
|
-
remove: (path: string) => Promise<void>;
|
|
19
|
-
};
|
|
1
|
+
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-BQgZVQl7.js";
|
|
2
|
+
import { a as StorageAccountChangedError, b as PinOptions, d as captureAccount$1, g as storage_d_exports, i as SealedRead, o as StorageAccountPinUnsupportedError, p as isAccountChanged, v as FileEntry, x as WriteData$1, y as FileSystem } from "./storage-BVr2Rb-d.js";
|
|
3
|
+
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-CRcziTuC.js";
|
|
20
4
|
declare namespace hybrid_d_exports {
|
|
21
|
-
export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, FileEntry, FileSystem, WriteData, adopt$1 as adopt, adoptable$1 as adoptable, available$1 as available, list, onConflict$1 as onConflict, pending$1 as pending, pendingDeletes$1 as pendingDeletes, pull$1 as pull, readFile$1 as readFile, readFileSealed$1 as readFileSealed, remove, replicating$1 as replicating, writeFile$1 as writeFile };
|
|
5
|
+
export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, FileEntry, FileSystem, WriteData$1 as WriteData, adopt$1 as adopt, adoptable$1 as adoptable, available$1 as available, captureAccount, list, onConflict$1 as onConflict, pending$1 as pending, pendingDeletes$1 as pendingDeletes, pull$1 as pull, readFile$1 as readFile, readFileSealed$1 as readFileSealed, remove, replicating$1 as replicating, writeFile$1 as writeFile };
|
|
22
6
|
}
|
|
7
|
+
declare const captureAccount: typeof captureAccount$1;
|
|
23
8
|
declare const available$1: () => Promise<boolean>;
|
|
24
9
|
declare const pending$1: () => string[];
|
|
25
10
|
declare const pendingDeletes$1: () => string[];
|
|
26
11
|
declare const replicating$1: () => boolean;
|
|
27
|
-
declare const list: () => Promise<FileEntry[]>;
|
|
28
|
-
declare const readFile$1: (path: string) => Promise<Blob>;
|
|
29
|
-
declare const readFileSealed$1: (path: string) => Promise<SealedRead>;
|
|
30
|
-
declare const writeFile$1: (path: string, data: WriteData, opts?: {
|
|
12
|
+
declare const list: (opts?: PinOptions) => Promise<FileEntry[]>;
|
|
13
|
+
declare const readFile$1: (path: string, opts?: PinOptions) => Promise<Blob>;
|
|
14
|
+
declare const readFileSealed$1: (path: string, opts?: PinOptions) => Promise<SealedRead>;
|
|
15
|
+
declare const writeFile$1: (path: string, data: WriteData$1, opts?: {
|
|
31
16
|
contentType?: string;
|
|
32
|
-
}) => Promise<void>;
|
|
33
|
-
declare const remove: (path: string) => Promise<void>;
|
|
17
|
+
} & PinOptions) => Promise<void>;
|
|
18
|
+
declare const remove: (path: string, opts?: PinOptions) => Promise<void>;
|
|
34
19
|
declare const pull$1: (path: string) => Promise<Blob>;
|
|
35
20
|
type AdoptSummary = {
|
|
36
21
|
uploaded: string[];
|
|
@@ -71,29 +56,34 @@ type FileConflict = {
|
|
|
71
56
|
* pins against a real channel. So a resolver whose answer ever crossed a realm would simply read as a
|
|
72
57
|
* merge: one redundant write, never a wrong file.
|
|
73
58
|
*/
|
|
74
|
-
type ConflictResolution = WriteData | null;
|
|
59
|
+
type ConflictResolution = WriteData$1 | null;
|
|
75
60
|
type ConflictResolver = (conflict: FileConflict) => Promise<ConflictResolution> | ConflictResolution;
|
|
76
61
|
declare const onConflict$1: (next: ConflictResolver) => (() => void);
|
|
62
|
+
/**
|
|
63
|
+
* Pushes the local files the account lacks, after what replication owes. It acts for the account
|
|
64
|
+
* this page is on when it is called: an entry queued for another account is skipped and stays queued
|
|
65
|
+
* for it, and a switch while it runs refuses the rest with `StorageAccountChangedError`.
|
|
66
|
+
*/
|
|
77
67
|
declare const adopt$1: () => Promise<AdoptSummary>;
|
|
78
68
|
declare const adoptable$1: () => Promise<{
|
|
79
69
|
paths: string[];
|
|
80
70
|
bytes: number;
|
|
81
71
|
}>;
|
|
82
72
|
declare namespace index_d_exports {
|
|
83
|
-
export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, SealedRead, Stats, adopt, adoptable, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, lstatSync, mkdir, mkdirSync, mount, onConflict, pending, pendingDeletes, promises, pull, readFile, readFileSealed, readFileSync, readdir, readdirSync, remount, rename, renameSync, replicating, rm, rmSync, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|
|
73
|
+
export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, SealedRead, Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, adopt, adoptable, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, isAccountChanged, lstatSync, mkdir, mkdirSync, mount, onConflict, pending, pendingDeletes, promises, pull, readFile, readFileSealed, readFileSync, readdir, readdirSync, remount, rename, renameSync, replicating, rm, rmSync, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|
|
84
74
|
}
|
|
85
|
-
declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: WriteData
|
|
75
|
+
declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, existsSync: (path: import("node:fs").PathLike) => boolean, statSync: (path: import("node:fs").PathLike) => Stats, lstatSync: (path: import("node:fs").PathLike) => Stats, readdirSync: (path: import("node:fs").PathLike) => string[], mkdirSync: (path: import("node:fs").PathLike, options?: MakeOptions) => void, rmSync: (path: import("node:fs").PathLike, options?: {
|
|
86
76
|
recursive?: boolean;
|
|
87
77
|
force?: boolean;
|
|
88
78
|
}) => void, rmdirSync: (path: import("node:fs").PathLike, options?: {
|
|
89
79
|
recursive?: boolean;
|
|
90
|
-
}) => void, unlinkSync: (path: import("node:fs").PathLike) => void, renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData
|
|
80
|
+
}) => void, unlinkSync: (path: import("node:fs").PathLike) => void, renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
|
|
91
81
|
recursive?: boolean;
|
|
92
82
|
force?: boolean;
|
|
93
83
|
} | Callback<void>, b?: Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: Callback<void>) => void, exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void, promises: {
|
|
94
84
|
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
95
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData
|
|
96
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData
|
|
85
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
86
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
97
87
|
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
98
88
|
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
99
89
|
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
@@ -120,8 +110,8 @@ declare const onConflict: typeof onConflict$1;
|
|
|
120
110
|
declare const _default: {
|
|
121
111
|
available: () => Promise<boolean>;
|
|
122
112
|
readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string;
|
|
123
|
-
writeFileSync: (path: import("node:fs").PathLike, data: WriteData
|
|
124
|
-
appendFileSync: (path: import("node:fs").PathLike, data: WriteData
|
|
113
|
+
writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
114
|
+
appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
125
115
|
existsSync: (path: import("node:fs").PathLike) => boolean;
|
|
126
116
|
statSync: (path: import("node:fs").PathLike) => Stats;
|
|
127
117
|
lstatSync: (path: import("node:fs").PathLike) => Stats;
|
|
@@ -137,8 +127,8 @@ declare const _default: {
|
|
|
137
127
|
unlinkSync: (path: import("node:fs").PathLike) => void;
|
|
138
128
|
renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void;
|
|
139
129
|
readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void;
|
|
140
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData
|
|
141
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData
|
|
130
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
131
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
142
132
|
stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void;
|
|
143
133
|
readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void;
|
|
144
134
|
mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void;
|
|
@@ -151,8 +141,8 @@ declare const _default: {
|
|
|
151
141
|
exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void;
|
|
152
142
|
promises: {
|
|
153
143
|
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
154
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData
|
|
155
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData
|
|
144
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
145
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
156
146
|
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
157
147
|
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
158
148
|
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-CfdmsLoI.cjs"),n=require("./api--LOXTOpv.cjs"),r=require("./busy-Dv8wzE5M.cjs"),i=require("./cloud-868OlBKn.cjs"),a=require("./dns.cjs"),o=require("./net.cjs"),s=require("./dgram.cjs"),c=require("./http.cjs"),l=require("./extension-hoUs5yJ7.cjs"),u=require("./desktop.cjs"),d=require("./fs-p0bOOj5n.cjs"),f=require("./opfs.cjs"),p=require("./packages.cjs"),m=require("./rooms.cjs"),h=require("./account.cjs"),g=require("./connect-button-BpXDs7tw.cjs");let _=require("osra");var v=1e4,y=150,b=()=>new Promise(e=>{if(t.$())return e(!0);let n,r=setTimeout(()=>i(t.$()),v),i=t=>{clearTimeout(n),clearTimeout(r),o.disconnect(),document.removeEventListener(`readystatechange`,s),e(t)},a=()=>{clearTimeout(n),n=setTimeout(()=>i(t.$()),y)},o=new MutationObserver(()=>{t.$()&&i(!0)}),s=()=>{document.readyState===`complete`&&!t.$()&&a()};o.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-fkn-extension`]}),document.addEventListener(`readystatechange`,s),document.readyState===`complete`&&a()}),x=(async e=>{let{kind:n,cookies:r}=t.o(e);if(n===`window`){let n=e;return r===`native`?t.a(n):i.i(n)}let a=e;return r===`native`?S(a):i.i(a)}),S=async e=>(i.a(e),await b(),t.a(e)),C=`https://fkn.app`,w=async(e,t)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let i=await n.f;if(!i)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);n.d();let a=r.t(`relayed worker`);t?.unregisterSignal?.aborted?a():t?.unregisterSignal?.addEventListener(`abort`,a,{once:!0});let o=i.emit instanceof MessagePort?{}:{originA:t?.originA??C,originB:t?.originB??`*`};(0,_.relay)(i,e,{key:`fkn-api`,...o,unregisterSignal:t?.unregisterSignal})},T=async()=>typeof window>`u`?!1:(await n.o).connect.prompt(location.origin).catch(()=>!1),E=async()=>typeof window>`u`?null:(await n.o).relay.prompt().catch(()=>null),D=new Set,O=e=>(D.add(e),()=>{D.delete(e)}),k=()=>{if(D.size===0)return!1;for(let e of[...D])try{e()}catch{}return!0},A=(e,t)=>{if(typeof e?.onUpdateTaken==`function`)return Promise.resolve(e.onUpdateTaken(t))},j=e.t({applyUpdate:()=>W,busyReasons:()=>U,onUpdate:()=>R,onUpdateTaken:()=>z,updateReady:()=>M}),M=async()=>typeof window>`u`?!1:n.o.then(e=>e.shell?.updateReady()).then(e=>e===!0).catch(()=>!1),N=new Set,P=!1,F=()=>{P=!0;for(let e of[...N])try{e()}catch{}},I=0,L=()=>{let e=n.c();e&&N.size!==0&&I!==e.epoch&&(I=e.epoch,P=!1,Promise.resolve(e.remote.shell?.onUpdate(F)).catch(()=>{I===e.epoch&&(I=0)}))};typeof window<`u`&&n.u(L);var R=async e=>{if(typeof window>`u`)return()=>{};if(N.add(e),P)try{e()}catch{}return L(),()=>{N.delete(e)}},z=e=>typeof window>`u`?()=>{}:O(e),B=0,V=!1,H=()=>{if(!k()&&!V){V=!0;try{location.reload()}catch{}}};typeof window<`u`&&n.u(()=>{let e=n.c();if(!e||B===e.epoch)return;B=e.epoch;let t=A(e.remote.shell,H);if(!t){B=0;return}t.catch(()=>{B===e.epoch&&(B=0)})});var U=()=>r.n(),W=async()=>typeof window>`u`?!1:n.o.then(e=>e.shell?.applyUpdate()).then(e=>e===!0).catch(()=>!1);exports.ATTACH_FRAME_EVENT_KEY=t.i,exports.CATEGORIES=t.C,exports.EXTENSION_ABI=t.rt,exports.ExtensionOperationUnsupportedError=t.it,exports.ExtensionOutdatedError=t.at,exports.FORGEABLE_HEADERS=t.J,exports.FrameWindowBlockedError=t.h,exports.FrameWindowRefusedError=t.g,exports.LOCATOR_DENIED=t.O,exports.LOCATOR_ERROR=t.N,exports.LOCATOR_INVALID=t.F,exports.LOCATOR_UNSUPPORTED=t.T,exports.PERMISSION_DENIED=t.t,exports.REQUIRED_EXTENSION_ABI=t.ot,exports.TimeoutError=t.w,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return h.t}}),exports.assertAttachableFrameUrl=t.b,exports.assertFetchableUrl=t.V,exports.assertForgeableHeaders=t.Y,exports.assertLockdownApplicable=t.x,exports.assertOneCookieIdentity=t.X,exports.attachFrame=x,exports.attachFramePermission=t._,exports.box=t.lt,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return i.n}}),exports.connect=T,exports.connectButtonUrl=g.t,exports.cookies=t.z,exports.createFrame=t.v,exports.createVideoElementHandle=t.ut,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return s.t}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return l.t}}),exports.fetch=l.n,exports.fetchCredentialedPermission=t.U,exports.fetchLocalPermission=t.W,exports.fetchPermission=t.G,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return d.u}}),exports.gotoPermission=t.y,exports.handleRevivableModules=t.ct,exports.hasForgedCookie=t.Z,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return c.t}}),exports.isBlockedFetchUrl=t.K,exports.isBlockedFrameUrl=t.S,exports.isExtensionExposed=t.$,exports.isLocalNetworkUrl=t.q,exports.isLocatorDenied=t.P,exports.isLocatorInvalid=t.A,exports.isLocatorUnsupported=t.E,exports.isPermissionDenied=t.n,exports.isTerminalError=t.M,exports.isType=t.dt,exports.modifyRequestHeadersPermission=t.I,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return o.t}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return f.t}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return p.t}}),exports.permissions=t.r,exports.promptInstall=l.i,exports.promptRelay=E,exports.readCookiePermission=t.B,exports.readExtensionHandshake=t.et,exports.relayWorker=w,exports.removeRequestHeaderRule=t.L,exports.revive=t.ft,Object.defineProperty(exports,"rooms",{enumerable:!0,get:function(){return m.t}}),exports.setMissingExtensionHandler=t.tt,exports.setRequestHeaderRule=t.R,Object.defineProperty(exports,"shell",{enumerable:!0,get:function(){return j}}),exports.supportsOperation=t.st,exports.type=t.pt,exports.waitForExtensionExposure=t.nt;
|
package/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { t as account_d_exports } from "./account.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as
|
|
4
|
-
import { n as cloud_d_exports } from "./cloud-
|
|
2
|
+
import { $ as SelectorPart, A as gotoPermission, B as handleRevivableModules, C as FrameWindowRefusal, D as WindowFrame, E as Locator, F as PermissionRequest, G as createVideoElementHandle, H as RemoteVideoElement, I as permissions, J as type, K as isType, L as CATEGORIES, M as CategoryRequest, N as LegacyPermissionRequest, O as attachFramePermission, P as PermissionGrant, Q as OperationRequest, R as CategoryMeta, S as FrameWindowOptions, T as GotoOptions, U as VideoElementState, V as BoxedVideoElement, W as box, X as Gate, Y as Executor, Z as GateTools, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as CategoryGrant, k as createFrame, l as ClearCookiesOptions, m as FrameBackendEvent, o as AttachFrameOptions, p as FrameBackend, q as revive, r as AttachFrameFunction, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as PermissionCategory } from "./index-BtFiGoVQ.js";
|
|
3
|
+
import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as TimeoutError, K as LOCATOR_INVALID, L as fetchPermission, M as ProxyFetchRequest, N as assertFetchableUrl, O as SiteCookie, Q as isTerminalError, R as isBlockedFetchUrl, S as HeaderOperation, T as removeRequestHeaderRule, U as hasForgedCookie, V as assertForgeableHeaders, W as LOCATOR_DENIED, X as isLocatorInvalid, Y as isLocatorDenied, Z as isLocatorUnsupported, _ as PermissionDeniedError, b as assertLockdownApplicable, c as setMissingExtensionHandler, d as ExtensionHandshake, f as ExtensionOperationUnsupportedError, g as PERMISSION_DENIED, h as supportsOperation, i as promptInstall, j as FetchInit, k as cookies, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, n as fetch, o as isExtensionExposed, p as ExtensionOutdatedError, q as LOCATOR_UNSUPPORTED, s as readExtensionHandshake, t as extension_d_exports, u as EXTENSION_ABI, v as isPermissionDenied, w as modifyRequestHeadersPermission, x as isBlockedFrameUrl, y as assertAttachableFrameUrl, z as isLocalNetworkUrl } from "./extension-yhwDSIiD.js";
|
|
4
|
+
import { n as cloud_d_exports } from "./cloud-DUH-v10C.js";
|
|
5
5
|
import { t as dns_d_exports } from "./dns.js";
|
|
6
|
-
import {
|
|
7
|
-
import { s as net_d_exports } from "./net-zThwNoA8.js";
|
|
6
|
+
import { s as net_d_exports } from "./net-DcLF-6E-.js";
|
|
8
7
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
9
8
|
import { t as http_d_exports } from "./http.js";
|
|
10
9
|
import { t as desktop_d_exports } from "./desktop.js";
|
|
10
|
+
import { u as index_d_exports } from "./index-D2lvaQDs.js";
|
|
11
11
|
import { t as index_d_exports$1 } from "./opfs.js";
|
|
12
12
|
import { t as packages_d_exports } from "./packages.js";
|
|
13
13
|
import { t as rooms_d_exports } from "./rooms.js";
|
|
14
14
|
import { t as connectButtonUrl } from "./connect-button-Cp0NS95-.js";
|
|
15
15
|
//#region src/frame.d.ts
|
|
16
16
|
/**
|
|
17
|
-
* Attaches FKN to an iframe the app mounted,
|
|
18
|
-
*
|
|
17
|
+
* Attaches FKN to an iframe the app mounted, or with `{ window }` opens the attachment in a window
|
|
18
|
+
* of its own. `cookies` picks the jar and with it the backend (`AttachCookies`): `'persistent'`, the
|
|
19
|
+
* default, and `'ephemeral'` run on the cloud render proxy whatever is installed, and never wait for
|
|
20
|
+
* the extension; `'native'` runs on the extension, waiting for it to expose itself while the page
|
|
21
|
+
* loads (at most 10000 ms) and showing the install prompt when it does not. A `blank` attach is the
|
|
22
|
+
* cloud render proxy's alone, so beside `'native'` it is a TypeError. `frame.backend()` says which
|
|
23
|
+
* backend serves an attachment.
|
|
19
24
|
*
|
|
20
25
|
* A window opens before the first await, so call this directly in the click or key handler whose
|
|
21
|
-
* activation opens it.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* is refused at once with `ExtensionOperationUnsupportedError` (operation `'attachWindow'`), before
|
|
26
|
-
* anything opens or is waited for, so the same click can still open one with
|
|
27
|
-
* `cloud.attachFrame({ window })`. That window runs on this app's cloud cookie jar, not on the
|
|
28
|
-
* extension's: a sign-in made in it reaches this app's cloud frames, never an iframe attached
|
|
29
|
-
* through the extension.
|
|
26
|
+
* activation opens it. On `'persistent'` or `'ephemeral'` it opens on the cloud, extension or not. On
|
|
27
|
+
* `'native'` it is refused at once with `ExtensionOperationUnsupportedError` (operation
|
|
28
|
+
* `'attachWindow'`), before anything opens or is waited for, so the same click can still open one on
|
|
29
|
+
* another value.
|
|
30
30
|
*/
|
|
31
31
|
export declare const attachFrame: AttachFrameFunction;
|
|
32
32
|
//#endregion
|
|
@@ -129,4 +129,4 @@ declare const busyReasons: () => string[];
|
|
|
129
129
|
*/
|
|
130
130
|
declare const applyUpdate: () => Promise<boolean>;
|
|
131
131
|
//#endregion
|
|
132
|
-
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, AttachWindowOptions, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, CookieDetails, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, VideoElementState, WindowFrame, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFramePermission, box, cloud_d_exports as cloud, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, rooms_d_exports as rooms, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, supportsOperation, type, waitForExtensionExposure };
|
|
132
|
+
export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, TimeoutError, VideoElementState, WindowFrame, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFramePermission, box, cloud_d_exports as cloud, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, rooms_d_exports as rooms, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, supportsOperation, type, waitForExtensionExposure };
|
package/index.js
CHANGED
|
@@ -1,87 +1,90 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { $ as t, A as n, B as r,
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { t as
|
|
12
|
-
import { u as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { relay as
|
|
2
|
+
import { $ as t, A as n, B as r, C as i, E as a, F as o, G as s, I as ee, J as te, K as ne, L as re, M as ie, N as c, O as ae, P as oe, R as se, S as l, T as ce, U as le, V as ue, W as de, X as u, Y as d, Z as f, _ as p, a as m, at as h, b as g, ct as _, dt as v, et as y, ft as b, g as x, h as S, i as C, it as w, lt as T, n as E, nt as D, o as O, ot as k, pt as A, q as j, r as M, rt as N, st as P, t as F, tt as I, ut as L, v as R, w as z, x as B, y as V, z as H } from "./lib-DppqX10G.js";
|
|
3
|
+
import { c as U, d as fe, f as pe, o as W, u as G } from "./api-DIgTslNb.js";
|
|
4
|
+
import { n as me, t as he } from "./busy-B189uX--.js";
|
|
5
|
+
import { a as ge, i as K, n as _e } from "./cloud-f3j4s8yZ.js";
|
|
6
|
+
import { t as ve } from "./dns.js";
|
|
7
|
+
import { t as ye } from "./net.js";
|
|
8
|
+
import { t as be } from "./dgram.js";
|
|
9
|
+
import { t as xe } from "./http.js";
|
|
10
|
+
import { i as Se, n as Ce, t as we } from "./extension-BOBuYwZc.js";
|
|
11
|
+
import { t as Te } from "./desktop.js";
|
|
12
|
+
import { u as Ee } from "./fs-CVnmXRf7.js";
|
|
13
|
+
import { t as De } from "./opfs.js";
|
|
14
|
+
import { t as Oe } from "./packages.js";
|
|
15
|
+
import { t as ke } from "./rooms.js";
|
|
16
|
+
import { t as Ae } from "./account.js";
|
|
17
|
+
import { t as je } from "./connect-button-DtsN3X1J.js";
|
|
18
|
+
import { relay as Me } from "osra";
|
|
19
19
|
//#region src/frame.ts
|
|
20
|
-
var
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
clearTimeout(
|
|
24
|
-
},
|
|
25
|
-
clearTimeout(
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
}),
|
|
29
|
-
document.readyState === "complete" && !
|
|
20
|
+
var Ne = 1e4, Pe = 150, Fe = () => new Promise((e) => {
|
|
21
|
+
if (t()) return e(!0);
|
|
22
|
+
let n, r = setTimeout(() => i(t()), Ne), i = (t) => {
|
|
23
|
+
clearTimeout(n), clearTimeout(r), o.disconnect(), document.removeEventListener("readystatechange", s), e(t);
|
|
24
|
+
}, a = () => {
|
|
25
|
+
clearTimeout(n), n = setTimeout(() => i(t()), Pe);
|
|
26
|
+
}, o = new MutationObserver(() => {
|
|
27
|
+
t() && i(!0);
|
|
28
|
+
}), s = () => {
|
|
29
|
+
document.readyState === "complete" && !t() && a();
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
o.observe(document.documentElement, {
|
|
32
32
|
attributes: !0,
|
|
33
33
|
attributeFilter: ["data-fkn-extension"]
|
|
34
|
-
}), document.addEventListener("readystatechange",
|
|
35
|
-
}),
|
|
36
|
-
|
|
34
|
+
}), document.addEventListener("readystatechange", s), document.readyState === "complete" && a();
|
|
35
|
+
}), Ie = (async (e) => {
|
|
36
|
+
let { kind: t, cookies: n } = O(e);
|
|
37
|
+
if (t === "window") {
|
|
37
38
|
let t = e;
|
|
38
|
-
return
|
|
39
|
+
return n === "native" ? m(t) : K(t);
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
let r = e;
|
|
42
|
+
return n === "native" ? Le(r) : K(r);
|
|
43
|
+
}), Le = async (e) => (ge(e), await Fe(), m(e)), Re = "https://fkn.app", ze = async (e, t) => {
|
|
42
44
|
if (typeof window > "u") throw Error("FKN @fkn/lib: relayWorker must be called from the main thread");
|
|
43
|
-
let n = await
|
|
45
|
+
let n = await pe;
|
|
44
46
|
if (!n) throw Error("FKN @fkn/lib: relayWorker found no FKN transport in this realm");
|
|
45
|
-
|
|
47
|
+
fe();
|
|
48
|
+
let r = he("relayed worker");
|
|
46
49
|
t?.unregisterSignal?.aborted ? r() : t?.unregisterSignal?.addEventListener("abort", r, { once: !0 });
|
|
47
50
|
let i = n.emit instanceof MessagePort ? {} : {
|
|
48
|
-
originA: t?.originA ??
|
|
51
|
+
originA: t?.originA ?? Re,
|
|
49
52
|
originB: t?.originB ?? "*"
|
|
50
53
|
};
|
|
51
|
-
|
|
54
|
+
Me(n, e, {
|
|
52
55
|
key: "fkn-api",
|
|
53
56
|
...i,
|
|
54
57
|
unregisterSignal: t?.unregisterSignal
|
|
55
58
|
});
|
|
56
|
-
},
|
|
59
|
+
}, Be = async () => typeof window > "u" ? !1 : (await W).connect.prompt(location.origin).catch(() => !1), Ve = async () => typeof window > "u" ? null : (await W).relay.prompt().catch(() => null), q = /* @__PURE__ */ new Set(), He = (e) => (q.add(e), () => {
|
|
57
60
|
q.delete(e);
|
|
58
|
-
}),
|
|
61
|
+
}), Ue = () => {
|
|
59
62
|
if (q.size === 0) return !1;
|
|
60
63
|
for (let e of [...q]) try {
|
|
61
64
|
e();
|
|
62
65
|
} catch {}
|
|
63
66
|
return !0;
|
|
64
|
-
},
|
|
67
|
+
}, We = (e, t) => {
|
|
65
68
|
if (typeof e?.onUpdateTaken == "function") return Promise.resolve(e.onUpdateTaken(t));
|
|
66
|
-
},
|
|
67
|
-
applyUpdate: () =>
|
|
68
|
-
busyReasons: () =>
|
|
69
|
-
onUpdate: () =>
|
|
70
|
-
onUpdateTaken: () =>
|
|
71
|
-
updateReady: () =>
|
|
72
|
-
}),
|
|
69
|
+
}, Ge = /* @__PURE__ */ e({
|
|
70
|
+
applyUpdate: () => Qe,
|
|
71
|
+
busyReasons: () => Ze,
|
|
72
|
+
onUpdate: () => Je,
|
|
73
|
+
onUpdateTaken: () => Ye,
|
|
74
|
+
updateReady: () => Ke
|
|
75
|
+
}), Ke = async () => typeof window > "u" ? !1 : W.then((e) => e.shell?.updateReady()).then((e) => e === !0).catch(() => !1), J = /* @__PURE__ */ new Set(), Y = !1, qe = () => {
|
|
73
76
|
Y = !0;
|
|
74
77
|
for (let e of [...J]) try {
|
|
75
78
|
e();
|
|
76
79
|
} catch {}
|
|
77
80
|
}, X = 0, Z = () => {
|
|
78
|
-
let e =
|
|
79
|
-
e && J.size !== 0 && X !== e.epoch && (X = e.epoch, Y = !1, Promise.resolve(e.remote.shell?.onUpdate(
|
|
81
|
+
let e = U();
|
|
82
|
+
e && J.size !== 0 && X !== e.epoch && (X = e.epoch, Y = !1, Promise.resolve(e.remote.shell?.onUpdate(qe)).catch(() => {
|
|
80
83
|
X === e.epoch && (X = 0);
|
|
81
84
|
}));
|
|
82
85
|
};
|
|
83
|
-
typeof window < "u" &&
|
|
84
|
-
var
|
|
86
|
+
typeof window < "u" && G(Z);
|
|
87
|
+
var Je = async (e) => {
|
|
85
88
|
if (typeof window > "u") return () => {};
|
|
86
89
|
if (J.add(e), Y) try {
|
|
87
90
|
e();
|
|
@@ -89,19 +92,19 @@ var Ge = async (e) => {
|
|
|
89
92
|
return Z(), () => {
|
|
90
93
|
J.delete(e);
|
|
91
94
|
};
|
|
92
|
-
},
|
|
93
|
-
if (!
|
|
95
|
+
}, Ye = (e) => typeof window > "u" ? () => {} : He(e), Q = 0, $ = !1, Xe = () => {
|
|
96
|
+
if (!Ue() && !$) {
|
|
94
97
|
$ = !0;
|
|
95
98
|
try {
|
|
96
99
|
location.reload();
|
|
97
100
|
} catch {}
|
|
98
101
|
}
|
|
99
102
|
};
|
|
100
|
-
typeof window < "u" &&
|
|
101
|
-
let e =
|
|
103
|
+
typeof window < "u" && G(() => {
|
|
104
|
+
let e = U();
|
|
102
105
|
if (!e || Q === e.epoch) return;
|
|
103
106
|
Q = e.epoch;
|
|
104
|
-
let t =
|
|
107
|
+
let t = We(e.remote.shell, Xe);
|
|
105
108
|
if (!t) {
|
|
106
109
|
Q = 0;
|
|
107
110
|
return;
|
|
@@ -110,6 +113,6 @@ typeof window < "u" && V(() => {
|
|
|
110
113
|
Q === e.epoch && (Q = 0);
|
|
111
114
|
});
|
|
112
115
|
});
|
|
113
|
-
var
|
|
116
|
+
var Ze = () => me(), Qe = async () => typeof window > "u" ? !1 : W.then((e) => e.shell?.applyUpdate()).then((e) => e === !0).catch(() => !1);
|
|
114
117
|
//#endregion
|
|
115
|
-
export {
|
|
118
|
+
export { C as ATTACH_FRAME_EVENT_KEY, i as CATEGORIES, N as EXTENSION_ABI, w as ExtensionOperationUnsupportedError, h as ExtensionOutdatedError, te as FORGEABLE_HEADERS, S as FrameWindowBlockedError, x as FrameWindowRefusedError, ae as LOCATOR_DENIED, c as LOCATOR_ERROR, o as LOCATOR_INVALID, ce as LOCATOR_UNSUPPORTED, F as PERMISSION_DENIED, k as REQUIRED_EXTENSION_ABI, z as TimeoutError, Ae as account, g as assertAttachableFrameUrl, ue as assertFetchableUrl, d as assertForgeableHeaders, B as assertLockdownApplicable, u as assertOneCookieIdentity, Ie as attachFrame, p as attachFramePermission, T as box, _e as cloud, Be as connect, je as connectButtonUrl, H as cookies, R as createFrame, L as createVideoElementHandle, Te as desktop, be as dgram, ve as dns, we as extension, Ce as fetch, le as fetchCredentialedPermission, de as fetchLocalPermission, s as fetchPermission, Ee as fs, V as gotoPermission, _ as handleRevivableModules, f as hasForgedCookie, xe as http, ne as isBlockedFetchUrl, l as isBlockedFrameUrl, t as isExtensionExposed, j as isLocalNetworkUrl, oe as isLocatorDenied, n as isLocatorInvalid, a as isLocatorUnsupported, E as isPermissionDenied, ie as isTerminalError, v as isType, ee as modifyRequestHeadersPermission, ye as net, De as opfs, Oe as packages, M as permissions, Se as promptInstall, Ve as promptRelay, r as readCookiePermission, y as readExtensionHandshake, ze as relayWorker, re as removeRequestHeaderRule, b as revive, ke as rooms, I as setMissingExtensionHandler, se as setRequestHeaderRule, Ge as shell, P as supportsOperation, A as type, D as waitForExtensionExposure };
|