diff --git a/.commitlintrc.json b/.commitlintrc.json
new file mode 100644
index 0000000..c30e5a9
--- /dev/null
+++ b/.commitlintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": ["@commitlint/config-conventional"]
+}
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index bb62692..ae99373 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -5,15 +5,22 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
+ 'prettier',
],
- ignorePatterns: ['dist', '.eslintrc.cjs'],
+ ignorePatterns: ['dist', '.eslintrc.cjs', 'thegraph', 'public'],
parser: '@typescript-eslint/parser',
- plugins: ['react-refresh'],
+ plugins: [
+ 'react-refresh',
+ 'react',
+ '@typescript-eslint',
+ 'prettier'
+ ],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-explicit-any': 'off',
+ "prettier/prettier": ["error"],
},
}
diff --git a/.gitignore b/.gitignore
index b41f7fd..543eb0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,4 +25,7 @@ dist-ssr
.env
.vite
.firebaserc
-.firebase
\ No newline at end of file
+.firebase
+
+--fix
+tsconfig.tsbuildinfo
\ No newline at end of file
diff --git a/.husky/pre-commit b/.husky/pre-commit
new file mode 100755
index 0000000..2312dc5
--- /dev/null
+++ b/.husky/pre-commit
@@ -0,0 +1 @@
+npx lint-staged
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..510c921
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+22.3.0
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..272ebe0
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,41 @@
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+/dist
+
+# misc
+.DS_Store
+*.d.ts
+.eslintrc.js
+.eslintignore
+.prettierrc.js
+.prettierignore
+tsconfig.json
+next.config.js
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+# Files generated by next-on-netlify command
+/out_publish/
+/out_functions/
\ No newline at end of file
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000..c322bc9
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,7 @@
+export default {
+ bracketSpacing: true,
+ printWidth: 100,
+ semi: true,
+ singleQuote: true,
+ trailingComma: 'all',
+}
diff --git a/README.md b/README.md
index 0d6babe..94c03ed 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,69 @@
-# React + TypeScript + Vite
+# Gnosis Shutter App
-This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
+## Overview
-Currently, two official plugins are available:
+Gnosis Shutter enhances transaction privacy and security on the Gnosis Chain. It allows users to encrypt their transactions to prevent frontrunning and censorship, with decryption and execution only occurring when they are ready to be included in a blockchain block.
-- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
-- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
+## Features
-## Expanding the ESLint configuration
+- **Encryption of Transactions**: Users can encrypt transactions using a public 'eon key' before submission.
+- **Decentralized Decryption**: Managed by a group of nodes called keypers, who ensure secure transaction decryption.
+- **Enhanced Security**: Transactions are decrypted only when they are ready to be included in a block, enhancing security and privacy.
+- **Opt-in System**: Users can choose between sending encrypted transactions or using the standard plaintext format.
+- **Shutter Timer**: Track when next shutter validator will include transactions from sequencer to the block.
-If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
+![img.png](./public/shutter-architecture.png)
-- Configure the top-level `parserOptions` property like this:
+![img.png](public/app-screenshot.png)
-```js
-export default {
- // other rules...
- parserOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- project: ['./tsconfig.json', './tsconfig.node.json'],
- tsconfigRootDir: __dirname,
- },
-}
+## Getting Started
+
+### Prerequisites
+
+- Node.js (version 22.3.0)
+- A compatible wallet (e.g., Brave Wallet)
+
+### Installation
+
+1. Clone the repository:
+ ```bash
+ git clone https://github.com/yourusername/gnosis-shutter.git
+ cd gnosis-shutter
+ ```
+
+2. Install dependencies:
+ ```bash
+ npm install
+ ```
+
+3. Configure environment variables:
+ ```bash
+ cp .env.example .env
+ ```
+
+Running the Application
+To start the application, run the following command:
+```bash
+npm run dev
```
-- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
-- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
-- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
+## Usage
+To submit an encrypted transaction:
+
+1. Connect your Brave Wallet.
+2. Select the Gnosis Chain or Chiado.
+3. Choose transfer tokens or advanced transaction (you need to copy build transaction from metamask)
+4. Sign transaction.
+5. Submit transaction to shutter sequencer contract.
+
+Transactions will be encrypted client-side and sent to the Sequencer Contract for processing.
+
+## Documentation
+For more detailed information about the Gnosis Shutter system and its components, visit the following links:
+* [Shutter Network](https://www.shutter.network/).
+* [Shutterized Gnosis Chain -- High Level Overview](https://github.com/gnosischain/specs/blob/master/shutter/high-level.md)
+* [Shutterized Gnosis Chain -- Low Level Specification](https://github.com/gnosischain/specs/blob/master/shutter/low-level.md)
+
+## Support
+
+If you need help or have any questions, please file an issue [here](https://github.com/gnosischain/shutter-encryption/issues).
diff --git a/firebase.json b/firebase.json
deleted file mode 100644
index 48ec05e..0000000
--- a/firebase.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "hosting": {
- "site": "gnosis-shutter",
- "public": "dist",
- "ignore": [
- "firebase.json",
- "**/.*",
- "**/node_modules/**"
- ],
- "rewrites": [
- {
- "source": "**",
- "destination": "/index.html"
- }
- ]
- }
-}
diff --git a/index.html b/index.html
index e50b184..4bd752a 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
Gnosis Shutter
diff --git a/package-lock.json b/package-lock.json
index 318829b..87d141c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,12 +9,17 @@
"version": "0.0.0",
"dependencies": {
"@apollo/client": "^3.11.1",
+ "@commitlint/cli": "^19.4.1",
+ "@commitlint/config-conventional": "^19.4.1",
"@nextui-org/react": "^2.3.6",
"@tanstack/react-query": "^5.45.1",
"@web3modal/wagmi": "^5.0.6",
"ethers": "^5.7.2",
"framer-motion": "^11.2.6",
+ "husky": "^9.1.5",
+ "lint-staged": "^15.2.9",
"lodash": "^4.17.21",
+ "prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sonner": "^1.5.0",
@@ -29,6 +34,9 @@
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.2.1",
+ "eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"graphql": "^16.9.0",
@@ -2219,6 +2227,944 @@
"sha.js": "^2.4.11"
}
},
+ "node_modules/@commitlint/cli": {
+ "version": "19.4.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-19.4.1.tgz",
+ "integrity": "sha512-EerFVII3ZcnhXsDT9VePyIdCJoh3jEzygN1L37MjQXgPfGS6fJTWL/KHClVMod1d8w94lFC3l4Vh/y5ysVAz2A==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/format": "^19.3.0",
+ "@commitlint/lint": "^19.4.1",
+ "@commitlint/load": "^19.4.0",
+ "@commitlint/read": "^19.4.0",
+ "@commitlint/types": "^19.0.3",
+ "execa": "^8.0.1",
+ "yargs": "^17.0.0"
+ },
+ "bin": {
+ "commitlint": "cli.js"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "license": "MIT",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "license": "ISC",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "license": "MIT"
+ },
+ "node_modules/@commitlint/cli/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "license": "MIT"
+ },
+ "node_modules/@commitlint/cli/node_modules/execa": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+ "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^8.0.1",
+ "human-signals": "^5.0.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/human-signals": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+ "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.17.0"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "license": "MIT",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@commitlint/cli/node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@commitlint/config-conventional": {
+ "version": "19.4.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.4.1.tgz",
+ "integrity": "sha512-D5S5T7ilI5roybWGc8X35OBlRXLAwuTseH1ro0XgqkOWrhZU8yOwBOslrNmSDlTXhXLq8cnfhQyC42qaUCzlXA==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "conventional-changelog-conventionalcommits": "^7.0.2"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/config-validator": {
+ "version": "19.0.3",
+ "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-19.0.3.tgz",
+ "integrity": "sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "ajv": "^8.11.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/config-validator/node_modules/ajv": {
+ "version": "8.17.1",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
+ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/@commitlint/config-validator/node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/@commitlint/ensure": {
+ "version": "19.0.3",
+ "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-19.0.3.tgz",
+ "integrity": "sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "lodash.camelcase": "^4.3.0",
+ "lodash.kebabcase": "^4.1.1",
+ "lodash.snakecase": "^4.1.1",
+ "lodash.startcase": "^4.4.0",
+ "lodash.upperfirst": "^4.3.1"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/execute-rule": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz",
+ "integrity": "sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/format": {
+ "version": "19.3.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-19.3.0.tgz",
+ "integrity": "sha512-luguk5/aF68HiF4H23ACAfk8qS8AHxl4LLN5oxPc24H+2+JRPsNr1OS3Gaea0CrH7PKhArBMKBz5RX9sA5NtTg==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "chalk": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/format/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/is-ignored": {
+ "version": "19.2.2",
+ "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-19.2.2.tgz",
+ "integrity": "sha512-eNX54oXMVxncORywF4ZPFtJoBm3Tvp111tg1xf4zWXGfhBPKpfKG6R+G3G4v5CPlRROXpAOpQ3HMhA9n1Tck1g==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "semver": "^7.6.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/lint": {
+ "version": "19.4.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.4.1.tgz",
+ "integrity": "sha512-Ws4YVAZ0jACTv6VThumITC1I5AG0UyXMGua3qcf55JmXIXm/ejfaVKykrqx7RyZOACKVAs8uDRIsEsi87JZ3+Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/is-ignored": "^19.2.2",
+ "@commitlint/parse": "^19.0.3",
+ "@commitlint/rules": "^19.4.1",
+ "@commitlint/types": "^19.0.3"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/load": {
+ "version": "19.4.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-19.4.0.tgz",
+ "integrity": "sha512-I4lCWaEZYQJ1y+Y+gdvbGAx9pYPavqZAZ3/7/8BpWh+QjscAn8AjsUpLV2PycBsEx7gupq5gM4BViV9xwTIJuw==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/config-validator": "^19.0.3",
+ "@commitlint/execute-rule": "^19.0.0",
+ "@commitlint/resolve-extends": "^19.1.0",
+ "@commitlint/types": "^19.0.3",
+ "chalk": "^5.3.0",
+ "cosmiconfig": "^9.0.0",
+ "cosmiconfig-typescript-loader": "^5.0.0",
+ "lodash.isplainobject": "^4.0.6",
+ "lodash.merge": "^4.6.2",
+ "lodash.uniq": "^4.5.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/load/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/load/node_modules/cosmiconfig": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
+ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
+ "license": "MIT",
+ "dependencies": {
+ "env-paths": "^2.2.1",
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/d-fischer"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.9.5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@commitlint/load/node_modules/cosmiconfig-typescript-loader": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz",
+ "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==",
+ "license": "MIT",
+ "dependencies": {
+ "jiti": "^1.19.1"
+ },
+ "engines": {
+ "node": ">=v16"
+ },
+ "peerDependencies": {
+ "@types/node": "*",
+ "cosmiconfig": ">=8.2",
+ "typescript": ">=4"
+ }
+ },
+ "node_modules/@commitlint/load/node_modules/parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/message": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-19.0.0.tgz",
+ "integrity": "sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/parse": {
+ "version": "19.0.3",
+ "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-19.0.3.tgz",
+ "integrity": "sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/types": "^19.0.3",
+ "conventional-changelog-angular": "^7.0.0",
+ "conventional-commits-parser": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/read": {
+ "version": "19.4.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-19.4.0.tgz",
+ "integrity": "sha512-r95jLOEZzKDakXtnQub+zR3xjdnrl2XzerPwm7ch1/cc5JGq04tyaNpa6ty0CRCWdVrk4CZHhqHozb8yZwy2+g==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/top-level": "^19.0.0",
+ "@commitlint/types": "^19.0.3",
+ "execa": "^8.0.1",
+ "git-raw-commits": "^4.0.0",
+ "minimist": "^1.2.8"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/execa": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+ "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^8.0.1",
+ "human-signals": "^5.0.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/human-signals": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+ "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.17.0"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/read/node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/resolve-extends": {
+ "version": "19.1.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-19.1.0.tgz",
+ "integrity": "sha512-z2riI+8G3CET5CPgXJPlzftH+RiWYLMYv4C9tSLdLXdr6pBNimSKukYP9MS27ejmscqCTVA4almdLh0ODD2KYg==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/config-validator": "^19.0.3",
+ "@commitlint/types": "^19.0.3",
+ "global-directory": "^4.0.1",
+ "import-meta-resolve": "^4.0.0",
+ "lodash.mergewith": "^4.6.2",
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/resolve-extends/node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@commitlint/rules": {
+ "version": "19.4.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-19.4.1.tgz",
+ "integrity": "sha512-AgctfzAONoVxmxOXRyxXIq7xEPrd7lK/60h2egp9bgGUMZK9v0+YqLOA+TH+KqCa63ZoCr8owP2YxoSSu7IgnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@commitlint/ensure": "^19.0.3",
+ "@commitlint/message": "^19.0.0",
+ "@commitlint/to-lines": "^19.0.0",
+ "@commitlint/types": "^19.0.3",
+ "execa": "^8.0.1"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/execa": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+ "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^8.0.1",
+ "human-signals": "^5.0.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/human-signals": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+ "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.17.0"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/rules/node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/to-lines": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-19.0.0.tgz",
+ "integrity": "sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/top-level": {
+ "version": "19.0.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-19.0.0.tgz",
+ "integrity": "sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ==",
+ "license": "MIT",
+ "dependencies": {
+ "find-up": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/find-up": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz",
+ "integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==",
+ "license": "MIT",
+ "dependencies": {
+ "locate-path": "^7.2.0",
+ "path-exists": "^5.0.0",
+ "unicorn-magic": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/locate-path": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
+ "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "license": "MIT",
+ "dependencies": {
+ "p-locate": "^6.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "license": "MIT",
+ "dependencies": {
+ "yocto-queue": "^1.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/p-locate": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
+ "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "license": "MIT",
+ "dependencies": {
+ "p-limit": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/path-exists": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/@commitlint/top-level/node_modules/yocto-queue": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
+ "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@commitlint/types": {
+ "version": "19.0.3",
+ "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.0.3.tgz",
+ "integrity": "sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/conventional-commits-parser": "^5.0.0",
+ "chalk": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=v18"
+ }
+ },
+ "node_modules/@commitlint/types/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
@@ -6189,6 +7135,19 @@
"node": ">=14"
}
},
+ "node_modules/@pkgr/core": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
+ "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/@react-aria/breadcrumbs": {
"version": "3.5.13",
"resolved": "https://registry.npmjs.org/@react-aria/breadcrumbs/-/breadcrumbs-3.5.13.tgz",
@@ -9264,7 +10223,16 @@
"integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==",
"dev": true,
"dependencies": {
- "@babel/types": "^7.20.7"
+ "@babel/types": "^7.20.7"
+ }
+ },
+ "node_modules/@types/conventional-commits-parser": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz",
+ "integrity": "sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
}
},
"node_modules/@types/debug": {
@@ -10587,6 +11555,21 @@
"integrity": "sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==",
"peer": true
},
+ "node_modules/ansi-escapes": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz",
+ "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==",
+ "license": "MIT",
+ "dependencies": {
+ "environment": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/ansi-fragments": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/ansi-fragments/-/ansi-fragments-0.2.1.tgz",
@@ -10669,8 +11652,51 @@
"node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz",
+ "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "is-array-buffer": "^3.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-ify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
+ "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==",
+ "license": "MIT"
+ },
+ "node_modules/array-includes": {
+ "version": "3.1.8",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz",
+ "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "is-string": "^1.0.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
"node_modules/array-union": {
"version": "2.1.0",
@@ -10681,6 +11707,105 @@
"node": ">=8"
}
},
+ "node_modules/array.prototype.findlast": {
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz",
+ "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flat": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
+ "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flatmap": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz",
+ "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.tosorted": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz",
+ "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3",
+ "es-errors": "^1.3.0",
+ "es-shim-unscopables": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/arraybuffer.prototype.slice": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz",
+ "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.22.3",
+ "es-errors": "^1.2.1",
+ "get-intrinsic": "^1.2.3",
+ "is-array-buffer": "^3.0.4",
+ "is-shared-array-buffer": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/asap": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
@@ -11109,7 +12234,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "dev": true,
"engines": {
"node": ">=6"
}
@@ -11290,6 +12414,112 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/cli-truncate": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",
+ "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",
+ "license": "MIT",
+ "dependencies": {
+ "slice-ansi": "^5.0.0",
+ "string-width": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/emoji-regex": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+ "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
+ "license": "MIT"
+ },
+ "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cli-truncate/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
"node_modules/clipboardy": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-4.0.0.tgz",
@@ -11616,6 +12846,16 @@
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
"peer": true
},
+ "node_modules/compare-func": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz",
+ "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==",
+ "license": "MIT",
+ "dependencies": {
+ "array-ify": "^1.0.0",
+ "dot-prop": "^5.1.0"
+ }
+ },
"node_modules/compressible": {
"version": "2.0.18",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
@@ -11720,6 +12960,48 @@
"node": "^14.18.0 || >=16.10.0"
}
},
+ "node_modules/conventional-changelog-angular": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz",
+ "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==",
+ "license": "ISC",
+ "dependencies": {
+ "compare-func": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/conventional-changelog-conventionalcommits": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz",
+ "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==",
+ "license": "ISC",
+ "dependencies": {
+ "compare-func": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/conventional-commits-parser": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz",
+ "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==",
+ "license": "MIT",
+ "dependencies": {
+ "is-text-path": "^2.0.0",
+ "JSONStream": "^1.3.5",
+ "meow": "^12.0.1",
+ "split2": "^4.0.0"
+ },
+ "bin": {
+ "conventional-commits-parser": "cli.mjs"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -11852,22 +13134,88 @@
}
}
},
- "node_modules/cssesc": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
- "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
- "bin": {
- "cssesc": "bin/cssesc"
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
+ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
+ "devOptional": true
+ },
+ "node_modules/dargs": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/dargs/-/dargs-8.1.0.tgz",
+ "integrity": "sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/data-view-buffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
+ "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/data-view-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz",
+ "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
},
"engines": {
- "node": ">=4"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/csstype": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
- "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
- "devOptional": true
+ "node_modules/data-view-byte-offset": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz",
+ "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-data-view": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
"node_modules/date-fns": {
"version": "2.30.0",
@@ -11890,9 +13238,10 @@
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"node_modules/debug": {
- "version": "4.3.5",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
- "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+ "version": "4.3.6",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
+ "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
+ "license": "MIT",
"dependencies": {
"ms": "2.1.2"
},
@@ -11971,6 +13320,24 @@
"node": ">=8"
}
},
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/defu": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
@@ -12066,6 +13433,18 @@
"node": ">=6.0.0"
}
},
+ "node_modules/dot-prop": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
+ "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "is-obj": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/duplexify": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz",
@@ -12169,6 +13548,15 @@
"node": ">=10.0.0"
}
},
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ }
+ },
"node_modules/envinfo": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz",
@@ -12181,11 +13569,22 @@
"node": ">=4"
}
},
+ "node_modules/environment": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",
+ "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "peer": true,
"dependencies": {
"is-arrayish": "^0.2.1"
}
@@ -12193,8 +13592,7 @@
"node_modules/error-ex/node_modules/is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
- "peer": true
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="
},
"node_modules/error-stack-parser": {
"version": "2.1.4",
@@ -12218,6 +13616,67 @@
"node": ">= 0.8"
}
},
+ "node_modules/es-abstract": {
+ "version": "1.23.3",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz",
+ "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.1",
+ "arraybuffer.prototype.slice": "^1.0.3",
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "data-view-buffer": "^1.0.1",
+ "data-view-byte-length": "^1.0.1",
+ "data-view-byte-offset": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "es-set-tostringtag": "^2.0.3",
+ "es-to-primitive": "^1.2.1",
+ "function.prototype.name": "^1.1.6",
+ "get-intrinsic": "^1.2.4",
+ "get-symbol-description": "^1.0.2",
+ "globalthis": "^1.0.3",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.0.3",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.2",
+ "internal-slot": "^1.0.7",
+ "is-array-buffer": "^3.0.4",
+ "is-callable": "^1.2.7",
+ "is-data-view": "^1.0.1",
+ "is-negative-zero": "^2.0.3",
+ "is-regex": "^1.1.4",
+ "is-shared-array-buffer": "^1.0.3",
+ "is-string": "^1.0.7",
+ "is-typed-array": "^1.1.13",
+ "is-weakref": "^1.0.2",
+ "object-inspect": "^1.13.1",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.5",
+ "regexp.prototype.flags": "^1.5.2",
+ "safe-array-concat": "^1.1.2",
+ "safe-regex-test": "^1.0.3",
+ "string.prototype.trim": "^1.2.9",
+ "string.prototype.trimend": "^1.0.8",
+ "string.prototype.trimstart": "^1.0.8",
+ "typed-array-buffer": "^1.0.2",
+ "typed-array-byte-length": "^1.0.1",
+ "typed-array-byte-offset": "^1.0.2",
+ "typed-array-length": "^1.0.6",
+ "unbox-primitive": "^1.0.2",
+ "which-typed-array": "^1.1.15"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/es-define-property": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
@@ -12237,6 +13696,88 @@
"node": ">= 0.4"
}
},
+ "node_modules/es-iterator-helpers": {
+ "version": "1.0.19",
+ "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz",
+ "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.3",
+ "es-errors": "^1.3.0",
+ "es-set-tostringtag": "^2.0.3",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "globalthis": "^1.0.3",
+ "has-property-descriptors": "^1.0.2",
+ "has-proto": "^1.0.3",
+ "has-symbols": "^1.0.3",
+ "internal-slot": "^1.0.7",
+ "iterator.prototype": "^1.1.2",
+ "safe-array-concat": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-object-atoms": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
+ "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz",
+ "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "get-intrinsic": "^1.2.4",
+ "has-tostringtag": "^1.0.2",
+ "hasown": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-shim-unscopables": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",
+ "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "hasown": "^2.0.0"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/esbuild": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
@@ -12352,6 +13893,83 @@
"url": "https://opencollective.com/eslint"
}
},
+ "node_modules/eslint-config-prettier": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
+ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint-plugin-prettier": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
+ "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "prettier-linter-helpers": "^1.0.0",
+ "synckit": "^0.9.1"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint-plugin-prettier"
+ },
+ "peerDependencies": {
+ "@types/eslint": ">=8.0.0",
+ "eslint": ">=8.0.0",
+ "eslint-config-prettier": "*",
+ "prettier": ">=3.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/eslint": {
+ "optional": true
+ },
+ "eslint-config-prettier": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-plugin-react": {
+ "version": "7.35.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz",
+ "integrity": "sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.8",
+ "array.prototype.findlast": "^1.2.5",
+ "array.prototype.flatmap": "^1.3.2",
+ "array.prototype.tosorted": "^1.1.4",
+ "doctrine": "^2.1.0",
+ "es-iterator-helpers": "^1.0.19",
+ "estraverse": "^5.3.0",
+ "hasown": "^2.0.2",
+ "jsx-ast-utils": "^2.4.1 || ^3.0.0",
+ "minimatch": "^3.1.2",
+ "object.entries": "^1.1.8",
+ "object.fromentries": "^2.0.8",
+ "object.values": "^1.2.0",
+ "prop-types": "^15.8.1",
+ "resolve": "^2.0.0-next.5",
+ "semver": "^6.3.1",
+ "string.prototype.matchall": "^4.0.11",
+ "string.prototype.repeat": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7"
+ }
+ },
"node_modules/eslint-plugin-react-hooks": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz",
@@ -12373,6 +13991,71 @@
"eslint": ">=7"
}
},
+ "node_modules/eslint-plugin-react/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/resolve": {
+ "version": "2.0.0-next.5",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz",
+ "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/eslint-plugin-react/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
@@ -12812,6 +14495,13 @@
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
+ "node_modules/fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
"node_modules/fast-glob": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
@@ -12863,6 +14553,12 @@
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="
},
+ "node_modules/fast-uri": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz",
+ "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==",
+ "license": "MIT"
+ },
"node_modules/fast-xml-parser": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz",
@@ -13139,10 +14835,39 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
- "node_modules/function-bind": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/function.prototype.name": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
+ "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "functions-have-names": "^1.2.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
+ "dev": true,
+ "license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -13171,6 +14896,18 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-east-asian-width": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz",
+ "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/get-intrinsic": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
@@ -13214,6 +14951,41 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/get-symbol-description": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
+ "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/git-raw-commits": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-4.0.0.tgz",
+ "integrity": "sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==",
+ "license": "MIT",
+ "dependencies": {
+ "dargs": "^8.0.0",
+ "meow": "^12.0.1",
+ "split2": "^4.0.0"
+ },
+ "bin": {
+ "git-raw-commits": "cli.mjs"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
@@ -13265,6 +15037,21 @@
"node": "*"
}
},
+ "node_modules/global-directory": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz",
+ "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ini": "4.1.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
@@ -13273,6 +15060,23 @@
"node": ">=4"
}
},
+ "node_modules/globalthis": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz",
+ "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.2.1",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/globby": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
@@ -13357,6 +15161,16 @@
"unenv": "^1.9.0"
}
},
+ "node_modules/has-bigints": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
+ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@@ -13541,6 +15355,21 @@
"node": ">=10.17.0"
}
},
+ "node_modules/husky": {
+ "version": "9.1.5",
+ "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz",
+ "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==",
+ "license": "MIT",
+ "bin": {
+ "husky": "bin.js"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/typicode"
+ }
+ },
"node_modules/i18next": {
"version": "22.5.1",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-22.5.1.tgz",
@@ -13623,7 +15452,6 @@
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
- "dev": true,
"dependencies": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@@ -13635,6 +15463,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/import-meta-resolve": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz",
+ "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==",
+ "license": "MIT",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wooorm"
+ }
+ },
"node_modules/imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -13658,6 +15496,30 @@
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
+ "node_modules/ini": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz",
+ "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==",
+ "license": "ISC",
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/internal-slot": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz",
+ "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "hasown": "^2.0.0",
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/intl-messageformat": {
"version": "10.5.14",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.5.14.tgz",
@@ -13700,11 +15562,57 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/is-array-buffer": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz",
+ "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
},
+ "node_modules/is-async-function": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz",
+ "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+ "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-bigints": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
@@ -13716,6 +15624,23 @@
"node": ">=8"
}
},
+ "node_modules/is-boolean-object": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+ "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-callable": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
@@ -13741,6 +15666,38 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/is-data-view": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz",
+ "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+ "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-directory": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
@@ -13772,6 +15729,19 @@
"node": ">=0.10.0"
}
},
+ "node_modules/is-finalizationregistry": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz",
+ "integrity": "sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -13845,6 +15815,32 @@
"node": ">=8"
}
},
+ "node_modules/is-map": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz",
+ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz",
+ "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
@@ -13853,25 +15849,96 @@
"node": ">=0.12.0"
}
},
+ "node_modules/is-number-object": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
+ "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-obj": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/is-path-inside": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
"dev": true,
"engines": {
- "node": ">=8"
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "peer": true,
+ "dependencies": {
+ "isobject": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-regex": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+ "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-set": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz",
+ "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-plain-object": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
- "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
- "peer": true,
+ "node_modules/is-shared-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==",
+ "dev": true,
+ "license": "MIT",
"dependencies": {
- "isobject": "^3.0.1"
+ "call-bind": "^1.0.7"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-stream": {
@@ -13885,6 +15952,50 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/is-string": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+ "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-text-path": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz",
+ "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==",
+ "license": "MIT",
+ "dependencies": {
+ "text-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
"node_modules/is-typed-array": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz",
@@ -13911,6 +16022,49 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/is-weakmap": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",
+ "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakref": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
+ "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakset": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz",
+ "integrity": "sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "get-intrinsic": "^1.2.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-wsl": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
@@ -13978,6 +16132,20 @@
"ws": "*"
}
},
+ "node_modules/iterator.prototype": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz",
+ "integrity": "sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.2.1",
+ "get-intrinsic": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "reflect.getprototypeof": "^1.0.4",
+ "set-function-name": "^2.0.1"
+ }
+ },
"node_modules/jackspeak": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz",
@@ -14449,7 +16617,6 @@
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dev": true,
"dependencies": {
"argparse": "^2.0.1"
},
@@ -14595,6 +16762,12 @@
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"peer": true
},
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "license": "MIT"
+ },
"node_modules/json-rpc-engine": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz",
@@ -14649,6 +16822,47 @@
"graceful-fs": "^4.1.6"
}
},
+ "node_modules/jsonparse": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
+ "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
+ "engines": [
+ "node >= 0.2.0"
+ ],
+ "license": "MIT"
+ },
+ "node_modules/JSONStream": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
+ "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
+ "license": "(MIT OR Apache-2.0)",
+ "dependencies": {
+ "jsonparse": "^1.2.0",
+ "through": ">=2.2.7 <3"
+ },
+ "bin": {
+ "JSONStream": "bin.js"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/jsx-ast-utils": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
+ "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "array-includes": "^3.1.6",
+ "array.prototype.flat": "^1.3.1",
+ "object.assign": "^4.1.4",
+ "object.values": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
"node_modules/keccak": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz",
@@ -14736,24 +16950,206 @@
"ms": "2.0.0"
}
},
- "node_modules/lighthouse-logger/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
- "peer": true
- },
- "node_modules/lilconfig": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
- "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
+ "node_modules/lighthouse-logger/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "peer": true
+ },
+ "node_modules/lilconfig": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
+ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
+ },
+ "node_modules/lint-staged": {
+ "version": "15.2.9",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.9.tgz",
+ "integrity": "sha512-BZAt8Lk3sEnxw7tfxM7jeZlPRuT4M68O0/CwZhhaw6eeWu0Lz5eERE3m386InivXB64fp/mDID452h48tvKlRQ==",
+ "license": "MIT",
+ "dependencies": {
+ "chalk": "~5.3.0",
+ "commander": "~12.1.0",
+ "debug": "~4.3.6",
+ "execa": "~8.0.1",
+ "lilconfig": "~3.1.2",
+ "listr2": "~8.2.4",
+ "micromatch": "~4.0.7",
+ "pidtree": "~0.6.0",
+ "string-argv": "~0.3.2",
+ "yaml": "~2.5.0"
+ },
+ "bin": {
+ "lint-staged": "bin/lint-staged.js"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/lint-staged"
+ }
+ },
+ "node_modules/lint-staged/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/lint-staged/node_modules/commander": {
+ "version": "12.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",
+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/lint-staged/node_modules/execa": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz",
+ "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^8.0.1",
+ "human-signals": "^5.0.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^4.1.0",
+ "strip-final-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/lint-staged/node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lint-staged/node_modules/human-signals": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz",
+ "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=16.17.0"
+ }
+ },
+ "node_modules/lint-staged/node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lint-staged/node_modules/lilconfig": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz",
+ "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antonk52"
+ }
+ },
+ "node_modules/lint-staged/node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lint-staged/node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lint-staged/node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lint-staged/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
"engines": {
- "node": ">=10"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/lines-and-columns": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
- "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
+ "node_modules/lint-staged/node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
"node_modules/listhen": {
"version": "1.7.2",
@@ -14784,6 +17180,108 @@
"listhen": "bin/listhen.mjs"
}
},
+ "node_modules/listr2": {
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz",
+ "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==",
+ "license": "MIT",
+ "dependencies": {
+ "cli-truncate": "^4.0.0",
+ "colorette": "^2.0.20",
+ "eventemitter3": "^5.0.1",
+ "log-update": "^6.1.0",
+ "rfdc": "^1.4.1",
+ "wrap-ansi": "^9.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/listr2/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/listr2/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/listr2/node_modules/colorette": {
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
+ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
+ "license": "MIT"
+ },
+ "node_modules/listr2/node_modules/emoji-regex": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+ "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
+ "license": "MIT"
+ },
+ "node_modules/listr2/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/listr2/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/listr2/node_modules/wrap-ansi": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz",
+ "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-styles": "^6.2.1",
+ "string-width": "^7.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
"node_modules/lit": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz",
@@ -14831,6 +17329,12 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
+ "node_modules/lodash.camelcase": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
+ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
+ "license": "MIT"
+ },
"node_modules/lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
@@ -14851,6 +17355,12 @@
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ=="
},
+ "node_modules/lodash.isplainobject": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+ "license": "MIT"
+ },
"node_modules/lodash.kebabcase": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz",
@@ -14864,104 +17374,308 @@
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
- "dev": true
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
+ },
+ "node_modules/lodash.mergewith": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
+ "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==",
+ "license": "MIT"
},
"node_modules/lodash.omit": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz",
"integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg=="
},
- "node_modules/lodash.throttle": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
- "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==",
- "peer": true
+ "node_modules/lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.startcase": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz",
+ "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.throttle": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
+ "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==",
+ "peer": true
+ },
+ "node_modules/lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.upperfirst": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz",
+ "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==",
+ "license": "MIT"
+ },
+ "node_modules/log-symbols": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "peer": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-symbols/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "peer": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/log-symbols/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "peer": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "peer": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/log-symbols/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "peer": true
+ },
+ "node_modules/log-symbols/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "peer": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/log-symbols/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "peer": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/log-update": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
+ "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-escapes": "^7.0.0",
+ "cli-cursor": "^5.0.0",
+ "slice-ansi": "^7.1.0",
+ "strip-ansi": "^7.1.0",
+ "wrap-ansi": "^9.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-update/node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/log-update/node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/log-update/node_modules/cli-cursor": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
+ "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",
+ "license": "MIT",
+ "dependencies": {
+ "restore-cursor": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/log-update/node_modules/emoji-regex": {
+ "version": "10.4.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+ "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
+ "license": "MIT"
},
- "node_modules/log-symbols": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
- "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
- "peer": true,
+ "node_modules/log-update/node_modules/is-fullwidth-code-point": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz",
+ "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==",
+ "license": "MIT",
"dependencies": {
- "chalk": "^4.1.0",
- "is-unicode-supported": "^0.1.0"
+ "get-east-asian-width": "^1.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/log-symbols/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "peer": true,
+ "node_modules/log-update/node_modules/onetime": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
+ "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",
+ "license": "MIT",
"dependencies": {
- "color-convert": "^2.0.1"
+ "mimic-function": "^5.0.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18"
},
"funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/log-symbols/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "peer": true,
+ "node_modules/log-update/node_modules/restore-cursor": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",
+ "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",
+ "license": "MIT",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "onetime": "^7.0.0",
+ "signal-exit": "^4.1.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/log-symbols/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "peer": true,
+ "node_modules/log-update/node_modules/slice-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz",
+ "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==",
+ "license": "MIT",
"dependencies": {
- "color-name": "~1.1.4"
+ "ansi-styles": "^6.2.1",
+ "is-fullwidth-code-point": "^5.0.0"
},
"engines": {
- "node": ">=7.0.0"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
}
},
- "node_modules/log-symbols/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "peer": true
+ "node_modules/log-update/node_modules/string-width": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
+ "license": "MIT",
+ "dependencies": {
+ "emoji-regex": "^10.3.0",
+ "get-east-asian-width": "^1.0.0",
+ "strip-ansi": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
},
- "node_modules/log-symbols/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "peer": true,
+ "node_modules/log-update/node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
- "node_modules/log-symbols/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "peer": true,
+ "node_modules/log-update/node_modules/wrap-ansi": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz",
+ "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==",
+ "license": "MIT",
"dependencies": {
- "has-flag": "^4.0.0"
+ "ansi-styles": "^6.2.1",
+ "string-width": "^7.0.0",
+ "strip-ansi": "^7.1.0"
},
"engines": {
- "node": ">=8"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/logkitty": {
@@ -15049,6 +17763,18 @@
"integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==",
"peer": true
},
+ "node_modules/meow": {
+ "version": "12.1.1",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz",
+ "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -15665,6 +18391,18 @@
"node": ">=6"
}
},
+ "node_modules/mimic-function": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
+ "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/minimalistic-assert": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
@@ -15693,7 +18431,6 @@
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "peer": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@@ -16180,6 +18917,100 @@
"node": ">= 6"
}
},
+ "node_modules/object-inspect": {
+ "version": "1.13.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
+ "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.assign": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
+ "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.entries": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.8.tgz",
+ "integrity": "sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.fromentries": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz",
+ "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.values": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz",
+ "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/ofetch": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.3.4.tgz",
@@ -16439,7 +19270,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dev": true,
"dependencies": {
"callsites": "^3.0.0"
},
@@ -16551,6 +19381,18 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
+ "node_modules/pidtree": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz",
+ "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==",
+ "license": "MIT",
+ "bin": {
+ "pidtree": "bin/pidtree.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
"node_modules/pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
@@ -16868,6 +19710,34 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/prettier": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
+ "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
+ "license": "MIT",
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/prettier-linter-helpers": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
+ "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-diff": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
"node_modules/pretty-format": {
"version": "26.6.2",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
@@ -17432,6 +20302,28 @@
"node": ">=0.10.0"
}
},
+ "node_modules/reflect.getprototypeof": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz",
+ "integrity": "sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.1",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
+ "globalthis": "^1.0.3",
+ "which-builtin-type": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/regenerate": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
@@ -17464,6 +20356,25 @@
"@babel/runtime": "^7.8.4"
}
},
+ "node_modules/regexp.prototype.flags": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
+ "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "define-properties": "^1.2.1",
+ "es-errors": "^1.3.0",
+ "set-function-name": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/regexpu-core": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz",
@@ -17528,6 +20439,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
@@ -17553,7 +20473,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "dev": true,
"engines": {
"node": ">=4"
}
@@ -17595,6 +20514,12 @@
"node": ">=0.10.0"
}
},
+ "node_modules/rfdc": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
+ "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
+ "license": "MIT"
+ },
"node_modules/rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -17799,9 +20724,35 @@
}
],
"dependencies": {
- "queue-microtask": "^1.2.2"
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-array-concat": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
+ "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "get-intrinsic": "^1.2.4",
+ "has-symbols": "^1.0.3",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/safe-array-concat/node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -17821,6 +20772,24 @@
}
]
},
+ "node_modules/safe-regex-test": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz",
+ "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.6",
+ "es-errors": "^1.3.0",
+ "is-regex": "^1.1.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/safe-stable-stringify": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz",
@@ -18016,6 +20985,22 @@
"node": ">= 0.4"
}
},
+ "node_modules/set-function-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz",
+ "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "functions-have-names": "^1.2.3",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/setprototypeof": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
@@ -18074,6 +21059,25 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/side-channel": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
+ "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.4",
+ "object-inspect": "^1.13.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/signal-exit": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@@ -18313,6 +21317,15 @@
"safe-buffer": "~5.2.0"
}
},
+ "node_modules/string-argv": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz",
+ "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6.19"
+ }
+ },
"node_modules/string-width": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
@@ -18373,6 +21386,96 @@
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
+ "node_modules/string.prototype.matchall": {
+ "version": "4.0.11",
+ "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz",
+ "integrity": "sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.2",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "internal-slot": "^1.0.7",
+ "regexp.prototype.flags": "^1.5.2",
+ "set-function-name": "^2.0.2",
+ "side-channel": "^1.0.6"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.repeat": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz",
+ "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ }
+ },
+ "node_modules/string.prototype.trim": {
+ "version": "1.2.9",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
+ "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-abstract": "^1.23.0",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz",
+ "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz",
+ "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "define-properties": "^1.2.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
@@ -18511,6 +21614,23 @@
"node": ">=0.10"
}
},
+ "node_modules/synckit": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz",
+ "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@pkgr/core": "^0.1.0",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/unts"
+ }
+ },
"node_modules/system-architecture": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/system-architecture/-/system-architecture-0.1.0.tgz",
@@ -18645,6 +21765,18 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"peer": true
},
+ "node_modules/text-extensions": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz",
+ "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@@ -18684,6 +21816,12 @@
"integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==",
"peer": true
},
+ "node_modules/through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
+ "license": "MIT"
+ },
"node_modules/through2": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
@@ -18830,11 +21968,87 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz",
+ "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typed-array-byte-length": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz",
+ "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-byte-offset": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz",
+ "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-length": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz",
+ "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.7",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-proto": "^1.0.3",
+ "is-typed-array": "^1.1.13",
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/typescript": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
- "devOptional": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -18856,6 +22070,22 @@
"multiformats": "^9.4.2"
}
},
+ "node_modules/unbox-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
+ "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-bigints": "^1.0.2",
+ "has-symbols": "^1.0.3",
+ "which-boxed-primitive": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/uncrypto": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
@@ -18934,6 +22164,18 @@
"node": ">=4"
}
},
+ "node_modules/unicorn-magic": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
+ "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@@ -19481,6 +22723,76 @@
"node": ">= 8"
}
},
+ "node_modules/which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-builtin-type": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz",
+ "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "function.prototype.name": "^1.1.6",
+ "has-tostringtag": "^1.0.2",
+ "is-async-function": "^2.0.0",
+ "is-date-object": "^1.0.5",
+ "is-finalizationregistry": "^1.0.2",
+ "is-generator-function": "^1.0.10",
+ "is-regex": "^1.1.4",
+ "is-weakref": "^1.0.2",
+ "isarray": "^2.0.5",
+ "which-boxed-primitive": "^1.0.2",
+ "which-collection": "^1.0.2",
+ "which-typed-array": "^1.1.15"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-builtin-type/node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/which-collection": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz",
+ "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "is-map": "^2.0.3",
+ "is-set": "^2.0.3",
+ "is-weakmap": "^2.0.2",
+ "is-weakset": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz",
@@ -19699,9 +23011,10 @@
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
},
"node_modules/yaml": {
- "version": "2.4.5",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
- "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz",
+ "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==",
+ "license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
diff --git a/package.json b/package.json
index bbecd07..cb3515d 100644
--- a/package.json
+++ b/package.json
@@ -1,23 +1,30 @@
{
"name": "shutter",
"private": true,
- "version": "0.0.0",
+ "version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
+ "lint:fix": "eslint --fix \"./**/*.{js,jsx,ts,tsx}\"",
+ "format": "prettier --write \"./**/*.{js,jsx,ts,tsx}\"",
"preview": "vite preview",
- "deploy": "npm run build & firebase deploy --only hosting:gnosis-shutter"
+ "prepare": "husky"
},
"dependencies": {
"@apollo/client": "^3.11.1",
+ "@commitlint/cli": "^19.4.1",
+ "@commitlint/config-conventional": "^19.4.1",
"@nextui-org/react": "^2.3.6",
"@tanstack/react-query": "^5.45.1",
"@web3modal/wagmi": "^5.0.6",
"ethers": "^5.7.2",
"framer-motion": "^11.2.6",
+ "husky": "^9.1.5",
+ "lint-staged": "^15.2.9",
"lodash": "^4.17.21",
+ "prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sonner": "^1.5.0",
@@ -32,6 +39,9 @@
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-prettier": "^5.2.1",
+ "eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"graphql": "^16.9.0",
@@ -39,5 +49,12 @@
"tailwindcss": "^3.4.4",
"typescript": "^5.2.2",
"vite": "^5.3.1"
+ },
+ "lint-staged": {
+ "*.{js,jsx,ts,tsx}": [
+ "npm run lint --cache --fix",
+ "npm run format",
+ "bash -c tsc"
+ ]
}
}
diff --git a/postcss.config.js b/postcss.config.js
index 2e7af2b..2aa7205 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -3,4 +3,4 @@ export default {
tailwindcss: {},
autoprefixer: {},
},
-}
+};
diff --git a/public/app-screenshot.png b/public/app-screenshot.png
new file mode 100644
index 0000000..0ed6040
Binary files /dev/null and b/public/app-screenshot.png differ
diff --git a/public/blst/blst.js b/public/blst/blst.js
index 78a971e..2c5791e 100644
--- a/public/blst/blst.js
+++ b/public/blst/blst.js
@@ -22,11 +22,16 @@ var ENVIRONMENT_IS_WEB = typeof window == 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function';
// N.b. Electron.js environment is simultaneously a NODE-environment, but
// also a web environment.
-var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
+var ENVIRONMENT_IS_NODE =
+ typeof process == 'object' &&
+ typeof process.versions == 'object' &&
+ typeof process.versions.node == 'string';
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
if (blst['ENVIRONMENT']) {
- throw new Error('blst.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)');
+ throw new Error(
+ 'blst.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)',
+ );
}
if (ENVIRONMENT_IS_NODE) {
@@ -34,13 +39,11 @@ if (ENVIRONMENT_IS_NODE) {
// the require()` function. This is only necessary for multi-environment
// builds, `-sENVIRONMENT=node` emits a static import declaration instead.
// TODO: Swap all `require()`'s with `import()`'s?
-
}
// --pre-jses are emitted after the blst integration code, so that they can
// refer to blst (if they choose; they can also define blst)
-
// Sometimes an existing blst object exists with properties
// meant to overwrite the default module functionality. Here
// we collect those properties and reapply _after_ we configure
@@ -64,19 +67,23 @@ function locateFile(path) {
}
// Hooks that are implemented differently in different runtime environments.
-var read_,
- readAsync,
- readBinary;
+var read_, readAsync, readBinary;
if (ENVIRONMENT_IS_NODE) {
- if (typeof process == 'undefined' || !process.release || process.release.name !== 'node') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
+ if (typeof process == 'undefined' || !process.release || process.release.name !== 'node')
+ throw new Error(
+ 'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+ );
var nodeVersion = process.versions.node;
var numericVersion = nodeVersion.split('.').slice(0, 3);
- numericVersion = (numericVersion[0] * 10000) + (numericVersion[1] * 100) + (numericVersion[2].split('-')[0] * 1);
+ numericVersion =
+ numericVersion[0] * 10000 + numericVersion[1] * 100 + numericVersion[2].split('-')[0] * 1;
var minVersion = 160000;
if (numericVersion < 160000) {
- throw new Error('This emscripten-generated code requires node v16.0.0 (detected v' + nodeVersion + ')');
+ throw new Error(
+ 'This emscripten-generated code requires node v16.0.0 (detected v' + nodeVersion + ')',
+ );
}
// These modules will usually be used on Node.js. Load them eagerly to avoid
@@ -86,32 +93,32 @@ if (ENVIRONMENT_IS_NODE) {
scriptDirectory = __dirname + '/';
-// include: node_shell_read.js
-read_ = (filename, binary) => {
- // We need to re-wrap `file://` strings to URLs. Normalizing isn't
- // necessary in that case, the path should already be absolute.
- filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
- return fs.readFileSync(filename, binary ? undefined : 'utf8');
-};
+ // include: node_shell_read.js
+ read_ = (filename, binary) => {
+ // We need to re-wrap `file://` strings to URLs. Normalizing isn't
+ // necessary in that case, the path should already be absolute.
+ filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
+ return fs.readFileSync(filename, binary ? undefined : 'utf8');
+ };
-readBinary = (filename) => {
- var ret = read_(filename, true);
- if (!ret.buffer) {
- ret = new Uint8Array(ret);
- }
- assert(ret.buffer);
- return ret;
-};
+ readBinary = (filename) => {
+ var ret = read_(filename, true);
+ if (!ret.buffer) {
+ ret = new Uint8Array(ret);
+ }
+ assert(ret.buffer);
+ return ret;
+ };
-readAsync = (filename, onload, onerror, binary = true) => {
- // See the comment in the `read_` function.
- filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
- fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => {
- if (err) onerror(err);
- else onload(binary ? data.buffer : data);
- });
-};
-// end include: node_shell_read.js
+ readAsync = (filename, onload, onerror, binary = true) => {
+ // See the comment in the `read_` function.
+ filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
+ fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => {
+ if (err) onerror(err);
+ else onload(binary ? data.buffer : data);
+ });
+ };
+ // end include: node_shell_read.js
if (!blst['thisProgram'] && process.argv.length > 1) {
thisProgram = process.argv[1].replace(/\\/g, '/');
}
@@ -133,21 +140,26 @@ readAsync = (filename, onload, onerror, binary = true) => {
process.exitCode = status;
throw toThrow;
};
-
-} else
-if (ENVIRONMENT_IS_SHELL) {
-
- if ((typeof process == 'object' && typeof require === 'function') || typeof window == 'object' || typeof importScripts == 'function') throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
-
-} else
+} else if (ENVIRONMENT_IS_SHELL) {
+ if (
+ (typeof process == 'object' && typeof require === 'function') ||
+ typeof window == 'object' ||
+ typeof importScripts == 'function'
+ )
+ throw new Error(
+ 'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+ );
+}
// Note that this includes Node.js workers when relevant (pthreads is enabled).
// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and
// ENVIRONMENT_IS_NODE.
-if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
- if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled
+else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
+ if (ENVIRONMENT_IS_WORKER) {
+ // Check worker, not web, since window could be polyfilled
scriptDirectory = self.location.href;
- } else if (typeof document != 'undefined' && document.currentScript) { // web
+ } else if (typeof document != 'undefined' && document.currentScript) {
+ // web
scriptDirectory = document.currentScript.src;
}
// blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them.
@@ -159,63 +171,69 @@ if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
if (scriptDirectory.startsWith('blob:')) {
scriptDirectory = '';
} else {
- scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/')+1);
+ scriptDirectory = scriptDirectory.substr(
+ 0,
+ scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/') + 1,
+ );
}
- if (!(typeof window == 'object' || typeof importScripts == 'function')) throw new Error('not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)');
+ if (!(typeof window == 'object' || typeof importScripts == 'function'))
+ throw new Error(
+ 'not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)',
+ );
{
-// include: web_or_worker_shell_read.js
-read_ = (url) => {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, false);
- xhr.send(null);
- return xhr.responseText;
- }
-
- if (ENVIRONMENT_IS_WORKER) {
- readBinary = (url) => {
+ // include: web_or_worker_shell_read.js
+ read_ = (url) => {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, false);
- xhr.responseType = 'arraybuffer';
xhr.send(null);
- return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response));
+ return xhr.responseText;
};
- }
- readAsync = (url, onload, onerror) => {
- // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
- // See https://github.com/github/fetch/pull/92#issuecomment-140665932
- // Cordova or Electron apps are typically loaded from a file:// url.
- // So use XHR on webview if URL is a file URL.
- if (isFileURI(url)) {
- var xhr = new XMLHttpRequest();
- xhr.open('GET', url, true);
- xhr.responseType = 'arraybuffer';
- xhr.onload = () => {
- if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0
- onload(xhr.response);
- return;
- }
- onerror();
+ if (ENVIRONMENT_IS_WORKER) {
+ readBinary = (url) => {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, false);
+ xhr.responseType = 'arraybuffer';
+ xhr.send(null);
+ return new Uint8Array(/** @type{!ArrayBuffer} */ (xhr.response));
};
- xhr.onerror = onerror;
- xhr.send(null);
- return;
}
- fetch(url, { credentials: 'same-origin' })
- .then((response) => {
- if (response.ok) {
- return response.arrayBuffer();
+
+ readAsync = (url, onload, onerror) => {
+ // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
+ // See https://github.com/github/fetch/pull/92#issuecomment-140665932
+ // Cordova or Electron apps are typically loaded from a file:// url.
+ // So use XHR on webview if URL is a file URL.
+ if (isFileURI(url)) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.responseType = 'arraybuffer';
+ xhr.onload = () => {
+ if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) {
+ // file URLs can return 0
+ onload(xhr.response);
+ return;
+ }
+ onerror();
+ };
+ xhr.onerror = onerror;
+ xhr.send(null);
+ return;
}
- return Promise.reject(new Error(response.status + ' : ' + response.url));
- })
- .then(onload, onerror)
- };
-// end include: web_or_worker_shell_read.js
+ fetch(url, { credentials: 'same-origin' })
+ .then((response) => {
+ if (response.ok) {
+ return response.arrayBuffer();
+ }
+ return Promise.reject(new Error(response.status + ' : ' + response.url));
+ })
+ .then(onload, onerror);
+ };
+ // end include: web_or_worker_shell_read.js
}
-} else
-{
+} else {
throw new Error('environment detection error');
}
@@ -234,23 +252,50 @@ checkIncomingModuleAPI();
// expected to arrive, and second, by using a local everywhere else that can be
// minified.
-if (blst['arguments']) arguments_ = blst['arguments'];legacyModuleProp('arguments', 'arguments_');
+if (blst['arguments']) arguments_ = blst['arguments'];
+legacyModuleProp('arguments', 'arguments_');
-if (blst['thisProgram']) thisProgram = blst['thisProgram'];legacyModuleProp('thisProgram', 'thisProgram');
+if (blst['thisProgram']) thisProgram = blst['thisProgram'];
+legacyModuleProp('thisProgram', 'thisProgram');
-if (blst['quit']) quit_ = blst['quit'];legacyModuleProp('quit', 'quit_');
+if (blst['quit']) quit_ = blst['quit'];
+legacyModuleProp('quit', 'quit_');
// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
// Assertions on removed incoming blst JS APIs.
-assert(typeof blst['memoryInitializerPrefixURL'] == 'undefined', 'blst.memoryInitializerPrefixURL option was removed, use blst.locateFile instead');
-assert(typeof blst['pthreadMainPrefixURL'] == 'undefined', 'blst.pthreadMainPrefixURL option was removed, use blst.locateFile instead');
-assert(typeof blst['cdInitializerPrefixURL'] == 'undefined', 'blst.cdInitializerPrefixURL option was removed, use blst.locateFile instead');
-assert(typeof blst['filePackagePrefixURL'] == 'undefined', 'blst.filePackagePrefixURL option was removed, use blst.locateFile instead');
+assert(
+ typeof blst['memoryInitializerPrefixURL'] == 'undefined',
+ 'blst.memoryInitializerPrefixURL option was removed, use blst.locateFile instead',
+);
+assert(
+ typeof blst['pthreadMainPrefixURL'] == 'undefined',
+ 'blst.pthreadMainPrefixURL option was removed, use blst.locateFile instead',
+);
+assert(
+ typeof blst['cdInitializerPrefixURL'] == 'undefined',
+ 'blst.cdInitializerPrefixURL option was removed, use blst.locateFile instead',
+);
+assert(
+ typeof blst['filePackagePrefixURL'] == 'undefined',
+ 'blst.filePackagePrefixURL option was removed, use blst.locateFile instead',
+);
assert(typeof blst['read'] == 'undefined', 'blst.read option was removed (modify read_ in JS)');
-assert(typeof blst['readAsync'] == 'undefined', 'blst.readAsync option was removed (modify readAsync in JS)');
-assert(typeof blst['readBinary'] == 'undefined', 'blst.readBinary option was removed (modify readBinary in JS)');
-assert(typeof blst['setWindowTitle'] == 'undefined', 'blst.setWindowTitle option was removed (modify emscripten_set_window_title in JS)');
-assert(typeof blst['TOTAL_MEMORY'] == 'undefined', 'blst.TOTAL_MEMORY has been renamed blst.INITIAL_MEMORY');
+assert(
+ typeof blst['readAsync'] == 'undefined',
+ 'blst.readAsync option was removed (modify readAsync in JS)',
+);
+assert(
+ typeof blst['readBinary'] == 'undefined',
+ 'blst.readBinary option was removed (modify readBinary in JS)',
+);
+assert(
+ typeof blst['setWindowTitle'] == 'undefined',
+ 'blst.setWindowTitle option was removed (modify emscripten_set_window_title in JS)',
+);
+assert(
+ typeof blst['TOTAL_MEMORY'] == 'undefined',
+ 'blst.TOTAL_MEMORY has been renamed blst.INITIAL_MEMORY',
+);
legacyModuleProp('asm', 'wasmExports');
legacyModuleProp('read', 'read_');
legacyModuleProp('readAsync', 'readAsync');
@@ -266,7 +311,10 @@ var OPFS = 'OPFS is no longer included by default; build with -lopfs.js';
var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';
-assert(!ENVIRONMENT_IS_SHELL, 'shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.');
+assert(
+ !ENVIRONMENT_IS_SHELL,
+ 'shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.',
+);
// end include: shell.js
@@ -281,8 +329,9 @@ assert(!ENVIRONMENT_IS_SHELL, 'shell environment detected but not enabled at bui
// An online HTML version (which may be of a different version of Emscripten)
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
-var wasmBinary;
-if (blst['wasmBinary']) wasmBinary = blst['wasmBinary'];legacyModuleProp('wasmBinary', 'wasmBinary');
+var wasmBinary;
+if (blst['wasmBinary']) wasmBinary = blst['wasmBinary'];
+legacyModuleProp('wasmBinary', 'wasmBinary');
if (typeof WebAssembly != 'object') {
err('no native wasm support detected');
@@ -322,21 +371,21 @@ function assert(condition, text) {
// Memory management
var HEAP,
-/** @type {!Int8Array} */
+ /** @type {!Int8Array} */
HEAP8,
-/** @type {!Uint8Array} */
+ /** @type {!Uint8Array} */
HEAPU8,
-/** @type {!Int16Array} */
+ /** @type {!Int16Array} */
HEAP16,
-/** @type {!Uint16Array} */
+ /** @type {!Uint16Array} */
HEAPU16,
-/** @type {!Int32Array} */
+ /** @type {!Int32Array} */
HEAP32,
-/** @type {!Uint32Array} */
+ /** @type {!Uint32Array} */
HEAPU32,
-/** @type {!Float32Array} */
+ /** @type {!Float32Array} */
HEAPF32,
-/** @type {!Float64Array} */
+ /** @type {!Float64Array} */
HEAPF64;
// include: runtime_shared.js
@@ -352,14 +401,28 @@ function updateMemoryViews() {
blst['HEAPF64'] = HEAPF64 = new Float64Array(b);
}
// end include: runtime_shared.js
-assert(!blst['STACK_SIZE'], 'STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time')
-
-assert(typeof Int32Array != 'undefined' && typeof Float64Array !== 'undefined' && Int32Array.prototype.subarray != undefined && Int32Array.prototype.set != undefined,
- 'JS engine does not provide full typed array support');
+assert(
+ !blst['STACK_SIZE'],
+ 'STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time',
+);
+
+assert(
+ typeof Int32Array != 'undefined' &&
+ typeof Float64Array !== 'undefined' &&
+ Int32Array.prototype.subarray != undefined &&
+ Int32Array.prototype.set != undefined,
+ 'JS engine does not provide full typed array support',
+);
// If memory is defined in wasm, the user can't provide it, or set INITIAL_MEMORY
-assert(!blst['wasmMemory'], 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally');
-assert(!blst['INITIAL_MEMORY'], 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically');
+assert(
+ !blst['wasmMemory'],
+ 'Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally',
+);
+assert(
+ !blst['INITIAL_MEMORY'],
+ 'Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically',
+);
// include: runtime_stack_check.js
// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.
@@ -375,10 +438,10 @@ function writeStackCookie() {
// The stack grow downwards towards _emscripten_stack_get_end.
// We write cookies to the final two words in the stack and detect if they are
// ever overwritten.
- HEAPU32[((max)>>2)] = 0x02135467;
- HEAPU32[(((max)+(4))>>2)] = 0x89BACDFE;
+ HEAPU32[max >> 2] = 0x02135467;
+ HEAPU32[(max + 4) >> 2] = 0x89bacdfe;
// Also test the global address 0 for integrity.
- HEAPU32[((0)>>2)] = 1668509029;
+ HEAPU32[0 >> 2] = 1668509029;
}
function checkStackCookie() {
@@ -388,30 +451,33 @@ function checkStackCookie() {
if (max == 0) {
max += 4;
}
- var cookie1 = HEAPU32[((max)>>2)];
- var cookie2 = HEAPU32[(((max)+(4))>>2)];
- if (cookie1 != 0x02135467 || cookie2 != 0x89BACDFE) {
- abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`);
+ var cookie1 = HEAPU32[max >> 2];
+ var cookie2 = HEAPU32[(max + 4) >> 2];
+ if (cookie1 != 0x02135467 || cookie2 != 0x89bacdfe) {
+ abort(
+ `Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`,
+ );
}
// Also test the global address 0 for integrity.
- if (HEAPU32[((0)>>2)] != 0x63736d65 /* 'emsc' */) {
+ if (HEAPU32[0 >> 2] != 0x63736d65 /* 'emsc' */) {
abort('Runtime error: The application has corrupted its heap memory area (address zero)!');
}
}
// end include: runtime_stack_check.js
// include: runtime_assertions.js
// Endianness check
-(function() {
+(function () {
var h16 = new Int16Array(1);
var h8 = new Int8Array(h16.buffer);
h16[0] = 0x6373;
- if (h8[0] !== 0x73 || h8[1] !== 0x63) throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)';
+ if (h8[0] !== 0x73 || h8[1] !== 0x63)
+ throw 'Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)';
})();
// end include: runtime_assertions.js
-var __ATPRERUN__ = []; // functions called before the runtime is initialized
-var __ATINIT__ = []; // functions called during startup
-var __ATEXIT__ = []; // functions called during shutdown
+var __ATPRERUN__ = []; // functions called before the runtime is initialized
+var __ATINIT__ = []; // functions called during startup
+var __ATEXIT__ = []; // functions called during shutdown
var __ATPOSTRUN__ = []; // functions called after the main() is called
var runtimeInitialized = false;
@@ -432,7 +498,6 @@ function initRuntime() {
checkStackCookie();
-
callRuntimeCallbacks(__ATINIT__);
}
@@ -457,8 +522,7 @@ function addOnInit(cb) {
__ATINIT__.unshift(cb);
}
-function addOnExit(cb) {
-}
+function addOnExit(cb) {}
function addOnPostRun(cb) {
__ATPOSTRUN__.unshift(cb);
@@ -473,10 +537,22 @@ function addOnPostRun(cb) {
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc
-assert(Math.imul, 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.fround, 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.clz32, 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
-assert(Math.trunc, 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill');
+assert(
+ Math.imul,
+ 'This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+ Math.fround,
+ 'This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+ Math.clz32,
+ 'This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
+assert(
+ Math.trunc,
+ 'This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill',
+);
// end include: runtime_math.js
// A counter of dependencies for calling run(). If we need to
// do asynchronous work before running, increment this and
@@ -595,18 +671,38 @@ function abort(what) {
// show errors on likely calls to FS when it was not included
var FS = {
error() {
- abort('Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM');
+ abort(
+ 'Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM',
+ );
+ },
+ init() {
+ FS.error();
+ },
+ createDataFile() {
+ FS.error();
+ },
+ createPreloadedFile() {
+ FS.error();
+ },
+ createLazyFile() {
+ FS.error();
+ },
+ open() {
+ FS.error();
+ },
+ mkdev() {
+ FS.error();
+ },
+ registerDevice() {
+ FS.error();
+ },
+ analyzePath() {
+ FS.error();
+ },
+
+ ErrnoError() {
+ FS.error();
},
- init() { FS.error() },
- createDataFile() { FS.error() },
- createPreloadedFile() { FS.error() },
- createLazyFile() { FS.error() },
- open() { FS.error() },
- mkdev() { FS.error() },
- registerDevice() { FS.error() },
- analyzePath() { FS.error() },
-
- ErrnoError() { FS.error() },
};
blst['FS_createDataFile'] = FS.createDataFile;
blst['FS_createPreloadedFile'] = FS.createPreloadedFile;
@@ -633,7 +729,10 @@ function createExportWrapper(name, nargs) {
var f = wasmExports[name];
assert(f, `exported native function \`${name}\` not found`);
// Only assert for too many arguments. Too few can be valid since the missing arguments will be zero filled.
- assert(args.length <= nargs, `native function \`${name}\` called with ${args.length} args but expects ${nargs}`);
+ assert(
+ args.length <= nargs,
+ `native function \`${name}\` called with ${args.length} args but expects ${nargs}`,
+ );
return f(...args);
};
}
@@ -655,11 +754,11 @@ class CppException extends EmscriptenEH {
}
// end include: runtime_exceptions.js
function findWasmBinary() {
- var f = 'blst.wasm';
- if (!isDataURI(f)) {
- return locateFile(f);
- }
- return f;
+ var f = 'blst.wasm';
+ if (!isDataURI(f)) {
+ return locateFile(f);
+ }
+ return f;
}
var wasmBinaryFile;
@@ -676,16 +775,20 @@ function getBinarySync(file) {
function getBinaryPromise(binaryFile) {
// If we don't have the binary yet, load it asynchronously using readAsync.
- if (!wasmBinary
- ) {
+ if (!wasmBinary) {
// Fetch the binary use readAsync
return new Promise((resolve, reject) => {
- readAsync(binaryFile,
- (response) => resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))),
+ readAsync(
+ binaryFile,
+ (response) => resolve(new Uint8Array(/** @type{!ArrayBuffer} */ (response))),
(error) => {
- try { resolve(getBinarySync(binaryFile)); }
- catch (e) { reject(e); }
- });
+ try {
+ resolve(getBinarySync(binaryFile));
+ } catch (e) {
+ reject(e);
+ }
+ },
+ );
});
}
@@ -694,33 +797,39 @@ function getBinaryPromise(binaryFile) {
}
function instantiateArrayBuffer(binaryFile, imports, receiver) {
- return getBinaryPromise(binaryFile).then((binary) => {
- return WebAssembly.instantiate(binary, imports);
- }).then(receiver, (reason) => {
- err(`failed to asynchronously prepare wasm: ${reason}`);
-
- // Warn on some common problems.
- if (isFileURI(wasmBinaryFile)) {
- err(`warning: Loading from a file URI (${wasmBinaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`);
- }
- abort(reason);
- });
+ return getBinaryPromise(binaryFile)
+ .then((binary) => {
+ return WebAssembly.instantiate(binary, imports);
+ })
+ .then(receiver, (reason) => {
+ err(`failed to asynchronously prepare wasm: ${reason}`);
+
+ // Warn on some common problems.
+ if (isFileURI(wasmBinaryFile)) {
+ err(
+ `warning: Loading from a file URI (${wasmBinaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`,
+ );
+ }
+ abort(reason);
+ });
}
function instantiateAsync(binary, binaryFile, imports, callback) {
- if (!binary &&
- typeof WebAssembly.instantiateStreaming == 'function' &&
- !isDataURI(binaryFile) &&
- // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
- !isFileURI(binaryFile) &&
- // Avoid instantiateStreaming() on Node.js environment for now, as while
- // Node.js v18.1.0 implements it, it does not have a full fetch()
- // implementation yet.
- //
- // Reference:
- // https://github.com/emscripten-core/emscripten/pull/16917
- !ENVIRONMENT_IS_NODE &&
- typeof fetch == 'function') {
+ if (
+ !binary &&
+ typeof WebAssembly.instantiateStreaming == 'function' &&
+ !isDataURI(binaryFile) &&
+ // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously.
+ !isFileURI(binaryFile) &&
+ // Avoid instantiateStreaming() on Node.js environment for now, as while
+ // Node.js v18.1.0 implements it, it does not have a full fetch()
+ // implementation yet.
+ //
+ // Reference:
+ // https://github.com/emscripten-core/emscripten/pull/16917
+ !ENVIRONMENT_IS_NODE &&
+ typeof fetch == 'function'
+ ) {
return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => {
// Suppress closure warning here since the upstream definition for
// instantiateStreaming only allows Promise rather than
@@ -729,15 +838,13 @@ function instantiateAsync(binary, binaryFile, imports, callback) {
/** @suppress {checkTypes} */
var result = WebAssembly.instantiateStreaming(response, imports);
- return result.then(
- callback,
- function(reason) {
- // We expect the most common failure cause to be a bad MIME type for the binary,
- // in which case falling back to ArrayBuffer instantiation should work.
- err(`wasm streaming compile failed: ${reason}`);
- err('falling back to ArrayBuffer instantiation');
- return instantiateArrayBuffer(binaryFile, imports, callback);
- });
+ return result.then(callback, function (reason) {
+ // We expect the most common failure cause to be a bad MIME type for the binary,
+ // in which case falling back to ArrayBuffer instantiation should work.
+ err(`wasm streaming compile failed: ${reason}`);
+ err('falling back to ArrayBuffer instantiation');
+ return instantiateArrayBuffer(binaryFile, imports, callback);
+ });
});
}
return instantiateArrayBuffer(binaryFile, imports, callback);
@@ -746,9 +853,9 @@ function instantiateAsync(binary, binaryFile, imports, callback) {
function getWasmImports() {
// prepare imports
return {
- 'env': wasmImports,
- 'wasi_snapshot_preview1': wasmImports,
- }
+ env: wasmImports,
+ wasi_snapshot_preview1: wasmImports,
+ };
}
// Create the wasm instance.
@@ -762,15 +869,13 @@ function createWasm() {
function receiveInstance(instance, module) {
wasmExports = instance.exports;
-
-
wasmMemory = wasmExports['memory'];
-
+
assert(wasmMemory, 'memory not found in wasm exports');
updateMemoryViews();
wasmTable = wasmExports['__indirect_function_table'];
-
+
assert(wasmTable, 'table not found in wasm exports');
addOnInit(wasmExports['__wasm_call_ctors']);
@@ -789,7 +894,10 @@ function createWasm() {
function receiveInstantiationResult(result) {
// 'result' is a ResultObject object which has both the module and instance.
// receiveInstance() will swap in the exports (to blst.asm) so they can be called
- assert(blst === trueModule, 'the blst object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?');
+ assert(
+ blst === trueModule,
+ 'the blst object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?',
+ );
trueModule = null;
// TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line.
// When the regression is fixed, can restore the above PTHREADS-enabled path.
@@ -805,9 +913,9 @@ function createWasm() {
if (blst['instantiateWasm']) {
try {
return blst['instantiateWasm'](info, receiveInstance);
- } catch(e) {
+ } catch (e) {
err(`blst.instantiateWasm callback failed with error: ${e}`);
- return false;
+ return false;
}
}
@@ -822,15 +930,16 @@ var tempDouble;
var tempI64;
// include: runtime_debug.js
-function legacyModuleProp(prop, newName, incoming=true) {
+function legacyModuleProp(prop, newName, incoming = true) {
if (!Object.getOwnPropertyDescriptor(blst, prop)) {
Object.defineProperty(blst, prop, {
configurable: true,
get() {
- let extra = incoming ? ' (the initial value can be provided on blst, but after startup the value is only looked for on a local variable of that name)' : '';
+ let extra = incoming
+ ? ' (the initial value can be provided on blst, but after startup the value is only looked for on a local variable of that name)'
+ : '';
abort(`\`blst.${prop}\` has been replaced by \`${newName}\`` + extra);
-
- }
+ },
});
}
}
@@ -843,15 +952,17 @@ function ignoredModuleProp(prop) {
// forcing the filesystem exports a few things by default
function isExportedByForceFilesystem(name) {
- return name === 'FS_createPath' ||
- name === 'FS_createDataFile' ||
- name === 'FS_createPreloadedFile' ||
- name === 'FS_unlink' ||
- name === 'addRunDependency' ||
- // The old FS has some functionality that WasmFS lacks.
- name === 'FS_createLazyFile' ||
- name === 'FS_createDevice' ||
- name === 'removeRunDependency';
+ return (
+ name === 'FS_createPath' ||
+ name === 'FS_createDataFile' ||
+ name === 'FS_createPreloadedFile' ||
+ name === 'FS_unlink' ||
+ name === 'addRunDependency' ||
+ // The old FS has some functionality that WasmFS lacks.
+ name === 'FS_createLazyFile' ||
+ name === 'FS_createDevice' ||
+ name === 'removeRunDependency'
+ );
}
function missingGlobal(sym, msg) {
@@ -861,7 +972,7 @@ function missingGlobal(sym, msg) {
get() {
warnOnce(`\`${sym}\` is not longer defined by emscripten. ${msg}`);
return undefined;
- }
+ },
});
}
}
@@ -886,11 +997,12 @@ function missingLibrarySymbol(sym) {
}
msg += ` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${librarySymbol}')`;
if (isExportedByForceFilesystem(sym)) {
- msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
+ msg +=
+ '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
}
warnOnce(msg);
return undefined;
- }
+ },
});
}
// Any symbol that is not included from the JS library is also (by definition)
@@ -905,10 +1017,11 @@ function unexportedRuntimeSymbol(sym) {
get() {
var msg = `'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;
if (isExportedByForceFilesystem(sym)) {
- msg += '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
+ msg +=
+ '. Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you';
}
abort(msg);
- }
+ },
});
}
}
@@ -922,542 +1035,575 @@ function dbg(...args) {
// end include: runtime_debug.js
// === Body ===
-function blst_exception(code) { throw new Error(BLST_ERROR_str[code]); }
+function blst_exception(code) {
+ throw new Error(BLST_ERROR_str[code]);
+}
// end include: preamble.js
+/** @constructor */
+function ExitStatus(status) {
+ this.name = 'ExitStatus';
+ this.message = `Program terminated with exit(${status})`;
+ this.status = status;
+}
- /** @constructor */
- function ExitStatus(status) {
- this.name = 'ExitStatus';
- this.message = `Program terminated with exit(${status})`;
- this.status = status;
- }
+var callRuntimeCallbacks = (callbacks) => {
+ while (callbacks.length > 0) {
+ // Pass the module as the first argument.
+ callbacks.shift()(blst);
+ }
+};
- var callRuntimeCallbacks = (callbacks) => {
- while (callbacks.length > 0) {
- // Pass the module as the first argument.
- callbacks.shift()(blst);
- }
- };
+/**
+ * @param {number} ptr
+ * @param {string} type
+ */
+function getValue(ptr, type = 'i8') {
+ if (type.endsWith('*')) type = '*';
+ switch (type) {
+ case 'i1':
+ return HEAP8[ptr];
+ case 'i8':
+ return HEAP8[ptr];
+ case 'i16':
+ return HEAP16[ptr >> 1];
+ case 'i32':
+ return HEAP32[ptr >> 2];
+ case 'i64':
+ abort('to do getValue(i64) use WASM_BIGINT');
+ case 'float':
+ return HEAPF32[ptr >> 2];
+ case 'double':
+ return HEAPF64[ptr >> 3];
+ case '*':
+ return HEAPU32[ptr >> 2];
+ default:
+ abort(`invalid type for getValue: ${type}`);
+ }
+}
-
- /**
- * @param {number} ptr
- * @param {string} type
- */
- function getValue(ptr, type = 'i8') {
- if (type.endsWith('*')) type = '*';
- switch (type) {
- case 'i1': return HEAP8[ptr];
- case 'i8': return HEAP8[ptr];
- case 'i16': return HEAP16[((ptr)>>1)];
- case 'i32': return HEAP32[((ptr)>>2)];
- case 'i64': abort('to do getValue(i64) use WASM_BIGINT');
- case 'float': return HEAPF32[((ptr)>>2)];
- case 'double': return HEAPF64[((ptr)>>3)];
- case '*': return HEAPU32[((ptr)>>2)];
- default: abort(`invalid type for getValue: ${type}`);
+var lengthBytesUTF8 = (str) => {
+ var len = 0;
+ for (var i = 0; i < str.length; ++i) {
+ // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
+ // unit, not a Unicode code point of the character! So decode
+ // UTF16->UTF32->UTF8.
+ // See http://unicode.org/faq/utf_bom.html#utf16-3
+ var c = str.charCodeAt(i); // possibly a lead surrogate
+ if (c <= 0x7f) {
+ len++;
+ } else if (c <= 0x7ff) {
+ len += 2;
+ } else if (c >= 0xd800 && c <= 0xdfff) {
+ len += 4;
+ ++i;
+ } else {
+ len += 3;
}
}
+ return len;
+};
- var lengthBytesUTF8 = (str) => {
- var len = 0;
- for (var i = 0; i < str.length; ++i) {
- // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
- // unit, not a Unicode code point of the character! So decode
- // UTF16->UTF32->UTF8.
- // See http://unicode.org/faq/utf_bom.html#utf16-3
- var c = str.charCodeAt(i); // possibly a lead surrogate
- if (c <= 0x7F) {
- len++;
- } else if (c <= 0x7FF) {
- len += 2;
- } else if (c >= 0xD800 && c <= 0xDFFF) {
- len += 4; ++i;
- } else {
- len += 3;
- }
- }
- return len;
- };
-
- var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
- assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);
- // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
- // undefined and false each don't write out any bytes.
- if (!(maxBytesToWrite > 0))
- return 0;
-
- var startIdx = outIdx;
- var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
- for (var i = 0; i < str.length; ++i) {
- // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
- // unit, not a Unicode code point of the character! So decode
- // UTF16->UTF32->UTF8.
- // See http://unicode.org/faq/utf_bom.html#utf16-3
- // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
- // and https://www.ietf.org/rfc/rfc2279.txt
- // and https://tools.ietf.org/html/rfc3629
- var u = str.charCodeAt(i); // possibly a lead surrogate
- if (u >= 0xD800 && u <= 0xDFFF) {
- var u1 = str.charCodeAt(++i);
- u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF);
- }
- if (u <= 0x7F) {
- if (outIdx >= endIdx) break;
- heap[outIdx++] = u;
- } else if (u <= 0x7FF) {
- if (outIdx + 1 >= endIdx) break;
- heap[outIdx++] = 0xC0 | (u >> 6);
- heap[outIdx++] = 0x80 | (u & 63);
- } else if (u <= 0xFFFF) {
- if (outIdx + 2 >= endIdx) break;
- heap[outIdx++] = 0xE0 | (u >> 12);
- heap[outIdx++] = 0x80 | ((u >> 6) & 63);
- heap[outIdx++] = 0x80 | (u & 63);
- } else {
- if (outIdx + 3 >= endIdx) break;
- if (u > 0x10FFFF) warnOnce('Invalid Unicode code point ' + ptrToString(u) + ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).');
- heap[outIdx++] = 0xF0 | (u >> 18);
- heap[outIdx++] = 0x80 | ((u >> 12) & 63);
- heap[outIdx++] = 0x80 | ((u >> 6) & 63);
- heap[outIdx++] = 0x80 | (u & 63);
- }
- }
- // Null-terminate the pointer to the buffer.
- heap[outIdx] = 0;
- return outIdx - startIdx;
- };
- /** @type {function(string, boolean=, number=)} */
- function intArrayFromString(stringy, dontAddNull, length) {
- var len = length > 0 ? length : lengthBytesUTF8(stringy)+1;
- var u8array = new Array(len);
- var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
- if (dontAddNull) u8array.length = numBytesWritten;
- return u8array;
- }
-
- var noExitRuntime = blst['noExitRuntime'] || true;
-
- var ptrToString = (ptr) => {
- assert(typeof ptr === 'number');
- // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
- ptr >>>= 0;
- return '0x' + ptr.toString(16).padStart(8, '0');
- };
+var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => {
+ assert(typeof str === 'string', `stringToUTF8Array expects a string (got ${typeof str})`);
+ // Parameter maxBytesToWrite is not optional. Negative values, 0, null,
+ // undefined and false each don't write out any bytes.
+ if (!(maxBytesToWrite > 0)) return 0;
+
+ var startIdx = outIdx;
+ var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator.
+ for (var i = 0; i < str.length; ++i) {
+ // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code
+ // unit, not a Unicode code point of the character! So decode
+ // UTF16->UTF32->UTF8.
+ // See http://unicode.org/faq/utf_bom.html#utf16-3
+ // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description
+ // and https://www.ietf.org/rfc/rfc2279.txt
+ // and https://tools.ietf.org/html/rfc3629
+ var u = str.charCodeAt(i); // possibly a lead surrogate
+ if (u >= 0xd800 && u <= 0xdfff) {
+ var u1 = str.charCodeAt(++i);
+ u = (0x10000 + ((u & 0x3ff) << 10)) | (u1 & 0x3ff);
+ }
+ if (u <= 0x7f) {
+ if (outIdx >= endIdx) break;
+ heap[outIdx++] = u;
+ } else if (u <= 0x7ff) {
+ if (outIdx + 1 >= endIdx) break;
+ heap[outIdx++] = 0xc0 | (u >> 6);
+ heap[outIdx++] = 0x80 | (u & 63);
+ } else if (u <= 0xffff) {
+ if (outIdx + 2 >= endIdx) break;
+ heap[outIdx++] = 0xe0 | (u >> 12);
+ heap[outIdx++] = 0x80 | ((u >> 6) & 63);
+ heap[outIdx++] = 0x80 | (u & 63);
+ } else {
+ if (outIdx + 3 >= endIdx) break;
+ if (u > 0x10ffff)
+ warnOnce(
+ 'Invalid Unicode code point ' +
+ ptrToString(u) +
+ ' encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).',
+ );
+ heap[outIdx++] = 0xf0 | (u >> 18);
+ heap[outIdx++] = 0x80 | ((u >> 12) & 63);
+ heap[outIdx++] = 0x80 | ((u >> 6) & 63);
+ heap[outIdx++] = 0x80 | (u & 63);
+ }
+ }
+ // Null-terminate the pointer to the buffer.
+ heap[outIdx] = 0;
+ return outIdx - startIdx;
+};
+/** @type {function(string, boolean=, number=)} */
+function intArrayFromString(stringy, dontAddNull, length) {
+ var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
+ var u8array = new Array(len);
+ var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
+ if (dontAddNull) u8array.length = numBytesWritten;
+ return u8array;
+}
+
+var noExitRuntime = blst['noExitRuntime'] || true;
+
+var ptrToString = (ptr) => {
+ assert(typeof ptr === 'number');
+ // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
+ ptr >>>= 0;
+ return '0x' + ptr.toString(16).padStart(8, '0');
+};
+
+/**
+ * @param {number} ptr
+ * @param {number} value
+ * @param {string} type
+ */
+function setValue(ptr, value, type = 'i8') {
+ if (type.endsWith('*')) type = '*';
+ switch (type) {
+ case 'i1':
+ HEAP8[ptr] = value;
+ break;
+ case 'i8':
+ HEAP8[ptr] = value;
+ break;
+ case 'i16':
+ HEAP16[ptr >> 1] = value;
+ break;
+ case 'i32':
+ HEAP32[ptr >> 2] = value;
+ break;
+ case 'i64':
+ abort('to do setValue(i64) use WASM_BIGINT');
+ case 'float':
+ HEAPF32[ptr >> 2] = value;
+ break;
+ case 'double':
+ HEAPF64[ptr >> 3] = value;
+ break;
+ case '*':
+ HEAPU32[ptr >> 2] = value;
+ break;
+ default:
+ abort(`invalid type for setValue: ${type}`);
+ }
+}
+
+var stackRestore = (val) => __emscripten_stack_restore(val);
+
+var stackSave = () => _emscripten_stack_get_current();
+
+var warnOnce = (text) => {
+ warnOnce.shown ||= {};
+ if (!warnOnce.shown[text]) {
+ warnOnce.shown[text] = 1;
+ if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text;
+ err(text);
+ }
+};
+
+var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
+
+/**
+ * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
+ * array that contains uint8 values, returns a copy of that string as a
+ * Javascript String object.
+ * heapOrArray is either a regular array, or a JavaScript typed array view.
+ * @param {number} idx
+ * @param {number=} maxBytesToRead
+ * @return {string}
+ */
+var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => {
+ var endIdx = idx + maxBytesToRead;
+ var endPtr = idx;
+ // TextDecoder needs to know the byte length in advance, it doesn't stop on
+ // null terminator by itself. Also, use the length info to avoid running tiny
+ // strings through TextDecoder, since .subarray() allocates garbage.
+ // (As a tiny code save trick, compare endPtr against endIdx using a negation,
+ // so that undefined means Infinity)
+ while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
+
+ if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
+ return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
+ }
+ var str = '';
+ // If building with TextDecoder, we have already computed the string length
+ // above, so test loop end condition against that
+ while (idx < endPtr) {
+ // For UTF8 byte structure, see:
+ // http://en.wikipedia.org/wiki/UTF-8#Description
+ // https://www.ietf.org/rfc/rfc2279.txt
+ // https://tools.ietf.org/html/rfc3629
+ var u0 = heapOrArray[idx++];
+ if (!(u0 & 0x80)) {
+ str += String.fromCharCode(u0);
+ continue;
+ }
+ var u1 = heapOrArray[idx++] & 63;
+ if ((u0 & 0xe0) == 0xc0) {
+ str += String.fromCharCode(((u0 & 31) << 6) | u1);
+ continue;
+ }
+ var u2 = heapOrArray[idx++] & 63;
+ if ((u0 & 0xf0) == 0xe0) {
+ u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
+ } else {
+ if ((u0 & 0xf8) != 0xf0)
+ warnOnce(
+ 'Invalid UTF-8 leading byte ' +
+ ptrToString(u0) +
+ ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!',
+ );
+ u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
+ }
-
- /**
- * @param {number} ptr
- * @param {number} value
- * @param {string} type
- */
- function setValue(ptr, value, type = 'i8') {
- if (type.endsWith('*')) type = '*';
- switch (type) {
- case 'i1': HEAP8[ptr] = value; break;
- case 'i8': HEAP8[ptr] = value; break;
- case 'i16': HEAP16[((ptr)>>1)] = value; break;
- case 'i32': HEAP32[((ptr)>>2)] = value; break;
- case 'i64': abort('to do setValue(i64) use WASM_BIGINT');
- case 'float': HEAPF32[((ptr)>>2)] = value; break;
- case 'double': HEAPF64[((ptr)>>3)] = value; break;
- case '*': HEAPU32[((ptr)>>2)] = value; break;
- default: abort(`invalid type for setValue: ${type}`);
+ if (u0 < 0x10000) {
+ str += String.fromCharCode(u0);
+ } else {
+ var ch = u0 - 0x10000;
+ str += String.fromCharCode(0xd800 | (ch >> 10), 0xdc00 | (ch & 0x3ff));
}
}
+ return str;
+};
- var stackRestore = (val) => __emscripten_stack_restore(val);
+/**
+ * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
+ * emscripten HEAP, returns a copy of that string as a Javascript String object.
+ *
+ * @param {number} ptr
+ * @param {number=} maxBytesToRead - An optional length that specifies the
+ * maximum number of bytes to read. You can omit this parameter to scan the
+ * string until the first 0 byte. If maxBytesToRead is passed, and the string
+ * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
+ * string will cut short at that byte index (i.e. maxBytesToRead will not
+ * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
+ * frequent uses of UTF8ToString() with and without maxBytesToRead may throw
+ * JS JIT optimizations off, so it is worth to consider consistently using one
+ * @return {string}
+ */
+var UTF8ToString = (ptr, maxBytesToRead) => {
+ assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);
+ return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
+};
+var ___assert_fail = (condition, filename, line, func) => {
+ abort(
+ `Assertion failed: ${UTF8ToString(condition)}, at: ` +
+ [
+ filename ? UTF8ToString(filename) : 'unknown filename',
+ line,
+ func ? UTF8ToString(func) : 'unknown function',
+ ],
+ );
+};
- var stackSave = () => _emscripten_stack_get_current();
+var exceptionCaught = [];
- var warnOnce = (text) => {
- warnOnce.shown ||= {};
- if (!warnOnce.shown[text]) {
- warnOnce.shown[text] = 1;
- if (ENVIRONMENT_IS_NODE) text = 'warning: ' + text;
- err(text);
- }
- };
+var uncaughtExceptionCount = 0;
+var ___cxa_begin_catch = (ptr) => {
+ var info = new ExceptionInfo(ptr);
+ if (!info.get_caught()) {
+ info.set_caught(true);
+ uncaughtExceptionCount--;
+ }
+ info.set_rethrown(false);
+ exceptionCaught.push(info);
+ ___cxa_increment_exception_refcount(info.excPtr);
+ return info.get_exception_ptr();
+};
- var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined;
-
- /**
- * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given
- * array that contains uint8 values, returns a copy of that string as a
- * Javascript String object.
- * heapOrArray is either a regular array, or a JavaScript typed array view.
- * @param {number} idx
- * @param {number=} maxBytesToRead
- * @return {string}
- */
- var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => {
- var endIdx = idx + maxBytesToRead;
- var endPtr = idx;
- // TextDecoder needs to know the byte length in advance, it doesn't stop on
- // null terminator by itself. Also, use the length info to avoid running tiny
- // strings through TextDecoder, since .subarray() allocates garbage.
- // (As a tiny code save trick, compare endPtr against endIdx using a negation,
- // so that undefined means Infinity)
- while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr;
-
- if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {
- return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));
- }
- var str = '';
- // If building with TextDecoder, we have already computed the string length
- // above, so test loop end condition against that
- while (idx < endPtr) {
- // For UTF8 byte structure, see:
- // http://en.wikipedia.org/wiki/UTF-8#Description
- // https://www.ietf.org/rfc/rfc2279.txt
- // https://tools.ietf.org/html/rfc3629
- var u0 = heapOrArray[idx++];
- if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; }
- var u1 = heapOrArray[idx++] & 63;
- if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; }
- var u2 = heapOrArray[idx++] & 63;
- if ((u0 & 0xF0) == 0xE0) {
- u0 = ((u0 & 15) << 12) | (u1 << 6) | u2;
- } else {
- if ((u0 & 0xF8) != 0xF0) warnOnce('Invalid UTF-8 leading byte ' + ptrToString(u0) + ' encountered when deserializing a UTF-8 string in wasm memory to a JS string!');
- u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63);
- }
-
- if (u0 < 0x10000) {
- str += String.fromCharCode(u0);
- } else {
- var ch = u0 - 0x10000;
- str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF));
- }
- }
- return str;
- };
-
- /**
- * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the
- * emscripten HEAP, returns a copy of that string as a Javascript String object.
- *
- * @param {number} ptr
- * @param {number=} maxBytesToRead - An optional length that specifies the
- * maximum number of bytes to read. You can omit this parameter to scan the
- * string until the first 0 byte. If maxBytesToRead is passed, and the string
- * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
- * string will cut short at that byte index (i.e. maxBytesToRead will not
- * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
- * frequent uses of UTF8ToString() with and without maxBytesToRead may throw
- * JS JIT optimizations off, so it is worth to consider consistently using one
- * @return {string}
- */
- var UTF8ToString = (ptr, maxBytesToRead) => {
- assert(typeof ptr == 'number', `UTF8ToString expects a number (got ${typeof ptr})`);
- return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : '';
- };
- var ___assert_fail = (condition, filename, line, func) => {
- abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']);
- };
+var exceptionLast = 0;
- var exceptionCaught = [];
-
-
- var uncaughtExceptionCount = 0;
- var ___cxa_begin_catch = (ptr) => {
- var info = new ExceptionInfo(ptr);
- if (!info.get_caught()) {
- info.set_caught(true);
- uncaughtExceptionCount--;
- }
- info.set_rethrown(false);
- exceptionCaught.push(info);
- ___cxa_increment_exception_refcount(info.excPtr);
- return info.get_exception_ptr();
- };
+var ___cxa_end_catch = () => {
+ // Clear state flag.
+ _setThrew(0, 0);
+ assert(exceptionCaught.length > 0);
+ // Call destructor if one is registered then clear it.
+ var info = exceptionCaught.pop();
-
- var exceptionLast = 0;
-
-
- var ___cxa_end_catch = () => {
- // Clear state flag.
- _setThrew(0, 0);
- assert(exceptionCaught.length > 0);
- // Call destructor if one is registered then clear it.
- var info = exceptionCaught.pop();
-
- ___cxa_decrement_exception_refcount(info.excPtr);
- exceptionLast = 0; // XXX in decRef?
- };
+ ___cxa_decrement_exception_refcount(info.excPtr);
+ exceptionLast = 0; // XXX in decRef?
+};
-
- class ExceptionInfo {
- // excPtr - Thrown object pointer to wrap. Metadata pointer is calculated from it.
- constructor(excPtr) {
- this.excPtr = excPtr;
- this.ptr = excPtr - 24;
- }
-
- set_type(type) {
- HEAPU32[(((this.ptr)+(4))>>2)] = type;
- }
-
- get_type() {
- return HEAPU32[(((this.ptr)+(4))>>2)];
- }
-
- set_destructor(destructor) {
- HEAPU32[(((this.ptr)+(8))>>2)] = destructor;
- }
-
- get_destructor() {
- return HEAPU32[(((this.ptr)+(8))>>2)];
- }
-
- set_caught(caught) {
- caught = caught ? 1 : 0;
- HEAP8[(this.ptr)+(12)] = caught;
- }
-
- get_caught() {
- return HEAP8[(this.ptr)+(12)] != 0;
- }
-
- set_rethrown(rethrown) {
- rethrown = rethrown ? 1 : 0;
- HEAP8[(this.ptr)+(13)] = rethrown;
- }
-
- get_rethrown() {
- return HEAP8[(this.ptr)+(13)] != 0;
- }
-
- // Initialize native structure fields. Should be called once after allocated.
- init(type, destructor) {
- this.set_adjusted_ptr(0);
- this.set_type(type);
- this.set_destructor(destructor);
- }
-
- set_adjusted_ptr(adjustedPtr) {
- HEAPU32[(((this.ptr)+(16))>>2)] = adjustedPtr;
- }
-
- get_adjusted_ptr() {
- return HEAPU32[(((this.ptr)+(16))>>2)];
- }
-
- // Get pointer which is expected to be received by catch clause in C++ code. It may be adjusted
- // when the pointer is casted to some of the exception object base classes (e.g. when virtual
- // inheritance is used). When a pointer is thrown this method should return the thrown pointer
- // itself.
- get_exception_ptr() {
- // Work around a fastcomp bug, this code is still included for some reason in a build without
- // exceptions support.
- var isPointer = ___cxa_is_pointer_type(this.get_type());
- if (isPointer) {
- return HEAPU32[((this.excPtr)>>2)];
- }
- var adjusted = this.get_adjusted_ptr();
- if (adjusted !== 0) return adjusted;
- return this.excPtr;
- }
+class ExceptionInfo {
+ // excPtr - Thrown object pointer to wrap. Metadata pointer is calculated from it.
+ constructor(excPtr) {
+ this.excPtr = excPtr;
+ this.ptr = excPtr - 24;
+ }
+
+ set_type(type) {
+ HEAPU32[(this.ptr + 4) >> 2] = type;
+ }
+
+ get_type() {
+ return HEAPU32[(this.ptr + 4) >> 2];
+ }
+
+ set_destructor(destructor) {
+ HEAPU32[(this.ptr + 8) >> 2] = destructor;
+ }
+
+ get_destructor() {
+ return HEAPU32[(this.ptr + 8) >> 2];
+ }
+
+ set_caught(caught) {
+ caught = caught ? 1 : 0;
+ HEAP8[this.ptr + 12] = caught;
+ }
+
+ get_caught() {
+ return HEAP8[this.ptr + 12] != 0;
+ }
+
+ set_rethrown(rethrown) {
+ rethrown = rethrown ? 1 : 0;
+ HEAP8[this.ptr + 13] = rethrown;
+ }
+
+ get_rethrown() {
+ return HEAP8[this.ptr + 13] != 0;
+ }
+
+ // Initialize native structure fields. Should be called once after allocated.
+ init(type, destructor) {
+ this.set_adjusted_ptr(0);
+ this.set_type(type);
+ this.set_destructor(destructor);
+ }
+
+ set_adjusted_ptr(adjustedPtr) {
+ HEAPU32[(this.ptr + 16) >> 2] = adjustedPtr;
+ }
+
+ get_adjusted_ptr() {
+ return HEAPU32[(this.ptr + 16) >> 2];
+ }
+
+ // Get pointer which is expected to be received by catch clause in C++ code. It may be adjusted
+ // when the pointer is casted to some of the exception object base classes (e.g. when virtual
+ // inheritance is used). When a pointer is thrown this method should return the thrown pointer
+ // itself.
+ get_exception_ptr() {
+ // Work around a fastcomp bug, this code is still included for some reason in a build without
+ // exceptions support.
+ var isPointer = ___cxa_is_pointer_type(this.get_type());
+ if (isPointer) {
+ return HEAPU32[this.excPtr >> 2];
}
-
- var ___resumeException = (ptr) => {
- if (!exceptionLast) {
- exceptionLast = new CppException(ptr);
- }
- throw exceptionLast;
- };
-
-
- var setTempRet0 = (val) => __emscripten_tempret_set(val);
- var findMatchingCatch = (args) => {
- var thrown =
- exceptionLast?.excPtr;
- if (!thrown) {
- // just pass through the null ptr
- setTempRet0(0);
- return 0;
- }
- var info = new ExceptionInfo(thrown);
- info.set_adjusted_ptr(thrown);
- var thrownType = info.get_type();
- if (!thrownType) {
- // just pass through the thrown ptr
- setTempRet0(0);
- return thrown;
- }
-
- // can_catch receives a **, add indirection
- // The different catch blocks are denoted by different types.
- // Due to inheritance, those types may not precisely match the
- // type of the thrown object. Find one which matches, and
- // return the type of the catch block which should be called.
- for (var caughtType of args) {
- if (caughtType === 0 || caughtType === thrownType) {
- // Catch all clause matched or exactly the same type is caught
- break;
- }
- var adjusted_ptr_addr = info.ptr + 16;
- if (___cxa_can_catch(caughtType, thrownType, adjusted_ptr_addr)) {
- setTempRet0(caughtType);
- return thrown;
- }
- }
- setTempRet0(thrownType);
+ var adjusted = this.get_adjusted_ptr();
+ if (adjusted !== 0) return adjusted;
+ return this.excPtr;
+ }
+}
+
+var ___resumeException = (ptr) => {
+ if (!exceptionLast) {
+ exceptionLast = new CppException(ptr);
+ }
+ throw exceptionLast;
+};
+
+var setTempRet0 = (val) => __emscripten_tempret_set(val);
+var findMatchingCatch = (args) => {
+ var thrown = exceptionLast?.excPtr;
+ if (!thrown) {
+ // just pass through the null ptr
+ setTempRet0(0);
+ return 0;
+ }
+ var info = new ExceptionInfo(thrown);
+ info.set_adjusted_ptr(thrown);
+ var thrownType = info.get_type();
+ if (!thrownType) {
+ // just pass through the thrown ptr
+ setTempRet0(0);
+ return thrown;
+ }
+
+ // can_catch receives a **, add indirection
+ // The different catch blocks are denoted by different types.
+ // Due to inheritance, those types may not precisely match the
+ // type of the thrown object. Find one which matches, and
+ // return the type of the catch block which should be called.
+ for (var caughtType of args) {
+ if (caughtType === 0 || caughtType === thrownType) {
+ // Catch all clause matched or exactly the same type is caught
+ break;
+ }
+ var adjusted_ptr_addr = info.ptr + 16;
+ if (___cxa_can_catch(caughtType, thrownType, adjusted_ptr_addr)) {
+ setTempRet0(caughtType);
return thrown;
- };
- var ___cxa_find_matching_catch_2 = () => findMatchingCatch([]);
-
- var ___cxa_find_matching_catch_3 = (arg0) => findMatchingCatch([arg0]);
-
-
-
- var ___cxa_throw = (ptr, type, destructor) => {
- var info = new ExceptionInfo(ptr);
- // Initialize ExceptionInfo content after it was allocated in __cxa_allocate_exception.
- info.init(type, destructor);
- exceptionLast = new CppException(ptr);
- uncaughtExceptionCount++;
- throw exceptionLast;
- };
+ }
+ }
+ setTempRet0(thrownType);
+ return thrown;
+};
+var ___cxa_find_matching_catch_2 = () => findMatchingCatch([]);
+var ___cxa_find_matching_catch_3 = (arg0) => findMatchingCatch([arg0]);
- var __abort_js = () => {
- abort('native code called abort()');
- };
+var ___cxa_throw = (ptr, type, destructor) => {
+ var info = new ExceptionInfo(ptr);
+ // Initialize ExceptionInfo content after it was allocated in __cxa_allocate_exception.
+ info.init(type, destructor);
+ exceptionLast = new CppException(ptr);
+ uncaughtExceptionCount++;
+ throw exceptionLast;
+};
- var __emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num);
+var __abort_js = () => {
+ abort('native code called abort()');
+};
- var getHeapMax = () =>
- HEAPU8.length;
-
- var abortOnCannotGrowMemory = (requestedSize) => {
- abort(`Cannot enlarge memory arrays to size ${requestedSize} bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value ${HEAP8.length}, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0`);
- };
- var _emscripten_resize_heap = (requestedSize) => {
- var oldSize = HEAPU8.length;
- // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
- requestedSize >>>= 0;
- abortOnCannotGrowMemory(requestedSize);
- };
+var __emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num);
- var SYSCALLS = {
- varargs:undefined,
+var getHeapMax = () => HEAPU8.length;
+
+var abortOnCannotGrowMemory = (requestedSize) => {
+ abort(
+ `Cannot enlarge memory arrays to size ${requestedSize} bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current value ${HEAP8.length}, (2) compile with -sALLOW_MEMORY_GROWTH which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -sABORTING_MALLOC=0`,
+ );
+};
+var _emscripten_resize_heap = (requestedSize) => {
+ var oldSize = HEAPU8.length;
+ // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned.
+ requestedSize >>>= 0;
+ abortOnCannotGrowMemory(requestedSize);
+};
+
+var SYSCALLS = {
+ varargs: undefined,
getStr(ptr) {
- var ret = UTF8ToString(ptr);
- return ret;
- },
- };
- var _fd_close = (fd) => {
- abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM');
- };
+ var ret = UTF8ToString(ptr);
+ return ret;
+ },
+};
+var _fd_close = (fd) => {
+ abort('fd_close called without SYSCALLS_REQUIRE_FILESYSTEM');
+};
- var convertI32PairToI53Checked = (lo, hi) => {
- assert(lo == (lo >>> 0) || lo == (lo|0)); // lo should either be a i32 or a u32
- assert(hi === (hi|0)); // hi should be a i32
- return ((hi + 0x200000) >>> 0 < 0x400001 - !!lo) ? (lo >>> 0) + hi * 4294967296 : NaN;
- };
- function _fd_seek(fd,offset_low, offset_high,whence,newOffset) {
- var offset = convertI32PairToI53Checked(offset_low, offset_high);
-
-
- return 70;
- ;
- }
-
- var printCharBuffers = [null,[],[]];
-
- var printChar = (stream, curr) => {
- var buffer = printCharBuffers[stream];
- assert(buffer);
- if (curr === 0 || curr === 10) {
- (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0));
- buffer.length = 0;
- } else {
- buffer.push(curr);
- }
- };
-
- var flush_NO_FILESYSTEM = () => {
- // flush anything remaining in the buffers during shutdown
- _fflush(0);
- if (printCharBuffers[1].length) printChar(1, 10);
- if (printCharBuffers[2].length) printChar(2, 10);
- };
-
-
- var _fd_write = (fd, iov, iovcnt, pnum) => {
- // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
- var num = 0;
- for (var i = 0; i < iovcnt; i++) {
- var ptr = HEAPU32[((iov)>>2)];
- var len = HEAPU32[(((iov)+(4))>>2)];
- iov += 8;
- for (var j = 0; j < len; j++) {
- printChar(fd, HEAPU8[ptr+j]);
- }
- num += len;
- }
- HEAPU32[((pnum)>>2)] = num;
- return 0;
- };
+var convertI32PairToI53Checked = (lo, hi) => {
+ assert(lo == lo >>> 0 || lo == (lo | 0)); // lo should either be a i32 or a u32
+ assert(hi === (hi | 0)); // hi should be a i32
+ return (hi + 0x200000) >>> 0 < 0x400001 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN;
+};
+function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {
+ var offset = convertI32PairToI53Checked(offset_low, offset_high);
+
+ return 70;
+}
- var _llvm_eh_typeid_for = (type) => type;
+var printCharBuffers = [null, [], []];
+var printChar = (stream, curr) => {
+ var buffer = printCharBuffers[stream];
+ assert(buffer);
+ if (curr === 0 || curr === 10) {
+ (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0));
+ buffer.length = 0;
+ } else {
+ buffer.push(curr);
+ }
+};
+var flush_NO_FILESYSTEM = () => {
+ // flush anything remaining in the buffers during shutdown
+ _fflush(0);
+ if (printCharBuffers[1].length) printChar(1, 10);
+ if (printCharBuffers[2].length) printChar(2, 10);
+};
- var alignMemory = (size, alignment) => {
- assert(alignment, "alignment argument is required");
- return Math.ceil(size / alignment) * alignment;
- };
+var _fd_write = (fd, iov, iovcnt, pnum) => {
+ // hack to support printf in SYSCALLS_REQUIRE_FILESYSTEM=0
+ var num = 0;
+ for (var i = 0; i < iovcnt; i++) {
+ var ptr = HEAPU32[iov >> 2];
+ var len = HEAPU32[(iov + 4) >> 2];
+ iov += 8;
+ for (var j = 0; j < len; j++) {
+ printChar(fd, HEAPU8[ptr + j]);
+ }
+ num += len;
+ }
+ HEAPU32[pnum >> 2] = num;
+ return 0;
+};
- var wasmTableMirror = [];
-
- /** @type {WebAssembly.Table} */
- var wasmTable;
- var getWasmTableEntry = (funcPtr) => {
- var func = wasmTableMirror[funcPtr];
- if (!func) {
- if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1;
- wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
- }
- assert(wasmTable.get(funcPtr) == func, 'JavaScript-side Wasm function table mirror is out of date!');
- return func;
- };
+var _llvm_eh_typeid_for = (type) => type;
- var incrementExceptionRefcount = (ptr) => ___cxa_increment_exception_refcount(ptr);
- blst['incrementExceptionRefcount'] = incrementExceptionRefcount;
-
- var decrementExceptionRefcount = (ptr) => ___cxa_decrement_exception_refcount(ptr);
- blst['decrementExceptionRefcount'] = decrementExceptionRefcount;
-
-
-
-
-
- var stackAlloc = (sz) => __emscripten_stack_alloc(sz);
-
- var getExceptionMessageCommon = (ptr) => {
- var sp = stackSave();
- var type_addr_addr = stackAlloc(4);
- var message_addr_addr = stackAlloc(4);
- ___get_exception_message(ptr, type_addr_addr, message_addr_addr);
- var type_addr = HEAPU32[((type_addr_addr)>>2)];
- var message_addr = HEAPU32[((message_addr_addr)>>2)];
- var type = UTF8ToString(type_addr);
- _free(type_addr);
- var message;
- if (message_addr) {
- message = UTF8ToString(message_addr);
- _free(message_addr);
- }
- stackRestore(sp);
- return [type, message];
- };
- var getExceptionMessage = (ptr) => getExceptionMessageCommon(ptr);
- blst['getExceptionMessage'] = getExceptionMessage;
+var alignMemory = (size, alignment) => {
+ assert(alignment, 'alignment argument is required');
+ return Math.ceil(size / alignment) * alignment;
+};
+
+var wasmTableMirror = [];
+
+/** @type {WebAssembly.Table} */
+var wasmTable;
+var getWasmTableEntry = (funcPtr) => {
+ var func = wasmTableMirror[funcPtr];
+ if (!func) {
+ if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1;
+ wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr);
+ }
+ assert(
+ wasmTable.get(funcPtr) == func,
+ 'JavaScript-side Wasm function table mirror is out of date!',
+ );
+ return func;
+};
+
+var incrementExceptionRefcount = (ptr) => ___cxa_increment_exception_refcount(ptr);
+blst['incrementExceptionRefcount'] = incrementExceptionRefcount;
+
+var decrementExceptionRefcount = (ptr) => ___cxa_decrement_exception_refcount(ptr);
+blst['decrementExceptionRefcount'] = decrementExceptionRefcount;
+
+var stackAlloc = (sz) => __emscripten_stack_alloc(sz);
+
+var getExceptionMessageCommon = (ptr) => {
+ var sp = stackSave();
+ var type_addr_addr = stackAlloc(4);
+ var message_addr_addr = stackAlloc(4);
+ ___get_exception_message(ptr, type_addr_addr, message_addr_addr);
+ var type_addr = HEAPU32[type_addr_addr >> 2];
+ var message_addr = HEAPU32[message_addr_addr >> 2];
+ var type = UTF8ToString(type_addr);
+ _free(type_addr);
+ var message;
+ if (message_addr) {
+ message = UTF8ToString(message_addr);
+ _free(message_addr);
+ }
+ stackRestore(sp);
+ return [type, message];
+};
+var getExceptionMessage = (ptr) => getExceptionMessageCommon(ptr);
+blst['getExceptionMessage'] = getExceptionMessage;
function checkIncomingModuleAPI() {
ignoredModuleProp('fetchSettings');
}
@@ -1513,256 +1659,382 @@ var wasmImports = {
/** @export */
invoke_viiii,
/** @export */
- llvm_eh_typeid_for: _llvm_eh_typeid_for
+ llvm_eh_typeid_for: _llvm_eh_typeid_for,
};
var wasmExports = createWasm();
var ___wasm_call_ctors = createExportWrapper('__wasm_call_ctors', 0);
-var _webidl_free = blst['_webidl_free'] = createExportWrapper('webidl_free', 1);
-var _free = blst['_free'] = createExportWrapper('free', 1);
-var _webidl_malloc = blst['_webidl_malloc'] = createExportWrapper('webidl_malloc', 1);
-var _malloc = blst['_malloc'] = createExportWrapper('malloc', 1);
-var _emscripten_bind_VoidPtr___destroy___0 = blst['_emscripten_bind_VoidPtr___destroy___0'] = createExportWrapper('emscripten_bind_VoidPtr___destroy___0', 1);
-var _const_G1 = blst['_const_G1'] = createExportWrapper('const_G1', 0);
-var _const_G2 = blst['_const_G2'] = createExportWrapper('const_G2', 0);
-var _const_NEG_G1 = blst['_const_NEG_G1'] = createExportWrapper('const_NEG_G1', 0);
-var _const_NEG_G2 = blst['_const_NEG_G2'] = createExportWrapper('const_NEG_G2', 0);
-var _SecretKey_0 = blst['_SecretKey_0'] = createExportWrapper('SecretKey_0', 0);
-var _SecretKey__destroy__0 = blst['_SecretKey__destroy__0'] = createExportWrapper('SecretKey__destroy__0', 1);
-var _SecretKey_keygen_3 = blst['_SecretKey_keygen_3'] = createExportWrapper('SecretKey_keygen_3', 4);
-var _SecretKey_derive_master_eip2333_2 = blst['_SecretKey_derive_master_eip2333_2'] = createExportWrapper('SecretKey_derive_master_eip2333_2', 3);
-var _SecretKey_derive_child_eip2333_2 = blst['_SecretKey_derive_child_eip2333_2'] = createExportWrapper('SecretKey_derive_child_eip2333_2', 3);
-var _SecretKey_from_bendian_1 = blst['_SecretKey_from_bendian_1'] = createExportWrapper('SecretKey_from_bendian_1', 2);
-var _SecretKey_from_lendian_1 = blst['_SecretKey_from_lendian_1'] = createExportWrapper('SecretKey_from_lendian_1', 2);
-var _SecretKey_to_bendian_0 = blst['_SecretKey_to_bendian_0'] = createExportWrapper('SecretKey_to_bendian_0', 1);
-var _SecretKey_to_lendian_0 = blst['_SecretKey_to_lendian_0'] = createExportWrapper('SecretKey_to_lendian_0', 1);
-var _Scalar_0 = blst['_Scalar_0'] = createExportWrapper('Scalar_0', 0);
-var _Scalar_2 = blst['_Scalar_2'] = createExportWrapper('Scalar_2', 2);
-var _Scalar_3 = blst['_Scalar_3'] = createExportWrapper('Scalar_3', 3);
-var _Scalar__destroy__0 = blst['_Scalar__destroy__0'] = createExportWrapper('Scalar__destroy__0', 1);
-var _Scalar_hash_to_3 = blst['_Scalar_hash_to_3'] = createExportWrapper('Scalar_hash_to_3', 4);
-var _Scalar_dup_0 = blst['_Scalar_dup_0'] = createExportWrapper('Scalar_dup_0', 1);
-var _Scalar_from_bendian_2 = blst['_Scalar_from_bendian_2'] = createExportWrapper('Scalar_from_bendian_2', 3);
-var _Scalar_from_lendian_2 = blst['_Scalar_from_lendian_2'] = createExportWrapper('Scalar_from_lendian_2', 3);
-var _Scalar_to_bendian_0 = blst['_Scalar_to_bendian_0'] = createExportWrapper('Scalar_to_bendian_0', 1);
-var _Scalar_to_lendian_0 = blst['_Scalar_to_lendian_0'] = createExportWrapper('Scalar_to_lendian_0', 1);
-var _Scalar_add_1 = blst['_Scalar_add_1'] = createExportWrapper('Scalar_add_1', 2);
-var _Scalar_sub_1 = blst['_Scalar_sub_1'] = createExportWrapper('Scalar_sub_1', 2);
-var _Scalar_mul_1 = blst['_Scalar_mul_1'] = createExportWrapper('Scalar_mul_1', 2);
-var _Scalar_inverse_0 = blst['_Scalar_inverse_0'] = createExportWrapper('Scalar_inverse_0', 1);
-var _PT_p_affine_1 = blst['_PT_p_affine_1'] = createExportWrapper('PT_p_affine_1', 1);
-var _PT_q_affine_1 = blst['_PT_q_affine_1'] = createExportWrapper('PT_q_affine_1', 1);
-var _PT_pq_affine_2 = blst['_PT_pq_affine_2'] = createExportWrapper('PT_pq_affine_2', 2);
-var _PT_pq_2 = blst['_PT_pq_2'] = createExportWrapper('PT_pq_2', 2);
-var _PT__destroy__0 = blst['_PT__destroy__0'] = createExportWrapper('PT__destroy__0', 1);
-var _PT_dup_0 = blst['_PT_dup_0'] = createExportWrapper('PT_dup_0', 1);
-var _PT_is_one_0 = blst['_PT_is_one_0'] = createExportWrapper('PT_is_one_0', 1);
-var _PT_is_equal_1 = blst['_PT_is_equal_1'] = createExportWrapper('PT_is_equal_1', 2);
-var _PT_sqr_0 = blst['_PT_sqr_0'] = createExportWrapper('PT_sqr_0', 1);
-var _PT_mul_1 = blst['_PT_mul_1'] = createExportWrapper('PT_mul_1', 2);
-var _PT_final_exp_0 = blst['_PT_final_exp_0'] = createExportWrapper('PT_final_exp_0', 1);
-var _PT_in_group_0 = blst['_PT_in_group_0'] = createExportWrapper('PT_in_group_0', 1);
-var _PT_to_bendian_0 = blst['_PT_to_bendian_0'] = createExportWrapper('PT_to_bendian_0', 1);
-var _PT_finalverify_2 = blst['_PT_finalverify_2'] = createExportWrapper('PT_finalverify_2', 2);
-var _PT_one_0 = blst['_PT_one_0'] = createExportWrapper('PT_one_0', 0);
-var _Pairing_2 = blst['_Pairing_2'] = createExportWrapper('Pairing_2', 2);
-var _Pairing__destroy__0 = blst['_Pairing__destroy__0'] = createExportWrapper('Pairing__destroy__0', 1);
-var _Pairing_commit_0 = blst['_Pairing_commit_0'] = createExportWrapper('Pairing_commit_0', 1);
-var _Pairing_sizeof_0 = blst['_Pairing_sizeof_0'] = createExportWrapper('Pairing_sizeof_0', 0);
-var _Pairing_merge_1 = blst['_Pairing_merge_1'] = createExportWrapper('Pairing_merge_1', 2);
-var _Pairing_finalverify_1 = blst['_Pairing_finalverify_1'] = createExportWrapper('Pairing_finalverify_1', 2);
-var _Pairing_raw_aggregate_2 = blst['_Pairing_raw_aggregate_2'] = createExportWrapper('Pairing_raw_aggregate_2', 3);
-var _Pairing_as_fp12_0 = blst['_Pairing_as_fp12_0'] = createExportWrapper('Pairing_as_fp12_0', 1);
-var _P1_Affine_0 = blst['_P1_Affine_0'] = createExportWrapper('P1_Affine_0', 0);
-var _P1_Affine_1 = blst['_P1_Affine_1'] = createExportWrapper('P1_Affine_1', 1);
-var _P1_Affine_2 = blst['_P1_Affine_2'] = createExportWrapper('P1_Affine_2', 2);
-var _P1_Affine__destroy__0 = blst['_P1_Affine__destroy__0'] = createExportWrapper('P1_Affine__destroy__0', 1);
-var _P1_Affine_dup_0 = blst['_P1_Affine_dup_0'] = createExportWrapper('P1_Affine_dup_0', 1);
-var _P1_Affine_to_jacobian_0 = blst['_P1_Affine_to_jacobian_0'] = createExportWrapper('P1_Affine_to_jacobian_0', 1);
-var _P1_Affine_serialize_0 = blst['_P1_Affine_serialize_0'] = createExportWrapper('P1_Affine_serialize_0', 1);
-var _P1_Affine_compress_0 = blst['_P1_Affine_compress_0'] = createExportWrapper('P1_Affine_compress_0', 1);
-var _P1_Affine_on_curve_0 = blst['_P1_Affine_on_curve_0'] = createExportWrapper('P1_Affine_on_curve_0', 1);
-var _P1_Affine_in_group_0 = blst['_P1_Affine_in_group_0'] = createExportWrapper('P1_Affine_in_group_0', 1);
-var _P1_Affine_is_inf_0 = blst['_P1_Affine_is_inf_0'] = createExportWrapper('P1_Affine_is_inf_0', 1);
-var _P1_Affine_is_equal_1 = blst['_P1_Affine_is_equal_1'] = createExportWrapper('P1_Affine_is_equal_1', 2);
-var _P1_Affine_core_verify_7 = blst['_P1_Affine_core_verify_7'] = createExportWrapper('P1_Affine_core_verify_7', 8);
-var _P1_Affine_generator_0 = blst['_P1_Affine_generator_0'] = createExportWrapper('P1_Affine_generator_0', 0);
-var _P1_0 = blst['_P1_0'] = createExportWrapper('P1_0', 0);
-var _P1_affine_1 = blst['_P1_affine_1'] = createExportWrapper('P1_affine_1', 1);
-var _P1_secretkey_1 = blst['_P1_secretkey_1'] = createExportWrapper('P1_secretkey_1', 1);
-var _P1_2 = blst['_P1_2'] = createExportWrapper('P1_2', 2);
-var _P1__destroy__0 = blst['_P1__destroy__0'] = createExportWrapper('P1__destroy__0', 1);
-var _P1_dup_0 = blst['_P1_dup_0'] = createExportWrapper('P1_dup_0', 1);
-var _P1_to_affine_0 = blst['_P1_to_affine_0'] = createExportWrapper('P1_to_affine_0', 1);
-var _P1_serialize_0 = blst['_P1_serialize_0'] = createExportWrapper('P1_serialize_0', 1);
-var _P1_compress_0 = blst['_P1_compress_0'] = createExportWrapper('P1_compress_0', 1);
-var _P1_on_curve_0 = blst['_P1_on_curve_0'] = createExportWrapper('P1_on_curve_0', 1);
-var _P1_in_group_0 = blst['_P1_in_group_0'] = createExportWrapper('P1_in_group_0', 1);
-var _P1_is_inf_0 = blst['_P1_is_inf_0'] = createExportWrapper('P1_is_inf_0', 1);
-var _P1_is_equal_1 = blst['_P1_is_equal_1'] = createExportWrapper('P1_is_equal_1', 2);
-var _P1_aggregate_1 = blst['_P1_aggregate_1'] = createExportWrapper('P1_aggregate_1', 2);
-var _P1_sign_with_1 = blst['_P1_sign_with_1'] = createExportWrapper('P1_sign_with_1', 2);
-var _P1_hash_to_5 = blst['_P1_hash_to_5'] = createExportWrapper('P1_hash_to_5', 6);
-var _P1_encode_to_5 = blst['_P1_encode_to_5'] = createExportWrapper('P1_encode_to_5', 6);
-var _P1_mult_1 = blst['_P1_mult_1'] = createExportWrapper('P1_mult_1', 2);
-var _P1_mult_2 = blst['_P1_mult_2'] = createExportWrapper('P1_mult_2', 3);
-var _P1_cneg_1 = blst['_P1_cneg_1'] = createExportWrapper('P1_cneg_1', 2);
-var _P1_add_1 = blst['_P1_add_1'] = createExportWrapper('P1_add_1', 2);
-var _P1_add_affine_1 = blst['_P1_add_affine_1'] = createExportWrapper('P1_add_affine_1', 2);
-var _P1_dbl_0 = blst['_P1_dbl_0'] = createExportWrapper('P1_dbl_0', 1);
-var _P1_generator_0 = blst['_P1_generator_0'] = createExportWrapper('P1_generator_0', 0);
-var _Pairing_aggregate_pk_in_g1_6 = blst['_Pairing_aggregate_pk_in_g1_6'] = createExportWrapper('Pairing_aggregate_pk_in_g1_6', 7);
-var _Pairing_mul_n_aggregate_pk_in_g1_8 = blst['_Pairing_mul_n_aggregate_pk_in_g1_8'] = createExportWrapper('Pairing_mul_n_aggregate_pk_in_g1_8', 9);
-var _P2_Affine_0 = blst['_P2_Affine_0'] = createExportWrapper('P2_Affine_0', 0);
-var _P2_Affine_1 = blst['_P2_Affine_1'] = createExportWrapper('P2_Affine_1', 1);
-var _P2_Affine_2 = blst['_P2_Affine_2'] = createExportWrapper('P2_Affine_2', 2);
-var _P2_Affine__destroy__0 = blst['_P2_Affine__destroy__0'] = createExportWrapper('P2_Affine__destroy__0', 1);
-var _P2_Affine_dup_0 = blst['_P2_Affine_dup_0'] = createExportWrapper('P2_Affine_dup_0', 1);
-var _P2_Affine_to_jacobian_0 = blst['_P2_Affine_to_jacobian_0'] = createExportWrapper('P2_Affine_to_jacobian_0', 1);
-var _P2_Affine_serialize_0 = blst['_P2_Affine_serialize_0'] = createExportWrapper('P2_Affine_serialize_0', 1);
-var _P2_Affine_compress_0 = blst['_P2_Affine_compress_0'] = createExportWrapper('P2_Affine_compress_0', 1);
-var _P2_Affine_on_curve_0 = blst['_P2_Affine_on_curve_0'] = createExportWrapper('P2_Affine_on_curve_0', 1);
-var _P2_Affine_in_group_0 = blst['_P2_Affine_in_group_0'] = createExportWrapper('P2_Affine_in_group_0', 1);
-var _P2_Affine_is_inf_0 = blst['_P2_Affine_is_inf_0'] = createExportWrapper('P2_Affine_is_inf_0', 1);
-var _P2_Affine_is_equal_1 = blst['_P2_Affine_is_equal_1'] = createExportWrapper('P2_Affine_is_equal_1', 2);
-var _P2_Affine_core_verify_7 = blst['_P2_Affine_core_verify_7'] = createExportWrapper('P2_Affine_core_verify_7', 8);
-var _P2_Affine_generator_0 = blst['_P2_Affine_generator_0'] = createExportWrapper('P2_Affine_generator_0', 0);
-var _P2_0 = blst['_P2_0'] = createExportWrapper('P2_0', 0);
-var _P2_affine_1 = blst['_P2_affine_1'] = createExportWrapper('P2_affine_1', 1);
-var _P2_secretkey_1 = blst['_P2_secretkey_1'] = createExportWrapper('P2_secretkey_1', 1);
-var _P2_2 = blst['_P2_2'] = createExportWrapper('P2_2', 2);
-var _P2__destroy__0 = blst['_P2__destroy__0'] = createExportWrapper('P2__destroy__0', 1);
-var _P2_dup_0 = blst['_P2_dup_0'] = createExportWrapper('P2_dup_0', 1);
-var _P2_to_affine_0 = blst['_P2_to_affine_0'] = createExportWrapper('P2_to_affine_0', 1);
-var _P2_serialize_0 = blst['_P2_serialize_0'] = createExportWrapper('P2_serialize_0', 1);
-var _P2_compress_0 = blst['_P2_compress_0'] = createExportWrapper('P2_compress_0', 1);
-var _P2_on_curve_0 = blst['_P2_on_curve_0'] = createExportWrapper('P2_on_curve_0', 1);
-var _P2_in_group_0 = blst['_P2_in_group_0'] = createExportWrapper('P2_in_group_0', 1);
-var _P2_is_inf_0 = blst['_P2_is_inf_0'] = createExportWrapper('P2_is_inf_0', 1);
-var _P2_is_equal_1 = blst['_P2_is_equal_1'] = createExportWrapper('P2_is_equal_1', 2);
-var _P2_aggregate_1 = blst['_P2_aggregate_1'] = createExportWrapper('P2_aggregate_1', 2);
-var _P2_sign_with_1 = blst['_P2_sign_with_1'] = createExportWrapper('P2_sign_with_1', 2);
-var _P2_hash_to_5 = blst['_P2_hash_to_5'] = createExportWrapper('P2_hash_to_5', 6);
-var _P2_encode_to_5 = blst['_P2_encode_to_5'] = createExportWrapper('P2_encode_to_5', 6);
-var _P2_mult_1 = blst['_P2_mult_1'] = createExportWrapper('P2_mult_1', 2);
-var _P2_mult_2 = blst['_P2_mult_2'] = createExportWrapper('P2_mult_2', 3);
-var _P2_cneg_1 = blst['_P2_cneg_1'] = createExportWrapper('P2_cneg_1', 2);
-var _P2_add_1 = blst['_P2_add_1'] = createExportWrapper('P2_add_1', 2);
-var _P2_add_affine_1 = blst['_P2_add_affine_1'] = createExportWrapper('P2_add_affine_1', 2);
-var _P2_dbl_0 = blst['_P2_dbl_0'] = createExportWrapper('P2_dbl_0', 1);
-var _P2_generator_0 = blst['_P2_generator_0'] = createExportWrapper('P2_generator_0', 0);
-var _Pairing_aggregate_pk_in_g2_6 = blst['_Pairing_aggregate_pk_in_g2_6'] = createExportWrapper('Pairing_aggregate_pk_in_g2_6', 7);
-var _Pairing_mul_n_aggregate_pk_in_g2_8 = blst['_Pairing_mul_n_aggregate_pk_in_g2_8'] = createExportWrapper('Pairing_mul_n_aggregate_pk_in_g2_8', 9);
+var _webidl_free = (blst['_webidl_free'] = createExportWrapper('webidl_free', 1));
+var _free = (blst['_free'] = createExportWrapper('free', 1));
+var _webidl_malloc = (blst['_webidl_malloc'] = createExportWrapper('webidl_malloc', 1));
+var _malloc = (blst['_malloc'] = createExportWrapper('malloc', 1));
+var _emscripten_bind_VoidPtr___destroy___0 = (blst['_emscripten_bind_VoidPtr___destroy___0'] =
+ createExportWrapper('emscripten_bind_VoidPtr___destroy___0', 1));
+var _const_G1 = (blst['_const_G1'] = createExportWrapper('const_G1', 0));
+var _const_G2 = (blst['_const_G2'] = createExportWrapper('const_G2', 0));
+var _const_NEG_G1 = (blst['_const_NEG_G1'] = createExportWrapper('const_NEG_G1', 0));
+var _const_NEG_G2 = (blst['_const_NEG_G2'] = createExportWrapper('const_NEG_G2', 0));
+var _SecretKey_0 = (blst['_SecretKey_0'] = createExportWrapper('SecretKey_0', 0));
+var _SecretKey__destroy__0 = (blst['_SecretKey__destroy__0'] = createExportWrapper(
+ 'SecretKey__destroy__0',
+ 1,
+));
+var _SecretKey_keygen_3 = (blst['_SecretKey_keygen_3'] = createExportWrapper(
+ 'SecretKey_keygen_3',
+ 4,
+));
+var _SecretKey_derive_master_eip2333_2 = (blst['_SecretKey_derive_master_eip2333_2'] =
+ createExportWrapper('SecretKey_derive_master_eip2333_2', 3));
+var _SecretKey_derive_child_eip2333_2 = (blst['_SecretKey_derive_child_eip2333_2'] =
+ createExportWrapper('SecretKey_derive_child_eip2333_2', 3));
+var _SecretKey_from_bendian_1 = (blst['_SecretKey_from_bendian_1'] = createExportWrapper(
+ 'SecretKey_from_bendian_1',
+ 2,
+));
+var _SecretKey_from_lendian_1 = (blst['_SecretKey_from_lendian_1'] = createExportWrapper(
+ 'SecretKey_from_lendian_1',
+ 2,
+));
+var _SecretKey_to_bendian_0 = (blst['_SecretKey_to_bendian_0'] = createExportWrapper(
+ 'SecretKey_to_bendian_0',
+ 1,
+));
+var _SecretKey_to_lendian_0 = (blst['_SecretKey_to_lendian_0'] = createExportWrapper(
+ 'SecretKey_to_lendian_0',
+ 1,
+));
+var _Scalar_0 = (blst['_Scalar_0'] = createExportWrapper('Scalar_0', 0));
+var _Scalar_2 = (blst['_Scalar_2'] = createExportWrapper('Scalar_2', 2));
+var _Scalar_3 = (blst['_Scalar_3'] = createExportWrapper('Scalar_3', 3));
+var _Scalar__destroy__0 = (blst['_Scalar__destroy__0'] = createExportWrapper(
+ 'Scalar__destroy__0',
+ 1,
+));
+var _Scalar_hash_to_3 = (blst['_Scalar_hash_to_3'] = createExportWrapper('Scalar_hash_to_3', 4));
+var _Scalar_dup_0 = (blst['_Scalar_dup_0'] = createExportWrapper('Scalar_dup_0', 1));
+var _Scalar_from_bendian_2 = (blst['_Scalar_from_bendian_2'] = createExportWrapper(
+ 'Scalar_from_bendian_2',
+ 3,
+));
+var _Scalar_from_lendian_2 = (blst['_Scalar_from_lendian_2'] = createExportWrapper(
+ 'Scalar_from_lendian_2',
+ 3,
+));
+var _Scalar_to_bendian_0 = (blst['_Scalar_to_bendian_0'] = createExportWrapper(
+ 'Scalar_to_bendian_0',
+ 1,
+));
+var _Scalar_to_lendian_0 = (blst['_Scalar_to_lendian_0'] = createExportWrapper(
+ 'Scalar_to_lendian_0',
+ 1,
+));
+var _Scalar_add_1 = (blst['_Scalar_add_1'] = createExportWrapper('Scalar_add_1', 2));
+var _Scalar_sub_1 = (blst['_Scalar_sub_1'] = createExportWrapper('Scalar_sub_1', 2));
+var _Scalar_mul_1 = (blst['_Scalar_mul_1'] = createExportWrapper('Scalar_mul_1', 2));
+var _Scalar_inverse_0 = (blst['_Scalar_inverse_0'] = createExportWrapper('Scalar_inverse_0', 1));
+var _PT_p_affine_1 = (blst['_PT_p_affine_1'] = createExportWrapper('PT_p_affine_1', 1));
+var _PT_q_affine_1 = (blst['_PT_q_affine_1'] = createExportWrapper('PT_q_affine_1', 1));
+var _PT_pq_affine_2 = (blst['_PT_pq_affine_2'] = createExportWrapper('PT_pq_affine_2', 2));
+var _PT_pq_2 = (blst['_PT_pq_2'] = createExportWrapper('PT_pq_2', 2));
+var _PT__destroy__0 = (blst['_PT__destroy__0'] = createExportWrapper('PT__destroy__0', 1));
+var _PT_dup_0 = (blst['_PT_dup_0'] = createExportWrapper('PT_dup_0', 1));
+var _PT_is_one_0 = (blst['_PT_is_one_0'] = createExportWrapper('PT_is_one_0', 1));
+var _PT_is_equal_1 = (blst['_PT_is_equal_1'] = createExportWrapper('PT_is_equal_1', 2));
+var _PT_sqr_0 = (blst['_PT_sqr_0'] = createExportWrapper('PT_sqr_0', 1));
+var _PT_mul_1 = (blst['_PT_mul_1'] = createExportWrapper('PT_mul_1', 2));
+var _PT_final_exp_0 = (blst['_PT_final_exp_0'] = createExportWrapper('PT_final_exp_0', 1));
+var _PT_in_group_0 = (blst['_PT_in_group_0'] = createExportWrapper('PT_in_group_0', 1));
+var _PT_to_bendian_0 = (blst['_PT_to_bendian_0'] = createExportWrapper('PT_to_bendian_0', 1));
+var _PT_finalverify_2 = (blst['_PT_finalverify_2'] = createExportWrapper('PT_finalverify_2', 2));
+var _PT_one_0 = (blst['_PT_one_0'] = createExportWrapper('PT_one_0', 0));
+var _Pairing_2 = (blst['_Pairing_2'] = createExportWrapper('Pairing_2', 2));
+var _Pairing__destroy__0 = (blst['_Pairing__destroy__0'] = createExportWrapper(
+ 'Pairing__destroy__0',
+ 1,
+));
+var _Pairing_commit_0 = (blst['_Pairing_commit_0'] = createExportWrapper('Pairing_commit_0', 1));
+var _Pairing_sizeof_0 = (blst['_Pairing_sizeof_0'] = createExportWrapper('Pairing_sizeof_0', 0));
+var _Pairing_merge_1 = (blst['_Pairing_merge_1'] = createExportWrapper('Pairing_merge_1', 2));
+var _Pairing_finalverify_1 = (blst['_Pairing_finalverify_1'] = createExportWrapper(
+ 'Pairing_finalverify_1',
+ 2,
+));
+var _Pairing_raw_aggregate_2 = (blst['_Pairing_raw_aggregate_2'] = createExportWrapper(
+ 'Pairing_raw_aggregate_2',
+ 3,
+));
+var _Pairing_as_fp12_0 = (blst['_Pairing_as_fp12_0'] = createExportWrapper('Pairing_as_fp12_0', 1));
+var _P1_Affine_0 = (blst['_P1_Affine_0'] = createExportWrapper('P1_Affine_0', 0));
+var _P1_Affine_1 = (blst['_P1_Affine_1'] = createExportWrapper('P1_Affine_1', 1));
+var _P1_Affine_2 = (blst['_P1_Affine_2'] = createExportWrapper('P1_Affine_2', 2));
+var _P1_Affine__destroy__0 = (blst['_P1_Affine__destroy__0'] = createExportWrapper(
+ 'P1_Affine__destroy__0',
+ 1,
+));
+var _P1_Affine_dup_0 = (blst['_P1_Affine_dup_0'] = createExportWrapper('P1_Affine_dup_0', 1));
+var _P1_Affine_to_jacobian_0 = (blst['_P1_Affine_to_jacobian_0'] = createExportWrapper(
+ 'P1_Affine_to_jacobian_0',
+ 1,
+));
+var _P1_Affine_serialize_0 = (blst['_P1_Affine_serialize_0'] = createExportWrapper(
+ 'P1_Affine_serialize_0',
+ 1,
+));
+var _P1_Affine_compress_0 = (blst['_P1_Affine_compress_0'] = createExportWrapper(
+ 'P1_Affine_compress_0',
+ 1,
+));
+var _P1_Affine_on_curve_0 = (blst['_P1_Affine_on_curve_0'] = createExportWrapper(
+ 'P1_Affine_on_curve_0',
+ 1,
+));
+var _P1_Affine_in_group_0 = (blst['_P1_Affine_in_group_0'] = createExportWrapper(
+ 'P1_Affine_in_group_0',
+ 1,
+));
+var _P1_Affine_is_inf_0 = (blst['_P1_Affine_is_inf_0'] = createExportWrapper(
+ 'P1_Affine_is_inf_0',
+ 1,
+));
+var _P1_Affine_is_equal_1 = (blst['_P1_Affine_is_equal_1'] = createExportWrapper(
+ 'P1_Affine_is_equal_1',
+ 2,
+));
+var _P1_Affine_core_verify_7 = (blst['_P1_Affine_core_verify_7'] = createExportWrapper(
+ 'P1_Affine_core_verify_7',
+ 8,
+));
+var _P1_Affine_generator_0 = (blst['_P1_Affine_generator_0'] = createExportWrapper(
+ 'P1_Affine_generator_0',
+ 0,
+));
+var _P1_0 = (blst['_P1_0'] = createExportWrapper('P1_0', 0));
+var _P1_affine_1 = (blst['_P1_affine_1'] = createExportWrapper('P1_affine_1', 1));
+var _P1_secretkey_1 = (blst['_P1_secretkey_1'] = createExportWrapper('P1_secretkey_1', 1));
+var _P1_2 = (blst['_P1_2'] = createExportWrapper('P1_2', 2));
+var _P1__destroy__0 = (blst['_P1__destroy__0'] = createExportWrapper('P1__destroy__0', 1));
+var _P1_dup_0 = (blst['_P1_dup_0'] = createExportWrapper('P1_dup_0', 1));
+var _P1_to_affine_0 = (blst['_P1_to_affine_0'] = createExportWrapper('P1_to_affine_0', 1));
+var _P1_serialize_0 = (blst['_P1_serialize_0'] = createExportWrapper('P1_serialize_0', 1));
+var _P1_compress_0 = (blst['_P1_compress_0'] = createExportWrapper('P1_compress_0', 1));
+var _P1_on_curve_0 = (blst['_P1_on_curve_0'] = createExportWrapper('P1_on_curve_0', 1));
+var _P1_in_group_0 = (blst['_P1_in_group_0'] = createExportWrapper('P1_in_group_0', 1));
+var _P1_is_inf_0 = (blst['_P1_is_inf_0'] = createExportWrapper('P1_is_inf_0', 1));
+var _P1_is_equal_1 = (blst['_P1_is_equal_1'] = createExportWrapper('P1_is_equal_1', 2));
+var _P1_aggregate_1 = (blst['_P1_aggregate_1'] = createExportWrapper('P1_aggregate_1', 2));
+var _P1_sign_with_1 = (blst['_P1_sign_with_1'] = createExportWrapper('P1_sign_with_1', 2));
+var _P1_hash_to_5 = (blst['_P1_hash_to_5'] = createExportWrapper('P1_hash_to_5', 6));
+var _P1_encode_to_5 = (blst['_P1_encode_to_5'] = createExportWrapper('P1_encode_to_5', 6));
+var _P1_mult_1 = (blst['_P1_mult_1'] = createExportWrapper('P1_mult_1', 2));
+var _P1_mult_2 = (blst['_P1_mult_2'] = createExportWrapper('P1_mult_2', 3));
+var _P1_cneg_1 = (blst['_P1_cneg_1'] = createExportWrapper('P1_cneg_1', 2));
+var _P1_add_1 = (blst['_P1_add_1'] = createExportWrapper('P1_add_1', 2));
+var _P1_add_affine_1 = (blst['_P1_add_affine_1'] = createExportWrapper('P1_add_affine_1', 2));
+var _P1_dbl_0 = (blst['_P1_dbl_0'] = createExportWrapper('P1_dbl_0', 1));
+var _P1_generator_0 = (blst['_P1_generator_0'] = createExportWrapper('P1_generator_0', 0));
+var _Pairing_aggregate_pk_in_g1_6 = (blst['_Pairing_aggregate_pk_in_g1_6'] = createExportWrapper(
+ 'Pairing_aggregate_pk_in_g1_6',
+ 7,
+));
+var _Pairing_mul_n_aggregate_pk_in_g1_8 = (blst['_Pairing_mul_n_aggregate_pk_in_g1_8'] =
+ createExportWrapper('Pairing_mul_n_aggregate_pk_in_g1_8', 9));
+var _P2_Affine_0 = (blst['_P2_Affine_0'] = createExportWrapper('P2_Affine_0', 0));
+var _P2_Affine_1 = (blst['_P2_Affine_1'] = createExportWrapper('P2_Affine_1', 1));
+var _P2_Affine_2 = (blst['_P2_Affine_2'] = createExportWrapper('P2_Affine_2', 2));
+var _P2_Affine__destroy__0 = (blst['_P2_Affine__destroy__0'] = createExportWrapper(
+ 'P2_Affine__destroy__0',
+ 1,
+));
+var _P2_Affine_dup_0 = (blst['_P2_Affine_dup_0'] = createExportWrapper('P2_Affine_dup_0', 1));
+var _P2_Affine_to_jacobian_0 = (blst['_P2_Affine_to_jacobian_0'] = createExportWrapper(
+ 'P2_Affine_to_jacobian_0',
+ 1,
+));
+var _P2_Affine_serialize_0 = (blst['_P2_Affine_serialize_0'] = createExportWrapper(
+ 'P2_Affine_serialize_0',
+ 1,
+));
+var _P2_Affine_compress_0 = (blst['_P2_Affine_compress_0'] = createExportWrapper(
+ 'P2_Affine_compress_0',
+ 1,
+));
+var _P2_Affine_on_curve_0 = (blst['_P2_Affine_on_curve_0'] = createExportWrapper(
+ 'P2_Affine_on_curve_0',
+ 1,
+));
+var _P2_Affine_in_group_0 = (blst['_P2_Affine_in_group_0'] = createExportWrapper(
+ 'P2_Affine_in_group_0',
+ 1,
+));
+var _P2_Affine_is_inf_0 = (blst['_P2_Affine_is_inf_0'] = createExportWrapper(
+ 'P2_Affine_is_inf_0',
+ 1,
+));
+var _P2_Affine_is_equal_1 = (blst['_P2_Affine_is_equal_1'] = createExportWrapper(
+ 'P2_Affine_is_equal_1',
+ 2,
+));
+var _P2_Affine_core_verify_7 = (blst['_P2_Affine_core_verify_7'] = createExportWrapper(
+ 'P2_Affine_core_verify_7',
+ 8,
+));
+var _P2_Affine_generator_0 = (blst['_P2_Affine_generator_0'] = createExportWrapper(
+ 'P2_Affine_generator_0',
+ 0,
+));
+var _P2_0 = (blst['_P2_0'] = createExportWrapper('P2_0', 0));
+var _P2_affine_1 = (blst['_P2_affine_1'] = createExportWrapper('P2_affine_1', 1));
+var _P2_secretkey_1 = (blst['_P2_secretkey_1'] = createExportWrapper('P2_secretkey_1', 1));
+var _P2_2 = (blst['_P2_2'] = createExportWrapper('P2_2', 2));
+var _P2__destroy__0 = (blst['_P2__destroy__0'] = createExportWrapper('P2__destroy__0', 1));
+var _P2_dup_0 = (blst['_P2_dup_0'] = createExportWrapper('P2_dup_0', 1));
+var _P2_to_affine_0 = (blst['_P2_to_affine_0'] = createExportWrapper('P2_to_affine_0', 1));
+var _P2_serialize_0 = (blst['_P2_serialize_0'] = createExportWrapper('P2_serialize_0', 1));
+var _P2_compress_0 = (blst['_P2_compress_0'] = createExportWrapper('P2_compress_0', 1));
+var _P2_on_curve_0 = (blst['_P2_on_curve_0'] = createExportWrapper('P2_on_curve_0', 1));
+var _P2_in_group_0 = (blst['_P2_in_group_0'] = createExportWrapper('P2_in_group_0', 1));
+var _P2_is_inf_0 = (blst['_P2_is_inf_0'] = createExportWrapper('P2_is_inf_0', 1));
+var _P2_is_equal_1 = (blst['_P2_is_equal_1'] = createExportWrapper('P2_is_equal_1', 2));
+var _P2_aggregate_1 = (blst['_P2_aggregate_1'] = createExportWrapper('P2_aggregate_1', 2));
+var _P2_sign_with_1 = (blst['_P2_sign_with_1'] = createExportWrapper('P2_sign_with_1', 2));
+var _P2_hash_to_5 = (blst['_P2_hash_to_5'] = createExportWrapper('P2_hash_to_5', 6));
+var _P2_encode_to_5 = (blst['_P2_encode_to_5'] = createExportWrapper('P2_encode_to_5', 6));
+var _P2_mult_1 = (blst['_P2_mult_1'] = createExportWrapper('P2_mult_1', 2));
+var _P2_mult_2 = (blst['_P2_mult_2'] = createExportWrapper('P2_mult_2', 3));
+var _P2_cneg_1 = (blst['_P2_cneg_1'] = createExportWrapper('P2_cneg_1', 2));
+var _P2_add_1 = (blst['_P2_add_1'] = createExportWrapper('P2_add_1', 2));
+var _P2_add_affine_1 = (blst['_P2_add_affine_1'] = createExportWrapper('P2_add_affine_1', 2));
+var _P2_dbl_0 = (blst['_P2_dbl_0'] = createExportWrapper('P2_dbl_0', 1));
+var _P2_generator_0 = (blst['_P2_generator_0'] = createExportWrapper('P2_generator_0', 0));
+var _Pairing_aggregate_pk_in_g2_6 = (blst['_Pairing_aggregate_pk_in_g2_6'] = createExportWrapper(
+ 'Pairing_aggregate_pk_in_g2_6',
+ 7,
+));
+var _Pairing_mul_n_aggregate_pk_in_g2_8 = (blst['_Pairing_mul_n_aggregate_pk_in_g2_8'] =
+ createExportWrapper('Pairing_mul_n_aggregate_pk_in_g2_8', 9));
var _fflush = createExportWrapper('fflush', 1);
var _setThrew = createExportWrapper('setThrew', 2);
var __emscripten_tempret_set = createExportWrapper('_emscripten_tempret_set', 1);
-var _emscripten_stack_init = () => (_emscripten_stack_init = wasmExports['emscripten_stack_init'])();
-var _emscripten_stack_get_free = () => (_emscripten_stack_get_free = wasmExports['emscripten_stack_get_free'])();
-var _emscripten_stack_get_base = () => (_emscripten_stack_get_base = wasmExports['emscripten_stack_get_base'])();
-var _emscripten_stack_get_end = () => (_emscripten_stack_get_end = wasmExports['emscripten_stack_get_end'])();
-var __emscripten_stack_restore = (a0) => (__emscripten_stack_restore = wasmExports['_emscripten_stack_restore'])(a0);
-var __emscripten_stack_alloc = (a0) => (__emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'])(a0);
-var _emscripten_stack_get_current = () => (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
+var _emscripten_stack_init = () =>
+ (_emscripten_stack_init = wasmExports['emscripten_stack_init'])();
+var _emscripten_stack_get_free = () =>
+ (_emscripten_stack_get_free = wasmExports['emscripten_stack_get_free'])();
+var _emscripten_stack_get_base = () =>
+ (_emscripten_stack_get_base = wasmExports['emscripten_stack_get_base'])();
+var _emscripten_stack_get_end = () =>
+ (_emscripten_stack_get_end = wasmExports['emscripten_stack_get_end'])();
+var __emscripten_stack_restore = (a0) =>
+ (__emscripten_stack_restore = wasmExports['_emscripten_stack_restore'])(a0);
+var __emscripten_stack_alloc = (a0) =>
+ (__emscripten_stack_alloc = wasmExports['_emscripten_stack_alloc'])(a0);
+var _emscripten_stack_get_current = () =>
+ (_emscripten_stack_get_current = wasmExports['emscripten_stack_get_current'])();
var ___cxa_free_exception = createExportWrapper('__cxa_free_exception', 1);
-var ___cxa_increment_exception_refcount = createExportWrapper('__cxa_increment_exception_refcount', 1);
-var ___cxa_decrement_exception_refcount = createExportWrapper('__cxa_decrement_exception_refcount', 1);
+var ___cxa_increment_exception_refcount = createExportWrapper(
+ '__cxa_increment_exception_refcount',
+ 1,
+);
+var ___cxa_decrement_exception_refcount = createExportWrapper(
+ '__cxa_decrement_exception_refcount',
+ 1,
+);
var ___get_exception_message = createExportWrapper('__get_exception_message', 3);
var ___cxa_can_catch = createExportWrapper('__cxa_can_catch', 3);
var ___cxa_is_pointer_type = createExportWrapper('__cxa_is_pointer_type', 1);
-var dynCall_jiji = blst['dynCall_jiji'] = createExportWrapper('dynCall_jiji', 5);
+var dynCall_jiji = (blst['dynCall_jiji'] = createExportWrapper('dynCall_jiji', 5));
-function invoke_viiii(index,a1,a2,a3,a4) {
+function invoke_viiii(index, a1, a2, a3, a4) {
var sp = stackSave();
try {
- getWasmTableEntry(index)(a1,a2,a3,a4);
- } catch(e) {
+ getWasmTableEntry(index)(a1, a2, a3, a4);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_iiii(index,a1,a2,a3) {
+function invoke_iiii(index, a1, a2, a3) {
var sp = stackSave();
try {
- return getWasmTableEntry(index)(a1,a2,a3);
- } catch(e) {
+ return getWasmTableEntry(index)(a1, a2, a3);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_iii(index,a1,a2) {
+function invoke_iii(index, a1, a2) {
var sp = stackSave();
try {
- return getWasmTableEntry(index)(a1,a2);
- } catch(e) {
+ return getWasmTableEntry(index)(a1, a2);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_iiiii(index,a1,a2,a3,a4) {
+function invoke_iiiii(index, a1, a2, a3, a4) {
var sp = stackSave();
try {
- return getWasmTableEntry(index)(a1,a2,a3,a4);
- } catch(e) {
+ return getWasmTableEntry(index)(a1, a2, a3, a4);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_vi(index,a1) {
+function invoke_vi(index, a1) {
var sp = stackSave();
try {
getWasmTableEntry(index)(a1);
- } catch(e) {
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_ii(index,a1) {
+function invoke_ii(index, a1) {
var sp = stackSave();
try {
return getWasmTableEntry(index)(a1);
- } catch(e) {
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_vii(index,a1,a2) {
+function invoke_vii(index, a1, a2) {
var sp = stackSave();
try {
- getWasmTableEntry(index)(a1,a2);
- } catch(e) {
+ getWasmTableEntry(index)(a1, a2);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_iiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8) {
+function invoke_iiiiiiiii(index, a1, a2, a3, a4, a5, a6, a7, a8) {
var sp = stackSave();
try {
- return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6,a7,a8);
- } catch(e) {
+ return getWasmTableEntry(index)(a1, a2, a3, a4, a5, a6, a7, a8);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
+function invoke_iiiiiii(index, a1, a2, a3, a4, a5, a6) {
var sp = stackSave();
try {
- return getWasmTableEntry(index)(a1,a2,a3,a4,a5,a6);
- } catch(e) {
+ return getWasmTableEntry(index)(a1, a2, a3, a4, a5, a6);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
@@ -1773,25 +2045,24 @@ function invoke_v(index) {
var sp = stackSave();
try {
getWasmTableEntry(index)();
- } catch(e) {
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-function invoke_viii(index,a1,a2,a3) {
+function invoke_viii(index, a1, a2, a3) {
var sp = stackSave();
try {
- getWasmTableEntry(index)(a1,a2,a3);
- } catch(e) {
+ getWasmTableEntry(index)(a1, a2, a3);
+ } catch (e) {
stackRestore(sp);
if (!(e instanceof EmscriptenEH)) throw e;
_setThrew(1, 0);
}
}
-
// include: postamble.js
// === Auto-generated postamble setup entry stuff ===
@@ -1972,7 +2243,7 @@ var missingLibrarySymbols = [
'demangle',
'stackTrace',
];
-missingLibrarySymbols.forEach(missingLibrarySymbol)
+missingLibrarySymbols.forEach(missingLibrarySymbol);
var unexportedSymbols = [
'run',
@@ -2080,8 +2351,6 @@ var unexportedSymbols = [
];
unexportedSymbols.forEach(unexportedRuntimeSymbol);
-
-
var calledRun;
dependenciesFulfilled = function runCaller() {
@@ -2100,12 +2369,11 @@ function stackCheckInit() {
}
function run() {
-
if (runDependencies > 0) {
return;
}
- stackCheckInit();
+ stackCheckInit();
preRun();
@@ -2127,21 +2395,23 @@ function run() {
if (blst['onRuntimeInitialized']) blst['onRuntimeInitialized']();
- assert(!blst['_main'], 'compiled without a main, but one is present. if you added it from JS, use blst["onRuntimeInitialized"]');
+ assert(
+ !blst['_main'],
+ 'compiled without a main, but one is present. if you added it from JS, use blst["onRuntimeInitialized"]',
+ );
postRun();
}
if (blst['setStatus']) {
blst['setStatus']('Running...');
- setTimeout(function() {
- setTimeout(function() {
+ setTimeout(function () {
+ setTimeout(function () {
blst['setStatus']('');
}, 1);
doRun();
}, 1);
- } else
- {
+ } else {
doRun();
}
checkStackCookie();
@@ -2164,15 +2434,20 @@ function checkUnflushedContent() {
var has = false;
out = err = (x) => {
has = true;
- }
- try { // it doesn't matter if it fails
+ };
+ try {
+ // it doesn't matter if it fails
flush_NO_FILESYSTEM();
- } catch(e) {}
+ } catch (e) {}
out = oldOut;
err = oldErr;
if (has) {
- warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.');
- warnOnce('(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)');
+ warnOnce(
+ 'stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.',
+ );
+ warnOnce(
+ '(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)',
+ );
}
}
@@ -2192,8 +2467,7 @@ run();
// Bindings utilities
/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */
-function WrapperObject() {
-}
+function WrapperObject() {}
WrapperObject.prototype = Object.create(WrapperObject.prototype);
WrapperObject.prototype.constructor = WrapperObject;
WrapperObject.prototype.__class__ = WrapperObject;
@@ -2215,7 +2489,7 @@ function wrapPointer(ptr, __class__) {
if (ret) return ret;
ret = Object.create((__class__ || WrapperObject).prototype);
ret.ptr = ptr;
- return cache[ptr] = ret;
+ return (cache[ptr] = ret);
}
blst['wrapPointer'] = wrapPointer;
@@ -2258,9 +2532,9 @@ blst['getClass'] = getClass;
/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */
var ensureCache = {
- buffer: 0, // the main buffer of temporary storage
- size: 0, // the size of buffer
- pos: 0, // the next free offset in buffer
+ buffer: 0, // the main buffer of temporary storage
+ size: 0, // the size of buffer
+ pos: 0, // the next free offset in buffer
temps: [], // extra allocations
needed: 0, // the total size we need next time
@@ -2278,7 +2552,8 @@ var ensureCache = {
// clean up
ensureCache.needed = 0;
}
- if (!ensureCache.buffer) { // happens first time, or when we need to grow
+ if (!ensureCache.buffer) {
+ // happens first time, or when we need to grow
ensureCache.size += 128; // heuristic, avoid many small grow events
ensureCache.buffer = blst['_webidl_malloc'](ensureCache.size);
assert(ensureCache.buffer);
@@ -2376,7 +2651,9 @@ function ensureFloat64(value) {
// Interface: VoidPtr
/** @suppress {undefinedVars, duplicate} @this{Object} */
-function VoidPtr() { throw "cannot construct a VoidPtr, no constructor in IDL" }
+function VoidPtr() {
+ throw 'cannot construct a VoidPtr, no constructor in IDL';
+}
VoidPtr.prototype = Object.create(WrapperObject.prototype);
VoidPtr.prototype.constructor = VoidPtr;
VoidPtr.prototype.__class__ = VoidPtr;
@@ -2384,7 +2661,7 @@ VoidPtr.__cache__ = {};
blst['VoidPtr'] = VoidPtr;
/** @suppress {undefinedVars, duplicate} @this{Object} */
-VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = function() {
+VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = function () {
var self = this.ptr;
_emscripten_bind_VoidPtr___destroy___0(self);
};
@@ -2397,843 +2674,976 @@ VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = function() {
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const BLST_ERROR_str = [
- "BLST_ERROR: success",
- "BLST_ERROR: bad point encoding",
- "BLST_ERROR: point is not on curve",
- "BLST_ERROR: point is not in group",
- "BLST_ERROR: context type mismatch",
- "BLST_ERROR: verify failed",
- "BLST_ERROR: public key is infinite",
- "BLST_ERROR: bad scalar",
+ 'BLST_ERROR: success',
+ 'BLST_ERROR: bad point encoding',
+ 'BLST_ERROR: point is not on curve',
+ 'BLST_ERROR: point is not in group',
+ 'BLST_ERROR: context type mismatch',
+ 'BLST_ERROR: verify failed',
+ 'BLST_ERROR: public key is infinite',
+ 'BLST_ERROR: bad scalar',
];
-function unsupported(type, extra)
-{ if (typeof extra === 'undefined')
- return `${type ? type.constructor.name : 'none'}: unsupported type`;
- else
- return `${type ? type.constructor.name : 'none'}/${extra ? extra.constructor.name : 'none'}: unsupported types or combination thereof`;
-}
-
-function ensureAny(value)
-{ if (value === null)
- return [0, 0];
-
- switch (value.constructor) {
- case String:
- return [ensureString(value), lengthBytesUTF8(value)];
- case ArrayBuffer:
- return [ensureInt8(new Uint8Array(value)), value.byteLength];
- case BigInt:
- if (value < 0)
- throw new Error("expecting unsigned BigInt value");
- var temp = [];
- while (value != 0) {
- temp.push(Number(value & 255n));
- value >>= 8n;
- }
- return [ensureInt8(temp), temp.length];
- case Uint8Array: case Buffer:
- return [ensureInt8(value), value.length];
- default:
- throw new Error(unsupported(value));
- }
+function unsupported(type, extra) {
+ if (typeof extra === 'undefined')
+ return `${type ? type.constructor.name : 'none'}: unsupported type`;
+ else
+ return `${type ? type.constructor.name : 'none'}/${extra ? extra.constructor.name : 'none'}: unsupported types or combination thereof`;
+}
+
+function ensureAny(value) {
+ if (value === null) return [0, 0];
+
+ switch (value.constructor) {
+ case String:
+ return [ensureString(value), lengthBytesUTF8(value)];
+ case ArrayBuffer:
+ return [ensureInt8(new Uint8Array(value)), value.byteLength];
+ case BigInt:
+ if (value < 0) throw new Error('expecting unsigned BigInt value');
+ var temp = [];
+ while (value != 0) {
+ temp.push(Number(value & 255n));
+ value >>= 8n;
+ }
+ return [ensureInt8(temp), temp.length];
+ case Uint8Array:
+ case Buffer:
+ return [ensureInt8(value), value.length];
+ default:
+ throw new Error(unsupported(value));
+ }
}
-(function() {
- function setupConsts() {
- var i = 0;
- blst['BLST_SUCCESS'] = i++;
- blst['BLST_BAD_ENCODING'] = i++;
- blst['BLST_POINT_NOT_ON_CURVE'] = i++;
- blst['BLST_POINT_NOT_IN_GROUP'] = i++;
- blst['BLST_AGGR_TYPE_MISMATCH'] = i++;
- blst['BLST_VERIFY_FAIL'] = i++;
- blst['BLST_PK_IS_INFINITY'] = i++;
- blst['BLST_BAD_SCALAR'] = i++;
- blst['BLS12_381_G1'] = wrapPointer(_const_G1(), P1_Affine);
- blst['BLS12_381_G2'] = wrapPointer(_const_G2(), P2_Affine);
- blst['BLS12_381_NEG_G1'] = wrapPointer(_const_NEG_G1(), P1_Affine);
- blst['BLS12_381_NEG_G2'] = wrapPointer(_const_NEG_G2(), P2_Affine);
- }
- if (runtimeInitialized) setupConsts();
- else addOnInit(setupConsts);
+(function () {
+ function setupConsts() {
+ var i = 0;
+ blst['BLST_SUCCESS'] = i++;
+ blst['BLST_BAD_ENCODING'] = i++;
+ blst['BLST_POINT_NOT_ON_CURVE'] = i++;
+ blst['BLST_POINT_NOT_IN_GROUP'] = i++;
+ blst['BLST_AGGR_TYPE_MISMATCH'] = i++;
+ blst['BLST_VERIFY_FAIL'] = i++;
+ blst['BLST_PK_IS_INFINITY'] = i++;
+ blst['BLST_BAD_SCALAR'] = i++;
+ blst['BLS12_381_G1'] = wrapPointer(_const_G1(), P1_Affine);
+ blst['BLS12_381_G2'] = wrapPointer(_const_G2(), P2_Affine);
+ blst['BLS12_381_NEG_G1'] = wrapPointer(_const_NEG_G1(), P1_Affine);
+ blst['BLS12_381_NEG_G2'] = wrapPointer(_const_NEG_G2(), P2_Affine);
+ }
+ if (runtimeInitialized) setupConsts();
+ else addOnInit(setupConsts);
})();
/** @this{Object} */
-function SecretKey()
-{ this.ptr = _SecretKey_0();
- getCache(SecretKey)[this.ptr] = this;
+function SecretKey() {
+ this.ptr = _SecretKey_0();
+ getCache(SecretKey)[this.ptr] = this;
}
SecretKey.prototype = Object.create(WrapperObject.prototype);
SecretKey.prototype.constructor = SecretKey;
SecretKey.prototype.__class__ = SecretKey;
SecretKey.__cache__ = {};
blst['SecretKey'] = SecretKey;
-SecretKey.prototype['__destroy__'] = SecretKey.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _SecretKey__destroy__0(this.ptr); this.ptr = 0; };;
+SecretKey.prototype['__destroy__'] = SecretKey.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _SecretKey__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
-SecretKey.prototype['keygen'] = SecretKey.prototype.keygen = /** @this{Object} */
-function(IKM, info)
-{ ensureCache.prepare();
+SecretKey.prototype['keygen'] = SecretKey.prototype.keygen =
+ /** @this{Object} */
+ function (IKM, info) {
+ ensureCache.prepare();
const [_IKM, IKM_len] = ensureAny(IKM);
- if (IKM_len < 32)
- throw new Error("BLST_ERROR: bad scalar");
+ if (IKM_len < 32) throw new Error('BLST_ERROR: bad scalar');
info = ensureString(info);
_SecretKey_keygen_3(this.ptr, _IKM, IKM_len, info);
HEAP8.fill(0, _IKM, _IKM + IKM_len);
-};;
+ };
-SecretKey.prototype['derive_master_eip2333'] = SecretKey.prototype.derive_master_eip2333 = /** @this{Object} */
-function(IKM)
-{ ensureCache.prepare();
+SecretKey.prototype['derive_master_eip2333'] = SecretKey.prototype.derive_master_eip2333 =
+ /** @this{Object} */
+ function (IKM) {
+ ensureCache.prepare();
const [_IKM, IKM_len] = ensureAny(IKM);
- if (IKM_len < 32)
- throw new Error("BLST_ERROR: bad scalar");
+ if (IKM_len < 32) throw new Error('BLST_ERROR: bad scalar');
_SecretKey_derive_master_eip2333_2(this.ptr, _IKM, IKM_len);
HEAP8.fill(0, _IKM, _IKM + IKM_len);
-};;
+ };
-SecretKey.prototype['derive_child_eip2333'] = SecretKey.prototype.derive_child_eip2333 = /** @this{Object} */
-function(sk, child_index)
-{ if (!(sk instanceof SecretKey))
- throw new Error(unsupported(sk));
+SecretKey.prototype['derive_child_eip2333'] = SecretKey.prototype.derive_child_eip2333 =
+ /** @this{Object} */
+ function (sk, child_index) {
+ if (!(sk instanceof SecretKey)) throw new Error(unsupported(sk));
_SecretKey_derive_child_eip2333_2(this.ptr, sk.ptr, child_index);
-};;
+ };
-SecretKey.prototype['from_bendian'] = SecretKey.prototype.from_bendian = /** @this{Object} */
-function(sk)
-{ if (!(sk instanceof Uint8Array) || sk.length != 32)
- throw new Error(unsupported(sk));
+SecretKey.prototype['from_bendian'] = SecretKey.prototype.from_bendian =
+ /** @this{Object} */
+ function (sk) {
+ if (!(sk instanceof Uint8Array) || sk.length != 32) throw new Error(unsupported(sk));
ensureCache.prepare();
sk = ensureInt8(sk);
_SecretKey_from_bendian_1(this.ptr, sk);
HEAP8.fill(0, sk, sk + 32);
-};;
+ };
-SecretKey.prototype['from_lendian'] = SecretKey.prototype.from_lendian = /** @this{Object} */
-function(sk)
-{ if (!(sk instanceof Uint8Array) || sk.length != 32)
- throw new Error(unsupported(sk));
+SecretKey.prototype['from_lendian'] = SecretKey.prototype.from_lendian =
+ /** @this{Object} */
+ function (sk) {
+ if (!(sk instanceof Uint8Array) || sk.length != 32) throw new Error(unsupported(sk));
ensureCache.prepare();
sk = ensureInt8(sk);
_SecretKey_from_lendian_1(this.ptr, sk);
HEAP8.fill(0, sk, sk + 32);
-};;
+ };
-SecretKey.prototype['to_bendian'] = SecretKey.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _SecretKey_to_bendian_0(this.ptr);
+SecretKey.prototype['to_bendian'] = SecretKey.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _SecretKey_to_bendian_0(this.ptr);
var ret = new Uint8Array(HEAPU8.subarray(out, out + 32));
HEAP8.fill(0, out, out + 32);
return ret;
-};;
+ };
-SecretKey.prototype['to_lendian'] = SecretKey.prototype.to_lendian = /** @this{Object} */
-function()
-{ var out = _SecretKey_to_lendian_0(this.ptr);
+SecretKey.prototype['to_lendian'] = SecretKey.prototype.to_lendian =
+ /** @this{Object} */
+ function () {
+ var out = _SecretKey_to_lendian_0(this.ptr);
var ret = new Uint8Array(HEAPU8.subarray(out, out + 32));
HEAP8.fill(0, out, out + 32);
return ret;
-};;
+ };
/** @this{Object} */
-function Scalar(scalar, DST)
-{ if (typeof scalar === 'undefined' || scalar === null) {
- this.ptr = _Scalar_0();
+function Scalar(scalar, DST) {
+ if (typeof scalar === 'undefined' || scalar === null) {
+ this.ptr = _Scalar_0();
+ } else {
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ if (typeof DST === 'string' || DST === null) {
+ DST = ensureString(DST);
+ this.ptr = _Scalar_3(_scalar, len, DST);
} else {
- ensureCache.prepare();
- const [ _scalar, len] = ensureAny(scalar);
- if (typeof DST === 'string' || DST === null) {
- DST = ensureString(DST);
- this.ptr = _Scalar_3(_scalar, len, DST);
- } else {
- this.ptr = _Scalar_2(_scalar, len*8);
- }
+ this.ptr = _Scalar_2(_scalar, len * 8);
}
- getCache(Scalar)[this.ptr] = this;
+ }
+ getCache(Scalar)[this.ptr] = this;
}
Scalar.prototype = Object.create(WrapperObject.prototype);
Scalar.prototype.constructor = Scalar;
Scalar.prototype.__class__ = Scalar;
Scalar.__cache__ = {};
blst['Scalar'] = Scalar;
-Scalar.prototype['__destroy__'] = Scalar.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _Scalar__destroy__0(this.ptr); this.ptr = 0; };;
-
-Scalar.prototype['hash_to'] = Scalar.prototype.hash_to = /** @this{Object} */
-function(msg, DST)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['__destroy__'] = Scalar.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _Scalar__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+Scalar.prototype['hash_to'] = Scalar.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
_Scalar_hash_to_3(this.ptr, _msg, msg_len, DST);
return this;
-};;
+ };
-Scalar.prototype['dup'] = Scalar.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_Scalar_dup_0(this.ptr), Scalar); };;
+Scalar.prototype['dup'] = Scalar.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_Scalar_dup_0(this.ptr), Scalar);
+ };
-Scalar.prototype['from_bendian'] = Scalar.prototype.from_bendian = /** @this{Object} */
-function(msg)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['from_bendian'] = Scalar.prototype.from_bendian =
+ /** @this{Object} */
+ function (msg) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
_Scalar_from_bendian_2(this.ptr, _msg, msg_len);
return this;
-};;
+ };
-Scalar.prototype['from_lendian'] = Scalar.prototype.from_lendian = /** @this{Object} */
-function(msg)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['from_lendian'] = Scalar.prototype.from_lendian =
+ /** @this{Object} */
+ function (msg) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
_Scalar_from_lendian_2(this.ptr, _msg, msg_len);
return this;
-};;
+ };
-Scalar.prototype['to_bendian'] = Scalar.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _Scalar_to_bendian_0(this.ptr);
+Scalar.prototype['to_bendian'] = Scalar.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _Scalar_to_bendian_0(this.ptr);
return new Uint8Array(HEAPU8.subarray(out, out + 32));
-};;
+ };
-Scalar.prototype['to_lendian'] = Scalar.prototype.to_lendian = /** @this{Object} */
-function()
-{ var out = _Scalar_to_lendian_0(this.ptr);
+Scalar.prototype['to_lendian'] = Scalar.prototype.to_lendian =
+ /** @this{Object} */
+ function () {
+ var out = _Scalar_to_lendian_0(this.ptr);
return new Uint8Array(HEAPU8.subarray(out, out + 32));
-};;
+ };
-Scalar.prototype['add'] = Scalar.prototype.add = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar || a instanceof SecretKey))
- throw new Error(unsupported(a));
+Scalar.prototype['add'] = Scalar.prototype.add =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar || a instanceof SecretKey)) throw new Error(unsupported(a));
_Scalar_add_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['sub'] = Scalar.prototype.sub = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar))
- throw new Error(unsupported(a));
+Scalar.prototype['sub'] = Scalar.prototype.sub =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar)) throw new Error(unsupported(a));
_Scalar_sub_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['mul'] = Scalar.prototype.mul = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar))
- throw new Error(unsupported(a));
+Scalar.prototype['mul'] = Scalar.prototype.mul =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar)) throw new Error(unsupported(a));
_Scalar_mul_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['inverse'] = Scalar.prototype.inverse = /** @this{Object} */
-function()
-{ _Scalar_inverse_0(this.ptr); return this; };;
+Scalar.prototype['inverse'] = Scalar.prototype.inverse =
+ /** @this{Object} */
+ function () {
+ _Scalar_inverse_0(this.ptr);
+ return this;
+ };
/** @this{Object} */
-function PT(p, q)
-{ if (typeof q === 'undefined' || q === null) {
- if (p instanceof P1_Affine)
- this.ptr = _PT_p_affine_1(p.ptr);
- else if (p instanceof P2_Affine)
- this.ptr = _PT_q_affine_1(p.ptr);
- else
- throw new Error(unsupported(p));
- } else if (p instanceof P1_Affine && q instanceof P2_Affine) {
- this.ptr = _PT_pq_affine_2(p.ptr, q.ptr);
- } else if (p instanceof P2_Affine && q instanceof P1_Affine) {
- this.ptr = _PT_pq_affine_2(q.ptr, p.ptr);
- } else if (p instanceof P1 && q instanceof P2) {
- this.ptr = _PT_pq_2(p.ptr, q.ptr);
- } else if (p instanceof P2 && q instanceof P1) {
- this.ptr = _PT_pq_2(q.ptr, p.ptr);
- } else {
- throw new Error(unsupported(p, q));
- }
- getCache(PT)[this.ptr] = this;
+function PT(p, q) {
+ if (typeof q === 'undefined' || q === null) {
+ if (p instanceof P1_Affine) this.ptr = _PT_p_affine_1(p.ptr);
+ else if (p instanceof P2_Affine) this.ptr = _PT_q_affine_1(p.ptr);
+ else throw new Error(unsupported(p));
+ } else if (p instanceof P1_Affine && q instanceof P2_Affine) {
+ this.ptr = _PT_pq_affine_2(p.ptr, q.ptr);
+ } else if (p instanceof P2_Affine && q instanceof P1_Affine) {
+ this.ptr = _PT_pq_affine_2(q.ptr, p.ptr);
+ } else if (p instanceof P1 && q instanceof P2) {
+ this.ptr = _PT_pq_2(p.ptr, q.ptr);
+ } else if (p instanceof P2 && q instanceof P1) {
+ this.ptr = _PT_pq_2(q.ptr, p.ptr);
+ } else {
+ throw new Error(unsupported(p, q));
+ }
+ getCache(PT)[this.ptr] = this;
}
PT.prototype = Object.create(WrapperObject.prototype);
PT.prototype.constructor = PT;
PT.prototype.__class__ = PT;
PT.__cache__ = {};
blst['PT'] = PT;
-PT.prototype['__destroy__'] = PT.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _PT__destroy__0(this.ptr); this.ptr = 0; };;
-
-PT.prototype['dup'] = PT.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_PT_dup_0(this.ptr), PT); };;
-
-PT.prototype['is_one'] = PT.prototype.is_one = /** @this{Object} */
-function()
-{ return !!(_PT_is_one_0(this.ptr)); };;
-
-PT.prototype['is_equal'] = PT.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof PT)
- return !!(_PT_is_equal_1(this.ptr, p.ptr));
+PT.prototype['__destroy__'] = PT.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _PT__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+PT.prototype['dup'] = PT.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_PT_dup_0(this.ptr), PT);
+ };
+
+PT.prototype['is_one'] = PT.prototype.is_one =
+ /** @this{Object} */
+ function () {
+ return !!_PT_is_one_0(this.ptr);
+ };
+
+PT.prototype['is_equal'] = PT.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof PT) return !!_PT_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-PT.prototype['sqr'] = PT.prototype.sqr = /** @this{Object} */
-function()
-{ _PT_sqr_0(this.ptr); return this; };;
-
-PT.prototype['mul'] = PT.prototype.mul = /** @this{Object} */
-function(p)
-{ if (p instanceof PT)
- _PT_mul_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
+ };
+
+PT.prototype['sqr'] = PT.prototype.sqr =
+ /** @this{Object} */
+ function () {
+ _PT_sqr_0(this.ptr);
+ return this;
+ };
+
+PT.prototype['mul'] = PT.prototype.mul =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof PT) _PT_mul_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
return this;
-};;
+ };
-PT.prototype['final_exp'] = PT.prototype.final_exp = /** @this{Object} */
-function()
-{ _PT_final_exp_0(this.ptr); return this; };;
+PT.prototype['final_exp'] = PT.prototype.final_exp =
+ /** @this{Object} */
+ function () {
+ _PT_final_exp_0(this.ptr);
+ return this;
+ };
-PT.prototype['in_group'] = PT.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_PT_in_group_0(this.ptr)); };;
+PT.prototype['in_group'] = PT.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_PT_in_group_0(this.ptr);
+ };
-PT.prototype['to_bendian'] = PT.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _PT_to_bendian_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*12));
-};;
+PT.prototype['to_bendian'] = PT.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _PT_to_bendian_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 12));
+ };
-PT['finalverify'] = PT.finalverify =
-function(gt1, gt2)
-{ if (gt1 instanceof PT && gt2 instanceof PT)
- return !!(_PT_finalverify_2(gt1.ptr, gt2.ptr));
- throw new Error(unsupported(gt1, gt2));
-};;
+PT['finalverify'] = PT.finalverify = function (gt1, gt2) {
+ if (gt1 instanceof PT && gt2 instanceof PT) return !!_PT_finalverify_2(gt1.ptr, gt2.ptr);
+ throw new Error(unsupported(gt1, gt2));
+};
-PT['one'] = PT.one =
-function()
-{ return wrapPointer(_PT_one_0(), PT); };;
+PT['one'] = PT.one = function () {
+ return wrapPointer(_PT_one_0(), PT);
+};
/** @this{Object} */
-function Pairing(hash_or_encode, DST)
-{ ensureCache.prepare();
- DST = ensureString(DST);
- this.ptr = _Pairing_2(!!hash_or_encode, DST);
- getCache(SecretKey)[this.ptr] = this;
+function Pairing(hash_or_encode, DST) {
+ ensureCache.prepare();
+ DST = ensureString(DST);
+ this.ptr = _Pairing_2(!!hash_or_encode, DST);
+ getCache(SecretKey)[this.ptr] = this;
}
Pairing.prototype = Object.create(WrapperObject.prototype);
Pairing.prototype.constructor = Pairing;
Pairing.prototype.__class__ = Pairing;
Pairing.__cache__ = {};
blst['Pairing'] = Pairing;
-Pairing.prototype['__destroy__'] = Pairing.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _Pairing__destroy__0(this.ptr); this.ptr = 0; };;
+Pairing.prototype['__destroy__'] = Pairing.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _Pairing__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
-Pairing.prototype['aggregate'] = Pairing.prototype.aggregate = /** @this{Object} */
-function(pk, sig, msg, aug)
-{ ensureCache.prepare();
+Pairing.prototype['aggregate'] = Pairing.prototype.aggregate =
+ /** @this{Object} */
+ function (pk, sig, msg, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
const [_aug, aug_len] = ensureAny(aug);
if (pk instanceof P1_Affine && sig instanceof P2_Affine)
- return _Pairing_aggregate_pk_in_g1_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
+ return _Pairing_aggregate_pk_in_g1_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
else if (pk instanceof P2_Affine && sig instanceof P1_Affine)
- return _Pairing_aggregate_pk_in_g2_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
- else
- throw new Error(unsupported(pk, sig));
+ return _Pairing_aggregate_pk_in_g2_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
+ else throw new Error(unsupported(pk, sig));
return -1;
-};;
+ };
-Pairing.prototype['mul_n_aggregate'] = Pairing.prototype.mul_n_aggregate = /** @this{Object} */
-function(pk, sig, scalar, msg, aug)
-{ if (typeof scalar === 'undefined' || scalar === null)
- throw new Error("missing |scalar| argument");
+Pairing.prototype['mul_n_aggregate'] = Pairing.prototype.mul_n_aggregate =
+ /** @this{Object} */
+ function (pk, sig, scalar, msg, aug) {
+ if (typeof scalar === 'undefined' || scalar === null)
+ throw new Error('missing |scalar| argument');
ensureCache.prepare();
const [_scalar, len] = ensureAny(scalar);
const [_msg, msg_len] = ensureAny(msg);
const [_aug, aug_len] = ensureAny(aug);
if (pk instanceof P1_Affine && sig instanceof P2_Affine)
- return _Pairing_mul_n_aggregate_pk_in_g1_8(this.ptr, pk.ptr, sig.ptr, _scalar, len*8, _msg, msg_len, _aug, aug_len);
+ return _Pairing_mul_n_aggregate_pk_in_g1_8(
+ this.ptr,
+ pk.ptr,
+ sig.ptr,
+ _scalar,
+ len * 8,
+ _msg,
+ msg_len,
+ _aug,
+ aug_len,
+ );
else if (pk instanceof P2_Affine && sig instanceof P1_Affine)
- return _Pairing_mul_n_aggregate_pk_in_g2_8(this.ptr, pk.ptr, sig.ptr, _scalar, len*8, _msg, msg_len, _aug, aug_len);
- else
- throw new Error(unsupported(pk, sig));
+ return _Pairing_mul_n_aggregate_pk_in_g2_8(
+ this.ptr,
+ pk.ptr,
+ sig.ptr,
+ _scalar,
+ len * 8,
+ _msg,
+ msg_len,
+ _aug,
+ aug_len,
+ );
+ else throw new Error(unsupported(pk, sig));
return -1;
-};;
+ };
-Pairing.prototype['commit'] = Pairing.prototype.commit = /** @this{Object} */
-function()
-{ _Pairing_commit_0(this.ptr); };;
+Pairing.prototype['commit'] = Pairing.prototype.commit =
+ /** @this{Object} */
+ function () {
+ _Pairing_commit_0(this.ptr);
+ };
-Pairing.prototype['asArrayBuffer'] = Pairing.prototype.asArrayBuffer = /** @this{Object} */
-function()
-{ return HEAP8.buffer.slice(this.ptr, this.ptr + _Pairing_sizeof_0()); };;
+Pairing.prototype['asArrayBuffer'] = Pairing.prototype.asArrayBuffer =
+ /** @this{Object} */
+ function () {
+ return HEAP8.buffer.slice(this.ptr, this.ptr + _Pairing_sizeof_0());
+ };
-Pairing.prototype['merge'] = Pairing.prototype.merge = /** @this{Object} */
-function(ctx)
-{ if (ctx instanceof Pairing)
- return _Pairing_merge_1(this.ptr, ctx.ptr);
+Pairing.prototype['merge'] = Pairing.prototype.merge =
+ /** @this{Object} */
+ function (ctx) {
+ if (ctx instanceof Pairing) return _Pairing_merge_1(this.ptr, ctx.ptr);
else if (ctx instanceof ArrayBuffer && ctx.byteLength == _Pairing_sizeof_0())
- return _Pairing_merge_1(this.ptr, ensureAny(ctx)[0]);
+ return _Pairing_merge_1(this.ptr, ensureAny(ctx)[0]);
throw new Error(unsupported(ctx));
-};;
-
-Pairing.prototype['finalverify'] = Pairing.prototype.finalverify = /** @this{Object} */
-function(sig)
-{ if (typeof sig === 'undefined' || sig === null)
- return !!(_Pairing_finalverify_1(this.ptr, 0));
- else if (sig instanceof PT)
- return !!(_Pairing_finalverify_1(this.ptr, sig.ptr));
- else
- throw new Error(unsupported(sig));
-};;
-
-Pairing.prototype['raw_aggregate'] = Pairing.prototype.raw_aggregate = /** @this{Object} */
-function(q, p)
-{ if (q instanceof P2_Affine && p instanceof P1_Affine)
- _Pairing_raw_aggregate_2(this.ptr, q.ptr, p.ptr);
- else
- throw new Error(unsupported(q, p));
-};;
-
-Pairing.prototype['as_fp12'] = Pairing.prototype.as_fp12 = /** @this{Object} */
-function()
-{ return wrapPointer(_Pairing_as_fp12_0(this.ptr), PT); };;
+ };
+
+Pairing.prototype['finalverify'] = Pairing.prototype.finalverify =
+ /** @this{Object} */
+ function (sig) {
+ if (typeof sig === 'undefined' || sig === null) return !!_Pairing_finalverify_1(this.ptr, 0);
+ else if (sig instanceof PT) return !!_Pairing_finalverify_1(this.ptr, sig.ptr);
+ else throw new Error(unsupported(sig));
+ };
+Pairing.prototype['raw_aggregate'] = Pairing.prototype.raw_aggregate =
+ /** @this{Object} */
+ function (q, p) {
+ if (q instanceof P2_Affine && p instanceof P1_Affine)
+ _Pairing_raw_aggregate_2(this.ptr, q.ptr, p.ptr);
+ else throw new Error(unsupported(q, p));
+ };
+
+Pairing.prototype['as_fp12'] = Pairing.prototype.as_fp12 =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_Pairing_as_fp12_0(this.ptr), PT);
+ };
/** @this{Object} */
-function P1_Affine(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P1_Affine_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P1_Affine_2(ensureInt8(input), input.length);
- else if (input instanceof P1)
- this.ptr = _P1_Affine_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P1_Affine)[this.ptr] = this;
+function P1_Affine(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P1_Affine_0();
+ else if (input instanceof Uint8Array) this.ptr = _P1_Affine_2(ensureInt8(input), input.length);
+ else if (input instanceof P1) this.ptr = _P1_Affine_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P1_Affine)[this.ptr] = this;
}
P1_Affine.prototype = Object.create(WrapperObject.prototype);
P1_Affine.prototype.constructor = P1_Affine;
P1_Affine.prototype.__class__ = P1_Affine;
P1_Affine.__cache__ = {};
blst['P1_Affine'] = P1_Affine;
-P1_Affine.prototype['__destroy__'] = P1_Affine.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P1_Affine__destroy__0(this.ptr); this.ptr = 0; };;
-
-P1_Affine.prototype['dup'] = P1_Affine.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_Affine_dup_0(this.ptr), P1_Affine); };;
-
-P1_Affine.prototype['to_jacobian'] = P1_Affine.prototype.to_jacobian = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_Affine_to_jacobian_0(this.ptr), P1); };;
-
-P1_Affine.prototype['serialize'] = P1_Affine.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P1_Affine_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*1));
-};;
-
-P1_Affine.prototype['compress'] = P1_Affine.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P1_Affine_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*1));
-};;
-
-P1_Affine.prototype['on_curve'] = P1_Affine.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_on_curve_0(this.ptr)); };;
-
-P1_Affine.prototype['in_group'] = P1_Affine.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_in_group_0(this.ptr)); };;
-
-P1_Affine.prototype['is_inf'] = P1_Affine.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_is_inf_0(this.ptr)); };;
-
-P1_Affine.prototype['is_equal'] = P1_Affine.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P1_Affine)
- return !!(_P1_Affine_is_equal_1(this.ptr, p.ptr));
+P1_Affine.prototype['__destroy__'] = P1_Affine.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P1_Affine__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P1_Affine.prototype['dup'] = P1_Affine.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_Affine_dup_0(this.ptr), P1_Affine);
+ };
+
+P1_Affine.prototype['to_jacobian'] = P1_Affine.prototype.to_jacobian =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_Affine_to_jacobian_0(this.ptr), P1);
+ };
+
+P1_Affine.prototype['serialize'] = P1_Affine.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P1_Affine_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 1));
+ };
+
+P1_Affine.prototype['compress'] = P1_Affine.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P1_Affine_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 1));
+ };
+
+P1_Affine.prototype['on_curve'] = P1_Affine.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_on_curve_0(this.ptr);
+ };
+
+P1_Affine.prototype['in_group'] = P1_Affine.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_in_group_0(this.ptr);
+ };
+
+P1_Affine.prototype['is_inf'] = P1_Affine.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_is_inf_0(this.ptr);
+ };
+
+P1_Affine.prototype['is_equal'] = P1_Affine.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1_Affine) return !!_P1_Affine_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
+ };
-P1_Affine.prototype['core_verify'] = P1_Affine.prototype.core_verify = /** @this{Object} */
-function(pk, hash_or_encode, msg, DST, aug)
-{ if (!(pk instanceof P2_Affine))
- throw new Error(unsupported(pk));
+P1_Affine.prototype['core_verify'] = P1_Affine.prototype.core_verify =
+ /** @this{Object} */
+ function (pk, hash_or_encode, msg, DST, aug) {
+ if (!(pk instanceof P2_Affine)) throw new Error(unsupported(pk));
ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
- return _P1_Affine_core_verify_7(this.ptr, pk.ptr, !!hash_or_encode, _msg, msg_len, DST, _aug, aug_len);
-};;
+ return _P1_Affine_core_verify_7(
+ this.ptr,
+ pk.ptr,
+ !!hash_or_encode,
+ _msg,
+ msg_len,
+ DST,
+ _aug,
+ aug_len,
+ );
+ };
-P1_Affine['generator'] = P1_Affine.generator =
-function()
-{ return wrapPointer(_P1_Affine_generator_0(), P1_Affine); };;
+P1_Affine['generator'] = P1_Affine.generator = function () {
+ return wrapPointer(_P1_Affine_generator_0(), P1_Affine);
+};
/** @this{Object} */
-function P1(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P1_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P1_2(ensureInt8(input), input.length);
- else if (input instanceof P1_Affine)
- this.ptr = _P1_affine_1(input.ptr);
- else if (input instanceof SecretKey)
- this.ptr = _P1_secretkey_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P1)[this.ptr] = this;
+function P1(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P1_0();
+ else if (input instanceof Uint8Array) this.ptr = _P1_2(ensureInt8(input), input.length);
+ else if (input instanceof P1_Affine) this.ptr = _P1_affine_1(input.ptr);
+ else if (input instanceof SecretKey) this.ptr = _P1_secretkey_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P1)[this.ptr] = this;
}
P1.prototype = Object.create(WrapperObject.prototype);
P1.prototype.constructor = P1;
P1.prototype.__class__ = P1;
P1.__cache__ = {};
blst['P1'] = P1;
-P1.prototype['__destroy__'] = P1.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P1__destroy__0(this.ptr); this.ptr = 0; };;
-
-P1.prototype['dup'] = P1.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_dup_0(this.ptr), P1); };;
-
-P1.prototype['to_affine'] = P1.prototype.to_affine = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_to_affine_0(this.ptr), P1_Affine); };;
-
-P1.prototype['serialize'] = P1.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P1_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*1));
-};;
-
-P1.prototype['compress'] = P1.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P1_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*1));
-};;
-
-P1.prototype['on_curve'] = P1.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P1_on_curve_0(this.ptr)); };;
-
-P1.prototype['in_group'] = P1.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P1_in_group_0(this.ptr)); };;
-
-P1.prototype['is_inf'] = P1.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P1_is_inf_0(this.ptr)); };;
-
-P1.prototype['is_equal'] = P1.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P1)
- return !!(_P1_is_equal_1(this.ptr, p.ptr));
+P1.prototype['__destroy__'] = P1.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P1__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P1.prototype['dup'] = P1.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_dup_0(this.ptr), P1);
+ };
+
+P1.prototype['to_affine'] = P1.prototype.to_affine =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_to_affine_0(this.ptr), P1_Affine);
+ };
+
+P1.prototype['serialize'] = P1.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P1_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 1));
+ };
+
+P1.prototype['compress'] = P1.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P1_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 1));
+ };
+
+P1.prototype['on_curve'] = P1.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P1_on_curve_0(this.ptr);
+ };
+
+P1.prototype['in_group'] = P1.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P1_in_group_0(this.ptr);
+ };
+
+P1.prototype['is_inf'] = P1.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P1_is_inf_0(this.ptr);
+ };
+
+P1.prototype['is_equal'] = P1.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1) return !!_P1_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-P1.prototype['aggregate'] = P1.prototype.aggregate = /** @this{Object} */
-function(p)
-{ if (p instanceof P1_Affine)
- _P1_aggregate_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
-};;
-
-P1.prototype['sign_with'] = P1.prototype.sign_with = /** @this{Object} */
-function(sk)
-{ if (sk instanceof SecretKey)
- _P1_sign_with_1(this.ptr, sk.ptr);
- else
- throw new Error(unsupported(sk));
+ };
+
+P1.prototype['aggregate'] = P1.prototype.aggregate =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1_Affine) _P1_aggregate_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ };
+
+P1.prototype['sign_with'] = P1.prototype.sign_with =
+ /** @this{Object} */
+ function (sk) {
+ if (sk instanceof SecretKey) _P1_sign_with_1(this.ptr, sk.ptr);
+ else throw new Error(unsupported(sk));
return this;
-};;
+ };
-P1.prototype['hash_to'] = P1.prototype.hash_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P1.prototype['hash_to'] = P1.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P1_hash_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P1.prototype['encode_to'] = P1.prototype.encode_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P1.prototype['encode_to'] = P1.prototype.encode_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P1_encode_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P1.prototype['mult'] = P1.prototype.mult = /** @this{Object} */
-function(scalar)
-{ if (scalar instanceof Scalar) {
- _P1_mult_1(this.ptr, scalar.ptr);
+P1.prototype['mult'] = P1.prototype.mult =
+ /** @this{Object} */
+ function (scalar) {
+ if (scalar instanceof Scalar) {
+ _P1_mult_1(this.ptr, scalar.ptr);
} else if (typeof scalar !== 'string') {
- ensureCache.prepare();
- const [_scalar, len] = ensureAny(scalar);
- _P1_mult_2(this.ptr, _scalar, len*8);
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ _P1_mult_2(this.ptr, _scalar, len * 8);
} else {
- throw new Error(unsupported(scalar));
+ throw new Error(unsupported(scalar));
}
return this;
-};;
-
-P1.prototype['cneg'] = P1.prototype.cneg = /** @this{Object} */
-function(flag)
-{ _P1_cneg_1(this.ptr, !!flag); return this; };;
-P1.prototype['neg'] = P1.prototype.neg = /** @this{Object} */
-function()
-{ _P1_cneg_1(this.ptr, true); return this; };;
-
-P1.prototype['add'] = P1.prototype.add = /** @this{Object} */
-function(p)
-{ if (p instanceof P1)
- _P1_add_1(this.ptr, p.ptr);
- else if (p instanceof P1_Affine)
- _P1_add_affine_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
+ };
+
+P1.prototype['cneg'] = P1.prototype.cneg =
+ /** @this{Object} */
+ function (flag) {
+ _P1_cneg_1(this.ptr, !!flag);
return this;
-};;
+ };
+P1.prototype['neg'] = P1.prototype.neg =
+ /** @this{Object} */
+ function () {
+ _P1_cneg_1(this.ptr, true);
+ return this;
+ };
-P1.prototype['dbl'] = P1.prototype.dbl = /** @this{Object} */
-function()
-{ _P1_dbl_0(this.ptr); return this; };;
+P1.prototype['add'] = P1.prototype.add =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1) _P1_add_1(this.ptr, p.ptr);
+ else if (p instanceof P1_Affine) _P1_add_affine_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ return this;
+ };
-blst['G1'] = P1['generator'] = P1.generator =
-function()
-{ return wrapPointer(_P1_generator_0(), P1); };;
+P1.prototype['dbl'] = P1.prototype.dbl =
+ /** @this{Object} */
+ function () {
+ _P1_dbl_0(this.ptr);
+ return this;
+ };
+blst['G1'] =
+ P1['generator'] =
+ P1.generator =
+ function () {
+ return wrapPointer(_P1_generator_0(), P1);
+ };
/** @this{Object} */
-function P2_Affine(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P2_Affine_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P2_Affine_2(ensureInt8(input), input.length);
- else if (input instanceof P2)
- this.ptr = _P2_Affine_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P2_Affine)[this.ptr] = this;
+function P2_Affine(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P2_Affine_0();
+ else if (input instanceof Uint8Array) this.ptr = _P2_Affine_2(ensureInt8(input), input.length);
+ else if (input instanceof P2) this.ptr = _P2_Affine_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P2_Affine)[this.ptr] = this;
}
P2_Affine.prototype = Object.create(WrapperObject.prototype);
P2_Affine.prototype.constructor = P2_Affine;
P2_Affine.prototype.__class__ = P2_Affine;
P2_Affine.__cache__ = {};
blst['P2_Affine'] = P2_Affine;
-P2_Affine.prototype['__destroy__'] = P2_Affine.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P2_Affine__destroy__0(this.ptr); this.ptr = 0; };;
-
-P2_Affine.prototype['dup'] = P2_Affine.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_Affine_dup_0(this.ptr), P2_Affine); };;
-
-P2_Affine.prototype['to_jacobian'] = P2_Affine.prototype.to_jacobian = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_Affine_to_jacobian_0(this.ptr), P2); };;
-
-P2_Affine.prototype['serialize'] = P2_Affine.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P2_Affine_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*2));
-};;
-
-P2_Affine.prototype['compress'] = P2_Affine.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P2_Affine_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*2));
-};;
-
-P2_Affine.prototype['on_curve'] = P2_Affine.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_on_curve_0(this.ptr)); };;
-
-P2_Affine.prototype['in_group'] = P2_Affine.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_in_group_0(this.ptr)); };;
-
-P2_Affine.prototype['is_inf'] = P2_Affine.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_is_inf_0(this.ptr)); };;
-
-P2_Affine.prototype['is_equal'] = P2_Affine.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P2_Affine)
- return !!(_P2_Affine_is_equal_1(this.ptr, p.ptr));
+P2_Affine.prototype['__destroy__'] = P2_Affine.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P2_Affine__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P2_Affine.prototype['dup'] = P2_Affine.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_Affine_dup_0(this.ptr), P2_Affine);
+ };
+
+P2_Affine.prototype['to_jacobian'] = P2_Affine.prototype.to_jacobian =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_Affine_to_jacobian_0(this.ptr), P2);
+ };
+
+P2_Affine.prototype['serialize'] = P2_Affine.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P2_Affine_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 2));
+ };
+
+P2_Affine.prototype['compress'] = P2_Affine.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P2_Affine_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 2));
+ };
+
+P2_Affine.prototype['on_curve'] = P2_Affine.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_on_curve_0(this.ptr);
+ };
+
+P2_Affine.prototype['in_group'] = P2_Affine.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_in_group_0(this.ptr);
+ };
+
+P2_Affine.prototype['is_inf'] = P2_Affine.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_is_inf_0(this.ptr);
+ };
+
+P2_Affine.prototype['is_equal'] = P2_Affine.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2_Affine) return !!_P2_Affine_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
+ };
-P2_Affine.prototype['core_verify'] = P2_Affine.prototype.core_verify = /** @this{Object} */
-function(pk, hash_or_encode, msg, DST, aug)
-{ if (!(pk instanceof P1_Affine))
- throw new Error(unsupported(pk));
+P2_Affine.prototype['core_verify'] = P2_Affine.prototype.core_verify =
+ /** @this{Object} */
+ function (pk, hash_or_encode, msg, DST, aug) {
+ if (!(pk instanceof P1_Affine)) throw new Error(unsupported(pk));
ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
- return _P2_Affine_core_verify_7(this.ptr, pk.ptr, !!hash_or_encode, _msg, msg_len, DST, _aug, aug_len);
-};;
+ return _P2_Affine_core_verify_7(
+ this.ptr,
+ pk.ptr,
+ !!hash_or_encode,
+ _msg,
+ msg_len,
+ DST,
+ _aug,
+ aug_len,
+ );
+ };
-P2_Affine['generator'] = P2_Affine.generator =
-function()
-{ return wrapPointer(_P2_Affine_generator_0(), P2_Affine); };;
+P2_Affine['generator'] = P2_Affine.generator = function () {
+ return wrapPointer(_P2_Affine_generator_0(), P2_Affine);
+};
/** @this{Object} */
-function P2(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P2_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P2_2(ensureInt8(input), input.length);
- else if (input instanceof P2_Affine)
- this.ptr = _P2_affine_1(input.ptr);
- else if (input instanceof SecretKey)
- this.ptr = _P2_secretkey_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P2)[this.ptr] = this;
+function P2(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P2_0();
+ else if (input instanceof Uint8Array) this.ptr = _P2_2(ensureInt8(input), input.length);
+ else if (input instanceof P2_Affine) this.ptr = _P2_affine_1(input.ptr);
+ else if (input instanceof SecretKey) this.ptr = _P2_secretkey_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P2)[this.ptr] = this;
}
P2.prototype = Object.create(WrapperObject.prototype);
P2.prototype.constructor = P2;
P2.prototype.__class__ = P2;
P2.__cache__ = {};
blst['P2'] = P2;
-P2.prototype['__destroy__'] = P2.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P2__destroy__0(this.ptr); this.ptr = 0; };;
-
-P2.prototype['dup'] = P2.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_dup_0(this.ptr), P2); };;
-
-P2.prototype['to_affine'] = P2.prototype.to_affine = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_to_affine_0(this.ptr), P2_Affine); };;
-
-P2.prototype['serialize'] = P2.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P2_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*2));
-};;
-
-P2.prototype['compress'] = P2.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P2_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*2));
-};;
-
-P2.prototype['on_curve'] = P2.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P2_on_curve_0(this.ptr)); };;
-
-P2.prototype['in_group'] = P2.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P2_in_group_0(this.ptr)); };;
-
-P2.prototype['is_inf'] = P2.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P2_is_inf_0(this.ptr)); };;
-
-P2.prototype['is_equal'] = P2.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P2)
- return !!(_P2_is_equal_1(this.ptr, p.ptr));
+P2.prototype['__destroy__'] = P2.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P2__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P2.prototype['dup'] = P2.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_dup_0(this.ptr), P2);
+ };
+
+P2.prototype['to_affine'] = P2.prototype.to_affine =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_to_affine_0(this.ptr), P2_Affine);
+ };
+
+P2.prototype['serialize'] = P2.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P2_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 2));
+ };
+
+P2.prototype['compress'] = P2.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P2_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 2));
+ };
+
+P2.prototype['on_curve'] = P2.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P2_on_curve_0(this.ptr);
+ };
+
+P2.prototype['in_group'] = P2.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P2_in_group_0(this.ptr);
+ };
+
+P2.prototype['is_inf'] = P2.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P2_is_inf_0(this.ptr);
+ };
+
+P2.prototype['is_equal'] = P2.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2) return !!_P2_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-P2.prototype['aggregate'] = P2.prototype.aggregate = /** @this{Object} */
-function(p)
-{ if (p instanceof P2_Affine)
- _P2_aggregate_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
-};;
-
-P2.prototype['sign_with'] = P2.prototype.sign_with = /** @this{Object} */
-function(sk)
-{ if (sk instanceof SecretKey)
- _P2_sign_with_1(this.ptr, sk.ptr);
- else
- throw new Error(unsupported(sk));
+ };
+
+P2.prototype['aggregate'] = P2.prototype.aggregate =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2_Affine) _P2_aggregate_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ };
+
+P2.prototype['sign_with'] = P2.prototype.sign_with =
+ /** @this{Object} */
+ function (sk) {
+ if (sk instanceof SecretKey) _P2_sign_with_1(this.ptr, sk.ptr);
+ else throw new Error(unsupported(sk));
return this;
-};;
+ };
-P2.prototype['hash_to'] = P2.prototype.hash_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P2.prototype['hash_to'] = P2.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P2_hash_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P2.prototype['encode_to'] = P2.prototype.encode_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P2.prototype['encode_to'] = P2.prototype.encode_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P2_encode_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P2.prototype['mult'] = P2.prototype.mult = /** @this{Object} */
-function(scalar)
-{ if (scalar instanceof Scalar) {
- _P2_mult_1(this.ptr, scalar.ptr);
+P2.prototype['mult'] = P2.prototype.mult =
+ /** @this{Object} */
+ function (scalar) {
+ if (scalar instanceof Scalar) {
+ _P2_mult_1(this.ptr, scalar.ptr);
} else if (typeof scalar !== 'string') {
- ensureCache.prepare();
- const [_scalar, len] = ensureAny(scalar);
- _P2_mult_2(this.ptr, _scalar, len*8);
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ _P2_mult_2(this.ptr, _scalar, len * 8);
} else {
- throw new Error(unsupported(scalar));
+ throw new Error(unsupported(scalar));
}
return this;
-};;
-
-P2.prototype['cneg'] = P2.prototype.cneg = /** @this{Object} */
-function(flag)
-{ _P2_cneg_1(this.ptr, !!flag); return this; };;
-P2.prototype['neg'] = P2.prototype.neg = /** @this{Object} */
-function()
-{ _P2_cneg_1(this.ptr, true); return this; };;
-
-P2.prototype['add'] = P2.prototype.add = /** @this{Object} */
-function(p)
-{ if (p instanceof P2)
- _P2_add_1(this.ptr, p.ptr);
- else if (p instanceof P2_Affine)
- _P2_add_affine_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
+ };
+
+P2.prototype['cneg'] = P2.prototype.cneg =
+ /** @this{Object} */
+ function (flag) {
+ _P2_cneg_1(this.ptr, !!flag);
return this;
-};;
+ };
+P2.prototype['neg'] = P2.prototype.neg =
+ /** @this{Object} */
+ function () {
+ _P2_cneg_1(this.ptr, true);
+ return this;
+ };
-P2.prototype['dbl'] = P2.prototype.dbl = /** @this{Object} */
-function()
-{ _P2_dbl_0(this.ptr); return this; };;
+P2.prototype['add'] = P2.prototype.add =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2) _P2_add_1(this.ptr, p.ptr);
+ else if (p instanceof P2_Affine) _P2_add_affine_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ return this;
+ };
+
+P2.prototype['dbl'] = P2.prototype.dbl =
+ /** @this{Object} */
+ function () {
+ _P2_dbl_0(this.ptr);
+ return this;
+ };
-blst['G2'] = P2['generator'] = P2.generator =
-function()
-{ return wrapPointer(_P2_generator_0(), P2); };;
+blst['G2'] =
+ P2['generator'] =
+ P2.generator =
+ function () {
+ return wrapPointer(_P2_generator_0(), P2);
+ };
// end include: /Users/tatiana/Documents/_dev/GNOSIS/shutter-encryption/blst/bindings/emscripten/blst_bind.js
-
diff --git a/public/blst/blst_bind.js b/public/blst/blst_bind.js
index bc8d193..dd073fa 100644
--- a/public/blst/blst_bind.js
+++ b/public/blst/blst_bind.js
@@ -4,841 +4,974 @@
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const BLST_ERROR_str = [
- "BLST_ERROR: success",
- "BLST_ERROR: bad point encoding",
- "BLST_ERROR: point is not on curve",
- "BLST_ERROR: point is not in group",
- "BLST_ERROR: context type mismatch",
- "BLST_ERROR: verify failed",
- "BLST_ERROR: public key is infinite",
- "BLST_ERROR: bad scalar",
+ 'BLST_ERROR: success',
+ 'BLST_ERROR: bad point encoding',
+ 'BLST_ERROR: point is not on curve',
+ 'BLST_ERROR: point is not in group',
+ 'BLST_ERROR: context type mismatch',
+ 'BLST_ERROR: verify failed',
+ 'BLST_ERROR: public key is infinite',
+ 'BLST_ERROR: bad scalar',
];
-function unsupported(type, extra)
-{ if (typeof extra === 'undefined')
- return `${type ? type.constructor.name : 'none'}: unsupported type`;
- else
- return `${type ? type.constructor.name : 'none'}/${extra ? extra.constructor.name : 'none'}: unsupported types or combination thereof`;
+function unsupported(type, extra) {
+ if (typeof extra === 'undefined')
+ return `${type ? type.constructor.name : 'none'}: unsupported type`;
+ else
+ return `${type ? type.constructor.name : 'none'}/${extra ? extra.constructor.name : 'none'}: unsupported types or combination thereof`;
}
-function ensureAny(value)
-{ if (value === null)
- return [0, 0];
-
- switch (value.constructor) {
- case String:
- return [ensureString(value), lengthBytesUTF8(value)];
- case ArrayBuffer:
- return [ensureInt8(new Uint8Array(value)), value.byteLength];
- case BigInt:
- if (value < 0)
- throw new Error("expecting unsigned BigInt value");
- var temp = [];
- while (value != 0) {
- temp.push(Number(value & 255n));
- value >>= 8n;
- }
- return [ensureInt8(temp), temp.length];
- case Uint8Array: case Buffer:
- return [ensureInt8(value), value.length];
- default:
- throw new Error(unsupported(value));
- }
+function ensureAny(value) {
+ if (value === null) return [0, 0];
+
+ switch (value.constructor) {
+ case String:
+ return [ensureString(value), lengthBytesUTF8(value)];
+ case ArrayBuffer:
+ return [ensureInt8(new Uint8Array(value)), value.byteLength];
+ case BigInt:
+ if (value < 0) throw new Error('expecting unsigned BigInt value');
+ var temp = [];
+ while (value != 0) {
+ temp.push(Number(value & 255n));
+ value >>= 8n;
+ }
+ return [ensureInt8(temp), temp.length];
+ case Uint8Array:
+ case Buffer:
+ return [ensureInt8(value), value.length];
+ default:
+ throw new Error(unsupported(value));
+ }
}
-(function() {
- function setupConsts() {
- var i = 0;
- Module['BLST_SUCCESS'] = i++;
- Module['BLST_BAD_ENCODING'] = i++;
- Module['BLST_POINT_NOT_ON_CURVE'] = i++;
- Module['BLST_POINT_NOT_IN_GROUP'] = i++;
- Module['BLST_AGGR_TYPE_MISMATCH'] = i++;
- Module['BLST_VERIFY_FAIL'] = i++;
- Module['BLST_PK_IS_INFINITY'] = i++;
- Module['BLST_BAD_SCALAR'] = i++;
- Module['BLS12_381_G1'] = wrapPointer(_const_G1(), P1_Affine);
- Module['BLS12_381_G2'] = wrapPointer(_const_G2(), P2_Affine);
- Module['BLS12_381_NEG_G1'] = wrapPointer(_const_NEG_G1(), P1_Affine);
- Module['BLS12_381_NEG_G2'] = wrapPointer(_const_NEG_G2(), P2_Affine);
- }
- if (runtimeInitialized) setupConsts();
- else addOnInit(setupConsts);
+(function () {
+ function setupConsts() {
+ var i = 0;
+ Module['BLST_SUCCESS'] = i++;
+ Module['BLST_BAD_ENCODING'] = i++;
+ Module['BLST_POINT_NOT_ON_CURVE'] = i++;
+ Module['BLST_POINT_NOT_IN_GROUP'] = i++;
+ Module['BLST_AGGR_TYPE_MISMATCH'] = i++;
+ Module['BLST_VERIFY_FAIL'] = i++;
+ Module['BLST_PK_IS_INFINITY'] = i++;
+ Module['BLST_BAD_SCALAR'] = i++;
+ Module['BLS12_381_G1'] = wrapPointer(_const_G1(), P1_Affine);
+ Module['BLS12_381_G2'] = wrapPointer(_const_G2(), P2_Affine);
+ Module['BLS12_381_NEG_G1'] = wrapPointer(_const_NEG_G1(), P1_Affine);
+ Module['BLS12_381_NEG_G2'] = wrapPointer(_const_NEG_G2(), P2_Affine);
+ }
+ if (runtimeInitialized) setupConsts();
+ else addOnInit(setupConsts);
})();
/** @this{Object} */
-function SecretKey()
-{ this.ptr = _SecretKey_0();
- getCache(SecretKey)[this.ptr] = this;
+function SecretKey() {
+ this.ptr = _SecretKey_0();
+ getCache(SecretKey)[this.ptr] = this;
}
SecretKey.prototype = Object.create(WrapperObject.prototype);
SecretKey.prototype.constructor = SecretKey;
SecretKey.prototype.__class__ = SecretKey;
SecretKey.__cache__ = {};
Module['SecretKey'] = SecretKey;
-SecretKey.prototype['__destroy__'] = SecretKey.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _SecretKey__destroy__0(this.ptr); this.ptr = 0; };;
-
-SecretKey.prototype['keygen'] = SecretKey.prototype.keygen = /** @this{Object} */
-function(IKM, info)
-{ ensureCache.prepare();
+SecretKey.prototype['__destroy__'] = SecretKey.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _SecretKey__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+SecretKey.prototype['keygen'] = SecretKey.prototype.keygen =
+ /** @this{Object} */
+ function (IKM, info) {
+ ensureCache.prepare();
const [_IKM, IKM_len] = ensureAny(IKM);
- if (IKM_len < 32)
- throw new Error("BLST_ERROR: bad scalar");
+ if (IKM_len < 32) throw new Error('BLST_ERROR: bad scalar');
info = ensureString(info);
_SecretKey_keygen_3(this.ptr, _IKM, IKM_len, info);
HEAP8.fill(0, _IKM, _IKM + IKM_len);
-};;
+ };
-SecretKey.prototype['derive_master_eip2333'] = SecretKey.prototype.derive_master_eip2333 = /** @this{Object} */
-function(IKM)
-{ ensureCache.prepare();
+SecretKey.prototype['derive_master_eip2333'] = SecretKey.prototype.derive_master_eip2333 =
+ /** @this{Object} */
+ function (IKM) {
+ ensureCache.prepare();
const [_IKM, IKM_len] = ensureAny(IKM);
- if (IKM_len < 32)
- throw new Error("BLST_ERROR: bad scalar");
+ if (IKM_len < 32) throw new Error('BLST_ERROR: bad scalar');
_SecretKey_derive_master_eip2333_2(this.ptr, _IKM, IKM_len);
HEAP8.fill(0, _IKM, _IKM + IKM_len);
-};;
+ };
-SecretKey.prototype['derive_child_eip2333'] = SecretKey.prototype.derive_child_eip2333 = /** @this{Object} */
-function(sk, child_index)
-{ if (!(sk instanceof SecretKey))
- throw new Error(unsupported(sk));
+SecretKey.prototype['derive_child_eip2333'] = SecretKey.prototype.derive_child_eip2333 =
+ /** @this{Object} */
+ function (sk, child_index) {
+ if (!(sk instanceof SecretKey)) throw new Error(unsupported(sk));
_SecretKey_derive_child_eip2333_2(this.ptr, sk.ptr, child_index);
-};;
+ };
-SecretKey.prototype['from_bendian'] = SecretKey.prototype.from_bendian = /** @this{Object} */
-function(sk)
-{ if (!(sk instanceof Uint8Array) || sk.length != 32)
- throw new Error(unsupported(sk));
+SecretKey.prototype['from_bendian'] = SecretKey.prototype.from_bendian =
+ /** @this{Object} */
+ function (sk) {
+ if (!(sk instanceof Uint8Array) || sk.length != 32) throw new Error(unsupported(sk));
ensureCache.prepare();
sk = ensureInt8(sk);
_SecretKey_from_bendian_1(this.ptr, sk);
HEAP8.fill(0, sk, sk + 32);
-};;
+ };
-SecretKey.prototype['from_lendian'] = SecretKey.prototype.from_lendian = /** @this{Object} */
-function(sk)
-{ if (!(sk instanceof Uint8Array) || sk.length != 32)
- throw new Error(unsupported(sk));
+SecretKey.prototype['from_lendian'] = SecretKey.prototype.from_lendian =
+ /** @this{Object} */
+ function (sk) {
+ if (!(sk instanceof Uint8Array) || sk.length != 32) throw new Error(unsupported(sk));
ensureCache.prepare();
sk = ensureInt8(sk);
_SecretKey_from_lendian_1(this.ptr, sk);
HEAP8.fill(0, sk, sk + 32);
-};;
+ };
-SecretKey.prototype['to_bendian'] = SecretKey.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _SecretKey_to_bendian_0(this.ptr);
+SecretKey.prototype['to_bendian'] = SecretKey.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _SecretKey_to_bendian_0(this.ptr);
var ret = new Uint8Array(HEAPU8.subarray(out, out + 32));
HEAP8.fill(0, out, out + 32);
return ret;
-};;
+ };
-SecretKey.prototype['to_lendian'] = SecretKey.prototype.to_lendian = /** @this{Object} */
-function()
-{ var out = _SecretKey_to_lendian_0(this.ptr);
+SecretKey.prototype['to_lendian'] = SecretKey.prototype.to_lendian =
+ /** @this{Object} */
+ function () {
+ var out = _SecretKey_to_lendian_0(this.ptr);
var ret = new Uint8Array(HEAPU8.subarray(out, out + 32));
HEAP8.fill(0, out, out + 32);
return ret;
-};;
+ };
/** @this{Object} */
-function Scalar(scalar, DST)
-{ if (typeof scalar === 'undefined' || scalar === null) {
- this.ptr = _Scalar_0();
+function Scalar(scalar, DST) {
+ if (typeof scalar === 'undefined' || scalar === null) {
+ this.ptr = _Scalar_0();
+ } else {
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ if (typeof DST === 'string' || DST === null) {
+ DST = ensureString(DST);
+ this.ptr = _Scalar_3(_scalar, len, DST);
} else {
- ensureCache.prepare();
- const [ _scalar, len] = ensureAny(scalar);
- if (typeof DST === 'string' || DST === null) {
- DST = ensureString(DST);
- this.ptr = _Scalar_3(_scalar, len, DST);
- } else {
- this.ptr = _Scalar_2(_scalar, len*8);
- }
+ this.ptr = _Scalar_2(_scalar, len * 8);
}
- getCache(Scalar)[this.ptr] = this;
+ }
+ getCache(Scalar)[this.ptr] = this;
}
Scalar.prototype = Object.create(WrapperObject.prototype);
Scalar.prototype.constructor = Scalar;
Scalar.prototype.__class__ = Scalar;
Scalar.__cache__ = {};
Module['Scalar'] = Scalar;
-Scalar.prototype['__destroy__'] = Scalar.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _Scalar__destroy__0(this.ptr); this.ptr = 0; };;
-
-Scalar.prototype['hash_to'] = Scalar.prototype.hash_to = /** @this{Object} */
-function(msg, DST)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['__destroy__'] = Scalar.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _Scalar__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+Scalar.prototype['hash_to'] = Scalar.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
_Scalar_hash_to_3(this.ptr, _msg, msg_len, DST);
return this;
-};;
+ };
-Scalar.prototype['dup'] = Scalar.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_Scalar_dup_0(this.ptr), Scalar); };;
+Scalar.prototype['dup'] = Scalar.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_Scalar_dup_0(this.ptr), Scalar);
+ };
-Scalar.prototype['from_bendian'] = Scalar.prototype.from_bendian = /** @this{Object} */
-function(msg)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['from_bendian'] = Scalar.prototype.from_bendian =
+ /** @this{Object} */
+ function (msg) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
_Scalar_from_bendian_2(this.ptr, _msg, msg_len);
return this;
-};;
+ };
-Scalar.prototype['from_lendian'] = Scalar.prototype.from_lendian = /** @this{Object} */
-function(msg)
-{ ensureCache.prepare();
- const [ _msg, msg_len] = ensureAny(msg);
+Scalar.prototype['from_lendian'] = Scalar.prototype.from_lendian =
+ /** @this{Object} */
+ function (msg) {
+ ensureCache.prepare();
+ const [_msg, msg_len] = ensureAny(msg);
_Scalar_from_lendian_2(this.ptr, _msg, msg_len);
return this;
-};;
+ };
-Scalar.prototype['to_bendian'] = Scalar.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _Scalar_to_bendian_0(this.ptr);
+Scalar.prototype['to_bendian'] = Scalar.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _Scalar_to_bendian_0(this.ptr);
return new Uint8Array(HEAPU8.subarray(out, out + 32));
-};;
+ };
-Scalar.prototype['to_lendian'] = Scalar.prototype.to_lendian = /** @this{Object} */
-function()
-{ var out = _Scalar_to_lendian_0(this.ptr);
+Scalar.prototype['to_lendian'] = Scalar.prototype.to_lendian =
+ /** @this{Object} */
+ function () {
+ var out = _Scalar_to_lendian_0(this.ptr);
return new Uint8Array(HEAPU8.subarray(out, out + 32));
-};;
+ };
-Scalar.prototype['add'] = Scalar.prototype.add = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar || a instanceof SecretKey))
- throw new Error(unsupported(a));
+Scalar.prototype['add'] = Scalar.prototype.add =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar || a instanceof SecretKey)) throw new Error(unsupported(a));
_Scalar_add_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['sub'] = Scalar.prototype.sub = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar))
- throw new Error(unsupported(a));
+Scalar.prototype['sub'] = Scalar.prototype.sub =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar)) throw new Error(unsupported(a));
_Scalar_sub_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['mul'] = Scalar.prototype.mul = /** @this{Object} */
-function(a)
-{ if (!(a instanceof Scalar))
- throw new Error(unsupported(a));
+Scalar.prototype['mul'] = Scalar.prototype.mul =
+ /** @this{Object} */
+ function (a) {
+ if (!(a instanceof Scalar)) throw new Error(unsupported(a));
_Scalar_mul_1(this.ptr, a.ptr);
return this;
-};;
+ };
-Scalar.prototype['inverse'] = Scalar.prototype.inverse = /** @this{Object} */
-function()
-{ _Scalar_inverse_0(this.ptr); return this; };;
+Scalar.prototype['inverse'] = Scalar.prototype.inverse =
+ /** @this{Object} */
+ function () {
+ _Scalar_inverse_0(this.ptr);
+ return this;
+ };
/** @this{Object} */
-function PT(p, q)
-{ if (typeof q === 'undefined' || q === null) {
- if (p instanceof P1_Affine)
- this.ptr = _PT_p_affine_1(p.ptr);
- else if (p instanceof P2_Affine)
- this.ptr = _PT_q_affine_1(p.ptr);
- else
- throw new Error(unsupported(p));
- } else if (p instanceof P1_Affine && q instanceof P2_Affine) {
- this.ptr = _PT_pq_affine_2(p.ptr, q.ptr);
- } else if (p instanceof P2_Affine && q instanceof P1_Affine) {
- this.ptr = _PT_pq_affine_2(q.ptr, p.ptr);
- } else if (p instanceof P1 && q instanceof P2) {
- this.ptr = _PT_pq_2(p.ptr, q.ptr);
- } else if (p instanceof P2 && q instanceof P1) {
- this.ptr = _PT_pq_2(q.ptr, p.ptr);
- } else {
- throw new Error(unsupported(p, q));
- }
- getCache(PT)[this.ptr] = this;
+function PT(p, q) {
+ if (typeof q === 'undefined' || q === null) {
+ if (p instanceof P1_Affine) this.ptr = _PT_p_affine_1(p.ptr);
+ else if (p instanceof P2_Affine) this.ptr = _PT_q_affine_1(p.ptr);
+ else throw new Error(unsupported(p));
+ } else if (p instanceof P1_Affine && q instanceof P2_Affine) {
+ this.ptr = _PT_pq_affine_2(p.ptr, q.ptr);
+ } else if (p instanceof P2_Affine && q instanceof P1_Affine) {
+ this.ptr = _PT_pq_affine_2(q.ptr, p.ptr);
+ } else if (p instanceof P1 && q instanceof P2) {
+ this.ptr = _PT_pq_2(p.ptr, q.ptr);
+ } else if (p instanceof P2 && q instanceof P1) {
+ this.ptr = _PT_pq_2(q.ptr, p.ptr);
+ } else {
+ throw new Error(unsupported(p, q));
+ }
+ getCache(PT)[this.ptr] = this;
}
PT.prototype = Object.create(WrapperObject.prototype);
PT.prototype.constructor = PT;
PT.prototype.__class__ = PT;
PT.__cache__ = {};
Module['PT'] = PT;
-PT.prototype['__destroy__'] = PT.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _PT__destroy__0(this.ptr); this.ptr = 0; };;
-
-PT.prototype['dup'] = PT.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_PT_dup_0(this.ptr), PT); };;
-
-PT.prototype['is_one'] = PT.prototype.is_one = /** @this{Object} */
-function()
-{ return !!(_PT_is_one_0(this.ptr)); };;
-
-PT.prototype['is_equal'] = PT.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof PT)
- return !!(_PT_is_equal_1(this.ptr, p.ptr));
+PT.prototype['__destroy__'] = PT.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _PT__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+PT.prototype['dup'] = PT.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_PT_dup_0(this.ptr), PT);
+ };
+
+PT.prototype['is_one'] = PT.prototype.is_one =
+ /** @this{Object} */
+ function () {
+ return !!_PT_is_one_0(this.ptr);
+ };
+
+PT.prototype['is_equal'] = PT.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof PT) return !!_PT_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-PT.prototype['sqr'] = PT.prototype.sqr = /** @this{Object} */
-function()
-{ _PT_sqr_0(this.ptr); return this; };;
-
-PT.prototype['mul'] = PT.prototype.mul = /** @this{Object} */
-function(p)
-{ if (p instanceof PT)
- _PT_mul_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
- return this;
-};;
-
-PT.prototype['final_exp'] = PT.prototype.final_exp = /** @this{Object} */
-function()
-{ _PT_final_exp_0(this.ptr); return this; };;
+ };
-PT.prototype['in_group'] = PT.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_PT_in_group_0(this.ptr)); };;
-
-PT.prototype['to_bendian'] = PT.prototype.to_bendian = /** @this{Object} */
-function()
-{ var out = _PT_to_bendian_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*12));
-};;
+PT.prototype['sqr'] = PT.prototype.sqr =
+ /** @this{Object} */
+ function () {
+ _PT_sqr_0(this.ptr);
+ return this;
+ };
-PT['finalverify'] = PT.finalverify =
-function(gt1, gt2)
-{ if (gt1 instanceof PT && gt2 instanceof PT)
- return !!(_PT_finalverify_2(gt1.ptr, gt2.ptr));
- throw new Error(unsupported(gt1, gt2));
-};;
+PT.prototype['mul'] = PT.prototype.mul =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof PT) _PT_mul_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ return this;
+ };
-PT['one'] = PT.one =
-function()
-{ return wrapPointer(_PT_one_0(), PT); };;
+PT.prototype['final_exp'] = PT.prototype.final_exp =
+ /** @this{Object} */
+ function () {
+ _PT_final_exp_0(this.ptr);
+ return this;
+ };
+
+PT.prototype['in_group'] = PT.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_PT_in_group_0(this.ptr);
+ };
+
+PT.prototype['to_bendian'] = PT.prototype.to_bendian =
+ /** @this{Object} */
+ function () {
+ var out = _PT_to_bendian_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 12));
+ };
+
+PT['finalverify'] = PT.finalverify = function (gt1, gt2) {
+ if (gt1 instanceof PT && gt2 instanceof PT) return !!_PT_finalverify_2(gt1.ptr, gt2.ptr);
+ throw new Error(unsupported(gt1, gt2));
+};
+
+PT['one'] = PT.one = function () {
+ return wrapPointer(_PT_one_0(), PT);
+};
/** @this{Object} */
-function Pairing(hash_or_encode, DST)
-{ ensureCache.prepare();
- DST = ensureString(DST);
- this.ptr = _Pairing_2(!!hash_or_encode, DST);
- getCache(SecretKey)[this.ptr] = this;
+function Pairing(hash_or_encode, DST) {
+ ensureCache.prepare();
+ DST = ensureString(DST);
+ this.ptr = _Pairing_2(!!hash_or_encode, DST);
+ getCache(SecretKey)[this.ptr] = this;
}
Pairing.prototype = Object.create(WrapperObject.prototype);
Pairing.prototype.constructor = Pairing;
Pairing.prototype.__class__ = Pairing;
Pairing.__cache__ = {};
Module['Pairing'] = Pairing;
-Pairing.prototype['__destroy__'] = Pairing.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _Pairing__destroy__0(this.ptr); this.ptr = 0; };;
-
-Pairing.prototype['aggregate'] = Pairing.prototype.aggregate = /** @this{Object} */
-function(pk, sig, msg, aug)
-{ ensureCache.prepare();
+Pairing.prototype['__destroy__'] = Pairing.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _Pairing__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+Pairing.prototype['aggregate'] = Pairing.prototype.aggregate =
+ /** @this{Object} */
+ function (pk, sig, msg, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
const [_aug, aug_len] = ensureAny(aug);
if (pk instanceof P1_Affine && sig instanceof P2_Affine)
- return _Pairing_aggregate_pk_in_g1_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
+ return _Pairing_aggregate_pk_in_g1_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
else if (pk instanceof P2_Affine && sig instanceof P1_Affine)
- return _Pairing_aggregate_pk_in_g2_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
- else
- throw new Error(unsupported(pk, sig));
+ return _Pairing_aggregate_pk_in_g2_6(this.ptr, pk.ptr, sig.ptr, _msg, msg_len, _aug, aug_len);
+ else throw new Error(unsupported(pk, sig));
return -1;
-};;
+ };
-Pairing.prototype['mul_n_aggregate'] = Pairing.prototype.mul_n_aggregate = /** @this{Object} */
-function(pk, sig, scalar, msg, aug)
-{ if (typeof scalar === 'undefined' || scalar === null)
- throw new Error("missing |scalar| argument");
+Pairing.prototype['mul_n_aggregate'] = Pairing.prototype.mul_n_aggregate =
+ /** @this{Object} */
+ function (pk, sig, scalar, msg, aug) {
+ if (typeof scalar === 'undefined' || scalar === null)
+ throw new Error('missing |scalar| argument');
ensureCache.prepare();
const [_scalar, len] = ensureAny(scalar);
const [_msg, msg_len] = ensureAny(msg);
const [_aug, aug_len] = ensureAny(aug);
if (pk instanceof P1_Affine && sig instanceof P2_Affine)
- return _Pairing_mul_n_aggregate_pk_in_g1_8(this.ptr, pk.ptr, sig.ptr, _scalar, len*8, _msg, msg_len, _aug, aug_len);
+ return _Pairing_mul_n_aggregate_pk_in_g1_8(
+ this.ptr,
+ pk.ptr,
+ sig.ptr,
+ _scalar,
+ len * 8,
+ _msg,
+ msg_len,
+ _aug,
+ aug_len,
+ );
else if (pk instanceof P2_Affine && sig instanceof P1_Affine)
- return _Pairing_mul_n_aggregate_pk_in_g2_8(this.ptr, pk.ptr, sig.ptr, _scalar, len*8, _msg, msg_len, _aug, aug_len);
- else
- throw new Error(unsupported(pk, sig));
+ return _Pairing_mul_n_aggregate_pk_in_g2_8(
+ this.ptr,
+ pk.ptr,
+ sig.ptr,
+ _scalar,
+ len * 8,
+ _msg,
+ msg_len,
+ _aug,
+ aug_len,
+ );
+ else throw new Error(unsupported(pk, sig));
return -1;
-};;
-
-Pairing.prototype['commit'] = Pairing.prototype.commit = /** @this{Object} */
-function()
-{ _Pairing_commit_0(this.ptr); };;
-
-Pairing.prototype['asArrayBuffer'] = Pairing.prototype.asArrayBuffer = /** @this{Object} */
-function()
-{ return HEAP8.buffer.slice(this.ptr, this.ptr + _Pairing_sizeof_0()); };;
-
-Pairing.prototype['merge'] = Pairing.prototype.merge = /** @this{Object} */
-function(ctx)
-{ if (ctx instanceof Pairing)
- return _Pairing_merge_1(this.ptr, ctx.ptr);
+ };
+
+Pairing.prototype['commit'] = Pairing.prototype.commit =
+ /** @this{Object} */
+ function () {
+ _Pairing_commit_0(this.ptr);
+ };
+
+Pairing.prototype['asArrayBuffer'] = Pairing.prototype.asArrayBuffer =
+ /** @this{Object} */
+ function () {
+ return HEAP8.buffer.slice(this.ptr, this.ptr + _Pairing_sizeof_0());
+ };
+
+Pairing.prototype['merge'] = Pairing.prototype.merge =
+ /** @this{Object} */
+ function (ctx) {
+ if (ctx instanceof Pairing) return _Pairing_merge_1(this.ptr, ctx.ptr);
else if (ctx instanceof ArrayBuffer && ctx.byteLength == _Pairing_sizeof_0())
- return _Pairing_merge_1(this.ptr, ensureAny(ctx)[0]);
+ return _Pairing_merge_1(this.ptr, ensureAny(ctx)[0]);
throw new Error(unsupported(ctx));
-};;
-
-Pairing.prototype['finalverify'] = Pairing.prototype.finalverify = /** @this{Object} */
-function(sig)
-{ if (typeof sig === 'undefined' || sig === null)
- return !!(_Pairing_finalverify_1(this.ptr, 0));
- else if (sig instanceof PT)
- return !!(_Pairing_finalverify_1(this.ptr, sig.ptr));
- else
- throw new Error(unsupported(sig));
-};;
-
-Pairing.prototype['raw_aggregate'] = Pairing.prototype.raw_aggregate = /** @this{Object} */
-function(q, p)
-{ if (q instanceof P2_Affine && p instanceof P1_Affine)
- _Pairing_raw_aggregate_2(this.ptr, q.ptr, p.ptr);
- else
- throw new Error(unsupported(q, p));
-};;
-
-Pairing.prototype['as_fp12'] = Pairing.prototype.as_fp12 = /** @this{Object} */
-function()
-{ return wrapPointer(_Pairing_as_fp12_0(this.ptr), PT); };;
-
+ };
+
+Pairing.prototype['finalverify'] = Pairing.prototype.finalverify =
+ /** @this{Object} */
+ function (sig) {
+ if (typeof sig === 'undefined' || sig === null) return !!_Pairing_finalverify_1(this.ptr, 0);
+ else if (sig instanceof PT) return !!_Pairing_finalverify_1(this.ptr, sig.ptr);
+ else throw new Error(unsupported(sig));
+ };
+
+Pairing.prototype['raw_aggregate'] = Pairing.prototype.raw_aggregate =
+ /** @this{Object} */
+ function (q, p) {
+ if (q instanceof P2_Affine && p instanceof P1_Affine)
+ _Pairing_raw_aggregate_2(this.ptr, q.ptr, p.ptr);
+ else throw new Error(unsupported(q, p));
+ };
+
+Pairing.prototype['as_fp12'] = Pairing.prototype.as_fp12 =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_Pairing_as_fp12_0(this.ptr), PT);
+ };
/** @this{Object} */
-function P1_Affine(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P1_Affine_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P1_Affine_2(ensureInt8(input), input.length);
- else if (input instanceof P1)
- this.ptr = _P1_Affine_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P1_Affine)[this.ptr] = this;
+function P1_Affine(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P1_Affine_0();
+ else if (input instanceof Uint8Array) this.ptr = _P1_Affine_2(ensureInt8(input), input.length);
+ else if (input instanceof P1) this.ptr = _P1_Affine_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P1_Affine)[this.ptr] = this;
}
P1_Affine.prototype = Object.create(WrapperObject.prototype);
P1_Affine.prototype.constructor = P1_Affine;
P1_Affine.prototype.__class__ = P1_Affine;
P1_Affine.__cache__ = {};
Module['P1_Affine'] = P1_Affine;
-P1_Affine.prototype['__destroy__'] = P1_Affine.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P1_Affine__destroy__0(this.ptr); this.ptr = 0; };;
-
-P1_Affine.prototype['dup'] = P1_Affine.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_Affine_dup_0(this.ptr), P1_Affine); };;
-
-P1_Affine.prototype['to_jacobian'] = P1_Affine.prototype.to_jacobian = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_Affine_to_jacobian_0(this.ptr), P1); };;
-
-P1_Affine.prototype['serialize'] = P1_Affine.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P1_Affine_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*1));
-};;
-
-P1_Affine.prototype['compress'] = P1_Affine.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P1_Affine_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*1));
-};;
-
-P1_Affine.prototype['on_curve'] = P1_Affine.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_on_curve_0(this.ptr)); };;
-
-P1_Affine.prototype['in_group'] = P1_Affine.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_in_group_0(this.ptr)); };;
-
-P1_Affine.prototype['is_inf'] = P1_Affine.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P1_Affine_is_inf_0(this.ptr)); };;
-
-P1_Affine.prototype['is_equal'] = P1_Affine.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P1_Affine)
- return !!(_P1_Affine_is_equal_1(this.ptr, p.ptr));
+P1_Affine.prototype['__destroy__'] = P1_Affine.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P1_Affine__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P1_Affine.prototype['dup'] = P1_Affine.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_Affine_dup_0(this.ptr), P1_Affine);
+ };
+
+P1_Affine.prototype['to_jacobian'] = P1_Affine.prototype.to_jacobian =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_Affine_to_jacobian_0(this.ptr), P1);
+ };
+
+P1_Affine.prototype['serialize'] = P1_Affine.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P1_Affine_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 1));
+ };
+
+P1_Affine.prototype['compress'] = P1_Affine.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P1_Affine_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 1));
+ };
+
+P1_Affine.prototype['on_curve'] = P1_Affine.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_on_curve_0(this.ptr);
+ };
+
+P1_Affine.prototype['in_group'] = P1_Affine.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_in_group_0(this.ptr);
+ };
+
+P1_Affine.prototype['is_inf'] = P1_Affine.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P1_Affine_is_inf_0(this.ptr);
+ };
+
+P1_Affine.prototype['is_equal'] = P1_Affine.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1_Affine) return !!_P1_Affine_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
+ };
-P1_Affine.prototype['core_verify'] = P1_Affine.prototype.core_verify = /** @this{Object} */
-function(pk, hash_or_encode, msg, DST, aug)
-{ if (!(pk instanceof P2_Affine))
- throw new Error(unsupported(pk));
+P1_Affine.prototype['core_verify'] = P1_Affine.prototype.core_verify =
+ /** @this{Object} */
+ function (pk, hash_or_encode, msg, DST, aug) {
+ if (!(pk instanceof P2_Affine)) throw new Error(unsupported(pk));
ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
- return _P1_Affine_core_verify_7(this.ptr, pk.ptr, !!hash_or_encode, _msg, msg_len, DST, _aug, aug_len);
-};;
-
-P1_Affine['generator'] = P1_Affine.generator =
-function()
-{ return wrapPointer(_P1_Affine_generator_0(), P1_Affine); };;
+ return _P1_Affine_core_verify_7(
+ this.ptr,
+ pk.ptr,
+ !!hash_or_encode,
+ _msg,
+ msg_len,
+ DST,
+ _aug,
+ aug_len,
+ );
+ };
+
+P1_Affine['generator'] = P1_Affine.generator = function () {
+ return wrapPointer(_P1_Affine_generator_0(), P1_Affine);
+};
/** @this{Object} */
-function P1(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P1_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P1_2(ensureInt8(input), input.length);
- else if (input instanceof P1_Affine)
- this.ptr = _P1_affine_1(input.ptr);
- else if (input instanceof SecretKey)
- this.ptr = _P1_secretkey_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P1)[this.ptr] = this;
+function P1(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P1_0();
+ else if (input instanceof Uint8Array) this.ptr = _P1_2(ensureInt8(input), input.length);
+ else if (input instanceof P1_Affine) this.ptr = _P1_affine_1(input.ptr);
+ else if (input instanceof SecretKey) this.ptr = _P1_secretkey_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P1)[this.ptr] = this;
}
P1.prototype = Object.create(WrapperObject.prototype);
P1.prototype.constructor = P1;
P1.prototype.__class__ = P1;
P1.__cache__ = {};
Module['P1'] = P1;
-P1.prototype['__destroy__'] = P1.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P1__destroy__0(this.ptr); this.ptr = 0; };;
-
-P1.prototype['dup'] = P1.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_dup_0(this.ptr), P1); };;
-
-P1.prototype['to_affine'] = P1.prototype.to_affine = /** @this{Object} */
-function()
-{ return wrapPointer(_P1_to_affine_0(this.ptr), P1_Affine); };;
-
-P1.prototype['serialize'] = P1.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P1_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*1));
-};;
-
-P1.prototype['compress'] = P1.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P1_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*1));
-};;
-
-P1.prototype['on_curve'] = P1.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P1_on_curve_0(this.ptr)); };;
-
-P1.prototype['in_group'] = P1.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P1_in_group_0(this.ptr)); };;
-
-P1.prototype['is_inf'] = P1.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P1_is_inf_0(this.ptr)); };;
-
-P1.prototype['is_equal'] = P1.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P1)
- return !!(_P1_is_equal_1(this.ptr, p.ptr));
+P1.prototype['__destroy__'] = P1.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P1__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P1.prototype['dup'] = P1.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_dup_0(this.ptr), P1);
+ };
+
+P1.prototype['to_affine'] = P1.prototype.to_affine =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P1_to_affine_0(this.ptr), P1_Affine);
+ };
+
+P1.prototype['serialize'] = P1.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P1_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 1));
+ };
+
+P1.prototype['compress'] = P1.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P1_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 1));
+ };
+
+P1.prototype['on_curve'] = P1.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P1_on_curve_0(this.ptr);
+ };
+
+P1.prototype['in_group'] = P1.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P1_in_group_0(this.ptr);
+ };
+
+P1.prototype['is_inf'] = P1.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P1_is_inf_0(this.ptr);
+ };
+
+P1.prototype['is_equal'] = P1.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1) return !!_P1_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-P1.prototype['aggregate'] = P1.prototype.aggregate = /** @this{Object} */
-function(p)
-{ if (p instanceof P1_Affine)
- _P1_aggregate_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
-};;
-
-P1.prototype['sign_with'] = P1.prototype.sign_with = /** @this{Object} */
-function(sk)
-{ if (sk instanceof SecretKey)
- _P1_sign_with_1(this.ptr, sk.ptr);
- else
- throw new Error(unsupported(sk));
+ };
+
+P1.prototype['aggregate'] = P1.prototype.aggregate =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1_Affine) _P1_aggregate_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ };
+
+P1.prototype['sign_with'] = P1.prototype.sign_with =
+ /** @this{Object} */
+ function (sk) {
+ if (sk instanceof SecretKey) _P1_sign_with_1(this.ptr, sk.ptr);
+ else throw new Error(unsupported(sk));
return this;
-};;
+ };
-P1.prototype['hash_to'] = P1.prototype.hash_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P1.prototype['hash_to'] = P1.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P1_hash_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P1.prototype['encode_to'] = P1.prototype.encode_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P1.prototype['encode_to'] = P1.prototype.encode_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P1_encode_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P1.prototype['mult'] = P1.prototype.mult = /** @this{Object} */
-function(scalar)
-{ if (scalar instanceof Scalar) {
- _P1_mult_1(this.ptr, scalar.ptr);
+P1.prototype['mult'] = P1.prototype.mult =
+ /** @this{Object} */
+ function (scalar) {
+ if (scalar instanceof Scalar) {
+ _P1_mult_1(this.ptr, scalar.ptr);
} else if (typeof scalar !== 'string') {
- ensureCache.prepare();
- const [_scalar, len] = ensureAny(scalar);
- _P1_mult_2(this.ptr, _scalar, len*8);
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ _P1_mult_2(this.ptr, _scalar, len * 8);
} else {
- throw new Error(unsupported(scalar));
+ throw new Error(unsupported(scalar));
}
return this;
-};;
-
-P1.prototype['cneg'] = P1.prototype.cneg = /** @this{Object} */
-function(flag)
-{ _P1_cneg_1(this.ptr, !!flag); return this; };;
-P1.prototype['neg'] = P1.prototype.neg = /** @this{Object} */
-function()
-{ _P1_cneg_1(this.ptr, true); return this; };;
-
-P1.prototype['add'] = P1.prototype.add = /** @this{Object} */
-function(p)
-{ if (p instanceof P1)
- _P1_add_1(this.ptr, p.ptr);
- else if (p instanceof P1_Affine)
- _P1_add_affine_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
- return this;
-};;
+ };
-P1.prototype['dbl'] = P1.prototype.dbl = /** @this{Object} */
-function()
-{ _P1_dbl_0(this.ptr); return this; };;
+P1.prototype['cneg'] = P1.prototype.cneg =
+ /** @this{Object} */
+ function (flag) {
+ _P1_cneg_1(this.ptr, !!flag);
+ return this;
+ };
+P1.prototype['neg'] = P1.prototype.neg =
+ /** @this{Object} */
+ function () {
+ _P1_cneg_1(this.ptr, true);
+ return this;
+ };
+
+P1.prototype['add'] = P1.prototype.add =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P1) _P1_add_1(this.ptr, p.ptr);
+ else if (p instanceof P1_Affine) _P1_add_affine_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ return this;
+ };
-Module['G1'] = P1['generator'] = P1.generator =
-function()
-{ return wrapPointer(_P1_generator_0(), P1); };;
+P1.prototype['dbl'] = P1.prototype.dbl =
+ /** @this{Object} */
+ function () {
+ _P1_dbl_0(this.ptr);
+ return this;
+ };
+Module['G1'] =
+ P1['generator'] =
+ P1.generator =
+ function () {
+ return wrapPointer(_P1_generator_0(), P1);
+ };
/** @this{Object} */
-function P2_Affine(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P2_Affine_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P2_Affine_2(ensureInt8(input), input.length);
- else if (input instanceof P2)
- this.ptr = _P2_Affine_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P2_Affine)[this.ptr] = this;
+function P2_Affine(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P2_Affine_0();
+ else if (input instanceof Uint8Array) this.ptr = _P2_Affine_2(ensureInt8(input), input.length);
+ else if (input instanceof P2) this.ptr = _P2_Affine_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P2_Affine)[this.ptr] = this;
}
P2_Affine.prototype = Object.create(WrapperObject.prototype);
P2_Affine.prototype.constructor = P2_Affine;
P2_Affine.prototype.__class__ = P2_Affine;
P2_Affine.__cache__ = {};
Module['P2_Affine'] = P2_Affine;
-P2_Affine.prototype['__destroy__'] = P2_Affine.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P2_Affine__destroy__0(this.ptr); this.ptr = 0; };;
-
-P2_Affine.prototype['dup'] = P2_Affine.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_Affine_dup_0(this.ptr), P2_Affine); };;
-
-P2_Affine.prototype['to_jacobian'] = P2_Affine.prototype.to_jacobian = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_Affine_to_jacobian_0(this.ptr), P2); };;
-
-P2_Affine.prototype['serialize'] = P2_Affine.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P2_Affine_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*2));
-};;
-
-P2_Affine.prototype['compress'] = P2_Affine.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P2_Affine_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*2));
-};;
-
-P2_Affine.prototype['on_curve'] = P2_Affine.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_on_curve_0(this.ptr)); };;
-
-P2_Affine.prototype['in_group'] = P2_Affine.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_in_group_0(this.ptr)); };;
-
-P2_Affine.prototype['is_inf'] = P2_Affine.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P2_Affine_is_inf_0(this.ptr)); };;
-
-P2_Affine.prototype['is_equal'] = P2_Affine.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P2_Affine)
- return !!(_P2_Affine_is_equal_1(this.ptr, p.ptr));
+P2_Affine.prototype['__destroy__'] = P2_Affine.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P2_Affine__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P2_Affine.prototype['dup'] = P2_Affine.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_Affine_dup_0(this.ptr), P2_Affine);
+ };
+
+P2_Affine.prototype['to_jacobian'] = P2_Affine.prototype.to_jacobian =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_Affine_to_jacobian_0(this.ptr), P2);
+ };
+
+P2_Affine.prototype['serialize'] = P2_Affine.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P2_Affine_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 2));
+ };
+
+P2_Affine.prototype['compress'] = P2_Affine.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P2_Affine_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 2));
+ };
+
+P2_Affine.prototype['on_curve'] = P2_Affine.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_on_curve_0(this.ptr);
+ };
+
+P2_Affine.prototype['in_group'] = P2_Affine.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_in_group_0(this.ptr);
+ };
+
+P2_Affine.prototype['is_inf'] = P2_Affine.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P2_Affine_is_inf_0(this.ptr);
+ };
+
+P2_Affine.prototype['is_equal'] = P2_Affine.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2_Affine) return !!_P2_Affine_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
+ };
-P2_Affine.prototype['core_verify'] = P2_Affine.prototype.core_verify = /** @this{Object} */
-function(pk, hash_or_encode, msg, DST, aug)
-{ if (!(pk instanceof P1_Affine))
- throw new Error(unsupported(pk));
+P2_Affine.prototype['core_verify'] = P2_Affine.prototype.core_verify =
+ /** @this{Object} */
+ function (pk, hash_or_encode, msg, DST, aug) {
+ if (!(pk instanceof P1_Affine)) throw new Error(unsupported(pk));
ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
- return _P2_Affine_core_verify_7(this.ptr, pk.ptr, !!hash_or_encode, _msg, msg_len, DST, _aug, aug_len);
-};;
-
-P2_Affine['generator'] = P2_Affine.generator =
-function()
-{ return wrapPointer(_P2_Affine_generator_0(), P2_Affine); };;
+ return _P2_Affine_core_verify_7(
+ this.ptr,
+ pk.ptr,
+ !!hash_or_encode,
+ _msg,
+ msg_len,
+ DST,
+ _aug,
+ aug_len,
+ );
+ };
+
+P2_Affine['generator'] = P2_Affine.generator = function () {
+ return wrapPointer(_P2_Affine_generator_0(), P2_Affine);
+};
/** @this{Object} */
-function P2(input)
-{ ensureCache.prepare();
- if (typeof input === 'undefined' || input === null)
- this.ptr = _P2_0();
- else if (input instanceof Uint8Array)
- this.ptr = _P2_2(ensureInt8(input), input.length);
- else if (input instanceof P2_Affine)
- this.ptr = _P2_affine_1(input.ptr);
- else if (input instanceof SecretKey)
- this.ptr = _P2_secretkey_1(input.ptr);
- else
- throw new Error(unsupported(input));
- getCache(P2)[this.ptr] = this;
+function P2(input) {
+ ensureCache.prepare();
+ if (typeof input === 'undefined' || input === null) this.ptr = _P2_0();
+ else if (input instanceof Uint8Array) this.ptr = _P2_2(ensureInt8(input), input.length);
+ else if (input instanceof P2_Affine) this.ptr = _P2_affine_1(input.ptr);
+ else if (input instanceof SecretKey) this.ptr = _P2_secretkey_1(input.ptr);
+ else throw new Error(unsupported(input));
+ getCache(P2)[this.ptr] = this;
}
P2.prototype = Object.create(WrapperObject.prototype);
P2.prototype.constructor = P2;
P2.prototype.__class__ = P2;
P2.__cache__ = {};
Module['P2'] = P2;
-P2.prototype['__destroy__'] = P2.prototype.__destroy__ = /** @this{Object} */
-function()
-{ _P2__destroy__0(this.ptr); this.ptr = 0; };;
-
-P2.prototype['dup'] = P2.prototype.dup = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_dup_0(this.ptr), P2); };;
-
-P2.prototype['to_affine'] = P2.prototype.to_affine = /** @this{Object} */
-function()
-{ return wrapPointer(_P2_to_affine_0(this.ptr), P2_Affine); };;
-
-P2.prototype['serialize'] = P2.prototype.serialize = /** @this{Object} */
-function()
-{ var out = _P2_serialize_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 96*2));
-};;
-
-P2.prototype['compress'] = P2.prototype.compress = /** @this{Object} */
-function()
-{ var out = _P2_compress_0(this.ptr);
- return new Uint8Array(HEAPU8.subarray(out, out + 48*2));
-};;
-
-P2.prototype['on_curve'] = P2.prototype.on_curve = /** @this{Object} */
-function()
-{ return !!(_P2_on_curve_0(this.ptr)); };;
-
-P2.prototype['in_group'] = P2.prototype.in_group = /** @this{Object} */
-function()
-{ return !!(_P2_in_group_0(this.ptr)); };;
-
-P2.prototype['is_inf'] = P2.prototype.is_inf = /** @this{Object} */
-function()
-{ return !!(_P2_is_inf_0(this.ptr)); };;
-
-P2.prototype['is_equal'] = P2.prototype.is_equal = /** @this{Object} */
-function(p)
-{ if (p instanceof P2)
- return !!(_P2_is_equal_1(this.ptr, p.ptr));
+P2.prototype['__destroy__'] = P2.prototype.__destroy__ =
+ /** @this{Object} */
+ function () {
+ _P2__destroy__0(this.ptr);
+ this.ptr = 0;
+ };
+
+P2.prototype['dup'] = P2.prototype.dup =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_dup_0(this.ptr), P2);
+ };
+
+P2.prototype['to_affine'] = P2.prototype.to_affine =
+ /** @this{Object} */
+ function () {
+ return wrapPointer(_P2_to_affine_0(this.ptr), P2_Affine);
+ };
+
+P2.prototype['serialize'] = P2.prototype.serialize =
+ /** @this{Object} */
+ function () {
+ var out = _P2_serialize_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 96 * 2));
+ };
+
+P2.prototype['compress'] = P2.prototype.compress =
+ /** @this{Object} */
+ function () {
+ var out = _P2_compress_0(this.ptr);
+ return new Uint8Array(HEAPU8.subarray(out, out + 48 * 2));
+ };
+
+P2.prototype['on_curve'] = P2.prototype.on_curve =
+ /** @this{Object} */
+ function () {
+ return !!_P2_on_curve_0(this.ptr);
+ };
+
+P2.prototype['in_group'] = P2.prototype.in_group =
+ /** @this{Object} */
+ function () {
+ return !!_P2_in_group_0(this.ptr);
+ };
+
+P2.prototype['is_inf'] = P2.prototype.is_inf =
+ /** @this{Object} */
+ function () {
+ return !!_P2_is_inf_0(this.ptr);
+ };
+
+P2.prototype['is_equal'] = P2.prototype.is_equal =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2) return !!_P2_is_equal_1(this.ptr, p.ptr);
throw new Error(unsupported(p));
-};;
-
-P2.prototype['aggregate'] = P2.prototype.aggregate = /** @this{Object} */
-function(p)
-{ if (p instanceof P2_Affine)
- _P2_aggregate_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
-};;
-
-P2.prototype['sign_with'] = P2.prototype.sign_with = /** @this{Object} */
-function(sk)
-{ if (sk instanceof SecretKey)
- _P2_sign_with_1(this.ptr, sk.ptr);
- else
- throw new Error(unsupported(sk));
+ };
+
+P2.prototype['aggregate'] = P2.prototype.aggregate =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2_Affine) _P2_aggregate_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ };
+
+P2.prototype['sign_with'] = P2.prototype.sign_with =
+ /** @this{Object} */
+ function (sk) {
+ if (sk instanceof SecretKey) _P2_sign_with_1(this.ptr, sk.ptr);
+ else throw new Error(unsupported(sk));
return this;
-};;
+ };
-P2.prototype['hash_to'] = P2.prototype.hash_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P2.prototype['hash_to'] = P2.prototype.hash_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P2_hash_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P2.prototype['encode_to'] = P2.prototype.encode_to = /** @this{Object} */
-function(msg, DST, aug)
-{ ensureCache.prepare();
+P2.prototype['encode_to'] = P2.prototype.encode_to =
+ /** @this{Object} */
+ function (msg, DST, aug) {
+ ensureCache.prepare();
const [_msg, msg_len] = ensureAny(msg);
DST = ensureString(DST);
const [_aug, aug_len] = ensureAny(aug);
_P2_encode_to_5(this.ptr, _msg, msg_len, DST, _aug, aug_len);
return this;
-};;
+ };
-P2.prototype['mult'] = P2.prototype.mult = /** @this{Object} */
-function(scalar)
-{ if (scalar instanceof Scalar) {
- _P2_mult_1(this.ptr, scalar.ptr);
+P2.prototype['mult'] = P2.prototype.mult =
+ /** @this{Object} */
+ function (scalar) {
+ if (scalar instanceof Scalar) {
+ _P2_mult_1(this.ptr, scalar.ptr);
} else if (typeof scalar !== 'string') {
- ensureCache.prepare();
- const [_scalar, len] = ensureAny(scalar);
- _P2_mult_2(this.ptr, _scalar, len*8);
+ ensureCache.prepare();
+ const [_scalar, len] = ensureAny(scalar);
+ _P2_mult_2(this.ptr, _scalar, len * 8);
} else {
- throw new Error(unsupported(scalar));
+ throw new Error(unsupported(scalar));
}
return this;
-};;
-
-P2.prototype['cneg'] = P2.prototype.cneg = /** @this{Object} */
-function(flag)
-{ _P2_cneg_1(this.ptr, !!flag); return this; };;
-P2.prototype['neg'] = P2.prototype.neg = /** @this{Object} */
-function()
-{ _P2_cneg_1(this.ptr, true); return this; };;
-
-P2.prototype['add'] = P2.prototype.add = /** @this{Object} */
-function(p)
-{ if (p instanceof P2)
- _P2_add_1(this.ptr, p.ptr);
- else if (p instanceof P2_Affine)
- _P2_add_affine_1(this.ptr, p.ptr);
- else
- throw new Error(unsupported(p));
- return this;
-};;
+ };
-P2.prototype['dbl'] = P2.prototype.dbl = /** @this{Object} */
-function()
-{ _P2_dbl_0(this.ptr); return this; };;
-
-Module['G2'] = P2['generator'] = P2.generator =
-function()
-{ return wrapPointer(_P2_generator_0(), P2); };;
+P2.prototype['cneg'] = P2.prototype.cneg =
+ /** @this{Object} */
+ function (flag) {
+ _P2_cneg_1(this.ptr, !!flag);
+ return this;
+ };
+P2.prototype['neg'] = P2.prototype.neg =
+ /** @this{Object} */
+ function () {
+ _P2_cneg_1(this.ptr, true);
+ return this;
+ };
+
+P2.prototype['add'] = P2.prototype.add =
+ /** @this{Object} */
+ function (p) {
+ if (p instanceof P2) _P2_add_1(this.ptr, p.ptr);
+ else if (p instanceof P2_Affine) _P2_add_affine_1(this.ptr, p.ptr);
+ else throw new Error(unsupported(p));
+ return this;
+ };
+P2.prototype['dbl'] = P2.prototype.dbl =
+ /** @this{Object} */
+ function () {
+ _P2_dbl_0(this.ptr);
+ return this;
+ };
+
+Module['G2'] =
+ P2['generator'] =
+ P2.generator =
+ function () {
+ return wrapPointer(_P2_generator_0(), P2);
+ };
diff --git a/public/blst/null_bind.js b/public/blst/null_bind.js
index 5fd04d0..8a21fdc 100644
--- a/public/blst/null_bind.js
+++ b/public/blst/null_bind.js
@@ -1,9 +1,7 @@
-
// Bindings utilities
/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */
-function WrapperObject() {
-}
+function WrapperObject() {}
WrapperObject.prototype = Object.create(WrapperObject.prototype);
WrapperObject.prototype.constructor = WrapperObject;
WrapperObject.prototype.__class__ = WrapperObject;
@@ -25,7 +23,7 @@ function wrapPointer(ptr, __class__) {
if (ret) return ret;
ret = Object.create((__class__ || WrapperObject).prototype);
ret.ptr = ptr;
- return cache[ptr] = ret;
+ return (cache[ptr] = ret);
}
Module['wrapPointer'] = wrapPointer;
@@ -68,9 +66,9 @@ Module['getClass'] = getClass;
/** @suppress {duplicate} (TODO: avoid emitting this multiple times, it is redundant) */
var ensureCache = {
- buffer: 0, // the main buffer of temporary storage
- size: 0, // the size of buffer
- pos: 0, // the next free offset in buffer
+ buffer: 0, // the main buffer of temporary storage
+ size: 0, // the size of buffer
+ pos: 0, // the next free offset in buffer
temps: [], // extra allocations
needed: 0, // the total size we need next time
@@ -88,7 +86,8 @@ var ensureCache = {
// clean up
ensureCache.needed = 0;
}
- if (!ensureCache.buffer) { // happens first time, or when we need to grow
+ if (!ensureCache.buffer) {
+ // happens first time, or when we need to grow
ensureCache.size += 128; // heuristic, avoid many small grow events
ensureCache.buffer = Module['_webidl_malloc'](ensureCache.size);
assert(ensureCache.buffer);
@@ -186,7 +185,9 @@ function ensureFloat64(value) {
// Interface: VoidPtr
/** @suppress {undefinedVars, duplicate} @this{Object} */
-function VoidPtr() { throw "cannot construct a VoidPtr, no constructor in IDL" }
+function VoidPtr() {
+ throw 'cannot construct a VoidPtr, no constructor in IDL';
+}
VoidPtr.prototype = Object.create(WrapperObject.prototype);
VoidPtr.prototype.constructor = VoidPtr;
VoidPtr.prototype.__class__ = VoidPtr;
@@ -194,7 +195,7 @@ VoidPtr.__cache__ = {};
Module['VoidPtr'] = VoidPtr;
/** @suppress {undefinedVars, duplicate} @this{Object} */
-VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = function() {
+VoidPtr.prototype['__destroy__'] = VoidPtr.prototype.__destroy__ = function () {
var self = this.ptr;
_emscripten_bind_VoidPtr___destroy___0(self);
};
diff --git a/public/blst/runnable.js b/public/blst/runnable.js
index 8825006..8556043 100644
--- a/public/blst/runnable.js
+++ b/public/blst/runnable.js
@@ -1,15 +1,15 @@
'use strict';
-console.log("testing...");
+console.log('testing...');
-const blst = require("blst");
+const blst = require('blst');
-blst['onRuntimeInitialized'] = function() {
- var msg = "assertion"; // this what we're signing
- var DST = "MY-DST"; // domain separation tag
+blst['onRuntimeInitialized'] = function () {
+ var msg = 'assertion'; // this what we're signing
+ var DST = 'MY-DST'; // domain separation tag
var SK = new blst.SecretKey();
- SK.keygen("*".repeat(32));
+ SK.keygen('*'.repeat(32));
////////////////////////////////////////////////////////////////////////
// generate public key and signature
@@ -18,23 +18,21 @@ blst['onRuntimeInitialized'] = function() {
var pk_for_wire = pk.serialize();
var sig = new blst.P2();
- var sig_for_wire = sig.hash_to(msg, DST, pk_for_wire)
- .sign_with(SK)
- .serialize();
+ var sig_for_wire = sig.hash_to(msg, DST, pk_for_wire).sign_with(SK).serialize();
////////////////////////////////////////////////////////////////////////
// at this point 'pk_for_wire', 'sig_for_wire' and 'msg' are
// "sent over network," so now on "receiver" side
sig = new blst.P2_Affine(sig_for_wire);
- pk = new blst.P1_Affine(pk_for_wire);
+ pk = new blst.P1_Affine(pk_for_wire);
- if (!pk.in_group()) throw "disaster"; // vet the public key
+ if (!pk.in_group()) throw 'disaster'; // vet the public key
var ctx = new blst.Pairing(true, DST);
ctx.aggregate(pk, sig, msg, pk_for_wire);
ctx.commit();
- if (!ctx.finalverify()) throw "disaster";
+ if (!ctx.finalverify()) throw 'disaster';
- console.log("OK");
-}
+ console.log('OK');
+};
diff --git a/public/img.png b/public/img.png
deleted file mode 100644
index f3cc6a6..0000000
Binary files a/public/img.png and /dev/null differ
diff --git a/src/App.tsx b/src/App.tsx
index 9fb43b1..780b1a5 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -4,8 +4,8 @@ import { Header } from '@/components/Header';
function App() {
return (
-
-
+
+
);
}
diff --git a/src/abis/keyBroadcastABI.ts b/src/abis/keyBroadcastABI.ts
index 334a2a0..dce1250 100644
--- a/src/abis/keyBroadcastABI.ts
+++ b/src/abis/keyBroadcastABI.ts
@@ -1,20 +1,20 @@
const keyBroadcastABI = [
{
inputs: [
- { internalType: "uint64", name: "eon", type: "uint64" },
- { internalType: "bytes", name: "key", type: "bytes" },
+ { internalType: 'uint64', name: 'eon', type: 'uint64' },
+ { internalType: 'bytes', name: 'key', type: 'bytes' },
],
- name: "broadcastEonKey",
+ name: 'broadcastEonKey',
outputs: [],
- stateMutability: "nonpayable",
- type: "function",
+ stateMutability: 'nonpayable',
+ type: 'function',
},
{
- inputs: [{ internalType: "uint64", name: "eon", type: "uint64" }],
- name: "getEonKey",
- outputs: [{ internalType: "bytes", name: "", type: "bytes" }],
- stateMutability: "view",
- type: "function",
+ inputs: [{ internalType: 'uint64', name: 'eon', type: 'uint64' }],
+ name: 'getEonKey',
+ outputs: [{ internalType: 'bytes', name: '', type: 'bytes' }],
+ stateMutability: 'view',
+ type: 'function',
},
] as const;
diff --git a/src/abis/keyperSetManagerABI.ts b/src/abis/keyperSetManagerABI.ts
index 0e79999..69f5e5b 100644
--- a/src/abis/keyperSetManagerABI.ts
+++ b/src/abis/keyperSetManagerABI.ts
@@ -2,21 +2,21 @@ const keyperSetManagerABI = [
{
inputs: [
{
- internalType: "uint64",
- name: "block",
- type: "uint64",
+ internalType: 'uint64',
+ name: 'block',
+ type: 'uint64',
},
],
- name: "getKeyperSetIndexByBlock",
+ name: 'getKeyperSetIndexByBlock',
outputs: [
{
- internalType: "uint64",
- name: "",
- type: "uint64",
+ internalType: 'uint64',
+ name: '',
+ type: 'uint64',
},
],
- stateMutability: "view",
- type: "function",
+ stateMutability: 'view',
+ type: 'function',
},
] as const;
diff --git a/src/abis/sequencerABI.ts b/src/abis/sequencerABI.ts
index 0113880..44fce41 100644
--- a/src/abis/sequencerABI.ts
+++ b/src/abis/sequencerABI.ts
@@ -2,25 +2,25 @@ const sequencerABI = [
{
inputs: [
{
- name: "eon",
- type: "uint64",
+ name: 'eon',
+ type: 'uint64',
},
{
- name: "identityPrefix",
- type: "bytes32",
+ name: 'identityPrefix',
+ type: 'bytes32',
},
{
- name: "encryptedTransaction",
- type: "bytes",
+ name: 'encryptedTransaction',
+ type: 'bytes',
},
{
- name: "gasLimit",
- type: "uint256",
+ name: 'gasLimit',
+ type: 'uint256',
},
],
- name: "submitEncryptedTransaction",
+ name: 'submitEncryptedTransaction',
outputs: [],
- type: "function",
+ type: 'function',
},
] as const;
diff --git a/src/abis/validatorRegistryABI.ts b/src/abis/validatorRegistryABI.ts
index 25af41a..1da1ac0 100644
--- a/src/abis/validatorRegistryABI.ts
+++ b/src/abis/validatorRegistryABI.ts
@@ -1,85 +1,85 @@
const validatorRegistryABI = [
{
- "anonymous": false,
- "inputs": [
+ anonymous: false,
+ inputs: [
{
- "indexed": false,
- "internalType": "bytes",
- "name": "message",
- "type": "bytes"
+ indexed: false,
+ internalType: 'bytes',
+ name: 'message',
+ type: 'bytes',
},
{
- "indexed": false,
- "internalType": "bytes",
- "name": "signature",
- "type": "bytes"
- }
+ indexed: false,
+ internalType: 'bytes',
+ name: 'signature',
+ type: 'bytes',
+ },
],
- "name": "Updated",
- "type": "event"
+ name: 'Updated',
+ type: 'event',
},
{
- "inputs": [],
- "name": "getNumUpdates",
- "outputs": [
+ inputs: [],
+ name: 'getNumUpdates',
+ outputs: [
{
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
- }
+ internalType: 'uint256',
+ name: '',
+ type: 'uint256',
+ },
],
- "stateMutability": "view",
- "type": "function"
+ stateMutability: 'view',
+ type: 'function',
},
{
- "inputs": [
+ inputs: [
{
- "internalType": "uint256",
- "name": "i",
- "type": "uint256"
- }
+ internalType: 'uint256',
+ name: 'i',
+ type: 'uint256',
+ },
],
- "name": "getUpdate",
- "outputs": [
+ name: 'getUpdate',
+ outputs: [
{
- "components": [
+ components: [
{
- "internalType": "bytes",
- "name": "message",
- "type": "bytes"
+ internalType: 'bytes',
+ name: 'message',
+ type: 'bytes',
},
{
- "internalType": "bytes",
- "name": "signature",
- "type": "bytes"
- }
+ internalType: 'bytes',
+ name: 'signature',
+ type: 'bytes',
+ },
],
- "internalType": "struct IValidatorRegistry.Update",
- "name": "",
- "type": "tuple"
- }
+ internalType: 'struct IValidatorRegistry.Update',
+ name: '',
+ type: 'tuple',
+ },
],
- "stateMutability": "view",
- "type": "function"
+ stateMutability: 'view',
+ type: 'function',
},
{
- "inputs": [
+ inputs: [
{
- "internalType": "bytes",
- "name": "message",
- "type": "bytes"
+ internalType: 'bytes',
+ name: 'message',
+ type: 'bytes',
},
{
- "internalType": "bytes",
- "name": "signature",
- "type": "bytes"
- }
+ internalType: 'bytes',
+ name: 'signature',
+ type: 'bytes',
+ },
],
- "name": "update",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
+ name: 'update',
+ outputs: [],
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
];
-export default validatorRegistryABI;
\ No newline at end of file
+export default validatorRegistryABI;
diff --git a/src/components/Connect.tsx b/src/components/Connect.tsx
index a2879b5..e8c4f1d 100644
--- a/src/components/Connect.tsx
+++ b/src/components/Connect.tsx
@@ -22,10 +22,14 @@ export const Connect = () => {
}, [address, connector]);
return (
-
- {tip &&
{tip} }
-
+
+
+ {tip && (
+
+ {tip}
+
+ )}
);
-}
+};
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 34803df..367cb96 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -11,4 +11,4 @@ export const Header = () => {
);
-};
\ No newline at end of file
+};
diff --git a/src/components/Select.tsx b/src/components/Select.tsx
index 1f7b483..81d9199 100644
--- a/src/components/Select.tsx
+++ b/src/components/Select.tsx
@@ -16,13 +16,16 @@ interface SelectProps {
}
export const Select = ({ items, handleChange, selectedItem, title }: SelectProps) => {
- const handleSelectionChange = useCallback((e: any) => {
- if (!e.target.value) return;
+ const handleSelectionChange = useCallback(
+ (e: any) => {
+ if (!e.target.value) return;
- const item = items.find((item) => item.key == e.target.value);
+ const item = items.find((item) => item.key == e.target.value);
- handleChange?.(item);
- }, [items, handleChange]);
+ handleChange?.(item);
+ },
+ [items, handleChange],
+ );
const selectedKeys = useMemo(() => [selectedItem?.key], [selectedItem]);
diff --git a/src/constants/chains.ts b/src/constants/chains.ts
index 033b637..3797ad4 100644
--- a/src/constants/chains.ts
+++ b/src/constants/chains.ts
@@ -13,7 +13,7 @@ type Token = {
type EnhancedChain = Chain & {
img: string;
- contracts: Pick & {
+ contracts: Pick & {
sequencer: {
address: Address;
blockCreated?: number;
@@ -34,7 +34,7 @@ type EnhancedChain = Chain & {
gbcUrl: string;
genesisTime: number;
tokens: Token[];
- theGraphUrl: string,
+ theGraphUrl: string;
};
type ChainMap = {
@@ -42,51 +42,51 @@ type ChainMap = {
};
export const nativeXDaiToken: Token = {
- address: "0x0000000000000000000000000000000000000000",
- name: "xDai",
- symbol: "xDai",
+ address: '0x0000000000000000000000000000000000000000',
+ name: 'xDai',
+ symbol: 'xDai',
decimals: 18,
- img: "/xdai.png",
+ img: '/xdai.png',
};
export const CHAINS: EnhancedChain[] = [
{
...gnosis,
- img: "/gnosisGreen.svg",
+ img: '/gnosisGreen.svg',
contracts: {
...gnosis.contracts,
sequencer: {
- address: "0xc5C4b277277A1A8401E0F039dfC49151bA64DC2E",
+ address: '0xc5C4b277277A1A8401E0F039dfC49151bA64DC2E',
},
keyperSetManager: {
- address: "0x7C2337f9bFce19d8970661DA50dE8DD7d3D34abb",
+ address: '0x7C2337f9bFce19d8970661DA50dE8DD7d3D34abb',
},
keyBroadcast: {
- address: "0x626dB87f9a9aC47070016A50e802dd5974341301",
+ address: '0x626dB87f9a9aC47070016A50e802dd5974341301',
},
validatorRegistry: {
- address: "0xefCC23E71f6bA9B22C4D28F7588141d44496A6D6",
+ address: '0xefCC23E71f6bA9B22C4D28F7588141d44496A6D6',
},
},
blockExplorers: {
default: {
...gnosis.blockExplorers.default,
- url: "https://gnosis.blockscout.com/",
+ url: 'https://gnosis.blockscout.com/',
},
},
- gbcUrl: "https://rpc-gbc.gnosischain.com",
+ gbcUrl: 'https://rpc-gbc.gnosischain.com',
genesisTime: 1638993340,
tokens: [
nativeXDaiToken,
{
- address: "0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb",
- name: "GnosisBridged",
- symbol: "GNO",
+ address: '0x9C58BAcC331c9aa871AFD802DB6379a98e80CEdb',
+ name: 'GnosisBridged',
+ symbol: 'GNO',
decimals: 18,
- img: "/gnosisGreen.svg",
+ img: '/gnosisGreen.svg',
},
],
// theGraphUrl: `https://api.studio.thegraph.com/query/83608/m-shutter-validator-registry/мv0.0.2`,
@@ -94,42 +94,42 @@ export const CHAINS: EnhancedChain[] = [
},
{
...gnosisChiado,
- img: "/gnosisGreen.svg",
+ img: '/gnosisGreen.svg',
contracts: {
...gnosisChiado.contracts,
sequencer: {
- address: "0xAC3209DCBced710Dc2612bD714b9EC947a6d1e8f",
+ address: '0xAC3209DCBced710Dc2612bD714b9EC947a6d1e8f',
// blockCreated: ,
},
keyperSetManager: {
- address: "0x6759Ab83de6f7d5bc4cf02d41BbB3Bd1500712E1",
+ address: '0x6759Ab83de6f7d5bc4cf02d41BbB3Bd1500712E1',
},
keyBroadcast: {
- address: "0xDd9Ea21f682a6484ac40D36c97Fa056Fbce9004f",
+ address: '0xDd9Ea21f682a6484ac40D36c97Fa056Fbce9004f',
},
validatorRegistry: {
- address: "0x06BfddbEbe11f7eE8a39Fc7DC24498dE85C8afca",
+ address: '0x06BfddbEbe11f7eE8a39Fc7DC24498dE85C8afca',
},
},
blockExplorers: {
default: {
...gnosisChiado.blockExplorers.default,
- url: "https://gnosis-chiado.blockscout.com/",
+ url: 'https://gnosis-chiado.blockscout.com/',
},
},
- gbcUrl: "https://rpc-gbc.chiadochain.net",
+ gbcUrl: 'https://rpc-gbc.chiadochain.net',
genesisTime: 1665396300,
tokens: [
nativeXDaiToken,
{
- address: "0x19C653Da7c37c66208fbfbE8908A5051B57b4C70",
- name: "GnosisBridged",
- symbol: "GNO",
+ address: '0x19C653Da7c37c66208fbfbE8908A5051B57b4C70',
+ name: 'GnosisBridged',
+ symbol: 'GNO',
decimals: 18,
- img: "/gnosisGreen.svg",
+ img: '/gnosisGreen.svg',
},
],
// https://api.studio.thegraph.com/query/83608/shutter-validator-registry/v0.0.1
diff --git a/src/constants/config.ts b/src/constants/config.ts
index 0c62f42..ba5da7b 100644
--- a/src/constants/config.ts
+++ b/src/constants/config.ts
@@ -1,4 +1,4 @@
export default {
walletConnectProjectId: import.meta.env.VITE_WALLET_CONNECT_PROJECT_ID,
theGraphApiKey: import.meta.env.VITE_THE_GRAPH_API_KEY,
-}
\ No newline at end of file
+};
diff --git a/src/hooks/useCreateWalletClient.ts b/src/hooks/useCreateWalletClient.ts
index cc2c867..0164b77 100644
--- a/src/hooks/useCreateWalletClient.ts
+++ b/src/hooks/useCreateWalletClient.ts
@@ -7,11 +7,13 @@ export const useCreateWalletClient = () => {
return useMemo(() => {
// @ts-expect-error - avoid error if window.ethereum is not defined
- return window.ethereum ? createWalletClient({
- account: address,
- chain,
- // @ts-expect-error - we know that window.ethereum is defined
- transport: custom(window.ethereum!),
- }) : null;
+ return window.ethereum
+ ? createWalletClient({
+ account: address,
+ chain,
+ // @ts-expect-error - we know that window.ethereum is defined
+ transport: custom(window.ethereum!),
+ })
+ : null;
}, [address, chain]);
-}
+};
diff --git a/src/hooks/useShutterEncryption.ts b/src/hooks/useShutterEncryption.ts
index 370711b..898dbfa 100644
--- a/src/hooks/useShutterEncryption.ts
+++ b/src/hooks/useShutterEncryption.ts
@@ -1,18 +1,12 @@
-import { useCallback, useMemo } from "react";
-import {
- useReadContract,
- useChainId,
- useBlockNumber,
- useAccount,
- useWriteContract,
-} from "wagmi";
-import { type SignTransactionReturnType, type Hex, parseEther } from "viem";
-
-import keyBroadcastABI from "@/abis/keyBroadcastABI";
-import keyperSetManagerABI from "@/abis/keyperSetManagerABI";
-import sequencerABI from "@/abis/sequencerABI";
-import { CHAINS_MAP } from "@/constants/chains";
-import { encryptData } from "@/services/shutter/encryptDataBlst";
+import { useCallback, useMemo } from 'react';
+import { useReadContract, useChainId, useBlockNumber, useAccount, useWriteContract } from 'wagmi';
+import { type SignTransactionReturnType, type Hex, parseEther } from 'viem';
+
+import keyBroadcastABI from '@/abis/keyBroadcastABI';
+import keyperSetManagerABI from '@/abis/keyperSetManagerABI';
+import sequencerABI from '@/abis/sequencerABI';
+import { CHAINS_MAP } from '@/constants/chains';
+import { encryptData } from '@/services/shutter/encryptDataBlst';
const tKeyperSetChangeLookAhead = 4;
@@ -20,9 +14,7 @@ function randomBytes(size: number) {
const array = new Uint8Array(size);
window.crypto.getRandomValues(array);
- return Array.from(array, (byte) => byte.toString(16).padStart(2, "0")).join(
- ""
- );
+ return Array.from(array, (byte) => byte.toString(16).padStart(2, '0')).join('');
}
export const useShutterEncryption = () => {
@@ -35,7 +27,7 @@ export const useShutterEncryption = () => {
const { data: eon, ...eonRest } = useReadContract({
address: chain.contracts.keyperSetManager.address,
abi: keyperSetManagerABI,
- functionName: "getKeyperSetIndexByBlock",
+ functionName: 'getKeyperSetIndexByBlock',
// @ts-expect-error - disabled query if address is not defined
args: [Number(blockNumber) + tKeyperSetChangeLookAhead],
query: {
@@ -46,7 +38,7 @@ export const useShutterEncryption = () => {
const { data: eonKeyBytes, ...eonKeyBytesRest } = useReadContract({
address: chain.contracts.keyBroadcast.address,
abi: keyBroadcastABI,
- functionName: "getEonKey",
+ functionName: 'getEonKey',
// @ts-expect-error - disabled query if eon is not defined
args: [eon],
query: {
@@ -59,9 +51,7 @@ export const useShutterEncryption = () => {
if (!eonKeyBytes) return;
const randomHex = randomBytes(12);
- const identityPrefixHex = (address +
- randomHex +
- address?.slice(2)) as Hex;
+ const identityPrefixHex = (address + randomHex + address?.slice(2)) as Hex;
const sigmaHex = (address + randomHex) as Hex;
@@ -73,16 +63,11 @@ export const useShutterEncryption = () => {
sigmaHex,
});
- const encryptedTx = await encryptData(
- signedTx,
- identityPrefixHex,
- eonKeyBytes,
- sigmaHex
- );
+ const encryptedTx = await encryptData(signedTx, identityPrefixHex, eonKeyBytes, sigmaHex);
return { identityPrefixHex: sigmaHex, encryptedTx };
},
- [eonKeyBytes, address]
+ [eonKeyBytes, address],
);
const submitTransactionToSequencer = useCallback(
@@ -94,13 +79,13 @@ export const useShutterEncryption = () => {
return await writeContractAsync({
address: chain.contracts.sequencer.address,
abi: sequencerABI,
- functionName: "submitEncryptedTransaction",
+ functionName: 'submitEncryptedTransaction',
args: [eon, identityPrefixHex, encryptedTx, 210000],
- value: parseEther("210000", "gwei"),
+ value: parseEther('210000', 'gwei'),
gasPrice: 210000n,
});
},
- [chain, eon]
+ [chain, eon],
);
return {
diff --git a/src/hooks/useSignTransaction.ts b/src/hooks/useSignTransaction.ts
index e17bb30..8df8ba9 100644
--- a/src/hooks/useSignTransaction.ts
+++ b/src/hooks/useSignTransaction.ts
@@ -1,11 +1,11 @@
-
-import { useCallback } from "react";
-import { useCreateWalletClient } from "@/hooks/useCreateWalletClient";
+import { useCallback } from 'react';
+import { useCreateWalletClient } from '@/hooks/useCreateWalletClient';
export const useSignTransaction = () => {
const client = useCreateWalletClient();
- return useCallback(async (request: any) => {
+ return useCallback(
+ async (request: any) => {
if (!client) return;
console.log({ request });
@@ -15,5 +15,7 @@ export const useSignTransaction = () => {
console.log('serialized transaction', { serializedTransaction });
return serializedTransaction;
- }, [client]);
+ },
+ [client],
+ );
};
diff --git a/src/hooks/useTokenBalance.ts b/src/hooks/useTokenBalance.ts
index 4a25b85..112dba2 100644
--- a/src/hooks/useTokenBalance.ts
+++ b/src/hooks/useTokenBalance.ts
@@ -59,12 +59,15 @@ export const useTokenBalance = ({ tokenAddress, enabled, chainId }: UseTokenBala
};
return {
- balance: balance && decimals && symbol ? {
- value: balance,
- formatted: formatUnits(balance, decimals),
- decimals,
- symbol,
- } : null,
+ balance:
+ balance && decimals && symbol
+ ? {
+ value: balance,
+ formatted: formatUnits(balance, decimals),
+ decimals,
+ symbol,
+ }
+ : null,
...rest,
- }
+ };
};
diff --git a/src/main.tsx b/src/main.tsx
index c569a9f..29e6aeb 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,12 +1,12 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import { NextUIProvider } from '@nextui-org/react'
-import { Toaster } from 'sonner'
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import { NextUIProvider } from '@nextui-org/react';
+import { Toaster } from 'sonner';
import { Web3ModalProvider } from '@/providers/Web3ModalProvider';
import { GraphQLProvider } from '@/providers/GraphQLProvider';
-import App from './App.tsx'
-import './index.css'
+import App from './App';
+import './index.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
@@ -20,4 +20,4 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
,
-)
+);
diff --git a/src/pages/MainPage/AdvancedForm.tsx b/src/pages/MainPage/AdvancedForm.tsx
index a1be84e..db9f394 100644
--- a/src/pages/MainPage/AdvancedForm.tsx
+++ b/src/pages/MainPage/AdvancedForm.tsx
@@ -6,10 +6,10 @@ import { Tab, Tabs } from '@nextui-org/react';
import { SubmitButton } from './SubmitButton';
interface AdvancedFormProps {
- submit: (tx: UsePrepareTransactionRequestReturnType | `0x${string}`) => void,
- status: number,
- setStatus: (status: 0 | 1 | 2 | 3 | 4 | 5 | 6) => void,
- isSubmitDisabled: boolean,
+ submit: (tx: UsePrepareTransactionRequestReturnType | `0x${string}`) => void;
+ status: number;
+ setStatus: (status: 0 | 1 | 2 | 3 | 4 | 5 | 6) => void;
+ isSubmitDisabled: boolean;
}
const rawTx = `{
@@ -25,7 +25,8 @@ const rawTx = `{
"value": 0
}`;
-const signedTx = "0x02f8b18227d80184b2d05e0084b2d05e0882a7729419c653da7c37c66208fbfbe8908a5051b57b4c7080b844a9059cbb0000000000000000000000009cbaee4fd3c9a89f327edb1b161eba7bd5498d0f00000000000000000000000000000000000000000000000006f05b59d3b20000c080a0d424743c77d03d7859e4da871cbd82fca4424e47ba823304faaf5dec08e58393a0666944aee77733691cf514ba2607ed6625409219f89cd2ef36583a0a422ca684";
+const signedTx =
+ '0x02f8b18227d80184b2d05e0084b2d05e0882a7729419c653da7c37c66208fbfbe8908a5051b57b4c7080b844a9059cbb0000000000000000000000009cbaee4fd3c9a89f327edb1b161eba7bd5498d0f00000000000000000000000000000000000000000000000006f05b59d3b20000c080a0d424743c77d03d7859e4da871cbd82fca4424e47ba823304faaf5dec08e58393a0666944aee77733691cf514ba2607ed6625409219f89cd2ef36583a0a422ca684';
const encryptedTx = `{
"encryptedTx": "0x03b1b5c4cbdee257742501327c200c1911c4c22b90848791b4f6c752dc34342b1d73b05dff1c4752f91cf00428bfd80fda0fe3c6b8889c91110b2b35939ba06619c5184eda15ce4483837ac31e2795640912a2998fbe4ad2cfebdc9152b36432de6224c4185cdb41089de3c68af085605240ad506f6e0c8f4ddd4f7c56845deb8daa33de15490bddcfd3317ec4e48b3bbdb0b7eedfc20ac26feacdd8d64496ffeff5f2a856c94b629b694c1558d7d6e1a729bfb0dae507eae07cda595a7365ef73bc5fed5cd0c38ef89e8209653a1844faacf81f07bda33d0b72d1929bbca6b94bd72a38bf4da3090d132ec863684fb390d19e95172e6fd3ffe315b6d696320d21ac65bde6297ac4759a630a984a9db90285d2e0b53403a83c494e3a2bee6353ba5180ff1e7ce3d72a331ae4a98c5d3084d46d9200c595a9dba8c13233cf6908e6",
@@ -33,7 +34,7 @@ const encryptedTx = `{
}`;
const formatTransactionData = (data: string, transactionType: string) => {
- if (transactionType !== "raw" && transactionType !== "encrypted") return data as `0x${string}`;
+ if (transactionType !== 'raw' && transactionType !== 'encrypted') return data as `0x${string}`;
try {
const parsedData = JSON.parse(data);
return parsedData;
@@ -43,29 +44,41 @@ const formatTransactionData = (data: string, transactionType: string) => {
};
const isValidTxData = (txData: any, transactionType: string) => {
- if (transactionType === "raw") {
- return !!txData &&
+ if (transactionType === 'raw') {
+ return (
+ !!txData &&
typeof txData.chainId === 'number' &&
typeof txData.to === 'string' &&
typeof txData.data === 'string' &&
typeof txData.gas === 'number' &&
- typeof txData.maxFeePerGas === 'number';
- }
- else if (transactionType === "encrypted") {
- return !!txData &&
- typeof txData.encryptedTx === "string" && txData.encryptedTx.startsWith('0x') &&
- typeof txData.identityPrefixHex === "string" && txData.identityPrefixHex.startsWith('0x');
- }
- else {
+ typeof txData.maxFeePerGas === 'number'
+ );
+ } else if (transactionType === 'encrypted') {
+ return (
+ !!txData &&
+ typeof txData.encryptedTx === 'string' &&
+ txData.encryptedTx.startsWith('0x') &&
+ typeof txData.identityPrefixHex === 'string' &&
+ txData.identityPrefixHex.startsWith('0x')
+ );
+ } else {
return typeof txData === 'string' && txData.startsWith('0x');
}
};
-export const AdvancedForm = ({ submit, status, setStatus, isSubmitDisabled }: AdvancedFormProps) => {
+export const AdvancedForm = ({
+ submit,
+ status,
+ setStatus,
+ isSubmitDisabled,
+}: AdvancedFormProps) => {
const [transactionData, setTransactionData] = useState('');
const [transactionType, setTransactionType] = useState<'raw' | 'signed' | 'encrypted'>('raw');
- const formattedTxData = useMemo(() => formatTransactionData(transactionData, transactionType), [transactionData, transactionType]);
+ const formattedTxData = useMemo(
+ () => formatTransactionData(transactionData, transactionType),
+ [transactionData, transactionType],
+ );
const preparedTransactionRequest = usePrepareTransactionRequest({
chainId: formattedTxData?.chainId,
@@ -104,7 +117,14 @@ export const AdvancedForm = ({ submit, status, setStatus, isSubmitDisabled }: Ad
Paste your transaction in here:
-
+
@@ -117,7 +137,17 @@ export const AdvancedForm = ({ submit, status, setStatus, isSubmitDisabled }: Ad
/>
setTransactionData(transactionType === "raw" ? rawTx : transactionType === "signed" ? signedTx : encryptedTx), [transactionType])}
+ onClick={useCallback(
+ () =>
+ setTransactionData(
+ transactionType === 'raw'
+ ? rawTx
+ : transactionType === 'signed'
+ ? signedTx
+ : encryptedTx,
+ ),
+ [transactionType],
+ )}
>
Prefill Example
diff --git a/src/pages/MainPage/FAQAccordion.tsx b/src/pages/MainPage/FAQAccordion.tsx
index 4fe8865..ada05eb 100644
--- a/src/pages/MainPage/FAQAccordion.tsx
+++ b/src/pages/MainPage/FAQAccordion.tsx
@@ -1,18 +1,22 @@
import { Accordion, AccordionItem, Image } from '@nextui-org/react';
const itemClasses = {
- trigger: "bg-secondary hover:border-secondary",
- title: "text-black",
+ trigger: 'bg-secondary hover:border-secondary',
+ title: 'text-black',
};
export const FAQAccordion = () => {
return (
-
+
FAQ
-
+
{`The Opt-in Shutterized Gnosis Chain is a proposal designed to enhance transaction
privacy and security on the Gnosis Chain. It allows users to encrypt transactions
to prevent frontrunning and censorship. Transactions are decrypted and executed
@@ -37,21 +41,27 @@ export const FAQAccordion = () => {
- Users : Users submit encrypted transactions to the network. They encrypt these transactions using a
- public key obtained from the Key Broadcast Contract.
+
+ Users : Users submit encrypted transactions to the network. They encrypt these
+ transactions using a public key obtained from the Key Broadcast Contract.
- Key Broadcast Contract : This contract distributes the encryption keys (public keys) to users and stores
- them for the Keypers to access as needed.
+
+ Key Broadcast Contract : This contract distributes the encryption keys (public
+ keys) to users and stores them for the Keypers to access as needed.
- Keypers : Keypers are responsible for securely managing decryption keys. They generate decryption keys
- and provide these to the Sequencer Contract.
+
+ Keypers : Keypers are responsible for securely managing decryption keys. They
+ generate decryption keys and provide these to the Sequencer Contract.
- Sequencer Contract : This contract manages the queue of encrypted transactions submitted by users. It
- interacts with Keypers to obtain decryption keys and ensures that transactions are correctly ordered and
- ready for decryption.
+
+ Sequencer Contract : This contract manages the queue of encrypted transactions
+ submitted by users. It interacts with Keypers to obtain decryption keys and ensures
+ that transactions are correctly ordered and ready for decryption.
- Proposer : The Proposer (a type of validator) retrieves decrypted transactions from the Sequencer
- Contract, then includes them in a new block which is added to the blockchain.
+
+ Proposer : The Proposer (a type of validator) retrieves decrypted transactions
+ from the Sequencer Contract, then includes them in a new block which is added to the
+ blockchain.
@@ -82,13 +92,21 @@ export const FAQAccordion = () => {
if some keypers are temporarily unavailable.`}
-
+
{`If a transaction cannot be decrypted (e.g., due to corrupted data or a mismatch in the encryption), it
won't be included in the encrypted section of the block. However, it may still be included later in the
plaintext section if it's valid, although this could potentially expose it to frontrunning.`}
-
+
{`Yes, using the encrypted transaction service is entirely opt-in. You can choose to send transactions
in the usual plaintext format if you prefer not to use encryption.`}
@@ -99,7 +117,11 @@ export const FAQAccordion = () => {
offline could potentially compromise transaction security.`}
-
+
{`To use encrypted transactions, you'll need to use this app and a compatible wallet that supports
signing transaction without broadcasting it (such as Brave Wallet).`}
diff --git a/src/pages/MainPage/FormsWrapper.tsx b/src/pages/MainPage/FormsWrapper.tsx
index 93f3c9a..7da124e 100644
--- a/src/pages/MainPage/FormsWrapper.tsx
+++ b/src/pages/MainPage/FormsWrapper.tsx
@@ -1,13 +1,13 @@
-import { Tabs, Tab } from "@nextui-org/react";
-import { useState, useCallback, useEffect } from "react";
-import { type Hash } from "viem";
+import { Tabs, Tab } from '@nextui-org/react';
+import { useState, useCallback, useEffect } from 'react';
+import { type Hash } from 'viem';
-import { useSignTransaction } from "@/hooks/useSignTransaction";
-import { useShutterEncryption } from "@/hooks/useShutterEncryption";
+import { useSignTransaction } from '@/hooks/useSignTransaction';
+import { useShutterEncryption } from '@/hooks/useShutterEncryption';
-import { TransferForm } from "./TransferForm";
-import { AdvancedForm } from "./AdvancedForm";
-import { ProgressInfoCard } from "./ProgressInfoCard";
+import { TransferForm } from './TransferForm';
+import { AdvancedForm } from './AdvancedForm';
+import { ProgressInfoCard } from './ProgressInfoCard';
// status = 0 -> sign
// status = 1 -> signing
@@ -35,7 +35,7 @@ export const FormsWrapper = () => {
setStatus(0);
return;
}
-
+
if (!tx) return;
setCurrentTx(tx);
@@ -48,7 +48,7 @@ export const FormsWrapper = () => {
setStatus(5); // Start the submission process
}
},
- [status]
+ [status],
);
useEffect(() => {
@@ -106,7 +106,7 @@ export const FormsWrapper = () => {
return (
-
+
{
return (
-
-
+
+
-
+
);
};
diff --git a/src/pages/MainPage/ProgressInfoCard.tsx b/src/pages/MainPage/ProgressInfoCard.tsx
index 5ace1aa..a47b662 100644
--- a/src/pages/MainPage/ProgressInfoCard.tsx
+++ b/src/pages/MainPage/ProgressInfoCard.tsx
@@ -26,29 +26,57 @@ export const ProgressInfoCard = ({ status, submittedTxHash = '' }: ProgressInfoC
{status === 0 ? 'Ready to sign transaction.' : status > 0 && 'Transaction prepared.'}
- {status === 1 ? ( Signing transaction... ) : status > 1 && 'Transaction signed.'}
+ {status === 1 ? (
+
+ Signing transaction...
+
+ ) : (
+ status > 1 && 'Transaction signed.'
+ )}
- {status === 2 ? 'Ready to encrypt transaction.' : status === 3 ? ( Encrypting transaction... ) : status > 3 && 'Transaction encrypted.'}
+ {status === 2 ? (
+ 'Ready to encrypt transaction.'
+ ) : status === 3 ? (
+
+ Encrypting transaction...
+
+ ) : (
+ status > 3 && 'Transaction encrypted.'
+ )}
- {status === 4 ? 'Ready to submit transaction.' : status === 5 ? ( Submitting transaction... ) : status > 5 && 'Transaction submitted.'}
+ {status === 4 ? (
+ 'Ready to submit transaction.'
+ ) : status === 5 ? (
+
+ Submitting transaction...
+
+ ) : (
+ status > 5 && 'Transaction submitted.'
+ )}
- {status >= 6 && (
)}
+ {status >= 6 &&
}
{status >= 6 && (
- Submitted Tx: {truncateNumberSymbols(submittedTxHash, 4)}
+ Submitted Tx:{' '}
+
+ {truncateNumberSymbols(submittedTxHash, 4)}
+
)}
{status >= 7 && (
- Original Tx: 0x1234...5678
+ Original Tx:{' '}
+
+ 0x1234...5678
+
)}
);
-};
\ No newline at end of file
+};
diff --git a/src/pages/MainPage/SubmitButton.tsx b/src/pages/MainPage/SubmitButton.tsx
index d62f7d5..3a0389a 100644
--- a/src/pages/MainPage/SubmitButton.tsx
+++ b/src/pages/MainPage/SubmitButton.tsx
@@ -1,11 +1,11 @@
import { Button } from '@nextui-org/react';
-import { Tooltip } from "@nextui-org/tooltip";
+import { Tooltip } from '@nextui-org/tooltip';
interface SubmitButtonProps {
- submit: () => void,
- status: number,
- transactionCount: number | undefined,
- isSubmitDisabled: boolean,
+ submit: () => void;
+ status: number;
+ transactionCount: number | undefined;
+ isSubmitDisabled: boolean;
}
const getStatusText = (status: number) => {
@@ -27,19 +27,31 @@ const getStatusText = (status: number) => {
}
};
-export const SubmitButton = ({ submit, status, transactionCount, isSubmitDisabled }: SubmitButtonProps) => {
+export const SubmitButton = ({
+ submit,
+ status,
+ transactionCount,
+ isSubmitDisabled,
+}: SubmitButtonProps) => {
return (
- {(status === 0 || status === 1) && transactionCount !== undefined ?
-
- Required nonce:
-
- {transactionCount + 1}
-
+ {(status === 0 || status === 1) && transactionCount !== undefined ? (
+
+
+ Required nonce:
+
{transactionCount + 1}
- : ""}
-
+ ) : (
+ ''
+ )}
+
{getStatusText(status)}
diff --git a/src/pages/MainPage/TransferForm.tsx b/src/pages/MainPage/TransferForm.tsx
index 8a6c0f5..1cbca3c 100644
--- a/src/pages/MainPage/TransferForm.tsx
+++ b/src/pages/MainPage/TransferForm.tsx
@@ -1,6 +1,11 @@
import { useEffect, useState, useMemo, useCallback } from 'react';
import { Input } from '@nextui-org/react';
-import { useChainId, usePrepareTransactionRequest, useSwitchChain, type UsePrepareTransactionRequestReturnType } from 'wagmi';
+import {
+ useChainId,
+ usePrepareTransactionRequest,
+ useSwitchChain,
+ type UsePrepareTransactionRequestReturnType,
+} from 'wagmi';
import { type Hex, parseEther, isAddress } from 'viem';
import { CHAINS, nativeXDaiToken } from '@/constants/chains';
@@ -9,24 +14,23 @@ import { Select } from '@/components/Select';
import { useTokenBalance } from '@/hooks/useTokenBalance';
import { encodeDataForTransfer } from '@/utils/eth';
-
import { SubmitButton } from './SubmitButton';
const mappedChains = mapChainsToOptions(CHAINS);
const defaultToken = mapTokenToOption(CHAINS[0].tokens[0]);
interface TransferFormProps {
- submit: (tx: UsePrepareTransactionRequestReturnType, step: number) => void,
- status: number,
- isSubmitDisabled: boolean,
+ submit: (tx: UsePrepareTransactionRequestReturnType, step: number) => void;
+ status: number;
+ isSubmitDisabled: boolean;
}
export const TransferForm = ({ submit, status, isSubmitDisabled }: TransferFormProps) => {
const [token, setToken] = useState(defaultToken);
- const [amount, setAmount] = useState("0");
+ const [amount, setAmount] = useState('0');
const [to, setTo] = useState('');
const chainId = useChainId();
- const [chain, setChain] = useState(mappedChains.find((c: { id: number; }) => c.id === chainId));
+ const [chain, setChain] = useState(mappedChains.find((c: { id: number }) => c.id === chainId));
const { switchChain } = useSwitchChain();
const { balance } = useTokenBalance({
@@ -43,7 +47,7 @@ export const TransferForm = ({ submit, status, isSubmitDisabled }: TransferFormP
}, [chain]);
useEffect(() => {
- const selectedChain = mappedChains.find((c: { id: number; }) => c.id === chainId);
+ const selectedChain = mappedChains.find((c: { id: number }) => c.id === chainId);
if (selectedChain) {
setChain(selectedChain);
}
@@ -63,7 +67,10 @@ export const TransferForm = ({ submit, status, isSubmitDisabled }: TransferFormP
data,
chainId: chain.id,
to: token?.address === nativeXDaiToken.address ? to : token?.address,
- value: token?.address === nativeXDaiToken.address ? parseEther(amount.toString()) : 0 as unknown as bigint,
+ value:
+ token?.address === nativeXDaiToken.address
+ ? parseEther(amount.toString())
+ : (0 as unknown as bigint),
});
const onSubmit = useCallback(() => {
@@ -73,22 +80,11 @@ export const TransferForm = ({ submit, status, isSubmitDisabled }: TransferFormP
return (
-
+
-
+
@@ -103,7 +99,7 @@ export const TransferForm = ({ submit, status, isSubmitDisabled }: TransferFormP
setAmount(balance?.formatted || "0"), [balance])}
+ onClick={useCallback(() => setAmount(balance?.formatted || '0'), [balance])}
>
Balance: {balance ? balance.formatted : '0'}
diff --git a/src/pages/MainPage/index.ts b/src/pages/MainPage/index.ts
index 6200f6c..e71de31 100644
--- a/src/pages/MainPage/index.ts
+++ b/src/pages/MainPage/index.ts
@@ -1 +1 @@
-export * from './MainPage';
\ No newline at end of file
+export * from './MainPage';
diff --git a/src/providers/GraphQLProvider.tsx b/src/providers/GraphQLProvider.tsx
index ad042f8..159f51b 100644
--- a/src/providers/GraphQLProvider.tsx
+++ b/src/providers/GraphQLProvider.tsx
@@ -21,9 +21,5 @@ export const GraphQLProvider = ({ children }: { children: any }) => {
});
}, [chainId]);
- return (
-
- {children}
-
- )
-}
+ return
{children} ;
+};
diff --git a/src/providers/Web3ModalProvider.tsx b/src/providers/Web3ModalProvider.tsx
index 0cf9a3c..9abf594 100644
--- a/src/providers/Web3ModalProvider.tsx
+++ b/src/providers/Web3ModalProvider.tsx
@@ -27,11 +27,11 @@ export const modal: Web3Modal = createWeb3Modal({
featuredWalletIds: [BRAWE_WALLET_ID],
includeWalletIds: [BRAWE_WALLET_ID],
themeVariables: {
- '--w3m-accent': '#f37e4b'
- }
+ '--w3m-accent': '#f37e4b',
+ },
});
-export function Web3ModalProvider({ children }: { children: React.ReactNode; }) {
+export function Web3ModalProvider({ children }: { children: React.ReactNode }) {
return (
{children}
diff --git a/src/services/shutter/blst.hpp.ts b/src/services/shutter/blst.hpp.ts
index f44de8b..93d0f6e 100644
--- a/src/services/shutter/blst.hpp.ts
+++ b/src/services/shutter/blst.hpp.ts
@@ -42,7 +42,7 @@ export interface ScalarConstructor {
}
export interface Scalar {
- hash_to (msg: binary_string, DST?: string): this;
+ hash_to(msg: binary_string, DST?: string): this;
dup(): Scalar;
from_bendian(be: bytes): this;
from_lendian(le: bytes): this;
@@ -76,7 +76,7 @@ export interface P1_Affine {
hash_or_encode: boolean,
msg: binary_string,
DST?: string,
- aug?: bytes
+ aug?: bytes,
): BLST_ERROR;
}
@@ -131,7 +131,7 @@ export interface P2_Affine {
hash_or_encode: boolean,
msg: binary_string,
DST?: string,
- aug?: bytes
+ aug?: bytes,
): BLST_ERROR;
}
@@ -192,31 +192,21 @@ export interface PairingConstructor {
}
export interface Pairing {
- aggregate(
- pk: P1_Affine,
- sig: P2_Affine,
- msg: binary_string,
- aug?: bytes
- ): BLST_ERROR;
- aggregate(
- pk: P2_Affine,
- sig: P1_Affine,
- msg: binary_string,
- aug?: bytes
- ): BLST_ERROR;
+ aggregate(pk: P1_Affine, sig: P2_Affine, msg: binary_string, aug?: bytes): BLST_ERROR;
+ aggregate(pk: P2_Affine, sig: P1_Affine, msg: binary_string, aug?: bytes): BLST_ERROR;
mul_n_aggregate(
pk: P1_Affine,
sig: P2_Affine,
scalar: scalar,
msg: binary_string,
- aug?: bytes
+ aug?: bytes,
): BLST_ERROR;
mul_n_aggregate(
pk: P2_Affine,
sig: P1_Affine,
scalar: scalar,
msg: binary_string,
- aug?: bytes
+ aug?: bytes,
): BLST_ERROR;
commit(): void;
merge(ctx: Pairing): BLST_ERROR;
diff --git a/src/services/shutter/encryptDataBlst.ts b/src/services/shutter/encryptDataBlst.ts
index d541429..62d3b3b 100644
--- a/src/services/shutter/encryptDataBlst.ts
+++ b/src/services/shutter/encryptDataBlst.ts
@@ -1,14 +1,10 @@
-import {
- hexToBytes,
- keccak256,
- bytesToBigInt,
- bytesToHex,
- numberToBytes,
-} from "viem";
-import pkg from "lodash";
+import { hexToBytes, keccak256, bytesToBigInt, bytesToHex, numberToBytes } from 'viem';
+import pkg from 'lodash';
const { zip } = pkg;
-import { Blst, P1, P2, PT } from "./blst.hpp.ts";
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-expect-error
+import { Blst, P1, P2, PT } from './blst.hpp.ts';
declare global {
interface Window {
@@ -17,9 +13,8 @@ declare global {
}
const blsSubgroupOrderBytes = [
- 0x73, 0xed, 0xa7, 0x53, 0x29, 0x9d, 0x7d, 0x48, 0x33, 0x39, 0xd8, 0x08, 0x09,
- 0xa1, 0xd8, 0x05, 0x53, 0xbd, 0xa4, 0x02, 0xff, 0xfe, 0x5b, 0xfe, 0xff, 0xff,
- 0xff, 0xff, 0x00, 0x00, 0x00, 0x01,
+ 0x73, 0xed, 0xa7, 0x53, 0x29, 0x9d, 0x7d, 0x48, 0x33, 0x39, 0xd8, 0x08, 0x09, 0xa1, 0xd8, 0x05,
+ 0x53, 0xbd, 0xa4, 0x02, 0xff, 0xfe, 0x5b, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01,
];
const blsSubgroupOrder = bytesToBigInt(Uint8Array.from(blsSubgroupOrderBytes));
@@ -27,7 +22,7 @@ export async function encryptData(
msgHex: `0x${string}`,
identityPreimageHex: `0x${string}`,
eonKeyHex: `0x${string}`,
- sigmaHex: `0x${string}`
+ sigmaHex: `0x${string}`,
) {
const identity = await computeIdentityP1(identityPreimageHex);
const eonKey = await computeEonKeyP2(eonKeyHex);
@@ -37,15 +32,13 @@ export async function encryptData(
}
export async function computeIdentityP1(preimage: `0x${string}`): Promise {
- const preimageBytes = hexToBytes(
- ("0x1" + preimage.slice(2)) as `0x${string}`
- );
+ const preimageBytes = hexToBytes(('0x1' + preimage.slice(2)) as `0x${string}`);
const blst = window.blst;
const identity = new blst.P1().hash_to(
preimageBytes,
- "SHUTTER_V01_BLS12381G1_XMD:SHA-256_SSWU_RO_",
- null
+ 'SHUTTER_V01_BLS12381G1_XMD:SHA-256_SSWU_RO_',
+ null,
);
return identity;
@@ -57,18 +50,13 @@ async function computeEonKeyP2(eonKeyHex: `0x${string}`): Promise {
return eonKey;
}
-async function encrypt(
- msgHex: `0x${string}`,
- identity: P1,
- eonKey: P2,
- sigmaHex: `0x${string}`
-) {
+async function encrypt(msgHex: `0x${string}`, identity: P1, eonKey: P2, sigmaHex: `0x${string}`) {
const r = computeR(sigmaHex.slice(2), msgHex.slice(2));
const c1 = computeC1(r);
const c2 = await computeC2(sigmaHex, r, identity, eonKey);
const c3 = computeC3(
padAndSplit(hexToBytes(msgHex as `0x${string}`)),
- hexToBytes(sigmaHex as `0x${string}`)
+ hexToBytes(sigmaHex as `0x${string}`),
);
return {
@@ -111,12 +99,7 @@ function computeC1(r: bigint) {
return c1;
}
-async function computeC2(
- sigmaHex: string,
- r: bigint,
- identity: P1,
- eonKey: P2
-): Promise {
+async function computeC2(sigmaHex: string, r: bigint, identity: P1, eonKey: P2): Promise {
const blst = window.blst;
const p: PT = new blst.PT(identity, eonKey);
@@ -126,15 +109,12 @@ async function computeC2(
return result;
}
-function computeC3(
- messageBlocks: Uint8Array[],
- sigma: Uint8Array
-): Uint8Array[] {
+function computeC3(messageBlocks: Uint8Array[], sigma: Uint8Array): Uint8Array[] {
const keys = computeBlockKeys(sigma, messageBlocks.length);
return zip(keys, messageBlocks).map(([key, block]) => {
if (key === undefined || block === undefined) {
- throw new Error("Key or block is undefined");
+ throw new Error('Key or block is undefined');
}
return xorBlocks(key, block);
});
@@ -146,12 +126,12 @@ function hash2(p: PT): Uint8Array {
const result = new Uint8Array(finalExp.length + 1);
result[0] = 0x2;
result.set(finalExp, 1);
- return keccak256(result, "bytes");
+ return keccak256(result, 'bytes');
}
function hash3(bytesHex: string): bigint {
- const preimage = hexToBytes(("0x3" + bytesHex) as `0x${string}`);
- const hash = keccak256(preimage, "bytes");
+ const preimage = hexToBytes(('0x3' + bytesHex) as `0x${string}`);
+ const hash = keccak256(preimage, 'bytes');
const bigIntHash = bytesToBigInt(hash);
const result = bigIntHash % blsSubgroupOrder;
return result;
@@ -161,14 +141,14 @@ function hash4(bytes: Uint8Array): Uint8Array {
const preimage = new Uint8Array(bytes.length + 1);
preimage[0] = 0x4;
preimage.set(bytes, 1);
- const hash = keccak256(preimage, "bytes");
+ const hash = keccak256(preimage, 'bytes');
return hash;
}
//======================================
function xorBlocks(x: Uint8Array, y: Uint8Array): Uint8Array {
if (x.length !== y.length) {
- throw new Error("Both byte arrays must be of the same length.");
+ throw new Error('Both byte arrays must be of the same length.');
}
const result = new Uint8Array(x.length);
diff --git a/src/shared/ShutterTimer/ShutterTimer.tsx b/src/shared/ShutterTimer/ShutterTimer.tsx
index 5a8f5f6..fc13d7a 100644
--- a/src/shared/ShutterTimer/ShutterTimer.tsx
+++ b/src/shared/ShutterTimer/ShutterTimer.tsx
@@ -12,12 +12,36 @@ const SLOTS_PER_EPOCH = 16;
// const EPOCH_DURATION = SLOT_TIME * SLOTS_PER_EPOCH;
const getEpoch = (genesisTime: number) => {
- return Math.floor(((Date.now() / 1000) - genesisTime) / SLOT_TIME / SLOTS_PER_EPOCH);
-}
+ return Math.floor((Date.now() / 1000 - genesisTime) / SLOT_TIME / SLOTS_PER_EPOCH);
+};
const getSlot = (genesisTime: number) => {
- return Math.floor(((Date.now() / 1000) - genesisTime) / SLOT_TIME);
-}
+ return Math.floor((Date.now() / 1000 - genesisTime) / SLOT_TIME);
+};
+
+const getLoadingLabel = ({
+ isValidatorsLoading,
+ isProposersLoading,
+ isWaiting,
+ timeDifference,
+}: {
+ isValidatorsLoading: boolean;
+ isProposersLoading: boolean;
+ isWaiting: boolean;
+ timeDifference: number;
+}) => {
+ if (isValidatorsLoading) {
+ return 'Fetching shutter validators...';
+ }
+ if (isWaiting) {
+ return 'Waiting for epoch with shutter validators...';
+ }
+ if (isProposersLoading) {
+ return 'Fetching proposers...';
+ }
+
+ return `Next Shutter transactions will be included in ~${timeDifference} seconds`;
+};
export const ShutterTimer = () => {
const chainId = useChainId();
@@ -25,10 +49,16 @@ export const ShutterTimer = () => {
const [currentEpoch, setCurrentEpoch] = useState(getEpoch(chain.genesisTime));
const [timeDifference, setTimeDifference] = useState(0);
+ // waiting for next epoch
+ const [isWaiting, setIsWaiting] = useState(false);
- const { validatorIndexes: shutteredValidatorIndexes, isLoading } = useGetShutterValidatorIndexes(chainId);
+ const { validatorIndexes: shutteredValidatorIndexes, isLoading: isValidatorsLoading } =
+ useGetShutterValidatorIndexes(chainId);
- const { data: dutiesProposer } = useFetchDutiesProposer(chain.gbcUrl, currentEpoch);
+ const { data: dutiesProposer, isLoading: isProposersLoading } = useFetchDutiesProposer(
+ chain.gbcUrl,
+ currentEpoch,
+ );
const matches = useMemo(() => {
if (!shutteredValidatorIndexes || !dutiesProposer) return;
@@ -40,6 +70,11 @@ export const ShutterTimer = () => {
// console.log({ shutteredValidatorIndexes, dutiesProposer, currentEpoch, matches });
+ useEffect(() => {
+ setCurrentEpoch(getEpoch(chain.genesisTime));
+ setIsWaiting(false);
+ }, [chain]);
+
useEffect(() => {
if (!dutiesProposer || !matches) return;
@@ -49,8 +84,18 @@ export const ShutterTimer = () => {
if (!match) {
setTimeDifference(0);
- setCurrentEpoch(currentEpoch + 1);
- clearInterval(interval);
+
+ const nextEpochStart = chain.genesisTime + (currentEpoch + 1) * SLOTS_PER_EPOCH * SLOT_TIME;
+ const oneEpochAhead = Date.now() / 1000 + SLOTS_PER_EPOCH * SLOT_TIME;
+
+ if (nextEpochStart < oneEpochAhead) {
+ setCurrentEpoch(currentEpoch + 1);
+ clearInterval(interval);
+ setIsWaiting(false);
+ } else {
+ setIsWaiting(true);
+ }
+
return;
}
@@ -65,21 +110,30 @@ export const ShutterTimer = () => {
return (
- {isLoading ? (
-
- ) : (
-
+
+ {isValidatorsLoading || isProposersLoading || isWaiting ? (
+
+ ) : (
-
- )}
+ )}
+
- )
+ );
};
diff --git a/src/shared/ShutterTimer/ValidatorRegistryQL.ts b/src/shared/ShutterTimer/ValidatorRegistryQL.ts
index b60c92a..92959c8 100644
--- a/src/shared/ShutterTimer/ValidatorRegistryQL.ts
+++ b/src/shared/ShutterTimer/ValidatorRegistryQL.ts
@@ -1,12 +1,17 @@
import { gql } from '@apollo/client';
export const GET_UPDATES = gql`
- query GetUpdates($first: Int!, $lastBlockNumber: Int!) {
- updateds(first: $first, orderBy: blockNumber, orderDirection: asc, where: { blockNumber_gte: $lastBlockNumber }) {
- id
- message
- signature
- blockNumber
- }
+ query GetUpdates($first: Int!, $lastBlockNumber: Int!) {
+ updateds(
+ first: $first
+ orderBy: blockNumber
+ orderDirection: asc
+ where: { blockNumber_gte: $lastBlockNumber }
+ ) {
+ id
+ message
+ signature
+ blockNumber
}
+ }
`;
diff --git a/src/shared/ShutterTimer/index.ts b/src/shared/ShutterTimer/index.ts
index 9954be1..8f5e3ec 100644
--- a/src/shared/ShutterTimer/index.ts
+++ b/src/shared/ShutterTimer/index.ts
@@ -1 +1 @@
-export * from './ShutterTimer';
\ No newline at end of file
+export * from './ShutterTimer';
diff --git a/src/shared/ShutterTimer/useFetchDutiesProposer.ts b/src/shared/ShutterTimer/useFetchDutiesProposer.ts
index 16d94a7..e476ab6 100644
--- a/src/shared/ShutterTimer/useFetchDutiesProposer.ts
+++ b/src/shared/ShutterTimer/useFetchDutiesProposer.ts
@@ -5,19 +5,20 @@ const DUTIES_PROPOSER_ENDPOINT = 'validator/duties/proposer';
// query
const DUTIES_PROPOSER_QUERY_KEY = 'duties-proposer';
-export const useFetchDutiesProposer = (gbcUrl: string, epoch: number) => useQuery({
- queryKey: [DUTIES_PROPOSER_QUERY_KEY, epoch],
- queryFn: async () => {
- try {
- const res = await fetch(`${gbcUrl}/${BASE_ENDPOINT}/${DUTIES_PROPOSER_ENDPOINT}/${epoch}`);
- const data = await res.json();
+export const useFetchDutiesProposer = (gbcUrl: string, epoch: number) =>
+ useQuery({
+ queryKey: [DUTIES_PROPOSER_QUERY_KEY, epoch],
+ queryFn: async () => {
+ try {
+ const res = await fetch(`${gbcUrl}/${BASE_ENDPOINT}/${DUTIES_PROPOSER_ENDPOINT}/${epoch}`);
+ const data = await res.json();
- console.log('[service][rpc-gbc] queried duties proposer', { data: data.data });
+ console.log('[service][rpc-gbc] queried duties proposer', { data: data.data });
- return data.data;
- } catch (error) {
- console.error('[service][apollo] Failed to query duties proposer', error);
- }
- },
- enabled: Boolean(gbcUrl),
-});
+ return data.data;
+ } catch (error) {
+ console.error('[service][apollo] Failed to query duties proposer', error);
+ }
+ },
+ enabled: Boolean(gbcUrl),
+ });
diff --git a/src/shared/ShutterTimer/useGetShutterValidatorIndexes.ts b/src/shared/ShutterTimer/useGetShutterValidatorIndexes.ts
index 7060e00..178ad11 100644
--- a/src/shared/ShutterTimer/useGetShutterValidatorIndexes.ts
+++ b/src/shared/ShutterTimer/useGetShutterValidatorIndexes.ts
@@ -26,10 +26,14 @@ function extractSubscriptionStatus(messageHex: string) {
}
export const useGetShutterValidatorIndexes = (chainId: number) => {
- const { validatorIndexes, lastBlockNumber} = useValidatorIndexesStore(state => state[chainId]);
+ const { validatorIndexes, lastBlockNumber } = useValidatorIndexesStore((state) => state[chainId]);
const { _hasHydrated, setValidatorIndexes, setLastBlockNumber } = useValidatorIndexesStore();
- const { data: logs, isLoading } = useGetValidatorRegistryLogs(chainId, lastBlockNumber, _hasHydrated);
+ const { data: logs, isLoading } = useGetValidatorRegistryLogs(
+ chainId,
+ lastBlockNumber,
+ _hasHydrated,
+ );
useEffect(() => {
let currentIndexes = validatorIndexes;
@@ -60,11 +64,10 @@ export const useGetShutterValidatorIndexes = (chainId: number) => {
setValidatorIndexes([...currentIndexes, ...indexes], chainId);
setLastBlockNumber(newLastBlock, chainId);
}
-
}, [logs]);
return {
validatorIndexes,
isLoading,
- }
+ };
};
diff --git a/src/shared/ShutterTimer/useGetValidatorRegistryLogs.ts b/src/shared/ShutterTimer/useGetValidatorRegistryLogs.ts
index 951f70f..d95a26d 100644
--- a/src/shared/ShutterTimer/useGetValidatorRegistryLogs.ts
+++ b/src/shared/ShutterTimer/useGetValidatorRegistryLogs.ts
@@ -4,16 +4,20 @@ import { useLazyQuery } from '@apollo/client';
import { GET_UPDATES } from './ValidatorRegistryQL';
export interface ValidatorRegistryLog {
- message: string,
- signature: string,
- blockNumber: string,
+ message: string;
+ signature: string;
+ blockNumber: string;
}
const SUB_GRAPH_MAX_QUERY_LOGS = 1000;
// query
const LOGS_QUERY_KEY = 'logs';
-export const useGetValidatorRegistryLogs = (chainId: number, lastBlockNumber: number, enabled: boolean) => {
+export const useGetValidatorRegistryLogs = (
+ chainId: number,
+ lastBlockNumber: number,
+ enabled: boolean,
+) => {
const [getUpdates] = useLazyQuery(GET_UPDATES);
return useQuery({
@@ -24,9 +28,13 @@ export const useGetValidatorRegistryLogs = (chainId: number, lastBlockNumber: nu
// eslint-disable-next-line no-constant-condition
while (true) {
- const blockNumber = allLogs.length ? allLogs[allLogs.length - 1].blockNumber : lastBlockNumber;
+ const blockNumber = allLogs.length
+ ? allLogs[allLogs.length - 1].blockNumber
+ : lastBlockNumber;
- const response = await getUpdates({ variables: { first: SUB_GRAPH_MAX_QUERY_LOGS, lastBlockNumber: Number(blockNumber) }});
+ const response = await getUpdates({
+ variables: { first: SUB_GRAPH_MAX_QUERY_LOGS, lastBlockNumber: Number(blockNumber) },
+ });
const logs = response.data?.updateds;
diff --git a/src/stores/createSelectors.ts b/src/stores/createSelectors.ts
index 68394ee..3f2ba15 100644
--- a/src/stores/createSelectors.ts
+++ b/src/stores/createSelectors.ts
@@ -4,14 +4,12 @@ type WithSelectors = S extends { getState: () => infer T }
? S & { use: { [K in keyof T]: () => T[K] } }
: never;
-export const createSelectors = >>(
- _store: S,
-) => {
- let store = _store as WithSelectors
- store.use = {}
- for (let k of Object.keys(store.getState())) {
- ;(store.use as any)[k] = () => store((s) => s[k as keyof typeof s])
+export const createSelectors = >>(_store: S) => {
+ const store = _store as WithSelectors;
+ store.use = {};
+ for (const k of Object.keys(store.getState())) {
+ (store.use as any)[k] = () => store((s) => s[k as keyof typeof s]);
}
- return store
+ return store;
};
diff --git a/src/stores/useValidatorIndexesStore.ts b/src/stores/useValidatorIndexesStore.ts
index 8a46f06..93cf9f5 100644
--- a/src/stores/useValidatorIndexesStore.ts
+++ b/src/stores/useValidatorIndexesStore.ts
@@ -6,20 +6,20 @@ import { createSelectors } from './createSelectors';
type State = {
[key: number]: {
- validatorIndexes: number[],
- lastBlockNumber: number,
- },
+ validatorIndexes: number[];
+ lastBlockNumber: number;
+ };
- _hasHydrated: boolean,
+ _hasHydrated: boolean;
};
type Action = {
- setValidatorIndexes: (validatorIndexes: number[], chainId: number) => void,
- addValidatorIndex: (validatorIndex: number, chainId: number) => void,
- removeValidatorIndex: (validatorIndex: number, chainId: number) => void,
- setLastBlockNumber: (lastBlockNumber: number, chainId: number) => void,
+ setValidatorIndexes: (validatorIndexes: number[], chainId: number) => void;
+ addValidatorIndex: (validatorIndex: number, chainId: number) => void;
+ removeValidatorIndex: (validatorIndex: number, chainId: number) => void;
+ setLastBlockNumber: (lastBlockNumber: number, chainId: number) => void;
- setHasHydrated: (state: boolean) => void,
+ setHasHydrated: (state: boolean) => void;
};
const useValidatorIndexesStoreBase = create()(
@@ -37,56 +37,62 @@ const useValidatorIndexesStoreBase = create()(
_hasHydrated: false,
setHasHydrated: (state) => set({ _hasHydrated: state }),
- setValidatorIndexes: (validatorIndexes, chainId) => set((state) => {
- return {
- [chainId]: {
- validatorIndexes: validatorIndexes,
- lastBlockNumber: state[chainId].lastBlockNumber,
- }
- };
- }),
- addValidatorIndex: (validatorIndex, chainId) => set((state) => {
- return {
- [chainId]: {
- validatorIndexes: [...state[chainId].validatorIndexes, validatorIndex],
- lastBlockNumber: state[chainId].lastBlockNumber,
- }
- }
- }),
- removeValidatorIndex: (validatorIndex, chainId) => set((state) => {
- return {
- [chainId]: {
- validatorIndexes: state[chainId].validatorIndexes.filter((index) => index !== validatorIndex),
- lastBlockNumber: state[chainId].lastBlockNumber,
- }
- };
- }),
- setLastBlockNumber: (lastBlockNumber, chainId) => set((state) => {
- return {
- [chainId]: {
- validatorIndexes: state[chainId].validatorIndexes,
- lastBlockNumber: lastBlockNumber,
- }
- };
- }),
+ setValidatorIndexes: (validatorIndexes, chainId) =>
+ set((state) => {
+ return {
+ [chainId]: {
+ validatorIndexes: validatorIndexes,
+ lastBlockNumber: state[chainId].lastBlockNumber,
+ },
+ };
+ }),
+ addValidatorIndex: (validatorIndex, chainId) =>
+ set((state) => {
+ return {
+ [chainId]: {
+ validatorIndexes: [...state[chainId].validatorIndexes, validatorIndex],
+ lastBlockNumber: state[chainId].lastBlockNumber,
+ },
+ };
+ }),
+ removeValidatorIndex: (validatorIndex, chainId) =>
+ set((state) => {
+ return {
+ [chainId]: {
+ validatorIndexes: state[chainId].validatorIndexes.filter(
+ (index) => index !== validatorIndex,
+ ),
+ lastBlockNumber: state[chainId].lastBlockNumber,
+ },
+ };
+ }),
+ setLastBlockNumber: (lastBlockNumber, chainId: number) =>
+ set((state) => {
+ return {
+ [chainId]: {
+ validatorIndexes: state[chainId].validatorIndexes,
+ lastBlockNumber: lastBlockNumber,
+ },
+ };
+ }),
}),
{
name: 'validator-indexes-storage', // name of the item in the storage (must be unique)
storage: createJSONStorage(() => window.localStorage), // (optional) by default, 'localStorage' is used
onRehydrateStorage: () => {
- console.log('hydration starts')
+ console.log('hydration starts');
return (state, error) => {
console.debug({ state });
if (error) {
- console.log('an error happened during hydration', error)
+ console.log('an error happened during hydration', error);
} else {
state?.setHasHydrated(true);
- console.log('hydration finished')
+ console.log('hydration finished');
}
- }
+ };
},
},
),
diff --git a/src/utils/eth.ts b/src/utils/eth.ts
index 3b05939..bb12d0d 100644
--- a/src/utils/eth.ts
+++ b/src/utils/eth.ts
@@ -3,12 +3,16 @@ import { utils } from 'ethers';
const functionSignature = 'transfer(address,uint256)';
const functionSelector = utils.id(functionSignature).slice(0, 10);
-export const encodeDataForTransfer = (recipientAddress: string, amount: number, decimals: number) => {
+export const encodeDataForTransfer = (
+ recipientAddress: string,
+ amount: number,
+ decimals: number,
+) => {
const tokenAmount = utils.parseUnits(amount.toString(), decimals);
const params = utils.defaultAbiCoder.encode(
- ["address", "uint256"],
- [recipientAddress, tokenAmount]
+ ['address', 'uint256'],
+ [recipientAddress, tokenAmount],
);
return functionSelector + params.slice(2);
diff --git a/src/utils/mappers.ts b/src/utils/mappers.ts
index 25c3dd8..4bef792 100644
--- a/src/utils/mappers.ts
+++ b/src/utils/mappers.ts
@@ -1,4 +1,3 @@
-
export const mapChainToOption = (chainData: any) => {
return {
...chainData,
@@ -6,7 +5,7 @@ export const mapChainToOption = (chainData: any) => {
label: chainData.name,
value: String(chainData.id),
avatar: chainData.img,
- }
+ };
};
export const mapChainsToOptions = (chains: any) => chains.map(mapChainToOption);
diff --git a/tailwind.config.js b/tailwind.config.js
index 642cfd1..4d34a0d 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,25 +1,29 @@
-import { nextui } from "@nextui-org/react";
+import { nextui } from '@nextui-org/react';
/** @type {import('tailwindcss').Config} */
export default {
- content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}", "./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}"],
+ content: [
+ './index.html',
+ './src/**/*.{js,ts,jsx,tsx}',
+ './node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}',
+ ],
theme: {
extend: {},
},
- darkMode: "class",
+ darkMode: 'class',
plugins: [
nextui({
- defaultTheme: "light",
+ defaultTheme: 'light',
themes: {
light: {
colors: {
primary: {
- DEFAULT: "#3E6957",
+ DEFAULT: '#3E6957',
},
- secondary: "#f0ebde",
- foreground: "#ffffff",
+ secondary: '#f0ebde',
+ foreground: '#ffffff',
danger: {
- DEFAULT: "#f37e4b",
+ DEFAULT: '#f37e4b',
},
},
},
diff --git a/thegraph/m-shutter-validator-registry/src/validator-registry.ts b/thegraph/m-shutter-validator-registry/src/validator-registry.ts
index e537fe0..81f039e 100644
--- a/thegraph/m-shutter-validator-registry/src/validator-registry.ts
+++ b/thegraph/m-shutter-validator-registry/src/validator-registry.ts
@@ -1,16 +1,14 @@
-import { Updated as UpdatedEvent } from "../generated/ValidatorRegistry/ValidatorRegistry"
-import { Updated } from "../generated/schema"
+import { Updated as UpdatedEvent } from '../generated/ValidatorRegistry/ValidatorRegistry';
+import { Updated } from '../generated/schema';
export function handleUpdated(event: UpdatedEvent): void {
- let entity = new Updated(
- event.transaction.hash.concatI32(event.logIndex.toI32())
- )
- entity.message = event.params.message
- entity.signature = event.params.signature
+ const entity = new Updated(event.transaction.hash.concatI32(event.logIndex.toI32()));
+ entity.message = event.params.message;
+ entity.signature = event.params.signature;
- entity.blockNumber = event.block.number
- entity.blockTimestamp = event.block.timestamp
- entity.transactionHash = event.transaction.hash
+ entity.blockNumber = event.block.number;
+ entity.blockTimestamp = event.block.timestamp;
+ entity.transactionHash = event.transaction.hash;
- entity.save()
+ entity.save();
}
diff --git a/thegraph/m-shutter-validator-registry/tests/validator-registry-utils.ts b/thegraph/m-shutter-validator-registry/tests/validator-registry-utils.ts
index e6714b2..4f1a42a 100644
--- a/thegraph/m-shutter-validator-registry/tests/validator-registry-utils.ts
+++ b/thegraph/m-shutter-validator-registry/tests/validator-registry-utils.ts
@@ -1,18 +1,18 @@
-import { newMockEvent } from "matchstick-as"
-import { ethereum, Bytes } from "@graphprotocol/graph-ts"
-import { Updated } from "../generated/ValidatorRegistry/ValidatorRegistry"
+import { newMockEvent } from 'matchstick-as';
+import { ethereum, Bytes } from '@graphprotocol/graph-ts';
+import { Updated } from '../generated/ValidatorRegistry/ValidatorRegistry';
export function createUpdatedEvent(message: Bytes, signature: Bytes): Updated {
- let updatedEvent = changetype(newMockEvent())
+ const updatedEvent = changetype(newMockEvent());
- updatedEvent.parameters = new Array()
+ updatedEvent.parameters = [];
updatedEvent.parameters.push(
- new ethereum.EventParam("message", ethereum.Value.fromBytes(message))
- )
+ new ethereum.EventParam('message', ethereum.Value.fromBytes(message)),
+ );
updatedEvent.parameters.push(
- new ethereum.EventParam("signature", ethereum.Value.fromBytes(signature))
- )
+ new ethereum.EventParam('signature', ethereum.Value.fromBytes(signature)),
+ );
- return updatedEvent
+ return updatedEvent;
}
diff --git a/thegraph/m-shutter-validator-registry/tests/validator-registry.test.ts b/thegraph/m-shutter-validator-registry/tests/validator-registry.test.ts
index b3b0565..03cd530 100644
--- a/thegraph/m-shutter-validator-registry/tests/validator-registry.test.ts
+++ b/thegraph/m-shutter-validator-registry/tests/validator-registry.test.ts
@@ -4,50 +4,50 @@ import {
test,
clearStore,
beforeAll,
- afterAll
-} from "matchstick-as/assembly/index"
-import { Bytes } from "@graphprotocol/graph-ts"
-import { Updated } from "../generated/schema"
-import { Updated as UpdatedEvent } from "../generated/ValidatorRegistry/ValidatorRegistry"
-import { handleUpdated } from "../src/validator-registry"
-import { createUpdatedEvent } from "./validator-registry-utils"
+ afterAll,
+} from 'matchstick-as/assembly/index';
+import { Bytes } from '@graphprotocol/graph-ts';
+import { Updated } from '../generated/schema';
+import { Updated as UpdatedEvent } from '../generated/ValidatorRegistry/ValidatorRegistry';
+import { handleUpdated } from '../src/validator-registry';
+import { createUpdatedEvent } from './validator-registry-utils';
// Tests structure (matchstick-as >=0.5.0)
// https://thegraph.com/docs/en/developer/matchstick/#tests-structure-0-5-0
-describe("Describe entity assertions", () => {
+describe('Describe entity assertions', () => {
beforeAll(() => {
- let message = Bytes.fromI32(1234567890)
- let signature = Bytes.fromI32(1234567890)
- let newUpdatedEvent = createUpdatedEvent(message, signature)
- handleUpdated(newUpdatedEvent)
- })
+ const message = Bytes.fromI32(1234567890);
+ const signature = Bytes.fromI32(1234567890);
+ const newUpdatedEvent = createUpdatedEvent(message, signature);
+ handleUpdated(newUpdatedEvent);
+ });
afterAll(() => {
- clearStore()
- })
+ clearStore();
+ });
// For more test scenarios, see:
// https://thegraph.com/docs/en/developer/matchstick/#write-a-unit-test
- test("Updated created and stored", () => {
- assert.entityCount("Updated", 1)
+ test('Updated created and stored', () => {
+ assert.entityCount('Updated', 1);
// 0xa16081f360e3847006db660bae1c6d1b2e17ec2a is the default address used in newMockEvent() function
assert.fieldEquals(
- "Updated",
- "0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1",
- "message",
- "1234567890"
- )
+ 'Updated',
+ '0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1',
+ 'message',
+ '1234567890',
+ );
assert.fieldEquals(
- "Updated",
- "0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1",
- "signature",
- "1234567890"
- )
+ 'Updated',
+ '0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1',
+ 'signature',
+ '1234567890',
+ );
// More assert options:
// https://thegraph.com/docs/en/developer/matchstick/#asserts
- })
-})
+ });
+});
diff --git a/thegraph/shutter-validator-registry/src/validator-registry.ts b/thegraph/shutter-validator-registry/src/validator-registry.ts
index 030dd20..7f914f7 100644
--- a/thegraph/shutter-validator-registry/src/validator-registry.ts
+++ b/thegraph/shutter-validator-registry/src/validator-registry.ts
@@ -2,7 +2,7 @@ import { Bytes, BigInt } from '@graphprotocol/graph-ts';
import { Updated as UpdatedEvent } from '../generated/ValidatorRegistry/ValidatorRegistry';
import { Updated } from '../generated/schema';
-function extractValidatorIndex(messageBytes: Bytes): BigInt {
+function extractValidatorIndex(messageBytes: Bytes): bigint {
// Convert hex to bytes
// const messageBytes = utils.arrayify(messageHex);
@@ -26,17 +26,15 @@ function extractSubscriptionStatus(messageBytes: Bytes): boolean {
}
export function handleUpdated(event: UpdatedEvent): void {
- const entity = new Updated(
- event.transaction.hash.concatI32(event.logIndex.toI32())
- )
+ const entity = new Updated(event.transaction.hash.concatI32(event.logIndex.toI32()));
entity.message = event.params.message;
entity.signature = event.params.signature;
entity.validatorIndex = extractValidatorIndex(event.params.message);
entity.subscriptionStatus = extractSubscriptionStatus(event.params.message);
- entity.blockNumber = event.block.number
- entity.blockTimestamp = event.block.timestamp
- entity.transactionHash = event.transaction.hash
+ entity.blockNumber = event.block.number;
+ entity.blockTimestamp = event.block.timestamp;
+ entity.transactionHash = event.transaction.hash;
- entity.save()
+ entity.save();
}
diff --git a/thegraph/shutter-validator-registry/tests/validator-registry-utils.ts b/thegraph/shutter-validator-registry/tests/validator-registry-utils.ts
index e6714b2..4f1a42a 100644
--- a/thegraph/shutter-validator-registry/tests/validator-registry-utils.ts
+++ b/thegraph/shutter-validator-registry/tests/validator-registry-utils.ts
@@ -1,18 +1,18 @@
-import { newMockEvent } from "matchstick-as"
-import { ethereum, Bytes } from "@graphprotocol/graph-ts"
-import { Updated } from "../generated/ValidatorRegistry/ValidatorRegistry"
+import { newMockEvent } from 'matchstick-as';
+import { ethereum, Bytes } from '@graphprotocol/graph-ts';
+import { Updated } from '../generated/ValidatorRegistry/ValidatorRegistry';
export function createUpdatedEvent(message: Bytes, signature: Bytes): Updated {
- let updatedEvent = changetype(newMockEvent())
+ const updatedEvent = changetype(newMockEvent());
- updatedEvent.parameters = new Array()
+ updatedEvent.parameters = [];
updatedEvent.parameters.push(
- new ethereum.EventParam("message", ethereum.Value.fromBytes(message))
- )
+ new ethereum.EventParam('message', ethereum.Value.fromBytes(message)),
+ );
updatedEvent.parameters.push(
- new ethereum.EventParam("signature", ethereum.Value.fromBytes(signature))
- )
+ new ethereum.EventParam('signature', ethereum.Value.fromBytes(signature)),
+ );
- return updatedEvent
+ return updatedEvent;
}
diff --git a/thegraph/shutter-validator-registry/tests/validator-registry.test.ts b/thegraph/shutter-validator-registry/tests/validator-registry.test.ts
index b3b0565..03cd530 100644
--- a/thegraph/shutter-validator-registry/tests/validator-registry.test.ts
+++ b/thegraph/shutter-validator-registry/tests/validator-registry.test.ts
@@ -4,50 +4,50 @@ import {
test,
clearStore,
beforeAll,
- afterAll
-} from "matchstick-as/assembly/index"
-import { Bytes } from "@graphprotocol/graph-ts"
-import { Updated } from "../generated/schema"
-import { Updated as UpdatedEvent } from "../generated/ValidatorRegistry/ValidatorRegistry"
-import { handleUpdated } from "../src/validator-registry"
-import { createUpdatedEvent } from "./validator-registry-utils"
+ afterAll,
+} from 'matchstick-as/assembly/index';
+import { Bytes } from '@graphprotocol/graph-ts';
+import { Updated } from '../generated/schema';
+import { Updated as UpdatedEvent } from '../generated/ValidatorRegistry/ValidatorRegistry';
+import { handleUpdated } from '../src/validator-registry';
+import { createUpdatedEvent } from './validator-registry-utils';
// Tests structure (matchstick-as >=0.5.0)
// https://thegraph.com/docs/en/developer/matchstick/#tests-structure-0-5-0
-describe("Describe entity assertions", () => {
+describe('Describe entity assertions', () => {
beforeAll(() => {
- let message = Bytes.fromI32(1234567890)
- let signature = Bytes.fromI32(1234567890)
- let newUpdatedEvent = createUpdatedEvent(message, signature)
- handleUpdated(newUpdatedEvent)
- })
+ const message = Bytes.fromI32(1234567890);
+ const signature = Bytes.fromI32(1234567890);
+ const newUpdatedEvent = createUpdatedEvent(message, signature);
+ handleUpdated(newUpdatedEvent);
+ });
afterAll(() => {
- clearStore()
- })
+ clearStore();
+ });
// For more test scenarios, see:
// https://thegraph.com/docs/en/developer/matchstick/#write-a-unit-test
- test("Updated created and stored", () => {
- assert.entityCount("Updated", 1)
+ test('Updated created and stored', () => {
+ assert.entityCount('Updated', 1);
// 0xa16081f360e3847006db660bae1c6d1b2e17ec2a is the default address used in newMockEvent() function
assert.fieldEquals(
- "Updated",
- "0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1",
- "message",
- "1234567890"
- )
+ 'Updated',
+ '0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1',
+ 'message',
+ '1234567890',
+ );
assert.fieldEquals(
- "Updated",
- "0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1",
- "signature",
- "1234567890"
- )
+ 'Updated',
+ '0xa16081f360e3847006db660bae1c6d1b2e17ec2a-1',
+ 'signature',
+ '1234567890',
+ );
// More assert options:
// https://thegraph.com/docs/en/developer/matchstick/#asserts
- })
-})
+ });
+});
diff --git a/tsconfig.app.json b/tsconfig.app.json
deleted file mode 100644
index a2385e4..0000000
--- a/tsconfig.app.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
- "target": "ES2020",
- "useDefineForClassFields": true,
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
- "module": "ESNext",
- "skipLibCheck": true,
-
- /* Bundler mode */
- "moduleResolution": "bundler",
- "allowImportingTsExtensions": true,
- "resolveJsonModule": true,
- "isolatedModules": true,
- "moduleDetection": "force",
- "noEmit": true,
- "jsx": "react-jsx",
-
- /* Linting */
- "strict": true,
- "noUnusedLocals": true,
- "noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true,
-
- "paths": {
- "@/*": ["./src/*"]
- }
- },
- "include": ["src"]
-}
diff --git a/tsconfig.json b/tsconfig.json
index ea9d0cd..459b71b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,11 +1,35 @@
{
- "files": [],
- "references": [
- {
- "path": "./tsconfig.app.json"
+ "compilerOptions": {
+ "allowJs": true,
+ "baseUrl": ".",
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "lib": [
+ "dom",
+ "dom.iterable",
+ "esnext",
+ "ES2020",
+ ],
+ "module": "esnext",
+ "moduleResolution": "node",
+ "noEmit": true,
+ "resolveJsonModule": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "target": "ES2020",
+ "paths": {
+ "@/*": ["./src/*"]
},
- {
- "path": "./tsconfig.node.json"
- }
+ "incremental": true
+ },
+ "include": [
+ "src/**/*"
+ ],
+ "exclude": [
+ "node_modules",
+ "thegraph",
+ "public"
]
}
diff --git a/tsconfig.node.json b/tsconfig.node.json
deleted file mode 100644
index 3afdd6e..0000000
--- a/tsconfig.node.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "compilerOptions": {
- "composite": true,
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
- "skipLibCheck": true,
- "module": "ESNext",
- "moduleResolution": "bundler",
- "allowSyntheticDefaultImports": true,
- "strict": true,
- "noEmit": true
- },
- "include": ["vite.config.ts"]
-}
diff --git a/vite.config.ts b/vite.config.ts
index bbc4ffc..71b77d8 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,15 +1,15 @@
-import { defineConfig } from "vite";
-import react from "@vitejs/plugin-react";
+import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
define: {
- "process.env": process.env,
+ 'process.env': process.env,
},
plugins: [react()],
resolve: {
alias: {
- "@/": "/src/",
+ '@/': '/src/',
},
},
});