initial commit

This commit is contained in:
Brandon4466
2025-03-31 04:45:14 -07:00
commit ff59c4c0b8
2298 changed files with 478992 additions and 0 deletions

2
node_modules/when-exit/dist/browser/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare const whenExit: (callback: import("../types.js").Callback) => import("../types.js").Disposer;
export default whenExit;

6
node_modules/when-exit/dist/browser/index.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/* IMPORT */
import Interceptor from './interceptor.js';
/* MAIN */
const whenExit = Interceptor.register;
/* EXPORT */
export default whenExit;

10
node_modules/when-exit/dist/browser/interceptor.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
import type { Callback, Disposer } from '../types.js';
declare class Interceptor {
private callbacks;
constructor();
exit: () => void;
hook: () => void;
register: (callback: Callback) => Disposer;
}
declare const _default: Interceptor;
export default _default;

27
node_modules/when-exit/dist/browser/interceptor.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
/* IMPORT */
/* MAIN */
class Interceptor {
/* CONSTRUCTOR */
constructor() {
/* VARIABLES */
this.callbacks = new Set();
/* API */
this.exit = () => {
for (const callback of this.callbacks) {
callback();
}
};
this.hook = () => {
window.addEventListener('beforeunload', this.exit);
};
this.register = (callback) => {
this.callbacks.add(callback);
return () => {
this.callbacks.delete(callback);
};
};
this.hook();
}
}
/* EXPORT */
export default new Interceptor();