commit 9b271b47ec4d36021ffd1149772568f6b9a2585f
Author: Hanzo Dev
Date: Fri Apr 4 20:06:12 2025 -0500
Initial commit
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9209ef5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+node_modules
+out
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..8331e25
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,249 @@
+# Changelog
+
+All notable changes to the "hanzo" extension will be documented in this file.
+
+## [1.5.4] - 2025-03-17
+
+### Added
+- Centralized text content management through JSON files for easier customization
+- Enhanced welcome view with larger, centered text focusing on main benefits
+- Simplified onboarding experience with focus on core value proposition
+- Enhanced status bar indicator for non-logged in users with "Hanzo: Login" text
+- Improved visual styling and typography throughout the onboarding experience
+
+## [1.5.3] - 2025-03-17
+
+### Added
+- Enhanced metrics visibility with automatic display after first analysis
+
+## [1.5.2] - 2025-03-14
+
+### Added
+- Converted refinement process into multi-step API calls
+- Added detailed logging for API responses to improve debugging
+
+## [1.5.1] - 2025-03-13
+
+### Added
+- Increased global API request timeout to 300 seconds (5 minutes) for better handling of large projects
+- Added retry mechanism for specification refinement to improve reliability
+- Enhanced error handling for timeout errors with more informative messages
+
+### Changed
+- Improved logging during refinement process with detailed timing information
+- Better user feedback during refinement operations
+
+## [1.5.0] - 2025-03-13
+
+### Added
+- Multi-file specifications
+- IDE-specific organization of specification files:
+ - For Cursor: Main overview in `.cursorrules` and additional files in `.cursor/rules/`
+ - For other IDEs: Main overview in IDE-specific file and additional files in `.hanzo/rules/`
+
+### Changed
+- Removed the SPEC.md file approach in favor of IDE-specific rules files
+
+## [1.4.0] - 2025-03-13
+
+### Added
+- Enhanced UI with improved progress indicators and responsive feedback
+- Optimized chunking system with 4MB chunk size for better performance
+- Improved error handling and user feedback during large file uploads
+
+## [1.3.1] - 2025-03-13
+
+### Added
+- Implemented gzip compression for API requests to reduce data transfer size
+- Enhanced chunking algorithm with intelligent compression ratio analysis
+- Improved handling of large projects with adaptive chunk sizing
+- Added detailed logging for upload process monitoring
+
+## [1.3.0] - 2025-03-13
+
+### Added
+- Enhanced upload reliability for projects of all sizes with optimized chunking algorithm
+
+## [1.2.9] - 2025-03-12
+
+### Added
+- Implemented chunking for large file uploads to handle projects of any size
+- Improved request handling for large codebases by splitting files into manageable chunks
+
+## [1.2.8] - 2025-03-09
+
+### Changed
+- Update readme
+
+## [1.2.7] - 2025-03-09
+
+### Fixed
+- Add login wall
+
+## [1.2.6] - 2025-03-08
+
+### Changed
+- Reduced frequency of reanalysis reminders to be less intrusive
+
+## [1.2.5] - 2025-02-21
+
+### Added
+- Support for Codium (.windsurfrules)
+
+## [1.2.4] - 2025-02-21
+
+### Changed
+- Extension name
+
+## [1.2.3] - 2025-02-16
+
+### Fixed
+- Fixed "webview is disposed" error during analysis operations by making UI updates optional
+
+## [1.2.2] - 2025-02-16
+
+### Added
+- Support for Continue (.continuerules)
+
+## [1.2.1] - 2025-02-16
+
+### Fixed
+- Improved Git extension activation handling for better stability
+- Enhanced error logging for API requests
+- Fixed production initialization issues
+
+## [1.2.0] - 2025-02-16
+
+### Added
+- Add authentication
+- Comprehensive test suite for authentication and API functionality
+- Add reminders
+
+## [1.1.13] - 2025-01-31
+
+### Changed
+- Replaced native fetch with axios for improved HTTP request handling
+- Enhanced error handling with better TypeScript support
+- Improved API communication reliability
+- Added better error messages with response data
+- Streamlined response processing with automatic JSON parsing
+
+## [1.1.11] - 2025-01-30
+
+### Changed
+- Enhanced file collection logging with detailed tree structure output
+- Improved directory scanning with better error handling and progress tracking
+- Added comprehensive logging of included and ignored files for better debugging
+
+## [1.1.10] - 2025-01-22
+
+### Changed
+- Improved reanalysis UX with minimal loading indicators
+ - Added status bar progress indicator
+ - Enhanced progress tracking with detailed stages
+ - Prevented webview from opening during quick reanalysis
+- Made reanalysis more streamlined when triggered via command palette or editor icon
+
+## [1.1.9] - 2025-01-20
+
+### Changed
+- Enhanced directory size reporting with file counts
+- Improved logging with consistent [Hanzo] prefix
+- Better error handling with appropriate log levels
+
+## [1.1.8] - 2025-01-18
+
+### Changed
+- Ignore additional folders relating to testing, CI/CD, and other non-source code files
+
+## [1.1.7] - 2025-01-16
+
+### Changed
+- Allow choice of IDE between Cursor and Copilot
+- Ignore additional folders relating to testing, CI/CD, and other non-source code files
+
+## [1.1.6] - 2025-01-13
+
+### Added
+- Quick access to "Reanalyze" via command palette
+- Always-visible reanalyze button in editor toolbar
+- Keyboard shortcut support for reanalyzing projects
+
+### Changed
+- Improved project reanalysis workflow with better UI feedback
+- Enhanced status updates during reanalysis
+
+## [1.1.5] - 2025-01-05
+
+### Added
+- Directory size tracking and reporting for better debugging (now excludes ignored files)
+- Additional ignored patterns for common build and module folders:
+ - Virtual environments: `.venv`, `venv`, `env`, `.env`
+ - Python cache: `__pycache__`, `.pyc` files
+ - Common build folders: `out`, `target`, `bin`, `obj`, `.output`, `.nuxt`, `.cache`
+ - Static files: images, fonts, media, archives, and more
+
+### Changed
+- Enhanced error logging with directory size report when content length is exceeded
+- Improved directory size calculation to exclude ignored files
+- Better directory size reporting with cleaner output format
+
+## [1.1.4] - 2025-01-05
+
+### Changed
+- Ignore files greater than 50KB during analysis
+
+## [1.1.3] - 2025-01-05
+
+### Changed
+- Enhanced error logging with detailed API request/response information
+- Added '[Hanzo]' prefix to all logs for better filtering
+- Improved error messages with more context and stack traces
+- Better handling of API response parsing errors
+
+## [1.1.2] - 2025-01-04
+
+### Added
+- Improved UI with better button states and transitions
+
+### Changed
+- Improved error handling and user feedback
+- Enhanced file collection service with better logging
+
+## [1.1.1] - 2025-01-02
+
+### Changed
+- Improved file filtering to ignore media files during analysis
+- Add "refinement" to SPEC.md generation
+- Add "reanalyze" button
+
+## [1.1.0] - 2025-01-02
+
+### Added
+- Intelligent project analysis system
+ - Automatic detection of project type (new vs existing)
+ - Smart codebase scanning with selective file filtering
+ - Comprehensive SPEC.md generation
+
+- Improved UI/UX
+ - Single unified "Analyze Project" action
+ - Better loading states and error handling
+ - Cleaner project details input
+
+### Changed
+- Simplified project initialization flow
+- More descriptive user feedback messages
+- Better error handling and recovery
+
+### Technical Improvements
+- Modular code architecture
+- Better type safety
+- Improved file filtering system
+- DRY code improvements
+
+## [1.0.0] - 2024-12-30
+
+### Added
+- Initial release
+- Project overview panel
+- Basic knowledge management features
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..03e771f
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,13 @@
+Copyright 2025 Hanzo AI
+Copyright 2024 Hanzo AI
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a00d569
--- /dev/null
+++ b/README.md
@@ -0,0 +1,85 @@
+# Hanzo AI
+
+Hanzo AI transforms your IDE into a full blown software engineering ninja.
+
+Hanzo seamlessly manages context, tracks changes, and organizes knowledge across your codebase through advanced AI capabilities including vector search, symbolic search, and extended "thinking" processes.
+
+## Features
+
+- **Intelligent Context Management**: Automatically maintains project context across sessions
+- **Vector Search**: Find relevant code and documentation using semantic similarity
+- **Symbolic Search**: Discover code elements through structure and relationships
+- **Extended Thinking**: Leverage advanced reasoning for complex development tasks
+- **MCP Server Integration**: Connect to Meta Model Control Protocol servers for enhanced capabilities
+- **Automatic Documentation**: Generate comprehensive documentation from existing code
+- **Project Analysis**: Create detailed SPEC.md files through codebase analysis
+
+## Usage
+
+1. Open any project in VS Code
+2. Run `Hanzo: Open Project Manager` from the command palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
+3. The project dashboard will appear showing your project overview
+4. Enter additional project details if needed
+5. Click "Analyze Project" to generate specifications
+
+The extension will:
+- Analyze your codebase structure and dependencies
+- Generate a comprehensive SPEC.md file
+- Create/update .cursorrules with project context
+- Build knowledge graphs for enhanced navigation
+
+## Advanced Features
+
+- **Knowledge Management**: Track changes and maintain history across your development lifecycle
+- **Rules-Based Assistance**: Define custom rules for code generation and recommendations
+- **Integration with LLMs**: Connect with various large language models for diverse capabilities
+
+## Debugging
+
+If you encounter "request too long" errors, create a `.hanzoignore` file in your project root using `.gitignore` format:
+
+```
+staticfiles/
+media/
+large-binary.exe
+```
+
+### Large Projects
+
+Hanzo automatically chunks file data when processing:
+- Projects >10MB are split into multiple processing chunks
+- Each chunk is processed separately then combined
+- Progress displays in the VS Code notification area
+
+For persistent size issues:
+1. Exclude more directories in `.hanzoignore`
+2. Remove large binaries or media files
+3. Focus analysis on core source directories
+
+## Installation
+
+Install from VS Code Marketplace:
+1. Open VS Code
+2. Press `Ctrl+P` / `Cmd+P`
+3. Type `ext install namanyayg.hanzo`
+
+## Requirements
+
+- VS Code 1.85.0+
+- Internet connection for AI capabilities
+
+## Extension Settings
+
+Hanzo works immediately without configuration. Access additional settings via:
+- VS Code settings (`Ctrl+,` / `Cmd+,`)
+- Hanzo configuration panel in the extension sidebar
+
+## Known Issues & Limitations
+
+- Large projects may require longer analysis time
+- Some file types excluded from analysis (binaries, media)
+- Performance may vary based on project complexity
+
+## License
+
+Licensed under MIT License. See LICENSE file for details.
diff --git a/SPEC.md b/SPEC.md
new file mode 100644
index 0000000..e3c48bf
--- /dev/null
+++ b/SPEC.md
@@ -0,0 +1,79 @@
+# Technical Specification
+
+## System Overview
+The system is a Visual Studio Code (VS Code) extension designed to facilitate project analysis and management. It integrates with external APIs for authentication and data processing, and provides a user interface within VS Code for interaction. The main components include services for analysis, file collection, reminders, and status updates, as well as authentication management and API client functionalities.
+
+## Core Functionality
+
+### Authentication Management
+- **`AuthManager` (src/auth/manager.ts)**
+ - **Singleton Pattern**: Ensures a single instance is used throughout the application.
+ - **Key Methods**:
+ - `generateRandomToken`: Generates a random token using `crypto.randomBytes`.
+ - `getOrCreateClientId`: Retrieves or creates a client ID stored in VSCode's secrets.
+ - `getStoredToken`, `storeToken`, `clearToken`: Manages the authentication token storage.
+ - `isAuthenticated`, `getAuthToken`: Checks and retrieves the authentication token.
+ - `startPolling`: Polls an external authentication service to check for a valid token.
+ - `initiateAuth`: Initiates the authentication process, including generating auth state, opening an external browser for auth, and starting the polling process.
+ - `logout`: Clears the stored token and stops any ongoing polling.
+
+### API Client
+- **`ApiClient` (src/api/client.ts)**
+ - **`makeAuthenticatedRequest`**: Handles making authenticated API requests.
+ - **Token Retrieval**: Attempts to get an auth token from `AuthManager`.
+ - **Body Stringification and Compression**: Stringifies the request body and compresses it if `shouldGzip` is `true`.
+ - **Request Execution**: Makes the API request with appropriate headers and handles errors.
+ - **Progress Handling**: Optionally shows a progress indicator during the request.
+
+### Project Analysis
+- **`AnalysisService` (src/services/AnalysisService.ts)**
+ - **`analyze(details?: string): Promise`**: Core function that triggers the analysis process. It uses `ProjectManager` to handle the project operation and catches any errors to display them in the status bar and VS Code message window.
+ - **Integration**: Singleton pattern, integration with `StatusBarService` for status updates, and error handling with detailed logging and user notifications.
+
+### File Collection
+- **`FileCollectionService` (src/services/FileCollectionService.ts)**
+ - **`collectFiles(): Promise`**: Main function to collect files from the workspace, respecting ignore patterns and size limits.
+ - **`getDirectorySizeReport(): string`**: Generates a report of directory sizes.
+ - **`getTotalSize(): number`**: Returns the total size of collected files.
+ - **Integration**: Uses async generators for efficient directory scanning, integrates with `.gitignore` and `.hanzoignore` for custom ignore patterns, and provides detailed logging and summarization of included and ignored files.
+
+### Reminder Service
+- **`ReminderService` (src/services/ReminderService.ts)**
+ - **`triggerManually(): void`**: Manually triggers the reminder check.
+ - **`dispose(): void`**: Cleans up resources and timers.
+ - **Core Logic**: Periodic checks for significant changes in the workspace to prompt reanalysis. Uses both Git and file system tracking based on availability.
+ - **Integration**: Debounced event handling, cooldown and forced reminder mechanisms, and integration with `StatusBarService` and `AnalysisService` for status updates and reanalysis.
+
+### Status Bar Updates
+- **`StatusBarService` (src/services/StatusBarService.ts)**
+ - **`setAnalyzing(message: string = 'Analyzing project...'): void`**
+ - **`setIdle(): void`**
+ - **`setError(message: string = 'Analysis failed'): void`**
+ - **`setSuccess(message: string = 'Analysis complete'): void`**
+ - **`dispose(): void`**
+ - **Integration**: Singleton pattern to manage the VS Code status bar item, with different states for analyzing, idle, error, and success with appropriate tooltips and commands.
+
+### Configuration Management
+- **`getConfig` (src/config.ts)**
+ - **`getConfig(): Config`**: Retrieves the appropriate configuration based on the environment. It defaults to 'production' if the environment variable `VSCODE_ENV` is not set. This function is critical as it ensures the application uses the correct configuration for its operations, directly impacting its functionality and security.
+
+### Extension Activation
+- **`activate` (src/extension.ts)**
+ - **Description**: Initializes the extension, registers commands, and sets up the main functionality. It initializes the `AuthManager`, registers immediate commands, and initializes the extension API.
+ - **Core Behavior**:
+ - Registers commands like `hanzo.openManager`, `hanzo.login`, and others.
+ - Initializes the `AuthManager` and stores the extension API for command access.
+ - Calls `initializeExtension` to set up services and panel creation.
+
+### Project Management
+- **`ProjectManager` (src/extension.ts)**
+ - **Description**: Manages project-related operations, including file updates, UI updates, and project analysis.
+ - **Core Methods**:
+ - `updateProjectFiles`: Writes project specification and IDE-specific rules to files.
+ - `updateUI`: Updates the webview panel UI based on the operation status.
+ - `showNotification`: Displays notifications in VS Code.
+ - `determineProjectType`: Determines whether to analyze or initialize a project.
+ - `handleProjectOperation`: Handles the main project operation, including file collection, API calls, and specification refinement.
+
+## Architecture
+The system is structured to facilitate seamless interaction between the VS Code extension and external APIs. Data flows from the user’s workspace through the `FileCollectionService`, which gathers and processes files. This data is then sent to the `AnalysisService` for project analysis, utilizing the `ApiClient` for authenticated API requests. The `AuthManager` handles all authentication-related operations, ensuring secure communication with external services. The `StatusBarService` provides real-time feedback to the user within VS Code, while the `ReminderService` ensures that users are prompted to reanalyze their projects when significant changes occur. The `ProjectManager` orchestrates the core project-related operations, integrating all services to provide a cohesive user experience.
\ No newline at end of file
diff --git a/images/icon.png b/images/icon.png
new file mode 100644
index 0000000..a9b6175
Binary files /dev/null and b/images/icon.png differ
diff --git a/node_modules/@sinonjs/commons/LICENSE b/node_modules/@sinonjs/commons/LICENSE
new file mode 100644
index 0000000..5a77f0a
--- /dev/null
+++ b/node_modules/@sinonjs/commons/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2018, Sinon.JS
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@sinonjs/commons/README.md b/node_modules/@sinonjs/commons/README.md
new file mode 100644
index 0000000..9c420ba
--- /dev/null
+++ b/node_modules/@sinonjs/commons/README.md
@@ -0,0 +1,16 @@
+# commons
+
+[](https://circleci.com/gh/sinonjs/commons)
+[](https://codecov.io/gh/sinonjs/commons)
+
+
+Simple functions shared among the sinon end user libraries
+
+## Rules
+
+- Follows the [Sinon.JS compatibility](https://github.com/sinonjs/sinon/blob/master/CONTRIBUTING.md#compatibility)
+- 100% test coverage
+- Code formatted using [Prettier](https://prettier.io)
+- No side effects welcome! (only pure functions)
+- No platform specific functions
+- One export per file (any bundler can do tree shaking)
diff --git a/node_modules/@sinonjs/commons/lib/called-in-order.js b/node_modules/@sinonjs/commons/lib/called-in-order.js
new file mode 100644
index 0000000..cdbbb3f
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/called-in-order.js
@@ -0,0 +1,55 @@
+"use strict";
+
+var every = require("./prototypes/array").every;
+
+/**
+ * @private
+ */
+function hasCallsLeft(callMap, spy) {
+ if (callMap[spy.id] === undefined) {
+ callMap[spy.id] = 0;
+ }
+
+ return callMap[spy.id] < spy.callCount;
+}
+
+/**
+ * @private
+ */
+function checkAdjacentCalls(callMap, spy, index, spies) {
+ var calledBeforeNext = true;
+
+ if (index !== spies.length - 1) {
+ calledBeforeNext = spy.calledBefore(spies[index + 1]);
+ }
+
+ if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
+ callMap[spy.id] += 1;
+ return true;
+ }
+
+ return false;
+}
+
+/**
+ * A Sinon proxy object (fake, spy, stub)
+ * @typedef {object} SinonProxy
+ * @property {Function} calledBefore - A method that determines if this proxy was called before another one
+ * @property {string} id - Some id
+ * @property {number} callCount - Number of times this proxy has been called
+ */
+
+/**
+ * Returns true when the spies have been called in the order they were supplied in
+ * @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments
+ * @returns {boolean} true when spies are called in order, false otherwise
+ */
+function calledInOrder(spies) {
+ var callMap = {};
+ // eslint-disable-next-line no-underscore-dangle
+ var _spies = arguments.length > 1 ? arguments : spies;
+
+ return every(_spies, checkAdjacentCalls.bind(null, callMap));
+}
+
+module.exports = calledInOrder;
diff --git a/node_modules/@sinonjs/commons/lib/called-in-order.test.js b/node_modules/@sinonjs/commons/lib/called-in-order.test.js
new file mode 100644
index 0000000..5fe6611
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/called-in-order.test.js
@@ -0,0 +1,121 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var calledInOrder = require("./called-in-order");
+var sinon = require("@sinonjs/referee-sinon").sinon;
+
+var testObject1 = {
+ someFunction: function () {
+ return;
+ },
+};
+var testObject2 = {
+ otherFunction: function () {
+ return;
+ },
+};
+var testObject3 = {
+ thirdFunction: function () {
+ return;
+ },
+};
+
+function testMethod() {
+ testObject1.someFunction();
+ testObject2.otherFunction();
+ testObject2.otherFunction();
+ testObject2.otherFunction();
+ testObject3.thirdFunction();
+}
+
+describe("calledInOrder", function () {
+ beforeEach(function () {
+ sinon.stub(testObject1, "someFunction");
+ sinon.stub(testObject2, "otherFunction");
+ sinon.stub(testObject3, "thirdFunction");
+ testMethod();
+ });
+ afterEach(function () {
+ testObject1.someFunction.restore();
+ testObject2.otherFunction.restore();
+ testObject3.thirdFunction.restore();
+ });
+
+ describe("given single array argument", function () {
+ describe("when stubs were called in expected order", function () {
+ it("returns true", function () {
+ assert.isTrue(
+ calledInOrder([
+ testObject1.someFunction,
+ testObject2.otherFunction,
+ ])
+ );
+ assert.isTrue(
+ calledInOrder([
+ testObject1.someFunction,
+ testObject2.otherFunction,
+ testObject2.otherFunction,
+ testObject3.thirdFunction,
+ ])
+ );
+ });
+ });
+
+ describe("when stubs were called in unexpected order", function () {
+ it("returns false", function () {
+ assert.isFalse(
+ calledInOrder([
+ testObject2.otherFunction,
+ testObject1.someFunction,
+ ])
+ );
+ assert.isFalse(
+ calledInOrder([
+ testObject2.otherFunction,
+ testObject1.someFunction,
+ testObject1.someFunction,
+ testObject3.thirdFunction,
+ ])
+ );
+ });
+ });
+ });
+
+ describe("given multiple arguments", function () {
+ describe("when stubs were called in expected order", function () {
+ it("returns true", function () {
+ assert.isTrue(
+ calledInOrder(
+ testObject1.someFunction,
+ testObject2.otherFunction
+ )
+ );
+ assert.isTrue(
+ calledInOrder(
+ testObject1.someFunction,
+ testObject2.otherFunction,
+ testObject3.thirdFunction
+ )
+ );
+ });
+ });
+
+ describe("when stubs were called in unexpected order", function () {
+ it("returns false", function () {
+ assert.isFalse(
+ calledInOrder(
+ testObject2.otherFunction,
+ testObject1.someFunction
+ )
+ );
+ assert.isFalse(
+ calledInOrder(
+ testObject2.otherFunction,
+ testObject1.someFunction,
+ testObject3.thirdFunction
+ )
+ );
+ });
+ });
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/class-name.js b/node_modules/@sinonjs/commons/lib/class-name.js
new file mode 100644
index 0000000..a125e53
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/class-name.js
@@ -0,0 +1,13 @@
+"use strict";
+
+/**
+ * Returns a display name for a value from a constructor
+ * @param {object} value A value to examine
+ * @returns {(string|null)} A string or null
+ */
+function className(value) {
+ const name = value.constructor && value.constructor.name;
+ return name || null;
+}
+
+module.exports = className;
diff --git a/node_modules/@sinonjs/commons/lib/class-name.test.js b/node_modules/@sinonjs/commons/lib/class-name.test.js
new file mode 100644
index 0000000..994f21b
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/class-name.test.js
@@ -0,0 +1,37 @@
+"use strict";
+/* eslint-disable no-empty-function */
+
+var assert = require("@sinonjs/referee").assert;
+var className = require("./class-name");
+
+describe("className", function () {
+ it("returns the class name of an instance", function () {
+ // Because eslint-config-sinon disables es6, we can't
+ // use a class definition here
+ // https://github.com/sinonjs/eslint-config-sinon/blob/master/index.js
+ // var instance = new (class TestClass {})();
+ var instance = new (function TestClass() {})();
+ var name = className(instance);
+ assert.equals(name, "TestClass");
+ });
+
+ it("returns 'Object' for {}", function () {
+ var name = className({});
+ assert.equals(name, "Object");
+ });
+
+ it("returns null for an object that has no prototype", function () {
+ var obj = Object.create(null);
+ var name = className(obj);
+ assert.equals(name, null);
+ });
+
+ it("returns null for an object whose prototype was mangled", function () {
+ // This is what Node v6 and v7 do for objects returned by querystring.parse()
+ function MangledObject() {}
+ MangledObject.prototype = Object.create(null);
+ var obj = new MangledObject();
+ var name = className(obj);
+ assert.equals(name, null);
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/deprecated.js b/node_modules/@sinonjs/commons/lib/deprecated.js
new file mode 100644
index 0000000..9957f79
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/deprecated.js
@@ -0,0 +1,48 @@
+/* eslint-disable no-console */
+"use strict";
+
+/**
+ * Returns a function that will invoke the supplied function and print a
+ * deprecation warning to the console each time it is called.
+ * @param {Function} func
+ * @param {string} msg
+ * @returns {Function}
+ */
+exports.wrap = function (func, msg) {
+ var wrapped = function () {
+ exports.printWarning(msg);
+ return func.apply(this, arguments);
+ };
+ if (func.prototype) {
+ wrapped.prototype = func.prototype;
+ }
+ return wrapped;
+};
+
+/**
+ * Returns a string which can be supplied to `wrap()` to notify the user that a
+ * particular part of the sinon API has been deprecated.
+ * @param {string} packageName
+ * @param {string} funcName
+ * @returns {string}
+ */
+exports.defaultMsg = function (packageName, funcName) {
+ return `${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`;
+};
+
+/**
+ * Prints a warning on the console, when it exists
+ * @param {string} msg
+ * @returns {undefined}
+ */
+exports.printWarning = function (msg) {
+ /* istanbul ignore next */
+ if (typeof process === "object" && process.emitWarning) {
+ // Emit Warnings in Node
+ process.emitWarning(msg);
+ } else if (console.info) {
+ console.info(msg);
+ } else {
+ console.log(msg);
+ }
+};
diff --git a/node_modules/@sinonjs/commons/lib/deprecated.test.js b/node_modules/@sinonjs/commons/lib/deprecated.test.js
new file mode 100644
index 0000000..275d8b1
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/deprecated.test.js
@@ -0,0 +1,101 @@
+/* eslint-disable no-console */
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var sinon = require("@sinonjs/referee-sinon").sinon;
+
+var deprecated = require("./deprecated");
+
+var msg = "test";
+
+describe("deprecated", function () {
+ describe("defaultMsg", function () {
+ it("should return a string", function () {
+ assert.equals(
+ deprecated.defaultMsg("sinon", "someFunc"),
+ "sinon.someFunc is deprecated and will be removed from the public API in a future version of sinon."
+ );
+ });
+ });
+
+ describe("printWarning", function () {
+ beforeEach(function () {
+ sinon.replace(process, "emitWarning", sinon.fake());
+ });
+
+ afterEach(sinon.restore);
+
+ describe("when `process.emitWarning` is defined", function () {
+ it("should call process.emitWarning with a msg", function () {
+ deprecated.printWarning(msg);
+ assert.calledOnceWith(process.emitWarning, msg);
+ });
+ });
+
+ describe("when `process.emitWarning` is undefined", function () {
+ beforeEach(function () {
+ sinon.replace(console, "info", sinon.fake());
+ sinon.replace(console, "log", sinon.fake());
+ process.emitWarning = undefined;
+ });
+
+ afterEach(sinon.restore);
+
+ describe("when `console.info` is defined", function () {
+ it("should call `console.info` with a message", function () {
+ deprecated.printWarning(msg);
+ assert.calledOnceWith(console.info, msg);
+ });
+ });
+
+ describe("when `console.info` is undefined", function () {
+ it("should call `console.log` with a message", function () {
+ console.info = undefined;
+ deprecated.printWarning(msg);
+ assert.calledOnceWith(console.log, msg);
+ });
+ });
+ });
+ });
+
+ describe("wrap", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ var method = sinon.fake();
+ var wrapped;
+
+ beforeEach(function () {
+ wrapped = deprecated.wrap(method, msg);
+ });
+
+ it("should return a wrapper function", function () {
+ assert.match(wrapped, sinon.match.func);
+ });
+
+ it("should assign the prototype of the passed method", function () {
+ assert.equals(method.prototype, wrapped.prototype);
+ });
+
+ context("when the passed method has falsy prototype", function () {
+ it("should not be assigned to the wrapped method", function () {
+ method.prototype = null;
+ wrapped = deprecated.wrap(method, msg);
+ assert.match(wrapped.prototype, sinon.match.object);
+ });
+ });
+
+ context("when invoking the wrapped function", function () {
+ before(function () {
+ sinon.replace(deprecated, "printWarning", sinon.fake());
+ wrapped({});
+ });
+
+ it("should call `printWarning` before invoking", function () {
+ assert.calledOnceWith(deprecated.printWarning, msg);
+ });
+
+ it("should invoke the passed method with the given arguments", function () {
+ assert.calledOnceWith(method, {});
+ });
+ });
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/every.js b/node_modules/@sinonjs/commons/lib/every.js
new file mode 100644
index 0000000..91b8419
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/every.js
@@ -0,0 +1,26 @@
+"use strict";
+
+/**
+ * Returns true when fn returns true for all members of obj.
+ * This is an every implementation that works for all iterables
+ * @param {object} obj
+ * @param {Function} fn
+ * @returns {boolean}
+ */
+module.exports = function every(obj, fn) {
+ var pass = true;
+
+ try {
+ // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
+ obj.forEach(function () {
+ if (!fn.apply(this, arguments)) {
+ // Throwing an error is the only way to break `forEach`
+ throw new Error();
+ }
+ });
+ } catch (e) {
+ pass = false;
+ }
+
+ return pass;
+};
diff --git a/node_modules/@sinonjs/commons/lib/every.test.js b/node_modules/@sinonjs/commons/lib/every.test.js
new file mode 100644
index 0000000..e054a14
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/every.test.js
@@ -0,0 +1,41 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var sinon = require("@sinonjs/referee-sinon").sinon;
+var every = require("./every");
+
+describe("util/core/every", function () {
+ it("returns true when the callback function returns true for every element in an iterable", function () {
+ var obj = [true, true, true, true];
+ var allTrue = every(obj, function (val) {
+ return val;
+ });
+
+ assert(allTrue);
+ });
+
+ it("returns false when the callback function returns false for any element in an iterable", function () {
+ var obj = [true, true, true, false];
+ var result = every(obj, function (val) {
+ return val;
+ });
+
+ assert.isFalse(result);
+ });
+
+ it("calls the given callback once for each item in an iterable until it returns false", function () {
+ var iterableOne = [true, true, true, true];
+ var iterableTwo = [true, true, false, true];
+ var callback = sinon.spy(function (val) {
+ return val;
+ });
+
+ every(iterableOne, callback);
+ assert.equals(callback.callCount, 4);
+
+ callback.resetHistory();
+
+ every(iterableTwo, callback);
+ assert.equals(callback.callCount, 3);
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/function-name.js b/node_modules/@sinonjs/commons/lib/function-name.js
new file mode 100644
index 0000000..2ecf981
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/function-name.js
@@ -0,0 +1,28 @@
+"use strict";
+
+/**
+ * Returns a display name for a function
+ * @param {Function} func
+ * @returns {string}
+ */
+module.exports = function functionName(func) {
+ if (!func) {
+ return "";
+ }
+
+ try {
+ return (
+ func.displayName ||
+ func.name ||
+ // Use function decomposition as a last resort to get function
+ // name. Does not rely on function decomposition to work - if it
+ // doesn't debugging will be slightly less informative
+ // (i.e. toString will say 'spy' rather than 'myFunc').
+ (String(func).match(/function ([^\s(]+)/) || [])[1]
+ );
+ } catch (e) {
+ // Stringify may fail and we might get an exception, as a last-last
+ // resort fall back to empty string.
+ return "";
+ }
+};
diff --git a/node_modules/@sinonjs/commons/lib/function-name.test.js b/node_modules/@sinonjs/commons/lib/function-name.test.js
new file mode 100644
index 0000000..0798b4e
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/function-name.test.js
@@ -0,0 +1,76 @@
+"use strict";
+
+var jsc = require("jsverify");
+var refute = require("@sinonjs/referee-sinon").refute;
+
+var functionName = require("./function-name");
+
+describe("function-name", function () {
+ it("should return empty string if func is falsy", function () {
+ jsc.assertForall("falsy", function (fn) {
+ return functionName(fn) === "";
+ });
+ });
+
+ it("should use displayName by default", function () {
+ jsc.assertForall("nestring", function (displayName) {
+ var fn = { displayName: displayName };
+
+ return functionName(fn) === fn.displayName;
+ });
+ });
+
+ it("should use name if displayName is not available", function () {
+ jsc.assertForall("nestring", function (name) {
+ var fn = { name: name };
+
+ return functionName(fn) === fn.name;
+ });
+ });
+
+ it("should fallback to string parsing", function () {
+ jsc.assertForall("nat", function (naturalNumber) {
+ var name = `fn${naturalNumber}`;
+ var fn = {
+ toString: function () {
+ return `\nfunction ${name}`;
+ },
+ };
+
+ return functionName(fn) === name;
+ });
+ });
+
+ it("should not fail when a name cannot be found", function () {
+ refute.exception(function () {
+ var fn = {
+ toString: function () {
+ return "\nfunction (";
+ },
+ };
+
+ functionName(fn);
+ });
+ });
+
+ it("should not fail when toString is undefined", function () {
+ refute.exception(function () {
+ functionName(Object.create(null));
+ });
+ });
+
+ it("should not fail when toString throws", function () {
+ refute.exception(function () {
+ var fn;
+ try {
+ // eslint-disable-next-line no-eval
+ fn = eval("(function*() {})")().constructor;
+ } catch (e) {
+ // env doesn't support generators
+ return;
+ }
+
+ functionName(fn);
+ });
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/global.js b/node_modules/@sinonjs/commons/lib/global.js
new file mode 100644
index 0000000..ac5edb3
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/global.js
@@ -0,0 +1,21 @@
+"use strict";
+
+/**
+ * A reference to the global object
+ * @type {object} globalObject
+ */
+var globalObject;
+
+/* istanbul ignore else */
+if (typeof global !== "undefined") {
+ // Node
+ globalObject = global;
+} else if (typeof window !== "undefined") {
+ // Browser
+ globalObject = window;
+} else {
+ // WebWorker
+ globalObject = self;
+}
+
+module.exports = globalObject;
diff --git a/node_modules/@sinonjs/commons/lib/global.test.js b/node_modules/@sinonjs/commons/lib/global.test.js
new file mode 100644
index 0000000..4fa73eb
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/global.test.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var globalObject = require("./global");
+
+describe("global", function () {
+ before(function () {
+ if (typeof global === "undefined") {
+ this.skip();
+ }
+ });
+
+ it("is same as global", function () {
+ assert.same(globalObject, global);
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/index.js b/node_modules/@sinonjs/commons/lib/index.js
new file mode 100644
index 0000000..870df32
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/index.js
@@ -0,0 +1,14 @@
+"use strict";
+
+module.exports = {
+ global: require("./global"),
+ calledInOrder: require("./called-in-order"),
+ className: require("./class-name"),
+ deprecated: require("./deprecated"),
+ every: require("./every"),
+ functionName: require("./function-name"),
+ orderByFirstCall: require("./order-by-first-call"),
+ prototypes: require("./prototypes"),
+ typeOf: require("./type-of"),
+ valueToString: require("./value-to-string"),
+};
diff --git a/node_modules/@sinonjs/commons/lib/index.test.js b/node_modules/@sinonjs/commons/lib/index.test.js
new file mode 100644
index 0000000..e79aa7e
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/index.test.js
@@ -0,0 +1,31 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var index = require("./index");
+
+var expectedMethods = [
+ "calledInOrder",
+ "className",
+ "every",
+ "functionName",
+ "orderByFirstCall",
+ "typeOf",
+ "valueToString",
+];
+var expectedObjectProperties = ["deprecated", "prototypes"];
+
+describe("package", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ expectedMethods.forEach(function (name) {
+ it(`should export a method named ${name}`, function () {
+ assert.isFunction(index[name]);
+ });
+ });
+
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ expectedObjectProperties.forEach(function (name) {
+ it(`should export an object property named ${name}`, function () {
+ assert.isObject(index[name]);
+ });
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/order-by-first-call.js b/node_modules/@sinonjs/commons/lib/order-by-first-call.js
new file mode 100644
index 0000000..26826cb
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/order-by-first-call.js
@@ -0,0 +1,34 @@
+"use strict";
+
+var sort = require("./prototypes/array").sort;
+var slice = require("./prototypes/array").slice;
+
+/**
+ * @private
+ */
+function comparator(a, b) {
+ // uuid, won't ever be equal
+ var aCall = a.getCall(0);
+ var bCall = b.getCall(0);
+ var aId = (aCall && aCall.callId) || -1;
+ var bId = (bCall && bCall.callId) || -1;
+
+ return aId < bId ? -1 : 1;
+}
+
+/**
+ * A Sinon proxy object (fake, spy, stub)
+ * @typedef {object} SinonProxy
+ * @property {Function} getCall - A method that can return the first call
+ */
+
+/**
+ * Sorts an array of SinonProxy instances (fake, spy, stub) by their first call
+ * @param {SinonProxy[] | SinonProxy} spies
+ * @returns {SinonProxy[]}
+ */
+function orderByFirstCall(spies) {
+ return sort(slice(spies), comparator);
+}
+
+module.exports = orderByFirstCall;
diff --git a/node_modules/@sinonjs/commons/lib/order-by-first-call.test.js b/node_modules/@sinonjs/commons/lib/order-by-first-call.test.js
new file mode 100644
index 0000000..cbc71be
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/order-by-first-call.test.js
@@ -0,0 +1,52 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var knuthShuffle = require("knuth-shuffle").knuthShuffle;
+var sinon = require("@sinonjs/referee-sinon").sinon;
+var orderByFirstCall = require("./order-by-first-call");
+
+describe("orderByFirstCall", function () {
+ it("should order an Array of spies by the callId of the first call, ascending", function () {
+ // create an array of spies
+ var spies = [
+ sinon.spy(),
+ sinon.spy(),
+ sinon.spy(),
+ sinon.spy(),
+ sinon.spy(),
+ sinon.spy(),
+ ];
+
+ // call all the spies
+ spies.forEach(function (spy) {
+ spy();
+ });
+
+ // add a few uncalled spies
+ spies.push(sinon.spy());
+ spies.push(sinon.spy());
+
+ // randomise the order of the spies
+ knuthShuffle(spies);
+
+ var sortedSpies = orderByFirstCall(spies);
+
+ assert.equals(sortedSpies.length, spies.length);
+
+ var orderedByFirstCall = sortedSpies.every(function (spy, index) {
+ if (index + 1 === sortedSpies.length) {
+ return true;
+ }
+ var nextSpy = sortedSpies[index + 1];
+
+ // uncalled spies should be ordered first
+ if (!spy.called) {
+ return true;
+ }
+
+ return spy.calledImmediatelyBefore(nextSpy);
+ });
+
+ assert.isTrue(orderedByFirstCall);
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/README.md b/node_modules/@sinonjs/commons/lib/prototypes/README.md
new file mode 100644
index 0000000..c3d92fe
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/README.md
@@ -0,0 +1,43 @@
+# Prototypes
+
+The functions in this folder are to be use for keeping cached references to the built-in prototypes, so that people can't inadvertently break the library by making mistakes in userland.
+
+See https://github.com/sinonjs/sinon/pull/1523
+
+## Without cached references
+
+```js
+// in userland, the library user needs to replace the filter method on
+// Array.prototype
+var array = [1, 2, 3];
+sinon.replace(array, "filter", sinon.fake.returns(2));
+
+// in a sinon module, the library author needs to use the filter method
+var someArray = ["a", "b", 42, "c"];
+var answer = filter(someArray, function (v) {
+ return v === 42;
+});
+
+console.log(answer);
+// => 2
+```
+
+## With cached references
+
+```js
+// in userland, the library user needs to replace the filter method on
+// Array.prototype
+var array = [1, 2, 3];
+sinon.replace(array, "filter", sinon.fake.returns(2));
+
+// in a sinon module, the library author needs to use the filter method
+// get a reference to the original Array.prototype.filter
+var filter = require("@sinonjs/commons").prototypes.array.filter;
+var someArray = ["a", "b", 42, "c"];
+var answer = filter(someArray, function (v) {
+ return v === 42;
+});
+
+console.log(answer);
+// => 42
+```
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/array.js b/node_modules/@sinonjs/commons/lib/prototypes/array.js
new file mode 100644
index 0000000..381a032
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/array.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(Array.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.js b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.js
new file mode 100644
index 0000000..38549c1
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.js
@@ -0,0 +1,40 @@
+"use strict";
+
+var call = Function.call;
+var throwsOnProto = require("./throws-on-proto");
+
+var disallowedProperties = [
+ // ignore size because it throws from Map
+ "size",
+ "caller",
+ "callee",
+ "arguments",
+];
+
+// This branch is covered when tests are run with `--disable-proto=throw`,
+// however we can test both branches at the same time, so this is ignored
+/* istanbul ignore next */
+if (throwsOnProto) {
+ disallowedProperties.push("__proto__");
+}
+
+module.exports = function copyPrototypeMethods(prototype) {
+ // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
+ return Object.getOwnPropertyNames(prototype).reduce(function (
+ result,
+ name
+ ) {
+ if (disallowedProperties.includes(name)) {
+ return result;
+ }
+
+ if (typeof prototype[name] !== "function") {
+ return result;
+ }
+
+ result[name] = call.bind(prototype[name]);
+
+ return result;
+ },
+ Object.create(null));
+};
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.test.js b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.test.js
new file mode 100644
index 0000000..31de7cd
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/copy-prototype-methods.test.js
@@ -0,0 +1,12 @@
+"use strict";
+
+var refute = require("@sinonjs/referee-sinon").refute;
+var copyPrototypeMethods = require("./copy-prototype-methods");
+
+describe("copyPrototypeMethods", function () {
+ it("does not throw for Map", function () {
+ refute.exception(function () {
+ copyPrototypeMethods(Map.prototype);
+ });
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/function.js b/node_modules/@sinonjs/commons/lib/prototypes/function.js
new file mode 100644
index 0000000..a75c25d
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/function.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(Function.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/index.js b/node_modules/@sinonjs/commons/lib/prototypes/index.js
new file mode 100644
index 0000000..ab766bf
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/index.js
@@ -0,0 +1,10 @@
+"use strict";
+
+module.exports = {
+ array: require("./array"),
+ function: require("./function"),
+ map: require("./map"),
+ object: require("./object"),
+ set: require("./set"),
+ string: require("./string"),
+};
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/index.test.js b/node_modules/@sinonjs/commons/lib/prototypes/index.test.js
new file mode 100644
index 0000000..2b3c262
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/index.test.js
@@ -0,0 +1,61 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+
+var arrayProto = require("./index").array;
+var functionProto = require("./index").function;
+var mapProto = require("./index").map;
+var objectProto = require("./index").object;
+var setProto = require("./index").set;
+var stringProto = require("./index").string;
+var throwsOnProto = require("./throws-on-proto");
+
+describe("prototypes", function () {
+ describe(".array", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(arrayProto, Array);
+ });
+ describe(".function", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(functionProto, Function);
+ });
+ describe(".map", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(mapProto, Map);
+ });
+ describe(".object", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(objectProto, Object);
+ });
+ describe(".set", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(setProto, Set);
+ });
+ describe(".string", function () {
+ // eslint-disable-next-line mocha/no-setup-in-describe
+ verifyProperties(stringProto, String);
+ });
+});
+
+function verifyProperties(p, origin) {
+ var disallowedProperties = ["size", "caller", "callee", "arguments"];
+ if (throwsOnProto) {
+ disallowedProperties.push("__proto__");
+ }
+
+ it("should have all the methods of the origin prototype", function () {
+ var methodNames = Object.getOwnPropertyNames(origin.prototype).filter(
+ function (name) {
+ if (disallowedProperties.includes(name)) {
+ return false;
+ }
+
+ return typeof origin.prototype[name] === "function";
+ }
+ );
+
+ methodNames.forEach(function (name) {
+ assert.isTrue(Object.prototype.hasOwnProperty.call(p, name), name);
+ });
+ });
+}
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/map.js b/node_modules/@sinonjs/commons/lib/prototypes/map.js
new file mode 100644
index 0000000..91ec65e
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/map.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(Map.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/object.js b/node_modules/@sinonjs/commons/lib/prototypes/object.js
new file mode 100644
index 0000000..eab7faa
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/object.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(Object.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/set.js b/node_modules/@sinonjs/commons/lib/prototypes/set.js
new file mode 100644
index 0000000..7495c3b
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/set.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(Set.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/string.js b/node_modules/@sinonjs/commons/lib/prototypes/string.js
new file mode 100644
index 0000000..3917fe9
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/string.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var copyPrototype = require("./copy-prototype-methods");
+
+module.exports = copyPrototype(String.prototype);
diff --git a/node_modules/@sinonjs/commons/lib/prototypes/throws-on-proto.js b/node_modules/@sinonjs/commons/lib/prototypes/throws-on-proto.js
new file mode 100644
index 0000000..d77ab4a
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/prototypes/throws-on-proto.js
@@ -0,0 +1,24 @@
+"use strict";
+
+/**
+ * Is true when the environment causes an error to be thrown for accessing the
+ * __proto__ property.
+ * This is necessary in order to support `node --disable-proto=throw`.
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto
+ * @type {boolean}
+ */
+let throwsOnProto;
+try {
+ const object = {};
+ // eslint-disable-next-line no-proto, no-unused-expressions
+ object.__proto__;
+ throwsOnProto = false;
+} catch (_) {
+ // This branch is covered when tests are run with `--disable-proto=throw`,
+ // however we can test both branches at the same time, so this is ignored
+ /* istanbul ignore next */
+ throwsOnProto = true;
+}
+
+module.exports = throwsOnProto;
diff --git a/node_modules/@sinonjs/commons/lib/type-of.js b/node_modules/@sinonjs/commons/lib/type-of.js
new file mode 100644
index 0000000..40b9215
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/type-of.js
@@ -0,0 +1,12 @@
+"use strict";
+
+var type = require("type-detect");
+
+/**
+ * Returns the lower-case result of running type from type-detect on the value
+ * @param {*} value
+ * @returns {string}
+ */
+module.exports = function typeOf(value) {
+ return type(value).toLowerCase();
+};
diff --git a/node_modules/@sinonjs/commons/lib/type-of.test.js b/node_modules/@sinonjs/commons/lib/type-of.test.js
new file mode 100644
index 0000000..ba377b9
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/type-of.test.js
@@ -0,0 +1,51 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var typeOf = require("./type-of");
+
+describe("typeOf", function () {
+ it("returns boolean", function () {
+ assert.equals(typeOf(false), "boolean");
+ });
+
+ it("returns string", function () {
+ assert.equals(typeOf("Sinon.JS"), "string");
+ });
+
+ it("returns number", function () {
+ assert.equals(typeOf(123), "number");
+ });
+
+ it("returns object", function () {
+ assert.equals(typeOf({}), "object");
+ });
+
+ it("returns function", function () {
+ assert.equals(
+ typeOf(function () {
+ return undefined;
+ }),
+ "function"
+ );
+ });
+
+ it("returns undefined", function () {
+ assert.equals(typeOf(undefined), "undefined");
+ });
+
+ it("returns null", function () {
+ assert.equals(typeOf(null), "null");
+ });
+
+ it("returns array", function () {
+ assert.equals(typeOf([]), "array");
+ });
+
+ it("returns regexp", function () {
+ assert.equals(typeOf(/.*/), "regexp");
+ });
+
+ it("returns date", function () {
+ assert.equals(typeOf(new Date()), "date");
+ });
+});
diff --git a/node_modules/@sinonjs/commons/lib/value-to-string.js b/node_modules/@sinonjs/commons/lib/value-to-string.js
new file mode 100644
index 0000000..303f657
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/value-to-string.js
@@ -0,0 +1,16 @@
+"use strict";
+
+/**
+ * Returns a string representation of the value
+ * @param {*} value
+ * @returns {string}
+ */
+function valueToString(value) {
+ if (value && value.toString) {
+ // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
+ return value.toString();
+ }
+ return String(value);
+}
+
+module.exports = valueToString;
diff --git a/node_modules/@sinonjs/commons/lib/value-to-string.test.js b/node_modules/@sinonjs/commons/lib/value-to-string.test.js
new file mode 100644
index 0000000..6456447
--- /dev/null
+++ b/node_modules/@sinonjs/commons/lib/value-to-string.test.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var assert = require("@sinonjs/referee-sinon").assert;
+var valueToString = require("./value-to-string");
+
+describe("util/core/valueToString", function () {
+ it("returns string representation of an object", function () {
+ var obj = {};
+
+ assert.equals(valueToString(obj), obj.toString());
+ });
+
+ it("returns 'null' for literal null'", function () {
+ assert.equals(valueToString(null), "null");
+ });
+
+ it("returns 'undefined' for literal undefined", function () {
+ assert.equals(valueToString(undefined), "undefined");
+ });
+});
diff --git a/node_modules/@sinonjs/commons/package.json b/node_modules/@sinonjs/commons/package.json
new file mode 100644
index 0000000..9761045
--- /dev/null
+++ b/node_modules/@sinonjs/commons/package.json
@@ -0,0 +1,57 @@
+{
+ "name": "@sinonjs/commons",
+ "version": "3.0.1",
+ "description": "Simple functions shared among the sinon end user libraries",
+ "main": "lib/index.js",
+ "types": "./types/index.d.ts",
+ "scripts": {
+ "build": "rm -rf types && tsc",
+ "lint": "eslint .",
+ "precommit": "lint-staged",
+ "test": "mocha --recursive -R dot \"lib/**/*.test.js\"",
+ "test-check-coverage": "npm run test-coverage && nyc check-coverage --branches 100 --functions 100 --lines 100",
+ "test-coverage": "nyc --reporter text --reporter html --reporter lcovonly npm run test",
+ "prepublishOnly": "npm run build",
+ "prettier:check": "prettier --check '**/*.{js,css,md}'",
+ "prettier:write": "prettier --write '**/*.{js,css,md}'",
+ "preversion": "npm run test-check-coverage",
+ "version": "changes --commits --footer",
+ "postversion": "git push --follow-tags && npm publish",
+ "prepare": "husky install"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sinonjs/commons.git"
+ },
+ "files": [
+ "lib",
+ "types"
+ ],
+ "author": "",
+ "license": "BSD-3-Clause",
+ "bugs": {
+ "url": "https://github.com/sinonjs/commons/issues"
+ },
+ "homepage": "https://github.com/sinonjs/commons#readme",
+ "lint-staged": {
+ "*.{js,css,md}": "prettier --check",
+ "*.js": "eslint"
+ },
+ "devDependencies": {
+ "@sinonjs/eslint-config": "^4.0.6",
+ "@sinonjs/eslint-plugin-no-prototype-methods": "^0.1.0",
+ "@sinonjs/referee-sinon": "^10.1.0",
+ "@studio/changes": "^2.2.0",
+ "husky": "^6.0.0",
+ "jsverify": "0.8.4",
+ "knuth-shuffle": "^1.0.8",
+ "lint-staged": "^13.0.3",
+ "mocha": "^10.1.0",
+ "nyc": "^15.1.0",
+ "prettier": "^2.7.1",
+ "typescript": "^4.8.4"
+ },
+ "dependencies": {
+ "type-detect": "4.0.8"
+ }
+}
diff --git a/node_modules/@sinonjs/fake-timers/LICENSE b/node_modules/@sinonjs/fake-timers/LICENSE
new file mode 100644
index 0000000..eb84755
--- /dev/null
+++ b/node_modules/@sinonjs/fake-timers/LICENSE
@@ -0,0 +1,11 @@
+Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/node_modules/@sinonjs/fake-timers/README.md b/node_modules/@sinonjs/fake-timers/README.md
new file mode 100644
index 0000000..ac97210
--- /dev/null
+++ b/node_modules/@sinonjs/fake-timers/README.md
@@ -0,0 +1,361 @@
+# `@sinonjs/fake-timers`
+
+[](https://codecov.io/gh/sinonjs/fake-timers)
+
+
+JavaScript implementation of the timer APIs; `setTimeout`, `clearTimeout`, `setImmediate`, `clearImmediate`, `setInterval`, `clearInterval`, `requestAnimationFrame`, `cancelAnimationFrame`, `requestIdleCallback`, and `cancelIdleCallback`, along with a clock instance that controls the flow of time. FakeTimers also provides a `Date` implementation that gets its time from the clock.
+
+In addition in browser environment `@sinonjs/fake-timers` provides a `performance` implementation that gets its time from the clock. In Node environments FakeTimers provides a `nextTick` implementation that is synchronized with the clock - and a `process.hrtime` shim that works with the clock.
+
+`@sinonjs/fake-timers` can be used to simulate passing time in automated tests and other
+situations where you want the scheduling semantics, but don't want to actually
+wait.
+
+`@sinonjs/fake-timers` is extracted from [Sinon.JS](https://github.com/sinonjs/sinon.js) and targets the [same runtimes](https://sinonjs.org/releases/latest/#supported-runtimes).
+
+## Autocomplete, IntelliSense and TypeScript definitions
+
+Version 7 introduced JSDoc to the codebase. This should provide autocomplete and type suggestions in supporting IDEs. If you need more elaborate type support, TypeScript definitions for the Sinon projects are independently maintained by the Definitely Types community:
+
+```
+npm install -D @types/sinonjs__fake-timers
+```
+
+## Installation
+
+`@sinonjs/fake-timers` can be used in both Node and browser environments. Installation is as easy as
+
+```sh
+npm install @sinonjs/fake-timers
+```
+
+If you want to use `@sinonjs/fake-timers` in a browser you can either build your own bundle or use [Skypack](https://www.skypack.dev).
+
+## Usage
+
+To use `@sinonjs/fake-timers`, create a new clock, schedule events on it using the timer
+functions and pass time using the `tick` method.
+
+```js
+// In the browser distribution, a global `FakeTimers` is already available
+var FakeTimers = require("@sinonjs/fake-timers");
+var clock = FakeTimers.createClock();
+
+clock.setTimeout(function () {
+ console.log(
+ "The poblano is a mild chili pepper originating in the state of Puebla, Mexico.",
+ );
+}, 15);
+
+// ...
+
+clock.tick(15);
+```
+
+Upon executing the last line, an interesting fact about the
+[Poblano](https://en.wikipedia.org/wiki/Poblano) will be printed synchronously to
+the screen. If you want to simulate asynchronous behavior, please see the `async` function variants (eg `clock.tick(time)` vs `await clock.tickAsync(time)`).
+
+The `next`, `runAll`, `runToFrame`, and `runToLast` methods are available to advance the clock. See the
+API Reference for more details.
+
+### Faking the native timers
+
+When using `@sinonjs/fake-timers` to test timers, you will most likely want to replace the native
+timers such that calling `setTimeout` actually schedules a callback with your
+clock instance, not the browser's internals.
+
+Calling `install` with no arguments achieves this. You can call `uninstall`
+later to restore things as they were again.
+Note that in NodeJS the [timers](https://nodejs.org/api/timers.html) and [timers/promises](https://nodejs.org/api/timers.html#timers-promises-api) modules will also receive fake timers when using global scope.
+
+```js
+// In the browser distribution, a global `FakeTimers` is already available
+var FakeTimers = require("@sinonjs/fake-timers");
+
+var clock = FakeTimers.install();
+// Equivalent to
+// var clock = FakeTimers.install(typeof global !== "undefined" ? global : window);
+
+setTimeout(fn, 15); // Schedules with clock.setTimeout
+
+clock.uninstall();
+// setTimeout is restored to the native implementation
+```
+
+To hijack timers in another context pass it to the `install` method.
+
+```js
+var FakeTimers = require("@sinonjs/fake-timers");
+var context = {
+ setTimeout: setTimeout, // By default context.setTimeout uses the global setTimeout
+};
+var clock = FakeTimers.withGlobal(context).install();
+
+context.setTimeout(fn, 15); // Schedules with clock.setTimeout
+
+clock.uninstall();
+// context.setTimeout is restored to the original implementation
+```
+
+Usually you want to install the timers onto the global object, so call `install`
+without arguments.
+
+#### Automatically incrementing mocked time
+
+FakeTimers supports the possibility to attach the faked timers to any change
+in the real system time. This means that there is no need to `tick()` the
+clock in a situation where you won't know **when** to call `tick()`.
+
+Please note that this is achieved using the original setImmediate() API at a certain
+configurable interval `config.advanceTimeDelta` (default: 20ms). Meaning time would
+be incremented every 20ms, not in real time.
+
+An example would be:
+
+```js
+var FakeTimers = require("@sinonjs/fake-timers");
+var clock = FakeTimers.install({
+ shouldAdvanceTime: true,
+ advanceTimeDelta: 40,
+});
+
+setTimeout(() => {
+ console.log("this just timed out"); //executed after 40ms
+}, 30);
+
+setImmediate(() => {
+ console.log("not so immediate"); //executed after 40ms
+});
+
+setTimeout(() => {
+ console.log("this timed out after"); //executed after 80ms
+ clock.uninstall();
+}, 50);
+```
+
+## API Reference
+
+### `var clock = FakeTimers.createClock([now[, loopLimit]])`
+
+Creates a clock. The default
+[epoch](https://en.wikipedia.org/wiki/Epoch_%28reference_date%29) is `0`.
+
+The `now` argument may be a number (in milliseconds) or a Date object.
+
+The `loopLimit` argument sets the maximum number of timers that will be run when calling `runAll()` before assuming that we have an infinite loop and throwing an error. The default is `1000`.
+
+### `var clock = FakeTimers.install([config])`
+
+Installs FakeTimers using the specified config (otherwise with epoch `0` on the global scope).
+Note that in NodeJS the [timers](https://nodejs.org/api/timers.html) and [timers/promises](https://nodejs.org/api/timers.html#timers-promises-api) modules will also receive fake timers when using global scope.
+The following configuration options are available
+
+| Parameter | Type | Default | Description |
+| -------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `config.now` | Number/Date | 0 | installs FakeTimers with the specified unix epoch |
+| `config.toFake` | String[] | ["setTimeout", "clearTimeout", "setImmediate", "clearImmediate","setInterval", "clearInterval", "Date", "requestAnimationFrame", "cancelAnimationFrame", "requestIdleCallback", "cancelIdleCallback", "hrtime", "performance"] | an array with explicit function names (or objects, in the case of "performance") to hijack. _When not set, FakeTimers will automatically fake all methods **except** `nextTick`_ e.g., `FakeTimers.install({ toFake: ["setTimeout","nextTick"]})` will fake only `setTimeout` and `nextTick` |
+| `config.loopLimit` | Number | 1000 | the maximum number of timers that will be run when calling runAll() |
+| `config.shouldAdvanceTime` | Boolean | false | tells FakeTimers to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by 20ms for every 20ms change in the real system time) |
+| `config.advanceTimeDelta` | Number | 20 | relevant only when using with `shouldAdvanceTime: true`. increment mocked time by `advanceTimeDelta` ms every `advanceTimeDelta` ms change in the real system time. |
+| `config.shouldClearNativeTimers` | Boolean | false | tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. |
+
+### `var id = clock.setTimeout(callback, timeout)`
+
+Schedules the callback to be fired once `timeout` milliseconds have ticked by.
+
+In Node.js `setTimeout` returns a timer object. FakeTimers will do the same, however
+its `ref()` and `unref()` methods have no effect.
+
+In browsers a timer ID is returned.
+
+### `clock.clearTimeout(id)`
+
+Clears the timer given the ID or timer object, as long as it was created using
+`setTimeout`.
+
+### `var id = clock.setInterval(callback, timeout)`
+
+Schedules the callback to be fired every time `timeout` milliseconds have ticked
+by.
+
+In Node.js `setInterval` returns a timer object. FakeTimers will do the same, however
+its `ref()` and `unref()` methods have no effect.
+
+In browsers a timer ID is returned.
+
+### `clock.clearInterval(id)`
+
+Clears the timer given the ID or timer object, as long as it was created using
+`setInterval`.
+
+### `var id = clock.setImmediate(callback)`
+
+Schedules the callback to be fired once `0` milliseconds have ticked by. Note
+that you'll still have to call `clock.tick()` for the callback to fire. If
+called during a tick the callback won't fire until `1` millisecond has ticked
+by.
+
+In Node.js `setImmediate` returns a timer object. FakeTimers will do the same,
+however its `ref()` and `unref()` methods have no effect.
+
+In browsers a timer ID is returned.
+
+### `clock.clearImmediate(id)`
+
+Clears the timer given the ID or timer object, as long as it was created using
+`setImmediate`.
+
+### `clock.requestAnimationFrame(callback)`
+
+Schedules the callback to be fired on the next animation frame, which runs every
+16 ticks. Returns an `id` which can be used to cancel the callback. This is
+available in both browser & node environments.
+
+### `clock.cancelAnimationFrame(id)`
+
+Cancels the callback scheduled by the provided id.
+
+### `clock.requestIdleCallback(callback[, timeout])`
+
+Queued the callback to be fired during idle periods to perform background and low priority work on the main event loop. Callbacks which have a timeout option will be fired no later than time in milliseconds. Returns an `id` which can be used to cancel the callback.
+
+### `clock.cancelIdleCallback(id)`
+
+Cancels the callback scheduled by the provided id.
+
+### `clock.countTimers()`
+
+Returns the number of waiting timers. This can be used to assert that a test
+finishes without leaking any timers.
+
+### `clock.hrtime(prevTime?)`
+
+Only available in Node.js, mimicks process.hrtime().
+
+### `clock.nextTick(callback)`
+
+Only available in Node.js, mimics `process.nextTick` to enable completely synchronous testing flows.
+
+### `clock.performance.now()`
+
+Only available in browser environments, mimicks performance.now().
+
+### `clock.tick(time)` / `await clock.tickAsync(time)`
+
+Advance the clock, firing callbacks if necessary. `time` may be the number of
+milliseconds to advance the clock by or a human-readable string. Valid string
+formats are `"08"` for eight seconds, `"01:00"` for one minute and `"02:34:10"`
+for two hours, 34 minutes and ten seconds.
+
+The `tickAsync()` will also break the event loop, allowing any scheduled promise
+callbacks to execute _before_ running the timers.
+
+### `clock.next()` / `await clock.nextAsync()`
+
+Advances the clock to the the moment of the first scheduled timer, firing it.
+
+The `nextAsync()` will also break the event loop, allowing any scheduled promise
+callbacks to execute _before_ running the timers.
+
+### `clock.jump(time)`
+
+Advance the clock by jumping forward in time, firing callbacks at most once.
+`time` takes the same formats as [`clock.tick`](#clockticktime--await-clocktickasynctime).
+
+This can be used to simulate the JS engine (such as a browser) being put to sleep and resumed later, skipping intermediary timers.
+
+### `clock.reset()`
+
+Removes all timers and ticks without firing them, and sets `now` to `config.now`
+that was provided to `FakeTimers.install` or to `0` if `config.now` was not provided.
+Useful to reset the state of the clock without having to `uninstall` and `install` it.
+
+### `clock.runAll()` / `await clock.runAllAsync()`
+
+This runs all pending timers until there are none remaining. If new timers are added while it is executing they will be run as well.
+
+This makes it easier to run asynchronous tests to completion without worrying about the number of timers they use, or the delays in those timers.
+
+It runs a maximum of `loopLimit` times after which it assumes there is an infinite loop of timers and throws an error.
+
+The `runAllAsync()` will also break the event loop, allowing any scheduled promise
+callbacks to execute _before_ running the timers.
+
+### `clock.runMicrotasks()`
+
+This runs all pending microtasks scheduled with `nextTick` but none of the timers and is mostly useful for libraries using FakeTimers underneath and for running `nextTick` items without any timers.
+
+### `clock.runToFrame()`
+
+Advances the clock to the next frame, firing all scheduled animation frame callbacks,
+if any, for that frame as well as any other timers scheduled along the way.
+
+### `clock.runToLast()` / `await clock.runToLastAsync()`
+
+This takes note of the last scheduled timer when it is run, and advances the
+clock to that time firing callbacks as necessary.
+
+If new timers are added while it is executing they will be run only if they
+would occur before this time.
+
+This is useful when you want to run a test to completion, but the test recursively
+sets timers that would cause `runAll` to trigger an infinite loop warning.
+
+The `runToLastAsync()` will also break the event loop, allowing any scheduled promise
+callbacks to execute _before_ running the timers.
+
+### `clock.setSystemTime([now])`
+
+This simulates a user changing the system clock while your program is running.
+It affects the current time but it does not in itself cause e.g. timers to fire;
+they will fire exactly as they would have done without the call to
+setSystemTime().
+
+### `clock.uninstall()`
+
+Restores the original methods of the native timers or the methods on the object
+that was passed to `FakeTimers.withGlobal`
+
+### `Date`
+
+Implements the `Date` object but using the clock to provide the correct time.
+
+### `Performance`
+
+Implements the `now` method of the [`Performance`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) object but using the clock to provide the correct time. Only available in environments that support the Performance object (browsers mostly).
+
+### `FakeTimers.withGlobal`
+
+In order to support creating clocks based on separate or sandboxed environments (such as JSDOM), FakeTimers exports a factory method which takes single argument `global`, which it inspects to figure out what to mock and what features to support. When invoking this function with a global, you will get back an object with `timers`, `createClock` and `install` - same as the regular FakeTimers exports only based on the passed in global instead of the global environment.
+
+## Running tests
+
+FakeTimers has a comprehensive test suite. If you're thinking of contributing bug
+fixes or suggesting new features, you need to make sure you have not broken any
+tests. You are also expected to add tests for any new behavior.
+
+### On node:
+
+```sh
+npm test
+```
+
+Or, if you prefer more verbose output:
+
+```
+$(npm bin)/mocha ./test/fake-timers-test.js
+```
+
+### In the browser
+
+[Mochify](https://github.com/mochify-js) is used to run the tests in headless
+Chrome.
+
+```sh
+npm test-headless
+```
+
+## License
+
+BSD 3-clause "New" or "Revised" License (see LICENSE file)
diff --git a/node_modules/@sinonjs/fake-timers/package.json b/node_modules/@sinonjs/fake-timers/package.json
new file mode 100644
index 0000000..d787f3e
--- /dev/null
+++ b/node_modules/@sinonjs/fake-timers/package.json
@@ -0,0 +1,78 @@
+{
+ "name": "@sinonjs/fake-timers",
+ "description": "Fake JavaScript timers",
+ "version": "11.3.1",
+ "homepage": "https://github.com/sinonjs/fake-timers",
+ "author": "Christian Johansen",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sinonjs/fake-timers.git"
+ },
+ "bugs": {
+ "mail": "christian@cjohansen.no",
+ "url": "https://github.com/sinonjs/fake-timers/issues"
+ },
+ "license": "BSD-3-Clause",
+ "scripts": {
+ "lint": "eslint .",
+ "test-node": "mocha --timeout 200 test/ integration-test/ -R dot --check-leaks",
+ "test-headless": "mochify --driver puppeteer",
+ "test-check-coverage": "npm run test-coverage && nyc check-coverage",
+ "test-cloud": "npm run test-edge && npm run test-firefox && npm run test-safari",
+ "test-edge": "BROWSER_NAME=MicrosoftEdge mochify --config mochify.webdriver.js",
+ "test-firefox": "BROWSER_NAME=firefox mochify --config mochify.webdriver.js",
+ "test-safari": "BROWSER_NAME=safari mochify --config mochify.webdriver.js",
+ "test-coverage": "nyc -x mochify.webdriver.js -x coverage --all --reporter text --reporter html --reporter lcovonly npm run test-node",
+ "test": "npm run test-node && npm run test-headless",
+ "prettier:check": "prettier --check '**/*.{js,css,md}'",
+ "prettier:write": "prettier --write '**/*.{js,css,md}'",
+ "preversion": "./scripts/preversion.sh",
+ "version": "./scripts/version.sh",
+ "postversion": "./scripts/postversion.sh",
+ "prepare": "husky"
+ },
+ "lint-staged": {
+ "*.{js,css,md}": "prettier --check",
+ "*.js": "eslint"
+ },
+ "mochify": {
+ "reporter": "dot",
+ "timeout": 10000,
+ "bundle": "esbuild --bundle --sourcemap=inline --define:process.env.NODE_DEBUG=\"\"",
+ "bundle_stdin": "require",
+ "spec": "test/**/*-test.js"
+ },
+ "files": [
+ "src/"
+ ],
+ "devDependencies": {
+ "@mochify/cli": "^0.4.1",
+ "@mochify/driver-puppeteer": "^0.4.0",
+ "@mochify/driver-webdriver": "^0.2.1",
+ "@sinonjs/eslint-config": "^5.0.3",
+ "@sinonjs/referee-sinon": "12.0.0",
+ "esbuild": "^0.23.1",
+ "husky": "^9.1.5",
+ "jsdom": "24.1.1",
+ "lint-staged": "15.2.9",
+ "mocha": "10.7.3",
+ "nyc": "17.0.0",
+ "prettier": "3.3.3"
+ },
+ "main": "./src/fake-timers-src.js",
+ "dependencies": {
+ "@sinonjs/commons": "^3.0.1"
+ },
+ "nyc": {
+ "branches": 85,
+ "lines": 92,
+ "functions": 92,
+ "statements": 92,
+ "exclude": [
+ "**/*-test.js",
+ "coverage/**",
+ "types/**",
+ "fake-timers.js"
+ ]
+ }
+}
diff --git a/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js b/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js
new file mode 100644
index 0000000..825454d
--- /dev/null
+++ b/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js
@@ -0,0 +1,2152 @@
+"use strict";
+
+const globalObject = require("@sinonjs/commons").global;
+let timersModule, timersPromisesModule;
+if (typeof require === "function" && typeof module === "object") {
+ try {
+ timersModule = require("timers");
+ } catch (e) {
+ // ignored
+ }
+ try {
+ timersPromisesModule = require("timers/promises");
+ } catch (e) {
+ // ignored
+ }
+}
+
+/**
+ * @typedef {object} IdleDeadline
+ * @property {boolean} didTimeout - whether or not the callback was called before reaching the optional timeout
+ * @property {function():number} timeRemaining - a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period
+ */
+
+/**
+ * Queues a function to be called during a browser's idle periods
+ * @callback RequestIdleCallback
+ * @param {function(IdleDeadline)} callback
+ * @param {{timeout: number}} options - an options object
+ * @returns {number} the id
+ */
+
+/**
+ * @callback NextTick
+ * @param {VoidVarArgsFunc} callback - the callback to run
+ * @param {...*} args - optional arguments to call the callback with
+ * @returns {void}
+ */
+
+/**
+ * @callback SetImmediate
+ * @param {VoidVarArgsFunc} callback - the callback to run
+ * @param {...*} args - optional arguments to call the callback with
+ * @returns {NodeImmediate}
+ */
+
+/**
+ * @callback VoidVarArgsFunc
+ * @param {...*} callback - the callback to run
+ * @returns {void}
+ */
+
+/**
+ * @typedef RequestAnimationFrame
+ * @property {function(number):void} requestAnimationFrame
+ * @returns {number} - the id
+ */
+
+/**
+ * @typedef Performance
+ * @property {function(): number} now
+ */
+
+/* eslint-disable jsdoc/require-property-description */
+/**
+ * @typedef {object} Clock
+ * @property {number} now - the current time
+ * @property {Date} Date - the Date constructor
+ * @property {number} loopLimit - the maximum number of timers before assuming an infinite loop
+ * @property {RequestIdleCallback} requestIdleCallback
+ * @property {function(number):void} cancelIdleCallback
+ * @property {setTimeout} setTimeout
+ * @property {clearTimeout} clearTimeout
+ * @property {NextTick} nextTick
+ * @property {queueMicrotask} queueMicrotask
+ * @property {setInterval} setInterval
+ * @property {clearInterval} clearInterval
+ * @property {SetImmediate} setImmediate
+ * @property {function(NodeImmediate):void} clearImmediate
+ * @property {function():number} countTimers
+ * @property {RequestAnimationFrame} requestAnimationFrame
+ * @property {function(number):void} cancelAnimationFrame
+ * @property {function():void} runMicrotasks
+ * @property {function(string | number): number} tick
+ * @property {function(string | number): Promise} tickAsync
+ * @property {function(): number} next
+ * @property {function(): Promise} nextAsync
+ * @property {function(): number} runAll
+ * @property {function(): number} runToFrame
+ * @property {function(): Promise} runAllAsync
+ * @property {function(): number} runToLast
+ * @property {function(): Promise} runToLastAsync
+ * @property {function(): void} reset
+ * @property {function(number | Date): void} setSystemTime
+ * @property {function(number): void} jump
+ * @property {Performance} performance
+ * @property {function(number[]): number[]} hrtime - process.hrtime (legacy)
+ * @property {function(): void} uninstall Uninstall the clock.
+ * @property {Function[]} methods - the methods that are faked
+ * @property {boolean} [shouldClearNativeTimers] inherited from config
+ * @property {{methodName:string, original:any}[] | undefined} timersModuleMethods
+ * @property {{methodName:string, original:any}[] | undefined} timersPromisesModuleMethods
+ * @property {Map} abortListenerMap
+ */
+/* eslint-enable jsdoc/require-property-description */
+
+/**
+ * Configuration object for the `install` method.
+ * @typedef {object} Config
+ * @property {number|Date} [now] a number (in milliseconds) or a Date object (default epoch)
+ * @property {string[]} [toFake] names of the methods that should be faked.
+ * @property {number} [loopLimit] the maximum number of timers that will be run when calling runAll()
+ * @property {boolean} [shouldAdvanceTime] tells FakeTimers to increment mocked time automatically (default false)
+ * @property {number} [advanceTimeDelta] increment mocked time every <> ms (default: 20ms)
+ * @property {boolean} [shouldClearNativeTimers] forwards clear timer calls to native functions if they are not fakes (default: false)
+ * @property {boolean} [ignoreMissingTimers] default is false, meaning asking to fake timers that are not present will throw an error
+ */
+
+/* eslint-disable jsdoc/require-property-description */
+/**
+ * The internal structure to describe a scheduled fake timer
+ * @typedef {object} Timer
+ * @property {Function} func
+ * @property {*[]} args
+ * @property {number} delay
+ * @property {number} callAt
+ * @property {number} createdAt
+ * @property {boolean} immediate
+ * @property {number} id
+ * @property {Error} [error]
+ */
+
+/**
+ * A Node timer
+ * @typedef {object} NodeImmediate
+ * @property {function(): boolean} hasRef
+ * @property {function(): NodeImmediate} ref
+ * @property {function(): NodeImmediate} unref
+ */
+/* eslint-enable jsdoc/require-property-description */
+
+/* eslint-disable complexity */
+
+/**
+ * Mocks available features in the specified global namespace.
+ * @param {*} _global Namespace to mock (e.g. `window`)
+ * @returns {FakeTimers}
+ */
+function withGlobal(_global) {
+ const maxTimeout = Math.pow(2, 31) - 1; //see https://heycam.github.io/webidl/#abstract-opdef-converttoint
+ const idCounterStart = 1e12; // arbitrarily large number to avoid collisions with native timer IDs
+ const NOOP = function () {
+ return undefined;
+ };
+ const NOOP_ARRAY = function () {
+ return [];
+ };
+ const isPresent = {};
+ let timeoutResult,
+ addTimerReturnsObject = false;
+
+ if (_global.setTimeout) {
+ isPresent.setTimeout = true;
+ timeoutResult = _global.setTimeout(NOOP, 0);
+ addTimerReturnsObject = typeof timeoutResult === "object";
+ }
+ isPresent.clearTimeout = Boolean(_global.clearTimeout);
+ isPresent.setInterval = Boolean(_global.setInterval);
+ isPresent.clearInterval = Boolean(_global.clearInterval);
+ isPresent.hrtime =
+ _global.process && typeof _global.process.hrtime === "function";
+ isPresent.hrtimeBigint =
+ isPresent.hrtime && typeof _global.process.hrtime.bigint === "function";
+ isPresent.nextTick =
+ _global.process && typeof _global.process.nextTick === "function";
+ const utilPromisify = _global.process && require("util").promisify;
+ isPresent.performance =
+ _global.performance && typeof _global.performance.now === "function";
+ const hasPerformancePrototype =
+ _global.Performance &&
+ (typeof _global.Performance).match(/^(function|object)$/);
+ const hasPerformanceConstructorPrototype =
+ _global.performance &&
+ _global.performance.constructor &&
+ _global.performance.constructor.prototype;
+ isPresent.queueMicrotask = _global.hasOwnProperty("queueMicrotask");
+ isPresent.requestAnimationFrame =
+ _global.requestAnimationFrame &&
+ typeof _global.requestAnimationFrame === "function";
+ isPresent.cancelAnimationFrame =
+ _global.cancelAnimationFrame &&
+ typeof _global.cancelAnimationFrame === "function";
+ isPresent.requestIdleCallback =
+ _global.requestIdleCallback &&
+ typeof _global.requestIdleCallback === "function";
+ isPresent.cancelIdleCallbackPresent =
+ _global.cancelIdleCallback &&
+ typeof _global.cancelIdleCallback === "function";
+ isPresent.setImmediate =
+ _global.setImmediate && typeof _global.setImmediate === "function";
+ isPresent.clearImmediate =
+ _global.clearImmediate && typeof _global.clearImmediate === "function";
+ isPresent.Intl = _global.Intl && typeof _global.Intl === "object";
+
+ if (_global.clearTimeout) {
+ _global.clearTimeout(timeoutResult);
+ }
+
+ const NativeDate = _global.Date;
+ const NativeIntl = _global.Intl;
+ let uniqueTimerId = idCounterStart;
+
+ if (NativeDate === undefined) {
+ throw new Error(
+ "The global scope doesn't have a `Date` object" +
+ " (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)",
+ );
+ }
+ isPresent.Date = true;
+
+ /**
+ * @param {number} num
+ * @returns {boolean}
+ */
+ function isNumberFinite(num) {
+ if (Number.isFinite) {
+ return Number.isFinite(num);
+ }
+
+ return isFinite(num);
+ }
+
+ let isNearInfiniteLimit = false;
+
+ /**
+ * @param {Clock} clock
+ * @param {number} i
+ */
+ function checkIsNearInfiniteLimit(clock, i) {
+ if (clock.loopLimit && i === clock.loopLimit - 1) {
+ isNearInfiniteLimit = true;
+ }
+ }
+
+ /**
+ *
+ */
+ function resetIsNearInfiniteLimit() {
+ isNearInfiniteLimit = false;
+ }
+
+ /**
+ * Parse strings like "01:10:00" (meaning 1 hour, 10 minutes, 0 seconds) into
+ * number of milliseconds. This is used to support human-readable strings passed
+ * to clock.tick()
+ * @param {string} str
+ * @returns {number}
+ */
+ function parseTime(str) {
+ if (!str) {
+ return 0;
+ }
+
+ const strings = str.split(":");
+ const l = strings.length;
+ let i = l;
+ let ms = 0;
+ let parsed;
+
+ if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
+ throw new Error(
+ "tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits",
+ );
+ }
+
+ while (i--) {
+ parsed = parseInt(strings[i], 10);
+
+ if (parsed >= 60) {
+ throw new Error(`Invalid time ${str}`);
+ }
+
+ ms += parsed * Math.pow(60, l - i - 1);
+ }
+
+ return ms * 1000;
+ }
+
+ /**
+ * Get the decimal part of the millisecond value as nanoseconds
+ * @param {number} msFloat the number of milliseconds
+ * @returns {number} an integer number of nanoseconds in the range [0,1e6)
+ *
+ * Example: nanoRemainer(123.456789) -> 456789
+ */
+ function nanoRemainder(msFloat) {
+ const modulo = 1e6;
+ const remainder = (msFloat * 1e6) % modulo;
+ const positiveRemainder =
+ remainder < 0 ? remainder + modulo : remainder;
+
+ return Math.floor(positiveRemainder);
+ }
+
+ /**
+ * Used to grok the `now` parameter to createClock.
+ * @param {Date|number} epoch the system time
+ * @returns {number}
+ */
+ function getEpoch(epoch) {
+ if (!epoch) {
+ return 0;
+ }
+ if (typeof epoch.getTime === "function") {
+ return epoch.getTime();
+ }
+ if (typeof epoch === "number") {
+ return epoch;
+ }
+ throw new TypeError("now should be milliseconds since UNIX epoch");
+ }
+
+ /**
+ * @param {number} from
+ * @param {number} to
+ * @param {Timer} timer
+ * @returns {boolean}
+ */
+ function inRange(from, to, timer) {
+ return timer && timer.callAt >= from && timer.callAt <= to;
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {Timer} job
+ */
+ function getInfiniteLoopError(clock, job) {
+ const infiniteLoopError = new Error(
+ `Aborting after running ${clock.loopLimit} timers, assuming an infinite loop!`,
+ );
+
+ if (!job.error) {
+ return infiniteLoopError;
+ }
+
+ // pattern never matched in Node
+ const computedTargetPattern = /target\.*[<|(|[].*?[>|\]|)]\s*/;
+ let clockMethodPattern = new RegExp(
+ String(Object.keys(clock).join("|")),
+ );
+
+ if (addTimerReturnsObject) {
+ // node.js environment
+ clockMethodPattern = new RegExp(
+ `\\s+at (Object\\.)?(?:${Object.keys(clock).join("|")})\\s+`,
+ );
+ }
+
+ let matchedLineIndex = -1;
+ job.error.stack.split("\n").some(function (line, i) {
+ // If we've matched a computed target line (e.g. setTimeout) then we
+ // don't need to look any further. Return true to stop iterating.
+ const matchedComputedTarget = line.match(computedTargetPattern);
+ /* istanbul ignore if */
+ if (matchedComputedTarget) {
+ matchedLineIndex = i;
+ return true;
+ }
+
+ // If we've matched a clock method line, then there may still be
+ // others further down the trace. Return false to keep iterating.
+ const matchedClockMethod = line.match(clockMethodPattern);
+ if (matchedClockMethod) {
+ matchedLineIndex = i;
+ return false;
+ }
+
+ // If we haven't matched anything on this line, but we matched
+ // previously and set the matched line index, then we can stop.
+ // If we haven't matched previously, then we should keep iterating.
+ return matchedLineIndex >= 0;
+ });
+
+ const stack = `${infiniteLoopError}\n${job.type || "Microtask"} - ${
+ job.func.name || "anonymous"
+ }\n${job.error.stack
+ .split("\n")
+ .slice(matchedLineIndex + 1)
+ .join("\n")}`;
+
+ try {
+ Object.defineProperty(infiniteLoopError, "stack", {
+ value: stack,
+ });
+ } catch (e) {
+ // noop
+ }
+
+ return infiniteLoopError;
+ }
+
+ /**
+ * @param {Date} target
+ * @param {Date} source
+ * @returns {Date} the target after modifications
+ */
+ function mirrorDateProperties(target, source) {
+ let prop;
+ for (prop in source) {
+ if (source.hasOwnProperty(prop)) {
+ target[prop] = source[prop];
+ }
+ }
+
+ // set special now implementation
+ if (source.now) {
+ target.now = function now() {
+ return target.clock.now;
+ };
+ } else {
+ delete target.now;
+ }
+
+ // set special toSource implementation
+ if (source.toSource) {
+ target.toSource = function toSource() {
+ return source.toSource();
+ };
+ } else {
+ delete target.toSource;
+ }
+
+ // set special toString implementation
+ target.toString = function toString() {
+ return source.toString();
+ };
+
+ target.prototype = source.prototype;
+ target.parse = source.parse;
+ target.UTC = source.UTC;
+ target.prototype.toUTCString = source.prototype.toUTCString;
+ target.isFake = true;
+
+ return target;
+ }
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function createDate() {
+ /**
+ * @param {number} year
+ * @param {number} month
+ * @param {number} date
+ * @param {number} hour
+ * @param {number} minute
+ * @param {number} second
+ * @param {number} ms
+ * @returns {Date}
+ */
+ function ClockDate(year, month, date, hour, minute, second, ms) {
+ // the Date constructor called as a function, ref Ecma-262 Edition 5.1, section 15.9.2.
+ // This remains so in the 10th edition of 2019 as well.
+ if (!(this instanceof ClockDate)) {
+ return new NativeDate(ClockDate.clock.now).toString();
+ }
+
+ // if Date is called as a constructor with 'new' keyword
+ // Defensive and verbose to avoid potential harm in passing
+ // explicit undefined when user does not pass argument
+ switch (arguments.length) {
+ case 0:
+ return new NativeDate(ClockDate.clock.now);
+ case 1:
+ return new NativeDate(year);
+ case 2:
+ return new NativeDate(year, month);
+ case 3:
+ return new NativeDate(year, month, date);
+ case 4:
+ return new NativeDate(year, month, date, hour);
+ case 5:
+ return new NativeDate(year, month, date, hour, minute);
+ case 6:
+ return new NativeDate(
+ year,
+ month,
+ date,
+ hour,
+ minute,
+ second,
+ );
+ default:
+ return new NativeDate(
+ year,
+ month,
+ date,
+ hour,
+ minute,
+ second,
+ ms,
+ );
+ }
+ }
+
+ return mirrorDateProperties(ClockDate, NativeDate);
+ }
+
+ /**
+ * Mirror Intl by default on our fake implementation
+ *
+ * Most of the properties are the original native ones,
+ * but we need to take control of those that have a
+ * dependency on the current clock.
+ * @returns {object} the partly fake Intl implementation
+ */
+ function createIntl() {
+ const ClockIntl = {};
+ /*
+ * All properties of Intl are non-enumerable, so we need
+ * to do a bit of work to get them out.
+ */
+ Object.getOwnPropertyNames(NativeIntl).forEach(
+ (property) => (ClockIntl[property] = NativeIntl[property]),
+ );
+
+ ClockIntl.DateTimeFormat = function (...args) {
+ const realFormatter = new NativeIntl.DateTimeFormat(...args);
+ const formatter = {};
+
+ ["formatRange", "formatRangeToParts", "resolvedOptions"].forEach(
+ (method) => {
+ formatter[method] =
+ realFormatter[method].bind(realFormatter);
+ },
+ );
+
+ ["format", "formatToParts"].forEach((method) => {
+ formatter[method] = function (date) {
+ return realFormatter[method](date || ClockIntl.clock.now);
+ };
+ });
+
+ return formatter;
+ };
+
+ ClockIntl.DateTimeFormat.prototype = Object.create(
+ NativeIntl.DateTimeFormat.prototype,
+ );
+
+ ClockIntl.DateTimeFormat.supportedLocalesOf =
+ NativeIntl.DateTimeFormat.supportedLocalesOf;
+
+ return ClockIntl;
+ }
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function enqueueJob(clock, job) {
+ // enqueues a microtick-deferred task - ecma262/#sec-enqueuejob
+ if (!clock.jobs) {
+ clock.jobs = [];
+ }
+ clock.jobs.push(job);
+ }
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function runJobs(clock) {
+ // runs all microtick-deferred tasks - ecma262/#sec-runjobs
+ if (!clock.jobs) {
+ return;
+ }
+ for (let i = 0; i < clock.jobs.length; i++) {
+ const job = clock.jobs[i];
+ job.func.apply(null, job.args);
+
+ checkIsNearInfiniteLimit(clock, i);
+ if (clock.loopLimit && i > clock.loopLimit) {
+ throw getInfiniteLoopError(clock, job);
+ }
+ }
+ resetIsNearInfiniteLimit();
+ clock.jobs = [];
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {Timer} timer
+ * @returns {number} id of the created timer
+ */
+ function addTimer(clock, timer) {
+ if (timer.func === undefined) {
+ throw new Error("Callback must be provided to timer calls");
+ }
+
+ if (addTimerReturnsObject) {
+ // Node.js environment
+ if (typeof timer.func !== "function") {
+ throw new TypeError(
+ `[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${
+ timer.func
+ } of type ${typeof timer.func}`,
+ );
+ }
+ }
+
+ if (isNearInfiniteLimit) {
+ timer.error = new Error();
+ }
+
+ timer.type = timer.immediate ? "Immediate" : "Timeout";
+
+ if (timer.hasOwnProperty("delay")) {
+ if (typeof timer.delay !== "number") {
+ timer.delay = parseInt(timer.delay, 10);
+ }
+
+ if (!isNumberFinite(timer.delay)) {
+ timer.delay = 0;
+ }
+ timer.delay = timer.delay > maxTimeout ? 1 : timer.delay;
+ timer.delay = Math.max(0, timer.delay);
+ }
+
+ if (timer.hasOwnProperty("interval")) {
+ timer.type = "Interval";
+ timer.interval = timer.interval > maxTimeout ? 1 : timer.interval;
+ }
+
+ if (timer.hasOwnProperty("animation")) {
+ timer.type = "AnimationFrame";
+ timer.animation = true;
+ }
+
+ if (timer.hasOwnProperty("idleCallback")) {
+ timer.type = "IdleCallback";
+ timer.idleCallback = true;
+ }
+
+ if (!clock.timers) {
+ clock.timers = {};
+ }
+
+ timer.id = uniqueTimerId++;
+ timer.createdAt = clock.now;
+ timer.callAt =
+ clock.now + (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
+
+ clock.timers[timer.id] = timer;
+
+ if (addTimerReturnsObject) {
+ const res = {
+ refed: true,
+ ref: function () {
+ this.refed = true;
+ return res;
+ },
+ unref: function () {
+ this.refed = false;
+ return res;
+ },
+ hasRef: function () {
+ return this.refed;
+ },
+ refresh: function () {
+ timer.callAt =
+ clock.now +
+ (parseInt(timer.delay) || (clock.duringTick ? 1 : 0));
+
+ // it _might_ have been removed, but if not the assignment is perfectly fine
+ clock.timers[timer.id] = timer;
+
+ return res;
+ },
+ [Symbol.toPrimitive]: function () {
+ return timer.id;
+ },
+ };
+ return res;
+ }
+
+ return timer.id;
+ }
+
+ /* eslint consistent-return: "off" */
+ /**
+ * Timer comparitor
+ * @param {Timer} a
+ * @param {Timer} b
+ * @returns {number}
+ */
+ function compareTimers(a, b) {
+ // Sort first by absolute timing
+ if (a.callAt < b.callAt) {
+ return -1;
+ }
+ if (a.callAt > b.callAt) {
+ return 1;
+ }
+
+ // Sort next by immediate, immediate timers take precedence
+ if (a.immediate && !b.immediate) {
+ return -1;
+ }
+ if (!a.immediate && b.immediate) {
+ return 1;
+ }
+
+ // Sort next by creation time, earlier-created timers take precedence
+ if (a.createdAt < b.createdAt) {
+ return -1;
+ }
+ if (a.createdAt > b.createdAt) {
+ return 1;
+ }
+
+ // Sort next by id, lower-id timers take precedence
+ if (a.id < b.id) {
+ return -1;
+ }
+ if (a.id > b.id) {
+ return 1;
+ }
+
+ // As timer ids are unique, no fallback `0` is necessary
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {number} from
+ * @param {number} to
+ * @returns {Timer}
+ */
+ function firstTimerInRange(clock, from, to) {
+ const timers = clock.timers;
+ let timer = null;
+ let id, isInRange;
+
+ for (id in timers) {
+ if (timers.hasOwnProperty(id)) {
+ isInRange = inRange(from, to, timers[id]);
+
+ if (
+ isInRange &&
+ (!timer || compareTimers(timer, timers[id]) === 1)
+ ) {
+ timer = timers[id];
+ }
+ }
+ }
+
+ return timer;
+ }
+
+ /**
+ * @param {Clock} clock
+ * @returns {Timer}
+ */
+ function firstTimer(clock) {
+ const timers = clock.timers;
+ let timer = null;
+ let id;
+
+ for (id in timers) {
+ if (timers.hasOwnProperty(id)) {
+ if (!timer || compareTimers(timer, timers[id]) === 1) {
+ timer = timers[id];
+ }
+ }
+ }
+
+ return timer;
+ }
+
+ /**
+ * @param {Clock} clock
+ * @returns {Timer}
+ */
+ function lastTimer(clock) {
+ const timers = clock.timers;
+ let timer = null;
+ let id;
+
+ for (id in timers) {
+ if (timers.hasOwnProperty(id)) {
+ if (!timer || compareTimers(timer, timers[id]) === -1) {
+ timer = timers[id];
+ }
+ }
+ }
+
+ return timer;
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {Timer} timer
+ */
+ function callTimer(clock, timer) {
+ if (typeof timer.interval === "number") {
+ clock.timers[timer.id].callAt += timer.interval;
+ } else {
+ delete clock.timers[timer.id];
+ }
+
+ if (typeof timer.func === "function") {
+ timer.func.apply(null, timer.args);
+ } else {
+ /* eslint no-eval: "off" */
+ const eval2 = eval;
+ (function () {
+ eval2(timer.func);
+ })();
+ }
+ }
+
+ /**
+ * Gets clear handler name for a given timer type
+ * @param {string} ttype
+ */
+ function getClearHandler(ttype) {
+ if (ttype === "IdleCallback" || ttype === "AnimationFrame") {
+ return `cancel${ttype}`;
+ }
+ return `clear${ttype}`;
+ }
+
+ /**
+ * Gets schedule handler name for a given timer type
+ * @param {string} ttype
+ */
+ function getScheduleHandler(ttype) {
+ if (ttype === "IdleCallback" || ttype === "AnimationFrame") {
+ return `request${ttype}`;
+ }
+ return `set${ttype}`;
+ }
+
+ /**
+ * Creates an anonymous function to warn only once
+ */
+ function createWarnOnce() {
+ let calls = 0;
+ return function (msg) {
+ // eslint-disable-next-line
+ !calls++ && console.warn(msg);
+ };
+ }
+ const warnOnce = createWarnOnce();
+
+ /**
+ * @param {Clock} clock
+ * @param {number} timerId
+ * @param {string} ttype
+ */
+ function clearTimer(clock, timerId, ttype) {
+ if (!timerId) {
+ // null appears to be allowed in most browsers, and appears to be
+ // relied upon by some libraries, like Bootstrap carousel
+ return;
+ }
+
+ if (!clock.timers) {
+ clock.timers = {};
+ }
+
+ // in Node, the ID is stored as the primitive value for `Timeout` objects
+ // for `Immediate` objects, no ID exists, so it gets coerced to NaN
+ const id = Number(timerId);
+
+ if (Number.isNaN(id) || id < idCounterStart) {
+ const handlerName = getClearHandler(ttype);
+
+ if (clock.shouldClearNativeTimers === true) {
+ const nativeHandler = clock[`_${handlerName}`];
+ return typeof nativeHandler === "function"
+ ? nativeHandler(timerId)
+ : undefined;
+ }
+ warnOnce(
+ `FakeTimers: ${handlerName} was invoked to clear a native timer instead of one created by this library.` +
+ "\nTo automatically clean-up native timers, use `shouldClearNativeTimers`.",
+ );
+ }
+
+ if (clock.timers.hasOwnProperty(id)) {
+ // check that the ID matches a timer of the correct type
+ const timer = clock.timers[id];
+ if (
+ timer.type === ttype ||
+ (timer.type === "Timeout" && ttype === "Interval") ||
+ (timer.type === "Interval" && ttype === "Timeout")
+ ) {
+ delete clock.timers[id];
+ } else {
+ const clear = getClearHandler(ttype);
+ const schedule = getScheduleHandler(timer.type);
+ throw new Error(
+ `Cannot clear timer: timer created with ${schedule}() but cleared with ${clear}()`,
+ );
+ }
+ }
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {Config} config
+ * @returns {Timer[]}
+ */
+ function uninstall(clock, config) {
+ let method, i, l;
+ const installedHrTime = "_hrtime";
+ const installedNextTick = "_nextTick";
+
+ for (i = 0, l = clock.methods.length; i < l; i++) {
+ method = clock.methods[i];
+ if (method === "hrtime" && _global.process) {
+ _global.process.hrtime = clock[installedHrTime];
+ } else if (method === "nextTick" && _global.process) {
+ _global.process.nextTick = clock[installedNextTick];
+ } else if (method === "performance") {
+ const originalPerfDescriptor = Object.getOwnPropertyDescriptor(
+ clock,
+ `_${method}`,
+ );
+ if (
+ originalPerfDescriptor &&
+ originalPerfDescriptor.get &&
+ !originalPerfDescriptor.set
+ ) {
+ Object.defineProperty(
+ _global,
+ method,
+ originalPerfDescriptor,
+ );
+ } else if (originalPerfDescriptor.configurable) {
+ _global[method] = clock[`_${method}`];
+ }
+ } else {
+ if (_global[method] && _global[method].hadOwnProperty) {
+ _global[method] = clock[`_${method}`];
+ } else {
+ try {
+ delete _global[method];
+ } catch (ignore) {
+ /* eslint no-empty: "off" */
+ }
+ }
+ }
+ if (clock.timersModuleMethods !== undefined) {
+ for (let j = 0; j < clock.timersModuleMethods.length; j++) {
+ const entry = clock.timersModuleMethods[j];
+ timersModule[entry.methodName] = entry.original;
+ }
+ }
+ if (clock.timersPromisesModuleMethods !== undefined) {
+ for (
+ let j = 0;
+ j < clock.timersPromisesModuleMethods.length;
+ j++
+ ) {
+ const entry = clock.timersPromisesModuleMethods[j];
+ timersPromisesModule[entry.methodName] = entry.original;
+ }
+ }
+ }
+
+ if (config.shouldAdvanceTime === true) {
+ _global.clearInterval(clock.attachedInterval);
+ }
+
+ // Prevent multiple executions which will completely remove these props
+ clock.methods = [];
+
+ for (const [listener, signal] of clock.abortListenerMap.entries()) {
+ signal.removeEventListener("abort", listener);
+ clock.abortListenerMap.delete(listener);
+ }
+
+ // return pending timers, to enable checking what timers remained on uninstall
+ if (!clock.timers) {
+ return [];
+ }
+ return Object.keys(clock.timers).map(function mapper(key) {
+ return clock.timers[key];
+ });
+ }
+
+ /**
+ * @param {object} target the target containing the method to replace
+ * @param {string} method the keyname of the method on the target
+ * @param {Clock} clock
+ */
+ function hijackMethod(target, method, clock) {
+ clock[method].hadOwnProperty = Object.prototype.hasOwnProperty.call(
+ target,
+ method,
+ );
+ clock[`_${method}`] = target[method];
+
+ if (method === "Date") {
+ const date = mirrorDateProperties(clock[method], target[method]);
+ target[method] = date;
+ } else if (method === "Intl") {
+ target[method] = clock[method];
+ } else if (method === "performance") {
+ const originalPerfDescriptor = Object.getOwnPropertyDescriptor(
+ target,
+ method,
+ );
+ // JSDOM has a read only performance field so we have to save/copy it differently
+ if (
+ originalPerfDescriptor &&
+ originalPerfDescriptor.get &&
+ !originalPerfDescriptor.set
+ ) {
+ Object.defineProperty(
+ clock,
+ `_${method}`,
+ originalPerfDescriptor,
+ );
+
+ const perfDescriptor = Object.getOwnPropertyDescriptor(
+ clock,
+ method,
+ );
+ Object.defineProperty(target, method, perfDescriptor);
+ } else {
+ target[method] = clock[method];
+ }
+ } else {
+ target[method] = function () {
+ return clock[method].apply(clock, arguments);
+ };
+
+ Object.defineProperties(
+ target[method],
+ Object.getOwnPropertyDescriptors(clock[method]),
+ );
+ }
+
+ target[method].clock = clock;
+ }
+
+ /**
+ * @param {Clock} clock
+ * @param {number} advanceTimeDelta
+ */
+ function doIntervalTick(clock, advanceTimeDelta) {
+ clock.tick(advanceTimeDelta);
+ }
+
+ /**
+ * @typedef {object} Timers
+ * @property {setTimeout} setTimeout
+ * @property {clearTimeout} clearTimeout
+ * @property {setInterval} setInterval
+ * @property {clearInterval} clearInterval
+ * @property {Date} Date
+ * @property {Intl} Intl
+ * @property {SetImmediate=} setImmediate
+ * @property {function(NodeImmediate): void=} clearImmediate
+ * @property {function(number[]):number[]=} hrtime
+ * @property {NextTick=} nextTick
+ * @property {Performance=} performance
+ * @property {RequestAnimationFrame=} requestAnimationFrame
+ * @property {boolean=} queueMicrotask
+ * @property {function(number): void=} cancelAnimationFrame
+ * @property {RequestIdleCallback=} requestIdleCallback
+ * @property {function(number): void=} cancelIdleCallback
+ */
+
+ /** @type {Timers} */
+ const timers = {
+ setTimeout: _global.setTimeout,
+ clearTimeout: _global.clearTimeout,
+ setInterval: _global.setInterval,
+ clearInterval: _global.clearInterval,
+ Date: _global.Date,
+ };
+
+ if (isPresent.setImmediate) {
+ timers.setImmediate = _global.setImmediate;
+ timers.clearImmediate = _global.clearImmediate;
+ }
+
+ if (isPresent.hrtime) {
+ timers.hrtime = _global.process.hrtime;
+ }
+
+ if (isPresent.nextTick) {
+ timers.nextTick = _global.process.nextTick;
+ }
+
+ if (isPresent.performance) {
+ timers.performance = _global.performance;
+ }
+
+ if (isPresent.requestAnimationFrame) {
+ timers.requestAnimationFrame = _global.requestAnimationFrame;
+ }
+
+ if (isPresent.queueMicrotask) {
+ timers.queueMicrotask = true;
+ }
+
+ if (isPresent.cancelAnimationFrame) {
+ timers.cancelAnimationFrame = _global.cancelAnimationFrame;
+ }
+
+ if (isPresent.requestIdleCallback) {
+ timers.requestIdleCallback = _global.requestIdleCallback;
+ }
+
+ if (isPresent.cancelIdleCallback) {
+ timers.cancelIdleCallback = _global.cancelIdleCallback;
+ }
+
+ if (isPresent.Intl) {
+ timers.Intl = _global.Intl;
+ }
+
+ const originalSetTimeout = _global.setImmediate || _global.setTimeout;
+
+ /**
+ * @param {Date|number} [start] the system time - non-integer values are floored
+ * @param {number} [loopLimit] maximum number of timers that will be run when calling runAll()
+ * @returns {Clock}
+ */
+ function createClock(start, loopLimit) {
+ // eslint-disable-next-line no-param-reassign
+ start = Math.floor(getEpoch(start));
+ // eslint-disable-next-line no-param-reassign
+ loopLimit = loopLimit || 1000;
+ let nanos = 0;
+ const adjustedSystemTime = [0, 0]; // [millis, nanoremainder]
+
+ const clock = {
+ now: start,
+ Date: createDate(),
+ loopLimit: loopLimit,
+ };
+
+ clock.Date.clock = clock;
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function getTimeToNextFrame() {
+ return 16 - ((clock.now - start) % 16);
+ }
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function hrtime(prev) {
+ const millisSinceStart = clock.now - adjustedSystemTime[0] - start;
+ const secsSinceStart = Math.floor(millisSinceStart / 1000);
+ const remainderInNanos =
+ (millisSinceStart - secsSinceStart * 1e3) * 1e6 +
+ nanos -
+ adjustedSystemTime[1];
+
+ if (Array.isArray(prev)) {
+ if (prev[1] > 1e9) {
+ throw new TypeError(
+ "Number of nanoseconds can't exceed a billion",
+ );
+ }
+
+ const oldSecs = prev[0];
+ let nanoDiff = remainderInNanos - prev[1];
+ let secDiff = secsSinceStart - oldSecs;
+
+ if (nanoDiff < 0) {
+ nanoDiff += 1e9;
+ secDiff -= 1;
+ }
+
+ return [secDiff, nanoDiff];
+ }
+ return [secsSinceStart, remainderInNanos];
+ }
+
+ /**
+ * A high resolution timestamp in milliseconds.
+ * @typedef {number} DOMHighResTimeStamp
+ */
+
+ /**
+ * performance.now()
+ * @returns {DOMHighResTimeStamp}
+ */
+ function fakePerformanceNow() {
+ const hrt = hrtime();
+ const millis = hrt[0] * 1000 + hrt[1] / 1e6;
+ return millis;
+ }
+
+ if (isPresent.hrtimeBigint) {
+ hrtime.bigint = function () {
+ const parts = hrtime();
+ return BigInt(parts[0]) * BigInt(1e9) + BigInt(parts[1]); // eslint-disable-line
+ };
+ }
+
+ if (isPresent.Intl) {
+ clock.Intl = createIntl();
+ clock.Intl.clock = clock;
+ }
+
+ clock.requestIdleCallback = function requestIdleCallback(
+ func,
+ timeout,
+ ) {
+ let timeToNextIdlePeriod = 0;
+
+ if (clock.countTimers() > 0) {
+ timeToNextIdlePeriod = 50; // const for now
+ }
+
+ const result = addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 2),
+ delay:
+ typeof timeout === "undefined"
+ ? timeToNextIdlePeriod
+ : Math.min(timeout, timeToNextIdlePeriod),
+ idleCallback: true,
+ });
+
+ return Number(result);
+ };
+
+ clock.cancelIdleCallback = function cancelIdleCallback(timerId) {
+ return clearTimer(clock, timerId, "IdleCallback");
+ };
+
+ clock.setTimeout = function setTimeout(func, timeout) {
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 2),
+ delay: timeout,
+ });
+ };
+ if (typeof _global.Promise !== "undefined" && utilPromisify) {
+ clock.setTimeout[utilPromisify.custom] =
+ function promisifiedSetTimeout(timeout, arg) {
+ return new _global.Promise(function setTimeoutExecutor(
+ resolve,
+ ) {
+ addTimer(clock, {
+ func: resolve,
+ args: [arg],
+ delay: timeout,
+ });
+ });
+ };
+ }
+
+ clock.clearTimeout = function clearTimeout(timerId) {
+ return clearTimer(clock, timerId, "Timeout");
+ };
+
+ clock.nextTick = function nextTick(func) {
+ return enqueueJob(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 1),
+ error: isNearInfiniteLimit ? new Error() : null,
+ });
+ };
+
+ clock.queueMicrotask = function queueMicrotask(func) {
+ return clock.nextTick(func); // explicitly drop additional arguments
+ };
+
+ clock.setInterval = function setInterval(func, timeout) {
+ // eslint-disable-next-line no-param-reassign
+ timeout = parseInt(timeout, 10);
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 2),
+ delay: timeout,
+ interval: timeout,
+ });
+ };
+
+ clock.clearInterval = function clearInterval(timerId) {
+ return clearTimer(clock, timerId, "Interval");
+ };
+
+ if (isPresent.setImmediate) {
+ clock.setImmediate = function setImmediate(func) {
+ return addTimer(clock, {
+ func: func,
+ args: Array.prototype.slice.call(arguments, 1),
+ immediate: true,
+ });
+ };
+
+ if (typeof _global.Promise !== "undefined" && utilPromisify) {
+ clock.setImmediate[utilPromisify.custom] =
+ function promisifiedSetImmediate(arg) {
+ return new _global.Promise(
+ function setImmediateExecutor(resolve) {
+ addTimer(clock, {
+ func: resolve,
+ args: [arg],
+ immediate: true,
+ });
+ },
+ );
+ };
+ }
+
+ clock.clearImmediate = function clearImmediate(timerId) {
+ return clearTimer(clock, timerId, "Immediate");
+ };
+ }
+
+ clock.countTimers = function countTimers() {
+ return (
+ Object.keys(clock.timers || {}).length +
+ (clock.jobs || []).length
+ );
+ };
+
+ clock.requestAnimationFrame = function requestAnimationFrame(func) {
+ const result = addTimer(clock, {
+ func: func,
+ delay: getTimeToNextFrame(),
+ get args() {
+ return [fakePerformanceNow()];
+ },
+ animation: true,
+ });
+
+ return Number(result);
+ };
+
+ clock.cancelAnimationFrame = function cancelAnimationFrame(timerId) {
+ return clearTimer(clock, timerId, "AnimationFrame");
+ };
+
+ clock.runMicrotasks = function runMicrotasks() {
+ runJobs(clock);
+ };
+
+ /**
+ * @param {number|string} tickValue milliseconds or a string parseable by parseTime
+ * @param {boolean} isAsync
+ * @param {Function} resolve
+ * @param {Function} reject
+ * @returns {number|undefined} will return the new `now` value or nothing for async
+ */
+ function doTick(tickValue, isAsync, resolve, reject) {
+ const msFloat =
+ typeof tickValue === "number"
+ ? tickValue
+ : parseTime(tickValue);
+ const ms = Math.floor(msFloat);
+ const remainder = nanoRemainder(msFloat);
+ let nanosTotal = nanos + remainder;
+ let tickTo = clock.now + ms;
+
+ if (msFloat < 0) {
+ throw new TypeError("Negative ticks are not supported");
+ }
+
+ // adjust for positive overflow
+ if (nanosTotal >= 1e6) {
+ tickTo += 1;
+ nanosTotal -= 1e6;
+ }
+
+ nanos = nanosTotal;
+ let tickFrom = clock.now;
+ let previous = clock.now;
+ // ESLint fails to detect this correctly
+ /* eslint-disable prefer-const */
+ let timer,
+ firstException,
+ oldNow,
+ nextPromiseTick,
+ compensationCheck,
+ postTimerCall;
+ /* eslint-enable prefer-const */
+
+ clock.duringTick = true;
+
+ // perform microtasks
+ oldNow = clock.now;
+ runJobs(clock);
+ if (oldNow !== clock.now) {
+ // compensate for any setSystemTime() call during microtask callback
+ tickFrom += clock.now - oldNow;
+ tickTo += clock.now - oldNow;
+ }
+
+ //eslint-disable-next-line jsdoc/require-jsdoc
+ function doTickInner() {
+ // perform each timer in the requested range
+ timer = firstTimerInRange(clock, tickFrom, tickTo);
+ // eslint-disable-next-line no-unmodified-loop-condition
+ while (timer && tickFrom <= tickTo) {
+ if (clock.timers[timer.id]) {
+ tickFrom = timer.callAt;
+ clock.now = timer.callAt;
+ oldNow = clock.now;
+ try {
+ runJobs(clock);
+ callTimer(clock, timer);
+ } catch (e) {
+ firstException = firstException || e;
+ }
+
+ if (isAsync) {
+ // finish up after native setImmediate callback to allow
+ // all native es6 promises to process their callbacks after
+ // each timer fires.
+ originalSetTimeout(nextPromiseTick);
+ return;
+ }
+
+ compensationCheck();
+ }
+
+ postTimerCall();
+ }
+
+ // perform process.nextTick()s again
+ oldNow = clock.now;
+ runJobs(clock);
+ if (oldNow !== clock.now) {
+ // compensate for any setSystemTime() call during process.nextTick() callback
+ tickFrom += clock.now - oldNow;
+ tickTo += clock.now - oldNow;
+ }
+ clock.duringTick = false;
+
+ // corner case: during runJobs new timers were scheduled which could be in the range [clock.now, tickTo]
+ timer = firstTimerInRange(clock, tickFrom, tickTo);
+ if (timer) {
+ try {
+ clock.tick(tickTo - clock.now); // do it all again - for the remainder of the requested range
+ } catch (e) {
+ firstException = firstException || e;
+ }
+ } else {
+ // no timers remaining in the requested range: move the clock all the way to the end
+ clock.now = tickTo;
+
+ // update nanos
+ nanos = nanosTotal;
+ }
+ if (firstException) {
+ throw firstException;
+ }
+
+ if (isAsync) {
+ resolve(clock.now);
+ } else {
+ return clock.now;
+ }
+ }
+
+ nextPromiseTick =
+ isAsync &&
+ function () {
+ try {
+ compensationCheck();
+ postTimerCall();
+ doTickInner();
+ } catch (e) {
+ reject(e);
+ }
+ };
+
+ compensationCheck = function () {
+ // compensate for any setSystemTime() call during timer callback
+ if (oldNow !== clock.now) {
+ tickFrom += clock.now - oldNow;
+ tickTo += clock.now - oldNow;
+ previous += clock.now - oldNow;
+ }
+ };
+
+ postTimerCall = function () {
+ timer = firstTimerInRange(clock, previous, tickTo);
+ previous = tickFrom;
+ };
+
+ return doTickInner();
+ }
+
+ /**
+ * @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
+ * @returns {number} will return the new `now` value
+ */
+ clock.tick = function tick(tickValue) {
+ return doTick(tickValue, false);
+ };
+
+ if (typeof _global.Promise !== "undefined") {
+ /**
+ * @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
+ * @returns {Promise}
+ */
+ clock.tickAsync = function tickAsync(tickValue) {
+ return new _global.Promise(function (resolve, reject) {
+ originalSetTimeout(function () {
+ try {
+ doTick(tickValue, true, resolve, reject);
+ } catch (e) {
+ reject(e);
+ }
+ });
+ });
+ };
+ }
+
+ clock.next = function next() {
+ runJobs(clock);
+ const timer = firstTimer(clock);
+ if (!timer) {
+ return clock.now;
+ }
+
+ clock.duringTick = true;
+ try {
+ clock.now = timer.callAt;
+ callTimer(clock, timer);
+ runJobs(clock);
+ return clock.now;
+ } finally {
+ clock.duringTick = false;
+ }
+ };
+
+ if (typeof _global.Promise !== "undefined") {
+ clock.nextAsync = function nextAsync() {
+ return new _global.Promise(function (resolve, reject) {
+ originalSetTimeout(function () {
+ try {
+ const timer = firstTimer(clock);
+ if (!timer) {
+ resolve(clock.now);
+ return;
+ }
+
+ let err;
+ clock.duringTick = true;
+ clock.now = timer.callAt;
+ try {
+ callTimer(clock, timer);
+ } catch (e) {
+ err = e;
+ }
+ clock.duringTick = false;
+
+ originalSetTimeout(function () {
+ if (err) {
+ reject(err);
+ } else {
+ resolve(clock.now);
+ }
+ });
+ } catch (e) {
+ reject(e);
+ }
+ });
+ });
+ };
+ }
+
+ clock.runAll = function runAll() {
+ let numTimers, i;
+ runJobs(clock);
+ for (i = 0; i < clock.loopLimit; i++) {
+ if (!clock.timers) {
+ resetIsNearInfiniteLimit();
+ return clock.now;
+ }
+
+ numTimers = Object.keys(clock.timers).length;
+ if (numTimers === 0) {
+ resetIsNearInfiniteLimit();
+ return clock.now;
+ }
+
+ clock.next();
+ checkIsNearInfiniteLimit(clock, i);
+ }
+
+ const excessJob = firstTimer(clock);
+ throw getInfiniteLoopError(clock, excessJob);
+ };
+
+ clock.runToFrame = function runToFrame() {
+ return clock.tick(getTimeToNextFrame());
+ };
+
+ if (typeof _global.Promise !== "undefined") {
+ clock.runAllAsync = function runAllAsync() {
+ return new _global.Promise(function (resolve, reject) {
+ let i = 0;
+ /**
+ *
+ */
+ function doRun() {
+ originalSetTimeout(function () {
+ try {
+ runJobs(clock);
+
+ let numTimers;
+ if (i < clock.loopLimit) {
+ if (!clock.timers) {
+ resetIsNearInfiniteLimit();
+ resolve(clock.now);
+ return;
+ }
+
+ numTimers = Object.keys(
+ clock.timers,
+ ).length;
+ if (numTimers === 0) {
+ resetIsNearInfiniteLimit();
+ resolve(clock.now);
+ return;
+ }
+
+ clock.next();
+
+ i++;
+
+ doRun();
+ checkIsNearInfiniteLimit(clock, i);
+ return;
+ }
+
+ const excessJob = firstTimer(clock);
+ reject(getInfiniteLoopError(clock, excessJob));
+ } catch (e) {
+ reject(e);
+ }
+ });
+ }
+ doRun();
+ });
+ };
+ }
+
+ clock.runToLast = function runToLast() {
+ const timer = lastTimer(clock);
+ if (!timer) {
+ runJobs(clock);
+ return clock.now;
+ }
+
+ return clock.tick(timer.callAt - clock.now);
+ };
+
+ if (typeof _global.Promise !== "undefined") {
+ clock.runToLastAsync = function runToLastAsync() {
+ return new _global.Promise(function (resolve, reject) {
+ originalSetTimeout(function () {
+ try {
+ const timer = lastTimer(clock);
+ if (!timer) {
+ runJobs(clock);
+ resolve(clock.now);
+ }
+
+ resolve(clock.tickAsync(timer.callAt - clock.now));
+ } catch (e) {
+ reject(e);
+ }
+ });
+ });
+ };
+ }
+
+ clock.reset = function reset() {
+ nanos = 0;
+ clock.timers = {};
+ clock.jobs = [];
+ clock.now = start;
+ };
+
+ clock.setSystemTime = function setSystemTime(systemTime) {
+ // determine time difference
+ const newNow = getEpoch(systemTime);
+ const difference = newNow - clock.now;
+ let id, timer;
+
+ adjustedSystemTime[0] = adjustedSystemTime[0] + difference;
+ adjustedSystemTime[1] = adjustedSystemTime[1] + nanos;
+ // update 'system clock'
+ clock.now = newNow;
+ nanos = 0;
+
+ // update timers and intervals to keep them stable
+ for (id in clock.timers) {
+ if (clock.timers.hasOwnProperty(id)) {
+ timer = clock.timers[id];
+ timer.createdAt += difference;
+ timer.callAt += difference;
+ }
+ }
+ };
+
+ /**
+ * @param {string|number} tickValue number of milliseconds or a human-readable value like "01:11:15"
+ * @returns {number} will return the new `now` value
+ */
+ clock.jump = function jump(tickValue) {
+ const msFloat =
+ typeof tickValue === "number"
+ ? tickValue
+ : parseTime(tickValue);
+ const ms = Math.floor(msFloat);
+
+ for (const timer of Object.values(clock.timers)) {
+ if (clock.now + ms > timer.callAt) {
+ timer.callAt = clock.now + ms;
+ }
+ }
+ clock.tick(ms);
+ };
+
+ if (isPresent.performance) {
+ clock.performance = Object.create(null);
+ clock.performance.now = fakePerformanceNow;
+ }
+
+ if (isPresent.hrtime) {
+ clock.hrtime = hrtime;
+ }
+
+ return clock;
+ }
+
+ /* eslint-disable complexity */
+
+ /**
+ * @param {Config=} [config] Optional config
+ * @returns {Clock}
+ */
+ function install(config) {
+ if (
+ arguments.length > 1 ||
+ config instanceof Date ||
+ Array.isArray(config) ||
+ typeof config === "number"
+ ) {
+ throw new TypeError(
+ `FakeTimers.install called with ${String(
+ config,
+ )} install requires an object parameter`,
+ );
+ }
+
+ if (_global.Date.isFake === true) {
+ // Timers are already faked; this is a problem.
+ // Make the user reset timers before continuing.
+ throw new TypeError(
+ "Can't install fake timers twice on the same global object.",
+ );
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ config = typeof config !== "undefined" ? config : {};
+ config.shouldAdvanceTime = config.shouldAdvanceTime || false;
+ config.advanceTimeDelta = config.advanceTimeDelta || 20;
+ config.shouldClearNativeTimers =
+ config.shouldClearNativeTimers || false;
+
+ if (config.target) {
+ throw new TypeError(
+ "config.target is no longer supported. Use `withGlobal(target)` instead.",
+ );
+ }
+
+ /**
+ * @param {string} timer/object the name of the thing that is not present
+ * @param timer
+ */
+ function handleMissingTimer(timer) {
+ if (config.ignoreMissingTimers) {
+ return;
+ }
+
+ throw new ReferenceError(
+ `non-existent timers and/or objects cannot be faked: '${timer}'`,
+ );
+ }
+
+ let i, l;
+ const clock = createClock(config.now, config.loopLimit);
+ clock.shouldClearNativeTimers = config.shouldClearNativeTimers;
+
+ clock.uninstall = function () {
+ return uninstall(clock, config);
+ };
+
+ clock.abortListenerMap = new Map();
+
+ clock.methods = config.toFake || [];
+
+ if (clock.methods.length === 0) {
+ // do not fake nextTick by default - GitHub#126
+ clock.methods = Object.keys(timers).filter(function (key) {
+ return key !== "nextTick" && key !== "queueMicrotask";
+ });
+ }
+
+ if (config.shouldAdvanceTime === true) {
+ const intervalTick = doIntervalTick.bind(
+ null,
+ clock,
+ config.advanceTimeDelta,
+ );
+ const intervalId = _global.setInterval(
+ intervalTick,
+ config.advanceTimeDelta,
+ );
+ clock.attachedInterval = intervalId;
+ }
+
+ if (clock.methods.includes("performance")) {
+ const proto = (() => {
+ if (hasPerformanceConstructorPrototype) {
+ return _global.performance.constructor.prototype;
+ }
+ if (hasPerformancePrototype) {
+ return _global.Performance.prototype;
+ }
+ })();
+ if (proto) {
+ Object.getOwnPropertyNames(proto).forEach(function (name) {
+ if (name !== "now") {
+ clock.performance[name] =
+ name.indexOf("getEntries") === 0
+ ? NOOP_ARRAY
+ : NOOP;
+ }
+ });
+ } else if ((config.toFake || []).includes("performance")) {
+ return handleMissingTimer("performance");
+ }
+ }
+ if (_global === globalObject && timersModule) {
+ clock.timersModuleMethods = [];
+ }
+ if (_global === globalObject && timersPromisesModule) {
+ clock.timersPromisesModuleMethods = [];
+ }
+ for (i = 0, l = clock.methods.length; i < l; i++) {
+ const nameOfMethodToReplace = clock.methods[i];
+
+ if (!isPresent[nameOfMethodToReplace]) {
+ handleMissingTimer(nameOfMethodToReplace);
+ // eslint-disable-next-line
+ continue;
+ }
+
+ if (nameOfMethodToReplace === "hrtime") {
+ if (
+ _global.process &&
+ typeof _global.process.hrtime === "function"
+ ) {
+ hijackMethod(_global.process, nameOfMethodToReplace, clock);
+ }
+ } else if (nameOfMethodToReplace === "nextTick") {
+ if (
+ _global.process &&
+ typeof _global.process.nextTick === "function"
+ ) {
+ hijackMethod(_global.process, nameOfMethodToReplace, clock);
+ }
+ } else {
+ hijackMethod(_global, nameOfMethodToReplace, clock);
+ }
+ if (
+ clock.timersModuleMethods !== undefined &&
+ timersModule[nameOfMethodToReplace]
+ ) {
+ const original = timersModule[nameOfMethodToReplace];
+ clock.timersModuleMethods.push({
+ methodName: nameOfMethodToReplace,
+ original: original,
+ });
+ timersModule[nameOfMethodToReplace] =
+ _global[nameOfMethodToReplace];
+ }
+ if (clock.timersPromisesModuleMethods !== undefined) {
+ if (nameOfMethodToReplace === "setTimeout") {
+ clock.timersPromisesModuleMethods.push({
+ methodName: "setTimeout",
+ original: timersPromisesModule.setTimeout,
+ });
+
+ timersPromisesModule.setTimeout = (
+ delay,
+ value,
+ options = {},
+ ) =>
+ new Promise((resolve, reject) => {
+ const abort = () => {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+
+ // This is safe, there is no code path that leads to this function
+ // being invoked before handle has been assigned.
+ // eslint-disable-next-line no-use-before-define
+ clock.clearTimeout(handle);
+ reject(options.signal.reason);
+ };
+
+ const handle = clock.setTimeout(() => {
+ if (options.signal) {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+ }
+
+ resolve(value);
+ }, delay);
+
+ if (options.signal) {
+ if (options.signal.aborted) {
+ abort();
+ } else {
+ options.signal.addEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.set(
+ abort,
+ options.signal,
+ );
+ }
+ }
+ });
+ } else if (nameOfMethodToReplace === "setImmediate") {
+ clock.timersPromisesModuleMethods.push({
+ methodName: "setImmediate",
+ original: timersPromisesModule.setImmediate,
+ });
+
+ timersPromisesModule.setImmediate = (value, options = {}) =>
+ new Promise((resolve, reject) => {
+ const abort = () => {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+
+ // This is safe, there is no code path that leads to this function
+ // being invoked before handle has been assigned.
+ // eslint-disable-next-line no-use-before-define
+ clock.clearImmediate(handle);
+ reject(options.signal.reason);
+ };
+
+ const handle = clock.setImmediate(() => {
+ if (options.signal) {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+ }
+
+ resolve(value);
+ });
+
+ if (options.signal) {
+ if (options.signal.aborted) {
+ abort();
+ } else {
+ options.signal.addEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.set(
+ abort,
+ options.signal,
+ );
+ }
+ }
+ });
+ } else if (nameOfMethodToReplace === "setInterval") {
+ clock.timersPromisesModuleMethods.push({
+ methodName: "setInterval",
+ original: timersPromisesModule.setInterval,
+ });
+
+ timersPromisesModule.setInterval = (
+ delay,
+ value,
+ options = {},
+ ) => ({
+ [Symbol.asyncIterator]: () => {
+ const createResolvable = () => {
+ let resolve, reject;
+ const promise = new Promise((res, rej) => {
+ resolve = res;
+ reject = rej;
+ });
+ promise.resolve = resolve;
+ promise.reject = reject;
+ return promise;
+ };
+
+ let done = false;
+ let hasThrown = false;
+ let returnCall;
+ let nextAvailable = 0;
+ const nextQueue = [];
+
+ const handle = clock.setInterval(() => {
+ if (nextQueue.length > 0) {
+ nextQueue.shift().resolve();
+ } else {
+ nextAvailable++;
+ }
+ }, delay);
+
+ const abort = () => {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+
+ clock.clearInterval(handle);
+ done = true;
+ for (const resolvable of nextQueue) {
+ resolvable.resolve();
+ }
+ };
+
+ if (options.signal) {
+ if (options.signal.aborted) {
+ done = true;
+ } else {
+ options.signal.addEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.set(
+ abort,
+ options.signal,
+ );
+ }
+ }
+
+ return {
+ next: async () => {
+ if (options.signal?.aborted && !hasThrown) {
+ hasThrown = true;
+ throw options.signal.reason;
+ }
+
+ if (done) {
+ return { done: true, value: undefined };
+ }
+
+ if (nextAvailable > 0) {
+ nextAvailable--;
+ return { done: false, value: value };
+ }
+
+ const resolvable = createResolvable();
+ nextQueue.push(resolvable);
+
+ await resolvable;
+
+ if (returnCall && nextQueue.length === 0) {
+ returnCall.resolve();
+ }
+
+ if (options.signal?.aborted && !hasThrown) {
+ hasThrown = true;
+ throw options.signal.reason;
+ }
+
+ if (done) {
+ return { done: true, value: undefined };
+ }
+
+ return { done: false, value: value };
+ },
+ return: async () => {
+ if (done) {
+ return { done: true, value: undefined };
+ }
+
+ if (nextQueue.length > 0) {
+ returnCall = createResolvable();
+ await returnCall;
+ }
+
+ clock.clearInterval(handle);
+ done = true;
+
+ if (options.signal) {
+ options.signal.removeEventListener(
+ "abort",
+ abort,
+ );
+ clock.abortListenerMap.delete(abort);
+ }
+
+ return { done: true, value: undefined };
+ },
+ };
+ },
+ });
+ }
+ }
+ }
+
+ return clock;
+ }
+
+ /* eslint-enable complexity */
+
+ return {
+ timers: timers,
+ createClock: createClock,
+ install: install,
+ withGlobal: withGlobal,
+ };
+}
+
+/**
+ * @typedef {object} FakeTimers
+ * @property {Timers} timers
+ * @property {createClock} createClock
+ * @property {Function} install
+ * @property {withGlobal} withGlobal
+ */
+
+/* eslint-enable complexity */
+
+/** @type {FakeTimers} */
+const defaultImplementation = withGlobal(globalObject);
+
+exports.timers = defaultImplementation.timers;
+exports.createClock = defaultImplementation.createClock;
+exports.install = defaultImplementation.install;
+exports.withGlobal = withGlobal;
diff --git a/node_modules/@sinonjs/samsam/LICENSE b/node_modules/@sinonjs/samsam/LICENSE
new file mode 100644
index 0000000..f00310b
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/LICENSE
@@ -0,0 +1,27 @@
+(The BSD License)
+
+Copyright (c) 2010-2012, Christian Johansen, christian@cjohansen.no and
+August Lilleaas, august.lilleaas@gmail.com. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of Christian Johansen nor the names of his contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@sinonjs/samsam/README.md b/node_modules/@sinonjs/samsam/README.md
new file mode 100644
index 0000000..1015995
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/README.md
@@ -0,0 +1,83 @@
+# samsam
+
+[](https://circleci.com/gh/sinonjs/samsam)
+[](https://codecov.io/gh/sinonjs/samsam)
+
+
+Value identification and comparison functions
+
+Documentation: http://sinonjs.github.io/samsam/
+
+## Backers
+
+Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/sinon#backer)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Sponsors
+
+Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/sinon#sponsor)]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Licence
+
+samsam was released under [BSD-3](LICENSE)
diff --git a/node_modules/@sinonjs/samsam/docs/index.md b/node_modules/@sinonjs/samsam/docs/index.md
new file mode 100644
index 0000000..4770b18
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/docs/index.md
@@ -0,0 +1,390 @@
+# samsam
+
+> Same same, but different
+
+`samsam` is a collection of predicate and comparison functions useful for
+identifiying the type of values and to compare values with varying degrees of
+strictness.
+
+`samsam` is a general-purpose library. It works in browsers and Node. It will
+define itself as an AMD module if you want it to (i.e. if there's a `define`
+function available).
+
+## Predicate functions
+
+### `isArguments(value)`
+
+Returns `true` if `value` is an `arguments` object, `false` otherwise.
+
+### `isNegZero(value)`
+
+Returns `true` if `value` is `-0`.
+
+### `isElement(value)`
+
+Returns `true` if `value` is a DOM element node. Unlike
+Underscore.js/lodash, this function will return `false` if `value` is an
+_element-like_ object, i.e. a regular object with a `nodeType` property that
+holds the value `1`.
+
+### `isSet(value)`
+
+Returns `true` if `value` is a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set).
+
+## Comparison functions
+
+### `identical(x, y)`
+
+Strict equality check according to EcmaScript Harmony's `egal`.
+
+**From the Harmony wiki:**
+
+> An egal function simply makes available the internal `SameValue` function
+> from section 9.12 of the ES5 spec. If two values are egal, then they are not
+> observably distinguishable.
+
+`identical` returns `true` when `===` is `true`, except for `-0` and
+`+0`, where it returns `false`. Additionally, it returns `true` when
+`NaN` is compared to itself.
+
+### `deepEqual(actual, expectation)`
+
+Deep equal comparison. Two values are "deep equal" if:
+
+- They are identical
+- They are both date objects representing the same time
+- They are both arrays containing elements that are all deepEqual
+- They are objects with the same set of properties, and each property
+ in `actual` is deepEqual to the corresponding property in `expectation`
+
+ - `actual` can have [symbolic properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that are missing from `expectation`
+
+### Matcher
+
+Match values and objects by type or or other fuzzy criteria. `samsam` ships
+with these built in matchers:
+
+#### `sinon.match.any`
+
+Matches anything.
+
+#### `sinon.match.defined`
+
+Requires the value to be defined.
+
+#### `sinon.match.truthy`
+
+Requires the value to be truthy.
+
+#### `sinon.match.falsy`
+
+Requires the value to be falsy.
+
+#### `sinon.match.bool`
+
+Requires the value to be a `Boolean`
+
+#### `sinon.match.number`
+
+Requires the value to be a `Number`.
+
+#### `sinon.match.string`
+
+Requires the value to be a `String`.
+
+#### `sinon.match.object`
+
+Requires the value to be an `Object`.
+
+#### `sinon.match.func`
+
+Requires the value to be a `Function`.
+
+#### `sinon.match.array`
+
+Requires the value to be an `Array`.
+
+#### `sinon.match.array.deepEquals(arr)`
+
+Requires an `Array` to be deep equal another one.
+
+#### `sinon.match.array.startsWith(arr)`
+
+Requires an `Array` to start with the same values as another one.
+
+#### `sinon.match.array.endsWith(arr)`
+
+Requires an `Array` to end with the same values as another one.
+
+#### `sinon.match.array.contains(arr)`
+
+Requires an `Array` to contain each one of the values the given array has.
+
+#### `sinon.match.map`
+
+Requires the value to be a `Map`.
+
+#### `sinon.match.map.deepEquals(map)`
+
+Requires a `Map` to be deep equal another one.
+
+#### `sinon.match.map.contains(map)`
+
+Requires a `Map` to contain each one of the items the given map has.
+
+#### `sinon.match.set`
+
+Requires the value to be a `Set`.
+
+#### `sinon.match.set.deepEquals(set)`
+
+Requires a `Set` to be deep equal another one.
+
+#### `sinon.match.set.contains(set)`
+
+Requires a `Set` to contain each one of the items the given set has.
+
+#### `sinon.match.regexp`
+
+Requires the value to be a regular expression.
+
+#### `sinon.match.date`
+
+Requires the value to be a `Date` object.
+
+#### `sinon.match.symbol`
+
+Requires the value to be a `Symbol`.
+
+#### `sinon.match.in(array)`
+
+Requires the value to be in the `array`.
+
+#### `sinon.match.same(ref)`
+
+Requires the value to strictly equal `ref`.
+
+#### `sinon.match.typeOf(type)`
+
+Requires the value to be of the given type, where `type` can be one of
+`"undefined"`,
+`"null"`,
+`"boolean"`,
+`"number"`,
+`"string"`,
+`"object"`,
+`"function"`,
+`"array"`,
+`"regexp"`,
+`"date"` or
+`"symbol"`.
+
+#### `sinon.match.instanceOf(type)`
+
+Requires the value to be an instance of the given `type`.
+
+#### `sinon.match.has(property[, expectation])`
+
+Requires the value to define the given `property`.
+
+The property might be inherited via the prototype chain. If the optional expectation is given, the value of the property is deeply compared with the expectation. The expectation can be another matcher.
+
+#### `sinon.match.hasOwn(property[, expectation])`
+
+Same as `sinon.match.has` but the property must be defined by the value itself. Inherited properties are ignored.
+
+#### `sinon.match.hasNested(propertyPath[, expectation])`
+
+Requires the value to define the given `propertyPath`. Dot (`prop.prop`) and bracket (`prop[0]`) notations are supported as in [Lodash.get](https://lodash.com/docs/4.4.2#get).
+
+The propertyPath might be inherited via the prototype chain. If the optional expectation is given, the value at the propertyPath is deeply compared with the expectation. The expectation can be another matcher.
+
+```javascript
+sinon.match.hasNested("a[0].b.c");
+
+// Where actual is something like
+var actual = { a: [{ b: { c: 3 } }] };
+
+sinon.match.hasNested("a.b.c");
+
+// Where actual is something like
+var actual = { a: { b: { c: 3 } } };
+```
+
+#### `sinon.match.every(matcher)`
+
+Requires **every** element of an `Array`, `Set` or `Map`, or alternatively **every** value of an `Object` to match the given `matcher`.
+
+#### `sinon.match.some(matcher)`
+
+Requires **any** element of an `Array`, `Set` or `Map`, or alternatively **any** value of an `Object` to match the given `matcher`.
+
+## Combining matchers
+
+All matchers implement `and` and `or`. This allows to logically combine mutliple matchers. The result is a new matchers that requires both (and) or one of the matchers (or) to return `true`.
+
+```javascript
+var stringOrNumber = sinon.match.string.or(sinon.match.number);
+var bookWithPages = sinon.match.instanceOf(Book).and(sinon.match.has("pages"));
+```
+
+### `match(object, matcher)`
+
+Creates a custom matcher to perform partial equality check. Compares `object`
+with matcher according a wide set of rules:
+
+#### String matcher
+
+In its simplest form, `match` performs a case insensitive substring match.
+When the matcher is a string, `object` is converted to a string, and the
+function returns `true` if the matcher is a case-insensitive substring of
+`object` as a string.
+
+```javascript
+samsam.match("Give me something", "Give"); //true
+samsam.match("Give me something", "sumptn"); // false
+samsam.match(
+ {
+ toString: function () {
+ return "yeah";
+ },
+ },
+ "Yeah!",
+); // true
+```
+
+The last example is not symmetric. When the matcher is a string, the `object`
+is coerced to a string - in this case using `toString`. Changing the order of
+the arguments would cause the matcher to be an object, in which case different
+rules apply (see below).
+
+#### Boolean matcher
+
+Performs a strict (i.e. `===`) match with the object. So, only `true`
+matches `true`, and only `false` matches `false`.
+
+#### Regular expression matcher
+
+When the matcher is a regular expression, the function will pass if
+`object.test(matcher)` is `true`. `match` is written in a generic way, so
+any object with a `test` method will be used as a matcher this way.
+
+```javascript
+samsam.match("Give me something", /^[a-z\s]$/i); // true
+samsam.match("Give me something", /[0-9]/); // false
+samsam.match(
+ {
+ toString: function () {
+ return "yeah!";
+ },
+ },
+ /yeah/,
+); // true
+samsam.match(234, /[a-z]/); // false
+```
+
+#### Number matcher
+
+When the matcher is a number, the assertion will pass if `object == matcher`.
+
+```javascript
+samsam.match("123", 123); // true
+samsam.match("Give me something", 425); // false
+samsam.match(
+ {
+ toString: function () {
+ return "42";
+ },
+ },
+ 42,
+); // true
+samsam.match(234, 1234); // false
+```
+
+#### Function matcher
+
+When the matcher is a function, it is called with `object` as its only
+argument. `match` returns `true` if the function returns `true`. A strict
+match is performed against the return value, so a boolean `true` is required,
+truthy is not enough.
+
+```javascript
+// true
+samsam.match("123", function (exp) {
+ return exp == "123";
+});
+
+// false
+samsam.match("Give me something", function () {
+ return "ok";
+});
+
+// true
+samsam.match(
+ {
+ toString: function () {
+ return "42";
+ },
+ },
+ function () {
+ return true;
+ },
+);
+
+// false
+samsam.match(234, function () {});
+```
+
+#### Object matcher
+
+As mentioned above, if an object matcher defines a `test` method, `match`
+will return `true` if `matcher.test(object)` returns truthy.
+
+If the matcher does not have a test method, a recursive match is performed. If
+all properties of `matcher` matches corresponding properties in `object`,
+`match` returns `true`. Note that the object matcher does not care if the
+number of properties in the two objects are the same - only if all properties in
+the matcher recursively matches ones in `object`. If supported, this object matchers
+include [symbolic properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol)
+in the comparison.
+
+```javascript
+// true
+samsam.match("123", {
+ test: function (arg) {
+ return arg == 123;
+ },
+});
+
+// false
+samsam.match({}, { prop: 42 });
+
+// true
+samsam.match(
+ {
+ name: "Chris",
+ profession: "Programmer",
+ },
+ {
+ name: "Chris",
+ },
+);
+
+// false
+samsam.match(234, { name: "Chris" });
+```
+
+#### DOM elements
+
+`match` can be very helpful when comparing DOM elements, because it allows
+you to compare several properties with one call:
+
+```javascript
+var el = document.getElementById("myEl");
+
+samsam.match(el, {
+ tagName: "h2",
+ className: "item",
+ innerHTML: "Howdy",
+});
+```
diff --git a/node_modules/@sinonjs/samsam/lib/array-types.js b/node_modules/@sinonjs/samsam/lib/array-types.js
new file mode 100644
index 0000000..0cb471a
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/array-types.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var ARRAY_TYPES = [
+ Array,
+ Int8Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array,
+];
+
+module.exports = ARRAY_TYPES;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher.js b/node_modules/@sinonjs/samsam/lib/create-matcher.js
new file mode 100644
index 0000000..81b49a5
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher.js
@@ -0,0 +1,413 @@
+"use strict";
+
+var arrayProto = require("@sinonjs/commons").prototypes.array;
+var deepEqual = require("./deep-equal").use(createMatcher); // eslint-disable-line no-use-before-define
+var every = require("@sinonjs/commons").every;
+var functionName = require("@sinonjs/commons").functionName;
+var get = require("lodash.get");
+var iterableToString = require("./iterable-to-string");
+var objectProto = require("@sinonjs/commons").prototypes.object;
+var typeOf = require("@sinonjs/commons").typeOf;
+var valueToString = require("@sinonjs/commons").valueToString;
+
+var assertMatcher = require("./create-matcher/assert-matcher");
+var assertMethodExists = require("./create-matcher/assert-method-exists");
+var assertType = require("./create-matcher/assert-type");
+var isIterable = require("./create-matcher/is-iterable");
+var isMatcher = require("./create-matcher/is-matcher");
+
+var matcherPrototype = require("./create-matcher/matcher-prototype");
+
+var arrayIndexOf = arrayProto.indexOf;
+var some = arrayProto.some;
+
+var hasOwnProperty = objectProto.hasOwnProperty;
+var objectToString = objectProto.toString;
+
+var TYPE_MAP = require("./create-matcher/type-map")(createMatcher); // eslint-disable-line no-use-before-define
+
+/**
+ * Creates a matcher object for the passed expectation
+ *
+ * @alias module:samsam.createMatcher
+ * @param {*} expectation An expecttation
+ * @param {string} message A message for the expectation
+ * @returns {object} A matcher object
+ */
+function createMatcher(expectation, message) {
+ var m = Object.create(matcherPrototype);
+ var type = typeOf(expectation);
+
+ if (message !== undefined && typeof message !== "string") {
+ throw new TypeError("Message should be a string");
+ }
+
+ if (arguments.length > 2) {
+ throw new TypeError(
+ `Expected 1 or 2 arguments, received ${arguments.length}`,
+ );
+ }
+
+ if (type in TYPE_MAP) {
+ TYPE_MAP[type](m, expectation, message);
+ } else {
+ m.test = function (actual) {
+ return deepEqual(actual, expectation);
+ };
+ }
+
+ if (!m.message) {
+ m.message = `match(${valueToString(expectation)})`;
+ }
+
+ // ensure that nothing mutates the exported message value, ref https://github.com/sinonjs/sinon/issues/2502
+ Object.defineProperty(m, "message", {
+ configurable: false,
+ writable: false,
+ value: m.message,
+ });
+
+ return m;
+}
+
+createMatcher.isMatcher = isMatcher;
+
+createMatcher.any = createMatcher(function () {
+ return true;
+}, "any");
+
+createMatcher.defined = createMatcher(function (actual) {
+ return actual !== null && actual !== undefined;
+}, "defined");
+
+createMatcher.truthy = createMatcher(function (actual) {
+ return Boolean(actual);
+}, "truthy");
+
+createMatcher.falsy = createMatcher(function (actual) {
+ return !actual;
+}, "falsy");
+
+createMatcher.same = function (expectation) {
+ return createMatcher(
+ function (actual) {
+ return expectation === actual;
+ },
+ `same(${valueToString(expectation)})`,
+ );
+};
+
+createMatcher.in = function (arrayOfExpectations) {
+ if (typeOf(arrayOfExpectations) !== "array") {
+ throw new TypeError("array expected");
+ }
+
+ return createMatcher(
+ function (actual) {
+ return some(arrayOfExpectations, function (expectation) {
+ return expectation === actual;
+ });
+ },
+ `in(${valueToString(arrayOfExpectations)})`,
+ );
+};
+
+createMatcher.typeOf = function (type) {
+ assertType(type, "string", "type");
+ return createMatcher(function (actual) {
+ return typeOf(actual) === type;
+ }, `typeOf("${type}")`);
+};
+
+createMatcher.instanceOf = function (type) {
+ /* istanbul ignore if */
+ if (
+ typeof Symbol === "undefined" ||
+ typeof Symbol.hasInstance === "undefined"
+ ) {
+ assertType(type, "function", "type");
+ } else {
+ assertMethodExists(
+ type,
+ Symbol.hasInstance,
+ "type",
+ "[Symbol.hasInstance]",
+ );
+ }
+ return createMatcher(
+ function (actual) {
+ return actual instanceof type;
+ },
+ `instanceOf(${functionName(type) || objectToString(type)})`,
+ );
+};
+
+/**
+ * Creates a property matcher
+ *
+ * @private
+ * @param {Function} propertyTest A function to test the property against a value
+ * @param {string} messagePrefix A prefix to use for messages generated by the matcher
+ * @returns {object} A matcher
+ */
+function createPropertyMatcher(propertyTest, messagePrefix) {
+ return function (property, value) {
+ assertType(property, "string", "property");
+ var onlyProperty = arguments.length === 1;
+ var message = `${messagePrefix}("${property}"`;
+ if (!onlyProperty) {
+ message += `, ${valueToString(value)}`;
+ }
+ message += ")";
+ return createMatcher(function (actual) {
+ if (
+ actual === undefined ||
+ actual === null ||
+ !propertyTest(actual, property)
+ ) {
+ return false;
+ }
+ return onlyProperty || deepEqual(actual[property], value);
+ }, message);
+ };
+}
+
+createMatcher.has = createPropertyMatcher(function (actual, property) {
+ if (typeof actual === "object") {
+ return property in actual;
+ }
+ return actual[property] !== undefined;
+}, "has");
+
+createMatcher.hasOwn = createPropertyMatcher(function (actual, property) {
+ return hasOwnProperty(actual, property);
+}, "hasOwn");
+
+createMatcher.hasNested = function (property, value) {
+ assertType(property, "string", "property");
+ var onlyProperty = arguments.length === 1;
+ var message = `hasNested("${property}"`;
+ if (!onlyProperty) {
+ message += `, ${valueToString(value)}`;
+ }
+ message += ")";
+ return createMatcher(function (actual) {
+ if (
+ actual === undefined ||
+ actual === null ||
+ get(actual, property) === undefined
+ ) {
+ return false;
+ }
+ return onlyProperty || deepEqual(get(actual, property), value);
+ }, message);
+};
+
+var jsonParseResultTypes = {
+ null: true,
+ boolean: true,
+ number: true,
+ string: true,
+ object: true,
+ array: true,
+};
+createMatcher.json = function (value) {
+ if (!jsonParseResultTypes[typeOf(value)]) {
+ throw new TypeError("Value cannot be the result of JSON.parse");
+ }
+ var message = `json(${JSON.stringify(value, null, " ")})`;
+ return createMatcher(function (actual) {
+ var parsed;
+ try {
+ parsed = JSON.parse(actual);
+ } catch (e) {
+ return false;
+ }
+ return deepEqual(parsed, value);
+ }, message);
+};
+
+createMatcher.every = function (predicate) {
+ assertMatcher(predicate);
+
+ return createMatcher(function (actual) {
+ if (typeOf(actual) === "object") {
+ return every(Object.keys(actual), function (key) {
+ return predicate.test(actual[key]);
+ });
+ }
+
+ return (
+ isIterable(actual) &&
+ every(actual, function (element) {
+ return predicate.test(element);
+ })
+ );
+ }, `every(${predicate.message})`);
+};
+
+createMatcher.some = function (predicate) {
+ assertMatcher(predicate);
+
+ return createMatcher(function (actual) {
+ if (typeOf(actual) === "object") {
+ return !every(Object.keys(actual), function (key) {
+ return !predicate.test(actual[key]);
+ });
+ }
+
+ return (
+ isIterable(actual) &&
+ !every(actual, function (element) {
+ return !predicate.test(element);
+ })
+ );
+ }, `some(${predicate.message})`);
+};
+
+createMatcher.array = createMatcher.typeOf("array");
+
+createMatcher.array.deepEquals = function (expectation) {
+ return createMatcher(
+ function (actual) {
+ // Comparing lengths is the fastest way to spot a difference before iterating through every item
+ var sameLength = actual.length === expectation.length;
+ return (
+ typeOf(actual) === "array" &&
+ sameLength &&
+ every(actual, function (element, index) {
+ var expected = expectation[index];
+ return typeOf(expected) === "array" &&
+ typeOf(element) === "array"
+ ? createMatcher.array.deepEquals(expected).test(element)
+ : deepEqual(expected, element);
+ })
+ );
+ },
+ `deepEquals([${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.array.startsWith = function (expectation) {
+ return createMatcher(
+ function (actual) {
+ return (
+ typeOf(actual) === "array" &&
+ every(expectation, function (expectedElement, index) {
+ return actual[index] === expectedElement;
+ })
+ );
+ },
+ `startsWith([${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.array.endsWith = function (expectation) {
+ return createMatcher(
+ function (actual) {
+ // This indicates the index in which we should start matching
+ var offset = actual.length - expectation.length;
+
+ return (
+ typeOf(actual) === "array" &&
+ every(expectation, function (expectedElement, index) {
+ return actual[offset + index] === expectedElement;
+ })
+ );
+ },
+ `endsWith([${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.array.contains = function (expectation) {
+ return createMatcher(
+ function (actual) {
+ return (
+ typeOf(actual) === "array" &&
+ every(expectation, function (expectedElement) {
+ return arrayIndexOf(actual, expectedElement) !== -1;
+ })
+ );
+ },
+ `contains([${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.map = createMatcher.typeOf("map");
+
+createMatcher.map.deepEquals = function mapDeepEquals(expectation) {
+ return createMatcher(
+ function (actual) {
+ // Comparing lengths is the fastest way to spot a difference before iterating through every item
+ var sameLength = actual.size === expectation.size;
+ return (
+ typeOf(actual) === "map" &&
+ sameLength &&
+ every(actual, function (element, key) {
+ return (
+ expectation.has(key) && expectation.get(key) === element
+ );
+ })
+ );
+ },
+ `deepEquals(Map[${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.map.contains = function mapContains(expectation) {
+ return createMatcher(
+ function (actual) {
+ return (
+ typeOf(actual) === "map" &&
+ every(expectation, function (element, key) {
+ return actual.has(key) && actual.get(key) === element;
+ })
+ );
+ },
+ `contains(Map[${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.set = createMatcher.typeOf("set");
+
+createMatcher.set.deepEquals = function setDeepEquals(expectation) {
+ return createMatcher(
+ function (actual) {
+ // Comparing lengths is the fastest way to spot a difference before iterating through every item
+ var sameLength = actual.size === expectation.size;
+ return (
+ typeOf(actual) === "set" &&
+ sameLength &&
+ every(actual, function (element) {
+ return expectation.has(element);
+ })
+ );
+ },
+ `deepEquals(Set[${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.set.contains = function setContains(expectation) {
+ return createMatcher(
+ function (actual) {
+ return (
+ typeOf(actual) === "set" &&
+ every(expectation, function (element) {
+ return actual.has(element);
+ })
+ );
+ },
+ `contains(Set[${iterableToString(expectation)}])`,
+ );
+};
+
+createMatcher.bool = createMatcher.typeOf("boolean");
+createMatcher.number = createMatcher.typeOf("number");
+createMatcher.string = createMatcher.typeOf("string");
+createMatcher.object = createMatcher.typeOf("object");
+createMatcher.func = createMatcher.typeOf("function");
+createMatcher.regexp = createMatcher.typeOf("regexp");
+createMatcher.date = createMatcher.typeOf("date");
+createMatcher.symbol = createMatcher.typeOf("symbol");
+
+module.exports = createMatcher;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/assert-matcher.js b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-matcher.js
new file mode 100644
index 0000000..a4abd48
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-matcher.js
@@ -0,0 +1,17 @@
+"use strict";
+
+var isMatcher = require("./is-matcher");
+
+/**
+ * Throws a TypeError when `value` is not a matcher
+ *
+ * @private
+ * @param {*} value The value to examine
+ */
+function assertMatcher(value) {
+ if (!isMatcher(value)) {
+ throw new TypeError("Matcher expected");
+ }
+}
+
+module.exports = assertMatcher;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/assert-method-exists.js b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-method-exists.js
new file mode 100644
index 0000000..5150cf9
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-method-exists.js
@@ -0,0 +1,19 @@
+"use strict";
+
+/**
+ * Throws a TypeError when expected method doesn't exist
+ *
+ * @private
+ * @param {*} value A value to examine
+ * @param {string} method The name of the method to look for
+ * @param {name} name A name to use for the error message
+ * @param {string} methodPath The name of the method to use for error messages
+ * @throws {TypeError} When the method doesn't exist
+ */
+function assertMethodExists(value, method, name, methodPath) {
+ if (value[method] === null || value[method] === undefined) {
+ throw new TypeError(`Expected ${name} to have method ${methodPath}`);
+ }
+}
+
+module.exports = assertMethodExists;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/assert-type.js b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-type.js
new file mode 100644
index 0000000..20b4d4c
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/assert-type.js
@@ -0,0 +1,24 @@
+"use strict";
+
+var typeOf = require("@sinonjs/commons").typeOf;
+
+/**
+ * Ensures that value is of type
+ *
+ * @private
+ * @param {*} value A value to examine
+ * @param {string} type A basic JavaScript type to compare to, e.g. "object", "string"
+ * @param {string} name A string to use for the error message
+ * @throws {TypeError} If value is not of the expected type
+ * @returns {undefined}
+ */
+function assertType(value, type, name) {
+ var actual = typeOf(value);
+ if (actual !== type) {
+ throw new TypeError(
+ `Expected type of ${name} to be ${type}, but was ${actual}`,
+ );
+ }
+}
+
+module.exports = assertType;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/is-iterable.js b/node_modules/@sinonjs/samsam/lib/create-matcher/is-iterable.js
new file mode 100644
index 0000000..d9180ae
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/is-iterable.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var typeOf = require("@sinonjs/commons").typeOf;
+
+/**
+ * Returns `true` for iterables
+ *
+ * @private
+ * @param {*} value A value to examine
+ * @returns {boolean} Returns `true` when `value` looks like an iterable
+ */
+function isIterable(value) {
+ return Boolean(value) && typeOf(value.forEach) === "function";
+}
+
+module.exports = isIterable;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/is-matcher.js b/node_modules/@sinonjs/samsam/lib/create-matcher/is-matcher.js
new file mode 100644
index 0000000..60c487c
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/is-matcher.js
@@ -0,0 +1,18 @@
+"use strict";
+
+var isPrototypeOf = require("@sinonjs/commons").prototypes.object.isPrototypeOf;
+
+var matcherPrototype = require("./matcher-prototype");
+
+/**
+ * Returns `true` when `object` is a matcher
+ *
+ * @private
+ * @param {*} object A value to examine
+ * @returns {boolean} Returns `true` when `object` is a matcher
+ */
+function isMatcher(object) {
+ return isPrototypeOf(matcherPrototype, object);
+}
+
+module.exports = isMatcher;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/match-object.js b/node_modules/@sinonjs/samsam/lib/create-matcher/match-object.js
new file mode 100644
index 0000000..b25391c
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/match-object.js
@@ -0,0 +1,59 @@
+"use strict";
+
+var every = require("@sinonjs/commons").prototypes.array.every;
+var concat = require("@sinonjs/commons").prototypes.array.concat;
+var typeOf = require("@sinonjs/commons").typeOf;
+
+var deepEqualFactory = require("../deep-equal").use;
+
+var identical = require("../identical");
+var isMatcher = require("./is-matcher");
+
+var keys = Object.keys;
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Matches `actual` with `expectation`
+ *
+ * @private
+ * @param {*} actual A value to examine
+ * @param {object} expectation An object with properties to match on
+ * @param {object} matcher A matcher to use for comparison
+ * @returns {boolean} Returns true when `actual` matches all properties in `expectation`
+ */
+function matchObject(actual, expectation, matcher) {
+ var deepEqual = deepEqualFactory(matcher);
+ if (actual === null || actual === undefined) {
+ return false;
+ }
+
+ var expectedKeys = keys(expectation);
+ /* istanbul ignore else: cannot collect coverage for engine that doesn't support Symbol */
+ if (typeOf(getOwnPropertySymbols) === "function") {
+ expectedKeys = concat(expectedKeys, getOwnPropertySymbols(expectation));
+ }
+
+ return every(expectedKeys, function (key) {
+ var exp = expectation[key];
+ var act = actual[key];
+
+ if (isMatcher(exp)) {
+ if (!exp.test(act)) {
+ return false;
+ }
+ } else if (typeOf(exp) === "object") {
+ if (identical(exp, act)) {
+ return true;
+ }
+ if (!matchObject(act, exp, matcher)) {
+ return false;
+ }
+ } else if (!deepEqual(act, exp)) {
+ return false;
+ }
+
+ return true;
+ });
+}
+
+module.exports = matchObject;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/matcher-prototype.js b/node_modules/@sinonjs/samsam/lib/create-matcher/matcher-prototype.js
new file mode 100644
index 0000000..a3d024e
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/matcher-prototype.js
@@ -0,0 +1,49 @@
+"use strict";
+
+var matcherPrototype = {
+ toString: function () {
+ return this.message;
+ },
+};
+
+matcherPrototype.or = function (valueOrMatcher) {
+ var createMatcher = require("../create-matcher");
+ var isMatcher = createMatcher.isMatcher;
+
+ if (!arguments.length) {
+ throw new TypeError("Matcher expected");
+ }
+
+ var m2 = isMatcher(valueOrMatcher)
+ ? valueOrMatcher
+ : createMatcher(valueOrMatcher);
+ var m1 = this;
+ var or = Object.create(matcherPrototype);
+ or.test = function (actual) {
+ return m1.test(actual) || m2.test(actual);
+ };
+ or.message = `${m1.message}.or(${m2.message})`;
+ return or;
+};
+
+matcherPrototype.and = function (valueOrMatcher) {
+ var createMatcher = require("../create-matcher");
+ var isMatcher = createMatcher.isMatcher;
+
+ if (!arguments.length) {
+ throw new TypeError("Matcher expected");
+ }
+
+ var m2 = isMatcher(valueOrMatcher)
+ ? valueOrMatcher
+ : createMatcher(valueOrMatcher);
+ var m1 = this;
+ var and = Object.create(matcherPrototype);
+ and.test = function (actual) {
+ return m1.test(actual) && m2.test(actual);
+ };
+ and.message = `${m1.message}.and(${m2.message})`;
+ return and;
+};
+
+module.exports = matcherPrototype;
diff --git a/node_modules/@sinonjs/samsam/lib/create-matcher/type-map.js b/node_modules/@sinonjs/samsam/lib/create-matcher/type-map.js
new file mode 100644
index 0000000..abd3626
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-matcher/type-map.js
@@ -0,0 +1,62 @@
+"use strict";
+
+var functionName = require("@sinonjs/commons").functionName;
+var join = require("@sinonjs/commons").prototypes.array.join;
+var map = require("@sinonjs/commons").prototypes.array.map;
+var stringIndexOf = require("@sinonjs/commons").prototypes.string.indexOf;
+var valueToString = require("@sinonjs/commons").valueToString;
+
+var matchObject = require("./match-object");
+
+var createTypeMap = function (match) {
+ return {
+ function: function (m, expectation, message) {
+ m.test = expectation;
+ m.message = message || `match(${functionName(expectation)})`;
+ },
+ number: function (m, expectation) {
+ m.test = function (actual) {
+ // we need type coercion here
+ return expectation == actual; // eslint-disable-line eqeqeq
+ };
+ },
+ object: function (m, expectation) {
+ var array = [];
+
+ if (typeof expectation.test === "function") {
+ m.test = function (actual) {
+ return expectation.test(actual) === true;
+ };
+ m.message = `match(${functionName(expectation.test)})`;
+ return m;
+ }
+
+ array = map(Object.keys(expectation), function (key) {
+ return `${key}: ${valueToString(expectation[key])}`;
+ });
+
+ m.test = function (actual) {
+ return matchObject(actual, expectation, match);
+ };
+ m.message = `match(${join(array, ", ")})`;
+
+ return m;
+ },
+ regexp: function (m, expectation) {
+ m.test = function (actual) {
+ return typeof actual === "string" && expectation.test(actual);
+ };
+ },
+ string: function (m, expectation) {
+ m.test = function (actual) {
+ return (
+ typeof actual === "string" &&
+ stringIndexOf(actual, expectation) !== -1
+ );
+ };
+ m.message = `match("${expectation}")`;
+ },
+ };
+};
+
+module.exports = createTypeMap;
diff --git a/node_modules/@sinonjs/samsam/lib/create-set.js b/node_modules/@sinonjs/samsam/lib/create-set.js
new file mode 100644
index 0000000..e03f4c4
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/create-set.js
@@ -0,0 +1,34 @@
+"use strict";
+
+var typeOf = require("@sinonjs/commons").typeOf;
+var forEach = require("@sinonjs/commons").prototypes.array.forEach;
+
+/**
+ * This helper makes it convenient to create Set instances from a
+ * collection, an overcomes the shortcoming that IE11 doesn't support
+ * collection arguments
+ *
+ * @private
+ * @param {Array} array An array to create a set from
+ * @returns {Set} A set (unique) containing the members from array
+ *
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
+ */
+function createSet(array) {
+ if (arguments.length > 0 && !Array.isArray(array)) {
+ throw new TypeError(
+ "createSet can be called with either no arguments or an Array",
+ );
+ }
+
+ var items = typeOf(array) === "array" ? array : [];
+ var set = new Set();
+
+ forEach(items, function (item) {
+ set.add(item);
+ });
+
+ return set;
+}
+
+module.exports = createSet;
diff --git a/node_modules/@sinonjs/samsam/lib/deep-equal-benchmark.js b/node_modules/@sinonjs/samsam/lib/deep-equal-benchmark.js
new file mode 100644
index 0000000..1f39b15
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/deep-equal-benchmark.js
@@ -0,0 +1,74 @@
+"use strict";
+
+var Benchmark = require("benchmark");
+var deepEqual = require("./deep-equal");
+
+var suite = new Benchmark.Suite();
+var complex1 = {
+ "1e116061-59bf-433a-8ab0-017b67a51d26":
+ "a7fd22ab-e809-414f-ad55-9c97598395d8",
+ "3824e8b7-22f5-489c-9919-43b432e3af6b":
+ "548baefd-f43c-4dc9-9df5-f7c9c96223b0",
+ "123e5750-eb66-45e5-a770-310879203b33":
+ "89ff817d-65a2-4598-b190-21c128096e6a",
+ "1d66be95-8aaa-4167-9a47-e7ee19bb0735":
+ "64349492-56e8-4100-9552-a89fb4a9aef4",
+ "f5538565-dc92-4ee4-a762-1ba5fe0528f6": {
+ "53631f78-2f2a-448f-89c7-ed3585e8e6f0":
+ "2cce00ee-f5ee-43ef-878f-958597b23225",
+ "73e8298b-72fd-4969-afc1-d891b61e744f":
+ "4e57aa30-af51-4d78-887c-019755e5d117",
+ "85439907-5b0e-4a08-8cfa-902a68dc3cc0":
+ "9639add9-6897-4cf0-b3d3-2ebf9c214f01",
+ "d4ae9d87-bd6c-47e0-95a1-6f4eb4211549":
+ "41fd3dd2-43ce-47f2-b92e-462474d07a6f",
+ "f70345a2-0ea3-45a6-bafa-8c7a72379277": {
+ "1bce714b-cd0a-417d-9a0c-bf4b7d35c0c4":
+ "3b8b0dde-e2ed-4b34-ac8d-729ba3c9667e",
+ "13e05c60-97d1-43f0-a6ef-d5247f4dd11f":
+ "60f685a4-6558-4ade-9d4b-28281c3989db",
+ "925b2609-e7b7-42f5-82cf-2d995697cec5":
+ "79115261-8161-4a6c-9487-47847276a717",
+ "52d644ac-7b33-4b79-b5b3-5afe7fd4ec2c": [
+ "3c2ae716-92f1-4a3d-b98f-50ea49f51c45",
+ "de76b822-71b3-4b5a-a041-4140378b70e2",
+ "0302a405-1d58-44fa-a0c6-dd07bb0ca26e",
+ new Date(),
+ new Error(),
+ new RegExp(),
+ // eslint-disable-next-line no-undef
+ new Map(),
+ new Set(),
+ // eslint-disable-next-line no-undef
+ new WeakMap(),
+ // eslint-disable-next-line no-undef
+ new WeakSet(),
+ ],
+ },
+ },
+};
+var complex2 = Object.create(complex1);
+
+var cyclic1 = {
+ "4a092cd1-225e-4739-8331-d6564aafb702":
+ "d0cebbe0-23fb-4cc4-8fa0-ef11ceedf12e",
+};
+cyclic1.cyclicRef = cyclic1;
+
+var cyclic2 = Object.create(cyclic1);
+
+// add tests
+suite
+ .add("complex objects", function () {
+ return deepEqual(complex1, complex2);
+ })
+ .add("cyclic references", function () {
+ return deepEqual(cyclic1, cyclic2);
+ })
+ // add listeners
+ .on("cycle", function (event) {
+ // eslint-disable-next-line no-console
+ console.log(String(event.target));
+ })
+ // run async
+ .run({ async: true });
diff --git a/node_modules/@sinonjs/samsam/lib/deep-equal.js b/node_modules/@sinonjs/samsam/lib/deep-equal.js
new file mode 100644
index 0000000..6d438bf
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/deep-equal.js
@@ -0,0 +1,304 @@
+"use strict";
+
+var valueToString = require("@sinonjs/commons").valueToString;
+var className = require("@sinonjs/commons").className;
+var typeOf = require("@sinonjs/commons").typeOf;
+var arrayProto = require("@sinonjs/commons").prototypes.array;
+var objectProto = require("@sinonjs/commons").prototypes.object;
+var mapForEach = require("@sinonjs/commons").prototypes.map.forEach;
+
+var getClass = require("./get-class");
+var identical = require("./identical");
+var isArguments = require("./is-arguments");
+var isArrayType = require("./is-array-type");
+var isDate = require("./is-date");
+var isElement = require("./is-element");
+var isIterable = require("./is-iterable");
+var isMap = require("./is-map");
+var isNaN = require("./is-nan");
+var isObject = require("./is-object");
+var isSet = require("./is-set");
+var isSubset = require("./is-subset");
+
+var concat = arrayProto.concat;
+var every = arrayProto.every;
+var push = arrayProto.push;
+
+var getTime = Date.prototype.getTime;
+var hasOwnProperty = objectProto.hasOwnProperty;
+var indexOf = arrayProto.indexOf;
+var keys = Object.keys;
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Deep equal comparison. Two values are "deep equal" when:
+ *
+ * - They are equal, according to samsam.identical
+ * - They are both date objects representing the same time
+ * - They are both arrays containing elements that are all deepEqual
+ * - They are objects with the same set of properties, and each property
+ * in ``actual`` is deepEqual to the corresponding property in ``expectation``
+ *
+ * Supports cyclic objects.
+ *
+ * @alias module:samsam.deepEqual
+ * @param {*} actual The object to examine
+ * @param {*} expectation The object actual is expected to be equal to
+ * @param {object} match A value to match on
+ * @returns {boolean} Returns true when actual and expectation are considered equal
+ */
+function deepEqualCyclic(actual, expectation, match) {
+ // used for cyclic comparison
+ // contain already visited objects
+ var actualObjects = [];
+ var expectationObjects = [];
+ // contain pathes (position in the object structure)
+ // of the already visited objects
+ // indexes same as in objects arrays
+ var actualPaths = [];
+ var expectationPaths = [];
+ // contains combinations of already compared objects
+ // in the manner: { "$1['ref']$2['ref']": true }
+ var compared = {};
+
+ // does the recursion for the deep equal check
+ // eslint-disable-next-line complexity
+ return (function deepEqual(
+ actualObj,
+ expectationObj,
+ actualPath,
+ expectationPath,
+ ) {
+ // If both are matchers they must be the same instance in order to be
+ // considered equal If we didn't do that we would end up running one
+ // matcher against the other
+ if (match && match.isMatcher(expectationObj)) {
+ if (match.isMatcher(actualObj)) {
+ return actualObj === expectationObj;
+ }
+ return expectationObj.test(actualObj);
+ }
+
+ var actualType = typeof actualObj;
+ var expectationType = typeof expectationObj;
+
+ if (
+ actualObj === expectationObj ||
+ isNaN(actualObj) ||
+ isNaN(expectationObj) ||
+ actualObj === null ||
+ expectationObj === null ||
+ actualObj === undefined ||
+ expectationObj === undefined ||
+ actualType !== "object" ||
+ expectationType !== "object"
+ ) {
+ return identical(actualObj, expectationObj);
+ }
+
+ // Elements are only equal if identical(expected, actual)
+ if (isElement(actualObj) || isElement(expectationObj)) {
+ return false;
+ }
+
+ var isActualDate = isDate(actualObj);
+ var isExpectationDate = isDate(expectationObj);
+ if (isActualDate || isExpectationDate) {
+ if (
+ !isActualDate ||
+ !isExpectationDate ||
+ getTime.call(actualObj) !== getTime.call(expectationObj)
+ ) {
+ return false;
+ }
+ }
+
+ if (actualObj instanceof RegExp && expectationObj instanceof RegExp) {
+ if (valueToString(actualObj) !== valueToString(expectationObj)) {
+ return false;
+ }
+ }
+
+ if (actualObj instanceof Promise && expectationObj instanceof Promise) {
+ return actualObj === expectationObj;
+ }
+
+ if (actualObj instanceof Error && expectationObj instanceof Error) {
+ return actualObj === expectationObj;
+ }
+
+ var actualClass = getClass(actualObj);
+ var expectationClass = getClass(expectationObj);
+ var actualKeys = keys(actualObj);
+ var expectationKeys = keys(expectationObj);
+ var actualName = className(actualObj);
+ var expectationName = className(expectationObj);
+ var expectationSymbols =
+ typeOf(getOwnPropertySymbols) === "function"
+ ? getOwnPropertySymbols(expectationObj)
+ : /* istanbul ignore next: cannot collect coverage for engine that doesn't support Symbol */
+ [];
+ var expectationKeysAndSymbols = concat(
+ expectationKeys,
+ expectationSymbols,
+ );
+
+ if (isArguments(actualObj) || isArguments(expectationObj)) {
+ if (actualObj.length !== expectationObj.length) {
+ return false;
+ }
+ } else {
+ if (
+ actualType !== expectationType ||
+ actualClass !== expectationClass ||
+ actualKeys.length !== expectationKeys.length ||
+ (actualName &&
+ expectationName &&
+ actualName !== expectationName)
+ ) {
+ return false;
+ }
+ }
+
+ if (isSet(actualObj) || isSet(expectationObj)) {
+ if (
+ !isSet(actualObj) ||
+ !isSet(expectationObj) ||
+ actualObj.size !== expectationObj.size
+ ) {
+ return false;
+ }
+
+ return isSubset(actualObj, expectationObj, deepEqual);
+ }
+
+ if (isMap(actualObj) || isMap(expectationObj)) {
+ if (
+ !isMap(actualObj) ||
+ !isMap(expectationObj) ||
+ actualObj.size !== expectationObj.size
+ ) {
+ return false;
+ }
+
+ var mapsDeeplyEqual = true;
+ mapForEach(actualObj, function (value, key) {
+ mapsDeeplyEqual =
+ mapsDeeplyEqual &&
+ deepEqualCyclic(value, expectationObj.get(key));
+ });
+
+ return mapsDeeplyEqual;
+ }
+
+ // jQuery objects have iteration protocols
+ // see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols
+ // But, they don't work well with the implementation concerning iterables below,
+ // so we will detect them and use jQuery's own equality function
+ /* istanbul ignore next -- this can only be tested in the `test-headless` script */
+ if (
+ actualObj.constructor &&
+ actualObj.constructor.name === "jQuery" &&
+ typeof actualObj.is === "function"
+ ) {
+ return actualObj.is(expectationObj);
+ }
+
+ var isActualNonArrayIterable =
+ isIterable(actualObj) &&
+ !isArrayType(actualObj) &&
+ !isArguments(actualObj);
+ var isExpectationNonArrayIterable =
+ isIterable(expectationObj) &&
+ !isArrayType(expectationObj) &&
+ !isArguments(expectationObj);
+ if (isActualNonArrayIterable || isExpectationNonArrayIterable) {
+ var actualArray = Array.from(actualObj);
+ var expectationArray = Array.from(expectationObj);
+ if (actualArray.length !== expectationArray.length) {
+ return false;
+ }
+
+ var arrayDeeplyEquals = true;
+ every(actualArray, function (key) {
+ arrayDeeplyEquals =
+ arrayDeeplyEquals &&
+ deepEqualCyclic(actualArray[key], expectationArray[key]);
+ });
+
+ return arrayDeeplyEquals;
+ }
+
+ return every(expectationKeysAndSymbols, function (key) {
+ if (!hasOwnProperty(actualObj, key)) {
+ return false;
+ }
+
+ var actualValue = actualObj[key];
+ var expectationValue = expectationObj[key];
+ var actualObject = isObject(actualValue);
+ var expectationObject = isObject(expectationValue);
+ // determines, if the objects were already visited
+ // (it's faster to check for isObject first, than to
+ // get -1 from getIndex for non objects)
+ var actualIndex = actualObject
+ ? indexOf(actualObjects, actualValue)
+ : -1;
+ var expectationIndex = expectationObject
+ ? indexOf(expectationObjects, expectationValue)
+ : -1;
+ // determines the new paths of the objects
+ // - for non cyclic objects the current path will be extended
+ // by current property name
+ // - for cyclic objects the stored path is taken
+ var newActualPath =
+ actualIndex !== -1
+ ? actualPaths[actualIndex]
+ : `${actualPath}[${JSON.stringify(key)}]`;
+ var newExpectationPath =
+ expectationIndex !== -1
+ ? expectationPaths[expectationIndex]
+ : `${expectationPath}[${JSON.stringify(key)}]`;
+ var combinedPath = newActualPath + newExpectationPath;
+
+ // stop recursion if current objects are already compared
+ if (compared[combinedPath]) {
+ return true;
+ }
+
+ // remember the current objects and their paths
+ if (actualIndex === -1 && actualObject) {
+ push(actualObjects, actualValue);
+ push(actualPaths, newActualPath);
+ }
+ if (expectationIndex === -1 && expectationObject) {
+ push(expectationObjects, expectationValue);
+ push(expectationPaths, newExpectationPath);
+ }
+
+ // remember that the current objects are already compared
+ if (actualObject && expectationObject) {
+ compared[combinedPath] = true;
+ }
+
+ // End of cyclic logic
+
+ // neither actualValue nor expectationValue is a cycle
+ // continue with next level
+ return deepEqual(
+ actualValue,
+ expectationValue,
+ newActualPath,
+ newExpectationPath,
+ );
+ });
+ })(actual, expectation, "$1", "$2");
+}
+
+deepEqualCyclic.use = function (match) {
+ return function deepEqual(a, b) {
+ return deepEqualCyclic(a, b, match);
+ };
+};
+
+module.exports = deepEqualCyclic;
diff --git a/node_modules/@sinonjs/samsam/lib/get-class.js b/node_modules/@sinonjs/samsam/lib/get-class.js
new file mode 100644
index 0000000..5b1b58d
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/get-class.js
@@ -0,0 +1,18 @@
+"use strict";
+
+var toString = require("@sinonjs/commons").prototypes.object.toString;
+
+/**
+ * Returns the internal `Class` by calling `Object.prototype.toString`
+ * with the provided value as `this`. Return value is a `String`, naming the
+ * internal class, e.g. "Array"
+ *
+ * @private
+ * @param {*} value - Any value
+ * @returns {string} - A string representation of the `Class` of `value`
+ */
+function getClass(value) {
+ return toString(value).split(/[ \]]/)[1];
+}
+
+module.exports = getClass;
diff --git a/node_modules/@sinonjs/samsam/lib/identical.js b/node_modules/@sinonjs/samsam/lib/identical.js
new file mode 100644
index 0000000..e183f09
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/identical.js
@@ -0,0 +1,31 @@
+"use strict";
+
+var isNaN = require("./is-nan");
+var isNegZero = require("./is-neg-zero");
+
+/**
+ * Strict equality check according to EcmaScript Harmony's `egal`.
+ *
+ * **From the Harmony wiki:**
+ * > An `egal` function simply makes available the internal `SameValue` function
+ * > from section 9.12 of the ES5 spec. If two values are egal, then they are not
+ * > observably distinguishable.
+ *
+ * `identical` returns `true` when `===` is `true`, except for `-0` and
+ * `+0`, where it returns `false`. Additionally, it returns `true` when
+ * `NaN` is compared to itself.
+ *
+ * @alias module:samsam.identical
+ * @param {*} obj1 The first value to compare
+ * @param {*} obj2 The second value to compare
+ * @returns {boolean} Returns `true` when the objects are *egal*, `false` otherwise
+ */
+function identical(obj1, obj2) {
+ if (obj1 === obj2 || (isNaN(obj1) && isNaN(obj2))) {
+ return obj1 !== 0 || isNegZero(obj1) === isNegZero(obj2);
+ }
+
+ return false;
+}
+
+module.exports = identical;
diff --git a/node_modules/@sinonjs/samsam/lib/is-arguments.js b/node_modules/@sinonjs/samsam/lib/is-arguments.js
new file mode 100644
index 0000000..dde8c42
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-arguments.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var getClass = require("./get-class");
+
+/**
+ * Returns `true` when `object` is an `arguments` object, `false` otherwise
+ *
+ * @alias module:samsam.isArguments
+ * @param {*} object - The object to examine
+ * @returns {boolean} `true` when `object` is an `arguments` object
+ */
+function isArguments(object) {
+ return getClass(object) === "Arguments";
+}
+
+module.exports = isArguments;
diff --git a/node_modules/@sinonjs/samsam/lib/is-array-type.js b/node_modules/@sinonjs/samsam/lib/is-array-type.js
new file mode 100644
index 0000000..4ddc495
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-array-type.js
@@ -0,0 +1,20 @@
+"use strict";
+
+var functionName = require("@sinonjs/commons").functionName;
+var indexOf = require("@sinonjs/commons").prototypes.array.indexOf;
+var map = require("@sinonjs/commons").prototypes.array.map;
+var ARRAY_TYPES = require("./array-types");
+var type = require("type-detect");
+
+/**
+ * Returns `true` when `object` is an array type, `false` otherwise
+ *
+ * @param {*} object - The object to examine
+ * @returns {boolean} `true` when `object` is an array type
+ * @private
+ */
+function isArrayType(object) {
+ return indexOf(map(ARRAY_TYPES, functionName), type(object)) !== -1;
+}
+
+module.exports = isArrayType;
diff --git a/node_modules/@sinonjs/samsam/lib/is-date.js b/node_modules/@sinonjs/samsam/lib/is-date.js
new file mode 100644
index 0000000..053d2ce
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-date.js
@@ -0,0 +1,14 @@
+"use strict";
+
+/**
+ * Returns `true` when `value` is an instance of Date
+ *
+ * @private
+ * @param {Date} value The value to examine
+ * @returns {boolean} `true` when `value` is an instance of Date
+ */
+function isDate(value) {
+ return value instanceof Date;
+}
+
+module.exports = isDate;
diff --git a/node_modules/@sinonjs/samsam/lib/is-element.js b/node_modules/@sinonjs/samsam/lib/is-element.js
new file mode 100644
index 0000000..6bd7cbd
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-element.js
@@ -0,0 +1,29 @@
+"use strict";
+
+var div = typeof document !== "undefined" && document.createElement("div");
+
+/**
+ * Returns `true` when `object` is a DOM element node.
+ *
+ * Unlike Underscore.js/lodash, this function will return `false` if `object`
+ * is an *element-like* object, i.e. a regular object with a `nodeType`
+ * property that holds the value `1`.
+ *
+ * @alias module:samsam.isElement
+ * @param {object} object The object to examine
+ * @returns {boolean} Returns `true` for DOM element nodes
+ */
+function isElement(object) {
+ if (!object || object.nodeType !== 1 || !div) {
+ return false;
+ }
+ try {
+ object.appendChild(div);
+ object.removeChild(div);
+ } catch (e) {
+ return false;
+ }
+ return true;
+}
+
+module.exports = isElement;
diff --git a/node_modules/@sinonjs/samsam/lib/is-iterable.js b/node_modules/@sinonjs/samsam/lib/is-iterable.js
new file mode 100644
index 0000000..0b47238
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-iterable.js
@@ -0,0 +1,18 @@
+"use strict";
+
+/**
+ * Returns `true` when the argument is an iterable, `false` otherwise
+ *
+ * @alias module:samsam.isIterable
+ * @param {*} val - A value to examine
+ * @returns {boolean} Returns `true` when the argument is an iterable, `false` otherwise
+ */
+function isIterable(val) {
+ // checks for null and undefined
+ if (typeof val !== "object") {
+ return false;
+ }
+ return typeof val[Symbol.iterator] === "function";
+}
+
+module.exports = isIterable;
diff --git a/node_modules/@sinonjs/samsam/lib/is-map.js b/node_modules/@sinonjs/samsam/lib/is-map.js
new file mode 100644
index 0000000..fc1d5af
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-map.js
@@ -0,0 +1,14 @@
+"use strict";
+
+/**
+ * Returns `true` when `value` is a Map
+ *
+ * @param {*} value A value to examine
+ * @returns {boolean} `true` when `value` is an instance of `Map`, `false` otherwise
+ * @private
+ */
+function isMap(value) {
+ return typeof Map !== "undefined" && value instanceof Map;
+}
+
+module.exports = isMap;
diff --git a/node_modules/@sinonjs/samsam/lib/is-nan.js b/node_modules/@sinonjs/samsam/lib/is-nan.js
new file mode 100644
index 0000000..7461141
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-nan.js
@@ -0,0 +1,19 @@
+"use strict";
+
+/**
+ * Compares a `value` to `NaN`
+ *
+ * @private
+ * @param {*} value A value to examine
+ * @returns {boolean} Returns `true` when `value` is `NaN`
+ */
+function isNaN(value) {
+ // Unlike global `isNaN`, this function avoids type coercion
+ // `typeof` check avoids IE host object issues, hat tip to
+ // lodash
+
+ // eslint-disable-next-line no-self-compare
+ return typeof value === "number" && value !== value;
+}
+
+module.exports = isNaN;
diff --git a/node_modules/@sinonjs/samsam/lib/is-neg-zero.js b/node_modules/@sinonjs/samsam/lib/is-neg-zero.js
new file mode 100644
index 0000000..847e515
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-neg-zero.js
@@ -0,0 +1,14 @@
+"use strict";
+
+/**
+ * Returns `true` when `value` is `-0`
+ *
+ * @alias module:samsam.isNegZero
+ * @param {*} value A value to examine
+ * @returns {boolean} Returns `true` when `value` is `-0`
+ */
+function isNegZero(value) {
+ return value === 0 && 1 / value === -Infinity;
+}
+
+module.exports = isNegZero;
diff --git a/node_modules/@sinonjs/samsam/lib/is-object.js b/node_modules/@sinonjs/samsam/lib/is-object.js
new file mode 100644
index 0000000..ed8b643
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-object.js
@@ -0,0 +1,31 @@
+"use strict";
+
+/**
+ * Returns `true` when the value is a regular Object and not a specialized Object
+ *
+ * This helps speed up deepEqual cyclic checks
+ *
+ * The premise is that only Objects are stored in the visited array.
+ * So if this function returns false, we don't have to do the
+ * expensive operation of searching for the value in the the array of already
+ * visited objects
+ *
+ * @private
+ * @param {object} value The object to examine
+ * @returns {boolean} `true` when the object is a non-specialised object
+ */
+function isObject(value) {
+ return (
+ typeof value === "object" &&
+ value !== null &&
+ // none of these are collection objects, so we can return false
+ !(value instanceof Boolean) &&
+ !(value instanceof Date) &&
+ !(value instanceof Error) &&
+ !(value instanceof Number) &&
+ !(value instanceof RegExp) &&
+ !(value instanceof String)
+ );
+}
+
+module.exports = isObject;
diff --git a/node_modules/@sinonjs/samsam/lib/is-set.js b/node_modules/@sinonjs/samsam/lib/is-set.js
new file mode 100644
index 0000000..fa5a3ca
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-set.js
@@ -0,0 +1,14 @@
+"use strict";
+
+/**
+ * Returns `true` when the argument is an instance of Set, `false` otherwise
+ *
+ * @alias module:samsam.isSet
+ * @param {*} val - A value to examine
+ * @returns {boolean} Returns `true` when the argument is an instance of Set, `false` otherwise
+ */
+function isSet(val) {
+ return (typeof Set !== "undefined" && val instanceof Set) || false;
+}
+
+module.exports = isSet;
diff --git a/node_modules/@sinonjs/samsam/lib/is-subset.js b/node_modules/@sinonjs/samsam/lib/is-subset.js
new file mode 100644
index 0000000..63672c6
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/is-subset.js
@@ -0,0 +1,30 @@
+"use strict";
+
+var forEach = require("@sinonjs/commons").prototypes.set.forEach;
+
+/**
+ * Returns `true` when `s1` is a subset of `s2`, `false` otherwise
+ *
+ * @private
+ * @param {Array|Set} s1 The target value
+ * @param {Array|Set} s2 The containing value
+ * @param {Function} compare A comparison function, should return `true` when
+ * values are considered equal
+ * @returns {boolean} Returns `true` when `s1` is a subset of `s2`, `false`` otherwise
+ */
+function isSubset(s1, s2, compare) {
+ var allContained = true;
+ forEach(s1, function (v1) {
+ var includes = false;
+ forEach(s2, function (v2) {
+ if (compare(v2, v1)) {
+ includes = true;
+ }
+ });
+ allContained = allContained && includes;
+ });
+
+ return allContained;
+}
+
+module.exports = isSubset;
diff --git a/node_modules/@sinonjs/samsam/lib/iterable-to-string.js b/node_modules/@sinonjs/samsam/lib/iterable-to-string.js
new file mode 100644
index 0000000..0018268
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/iterable-to-string.js
@@ -0,0 +1,71 @@
+"use strict";
+
+var slice = require("@sinonjs/commons").prototypes.string.slice;
+var typeOf = require("@sinonjs/commons").typeOf;
+var valueToString = require("@sinonjs/commons").valueToString;
+
+/**
+ * Creates a string represenation of an iterable object
+ *
+ * @private
+ * @param {object} obj The iterable object to stringify
+ * @returns {string} A string representation
+ */
+function iterableToString(obj) {
+ if (typeOf(obj) === "map") {
+ return mapToString(obj);
+ }
+
+ return genericIterableToString(obj);
+}
+
+/**
+ * Creates a string representation of a Map
+ *
+ * @private
+ * @param {Map} map The map to stringify
+ * @returns {string} A string representation
+ */
+function mapToString(map) {
+ var representation = "";
+
+ // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
+ map.forEach(function (value, key) {
+ representation += `[${stringify(key)},${stringify(value)}],`;
+ });
+
+ representation = slice(representation, 0, -1);
+ return representation;
+}
+
+/**
+ * Create a string represenation for an iterable
+ *
+ * @private
+ * @param {object} iterable The iterable to stringify
+ * @returns {string} A string representation
+ */
+function genericIterableToString(iterable) {
+ var representation = "";
+
+ // eslint-disable-next-line @sinonjs/no-prototype-methods/no-prototype-methods
+ iterable.forEach(function (value) {
+ representation += `${stringify(value)},`;
+ });
+
+ representation = slice(representation, 0, -1);
+ return representation;
+}
+
+/**
+ * Creates a string representation of the passed `item`
+ *
+ * @private
+ * @param {object} item The item to stringify
+ * @returns {string} A string representation of `item`
+ */
+function stringify(item) {
+ return typeof item === "string" ? `'${item}'` : valueToString(item);
+}
+
+module.exports = iterableToString;
diff --git a/node_modules/@sinonjs/samsam/lib/match.js b/node_modules/@sinonjs/samsam/lib/match.js
new file mode 100644
index 0000000..468bab1
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/match.js
@@ -0,0 +1,174 @@
+"use strict";
+
+var valueToString = require("@sinonjs/commons").valueToString;
+var indexOf = require("@sinonjs/commons").prototypes.string.indexOf;
+var forEach = require("@sinonjs/commons").prototypes.array.forEach;
+var type = require("type-detect");
+
+var engineCanCompareMaps = typeof Array.from === "function";
+var deepEqual = require("./deep-equal").use(match); // eslint-disable-line no-use-before-define
+var isArrayType = require("./is-array-type");
+var isSubset = require("./is-subset");
+var createMatcher = require("./create-matcher");
+
+/**
+ * Returns true when `array` contains all of `subset` as defined by the `compare`
+ * argument
+ *
+ * @param {Array} array An array to search for a subset
+ * @param {Array} subset The subset to find in the array
+ * @param {Function} compare A comparison function
+ * @returns {boolean} [description]
+ * @private
+ */
+function arrayContains(array, subset, compare) {
+ if (subset.length === 0) {
+ return true;
+ }
+ var i, l, j, k;
+ for (i = 0, l = array.length; i < l; ++i) {
+ if (compare(array[i], subset[0])) {
+ for (j = 0, k = subset.length; j < k; ++j) {
+ if (i + j >= l) {
+ return false;
+ }
+ if (!compare(array[i + j], subset[j])) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+/* eslint-disable complexity */
+/**
+ * Matches an object with a matcher (or value)
+ *
+ * @alias module:samsam.match
+ * @param {object} object The object candidate to match
+ * @param {object} matcherOrValue A matcher or value to match against
+ * @returns {boolean} true when `object` matches `matcherOrValue`
+ */
+function match(object, matcherOrValue) {
+ if (matcherOrValue && typeof matcherOrValue.test === "function") {
+ return matcherOrValue.test(object);
+ }
+
+ switch (type(matcherOrValue)) {
+ case "bigint":
+ case "boolean":
+ case "number":
+ case "symbol":
+ return matcherOrValue === object;
+ case "function":
+ return matcherOrValue(object) === true;
+ case "string":
+ var notNull = typeof object === "string" || Boolean(object);
+ return (
+ notNull &&
+ indexOf(
+ valueToString(object).toLowerCase(),
+ matcherOrValue.toLowerCase(),
+ ) >= 0
+ );
+ case "null":
+ return object === null;
+ case "undefined":
+ return typeof object === "undefined";
+ case "Date":
+ /* istanbul ignore else */
+ if (type(object) === "Date") {
+ return object.getTime() === matcherOrValue.getTime();
+ }
+ /* istanbul ignore next: this is basically the rest of the function, which is covered */
+ break;
+ case "Array":
+ case "Int8Array":
+ case "Uint8Array":
+ case "Uint8ClampedArray":
+ case "Int16Array":
+ case "Uint16Array":
+ case "Int32Array":
+ case "Uint32Array":
+ case "Float32Array":
+ case "Float64Array":
+ return (
+ isArrayType(matcherOrValue) &&
+ arrayContains(object, matcherOrValue, match)
+ );
+ case "Map":
+ /* istanbul ignore next: this is covered by a test, that is only run in IE, but we collect coverage information in node*/
+ if (!engineCanCompareMaps) {
+ throw new Error(
+ "The JavaScript engine does not support Array.from and cannot reliably do value comparison of Map instances",
+ );
+ }
+
+ return (
+ type(object) === "Map" &&
+ arrayContains(
+ Array.from(object),
+ Array.from(matcherOrValue),
+ match,
+ )
+ );
+ default:
+ break;
+ }
+
+ switch (type(object)) {
+ case "null":
+ return false;
+ case "Set":
+ return isSubset(matcherOrValue, object, match);
+ default:
+ break;
+ }
+
+ /* istanbul ignore else */
+ if (matcherOrValue && typeof matcherOrValue === "object") {
+ if (matcherOrValue === object) {
+ return true;
+ }
+ if (typeof object !== "object") {
+ return false;
+ }
+ var prop;
+ // eslint-disable-next-line guard-for-in
+ for (prop in matcherOrValue) {
+ var value = object[prop];
+ if (
+ typeof value === "undefined" &&
+ typeof object.getAttribute === "function"
+ ) {
+ value = object.getAttribute(prop);
+ }
+ if (
+ matcherOrValue[prop] === null ||
+ typeof matcherOrValue[prop] === "undefined"
+ ) {
+ if (value !== matcherOrValue[prop]) {
+ return false;
+ }
+ } else if (
+ typeof value === "undefined" ||
+ !deepEqual(value, matcherOrValue[prop])
+ ) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /* istanbul ignore next */
+ throw new Error("Matcher was an unknown or unsupported type");
+}
+/* eslint-enable complexity */
+
+forEach(Object.keys(createMatcher), function (key) {
+ match[key] = createMatcher[key];
+});
+
+module.exports = match;
diff --git a/node_modules/@sinonjs/samsam/lib/samsam.js b/node_modules/@sinonjs/samsam/lib/samsam.js
new file mode 100644
index 0000000..249246b
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/lib/samsam.js
@@ -0,0 +1,26 @@
+"use strict";
+
+/**
+ * @module samsam
+ */
+var identical = require("./identical");
+var isArguments = require("./is-arguments");
+var isElement = require("./is-element");
+var isNegZero = require("./is-neg-zero");
+var isSet = require("./is-set");
+var isMap = require("./is-map");
+var match = require("./match");
+var deepEqualCyclic = require("./deep-equal").use(match);
+var createMatcher = require("./create-matcher");
+
+module.exports = {
+ createMatcher: createMatcher,
+ deepEqual: deepEqualCyclic,
+ identical: identical,
+ isArguments: isArguments,
+ isElement: isElement,
+ isMap: isMap,
+ isNegZero: isNegZero,
+ isSet: isSet,
+ match: match,
+};
diff --git a/node_modules/@sinonjs/samsam/node_modules/type-detect/LICENSE b/node_modules/@sinonjs/samsam/node_modules/type-detect/LICENSE
new file mode 100644
index 0000000..7ea799f
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/node_modules/type-detect/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Jake Luer (http://alogicalparadox.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@sinonjs/samsam/node_modules/type-detect/README.md b/node_modules/@sinonjs/samsam/node_modules/type-detect/README.md
new file mode 100644
index 0000000..beb645e
--- /dev/null
+++ b/node_modules/@sinonjs/samsam/node_modules/type-detect/README.md
@@ -0,0 +1,235 @@
+
+
+
+ Improved typeof detection for node , Deno , and the browser.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## What is Type-Detect?
+
+Type Detect is a module which you can use to detect the type of a given object. It returns a string representation of the object's type, either using [`typeof`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-typeof-operator) or [`@@toStringTag`](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-symbol.tostringtag). It also normalizes some object names for consistency among browsers.
+
+## Why?
+
+The `typeof` operator will only specify primitive values; everything else is `"object"` (including `null`, arrays, regexps, etc). Many developers use `Object.prototype.toString()` - which is a fine alternative and returns many more types (null returns `[object Null]`, Arrays as `[object Array]`, regexps as `[object RegExp]` etc).
+
+Sadly, `Object.prototype.toString` is slow, and buggy. By slow - we mean it is slower than `typeof`. By buggy - we mean that some values (like Promises, the global object, iterators, dataviews, a bunch of HTML elements) all report different things in different browsers.
+
+`type-detect` fixes all of the shortcomings with `Object.prototype.toString`. We have extra code to speed up checks of JS and DOM objects, as much as 20-30x faster for some values. `type-detect` also fixes any consistencies with these objects.
+
+## Installation
+
+### Node.js
+
+`type-detect` is available on [npm](http://npmjs.org). To install it, type:
+
+ $ npm install type-detect
+
+### Deno
+
+`type-detect` can be imported with the following line:
+
+```js
+import type from 'https://deno.land/x/type_detect@v4.1.0/index.ts'
+```
+
+### Browsers
+
+You can also use it within the browser; install via npm and use the `type-detect.js` file found within the download. For example:
+
+```html
+
+```
+
+## Usage
+
+The primary export of `type-detect` is function that can serve as a replacement for `typeof`. The results of this function will be more specific than that of native `typeof`.
+
+```js
+var type = require('type-detect');
+```
+Or, in the browser use case, after the
+
+```
+
+This is the only use case the developer cares about. If you want those
+fancy module and/or package manager things that are popular these days
+you should probably use a different library.
+
+#### Package Managers ####
+
+The package is published to **npm** as `@sinonjs/text-encoding`.
+Use through these is not really supported, since they aren't used by
+the developer of the library. Using `require()` in interesting ways
+probably breaks. Patches welcome, as long as they don't break the
+basic use of the files via `
+```
+
+To support the legacy encodings (which may be stateful), the
+TextEncoder `encode()` method accepts an optional dictionary and
+`stream` option, e.g. `encoder.encode(string, {stream: true});` This
+is not needed for standard encoding since the input is always in
+complete code points.
diff --git a/node_modules/@sinonjs/text-encoding/index.js b/node_modules/@sinonjs/text-encoding/index.js
new file mode 100644
index 0000000..cc57d65
--- /dev/null
+++ b/node_modules/@sinonjs/text-encoding/index.js
@@ -0,0 +1,9 @@
+// This is free and unencumbered software released into the public domain.
+// See LICENSE.md for more information.
+
+var encoding = require("./lib/encoding.js");
+
+module.exports = {
+ TextEncoder: encoding.TextEncoder,
+ TextDecoder: encoding.TextDecoder,
+};
diff --git a/node_modules/@sinonjs/text-encoding/lib/encoding-indexes.js b/node_modules/@sinonjs/text-encoding/lib/encoding-indexes.js
new file mode 100644
index 0000000..4f170c3
--- /dev/null
+++ b/node_modules/@sinonjs/text-encoding/lib/encoding-indexes.js
@@ -0,0 +1,47 @@
+(function(global) {
+ 'use strict';
+
+ if (typeof module !== "undefined" && module.exports) {
+ module.exports = global;
+ }
+
+ global["encoding-indexes"] =
+{
+ "big5":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,17392,19506,17923,17830,17784,160359,19831,17843,162993,19682,163013,15253,18230,18244,19527,19520,148159,144919,160594,159371,159954,19543,172881,18255,17882,19589,162924,19719,19108,18081,158499,29221,154196,137827,146950,147297,26189,22267,null,32149,22813,166841,15860,38708,162799,23515,138590,23204,13861,171696,23249,23479,23804,26478,34195,170309,29793,29853,14453,138579,145054,155681,16108,153822,15093,31484,40855,147809,166157,143850,133770,143966,17162,33924,40854,37935,18736,34323,22678,38730,37400,31184,31282,26208,27177,34973,29772,31685,26498,31276,21071,36934,13542,29636,155065,29894,40903,22451,18735,21580,16689,145038,22552,31346,162661,35727,18094,159368,16769,155033,31662,140476,40904,140481,140489,140492,40905,34052,144827,16564,40906,17633,175615,25281,28782,40907,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,12736,12737,12738,12739,12740,131340,12741,131281,131277,12742,12743,131275,139240,12744,131274,12745,12746,12747,12748,131342,12749,12750,256,193,461,192,274,201,282,200,332,211,465,210,null,7870,null,7872,202,257,225,462,224,593,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,null,7871,null,7873,234,609,9178,9179,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,172969,135493,null,25866,null,null,20029,28381,40270,37343,null,null,161589,25745,20250,20264,20392,20822,20852,20892,20964,21153,21160,21307,21326,21457,21464,22242,22768,22788,22791,22834,22836,23398,23454,23455,23706,24198,24635,25993,26622,26628,26725,27982,28860,30005,32420,32428,32442,32455,32463,32479,32518,32567,33402,33487,33647,35270,35774,35810,36710,36711,36718,29713,31996,32205,26950,31433,21031,null,null,null,null,37260,30904,37214,32956,null,36107,33014,133607,null,null,32927,40647,19661,40393,40460,19518,171510,159758,40458,172339,13761,null,28314,33342,29977,null,18705,39532,39567,40857,31111,164972,138698,132560,142054,20004,20097,20096,20103,20159,20203,20279,13388,20413,15944,20483,20616,13437,13459,13477,20870,22789,20955,20988,20997,20105,21113,21136,21287,13767,21417,13649,21424,13651,21442,21539,13677,13682,13953,21651,21667,21684,21689,21712,21743,21784,21795,21800,13720,21823,13733,13759,21975,13765,163204,21797,null,134210,134421,151851,21904,142534,14828,131905,36422,150968,169189,16467,164030,30586,142392,14900,18389,164189,158194,151018,25821,134524,135092,134357,135412,25741,36478,134806,134155,135012,142505,164438,148691,null,134470,170573,164073,18420,151207,142530,39602,14951,169460,16365,13574,152263,169940,161992,142660,40302,38933,null,17369,155813,25780,21731,142668,142282,135287,14843,135279,157402,157462,162208,25834,151634,134211,36456,139681,166732,132913,null,18443,131497,16378,22643,142733,null,148936,132348,155799,134988,134550,21881,16571,17338,null,19124,141926,135325,33194,39157,134556,25465,14846,141173,36288,22177,25724,15939,null,173569,134665,142031,142537,null,135368,145858,14738,14854,164507,13688,155209,139463,22098,134961,142514,169760,13500,27709,151099,null,null,161140,142987,139784,173659,167117,134778,134196,157724,32659,135375,141315,141625,13819,152035,134796,135053,134826,16275,134960,134471,135503,134732,null,134827,134057,134472,135360,135485,16377,140950,25650,135085,144372,161337,142286,134526,134527,142417,142421,14872,134808,135367,134958,173618,158544,167122,167321,167114,38314,21708,33476,21945,null,171715,39974,39606,161630,142830,28992,33133,33004,23580,157042,33076,14231,21343,164029,37302,134906,134671,134775,134907,13789,151019,13833,134358,22191,141237,135369,134672,134776,135288,135496,164359,136277,134777,151120,142756,23124,135197,135198,135413,135414,22428,134673,161428,164557,135093,134779,151934,14083,135094,135552,152280,172733,149978,137274,147831,164476,22681,21096,13850,153405,31666,23400,18432,19244,40743,18919,39967,39821,154484,143677,22011,13810,22153,20008,22786,138177,194680,38737,131206,20059,20155,13630,23587,24401,24516,14586,25164,25909,27514,27701,27706,28780,29227,20012,29357,149737,32594,31035,31993,32595,156266,13505,null,156491,32770,32896,157202,158033,21341,34916,35265,161970,35744,36125,38021,38264,38271,38376,167439,38886,39029,39118,39134,39267,170000,40060,40479,40644,27503,63751,20023,131207,38429,25143,38050,null,20539,28158,171123,40870,15817,34959,147790,28791,23797,19232,152013,13657,154928,24866,166450,36775,37366,29073,26393,29626,144001,172295,15499,137600,19216,30948,29698,20910,165647,16393,27235,172730,16931,34319,133743,31274,170311,166634,38741,28749,21284,139390,37876,30425,166371,40871,30685,20131,20464,20668,20015,20247,40872,21556,32139,22674,22736,138678,24210,24217,24514,141074,25995,144377,26905,27203,146531,27903,null,29184,148741,29580,16091,150035,23317,29881,35715,154788,153237,31379,31724,31939,32364,33528,34199,40873,34960,40874,36537,40875,36815,34143,39392,37409,40876,167353,136255,16497,17058,23066,null,null,null,39016,26475,17014,22333,null,34262,149883,33471,160013,19585,159092,23931,158485,159678,40877,40878,23446,40879,26343,32347,28247,31178,15752,17603,143958,141206,17306,17718,null,23765,146202,35577,23672,15634,144721,23928,40882,29015,17752,147692,138787,19575,14712,13386,131492,158785,35532,20404,131641,22975,33132,38998,170234,24379,134047,null,139713,166253,16642,18107,168057,16135,40883,172469,16632,14294,18167,158790,16764,165554,160767,17773,14548,152730,17761,17691,19849,19579,19830,17898,16328,150287,13921,17630,17597,16877,23870,23880,23894,15868,14351,23972,23993,14368,14392,24130,24253,24357,24451,14600,14612,14655,14669,24791,24893,23781,14729,25015,25017,25039,14776,25132,25232,25317,25368,14840,22193,14851,25570,25595,25607,25690,14923,25792,23829,22049,40863,14999,25990,15037,26111,26195,15090,26258,15138,26390,15170,26532,26624,15192,26698,26756,15218,15217,15227,26889,26947,29276,26980,27039,27013,15292,27094,15325,27237,27252,27249,27266,15340,27289,15346,27307,27317,27348,27382,27521,27585,27626,27765,27818,15563,27906,27910,27942,28033,15599,28068,28081,28181,28184,28201,28294,166336,28347,28386,28378,40831,28392,28393,28452,28468,15686,147265,28545,28606,15722,15733,29111,23705,15754,28716,15761,28752,28756,28783,28799,28809,131877,17345,13809,134872,147159,22462,159443,28990,153568,13902,27042,166889,23412,31305,153825,169177,31333,31357,154028,31419,31408,31426,31427,29137,156813,16842,31450,31453,31466,16879,21682,154625,31499,31573,31529,152334,154878,31650,31599,33692,154548,158847,31696,33825,31634,31672,154912,15789,154725,33938,31738,31750,31797,154817,31812,31875,149634,31910,26237,148856,31945,31943,31974,31860,31987,31989,31950,32359,17693,159300,32093,159446,29837,32137,32171,28981,32179,32210,147543,155689,32228,15635,32245,137209,32229,164717,32285,155937,155994,32366,32402,17195,37996,32295,32576,32577,32583,31030,156368,39393,32663,156497,32675,136801,131176,17756,145254,17667,164666,32762,156809,32773,32776,32797,32808,32815,172167,158915,32827,32828,32865,141076,18825,157222,146915,157416,26405,32935,166472,33031,33050,22704,141046,27775,156824,151480,25831,136330,33304,137310,27219,150117,150165,17530,33321,133901,158290,146814,20473,136445,34018,33634,158474,149927,144688,137075,146936,33450,26907,194964,16859,34123,33488,33562,134678,137140,14017,143741,144730,33403,33506,33560,147083,159139,158469,158615,144846,15807,33565,21996,33669,17675,159141,33708,33729,33747,13438,159444,27223,34138,13462,159298,143087,33880,154596,33905,15827,17636,27303,33866,146613,31064,33960,158614,159351,159299,34014,33807,33681,17568,33939,34020,154769,16960,154816,17731,34100,23282,159385,17703,34163,17686,26559,34326,165413,165435,34241,159880,34306,136578,159949,194994,17770,34344,13896,137378,21495,160666,34430,34673,172280,34798,142375,34737,34778,34831,22113,34412,26710,17935,34885,34886,161248,146873,161252,34910,34972,18011,34996,34997,25537,35013,30583,161551,35207,35210,35238,35241,35239,35260,166437,35303,162084,162493,35484,30611,37374,35472,162393,31465,162618,147343,18195,162616,29052,35596,35615,152624,152933,35647,35660,35661,35497,150138,35728,35739,35503,136927,17941,34895,35995,163156,163215,195028,14117,163155,36054,163224,163261,36114,36099,137488,36059,28764,36113,150729,16080,36215,36265,163842,135188,149898,15228,164284,160012,31463,36525,36534,36547,37588,36633,36653,164709,164882,36773,37635,172703,133712,36787,18730,166366,165181,146875,24312,143970,36857,172052,165564,165121,140069,14720,159447,36919,165180,162494,36961,165228,165387,37032,165651,37060,165606,37038,37117,37223,15088,37289,37316,31916,166195,138889,37390,27807,37441,37474,153017,37561,166598,146587,166668,153051,134449,37676,37739,166625,166891,28815,23235,166626,166629,18789,37444,166892,166969,166911,37747,37979,36540,38277,38310,37926,38304,28662,17081,140922,165592,135804,146990,18911,27676,38523,38550,16748,38563,159445,25050,38582,30965,166624,38589,21452,18849,158904,131700,156688,168111,168165,150225,137493,144138,38705,34370,38710,18959,17725,17797,150249,28789,23361,38683,38748,168405,38743,23370,168427,38751,37925,20688,143543,143548,38793,38815,38833,38846,38848,38866,38880,152684,38894,29724,169011,38911,38901,168989,162170,19153,38964,38963,38987,39014,15118,160117,15697,132656,147804,153350,39114,39095,39112,39111,19199,159015,136915,21936,39137,39142,39148,37752,39225,150057,19314,170071,170245,39413,39436,39483,39440,39512,153381,14020,168113,170965,39648,39650,170757,39668,19470,39700,39725,165376,20532,39732,158120,14531,143485,39760,39744,171326,23109,137315,39822,148043,39938,39935,39948,171624,40404,171959,172434,172459,172257,172323,172511,40318,40323,172340,40462,26760,40388,139611,172435,172576,137531,172595,40249,172217,172724,40592,40597,40606,40610,19764,40618,40623,148324,40641,15200,14821,15645,20274,14270,166955,40706,40712,19350,37924,159138,40727,40726,40761,22175,22154,40773,39352,168075,38898,33919,40802,40809,31452,40846,29206,19390,149877,149947,29047,150008,148296,150097,29598,166874,137466,31135,166270,167478,37737,37875,166468,37612,37761,37835,166252,148665,29207,16107,30578,31299,28880,148595,148472,29054,137199,28835,137406,144793,16071,137349,152623,137208,14114,136955,137273,14049,137076,137425,155467,14115,136896,22363,150053,136190,135848,136134,136374,34051,145062,34051,33877,149908,160101,146993,152924,147195,159826,17652,145134,170397,159526,26617,14131,15381,15847,22636,137506,26640,16471,145215,147681,147595,147727,158753,21707,22174,157361,22162,135135,134056,134669,37830,166675,37788,20216,20779,14361,148534,20156,132197,131967,20299,20362,153169,23144,131499,132043,14745,131850,132116,13365,20265,131776,167603,131701,35546,131596,20120,20685,20749,20386,20227,150030,147082,20290,20526,20588,20609,20428,20453,20568,20732,20825,20827,20829,20830,28278,144789,147001,147135,28018,137348,147081,20904,20931,132576,17629,132259,132242,132241,36218,166556,132878,21081,21156,133235,21217,37742,18042,29068,148364,134176,149932,135396,27089,134685,29817,16094,29849,29716,29782,29592,19342,150204,147597,21456,13700,29199,147657,21940,131909,21709,134086,22301,37469,38644,37734,22493,22413,22399,13886,22731,23193,166470,136954,137071,136976,23084,22968,37519,23166,23247,23058,153926,137715,137313,148117,14069,27909,29763,23073,155267,23169,166871,132115,37856,29836,135939,28933,18802,37896,166395,37821,14240,23582,23710,24158,24136,137622,137596,146158,24269,23375,137475,137476,14081,137376,14045,136958,14035,33066,166471,138682,144498,166312,24332,24334,137511,137131,23147,137019,23364,34324,161277,34912,24702,141408,140843,24539,16056,140719,140734,168072,159603,25024,131134,131142,140827,24985,24984,24693,142491,142599,149204,168269,25713,149093,142186,14889,142114,144464,170218,142968,25399,173147,25782,25393,25553,149987,142695,25252,142497,25659,25963,26994,15348,143502,144045,149897,144043,21773,144096,137433,169023,26318,144009,143795,15072,16784,152964,166690,152975,136956,152923,152613,30958,143619,137258,143924,13412,143887,143746,148169,26254,159012,26219,19347,26160,161904,138731,26211,144082,144097,26142,153714,14545,145466,145340,15257,145314,144382,29904,15254,26511,149034,26806,26654,15300,27326,14435,145365,148615,27187,27218,27337,27397,137490,25873,26776,27212,15319,27258,27479,147392,146586,37792,37618,166890,166603,37513,163870,166364,37991,28069,28427,149996,28007,147327,15759,28164,147516,23101,28170,22599,27940,30786,28987,148250,148086,28913,29264,29319,29332,149391,149285,20857,150180,132587,29818,147192,144991,150090,149783,155617,16134,16049,150239,166947,147253,24743,16115,29900,29756,37767,29751,17567,159210,17745,30083,16227,150745,150790,16216,30037,30323,173510,15129,29800,166604,149931,149902,15099,15821,150094,16127,149957,149747,37370,22322,37698,166627,137316,20703,152097,152039,30584,143922,30478,30479,30587,149143,145281,14942,149744,29752,29851,16063,150202,150215,16584,150166,156078,37639,152961,30750,30861,30856,30930,29648,31065,161601,153315,16654,31131,33942,31141,27181,147194,31290,31220,16750,136934,16690,37429,31217,134476,149900,131737,146874,137070,13719,21867,13680,13994,131540,134157,31458,23129,141045,154287,154268,23053,131675,30960,23082,154566,31486,16889,31837,31853,16913,154547,155324,155302,31949,150009,137136,31886,31868,31918,27314,32220,32263,32211,32590,156257,155996,162632,32151,155266,17002,158581,133398,26582,131150,144847,22468,156690,156664,149858,32733,31527,133164,154345,154947,31500,155150,39398,34373,39523,27164,144447,14818,150007,157101,39455,157088,33920,160039,158929,17642,33079,17410,32966,33033,33090,157620,39107,158274,33378,33381,158289,33875,159143,34320,160283,23174,16767,137280,23339,137377,23268,137432,34464,195004,146831,34861,160802,23042,34926,20293,34951,35007,35046,35173,35149,153219,35156,161669,161668,166901,166873,166812,166393,16045,33955,18165,18127,14322,35389,35356,169032,24397,37419,148100,26068,28969,28868,137285,40301,35999,36073,163292,22938,30659,23024,17262,14036,36394,36519,150537,36656,36682,17140,27736,28603,140065,18587,28537,28299,137178,39913,14005,149807,37051,37015,21873,18694,37307,37892,166475,16482,166652,37927,166941,166971,34021,35371,38297,38311,38295,38294,167220,29765,16066,149759,150082,148458,16103,143909,38543,167655,167526,167525,16076,149997,150136,147438,29714,29803,16124,38721,168112,26695,18973,168083,153567,38749,37736,166281,166950,166703,156606,37562,23313,35689,18748,29689,147995,38811,38769,39224,134950,24001,166853,150194,38943,169178,37622,169431,37349,17600,166736,150119,166756,39132,166469,16128,37418,18725,33812,39227,39245,162566,15869,39323,19311,39338,39516,166757,153800,27279,39457,23294,39471,170225,19344,170312,39356,19389,19351,37757,22642,135938,22562,149944,136424,30788,141087,146872,26821,15741,37976,14631,24912,141185,141675,24839,40015,40019,40059,39989,39952,39807,39887,171565,39839,172533,172286,40225,19630,147716,40472,19632,40204,172468,172269,172275,170287,40357,33981,159250,159711,158594,34300,17715,159140,159364,159216,33824,34286,159232,145367,155748,31202,144796,144960,18733,149982,15714,37851,37566,37704,131775,30905,37495,37965,20452,13376,36964,152925,30781,30804,30902,30795,137047,143817,149825,13978,20338,28634,28633,28702,28702,21524,147893,22459,22771,22410,40214,22487,28980,13487,147884,29163,158784,151447,23336,137141,166473,24844,23246,23051,17084,148616,14124,19323,166396,37819,37816,137430,134941,33906,158912,136211,148218,142374,148417,22932,146871,157505,32168,155995,155812,149945,149899,166394,37605,29666,16105,29876,166755,137375,16097,150195,27352,29683,29691,16086,150078,150164,137177,150118,132007,136228,149989,29768,149782,28837,149878,37508,29670,37727,132350,37681,166606,166422,37766,166887,153045,18741,166530,29035,149827,134399,22180,132634,134123,134328,21762,31172,137210,32254,136898,150096,137298,17710,37889,14090,166592,149933,22960,137407,137347,160900,23201,14050,146779,14000,37471,23161,166529,137314,37748,15565,133812,19094,14730,20724,15721,15692,136092,29045,17147,164376,28175,168164,17643,27991,163407,28775,27823,15574,147437,146989,28162,28428,15727,132085,30033,14012,13512,18048,16090,18545,22980,37486,18750,36673,166940,158656,22546,22472,14038,136274,28926,148322,150129,143331,135856,140221,26809,26983,136088,144613,162804,145119,166531,145366,144378,150687,27162,145069,158903,33854,17631,17614,159014,159057,158850,159710,28439,160009,33597,137018,33773,158848,159827,137179,22921,23170,137139,23137,23153,137477,147964,14125,23023,137020,14023,29070,37776,26266,148133,23150,23083,148115,27179,147193,161590,148571,148170,28957,148057,166369,20400,159016,23746,148686,163405,148413,27148,148054,135940,28838,28979,148457,15781,27871,194597,150095,32357,23019,23855,15859,24412,150109,137183,32164,33830,21637,146170,144128,131604,22398,133333,132633,16357,139166,172726,28675,168283,23920,29583,31955,166489,168992,20424,32743,29389,29456,162548,29496,29497,153334,29505,29512,16041,162584,36972,29173,149746,29665,33270,16074,30476,16081,27810,22269,29721,29726,29727,16098,16112,16116,16122,29907,16142,16211,30018,30061,30066,30093,16252,30152,30172,16320,30285,16343,30324,16348,30330,151388,29064,22051,35200,22633,16413,30531,16441,26465,16453,13787,30616,16490,16495,23646,30654,30667,22770,30744,28857,30748,16552,30777,30791,30801,30822,33864,152885,31027,26627,31026,16643,16649,31121,31129,36795,31238,36796,16743,31377,16818,31420,33401,16836,31439,31451,16847,20001,31586,31596,31611,31762,31771,16992,17018,31867,31900,17036,31928,17044,31981,36755,28864,134351,32207,32212,32208,32253,32686,32692,29343,17303,32800,32805,31545,32814,32817,32852,15820,22452,28832,32951,33001,17389,33036,29482,33038,33042,30048,33044,17409,15161,33110,33113,33114,17427,22586,33148,33156,17445,33171,17453,33189,22511,33217,33252,33364,17551,33446,33398,33482,33496,33535,17584,33623,38505,27018,33797,28917,33892,24803,33928,17668,33982,34017,34040,34064,34104,34130,17723,34159,34160,34272,17783,34418,34450,34482,34543,38469,34699,17926,17943,34990,35071,35108,35143,35217,162151,35369,35384,35476,35508,35921,36052,36082,36124,18328,22623,36291,18413,20206,36410,21976,22356,36465,22005,36528,18487,36558,36578,36580,36589,36594,36791,36801,36810,36812,36915,39364,18605,39136,37395,18718,37416,37464,37483,37553,37550,37567,37603,37611,37619,37620,37629,37699,37764,37805,18757,18769,40639,37911,21249,37917,37933,37950,18794,37972,38009,38189,38306,18855,38388,38451,18917,26528,18980,38720,18997,38834,38850,22100,19172,24808,39097,19225,39153,22596,39182,39193,20916,39196,39223,39234,39261,39266,19312,39365,19357,39484,39695,31363,39785,39809,39901,39921,39924,19565,39968,14191,138178,40265,39994,40702,22096,40339,40381,40384,40444,38134,36790,40571,40620,40625,40637,40646,38108,40674,40689,40696,31432,40772,131220,131767,132000,26906,38083,22956,132311,22592,38081,14265,132565,132629,132726,136890,22359,29043,133826,133837,134079,21610,194619,134091,21662,134139,134203,134227,134245,134268,24807,134285,22138,134325,134365,134381,134511,134578,134600,26965,39983,34725,134660,134670,134871,135056,134957,134771,23584,135100,24075,135260,135247,135286,26398,135291,135304,135318,13895,135359,135379,135471,135483,21348,33965,135907,136053,135990,35713,136567,136729,137155,137159,20088,28859,137261,137578,137773,137797,138282,138352,138412,138952,25283,138965,139029,29080,26709,139333,27113,14024,139900,140247,140282,141098,141425,141647,33533,141671,141715,142037,35237,142056,36768,142094,38840,142143,38983,39613,142412,null,142472,142519,154600,142600,142610,142775,142741,142914,143220,143308,143411,143462,144159,144350,24497,26184,26303,162425,144743,144883,29185,149946,30679,144922,145174,32391,131910,22709,26382,26904,146087,161367,155618,146961,147129,161278,139418,18640,19128,147737,166554,148206,148237,147515,148276,148374,150085,132554,20946,132625,22943,138920,15294,146687,148484,148694,22408,149108,14747,149295,165352,170441,14178,139715,35678,166734,39382,149522,149755,150037,29193,150208,134264,22885,151205,151430,132985,36570,151596,21135,22335,29041,152217,152601,147274,150183,21948,152646,152686,158546,37332,13427,152895,161330,152926,18200,152930,152934,153543,149823,153693,20582,13563,144332,24798,153859,18300,166216,154286,154505,154630,138640,22433,29009,28598,155906,162834,36950,156082,151450,35682,156674,156746,23899,158711,36662,156804,137500,35562,150006,156808,147439,156946,19392,157119,157365,141083,37989,153569,24981,23079,194765,20411,22201,148769,157436,20074,149812,38486,28047,158909,13848,35191,157593,157806,156689,157790,29151,157895,31554,168128,133649,157990,37124,158009,31301,40432,158202,39462,158253,13919,156777,131105,31107,158260,158555,23852,144665,33743,158621,18128,158884,30011,34917,159150,22710,14108,140685,159819,160205,15444,160384,160389,37505,139642,160395,37680,160486,149968,27705,38047,160848,134904,34855,35061,141606,164979,137137,28344,150058,137248,14756,14009,23568,31203,17727,26294,171181,170148,35139,161740,161880,22230,16607,136714,14753,145199,164072,136133,29101,33638,162269,168360,23143,19639,159919,166315,162301,162314,162571,163174,147834,31555,31102,163849,28597,172767,27139,164632,21410,159239,37823,26678,38749,164207,163875,158133,136173,143919,163912,23941,166960,163971,22293,38947,166217,23979,149896,26046,27093,21458,150181,147329,15377,26422,163984,164084,164142,139169,164175,164233,164271,164378,164614,164655,164746,13770,164968,165546,18682,25574,166230,30728,37461,166328,17394,166375,17375,166376,166726,166868,23032,166921,36619,167877,168172,31569,168208,168252,15863,168286,150218,36816,29327,22155,169191,169449,169392,169400,169778,170193,170313,170346,170435,170536,170766,171354,171419,32415,171768,171811,19620,38215,172691,29090,172799,19857,36882,173515,19868,134300,36798,21953,36794,140464,36793,150163,17673,32383,28502,27313,20202,13540,166700,161949,14138,36480,137205,163876,166764,166809,162366,157359,15851,161365,146615,153141,153942,20122,155265,156248,22207,134765,36366,23405,147080,150686,25566,25296,137206,137339,25904,22061,154698,21530,152337,15814,171416,19581,22050,22046,32585,155352,22901,146752,34672,19996,135146,134473,145082,33047,40286,36120,30267,40005,30286,30649,37701,21554,33096,33527,22053,33074,33816,32957,21994,31074,22083,21526,134813,13774,22021,22001,26353,164578,13869,30004,22000,21946,21655,21874,134209,134294,24272,151880,134774,142434,134818,40619,32090,21982,135285,25245,38765,21652,36045,29174,37238,25596,25529,25598,21865,142147,40050,143027,20890,13535,134567,20903,21581,21790,21779,30310,36397,157834,30129,32950,34820,34694,35015,33206,33820,135361,17644,29444,149254,23440,33547,157843,22139,141044,163119,147875,163187,159440,160438,37232,135641,37384,146684,173737,134828,134905,29286,138402,18254,151490,163833,135147,16634,40029,25887,142752,18675,149472,171388,135148,134666,24674,161187,135149,null,155720,135559,29091,32398,40272,19994,19972,13687,23309,27826,21351,13996,14812,21373,13989,149016,22682,150382,33325,21579,22442,154261,133497,null,14930,140389,29556,171692,19721,39917,146686,171824,19547,151465,169374,171998,33884,146870,160434,157619,145184,25390,32037,147191,146988,14890,36872,21196,15988,13946,17897,132238,30272,23280,134838,30842,163630,22695,16575,22140,39819,23924,30292,173108,40581,19681,30201,14331,24857,143578,148466,null,22109,135849,22439,149859,171526,21044,159918,13741,27722,40316,31830,39737,22494,137068,23635,25811,169168,156469,160100,34477,134440,159010,150242,134513,null,20990,139023,23950,38659,138705,40577,36940,31519,39682,23761,31651,25192,25397,39679,31695,39722,31870,39726,31810,31878,39957,31740,39689,40727,39963,149822,40794,21875,23491,20477,40600,20466,21088,15878,21201,22375,20566,22967,24082,38856,40363,36700,21609,38836,39232,38842,21292,24880,26924,21466,39946,40194,19515,38465,27008,20646,30022,137069,39386,21107,null,37209,38529,37212,null,37201,167575,25471,159011,27338,22033,37262,30074,25221,132092,29519,31856,154657,146685,null,149785,30422,39837,20010,134356,33726,34882,null,23626,27072,20717,22394,21023,24053,20174,27697,131570,20281,21660,21722,21146,36226,13822,24332,13811,null,27474,37244,40869,39831,38958,39092,39610,40616,40580,29050,31508,null,27642,34840,32632,null,22048,173642,36471,40787,null,36308,36431,40476,36353,25218,164733,36392,36469,31443,150135,31294,30936,27882,35431,30215,166490,40742,27854,34774,30147,172722,30803,194624,36108,29410,29553,35629,29442,29937,36075,150203,34351,24506,34976,17591,null,137275,159237,null,35454,140571,null,24829,30311,39639,40260,37742,39823,34805,null,34831,36087,29484,38689,39856,13782,29362,19463,31825,39242,155993,24921,19460,40598,24957,null,22367,24943,25254,25145,25294,14940,25058,21418,144373,25444,26626,13778,23895,166850,36826,167481,null,20697,138566,30982,21298,38456,134971,16485,null,30718,null,31938,155418,31962,31277,32870,32867,32077,29957,29938,35220,33306,26380,32866,160902,32859,29936,33027,30500,35209,157644,30035,159441,34729,34766,33224,34700,35401,36013,35651,30507,29944,34010,13877,27058,36262,null,35241,29800,28089,34753,147473,29927,15835,29046,24740,24988,15569,29026,24695,null,32625,166701,29264,24809,19326,21024,15384,146631,155351,161366,152881,137540,135934,170243,159196,159917,23745,156077,166415,145015,131310,157766,151310,17762,23327,156492,40784,40614,156267,12288,65292,12289,12290,65294,8231,65307,65306,65311,65281,65072,8230,8229,65104,65105,65106,183,65108,65109,65110,65111,65372,8211,65073,8212,65075,9588,65076,65103,65288,65289,65077,65078,65371,65373,65079,65080,12308,12309,65081,65082,12304,12305,65083,65084,12298,12299,65085,65086,12296,12297,65087,65088,12300,12301,65089,65090,12302,12303,65091,65092,65113,65114,65115,65116,65117,65118,8216,8217,8220,8221,12317,12318,8245,8242,65283,65286,65290,8251,167,12291,9675,9679,9651,9650,9678,9734,9733,9671,9670,9633,9632,9661,9660,12963,8453,175,65507,65343,717,65097,65098,65101,65102,65099,65100,65119,65120,65121,65291,65293,215,247,177,8730,65308,65310,65309,8806,8807,8800,8734,8786,8801,65122,65123,65124,65125,65126,65374,8745,8746,8869,8736,8735,8895,13266,13265,8747,8750,8757,8756,9792,9794,8853,8857,8593,8595,8592,8594,8598,8599,8601,8600,8741,8739,65295,65340,8725,65128,65284,65509,12306,65504,65505,65285,65312,8451,8457,65129,65130,65131,13269,13212,13213,13214,13262,13217,13198,13199,13252,176,20825,20827,20830,20829,20833,20835,21991,29929,31950,9601,9602,9603,9604,9605,9606,9607,9608,9615,9614,9613,9612,9611,9610,9609,9532,9524,9516,9508,9500,9620,9472,9474,9621,9484,9488,9492,9496,9581,9582,9584,9583,9552,9566,9578,9569,9698,9699,9701,9700,9585,9586,9587,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,12321,12322,12323,12324,12325,12326,12327,12328,12329,21313,21316,21317,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,729,713,714,711,715,9216,9217,9218,9219,9220,9221,9222,9223,9224,9225,9226,9227,9228,9229,9230,9231,9232,9233,9234,9235,9236,9237,9238,9239,9240,9241,9242,9243,9244,9245,9246,9247,9249,8364,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19968,20057,19969,19971,20035,20061,20102,20108,20154,20799,20837,20843,20960,20992,20993,21147,21269,21313,21340,21448,19977,19979,19976,19978,20011,20024,20961,20037,20040,20063,20062,20110,20129,20800,20995,21242,21315,21449,21475,22303,22763,22805,22823,22899,23376,23377,23379,23544,23567,23586,23608,23665,24029,24037,24049,24050,24051,24062,24178,24318,24331,24339,25165,19985,19984,19981,20013,20016,20025,20043,23609,20104,20113,20117,20114,20116,20130,20161,20160,20163,20166,20167,20173,20170,20171,20164,20803,20801,20839,20845,20846,20844,20887,20982,20998,20999,21000,21243,21246,21247,21270,21305,21320,21319,21317,21342,21380,21451,21450,21453,22764,22825,22827,22826,22829,23380,23569,23588,23610,23663,24052,24187,24319,24340,24341,24515,25096,25142,25163,25166,25903,25991,26007,26020,26041,26085,26352,26376,26408,27424,27490,27513,27595,27604,27611,27663,27700,28779,29226,29238,29243,29255,29273,29275,29356,29579,19993,19990,19989,19988,19992,20027,20045,20047,20046,20197,20184,20180,20181,20182,20183,20195,20196,20185,20190,20805,20804,20873,20874,20908,20985,20986,20984,21002,21152,21151,21253,21254,21271,21277,20191,21322,21321,21345,21344,21359,21358,21435,21487,21476,21491,21484,21486,21481,21480,21500,21496,21493,21483,21478,21482,21490,21489,21488,21477,21485,21499,22235,22234,22806,22830,22833,22900,22902,23381,23427,23612,24040,24039,24038,24066,24067,24179,24188,24321,24344,24343,24517,25098,25171,25172,25170,25169,26021,26086,26414,26412,26410,26411,26413,27491,27597,27665,27664,27704,27713,27712,27710,29359,29572,29577,29916,29926,29976,29983,29992,29993,30000,30001,30002,30003,30091,30333,30382,30399,30446,30683,30690,30707,31034,31166,31348,31435,19998,19999,20050,20051,20073,20121,20132,20134,20133,20223,20233,20249,20234,20245,20237,20240,20241,20239,20210,20214,20219,20208,20211,20221,20225,20235,20809,20807,20806,20808,20840,20849,20877,20912,21015,21009,21010,21006,21014,21155,21256,21281,21280,21360,21361,21513,21519,21516,21514,21520,21505,21515,21508,21521,21517,21512,21507,21518,21510,21522,22240,22238,22237,22323,22320,22312,22317,22316,22319,22313,22809,22810,22839,22840,22916,22904,22915,22909,22905,22914,22913,23383,23384,23431,23432,23429,23433,23546,23574,23673,24030,24070,24182,24180,24335,24347,24537,24534,25102,25100,25101,25104,25187,25179,25176,25910,26089,26088,26092,26093,26354,26355,26377,26429,26420,26417,26421,27425,27492,27515,27670,27741,27735,27737,27743,27744,27728,27733,27745,27739,27725,27726,28784,29279,29277,30334,31481,31859,31992,32566,32650,32701,32769,32771,32780,32786,32819,32895,32905,32907,32908,33251,33258,33267,33276,33292,33307,33311,33390,33394,33406,34411,34880,34892,34915,35199,38433,20018,20136,20301,20303,20295,20311,20318,20276,20315,20309,20272,20304,20305,20285,20282,20280,20291,20308,20284,20294,20323,20316,20320,20271,20302,20278,20313,20317,20296,20314,20812,20811,20813,20853,20918,20919,21029,21028,21033,21034,21032,21163,21161,21162,21164,21283,21363,21365,21533,21549,21534,21566,21542,21582,21543,21574,21571,21555,21576,21570,21531,21545,21578,21561,21563,21560,21550,21557,21558,21536,21564,21568,21553,21547,21535,21548,22250,22256,22244,22251,22346,22353,22336,22349,22343,22350,22334,22352,22351,22331,22767,22846,22941,22930,22952,22942,22947,22937,22934,22925,22948,22931,22922,22949,23389,23388,23386,23387,23436,23435,23439,23596,23616,23617,23615,23614,23696,23697,23700,23692,24043,24076,24207,24199,24202,24311,24324,24351,24420,24418,24439,24441,24536,24524,24535,24525,24561,24555,24568,24554,25106,25105,25220,25239,25238,25216,25206,25225,25197,25226,25212,25214,25209,25203,25234,25199,25240,25198,25237,25235,25233,25222,25913,25915,25912,26097,26356,26463,26446,26447,26448,26449,26460,26454,26462,26441,26438,26464,26451,26455,27493,27599,27714,27742,27801,27777,27784,27785,27781,27803,27754,27770,27792,27760,27788,27752,27798,27794,27773,27779,27762,27774,27764,27782,27766,27789,27796,27800,27778,28790,28796,28797,28792,29282,29281,29280,29380,29378,29590,29996,29995,30007,30008,30338,30447,30691,31169,31168,31167,31350,31995,32597,32918,32915,32925,32920,32923,32922,32946,33391,33426,33419,33421,35211,35282,35328,35895,35910,35925,35997,36196,36208,36275,36523,36554,36763,36784,36802,36806,36805,36804,24033,37009,37026,37034,37030,37027,37193,37318,37324,38450,38446,38449,38442,38444,20006,20054,20083,20107,20123,20126,20139,20140,20335,20381,20365,20339,20351,20332,20379,20363,20358,20355,20336,20341,20360,20329,20347,20374,20350,20367,20369,20346,20820,20818,20821,20841,20855,20854,20856,20925,20989,21051,21048,21047,21050,21040,21038,21046,21057,21182,21179,21330,21332,21331,21329,21350,21367,21368,21369,21462,21460,21463,21619,21621,21654,21624,21653,21632,21627,21623,21636,21650,21638,21628,21648,21617,21622,21644,21658,21602,21608,21643,21629,21646,22266,22403,22391,22378,22377,22369,22374,22372,22396,22812,22857,22855,22856,22852,22868,22974,22971,22996,22969,22958,22993,22982,22992,22989,22987,22995,22986,22959,22963,22994,22981,23391,23396,23395,23447,23450,23448,23452,23449,23451,23578,23624,23621,23622,23735,23713,23736,23721,23723,23729,23731,24088,24090,24086,24085,24091,24081,24184,24218,24215,24220,24213,24214,24310,24358,24359,24361,24448,24449,24447,24444,24541,24544,24573,24565,24575,24591,24596,24623,24629,24598,24618,24597,24609,24615,24617,24619,24603,25110,25109,25151,25150,25152,25215,25289,25292,25284,25279,25282,25273,25298,25307,25259,25299,25300,25291,25288,25256,25277,25276,25296,25305,25287,25293,25269,25306,25265,25304,25302,25303,25286,25260,25294,25918,26023,26044,26106,26132,26131,26124,26118,26114,26126,26112,26127,26133,26122,26119,26381,26379,26477,26507,26517,26481,26524,26483,26487,26503,26525,26519,26479,26480,26495,26505,26494,26512,26485,26522,26515,26492,26474,26482,27427,27494,27495,27519,27667,27675,27875,27880,27891,27825,27852,27877,27827,27837,27838,27836,27874,27819,27861,27859,27832,27844,27833,27841,27822,27863,27845,27889,27839,27835,27873,27867,27850,27820,27887,27868,27862,27872,28821,28814,28818,28810,28825,29228,29229,29240,29256,29287,29289,29376,29390,29401,29399,29392,29609,29608,29599,29611,29605,30013,30109,30105,30106,30340,30402,30450,30452,30693,30717,31038,31040,31041,31177,31176,31354,31353,31482,31998,32596,32652,32651,32773,32954,32933,32930,32945,32929,32939,32937,32948,32938,32943,33253,33278,33293,33459,33437,33433,33453,33469,33439,33465,33457,33452,33445,33455,33464,33443,33456,33470,33463,34382,34417,21021,34920,36555,36814,36820,36817,37045,37048,37041,37046,37319,37329,38263,38272,38428,38464,38463,38459,38468,38466,38585,38632,38738,38750,20127,20141,20142,20449,20405,20399,20415,20448,20433,20431,20445,20419,20406,20440,20447,20426,20439,20398,20432,20420,20418,20442,20430,20446,20407,20823,20882,20881,20896,21070,21059,21066,21069,21068,21067,21063,21191,21193,21187,21185,21261,21335,21371,21402,21467,21676,21696,21672,21710,21705,21688,21670,21683,21703,21698,21693,21674,21697,21700,21704,21679,21675,21681,21691,21673,21671,21695,22271,22402,22411,22432,22435,22434,22478,22446,22419,22869,22865,22863,22862,22864,23004,23000,23039,23011,23016,23043,23013,23018,23002,23014,23041,23035,23401,23459,23462,23460,23458,23461,23553,23630,23631,23629,23627,23769,23762,24055,24093,24101,24095,24189,24224,24230,24314,24328,24365,24421,24456,24453,24458,24459,24455,24460,24457,24594,24605,24608,24613,24590,24616,24653,24688,24680,24674,24646,24643,24684,24683,24682,24676,25153,25308,25366,25353,25340,25325,25345,25326,25341,25351,25329,25335,25327,25324,25342,25332,25361,25346,25919,25925,26027,26045,26082,26149,26157,26144,26151,26159,26143,26152,26161,26148,26359,26623,26579,26609,26580,26576,26604,26550,26543,26613,26601,26607,26564,26577,26548,26586,26597,26552,26575,26590,26611,26544,26585,26594,26589,26578,27498,27523,27526,27573,27602,27607,27679,27849,27915,27954,27946,27969,27941,27916,27953,27934,27927,27963,27965,27966,27958,27931,27893,27961,27943,27960,27945,27950,27957,27918,27947,28843,28858,28851,28844,28847,28845,28856,28846,28836,29232,29298,29295,29300,29417,29408,29409,29623,29642,29627,29618,29645,29632,29619,29978,29997,30031,30028,30030,30027,30123,30116,30117,30114,30115,30328,30342,30343,30344,30408,30406,30403,30405,30465,30457,30456,30473,30475,30462,30460,30471,30684,30722,30740,30732,30733,31046,31049,31048,31047,31161,31162,31185,31186,31179,31359,31361,31487,31485,31869,32002,32005,32000,32009,32007,32004,32006,32568,32654,32703,32772,32784,32781,32785,32822,32982,32997,32986,32963,32964,32972,32993,32987,32974,32990,32996,32989,33268,33314,33511,33539,33541,33507,33499,33510,33540,33509,33538,33545,33490,33495,33521,33537,33500,33492,33489,33502,33491,33503,33519,33542,34384,34425,34427,34426,34893,34923,35201,35284,35336,35330,35331,35998,36000,36212,36211,36276,36557,36556,36848,36838,36834,36842,36837,36845,36843,36836,36840,37066,37070,37057,37059,37195,37194,37325,38274,38480,38475,38476,38477,38754,38761,38859,38893,38899,38913,39080,39131,39135,39318,39321,20056,20147,20492,20493,20515,20463,20518,20517,20472,20521,20502,20486,20540,20511,20506,20498,20497,20474,20480,20500,20520,20465,20513,20491,20505,20504,20467,20462,20525,20522,20478,20523,20489,20860,20900,20901,20898,20941,20940,20934,20939,21078,21084,21076,21083,21085,21290,21375,21407,21405,21471,21736,21776,21761,21815,21756,21733,21746,21766,21754,21780,21737,21741,21729,21769,21742,21738,21734,21799,21767,21757,21775,22275,22276,22466,22484,22475,22467,22537,22799,22871,22872,22874,23057,23064,23068,23071,23067,23059,23020,23072,23075,23081,23077,23052,23049,23403,23640,23472,23475,23478,23476,23470,23477,23481,23480,23556,23633,23637,23632,23789,23805,23803,23786,23784,23792,23798,23809,23796,24046,24109,24107,24235,24237,24231,24369,24466,24465,24464,24665,24675,24677,24656,24661,24685,24681,24687,24708,24735,24730,24717,24724,24716,24709,24726,25159,25331,25352,25343,25422,25406,25391,25429,25410,25414,25423,25417,25402,25424,25405,25386,25387,25384,25421,25420,25928,25929,26009,26049,26053,26178,26185,26191,26179,26194,26188,26181,26177,26360,26388,26389,26391,26657,26680,26696,26694,26707,26681,26690,26708,26665,26803,26647,26700,26705,26685,26612,26704,26688,26684,26691,26666,26693,26643,26648,26689,27530,27529,27575,27683,27687,27688,27686,27684,27888,28010,28053,28040,28039,28006,28024,28023,27993,28051,28012,28041,28014,27994,28020,28009,28044,28042,28025,28037,28005,28052,28874,28888,28900,28889,28872,28879,29241,29305,29436,29433,29437,29432,29431,29574,29677,29705,29678,29664,29674,29662,30036,30045,30044,30042,30041,30142,30149,30151,30130,30131,30141,30140,30137,30146,30136,30347,30384,30410,30413,30414,30505,30495,30496,30504,30697,30768,30759,30776,30749,30772,30775,30757,30765,30752,30751,30770,31061,31056,31072,31071,31062,31070,31069,31063,31066,31204,31203,31207,31199,31206,31209,31192,31364,31368,31449,31494,31505,31881,32033,32023,32011,32010,32032,32034,32020,32016,32021,32026,32028,32013,32025,32027,32570,32607,32660,32709,32705,32774,32792,32789,32793,32791,32829,32831,33009,33026,33008,33029,33005,33012,33030,33016,33011,33032,33021,33034,33020,33007,33261,33260,33280,33296,33322,33323,33320,33324,33467,33579,33618,33620,33610,33592,33616,33609,33589,33588,33615,33586,33593,33590,33559,33600,33585,33576,33603,34388,34442,34474,34451,34468,34473,34444,34467,34460,34928,34935,34945,34946,34941,34937,35352,35344,35342,35340,35349,35338,35351,35347,35350,35343,35345,35912,35962,35961,36001,36002,36215,36524,36562,36564,36559,36785,36865,36870,36855,36864,36858,36852,36867,36861,36869,36856,37013,37089,37085,37090,37202,37197,37196,37336,37341,37335,37340,37337,38275,38498,38499,38497,38491,38493,38500,38488,38494,38587,39138,39340,39592,39640,39717,39730,39740,20094,20602,20605,20572,20551,20547,20556,20570,20553,20581,20598,20558,20565,20597,20596,20599,20559,20495,20591,20589,20828,20885,20976,21098,21103,21202,21209,21208,21205,21264,21263,21273,21311,21312,21310,21443,26364,21830,21866,21862,21828,21854,21857,21827,21834,21809,21846,21839,21845,21807,21860,21816,21806,21852,21804,21859,21811,21825,21847,22280,22283,22281,22495,22533,22538,22534,22496,22500,22522,22530,22581,22519,22521,22816,22882,23094,23105,23113,23142,23146,23104,23100,23138,23130,23110,23114,23408,23495,23493,23492,23490,23487,23494,23561,23560,23559,23648,23644,23645,23815,23814,23822,23835,23830,23842,23825,23849,23828,23833,23844,23847,23831,24034,24120,24118,24115,24119,24247,24248,24246,24245,24254,24373,24375,24407,24428,24425,24427,24471,24473,24478,24472,24481,24480,24476,24703,24739,24713,24736,24744,24779,24756,24806,24765,24773,24763,24757,24796,24764,24792,24789,24774,24799,24760,24794,24775,25114,25115,25160,25504,25511,25458,25494,25506,25509,25463,25447,25496,25514,25457,25513,25481,25475,25499,25451,25512,25476,25480,25497,25505,25516,25490,25487,25472,25467,25449,25448,25466,25949,25942,25937,25945,25943,21855,25935,25944,25941,25940,26012,26011,26028,26063,26059,26060,26062,26205,26202,26212,26216,26214,26206,26361,21207,26395,26753,26799,26786,26771,26805,26751,26742,26801,26791,26775,26800,26755,26820,26797,26758,26757,26772,26781,26792,26783,26785,26754,27442,27578,27627,27628,27691,28046,28092,28147,28121,28082,28129,28108,28132,28155,28154,28165,28103,28107,28079,28113,28078,28126,28153,28088,28151,28149,28101,28114,28186,28085,28122,28139,28120,28138,28145,28142,28136,28102,28100,28074,28140,28095,28134,28921,28937,28938,28925,28911,29245,29309,29313,29468,29467,29462,29459,29465,29575,29701,29706,29699,29702,29694,29709,29920,29942,29943,29980,29986,30053,30054,30050,30064,30095,30164,30165,30133,30154,30157,30350,30420,30418,30427,30519,30526,30524,30518,30520,30522,30827,30787,30798,31077,31080,31085,31227,31378,31381,31520,31528,31515,31532,31526,31513,31518,31534,31890,31895,31893,32070,32067,32113,32046,32057,32060,32064,32048,32051,32068,32047,32066,32050,32049,32573,32670,32666,32716,32718,32722,32796,32842,32838,33071,33046,33059,33067,33065,33072,33060,33282,33333,33335,33334,33337,33678,33694,33688,33656,33698,33686,33725,33707,33682,33674,33683,33673,33696,33655,33659,33660,33670,33703,34389,24426,34503,34496,34486,34500,34485,34502,34507,34481,34479,34505,34899,34974,34952,34987,34962,34966,34957,34955,35219,35215,35370,35357,35363,35365,35377,35373,35359,35355,35362,35913,35930,36009,36012,36011,36008,36010,36007,36199,36198,36286,36282,36571,36575,36889,36877,36890,36887,36899,36895,36893,36880,36885,36894,36896,36879,36898,36886,36891,36884,37096,37101,37117,37207,37326,37365,37350,37347,37351,37357,37353,38281,38506,38517,38515,38520,38512,38516,38518,38519,38508,38592,38634,38633,31456,31455,38914,38915,39770,40165,40565,40575,40613,40635,20642,20621,20613,20633,20625,20608,20630,20632,20634,26368,20977,21106,21108,21109,21097,21214,21213,21211,21338,21413,21883,21888,21927,21884,21898,21917,21912,21890,21916,21930,21908,21895,21899,21891,21939,21934,21919,21822,21938,21914,21947,21932,21937,21886,21897,21931,21913,22285,22575,22570,22580,22564,22576,22577,22561,22557,22560,22777,22778,22880,23159,23194,23167,23186,23195,23207,23411,23409,23506,23500,23507,23504,23562,23563,23601,23884,23888,23860,23879,24061,24133,24125,24128,24131,24190,24266,24257,24258,24260,24380,24429,24489,24490,24488,24785,24801,24754,24758,24800,24860,24867,24826,24853,24816,24827,24820,24936,24817,24846,24822,24841,24832,24850,25119,25161,25507,25484,25551,25536,25577,25545,25542,25549,25554,25571,25552,25569,25558,25581,25582,25462,25588,25578,25563,25682,25562,25593,25950,25958,25954,25955,26001,26000,26031,26222,26224,26228,26230,26223,26257,26234,26238,26231,26366,26367,26399,26397,26874,26837,26848,26840,26839,26885,26847,26869,26862,26855,26873,26834,26866,26851,26827,26829,26893,26898,26894,26825,26842,26990,26875,27454,27450,27453,27544,27542,27580,27631,27694,27695,27692,28207,28216,28244,28193,28210,28263,28234,28192,28197,28195,28187,28251,28248,28196,28246,28270,28205,28198,28271,28212,28237,28218,28204,28227,28189,28222,28363,28297,28185,28238,28259,28228,28274,28265,28255,28953,28954,28966,28976,28961,28982,29038,28956,29260,29316,29312,29494,29477,29492,29481,29754,29738,29747,29730,29733,29749,29750,29748,29743,29723,29734,29736,29989,29990,30059,30058,30178,30171,30179,30169,30168,30174,30176,30331,30332,30358,30355,30388,30428,30543,30701,30813,30828,30831,31245,31240,31243,31237,31232,31384,31383,31382,31461,31459,31561,31574,31558,31568,31570,31572,31565,31563,31567,31569,31903,31909,32094,32080,32104,32085,32043,32110,32114,32097,32102,32098,32112,32115,21892,32724,32725,32779,32850,32901,33109,33108,33099,33105,33102,33081,33094,33086,33100,33107,33140,33298,33308,33769,33795,33784,33805,33760,33733,33803,33729,33775,33777,33780,33879,33802,33776,33804,33740,33789,33778,33738,33848,33806,33796,33756,33799,33748,33759,34395,34527,34521,34541,34516,34523,34532,34512,34526,34903,35009,35010,34993,35203,35222,35387,35424,35413,35422,35388,35393,35412,35419,35408,35398,35380,35386,35382,35414,35937,35970,36015,36028,36019,36029,36033,36027,36032,36020,36023,36022,36031,36024,36234,36229,36225,36302,36317,36299,36314,36305,36300,36315,36294,36603,36600,36604,36764,36910,36917,36913,36920,36914,36918,37122,37109,37129,37118,37219,37221,37327,37396,37397,37411,37385,37406,37389,37392,37383,37393,38292,38287,38283,38289,38291,38290,38286,38538,38542,38539,38525,38533,38534,38541,38514,38532,38593,38597,38596,38598,38599,38639,38642,38860,38917,38918,38920,39143,39146,39151,39145,39154,39149,39342,39341,40643,40653,40657,20098,20653,20661,20658,20659,20677,20670,20652,20663,20667,20655,20679,21119,21111,21117,21215,21222,21220,21218,21219,21295,21983,21992,21971,21990,21966,21980,21959,21969,21987,21988,21999,21978,21985,21957,21958,21989,21961,22290,22291,22622,22609,22616,22615,22618,22612,22635,22604,22637,22602,22626,22610,22603,22887,23233,23241,23244,23230,23229,23228,23219,23234,23218,23913,23919,24140,24185,24265,24264,24338,24409,24492,24494,24858,24847,24904,24863,24819,24859,24825,24833,24840,24910,24908,24900,24909,24894,24884,24871,24845,24838,24887,25121,25122,25619,25662,25630,25642,25645,25661,25644,25615,25628,25620,25613,25654,25622,25623,25606,25964,26015,26032,26263,26249,26247,26248,26262,26244,26264,26253,26371,27028,26989,26970,26999,26976,26964,26997,26928,27010,26954,26984,26987,26974,26963,27001,27014,26973,26979,26971,27463,27506,27584,27583,27603,27645,28322,28335,28371,28342,28354,28304,28317,28359,28357,28325,28312,28348,28346,28331,28369,28310,28316,28356,28372,28330,28327,28340,29006,29017,29033,29028,29001,29031,29020,29036,29030,29004,29029,29022,28998,29032,29014,29242,29266,29495,29509,29503,29502,29807,29786,29781,29791,29790,29761,29759,29785,29787,29788,30070,30072,30208,30192,30209,30194,30193,30202,30207,30196,30195,30430,30431,30555,30571,30566,30558,30563,30585,30570,30572,30556,30565,30568,30562,30702,30862,30896,30871,30872,30860,30857,30844,30865,30867,30847,31098,31103,31105,33836,31165,31260,31258,31264,31252,31263,31262,31391,31392,31607,31680,31584,31598,31591,31921,31923,31925,32147,32121,32145,32129,32143,32091,32622,32617,32618,32626,32681,32680,32676,32854,32856,32902,32900,33137,33136,33144,33125,33134,33139,33131,33145,33146,33126,33285,33351,33922,33911,33853,33841,33909,33894,33899,33865,33900,33883,33852,33845,33889,33891,33897,33901,33862,34398,34396,34399,34553,34579,34568,34567,34560,34558,34555,34562,34563,34566,34570,34905,35039,35028,35033,35036,35032,35037,35041,35018,35029,35026,35228,35299,35435,35442,35443,35430,35433,35440,35463,35452,35427,35488,35441,35461,35437,35426,35438,35436,35449,35451,35390,35432,35938,35978,35977,36042,36039,36040,36036,36018,36035,36034,36037,36321,36319,36328,36335,36339,36346,36330,36324,36326,36530,36611,36617,36606,36618,36767,36786,36939,36938,36947,36930,36948,36924,36949,36944,36935,36943,36942,36941,36945,36926,36929,37138,37143,37228,37226,37225,37321,37431,37463,37432,37437,37440,37438,37467,37451,37476,37457,37428,37449,37453,37445,37433,37439,37466,38296,38552,38548,38549,38605,38603,38601,38602,38647,38651,38649,38646,38742,38772,38774,38928,38929,38931,38922,38930,38924,39164,39156,39165,39166,39347,39345,39348,39649,40169,40578,40718,40723,40736,20711,20718,20709,20694,20717,20698,20693,20687,20689,20721,20686,20713,20834,20979,21123,21122,21297,21421,22014,22016,22043,22039,22013,22036,22022,22025,22029,22030,22007,22038,22047,22024,22032,22006,22296,22294,22645,22654,22659,22675,22666,22649,22661,22653,22781,22821,22818,22820,22890,22889,23265,23270,23273,23255,23254,23256,23267,23413,23518,23527,23521,23525,23526,23528,23522,23524,23519,23565,23650,23940,23943,24155,24163,24149,24151,24148,24275,24278,24330,24390,24432,24505,24903,24895,24907,24951,24930,24931,24927,24922,24920,24949,25130,25735,25688,25684,25764,25720,25695,25722,25681,25703,25652,25709,25723,25970,26017,26071,26070,26274,26280,26269,27036,27048,27029,27073,27054,27091,27083,27035,27063,27067,27051,27060,27088,27085,27053,27084,27046,27075,27043,27465,27468,27699,28467,28436,28414,28435,28404,28457,28478,28448,28460,28431,28418,28450,28415,28399,28422,28465,28472,28466,28451,28437,28459,28463,28552,28458,28396,28417,28402,28364,28407,29076,29081,29053,29066,29060,29074,29246,29330,29334,29508,29520,29796,29795,29802,29808,29805,29956,30097,30247,30221,30219,30217,30227,30433,30435,30596,30589,30591,30561,30913,30879,30887,30899,30889,30883,31118,31119,31117,31278,31281,31402,31401,31469,31471,31649,31637,31627,31605,31639,31645,31636,31631,31672,31623,31620,31929,31933,31934,32187,32176,32156,32189,32190,32160,32202,32180,32178,32177,32186,32162,32191,32181,32184,32173,32210,32199,32172,32624,32736,32737,32735,32862,32858,32903,33104,33152,33167,33160,33162,33151,33154,33255,33274,33287,33300,33310,33355,33993,33983,33990,33988,33945,33950,33970,33948,33995,33976,33984,34003,33936,33980,34001,33994,34623,34588,34619,34594,34597,34612,34584,34645,34615,34601,35059,35074,35060,35065,35064,35069,35048,35098,35055,35494,35468,35486,35491,35469,35489,35475,35492,35498,35493,35496,35480,35473,35482,35495,35946,35981,35980,36051,36049,36050,36203,36249,36245,36348,36628,36626,36629,36627,36771,36960,36952,36956,36963,36953,36958,36962,36957,36955,37145,37144,37150,37237,37240,37239,37236,37496,37504,37509,37528,37526,37499,37523,37532,37544,37500,37521,38305,38312,38313,38307,38309,38308,38553,38556,38555,38604,38610,38656,38780,38789,38902,38935,38936,39087,39089,39171,39173,39180,39177,39361,39599,39600,39654,39745,39746,40180,40182,40179,40636,40763,40778,20740,20736,20731,20725,20729,20738,20744,20745,20741,20956,21127,21128,21129,21133,21130,21232,21426,22062,22075,22073,22066,22079,22068,22057,22099,22094,22103,22132,22070,22063,22064,22656,22687,22686,22707,22684,22702,22697,22694,22893,23305,23291,23307,23285,23308,23304,23534,23532,23529,23531,23652,23653,23965,23956,24162,24159,24161,24290,24282,24287,24285,24291,24288,24392,24433,24503,24501,24950,24935,24942,24925,24917,24962,24956,24944,24939,24958,24999,24976,25003,24974,25004,24986,24996,24980,25006,25134,25705,25711,25721,25758,25778,25736,25744,25776,25765,25747,25749,25769,25746,25774,25773,25771,25754,25772,25753,25762,25779,25973,25975,25976,26286,26283,26292,26289,27171,27167,27112,27137,27166,27161,27133,27169,27155,27146,27123,27138,27141,27117,27153,27472,27470,27556,27589,27590,28479,28540,28548,28497,28518,28500,28550,28525,28507,28536,28526,28558,28538,28528,28516,28567,28504,28373,28527,28512,28511,29087,29100,29105,29096,29270,29339,29518,29527,29801,29835,29827,29822,29824,30079,30240,30249,30239,30244,30246,30241,30242,30362,30394,30436,30606,30599,30604,30609,30603,30923,30917,30906,30922,30910,30933,30908,30928,31295,31292,31296,31293,31287,31291,31407,31406,31661,31665,31684,31668,31686,31687,31681,31648,31692,31946,32224,32244,32239,32251,32216,32236,32221,32232,32227,32218,32222,32233,32158,32217,32242,32249,32629,32631,32687,32745,32806,33179,33180,33181,33184,33178,33176,34071,34109,34074,34030,34092,34093,34067,34065,34083,34081,34068,34028,34085,34047,34054,34690,34676,34678,34656,34662,34680,34664,34649,34647,34636,34643,34907,34909,35088,35079,35090,35091,35093,35082,35516,35538,35527,35524,35477,35531,35576,35506,35529,35522,35519,35504,35542,35533,35510,35513,35547,35916,35918,35948,36064,36062,36070,36068,36076,36077,36066,36067,36060,36074,36065,36205,36255,36259,36395,36368,36381,36386,36367,36393,36383,36385,36382,36538,36637,36635,36639,36649,36646,36650,36636,36638,36645,36969,36974,36968,36973,36983,37168,37165,37159,37169,37255,37257,37259,37251,37573,37563,37559,37610,37548,37604,37569,37555,37564,37586,37575,37616,37554,38317,38321,38660,38662,38663,38665,38752,38797,38795,38799,38945,38955,38940,39091,39178,39187,39186,39192,39389,39376,39391,39387,39377,39381,39378,39385,39607,39662,39663,39719,39749,39748,39799,39791,40198,40201,40195,40617,40638,40654,22696,40786,20754,20760,20756,20752,20757,20864,20906,20957,21137,21139,21235,22105,22123,22137,22121,22116,22136,22122,22120,22117,22129,22127,22124,22114,22134,22721,22718,22727,22725,22894,23325,23348,23416,23536,23566,24394,25010,24977,25001,24970,25037,25014,25022,25034,25032,25136,25797,25793,25803,25787,25788,25818,25796,25799,25794,25805,25791,25810,25812,25790,25972,26310,26313,26297,26308,26311,26296,27197,27192,27194,27225,27243,27224,27193,27204,27234,27233,27211,27207,27189,27231,27208,27481,27511,27653,28610,28593,28577,28611,28580,28609,28583,28595,28608,28601,28598,28582,28576,28596,29118,29129,29136,29138,29128,29141,29113,29134,29145,29148,29123,29124,29544,29852,29859,29848,29855,29854,29922,29964,29965,30260,30264,30266,30439,30437,30624,30622,30623,30629,30952,30938,30956,30951,31142,31309,31310,31302,31308,31307,31418,31705,31761,31689,31716,31707,31713,31721,31718,31957,31958,32266,32273,32264,32283,32291,32286,32285,32265,32272,32633,32690,32752,32753,32750,32808,33203,33193,33192,33275,33288,33368,33369,34122,34137,34120,34152,34153,34115,34121,34157,34154,34142,34691,34719,34718,34722,34701,34913,35114,35122,35109,35115,35105,35242,35238,35558,35578,35563,35569,35584,35548,35559,35566,35582,35585,35586,35575,35565,35571,35574,35580,35947,35949,35987,36084,36420,36401,36404,36418,36409,36405,36667,36655,36664,36659,36776,36774,36981,36980,36984,36978,36988,36986,37172,37266,37664,37686,37624,37683,37679,37666,37628,37675,37636,37658,37648,37670,37665,37653,37678,37657,38331,38567,38568,38570,38613,38670,38673,38678,38669,38675,38671,38747,38748,38758,38808,38960,38968,38971,38967,38957,38969,38948,39184,39208,39198,39195,39201,39194,39405,39394,39409,39608,39612,39675,39661,39720,39825,40213,40227,40230,40232,40210,40219,40664,40660,40845,40860,20778,20767,20769,20786,21237,22158,22144,22160,22149,22151,22159,22741,22739,22737,22734,23344,23338,23332,23418,23607,23656,23996,23994,23997,23992,24171,24396,24509,25033,25026,25031,25062,25035,25138,25140,25806,25802,25816,25824,25840,25830,25836,25841,25826,25837,25986,25987,26329,26326,27264,27284,27268,27298,27292,27355,27299,27262,27287,27280,27296,27484,27566,27610,27656,28632,28657,28639,28640,28635,28644,28651,28655,28544,28652,28641,28649,28629,28654,28656,29159,29151,29166,29158,29157,29165,29164,29172,29152,29237,29254,29552,29554,29865,29872,29862,29864,30278,30274,30284,30442,30643,30634,30640,30636,30631,30637,30703,30967,30970,30964,30959,30977,31143,31146,31319,31423,31751,31757,31742,31735,31756,31712,31968,31964,31966,31970,31967,31961,31965,32302,32318,32326,32311,32306,32323,32299,32317,32305,32325,32321,32308,32313,32328,32309,32319,32303,32580,32755,32764,32881,32882,32880,32879,32883,33222,33219,33210,33218,33216,33215,33213,33225,33214,33256,33289,33393,34218,34180,34174,34204,34193,34196,34223,34203,34183,34216,34186,34407,34752,34769,34739,34770,34758,34731,34747,34746,34760,34763,35131,35126,35140,35128,35133,35244,35598,35607,35609,35611,35594,35616,35613,35588,35600,35905,35903,35955,36090,36093,36092,36088,36091,36264,36425,36427,36424,36426,36676,36670,36674,36677,36671,36991,36989,36996,36993,36994,36992,37177,37283,37278,37276,37709,37762,37672,37749,37706,37733,37707,37656,37758,37740,37723,37744,37722,37716,38346,38347,38348,38344,38342,38577,38584,38614,38684,38686,38816,38867,38982,39094,39221,39425,39423,39854,39851,39850,39853,40251,40255,40587,40655,40670,40668,40669,40667,40766,40779,21474,22165,22190,22745,22744,23352,24413,25059,25139,25844,25842,25854,25862,25850,25851,25847,26039,26332,26406,27315,27308,27331,27323,27320,27330,27310,27311,27487,27512,27567,28681,28683,28670,28678,28666,28689,28687,29179,29180,29182,29176,29559,29557,29863,29887,29973,30294,30296,30290,30653,30655,30651,30652,30990,31150,31329,31330,31328,31428,31429,31787,31783,31786,31774,31779,31777,31975,32340,32341,32350,32346,32353,32338,32345,32584,32761,32763,32887,32886,33229,33231,33290,34255,34217,34253,34256,34249,34224,34234,34233,34214,34799,34796,34802,34784,35206,35250,35316,35624,35641,35628,35627,35920,36101,36441,36451,36454,36452,36447,36437,36544,36681,36685,36999,36995,37000,37291,37292,37328,37780,37770,37782,37794,37811,37806,37804,37808,37784,37786,37783,38356,38358,38352,38357,38626,38620,38617,38619,38622,38692,38819,38822,38829,38905,38989,38991,38988,38990,38995,39098,39230,39231,39229,39214,39333,39438,39617,39683,39686,39759,39758,39757,39882,39881,39933,39880,39872,40273,40285,40288,40672,40725,40748,20787,22181,22750,22751,22754,23541,40848,24300,25074,25079,25078,25077,25856,25871,26336,26333,27365,27357,27354,27347,28699,28703,28712,28698,28701,28693,28696,29190,29197,29272,29346,29560,29562,29885,29898,29923,30087,30086,30303,30305,30663,31001,31153,31339,31337,31806,31807,31800,31805,31799,31808,32363,32365,32377,32361,32362,32645,32371,32694,32697,32696,33240,34281,34269,34282,34261,34276,34277,34295,34811,34821,34829,34809,34814,35168,35167,35158,35166,35649,35676,35672,35657,35674,35662,35663,35654,35673,36104,36106,36476,36466,36487,36470,36460,36474,36468,36692,36686,36781,37002,37003,37297,37294,37857,37841,37855,37827,37832,37852,37853,37846,37858,37837,37848,37860,37847,37864,38364,38580,38627,38698,38695,38753,38876,38907,39006,39000,39003,39100,39237,39241,39446,39449,39693,39912,39911,39894,39899,40329,40289,40306,40298,40300,40594,40599,40595,40628,21240,22184,22199,22198,22196,22204,22756,23360,23363,23421,23542,24009,25080,25082,25880,25876,25881,26342,26407,27372,28734,28720,28722,29200,29563,29903,30306,30309,31014,31018,31020,31019,31431,31478,31820,31811,31821,31983,31984,36782,32381,32380,32386,32588,32768,33242,33382,34299,34297,34321,34298,34310,34315,34311,34314,34836,34837,35172,35258,35320,35696,35692,35686,35695,35679,35691,36111,36109,36489,36481,36485,36482,37300,37323,37912,37891,37885,38369,38704,39108,39250,39249,39336,39467,39472,39479,39477,39955,39949,40569,40629,40680,40751,40799,40803,40801,20791,20792,22209,22208,22210,22804,23660,24013,25084,25086,25885,25884,26005,26345,27387,27396,27386,27570,28748,29211,29351,29910,29908,30313,30675,31824,32399,32396,32700,34327,34349,34330,34851,34850,34849,34847,35178,35180,35261,35700,35703,35709,36115,36490,36493,36491,36703,36783,37306,37934,37939,37941,37946,37944,37938,37931,38370,38712,38713,38706,38911,39015,39013,39255,39493,39491,39488,39486,39631,39764,39761,39981,39973,40367,40372,40386,40376,40605,40687,40729,40796,40806,40807,20796,20795,22216,22218,22217,23423,24020,24018,24398,25087,25892,27402,27489,28753,28760,29568,29924,30090,30318,30316,31155,31840,31839,32894,32893,33247,35186,35183,35324,35712,36118,36119,36497,36499,36705,37192,37956,37969,37970,38717,38718,38851,38849,39019,39253,39509,39501,39634,39706,40009,39985,39998,39995,40403,40407,40756,40812,40810,40852,22220,24022,25088,25891,25899,25898,26348,27408,29914,31434,31844,31843,31845,32403,32406,32404,33250,34360,34367,34865,35722,37008,37007,37987,37984,37988,38760,39023,39260,39514,39515,39511,39635,39636,39633,40020,40023,40022,40421,40607,40692,22225,22761,25900,28766,30321,30322,30679,32592,32648,34870,34873,34914,35731,35730,35734,33399,36123,37312,37994,38722,38728,38724,38854,39024,39519,39714,39768,40031,40441,40442,40572,40573,40711,40823,40818,24307,27414,28771,31852,31854,34875,35264,36513,37313,38002,38000,39025,39262,39638,39715,40652,28772,30682,35738,38007,38857,39522,39525,32412,35740,36522,37317,38013,38014,38012,40055,40056,40695,35924,38015,40474,29224,39530,39729,40475,40478,31858,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,20022,20031,20101,20128,20866,20886,20907,21241,21304,21353,21430,22794,23424,24027,12083,24191,24308,24400,24417,25908,26080,30098,30326,36789,38582,168,710,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,65339,65341,10045,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8679,8632,8633,12751,131276,20058,131210,20994,17553,40880,20872,40881,161287,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65506,65508,65287,65282,12849,8470,8481,12443,12444,11904,11908,11910,11911,11912,11914,11916,11917,11925,11932,11933,11941,11943,11946,11948,11950,11958,11964,11966,11974,11978,11980,11981,11983,11990,11991,11998,12003,null,null,null,643,592,603,596,629,339,248,331,650,618,20034,20060,20981,21274,21378,19975,19980,20039,20109,22231,64012,23662,24435,19983,20871,19982,20014,20115,20162,20169,20168,20888,21244,21356,21433,22304,22787,22828,23568,24063,26081,27571,27596,27668,29247,20017,20028,20200,20188,20201,20193,20189,20186,21004,21276,21324,22306,22307,22807,22831,23425,23428,23570,23611,23668,23667,24068,24192,24194,24521,25097,25168,27669,27702,27715,27711,27707,29358,29360,29578,31160,32906,38430,20238,20248,20268,20213,20244,20209,20224,20215,20232,20253,20226,20229,20258,20243,20228,20212,20242,20913,21011,21001,21008,21158,21282,21279,21325,21386,21511,22241,22239,22318,22314,22324,22844,22912,22908,22917,22907,22910,22903,22911,23382,23573,23589,23676,23674,23675,23678,24031,24181,24196,24322,24346,24436,24533,24532,24527,25180,25182,25188,25185,25190,25186,25177,25184,25178,25189,26095,26094,26430,26425,26424,26427,26426,26431,26428,26419,27672,27718,27730,27740,27727,27722,27732,27723,27724,28785,29278,29364,29365,29582,29994,30335,31349,32593,33400,33404,33408,33405,33407,34381,35198,37017,37015,37016,37019,37012,38434,38436,38432,38435,20310,20283,20322,20297,20307,20324,20286,20327,20306,20319,20289,20312,20269,20275,20287,20321,20879,20921,21020,21022,21025,21165,21166,21257,21347,21362,21390,21391,21552,21559,21546,21588,21573,21529,21532,21541,21528,21565,21583,21569,21544,21540,21575,22254,22247,22245,22337,22341,22348,22345,22347,22354,22790,22848,22950,22936,22944,22935,22926,22946,22928,22927,22951,22945,23438,23442,23592,23594,23693,23695,23688,23691,23689,23698,23690,23686,23699,23701,24032,24074,24078,24203,24201,24204,24200,24205,24325,24349,24440,24438,24530,24529,24528,24557,24552,24558,24563,24545,24548,24547,24570,24559,24567,24571,24576,24564,25146,25219,25228,25230,25231,25236,25223,25201,25211,25210,25200,25217,25224,25207,25213,25202,25204,25911,26096,26100,26099,26098,26101,26437,26439,26457,26453,26444,26440,26461,26445,26458,26443,27600,27673,27674,27768,27751,27755,27780,27787,27791,27761,27759,27753,27802,27757,27783,27797,27804,27750,27763,27749,27771,27790,28788,28794,29283,29375,29373,29379,29382,29377,29370,29381,29589,29591,29587,29588,29586,30010,30009,30100,30101,30337,31037,32820,32917,32921,32912,32914,32924,33424,33423,33413,33422,33425,33427,33418,33411,33412,35960,36809,36799,37023,37025,37029,37022,37031,37024,38448,38440,38447,38445,20019,20376,20348,20357,20349,20352,20359,20342,20340,20361,20356,20343,20300,20375,20330,20378,20345,20353,20344,20368,20380,20372,20382,20370,20354,20373,20331,20334,20894,20924,20926,21045,21042,21043,21062,21041,21180,21258,21259,21308,21394,21396,21639,21631,21633,21649,21634,21640,21611,21626,21630,21605,21612,21620,21606,21645,21615,21601,21600,21656,21603,21607,21604,22263,22265,22383,22386,22381,22379,22385,22384,22390,22400,22389,22395,22387,22388,22370,22376,22397,22796,22853,22965,22970,22991,22990,22962,22988,22977,22966,22972,22979,22998,22961,22973,22976,22984,22964,22983,23394,23397,23443,23445,23620,23623,23726,23716,23712,23733,23727,23720,23724,23711,23715,23725,23714,23722,23719,23709,23717,23734,23728,23718,24087,24084,24089,24360,24354,24355,24356,24404,24450,24446,24445,24542,24549,24621,24614,24601,24626,24587,24628,24586,24599,24627,24602,24606,24620,24610,24589,24592,24622,24595,24593,24588,24585,24604,25108,25149,25261,25268,25297,25278,25258,25270,25290,25262,25267,25263,25275,25257,25264,25272,25917,26024,26043,26121,26108,26116,26130,26120,26107,26115,26123,26125,26117,26109,26129,26128,26358,26378,26501,26476,26510,26514,26486,26491,26520,26502,26500,26484,26509,26508,26490,26527,26513,26521,26499,26493,26497,26488,26489,26516,27429,27520,27518,27614,27677,27795,27884,27883,27886,27865,27830,27860,27821,27879,27831,27856,27842,27834,27843,27846,27885,27890,27858,27869,27828,27786,27805,27776,27870,27840,27952,27853,27847,27824,27897,27855,27881,27857,28820,28824,28805,28819,28806,28804,28817,28822,28802,28826,28803,29290,29398,29387,29400,29385,29404,29394,29396,29402,29388,29393,29604,29601,29613,29606,29602,29600,29612,29597,29917,29928,30015,30016,30014,30092,30104,30383,30451,30449,30448,30453,30712,30716,30713,30715,30714,30711,31042,31039,31173,31352,31355,31483,31861,31997,32821,32911,32942,32931,32952,32949,32941,33312,33440,33472,33451,33434,33432,33435,33461,33447,33454,33468,33438,33466,33460,33448,33441,33449,33474,33444,33475,33462,33442,34416,34415,34413,34414,35926,36818,36811,36819,36813,36822,36821,36823,37042,37044,37039,37043,37040,38457,38461,38460,38458,38467,20429,20421,20435,20402,20425,20427,20417,20436,20444,20441,20411,20403,20443,20423,20438,20410,20416,20409,20460,21060,21065,21184,21186,21309,21372,21399,21398,21401,21400,21690,21665,21677,21669,21711,21699,33549,21687,21678,21718,21686,21701,21702,21664,21616,21692,21666,21694,21618,21726,21680,22453,22430,22431,22436,22412,22423,22429,22427,22420,22424,22415,22425,22437,22426,22421,22772,22797,22867,23009,23006,23022,23040,23025,23005,23034,23037,23036,23030,23012,23026,23031,23003,23017,23027,23029,23008,23038,23028,23021,23464,23628,23760,23768,23756,23767,23755,23771,23774,23770,23753,23751,23754,23766,23763,23764,23759,23752,23750,23758,23775,23800,24057,24097,24098,24099,24096,24100,24240,24228,24226,24219,24227,24229,24327,24366,24406,24454,24631,24633,24660,24690,24670,24645,24659,24647,24649,24667,24652,24640,24642,24671,24612,24644,24664,24678,24686,25154,25155,25295,25357,25355,25333,25358,25347,25323,25337,25359,25356,25336,25334,25344,25363,25364,25338,25365,25339,25328,25921,25923,26026,26047,26166,26145,26162,26165,26140,26150,26146,26163,26155,26170,26141,26164,26169,26158,26383,26384,26561,26610,26568,26554,26588,26555,26616,26584,26560,26551,26565,26603,26596,26591,26549,26573,26547,26615,26614,26606,26595,26562,26553,26574,26599,26608,26546,26620,26566,26605,26572,26542,26598,26587,26618,26569,26570,26563,26602,26571,27432,27522,27524,27574,27606,27608,27616,27680,27681,27944,27956,27949,27935,27964,27967,27922,27914,27866,27955,27908,27929,27962,27930,27921,27904,27933,27970,27905,27928,27959,27907,27919,27968,27911,27936,27948,27912,27938,27913,27920,28855,28831,28862,28849,28848,28833,28852,28853,28841,29249,29257,29258,29292,29296,29299,29294,29386,29412,29416,29419,29407,29418,29414,29411,29573,29644,29634,29640,29637,29625,29622,29621,29620,29675,29631,29639,29630,29635,29638,29624,29643,29932,29934,29998,30023,30024,30119,30122,30329,30404,30472,30467,30468,30469,30474,30455,30459,30458,30695,30696,30726,30737,30738,30725,30736,30735,30734,30729,30723,30739,31050,31052,31051,31045,31044,31189,31181,31183,31190,31182,31360,31358,31441,31488,31489,31866,31864,31865,31871,31872,31873,32003,32008,32001,32600,32657,32653,32702,32775,32782,32783,32788,32823,32984,32967,32992,32977,32968,32962,32976,32965,32995,32985,32988,32970,32981,32969,32975,32983,32998,32973,33279,33313,33428,33497,33534,33529,33543,33512,33536,33493,33594,33515,33494,33524,33516,33505,33522,33525,33548,33531,33526,33520,33514,33508,33504,33530,33523,33517,34423,34420,34428,34419,34881,34894,34919,34922,34921,35283,35332,35335,36210,36835,36833,36846,36832,37105,37053,37055,37077,37061,37054,37063,37067,37064,37332,37331,38484,38479,38481,38483,38474,38478,20510,20485,20487,20499,20514,20528,20507,20469,20468,20531,20535,20524,20470,20471,20503,20508,20512,20519,20533,20527,20529,20494,20826,20884,20883,20938,20932,20933,20936,20942,21089,21082,21074,21086,21087,21077,21090,21197,21262,21406,21798,21730,21783,21778,21735,21747,21732,21786,21759,21764,21768,21739,21777,21765,21745,21770,21755,21751,21752,21728,21774,21763,21771,22273,22274,22476,22578,22485,22482,22458,22470,22461,22460,22456,22454,22463,22471,22480,22457,22465,22798,22858,23065,23062,23085,23086,23061,23055,23063,23050,23070,23091,23404,23463,23469,23468,23555,23638,23636,23788,23807,23790,23793,23799,23808,23801,24105,24104,24232,24238,24234,24236,24371,24368,24423,24669,24666,24679,24641,24738,24712,24704,24722,24705,24733,24707,24725,24731,24727,24711,24732,24718,25113,25158,25330,25360,25430,25388,25412,25413,25398,25411,25572,25401,25419,25418,25404,25385,25409,25396,25432,25428,25433,25389,25415,25395,25434,25425,25400,25431,25408,25416,25930,25926,26054,26051,26052,26050,26186,26207,26183,26193,26386,26387,26655,26650,26697,26674,26675,26683,26699,26703,26646,26673,26652,26677,26667,26669,26671,26702,26692,26676,26653,26642,26644,26662,26664,26670,26701,26682,26661,26656,27436,27439,27437,27441,27444,27501,32898,27528,27622,27620,27624,27619,27618,27623,27685,28026,28003,28004,28022,27917,28001,28050,27992,28002,28013,28015,28049,28045,28143,28031,28038,27998,28007,28000,28055,28016,28028,27999,28034,28056,27951,28008,28043,28030,28032,28036,27926,28035,28027,28029,28021,28048,28892,28883,28881,28893,28875,32569,28898,28887,28882,28894,28896,28884,28877,28869,28870,28871,28890,28878,28897,29250,29304,29303,29302,29440,29434,29428,29438,29430,29427,29435,29441,29651,29657,29669,29654,29628,29671,29667,29673,29660,29650,29659,29652,29661,29658,29655,29656,29672,29918,29919,29940,29941,29985,30043,30047,30128,30145,30139,30148,30144,30143,30134,30138,30346,30409,30493,30491,30480,30483,30482,30499,30481,30485,30489,30490,30498,30503,30755,30764,30754,30773,30767,30760,30766,30763,30753,30761,30771,30762,30769,31060,31067,31055,31068,31059,31058,31057,31211,31212,31200,31214,31213,31210,31196,31198,31197,31366,31369,31365,31371,31372,31370,31367,31448,31504,31492,31507,31493,31503,31496,31498,31502,31497,31506,31876,31889,31882,31884,31880,31885,31877,32030,32029,32017,32014,32024,32022,32019,32031,32018,32015,32012,32604,32609,32606,32608,32605,32603,32662,32658,32707,32706,32704,32790,32830,32825,33018,33010,33017,33013,33025,33019,33024,33281,33327,33317,33587,33581,33604,33561,33617,33573,33622,33599,33601,33574,33564,33570,33602,33614,33563,33578,33544,33596,33613,33558,33572,33568,33591,33583,33577,33607,33605,33612,33619,33566,33580,33611,33575,33608,34387,34386,34466,34472,34454,34445,34449,34462,34439,34455,34438,34443,34458,34437,34469,34457,34465,34471,34453,34456,34446,34461,34448,34452,34883,34884,34925,34933,34934,34930,34944,34929,34943,34927,34947,34942,34932,34940,35346,35911,35927,35963,36004,36003,36214,36216,36277,36279,36278,36561,36563,36862,36853,36866,36863,36859,36868,36860,36854,37078,37088,37081,37082,37091,37087,37093,37080,37083,37079,37084,37092,37200,37198,37199,37333,37346,37338,38492,38495,38588,39139,39647,39727,20095,20592,20586,20577,20574,20576,20563,20555,20573,20594,20552,20557,20545,20571,20554,20578,20501,20549,20575,20585,20587,20579,20580,20550,20544,20590,20595,20567,20561,20944,21099,21101,21100,21102,21206,21203,21293,21404,21877,21878,21820,21837,21840,21812,21802,21841,21858,21814,21813,21808,21842,21829,21772,21810,21861,21838,21817,21832,21805,21819,21824,21835,22282,22279,22523,22548,22498,22518,22492,22516,22528,22509,22525,22536,22520,22539,22515,22479,22535,22510,22499,22514,22501,22508,22497,22542,22524,22544,22503,22529,22540,22513,22505,22512,22541,22532,22876,23136,23128,23125,23143,23134,23096,23093,23149,23120,23135,23141,23148,23123,23140,23127,23107,23133,23122,23108,23131,23112,23182,23102,23117,23097,23116,23152,23145,23111,23121,23126,23106,23132,23410,23406,23489,23488,23641,23838,23819,23837,23834,23840,23820,23848,23821,23846,23845,23823,23856,23826,23843,23839,23854,24126,24116,24241,24244,24249,24242,24243,24374,24376,24475,24470,24479,24714,24720,24710,24766,24752,24762,24787,24788,24783,24804,24793,24797,24776,24753,24795,24759,24778,24767,24771,24781,24768,25394,25445,25482,25474,25469,25533,25502,25517,25501,25495,25515,25486,25455,25479,25488,25454,25519,25461,25500,25453,25518,25468,25508,25403,25503,25464,25477,25473,25489,25485,25456,25939,26061,26213,26209,26203,26201,26204,26210,26392,26745,26759,26768,26780,26733,26734,26798,26795,26966,26735,26787,26796,26793,26741,26740,26802,26767,26743,26770,26748,26731,26738,26794,26752,26737,26750,26779,26774,26763,26784,26761,26788,26744,26747,26769,26764,26762,26749,27446,27443,27447,27448,27537,27535,27533,27534,27532,27690,28096,28075,28084,28083,28276,28076,28137,28130,28087,28150,28116,28160,28104,28128,28127,28118,28094,28133,28124,28125,28123,28148,28106,28093,28141,28144,28090,28117,28098,28111,28105,28112,28146,28115,28157,28119,28109,28131,28091,28922,28941,28919,28951,28916,28940,28912,28932,28915,28944,28924,28927,28934,28947,28928,28920,28918,28939,28930,28942,29310,29307,29308,29311,29469,29463,29447,29457,29464,29450,29448,29439,29455,29470,29576,29686,29688,29685,29700,29697,29693,29703,29696,29690,29692,29695,29708,29707,29684,29704,30052,30051,30158,30162,30159,30155,30156,30161,30160,30351,30345,30419,30521,30511,30509,30513,30514,30516,30515,30525,30501,30523,30517,30792,30802,30793,30797,30794,30796,30758,30789,30800,31076,31079,31081,31082,31075,31083,31073,31163,31226,31224,31222,31223,31375,31380,31376,31541,31559,31540,31525,31536,31522,31524,31539,31512,31530,31517,31537,31531,31533,31535,31538,31544,31514,31523,31892,31896,31894,31907,32053,32061,32056,32054,32058,32069,32044,32041,32065,32071,32062,32063,32074,32059,32040,32611,32661,32668,32669,32667,32714,32715,32717,32720,32721,32711,32719,32713,32799,32798,32795,32839,32835,32840,33048,33061,33049,33051,33069,33055,33068,33054,33057,33045,33063,33053,33058,33297,33336,33331,33338,33332,33330,33396,33680,33699,33704,33677,33658,33651,33700,33652,33679,33665,33685,33689,33653,33684,33705,33661,33667,33676,33693,33691,33706,33675,33662,33701,33711,33672,33687,33712,33663,33702,33671,33710,33654,33690,34393,34390,34495,34487,34498,34497,34501,34490,34480,34504,34489,34483,34488,34508,34484,34491,34492,34499,34493,34494,34898,34953,34965,34984,34978,34986,34970,34961,34977,34975,34968,34983,34969,34971,34967,34980,34988,34956,34963,34958,35202,35286,35289,35285,35376,35367,35372,35358,35897,35899,35932,35933,35965,36005,36221,36219,36217,36284,36290,36281,36287,36289,36568,36574,36573,36572,36567,36576,36577,36900,36875,36881,36892,36876,36897,37103,37098,37104,37108,37106,37107,37076,37099,37100,37097,37206,37208,37210,37203,37205,37356,37364,37361,37363,37368,37348,37369,37354,37355,37367,37352,37358,38266,38278,38280,38524,38509,38507,38513,38511,38591,38762,38916,39141,39319,20635,20629,20628,20638,20619,20643,20611,20620,20622,20637,20584,20636,20626,20610,20615,20831,20948,21266,21265,21412,21415,21905,21928,21925,21933,21879,22085,21922,21907,21896,21903,21941,21889,21923,21906,21924,21885,21900,21926,21887,21909,21921,21902,22284,22569,22583,22553,22558,22567,22563,22568,22517,22600,22565,22556,22555,22579,22591,22582,22574,22585,22584,22573,22572,22587,22881,23215,23188,23199,23162,23202,23198,23160,23206,23164,23205,23212,23189,23214,23095,23172,23178,23191,23171,23179,23209,23163,23165,23180,23196,23183,23187,23197,23530,23501,23499,23508,23505,23498,23502,23564,23600,23863,23875,23915,23873,23883,23871,23861,23889,23886,23893,23859,23866,23890,23869,23857,23897,23874,23865,23881,23864,23868,23858,23862,23872,23877,24132,24129,24408,24486,24485,24491,24777,24761,24780,24802,24782,24772,24852,24818,24842,24854,24837,24821,24851,24824,24828,24830,24769,24835,24856,24861,24848,24831,24836,24843,25162,25492,25521,25520,25550,25573,25576,25583,25539,25757,25587,25546,25568,25590,25557,25586,25589,25697,25567,25534,25565,25564,25540,25560,25555,25538,25543,25548,25547,25544,25584,25559,25561,25906,25959,25962,25956,25948,25960,25957,25996,26013,26014,26030,26064,26066,26236,26220,26235,26240,26225,26233,26218,26226,26369,26892,26835,26884,26844,26922,26860,26858,26865,26895,26838,26871,26859,26852,26870,26899,26896,26867,26849,26887,26828,26888,26992,26804,26897,26863,26822,26900,26872,26832,26877,26876,26856,26891,26890,26903,26830,26824,26845,26846,26854,26868,26833,26886,26836,26857,26901,26917,26823,27449,27451,27455,27452,27540,27543,27545,27541,27581,27632,27634,27635,27696,28156,28230,28231,28191,28233,28296,28220,28221,28229,28258,28203,28223,28225,28253,28275,28188,28211,28235,28224,28241,28219,28163,28206,28254,28264,28252,28257,28209,28200,28256,28273,28267,28217,28194,28208,28243,28261,28199,28280,28260,28279,28245,28281,28242,28262,28213,28214,28250,28960,28958,28975,28923,28974,28977,28963,28965,28962,28978,28959,28968,28986,28955,29259,29274,29320,29321,29318,29317,29323,29458,29451,29488,29474,29489,29491,29479,29490,29485,29478,29475,29493,29452,29742,29740,29744,29739,29718,29722,29729,29741,29745,29732,29731,29725,29737,29728,29746,29947,29999,30063,30060,30183,30170,30177,30182,30173,30175,30180,30167,30357,30354,30426,30534,30535,30532,30541,30533,30538,30542,30539,30540,30686,30700,30816,30820,30821,30812,30829,30833,30826,30830,30832,30825,30824,30814,30818,31092,31091,31090,31088,31234,31242,31235,31244,31236,31385,31462,31460,31562,31547,31556,31560,31564,31566,31552,31576,31557,31906,31902,31912,31905,32088,32111,32099,32083,32086,32103,32106,32079,32109,32092,32107,32082,32084,32105,32081,32095,32078,32574,32575,32613,32614,32674,32672,32673,32727,32849,32847,32848,33022,32980,33091,33098,33106,33103,33095,33085,33101,33082,33254,33262,33271,33272,33273,33284,33340,33341,33343,33397,33595,33743,33785,33827,33728,33768,33810,33767,33764,33788,33782,33808,33734,33736,33771,33763,33727,33793,33757,33765,33752,33791,33761,33739,33742,33750,33781,33737,33801,33807,33758,33809,33798,33730,33779,33749,33786,33735,33745,33770,33811,33731,33772,33774,33732,33787,33751,33762,33819,33755,33790,34520,34530,34534,34515,34531,34522,34538,34525,34539,34524,34540,34537,34519,34536,34513,34888,34902,34901,35002,35031,35001,35000,35008,35006,34998,35004,34999,35005,34994,35073,35017,35221,35224,35223,35293,35290,35291,35406,35405,35385,35417,35392,35415,35416,35396,35397,35410,35400,35409,35402,35404,35407,35935,35969,35968,36026,36030,36016,36025,36021,36228,36224,36233,36312,36307,36301,36295,36310,36316,36303,36309,36313,36296,36311,36293,36591,36599,36602,36601,36582,36590,36581,36597,36583,36584,36598,36587,36593,36588,36596,36585,36909,36916,36911,37126,37164,37124,37119,37116,37128,37113,37115,37121,37120,37127,37125,37123,37217,37220,37215,37218,37216,37377,37386,37413,37379,37402,37414,37391,37388,37376,37394,37375,37373,37382,37380,37415,37378,37404,37412,37401,37399,37381,37398,38267,38285,38284,38288,38535,38526,38536,38537,38531,38528,38594,38600,38595,38641,38640,38764,38768,38766,38919,39081,39147,40166,40697,20099,20100,20150,20669,20671,20678,20654,20676,20682,20660,20680,20674,20656,20673,20666,20657,20683,20681,20662,20664,20951,21114,21112,21115,21116,21955,21979,21964,21968,21963,21962,21981,21952,21972,21956,21993,21951,21970,21901,21967,21973,21986,21974,21960,22002,21965,21977,21954,22292,22611,22632,22628,22607,22605,22601,22639,22613,22606,22621,22617,22629,22619,22589,22627,22641,22780,23239,23236,23243,23226,23224,23217,23221,23216,23231,23240,23227,23238,23223,23232,23242,23220,23222,23245,23225,23184,23510,23512,23513,23583,23603,23921,23907,23882,23909,23922,23916,23902,23912,23911,23906,24048,24143,24142,24138,24141,24139,24261,24268,24262,24267,24263,24384,24495,24493,24823,24905,24906,24875,24901,24886,24882,24878,24902,24879,24911,24873,24896,25120,37224,25123,25125,25124,25541,25585,25579,25616,25618,25609,25632,25636,25651,25667,25631,25621,25624,25657,25655,25634,25635,25612,25638,25648,25640,25665,25653,25647,25610,25626,25664,25637,25639,25611,25575,25627,25646,25633,25614,25967,26002,26067,26246,26252,26261,26256,26251,26250,26265,26260,26232,26400,26982,26975,26936,26958,26978,26993,26943,26949,26986,26937,26946,26967,26969,27002,26952,26953,26933,26988,26931,26941,26981,26864,27000,26932,26985,26944,26991,26948,26998,26968,26945,26996,26956,26939,26955,26935,26972,26959,26961,26930,26962,26927,27003,26940,27462,27461,27459,27458,27464,27457,27547,64013,27643,27644,27641,27639,27640,28315,28374,28360,28303,28352,28319,28307,28308,28320,28337,28345,28358,28370,28349,28353,28318,28361,28343,28336,28365,28326,28367,28338,28350,28355,28380,28376,28313,28306,28302,28301,28324,28321,28351,28339,28368,28362,28311,28334,28323,28999,29012,29010,29027,29024,28993,29021,29026,29042,29048,29034,29025,28994,29016,28995,29003,29040,29023,29008,29011,28996,29005,29018,29263,29325,29324,29329,29328,29326,29500,29506,29499,29498,29504,29514,29513,29764,29770,29771,29778,29777,29783,29760,29775,29776,29774,29762,29766,29773,29780,29921,29951,29950,29949,29981,30073,30071,27011,30191,30223,30211,30199,30206,30204,30201,30200,30224,30203,30198,30189,30197,30205,30361,30389,30429,30549,30559,30560,30546,30550,30554,30569,30567,30548,30553,30573,30688,30855,30874,30868,30863,30852,30869,30853,30854,30881,30851,30841,30873,30848,30870,30843,31100,31106,31101,31097,31249,31256,31257,31250,31255,31253,31266,31251,31259,31248,31395,31394,31390,31467,31590,31588,31597,31604,31593,31602,31589,31603,31601,31600,31585,31608,31606,31587,31922,31924,31919,32136,32134,32128,32141,32127,32133,32122,32142,32123,32131,32124,32140,32148,32132,32125,32146,32621,32619,32615,32616,32620,32678,32677,32679,32731,32732,32801,33124,33120,33143,33116,33129,33115,33122,33138,26401,33118,33142,33127,33135,33092,33121,33309,33353,33348,33344,33346,33349,34033,33855,33878,33910,33913,33935,33933,33893,33873,33856,33926,33895,33840,33869,33917,33882,33881,33908,33907,33885,34055,33886,33847,33850,33844,33914,33859,33912,33842,33861,33833,33753,33867,33839,33858,33837,33887,33904,33849,33870,33868,33874,33903,33989,33934,33851,33863,33846,33843,33896,33918,33860,33835,33888,33876,33902,33872,34571,34564,34551,34572,34554,34518,34549,34637,34552,34574,34569,34561,34550,34573,34565,35030,35019,35021,35022,35038,35035,35034,35020,35024,35205,35227,35295,35301,35300,35297,35296,35298,35292,35302,35446,35462,35455,35425,35391,35447,35458,35460,35445,35459,35457,35444,35450,35900,35915,35914,35941,35940,35942,35974,35972,35973,36044,36200,36201,36241,36236,36238,36239,36237,36243,36244,36240,36242,36336,36320,36332,36337,36334,36304,36329,36323,36322,36327,36338,36331,36340,36614,36607,36609,36608,36613,36615,36616,36610,36619,36946,36927,36932,36937,36925,37136,37133,37135,37137,37142,37140,37131,37134,37230,37231,37448,37458,37424,37434,37478,37427,37477,37470,37507,37422,37450,37446,37485,37484,37455,37472,37479,37487,37430,37473,37488,37425,37460,37475,37456,37490,37454,37459,37452,37462,37426,38303,38300,38302,38299,38546,38547,38545,38551,38606,38650,38653,38648,38645,38771,38775,38776,38770,38927,38925,38926,39084,39158,39161,39343,39346,39344,39349,39597,39595,39771,40170,40173,40167,40576,40701,20710,20692,20695,20712,20723,20699,20714,20701,20708,20691,20716,20720,20719,20707,20704,20952,21120,21121,21225,21227,21296,21420,22055,22037,22028,22034,22012,22031,22044,22017,22035,22018,22010,22045,22020,22015,22009,22665,22652,22672,22680,22662,22657,22655,22644,22667,22650,22663,22673,22670,22646,22658,22664,22651,22676,22671,22782,22891,23260,23278,23269,23253,23274,23258,23277,23275,23283,23266,23264,23259,23276,23262,23261,23257,23272,23263,23415,23520,23523,23651,23938,23936,23933,23942,23930,23937,23927,23946,23945,23944,23934,23932,23949,23929,23935,24152,24153,24147,24280,24273,24279,24270,24284,24277,24281,24274,24276,24388,24387,24431,24502,24876,24872,24897,24926,24945,24947,24914,24915,24946,24940,24960,24948,24916,24954,24923,24933,24891,24938,24929,24918,25129,25127,25131,25643,25677,25691,25693,25716,25718,25714,25715,25725,25717,25702,25766,25678,25730,25694,25692,25675,25683,25696,25680,25727,25663,25708,25707,25689,25701,25719,25971,26016,26273,26272,26271,26373,26372,26402,27057,27062,27081,27040,27086,27030,27056,27052,27068,27025,27033,27022,27047,27021,27049,27070,27055,27071,27076,27069,27044,27092,27065,27082,27034,27087,27059,27027,27050,27041,27038,27097,27031,27024,27074,27061,27045,27078,27466,27469,27467,27550,27551,27552,27587,27588,27646,28366,28405,28401,28419,28453,28408,28471,28411,28462,28425,28494,28441,28442,28455,28440,28475,28434,28397,28426,28470,28531,28409,28398,28461,28480,28464,28476,28469,28395,28423,28430,28483,28421,28413,28406,28473,28444,28412,28474,28447,28429,28446,28424,28449,29063,29072,29065,29056,29061,29058,29071,29051,29062,29057,29079,29252,29267,29335,29333,29331,29507,29517,29521,29516,29794,29811,29809,29813,29810,29799,29806,29952,29954,29955,30077,30096,30230,30216,30220,30229,30225,30218,30228,30392,30593,30588,30597,30594,30574,30592,30575,30590,30595,30898,30890,30900,30893,30888,30846,30891,30878,30885,30880,30892,30882,30884,31128,31114,31115,31126,31125,31124,31123,31127,31112,31122,31120,31275,31306,31280,31279,31272,31270,31400,31403,31404,31470,31624,31644,31626,31633,31632,31638,31629,31628,31643,31630,31621,31640,21124,31641,31652,31618,31931,31935,31932,31930,32167,32183,32194,32163,32170,32193,32192,32197,32157,32206,32196,32198,32203,32204,32175,32185,32150,32188,32159,32166,32174,32169,32161,32201,32627,32738,32739,32741,32734,32804,32861,32860,33161,33158,33155,33159,33165,33164,33163,33301,33943,33956,33953,33951,33978,33998,33986,33964,33966,33963,33977,33972,33985,33997,33962,33946,33969,34000,33949,33959,33979,33954,33940,33991,33996,33947,33961,33967,33960,34006,33944,33974,33999,33952,34007,34004,34002,34011,33968,33937,34401,34611,34595,34600,34667,34624,34606,34590,34593,34585,34587,34627,34604,34625,34622,34630,34592,34610,34602,34605,34620,34578,34618,34609,34613,34626,34598,34599,34616,34596,34586,34608,34577,35063,35047,35057,35058,35066,35070,35054,35068,35062,35067,35056,35052,35051,35229,35233,35231,35230,35305,35307,35304,35499,35481,35467,35474,35471,35478,35901,35944,35945,36053,36047,36055,36246,36361,36354,36351,36365,36349,36362,36355,36359,36358,36357,36350,36352,36356,36624,36625,36622,36621,37155,37148,37152,37154,37151,37149,37146,37156,37153,37147,37242,37234,37241,37235,37541,37540,37494,37531,37498,37536,37524,37546,37517,37542,37530,37547,37497,37527,37503,37539,37614,37518,37506,37525,37538,37501,37512,37537,37514,37510,37516,37529,37543,37502,37511,37545,37533,37515,37421,38558,38561,38655,38744,38781,38778,38782,38787,38784,38786,38779,38788,38785,38783,38862,38861,38934,39085,39086,39170,39168,39175,39325,39324,39363,39353,39355,39354,39362,39357,39367,39601,39651,39655,39742,39743,39776,39777,39775,40177,40178,40181,40615,20735,20739,20784,20728,20742,20743,20726,20734,20747,20748,20733,20746,21131,21132,21233,21231,22088,22082,22092,22069,22081,22090,22089,22086,22104,22106,22080,22067,22077,22060,22078,22072,22058,22074,22298,22699,22685,22705,22688,22691,22703,22700,22693,22689,22783,23295,23284,23293,23287,23286,23299,23288,23298,23289,23297,23303,23301,23311,23655,23961,23959,23967,23954,23970,23955,23957,23968,23964,23969,23962,23966,24169,24157,24160,24156,32243,24283,24286,24289,24393,24498,24971,24963,24953,25009,25008,24994,24969,24987,24979,25007,25005,24991,24978,25002,24993,24973,24934,25011,25133,25710,25712,25750,25760,25733,25751,25756,25743,25739,25738,25740,25763,25759,25704,25777,25752,25974,25978,25977,25979,26034,26035,26293,26288,26281,26290,26295,26282,26287,27136,27142,27159,27109,27128,27157,27121,27108,27168,27135,27116,27106,27163,27165,27134,27175,27122,27118,27156,27127,27111,27200,27144,27110,27131,27149,27132,27115,27145,27140,27160,27173,27151,27126,27174,27143,27124,27158,27473,27557,27555,27554,27558,27649,27648,27647,27650,28481,28454,28542,28551,28614,28562,28557,28553,28556,28514,28495,28549,28506,28566,28534,28524,28546,28501,28530,28498,28496,28503,28564,28563,28509,28416,28513,28523,28541,28519,28560,28499,28555,28521,28543,28565,28515,28535,28522,28539,29106,29103,29083,29104,29088,29082,29097,29109,29085,29093,29086,29092,29089,29098,29084,29095,29107,29336,29338,29528,29522,29534,29535,29536,29533,29531,29537,29530,29529,29538,29831,29833,29834,29830,29825,29821,29829,29832,29820,29817,29960,29959,30078,30245,30238,30233,30237,30236,30243,30234,30248,30235,30364,30365,30366,30363,30605,30607,30601,30600,30925,30907,30927,30924,30929,30926,30932,30920,30915,30916,30921,31130,31137,31136,31132,31138,31131,27510,31289,31410,31412,31411,31671,31691,31678,31660,31694,31663,31673,31690,31669,31941,31944,31948,31947,32247,32219,32234,32231,32215,32225,32259,32250,32230,32246,32241,32240,32238,32223,32630,32684,32688,32685,32749,32747,32746,32748,32742,32744,32868,32871,33187,33183,33182,33173,33186,33177,33175,33302,33359,33363,33362,33360,33358,33361,34084,34107,34063,34048,34089,34062,34057,34061,34079,34058,34087,34076,34043,34091,34042,34056,34060,34036,34090,34034,34069,34039,34027,34035,34044,34066,34026,34025,34070,34046,34088,34077,34094,34050,34045,34078,34038,34097,34086,34023,34024,34032,34031,34041,34072,34080,34096,34059,34073,34095,34402,34646,34659,34660,34679,34785,34675,34648,34644,34651,34642,34657,34650,34641,34654,34669,34666,34640,34638,34655,34653,34671,34668,34682,34670,34652,34661,34639,34683,34677,34658,34663,34665,34906,35077,35084,35092,35083,35095,35096,35097,35078,35094,35089,35086,35081,35234,35236,35235,35309,35312,35308,35535,35526,35512,35539,35537,35540,35541,35515,35543,35518,35520,35525,35544,35523,35514,35517,35545,35902,35917,35983,36069,36063,36057,36072,36058,36061,36071,36256,36252,36257,36251,36384,36387,36389,36388,36398,36373,36379,36374,36369,36377,36390,36391,36372,36370,36376,36371,36380,36375,36378,36652,36644,36632,36634,36640,36643,36630,36631,36979,36976,36975,36967,36971,37167,37163,37161,37162,37170,37158,37166,37253,37254,37258,37249,37250,37252,37248,37584,37571,37572,37568,37593,37558,37583,37617,37599,37592,37609,37591,37597,37580,37615,37570,37608,37578,37576,37582,37606,37581,37589,37577,37600,37598,37607,37585,37587,37557,37601,37574,37556,38268,38316,38315,38318,38320,38564,38562,38611,38661,38664,38658,38746,38794,38798,38792,38864,38863,38942,38941,38950,38953,38952,38944,38939,38951,39090,39176,39162,39185,39188,39190,39191,39189,39388,39373,39375,39379,39380,39374,39369,39382,39384,39371,39383,39372,39603,39660,39659,39667,39666,39665,39750,39747,39783,39796,39793,39782,39798,39797,39792,39784,39780,39788,40188,40186,40189,40191,40183,40199,40192,40185,40187,40200,40197,40196,40579,40659,40719,40720,20764,20755,20759,20762,20753,20958,21300,21473,22128,22112,22126,22131,22118,22115,22125,22130,22110,22135,22300,22299,22728,22717,22729,22719,22714,22722,22716,22726,23319,23321,23323,23329,23316,23315,23312,23318,23336,23322,23328,23326,23535,23980,23985,23977,23975,23989,23984,23982,23978,23976,23986,23981,23983,23988,24167,24168,24166,24175,24297,24295,24294,24296,24293,24395,24508,24989,25000,24982,25029,25012,25030,25025,25036,25018,25023,25016,24972,25815,25814,25808,25807,25801,25789,25737,25795,25819,25843,25817,25907,25983,25980,26018,26312,26302,26304,26314,26315,26319,26301,26299,26298,26316,26403,27188,27238,27209,27239,27186,27240,27198,27229,27245,27254,27227,27217,27176,27226,27195,27199,27201,27242,27236,27216,27215,27220,27247,27241,27232,27196,27230,27222,27221,27213,27214,27206,27477,27476,27478,27559,27562,27563,27592,27591,27652,27651,27654,28589,28619,28579,28615,28604,28622,28616,28510,28612,28605,28574,28618,28584,28676,28581,28590,28602,28588,28586,28623,28607,28600,28578,28617,28587,28621,28591,28594,28592,29125,29122,29119,29112,29142,29120,29121,29131,29140,29130,29127,29135,29117,29144,29116,29126,29146,29147,29341,29342,29545,29542,29543,29548,29541,29547,29546,29823,29850,29856,29844,29842,29845,29857,29963,30080,30255,30253,30257,30269,30259,30268,30261,30258,30256,30395,30438,30618,30621,30625,30620,30619,30626,30627,30613,30617,30615,30941,30953,30949,30954,30942,30947,30939,30945,30946,30957,30943,30944,31140,31300,31304,31303,31414,31416,31413,31409,31415,31710,31715,31719,31709,31701,31717,31706,31720,31737,31700,31722,31714,31708,31723,31704,31711,31954,31956,31959,31952,31953,32274,32289,32279,32268,32287,32288,32275,32270,32284,32277,32282,32290,32267,32271,32278,32269,32276,32293,32292,32579,32635,32636,32634,32689,32751,32810,32809,32876,33201,33190,33198,33209,33205,33195,33200,33196,33204,33202,33207,33191,33266,33365,33366,33367,34134,34117,34155,34125,34131,34145,34136,34112,34118,34148,34113,34146,34116,34129,34119,34147,34110,34139,34161,34126,34158,34165,34133,34151,34144,34188,34150,34141,34132,34149,34156,34403,34405,34404,34715,34703,34711,34707,34706,34696,34689,34710,34712,34681,34695,34723,34693,34704,34705,34717,34692,34708,34716,34714,34697,35102,35110,35120,35117,35118,35111,35121,35106,35113,35107,35119,35116,35103,35313,35552,35554,35570,35572,35573,35549,35604,35556,35551,35568,35528,35550,35553,35560,35583,35567,35579,35985,35986,35984,36085,36078,36081,36080,36083,36204,36206,36261,36263,36403,36414,36408,36416,36421,36406,36412,36413,36417,36400,36415,36541,36662,36654,36661,36658,36665,36663,36660,36982,36985,36987,36998,37114,37171,37173,37174,37267,37264,37265,37261,37263,37671,37662,37640,37663,37638,37647,37754,37688,37692,37659,37667,37650,37633,37702,37677,37646,37645,37579,37661,37626,37669,37651,37625,37623,37684,37634,37668,37631,37673,37689,37685,37674,37652,37644,37643,37630,37641,37632,37627,37654,38332,38349,38334,38329,38330,38326,38335,38325,38333,38569,38612,38667,38674,38672,38809,38807,38804,38896,38904,38965,38959,38962,39204,39199,39207,39209,39326,39406,39404,39397,39396,39408,39395,39402,39401,39399,39609,39615,39604,39611,39670,39674,39673,39671,39731,39808,39813,39815,39804,39806,39803,39810,39827,39826,39824,39802,39829,39805,39816,40229,40215,40224,40222,40212,40233,40221,40216,40226,40208,40217,40223,40584,40582,40583,40622,40621,40661,40662,40698,40722,40765,20774,20773,20770,20772,20768,20777,21236,22163,22156,22157,22150,22148,22147,22142,22146,22143,22145,22742,22740,22735,22738,23341,23333,23346,23331,23340,23335,23334,23343,23342,23419,23537,23538,23991,24172,24170,24510,24507,25027,25013,25020,25063,25056,25061,25060,25064,25054,25839,25833,25827,25835,25828,25832,25985,25984,26038,26074,26322,27277,27286,27265,27301,27273,27295,27291,27297,27294,27271,27283,27278,27285,27267,27304,27300,27281,27263,27302,27290,27269,27276,27282,27483,27565,27657,28620,28585,28660,28628,28643,28636,28653,28647,28646,28638,28658,28637,28642,28648,29153,29169,29160,29170,29156,29168,29154,29555,29550,29551,29847,29874,29867,29840,29866,29869,29873,29861,29871,29968,29969,29970,29967,30084,30275,30280,30281,30279,30372,30441,30645,30635,30642,30647,30646,30644,30641,30632,30704,30963,30973,30978,30971,30972,30962,30981,30969,30974,30980,31147,31144,31324,31323,31318,31320,31316,31322,31422,31424,31425,31749,31759,31730,31744,31743,31739,31758,31732,31755,31731,31746,31753,31747,31745,31736,31741,31750,31728,31729,31760,31754,31976,32301,32316,32322,32307,38984,32312,32298,32329,32320,32327,32297,32332,32304,32315,32310,32324,32314,32581,32639,32638,32637,32756,32754,32812,33211,33220,33228,33226,33221,33223,33212,33257,33371,33370,33372,34179,34176,34191,34215,34197,34208,34187,34211,34171,34212,34202,34206,34167,34172,34185,34209,34170,34168,34135,34190,34198,34182,34189,34201,34205,34177,34210,34178,34184,34181,34169,34166,34200,34192,34207,34408,34750,34730,34733,34757,34736,34732,34745,34741,34748,34734,34761,34755,34754,34764,34743,34735,34756,34762,34740,34742,34751,34744,34749,34782,34738,35125,35123,35132,35134,35137,35154,35127,35138,35245,35247,35246,35314,35315,35614,35608,35606,35601,35589,35595,35618,35599,35602,35605,35591,35597,35592,35590,35612,35603,35610,35919,35952,35954,35953,35951,35989,35988,36089,36207,36430,36429,36435,36432,36428,36423,36675,36672,36997,36990,37176,37274,37282,37275,37273,37279,37281,37277,37280,37793,37763,37807,37732,37718,37703,37756,37720,37724,37750,37705,37712,37713,37728,37741,37775,37708,37738,37753,37719,37717,37714,37711,37745,37751,37755,37729,37726,37731,37735,37760,37710,37721,38343,38336,38345,38339,38341,38327,38574,38576,38572,38688,38687,38680,38685,38681,38810,38817,38812,38814,38813,38869,38868,38897,38977,38980,38986,38985,38981,38979,39205,39211,39212,39210,39219,39218,39215,39213,39217,39216,39320,39331,39329,39426,39418,39412,39415,39417,39416,39414,39419,39421,39422,39420,39427,39614,39678,39677,39681,39676,39752,39834,39848,39838,39835,39846,39841,39845,39844,39814,39842,39840,39855,40243,40257,40295,40246,40238,40239,40241,40248,40240,40261,40258,40259,40254,40247,40256,40253,32757,40237,40586,40585,40589,40624,40648,40666,40699,40703,40740,40739,40738,40788,40864,20785,20781,20782,22168,22172,22167,22170,22173,22169,22896,23356,23657,23658,24000,24173,24174,25048,25055,25069,25070,25073,25066,25072,25067,25046,25065,25855,25860,25853,25848,25857,25859,25852,26004,26075,26330,26331,26328,27333,27321,27325,27361,27334,27322,27318,27319,27335,27316,27309,27486,27593,27659,28679,28684,28685,28673,28677,28692,28686,28671,28672,28667,28710,28668,28663,28682,29185,29183,29177,29187,29181,29558,29880,29888,29877,29889,29886,29878,29883,29890,29972,29971,30300,30308,30297,30288,30291,30295,30298,30374,30397,30444,30658,30650,30975,30988,30995,30996,30985,30992,30994,30993,31149,31148,31327,31772,31785,31769,31776,31775,31789,31773,31782,31784,31778,31781,31792,32348,32336,32342,32355,32344,32354,32351,32337,32352,32343,32339,32693,32691,32759,32760,32885,33233,33234,33232,33375,33374,34228,34246,34240,34243,34242,34227,34229,34237,34247,34244,34239,34251,34254,34248,34245,34225,34230,34258,34340,34232,34231,34238,34409,34791,34790,34786,34779,34795,34794,34789,34783,34803,34788,34772,34780,34771,34797,34776,34787,34724,34775,34777,34817,34804,34792,34781,35155,35147,35151,35148,35142,35152,35153,35145,35626,35623,35619,35635,35632,35637,35655,35631,35644,35646,35633,35621,35639,35622,35638,35630,35620,35643,35645,35642,35906,35957,35993,35992,35991,36094,36100,36098,36096,36444,36450,36448,36439,36438,36446,36453,36455,36443,36442,36449,36445,36457,36436,36678,36679,36680,36683,37160,37178,37179,37182,37288,37285,37287,37295,37290,37813,37772,37778,37815,37787,37789,37769,37799,37774,37802,37790,37798,37781,37768,37785,37791,37773,37809,37777,37810,37796,37800,37812,37795,37797,38354,38355,38353,38579,38615,38618,24002,38623,38616,38621,38691,38690,38693,38828,38830,38824,38827,38820,38826,38818,38821,38871,38873,38870,38872,38906,38992,38993,38994,39096,39233,39228,39226,39439,39435,39433,39437,39428,39441,39434,39429,39431,39430,39616,39644,39688,39684,39685,39721,39733,39754,39756,39755,39879,39878,39875,39871,39873,39861,39864,39891,39862,39876,39865,39869,40284,40275,40271,40266,40283,40267,40281,40278,40268,40279,40274,40276,40287,40280,40282,40590,40588,40671,40705,40704,40726,40741,40747,40746,40745,40744,40780,40789,20788,20789,21142,21239,21428,22187,22189,22182,22183,22186,22188,22746,22749,22747,22802,23357,23358,23359,24003,24176,24511,25083,25863,25872,25869,25865,25868,25870,25988,26078,26077,26334,27367,27360,27340,27345,27353,27339,27359,27356,27344,27371,27343,27341,27358,27488,27568,27660,28697,28711,28704,28694,28715,28705,28706,28707,28713,28695,28708,28700,28714,29196,29194,29191,29186,29189,29349,29350,29348,29347,29345,29899,29893,29879,29891,29974,30304,30665,30666,30660,30705,31005,31003,31009,31004,30999,31006,31152,31335,31336,31795,31804,31801,31788,31803,31980,31978,32374,32373,32376,32368,32375,32367,32378,32370,32372,32360,32587,32586,32643,32646,32695,32765,32766,32888,33239,33237,33380,33377,33379,34283,34289,34285,34265,34273,34280,34266,34263,34284,34290,34296,34264,34271,34275,34268,34257,34288,34278,34287,34270,34274,34816,34810,34819,34806,34807,34825,34828,34827,34822,34812,34824,34815,34826,34818,35170,35162,35163,35159,35169,35164,35160,35165,35161,35208,35255,35254,35318,35664,35656,35658,35648,35667,35670,35668,35659,35669,35665,35650,35666,35671,35907,35959,35958,35994,36102,36103,36105,36268,36266,36269,36267,36461,36472,36467,36458,36463,36475,36546,36690,36689,36687,36688,36691,36788,37184,37183,37296,37293,37854,37831,37839,37826,37850,37840,37881,37868,37836,37849,37801,37862,37834,37844,37870,37859,37845,37828,37838,37824,37842,37863,38269,38362,38363,38625,38697,38699,38700,38696,38694,38835,38839,38838,38877,38878,38879,39004,39001,39005,38999,39103,39101,39099,39102,39240,39239,39235,39334,39335,39450,39445,39461,39453,39460,39451,39458,39456,39463,39459,39454,39452,39444,39618,39691,39690,39694,39692,39735,39914,39915,39904,39902,39908,39910,39906,39920,39892,39895,39916,39900,39897,39909,39893,39905,39898,40311,40321,40330,40324,40328,40305,40320,40312,40326,40331,40332,40317,40299,40308,40309,40304,40297,40325,40307,40315,40322,40303,40313,40319,40327,40296,40596,40593,40640,40700,40749,40768,40769,40781,40790,40791,40792,21303,22194,22197,22195,22755,23365,24006,24007,24302,24303,24512,24513,25081,25879,25878,25877,25875,26079,26344,26339,26340,27379,27376,27370,27368,27385,27377,27374,27375,28732,28725,28719,28727,28724,28721,28738,28728,28735,28730,28729,28736,28731,28723,28737,29203,29204,29352,29565,29564,29882,30379,30378,30398,30445,30668,30670,30671,30669,30706,31013,31011,31015,31016,31012,31017,31154,31342,31340,31341,31479,31817,31816,31818,31815,31813,31982,32379,32382,32385,32384,32698,32767,32889,33243,33241,33291,33384,33385,34338,34303,34305,34302,34331,34304,34294,34308,34313,34309,34316,34301,34841,34832,34833,34839,34835,34838,35171,35174,35257,35319,35680,35690,35677,35688,35683,35685,35687,35693,36270,36486,36488,36484,36697,36694,36695,36693,36696,36698,37005,37187,37185,37303,37301,37298,37299,37899,37907,37883,37920,37903,37908,37886,37909,37904,37928,37913,37901,37877,37888,37879,37895,37902,37910,37906,37882,37897,37880,37898,37887,37884,37900,37878,37905,37894,38366,38368,38367,38702,38703,38841,38843,38909,38910,39008,39010,39011,39007,39105,39106,39248,39246,39257,39244,39243,39251,39474,39476,39473,39468,39466,39478,39465,39470,39480,39469,39623,39626,39622,39696,39698,39697,39947,39944,39927,39941,39954,39928,40000,39943,39950,39942,39959,39956,39945,40351,40345,40356,40349,40338,40344,40336,40347,40352,40340,40348,40362,40343,40353,40346,40354,40360,40350,40355,40383,40361,40342,40358,40359,40601,40603,40602,40677,40676,40679,40678,40752,40750,40795,40800,40798,40797,40793,40849,20794,20793,21144,21143,22211,22205,22206,23368,23367,24011,24015,24305,25085,25883,27394,27388,27395,27384,27392,28739,28740,28746,28744,28745,28741,28742,29213,29210,29209,29566,29975,30314,30672,31021,31025,31023,31828,31827,31986,32394,32391,32392,32395,32390,32397,32589,32699,32816,33245,34328,34346,34342,34335,34339,34332,34329,34343,34350,34337,34336,34345,34334,34341,34857,34845,34843,34848,34852,34844,34859,34890,35181,35177,35182,35179,35322,35705,35704,35653,35706,35707,36112,36116,36271,36494,36492,36702,36699,36701,37190,37188,37189,37305,37951,37947,37942,37929,37949,37948,37936,37945,37930,37943,37932,37952,37937,38373,38372,38371,38709,38714,38847,38881,39012,39113,39110,39104,39256,39254,39481,39485,39494,39492,39490,39489,39482,39487,39629,39701,39703,39704,39702,39738,39762,39979,39965,39964,39980,39971,39976,39977,39972,39969,40375,40374,40380,40385,40391,40394,40399,40382,40389,40387,40379,40373,40398,40377,40378,40364,40392,40369,40365,40396,40371,40397,40370,40570,40604,40683,40686,40685,40731,40728,40730,40753,40782,40805,40804,40850,20153,22214,22213,22219,22897,23371,23372,24021,24017,24306,25889,25888,25894,25890,27403,27400,27401,27661,28757,28758,28759,28754,29214,29215,29353,29567,29912,29909,29913,29911,30317,30381,31029,31156,31344,31345,31831,31836,31833,31835,31834,31988,31985,32401,32591,32647,33246,33387,34356,34357,34355,34348,34354,34358,34860,34856,34854,34858,34853,35185,35263,35262,35323,35710,35716,35714,35718,35717,35711,36117,36501,36500,36506,36498,36496,36502,36503,36704,36706,37191,37964,37968,37962,37963,37967,37959,37957,37960,37961,37958,38719,38883,39018,39017,39115,39252,39259,39502,39507,39508,39500,39503,39496,39498,39497,39506,39504,39632,39705,39723,39739,39766,39765,40006,40008,39999,40004,39993,39987,40001,39996,39991,39988,39986,39997,39990,40411,40402,40414,40410,40395,40400,40412,40401,40415,40425,40409,40408,40406,40437,40405,40413,40630,40688,40757,40755,40754,40770,40811,40853,40866,20797,21145,22760,22759,22898,23373,24024,34863,24399,25089,25091,25092,25897,25893,26006,26347,27409,27410,27407,27594,28763,28762,29218,29570,29569,29571,30320,30676,31847,31846,32405,33388,34362,34368,34361,34364,34353,34363,34366,34864,34866,34862,34867,35190,35188,35187,35326,35724,35726,35723,35720,35909,36121,36504,36708,36707,37308,37986,37973,37981,37975,37982,38852,38853,38912,39510,39513,39710,39711,39712,40018,40024,40016,40010,40013,40011,40021,40025,40012,40014,40443,40439,40431,40419,40427,40440,40420,40438,40417,40430,40422,40434,40432,40418,40428,40436,40435,40424,40429,40642,40656,40690,40691,40710,40732,40760,40759,40758,40771,40783,40817,40816,40814,40815,22227,22221,23374,23661,25901,26349,26350,27411,28767,28769,28765,28768,29219,29915,29925,30677,31032,31159,31158,31850,32407,32649,33389,34371,34872,34871,34869,34891,35732,35733,36510,36511,36512,36509,37310,37309,37314,37995,37992,37993,38629,38726,38723,38727,38855,38885,39518,39637,39769,40035,40039,40038,40034,40030,40032,40450,40446,40455,40451,40454,40453,40448,40449,40457,40447,40445,40452,40608,40734,40774,40820,40821,40822,22228,25902,26040,27416,27417,27415,27418,28770,29222,29354,30680,30681,31033,31849,31851,31990,32410,32408,32411,32409,33248,33249,34374,34375,34376,35193,35194,35196,35195,35327,35736,35737,36517,36516,36515,37998,37997,37999,38001,38003,38729,39026,39263,40040,40046,40045,40459,40461,40464,40463,40466,40465,40609,40693,40713,40775,40824,40827,40826,40825,22302,28774,31855,34876,36274,36518,37315,38004,38008,38006,38005,39520,40052,40051,40049,40053,40468,40467,40694,40714,40868,28776,28773,31991,34410,34878,34877,34879,35742,35996,36521,36553,38731,39027,39028,39116,39265,39339,39524,39526,39527,39716,40469,40471,40776,25095,27422,29223,34380,36520,38018,38016,38017,39529,39528,39726,40473,29225,34379,35743,38019,40057,40631,30325,39531,40058,40477,28777,28778,40612,40830,40777,40856,30849,37561,35023,22715,24658,31911,23290,9556,9574,9559,9568,9580,9571,9562,9577,9565,9554,9572,9557,9566,9578,9569,9560,9575,9563,9555,9573,9558,9567,9579,9570,9561,9576,9564,9553,9552,9581,9582,9584,9583,65517,132423,37595,132575,147397,34124,17077,29679,20917,13897,149826,166372,37700,137691,33518,146632,30780,26436,25311,149811,166314,131744,158643,135941,20395,140525,20488,159017,162436,144896,150193,140563,20521,131966,24484,131968,131911,28379,132127,20605,20737,13434,20750,39020,14147,33814,149924,132231,20832,144308,20842,134143,139516,131813,140592,132494,143923,137603,23426,34685,132531,146585,20914,20920,40244,20937,20943,20945,15580,20947,150182,20915,20962,21314,20973,33741,26942,145197,24443,21003,21030,21052,21173,21079,21140,21177,21189,31765,34114,21216,34317,158483,21253,166622,21833,28377,147328,133460,147436,21299,21316,134114,27851,136998,26651,29653,24650,16042,14540,136936,29149,17570,21357,21364,165547,21374,21375,136598,136723,30694,21395,166555,21408,21419,21422,29607,153458,16217,29596,21441,21445,27721,20041,22526,21465,15019,134031,21472,147435,142755,21494,134263,21523,28793,21803,26199,27995,21613,158547,134516,21853,21647,21668,18342,136973,134877,15796,134477,166332,140952,21831,19693,21551,29719,21894,21929,22021,137431,147514,17746,148533,26291,135348,22071,26317,144010,26276,26285,22093,22095,30961,22257,38791,21502,22272,22255,22253,166758,13859,135759,22342,147877,27758,28811,22338,14001,158846,22502,136214,22531,136276,148323,22566,150517,22620,22698,13665,22752,22748,135740,22779,23551,22339,172368,148088,37843,13729,22815,26790,14019,28249,136766,23076,21843,136850,34053,22985,134478,158849,159018,137180,23001,137211,137138,159142,28017,137256,136917,23033,159301,23211,23139,14054,149929,23159,14088,23190,29797,23251,159649,140628,15749,137489,14130,136888,24195,21200,23414,25992,23420,162318,16388,18525,131588,23509,24928,137780,154060,132517,23539,23453,19728,23557,138052,23571,29646,23572,138405,158504,23625,18653,23685,23785,23791,23947,138745,138807,23824,23832,23878,138916,23738,24023,33532,14381,149761,139337,139635,33415,14390,15298,24110,27274,24181,24186,148668,134355,21414,20151,24272,21416,137073,24073,24308,164994,24313,24315,14496,24316,26686,37915,24333,131521,194708,15070,18606,135994,24378,157832,140240,24408,140401,24419,38845,159342,24434,37696,166454,24487,23990,15711,152144,139114,159992,140904,37334,131742,166441,24625,26245,137335,14691,15815,13881,22416,141236,31089,15936,24734,24740,24755,149890,149903,162387,29860,20705,23200,24932,33828,24898,194726,159442,24961,20980,132694,24967,23466,147383,141407,25043,166813,170333,25040,14642,141696,141505,24611,24924,25886,25483,131352,25285,137072,25301,142861,25452,149983,14871,25656,25592,136078,137212,25744,28554,142902,38932,147596,153373,25825,25829,38011,14950,25658,14935,25933,28438,150056,150051,25989,25965,25951,143486,26037,149824,19255,26065,16600,137257,26080,26083,24543,144384,26136,143863,143864,26180,143780,143781,26187,134773,26215,152038,26227,26228,138813,143921,165364,143816,152339,30661,141559,39332,26370,148380,150049,15147,27130,145346,26462,26471,26466,147917,168173,26583,17641,26658,28240,37436,26625,144358,159136,26717,144495,27105,27147,166623,26995,26819,144845,26881,26880,15666,14849,144956,15232,26540,26977,166474,17148,26934,27032,15265,132041,33635,20624,27129,144985,139562,27205,145155,27293,15347,26545,27336,168348,15373,27421,133411,24798,27445,27508,141261,28341,146139,132021,137560,14144,21537,146266,27617,147196,27612,27703,140427,149745,158545,27738,33318,27769,146876,17605,146877,147876,149772,149760,146633,14053,15595,134450,39811,143865,140433,32655,26679,159013,159137,159211,28054,27996,28284,28420,149887,147589,159346,34099,159604,20935,27804,28189,33838,166689,28207,146991,29779,147330,31180,28239,23185,143435,28664,14093,28573,146992,28410,136343,147517,17749,37872,28484,28508,15694,28532,168304,15675,28575,147780,28627,147601,147797,147513,147440,147380,147775,20959,147798,147799,147776,156125,28747,28798,28839,28801,28876,28885,28886,28895,16644,15848,29108,29078,148087,28971,28997,23176,29002,29038,23708,148325,29007,37730,148161,28972,148570,150055,150050,29114,166888,28861,29198,37954,29205,22801,37955,29220,37697,153093,29230,29248,149876,26813,29269,29271,15957,143428,26637,28477,29314,29482,29483,149539,165931,18669,165892,29480,29486,29647,29610,134202,158254,29641,29769,147938,136935,150052,26147,14021,149943,149901,150011,29687,29717,26883,150054,29753,132547,16087,29788,141485,29792,167602,29767,29668,29814,33721,29804,14128,29812,37873,27180,29826,18771,150156,147807,150137,166799,23366,166915,137374,29896,137608,29966,29929,29982,167641,137803,23511,167596,37765,30029,30026,30055,30062,151426,16132,150803,30094,29789,30110,30132,30210,30252,30289,30287,30319,30326,156661,30352,33263,14328,157969,157966,30369,30373,30391,30412,159647,33890,151709,151933,138780,30494,30502,30528,25775,152096,30552,144044,30639,166244,166248,136897,30708,30729,136054,150034,26826,30895,30919,30931,38565,31022,153056,30935,31028,30897,161292,36792,34948,166699,155779,140828,31110,35072,26882,31104,153687,31133,162617,31036,31145,28202,160038,16040,31174,168205,31188],
+ "euc-kr":[44034,44035,44037,44038,44043,44044,44045,44046,44047,44056,44062,44063,44065,44066,44067,44069,44070,44071,44072,44073,44074,44075,44078,44082,44083,44084,null,null,null,null,null,null,44085,44086,44087,44090,44091,44093,44094,44095,44097,44098,44099,44100,44101,44102,44103,44104,44105,44106,44108,44110,44111,44112,44113,44114,44115,44117,null,null,null,null,null,null,44118,44119,44121,44122,44123,44125,44126,44127,44128,44129,44130,44131,44132,44133,44134,44135,44136,44137,44138,44139,44140,44141,44142,44143,44146,44147,44149,44150,44153,44155,44156,44157,44158,44159,44162,44167,44168,44173,44174,44175,44177,44178,44179,44181,44182,44183,44184,44185,44186,44187,44190,44194,44195,44196,44197,44198,44199,44203,44205,44206,44209,44210,44211,44212,44213,44214,44215,44218,44222,44223,44224,44226,44227,44229,44230,44231,44233,44234,44235,44237,44238,44239,44240,44241,44242,44243,44244,44246,44248,44249,44250,44251,44252,44253,44254,44255,44258,44259,44261,44262,44265,44267,44269,44270,44274,44276,44279,44280,44281,44282,44283,44286,44287,44289,44290,44291,44293,44295,44296,44297,44298,44299,44302,44304,44306,44307,44308,44309,44310,44311,44313,44314,44315,44317,44318,44319,44321,44322,44323,44324,44325,44326,44327,44328,44330,44331,44334,44335,44336,44337,44338,44339,null,null,null,null,null,null,44342,44343,44345,44346,44347,44349,44350,44351,44352,44353,44354,44355,44358,44360,44362,44363,44364,44365,44366,44367,44369,44370,44371,44373,44374,44375,null,null,null,null,null,null,44377,44378,44379,44380,44381,44382,44383,44384,44386,44388,44389,44390,44391,44392,44393,44394,44395,44398,44399,44401,44402,44407,44408,44409,44410,44414,44416,44419,44420,44421,44422,44423,44426,44427,44429,44430,44431,44433,44434,44435,44436,44437,44438,44439,44440,44441,44442,44443,44446,44447,44448,44449,44450,44451,44453,44454,44455,44456,44457,44458,44459,44460,44461,44462,44463,44464,44465,44466,44467,44468,44469,44470,44472,44473,44474,44475,44476,44477,44478,44479,44482,44483,44485,44486,44487,44489,44490,44491,44492,44493,44494,44495,44498,44500,44501,44502,44503,44504,44505,44506,44507,44509,44510,44511,44513,44514,44515,44517,44518,44519,44520,44521,44522,44523,44524,44525,44526,44527,44528,44529,44530,44531,44532,44533,44534,44535,44538,44539,44541,44542,44546,44547,44548,44549,44550,44551,44554,44556,44558,44559,44560,44561,44562,44563,44565,44566,44567,44568,44569,44570,44571,44572,null,null,null,null,null,null,44573,44574,44575,44576,44577,44578,44579,44580,44581,44582,44583,44584,44585,44586,44587,44588,44589,44590,44591,44594,44595,44597,44598,44601,44603,44604,null,null,null,null,null,null,44605,44606,44607,44610,44612,44615,44616,44617,44619,44623,44625,44626,44627,44629,44631,44632,44633,44634,44635,44638,44642,44643,44644,44646,44647,44650,44651,44653,44654,44655,44657,44658,44659,44660,44661,44662,44663,44666,44670,44671,44672,44673,44674,44675,44678,44679,44680,44681,44682,44683,44685,44686,44687,44688,44689,44690,44691,44692,44693,44694,44695,44696,44697,44698,44699,44700,44701,44702,44703,44704,44705,44706,44707,44708,44709,44710,44711,44712,44713,44714,44715,44716,44717,44718,44719,44720,44721,44722,44723,44724,44725,44726,44727,44728,44729,44730,44731,44735,44737,44738,44739,44741,44742,44743,44744,44745,44746,44747,44750,44754,44755,44756,44757,44758,44759,44762,44763,44765,44766,44767,44768,44769,44770,44771,44772,44773,44774,44775,44777,44778,44780,44782,44783,44784,44785,44786,44787,44789,44790,44791,44793,44794,44795,44797,44798,44799,44800,44801,44802,44803,44804,44805,null,null,null,null,null,null,44806,44809,44810,44811,44812,44814,44815,44817,44818,44819,44820,44821,44822,44823,44824,44825,44826,44827,44828,44829,44830,44831,44832,44833,44834,44835,null,null,null,null,null,null,44836,44837,44838,44839,44840,44841,44842,44843,44846,44847,44849,44851,44853,44854,44855,44856,44857,44858,44859,44862,44864,44868,44869,44870,44871,44874,44875,44876,44877,44878,44879,44881,44882,44883,44884,44885,44886,44887,44888,44889,44890,44891,44894,44895,44896,44897,44898,44899,44902,44903,44904,44905,44906,44907,44908,44909,44910,44911,44912,44913,44914,44915,44916,44917,44918,44919,44920,44922,44923,44924,44925,44926,44927,44929,44930,44931,44933,44934,44935,44937,44938,44939,44940,44941,44942,44943,44946,44947,44948,44950,44951,44952,44953,44954,44955,44957,44958,44959,44960,44961,44962,44963,44964,44965,44966,44967,44968,44969,44970,44971,44972,44973,44974,44975,44976,44977,44978,44979,44980,44981,44982,44983,44986,44987,44989,44990,44991,44993,44994,44995,44996,44997,44998,45002,45004,45007,45008,45009,45010,45011,45013,45014,45015,45016,45017,45018,45019,45021,45022,45023,45024,45025,null,null,null,null,null,null,45026,45027,45028,45029,45030,45031,45034,45035,45036,45037,45038,45039,45042,45043,45045,45046,45047,45049,45050,45051,45052,45053,45054,45055,45058,45059,null,null,null,null,null,null,45061,45062,45063,45064,45065,45066,45067,45069,45070,45071,45073,45074,45075,45077,45078,45079,45080,45081,45082,45083,45086,45087,45088,45089,45090,45091,45092,45093,45094,45095,45097,45098,45099,45100,45101,45102,45103,45104,45105,45106,45107,45108,45109,45110,45111,45112,45113,45114,45115,45116,45117,45118,45119,45120,45121,45122,45123,45126,45127,45129,45131,45133,45135,45136,45137,45138,45142,45144,45146,45147,45148,45150,45151,45152,45153,45154,45155,45156,45157,45158,45159,45160,45161,45162,45163,45164,45165,45166,45167,45168,45169,45170,45171,45172,45173,45174,45175,45176,45177,45178,45179,45182,45183,45185,45186,45187,45189,45190,45191,45192,45193,45194,45195,45198,45200,45202,45203,45204,45205,45206,45207,45211,45213,45214,45219,45220,45221,45222,45223,45226,45232,45234,45238,45239,45241,45242,45243,45245,45246,45247,45248,45249,45250,45251,45254,45258,45259,45260,45261,45262,45263,45266,null,null,null,null,null,null,45267,45269,45270,45271,45273,45274,45275,45276,45277,45278,45279,45281,45282,45283,45284,45286,45287,45288,45289,45290,45291,45292,45293,45294,45295,45296,null,null,null,null,null,null,45297,45298,45299,45300,45301,45302,45303,45304,45305,45306,45307,45308,45309,45310,45311,45312,45313,45314,45315,45316,45317,45318,45319,45322,45325,45326,45327,45329,45332,45333,45334,45335,45338,45342,45343,45344,45345,45346,45350,45351,45353,45354,45355,45357,45358,45359,45360,45361,45362,45363,45366,45370,45371,45372,45373,45374,45375,45378,45379,45381,45382,45383,45385,45386,45387,45388,45389,45390,45391,45394,45395,45398,45399,45401,45402,45403,45405,45406,45407,45409,45410,45411,45412,45413,45414,45415,45416,45417,45418,45419,45420,45421,45422,45423,45424,45425,45426,45427,45428,45429,45430,45431,45434,45435,45437,45438,45439,45441,45443,45444,45445,45446,45447,45450,45452,45454,45455,45456,45457,45461,45462,45463,45465,45466,45467,45469,45470,45471,45472,45473,45474,45475,45476,45477,45478,45479,45481,45482,45483,45484,45485,45486,45487,45488,45489,45490,45491,45492,45493,45494,45495,45496,null,null,null,null,null,null,45497,45498,45499,45500,45501,45502,45503,45504,45505,45506,45507,45508,45509,45510,45511,45512,45513,45514,45515,45517,45518,45519,45521,45522,45523,45525,null,null,null,null,null,null,45526,45527,45528,45529,45530,45531,45534,45536,45537,45538,45539,45540,45541,45542,45543,45546,45547,45549,45550,45551,45553,45554,45555,45556,45557,45558,45559,45560,45562,45564,45566,45567,45568,45569,45570,45571,45574,45575,45577,45578,45581,45582,45583,45584,45585,45586,45587,45590,45592,45594,45595,45596,45597,45598,45599,45601,45602,45603,45604,45605,45606,45607,45608,45609,45610,45611,45612,45613,45614,45615,45616,45617,45618,45619,45621,45622,45623,45624,45625,45626,45627,45629,45630,45631,45632,45633,45634,45635,45636,45637,45638,45639,45640,45641,45642,45643,45644,45645,45646,45647,45648,45649,45650,45651,45652,45653,45654,45655,45657,45658,45659,45661,45662,45663,45665,45666,45667,45668,45669,45670,45671,45674,45675,45676,45677,45678,45679,45680,45681,45682,45683,45686,45687,45688,45689,45690,45691,45693,45694,45695,45696,45697,45698,45699,45702,45703,45704,45706,45707,45708,45709,45710,null,null,null,null,null,null,45711,45714,45715,45717,45718,45719,45723,45724,45725,45726,45727,45730,45732,45735,45736,45737,45739,45741,45742,45743,45745,45746,45747,45749,45750,45751,null,null,null,null,null,null,45752,45753,45754,45755,45756,45757,45758,45759,45760,45761,45762,45763,45764,45765,45766,45767,45770,45771,45773,45774,45775,45777,45779,45780,45781,45782,45783,45786,45788,45790,45791,45792,45793,45795,45799,45801,45802,45808,45809,45810,45814,45820,45821,45822,45826,45827,45829,45830,45831,45833,45834,45835,45836,45837,45838,45839,45842,45846,45847,45848,45849,45850,45851,45853,45854,45855,45856,45857,45858,45859,45860,45861,45862,45863,45864,45865,45866,45867,45868,45869,45870,45871,45872,45873,45874,45875,45876,45877,45878,45879,45880,45881,45882,45883,45884,45885,45886,45887,45888,45889,45890,45891,45892,45893,45894,45895,45896,45897,45898,45899,45900,45901,45902,45903,45904,45905,45906,45907,45911,45913,45914,45917,45920,45921,45922,45923,45926,45928,45930,45932,45933,45935,45938,45939,45941,45942,45943,45945,45946,45947,45948,45949,45950,45951,45954,45958,45959,45960,45961,45962,45963,45965,null,null,null,null,null,null,45966,45967,45969,45970,45971,45973,45974,45975,45976,45977,45978,45979,45980,45981,45982,45983,45986,45987,45988,45989,45990,45991,45993,45994,45995,45997,null,null,null,null,null,null,45998,45999,46000,46001,46002,46003,46004,46005,46006,46007,46008,46009,46010,46011,46012,46013,46014,46015,46016,46017,46018,46019,46022,46023,46025,46026,46029,46031,46033,46034,46035,46038,46040,46042,46044,46046,46047,46049,46050,46051,46053,46054,46055,46057,46058,46059,46060,46061,46062,46063,46064,46065,46066,46067,46068,46069,46070,46071,46072,46073,46074,46075,46077,46078,46079,46080,46081,46082,46083,46084,46085,46086,46087,46088,46089,46090,46091,46092,46093,46094,46095,46097,46098,46099,46100,46101,46102,46103,46105,46106,46107,46109,46110,46111,46113,46114,46115,46116,46117,46118,46119,46122,46124,46125,46126,46127,46128,46129,46130,46131,46133,46134,46135,46136,46137,46138,46139,46140,46141,46142,46143,46144,46145,46146,46147,46148,46149,46150,46151,46152,46153,46154,46155,46156,46157,46158,46159,46162,46163,46165,46166,46167,46169,46170,46171,46172,46173,46174,46175,46178,46180,46182,null,null,null,null,null,null,46183,46184,46185,46186,46187,46189,46190,46191,46192,46193,46194,46195,46196,46197,46198,46199,46200,46201,46202,46203,46204,46205,46206,46207,46209,46210,null,null,null,null,null,null,46211,46212,46213,46214,46215,46217,46218,46219,46220,46221,46222,46223,46224,46225,46226,46227,46228,46229,46230,46231,46232,46233,46234,46235,46236,46238,46239,46240,46241,46242,46243,46245,46246,46247,46249,46250,46251,46253,46254,46255,46256,46257,46258,46259,46260,46262,46264,46266,46267,46268,46269,46270,46271,46273,46274,46275,46277,46278,46279,46281,46282,46283,46284,46285,46286,46287,46289,46290,46291,46292,46294,46295,46296,46297,46298,46299,46302,46303,46305,46306,46309,46311,46312,46313,46314,46315,46318,46320,46322,46323,46324,46325,46326,46327,46329,46330,46331,46332,46333,46334,46335,46336,46337,46338,46339,46340,46341,46342,46343,46344,46345,46346,46347,46348,46349,46350,46351,46352,46353,46354,46355,46358,46359,46361,46362,46365,46366,46367,46368,46369,46370,46371,46374,46379,46380,46381,46382,46383,46386,46387,46389,46390,46391,46393,46394,46395,46396,46397,46398,46399,46402,46406,null,null,null,null,null,null,46407,46408,46409,46410,46414,46415,46417,46418,46419,46421,46422,46423,46424,46425,46426,46427,46430,46434,46435,46436,46437,46438,46439,46440,46441,46442,null,null,null,null,null,null,46443,46444,46445,46446,46447,46448,46449,46450,46451,46452,46453,46454,46455,46456,46457,46458,46459,46460,46461,46462,46463,46464,46465,46466,46467,46468,46469,46470,46471,46472,46473,46474,46475,46476,46477,46478,46479,46480,46481,46482,46483,46484,46485,46486,46487,46488,46489,46490,46491,46492,46493,46494,46495,46498,46499,46501,46502,46503,46505,46508,46509,46510,46511,46514,46518,46519,46520,46521,46522,46526,46527,46529,46530,46531,46533,46534,46535,46536,46537,46538,46539,46542,46546,46547,46548,46549,46550,46551,46553,46554,46555,46556,46557,46558,46559,46560,46561,46562,46563,46564,46565,46566,46567,46568,46569,46570,46571,46573,46574,46575,46576,46577,46578,46579,46580,46581,46582,46583,46584,46585,46586,46587,46588,46589,46590,46591,46592,46593,46594,46595,46596,46597,46598,46599,46600,46601,46602,46603,46604,46605,46606,46607,46610,46611,46613,46614,46615,46617,46618,46619,46620,46621,null,null,null,null,null,null,46622,46623,46624,46625,46626,46627,46628,46630,46631,46632,46633,46634,46635,46637,46638,46639,46640,46641,46642,46643,46645,46646,46647,46648,46649,46650,null,null,null,null,null,null,46651,46652,46653,46654,46655,46656,46657,46658,46659,46660,46661,46662,46663,46665,46666,46667,46668,46669,46670,46671,46672,46673,46674,46675,46676,46677,46678,46679,46680,46681,46682,46683,46684,46685,46686,46687,46688,46689,46690,46691,46693,46694,46695,46697,46698,46699,46700,46701,46702,46703,46704,46705,46706,46707,46708,46709,46710,46711,46712,46713,46714,46715,46716,46717,46718,46719,46720,46721,46722,46723,46724,46725,46726,46727,46728,46729,46730,46731,46732,46733,46734,46735,46736,46737,46738,46739,46740,46741,46742,46743,46744,46745,46746,46747,46750,46751,46753,46754,46755,46757,46758,46759,46760,46761,46762,46765,46766,46767,46768,46770,46771,46772,46773,46774,46775,46776,46777,46778,46779,46780,46781,46782,46783,46784,46785,46786,46787,46788,46789,46790,46791,46792,46793,46794,46795,46796,46797,46798,46799,46800,46801,46802,46803,46805,46806,46807,46808,46809,46810,46811,46812,46813,null,null,null,null,null,null,46814,46815,46816,46817,46818,46819,46820,46821,46822,46823,46824,46825,46826,46827,46828,46829,46830,46831,46833,46834,46835,46837,46838,46839,46841,46842,null,null,null,null,null,null,46843,46844,46845,46846,46847,46850,46851,46852,46854,46855,46856,46857,46858,46859,46860,46861,46862,46863,46864,46865,46866,46867,46868,46869,46870,46871,46872,46873,46874,46875,46876,46877,46878,46879,46880,46881,46882,46883,46884,46885,46886,46887,46890,46891,46893,46894,46897,46898,46899,46900,46901,46902,46903,46906,46908,46909,46910,46911,46912,46913,46914,46915,46917,46918,46919,46921,46922,46923,46925,46926,46927,46928,46929,46930,46931,46934,46935,46936,46937,46938,46939,46940,46941,46942,46943,46945,46946,46947,46949,46950,46951,46953,46954,46955,46956,46957,46958,46959,46962,46964,46966,46967,46968,46969,46970,46971,46974,46975,46977,46978,46979,46981,46982,46983,46984,46985,46986,46987,46990,46995,46996,46997,47002,47003,47005,47006,47007,47009,47010,47011,47012,47013,47014,47015,47018,47022,47023,47024,47025,47026,47027,47030,47031,47033,47034,47035,47036,47037,47038,47039,47040,47041,null,null,null,null,null,null,47042,47043,47044,47045,47046,47048,47050,47051,47052,47053,47054,47055,47056,47057,47058,47059,47060,47061,47062,47063,47064,47065,47066,47067,47068,47069,null,null,null,null,null,null,47070,47071,47072,47073,47074,47075,47076,47077,47078,47079,47080,47081,47082,47083,47086,47087,47089,47090,47091,47093,47094,47095,47096,47097,47098,47099,47102,47106,47107,47108,47109,47110,47114,47115,47117,47118,47119,47121,47122,47123,47124,47125,47126,47127,47130,47132,47134,47135,47136,47137,47138,47139,47142,47143,47145,47146,47147,47149,47150,47151,47152,47153,47154,47155,47158,47162,47163,47164,47165,47166,47167,47169,47170,47171,47173,47174,47175,47176,47177,47178,47179,47180,47181,47182,47183,47184,47186,47188,47189,47190,47191,47192,47193,47194,47195,47198,47199,47201,47202,47203,47205,47206,47207,47208,47209,47210,47211,47214,47216,47218,47219,47220,47221,47222,47223,47225,47226,47227,47229,47230,47231,47232,47233,47234,47235,47236,47237,47238,47239,47240,47241,47242,47243,47244,47246,47247,47248,47249,47250,47251,47252,47253,47254,47255,47256,47257,47258,47259,47260,47261,47262,47263,null,null,null,null,null,null,47264,47265,47266,47267,47268,47269,47270,47271,47273,47274,47275,47276,47277,47278,47279,47281,47282,47283,47285,47286,47287,47289,47290,47291,47292,47293,null,null,null,null,null,null,47294,47295,47298,47300,47302,47303,47304,47305,47306,47307,47309,47310,47311,47313,47314,47315,47317,47318,47319,47320,47321,47322,47323,47324,47326,47328,47330,47331,47332,47333,47334,47335,47338,47339,47341,47342,47343,47345,47346,47347,47348,47349,47350,47351,47354,47356,47358,47359,47360,47361,47362,47363,47365,47366,47367,47368,47369,47370,47371,47372,47373,47374,47375,47376,47377,47378,47379,47380,47381,47382,47383,47385,47386,47387,47388,47389,47390,47391,47393,47394,47395,47396,47397,47398,47399,47400,47401,47402,47403,47404,47405,47406,47407,47408,47409,47410,47411,47412,47413,47414,47415,47416,47417,47418,47419,47422,47423,47425,47426,47427,47429,47430,47431,47432,47433,47434,47435,47437,47438,47440,47442,47443,47444,47445,47446,47447,47450,47451,47453,47454,47455,47457,47458,47459,47460,47461,47462,47463,47466,47468,47470,47471,47472,47473,47474,47475,47478,47479,47481,47482,47483,47485,null,null,null,null,null,null,47486,47487,47488,47489,47490,47491,47494,47496,47499,47500,47503,47504,47505,47506,47507,47508,47509,47510,47511,47512,47513,47514,47515,47516,47517,47518,null,null,null,null,null,null,47519,47520,47521,47522,47523,47524,47525,47526,47527,47528,47529,47530,47531,47534,47535,47537,47538,47539,47541,47542,47543,47544,47545,47546,47547,47550,47552,47554,47555,47556,47557,47558,47559,47562,47563,47565,47571,47572,47573,47574,47575,47578,47580,47583,47584,47586,47590,47591,47593,47594,47595,47597,47598,47599,47600,47601,47602,47603,47606,47611,47612,47613,47614,47615,47618,47619,47620,47621,47622,47623,47625,47626,47627,47628,47629,47630,47631,47632,47633,47634,47635,47636,47638,47639,47640,47641,47642,47643,47644,47645,47646,47647,47648,47649,47650,47651,47652,47653,47654,47655,47656,47657,47658,47659,47660,47661,47662,47663,47664,47665,47666,47667,47668,47669,47670,47671,47674,47675,47677,47678,47679,47681,47683,47684,47685,47686,47687,47690,47692,47695,47696,47697,47698,47702,47703,47705,47706,47707,47709,47710,47711,47712,47713,47714,47715,47718,47722,47723,47724,47725,47726,47727,null,null,null,null,null,null,47730,47731,47733,47734,47735,47737,47738,47739,47740,47741,47742,47743,47744,47745,47746,47750,47752,47753,47754,47755,47757,47758,47759,47760,47761,47762,null,null,null,null,null,null,47763,47764,47765,47766,47767,47768,47769,47770,47771,47772,47773,47774,47775,47776,47777,47778,47779,47780,47781,47782,47783,47786,47789,47790,47791,47793,47795,47796,47797,47798,47799,47802,47804,47806,47807,47808,47809,47810,47811,47813,47814,47815,47817,47818,47819,47820,47821,47822,47823,47824,47825,47826,47827,47828,47829,47830,47831,47834,47835,47836,47837,47838,47839,47840,47841,47842,47843,47844,47845,47846,47847,47848,47849,47850,47851,47852,47853,47854,47855,47856,47857,47858,47859,47860,47861,47862,47863,47864,47865,47866,47867,47869,47870,47871,47873,47874,47875,47877,47878,47879,47880,47881,47882,47883,47884,47886,47888,47890,47891,47892,47893,47894,47895,47897,47898,47899,47901,47902,47903,47905,47906,47907,47908,47909,47910,47911,47912,47914,47916,47917,47918,47919,47920,47921,47922,47923,47927,47929,47930,47935,47936,47937,47938,47939,47942,47944,47946,47947,47948,47950,47953,47954,null,null,null,null,null,null,47955,47957,47958,47959,47961,47962,47963,47964,47965,47966,47967,47968,47970,47972,47973,47974,47975,47976,47977,47978,47979,47981,47982,47983,47984,47985,null,null,null,null,null,null,47986,47987,47988,47989,47990,47991,47992,47993,47994,47995,47996,47997,47998,47999,48000,48001,48002,48003,48004,48005,48006,48007,48009,48010,48011,48013,48014,48015,48017,48018,48019,48020,48021,48022,48023,48024,48025,48026,48027,48028,48029,48030,48031,48032,48033,48034,48035,48037,48038,48039,48041,48042,48043,48045,48046,48047,48048,48049,48050,48051,48053,48054,48056,48057,48058,48059,48060,48061,48062,48063,48065,48066,48067,48069,48070,48071,48073,48074,48075,48076,48077,48078,48079,48081,48082,48084,48085,48086,48087,48088,48089,48090,48091,48092,48093,48094,48095,48096,48097,48098,48099,48100,48101,48102,48103,48104,48105,48106,48107,48108,48109,48110,48111,48112,48113,48114,48115,48116,48117,48118,48119,48122,48123,48125,48126,48129,48131,48132,48133,48134,48135,48138,48142,48144,48146,48147,48153,48154,48160,48161,48162,48163,48166,48168,48170,48171,48172,48174,48175,48178,48179,48181,null,null,null,null,null,null,48182,48183,48185,48186,48187,48188,48189,48190,48191,48194,48198,48199,48200,48202,48203,48206,48207,48209,48210,48211,48212,48213,48214,48215,48216,48217,null,null,null,null,null,null,48218,48219,48220,48222,48223,48224,48225,48226,48227,48228,48229,48230,48231,48232,48233,48234,48235,48236,48237,48238,48239,48240,48241,48242,48243,48244,48245,48246,48247,48248,48249,48250,48251,48252,48253,48254,48255,48256,48257,48258,48259,48262,48263,48265,48266,48269,48271,48272,48273,48274,48275,48278,48280,48283,48284,48285,48286,48287,48290,48291,48293,48294,48297,48298,48299,48300,48301,48302,48303,48306,48310,48311,48312,48313,48314,48315,48318,48319,48321,48322,48323,48325,48326,48327,48328,48329,48330,48331,48332,48334,48338,48339,48340,48342,48343,48345,48346,48347,48349,48350,48351,48352,48353,48354,48355,48356,48357,48358,48359,48360,48361,48362,48363,48364,48365,48366,48367,48368,48369,48370,48371,48375,48377,48378,48379,48381,48382,48383,48384,48385,48386,48387,48390,48392,48394,48395,48396,48397,48398,48399,48401,48402,48403,48405,48406,48407,48408,48409,48410,48411,48412,48413,null,null,null,null,null,null,48414,48415,48416,48417,48418,48419,48421,48422,48423,48424,48425,48426,48427,48429,48430,48431,48432,48433,48434,48435,48436,48437,48438,48439,48440,48441,null,null,null,null,null,null,48442,48443,48444,48445,48446,48447,48449,48450,48451,48452,48453,48454,48455,48458,48459,48461,48462,48463,48465,48466,48467,48468,48469,48470,48471,48474,48475,48476,48477,48478,48479,48480,48481,48482,48483,48485,48486,48487,48489,48490,48491,48492,48493,48494,48495,48496,48497,48498,48499,48500,48501,48502,48503,48504,48505,48506,48507,48508,48509,48510,48511,48514,48515,48517,48518,48523,48524,48525,48526,48527,48530,48532,48534,48535,48536,48539,48541,48542,48543,48544,48545,48546,48547,48549,48550,48551,48552,48553,48554,48555,48556,48557,48558,48559,48561,48562,48563,48564,48565,48566,48567,48569,48570,48571,48572,48573,48574,48575,48576,48577,48578,48579,48580,48581,48582,48583,48584,48585,48586,48587,48588,48589,48590,48591,48592,48593,48594,48595,48598,48599,48601,48602,48603,48605,48606,48607,48608,48609,48610,48611,48612,48613,48614,48615,48616,48618,48619,48620,48621,48622,48623,48625,null,null,null,null,null,null,48626,48627,48629,48630,48631,48633,48634,48635,48636,48637,48638,48639,48641,48642,48644,48646,48647,48648,48649,48650,48651,48654,48655,48657,48658,48659,null,null,null,null,null,null,48661,48662,48663,48664,48665,48666,48667,48670,48672,48673,48674,48675,48676,48677,48678,48679,48680,48681,48682,48683,48684,48685,48686,48687,48688,48689,48690,48691,48692,48693,48694,48695,48696,48697,48698,48699,48700,48701,48702,48703,48704,48705,48706,48707,48710,48711,48713,48714,48715,48717,48719,48720,48721,48722,48723,48726,48728,48732,48733,48734,48735,48738,48739,48741,48742,48743,48745,48747,48748,48749,48750,48751,48754,48758,48759,48760,48761,48762,48766,48767,48769,48770,48771,48773,48774,48775,48776,48777,48778,48779,48782,48786,48787,48788,48789,48790,48791,48794,48795,48796,48797,48798,48799,48800,48801,48802,48803,48804,48805,48806,48807,48809,48810,48811,48812,48813,48814,48815,48816,48817,48818,48819,48820,48821,48822,48823,48824,48825,48826,48827,48828,48829,48830,48831,48832,48833,48834,48835,48836,48837,48838,48839,48840,48841,48842,48843,48844,48845,48846,48847,48850,48851,null,null,null,null,null,null,48853,48854,48857,48858,48859,48860,48861,48862,48863,48865,48866,48870,48871,48872,48873,48874,48875,48877,48878,48879,48880,48881,48882,48883,48884,48885,null,null,null,null,null,null,48886,48887,48888,48889,48890,48891,48892,48893,48894,48895,48896,48898,48899,48900,48901,48902,48903,48906,48907,48908,48909,48910,48911,48912,48913,48914,48915,48916,48917,48918,48919,48922,48926,48927,48928,48929,48930,48931,48932,48933,48934,48935,48936,48937,48938,48939,48940,48941,48942,48943,48944,48945,48946,48947,48948,48949,48950,48951,48952,48953,48954,48955,48956,48957,48958,48959,48962,48963,48965,48966,48967,48969,48970,48971,48972,48973,48974,48975,48978,48979,48980,48982,48983,48984,48985,48986,48987,48988,48989,48990,48991,48992,48993,48994,48995,48996,48997,48998,48999,49000,49001,49002,49003,49004,49005,49006,49007,49008,49009,49010,49011,49012,49013,49014,49015,49016,49017,49018,49019,49020,49021,49022,49023,49024,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,49035,49036,49037,49038,49039,49040,49041,49042,49043,49045,49046,49047,49048,49049,49050,49051,49052,49053,null,null,null,null,null,null,49054,49055,49056,49057,49058,49059,49060,49061,49062,49063,49064,49065,49066,49067,49068,49069,49070,49071,49073,49074,49075,49076,49077,49078,49079,49080,null,null,null,null,null,null,49081,49082,49083,49084,49085,49086,49087,49088,49089,49090,49091,49092,49094,49095,49096,49097,49098,49099,49102,49103,49105,49106,49107,49109,49110,49111,49112,49113,49114,49115,49117,49118,49120,49122,49123,49124,49125,49126,49127,49128,49129,49130,49131,49132,49133,49134,49135,49136,49137,49138,49139,49140,49141,49142,49143,49144,49145,49146,49147,49148,49149,49150,49151,49152,49153,49154,49155,49156,49157,49158,49159,49160,49161,49162,49163,49164,49165,49166,49167,49168,49169,49170,49171,49172,49173,49174,49175,49176,49177,49178,49179,49180,49181,49182,49183,49184,49185,49186,49187,49188,49189,49190,49191,49192,49193,49194,49195,49196,49197,49198,49199,49200,49201,49202,49203,49204,49205,49206,49207,49208,49209,49210,49211,49213,49214,49215,49216,49217,49218,49219,49220,49221,49222,49223,49224,49225,49226,49227,49228,49229,49230,49231,49232,49234,49235,49236,49237,49238,49239,49241,49242,49243,null,null,null,null,null,null,49245,49246,49247,49249,49250,49251,49252,49253,49254,49255,49258,49259,49260,49261,49262,49263,49264,49265,49266,49267,49268,49269,49270,49271,49272,49273,null,null,null,null,null,null,49274,49275,49276,49277,49278,49279,49280,49281,49282,49283,49284,49285,49286,49287,49288,49289,49290,49291,49292,49293,49294,49295,49298,49299,49301,49302,49303,49305,49306,49307,49308,49309,49310,49311,49314,49316,49318,49319,49320,49321,49322,49323,49326,49329,49330,49335,49336,49337,49338,49339,49342,49346,49347,49348,49350,49351,49354,49355,49357,49358,49359,49361,49362,49363,49364,49365,49366,49367,49370,49374,49375,49376,49377,49378,49379,49382,49383,49385,49386,49387,49389,49390,49391,49392,49393,49394,49395,49398,49400,49402,49403,49404,49405,49406,49407,49409,49410,49411,49413,49414,49415,49417,49418,49419,49420,49421,49422,49423,49425,49426,49427,49428,49430,49431,49432,49433,49434,49435,49441,49442,49445,49448,49449,49450,49451,49454,49458,49459,49460,49461,49463,49466,49467,49469,49470,49471,49473,49474,49475,49476,49477,49478,49479,49482,49486,49487,49488,49489,49490,49491,49494,49495,null,null,null,null,null,null,49497,49498,49499,49501,49502,49503,49504,49505,49506,49507,49510,49514,49515,49516,49517,49518,49519,49521,49522,49523,49525,49526,49527,49529,49530,49531,null,null,null,null,null,null,49532,49533,49534,49535,49536,49537,49538,49539,49540,49542,49543,49544,49545,49546,49547,49551,49553,49554,49555,49557,49559,49560,49561,49562,49563,49566,49568,49570,49571,49572,49574,49575,49578,49579,49581,49582,49583,49585,49586,49587,49588,49589,49590,49591,49592,49593,49594,49595,49596,49598,49599,49600,49601,49602,49603,49605,49606,49607,49609,49610,49611,49613,49614,49615,49616,49617,49618,49619,49621,49622,49625,49626,49627,49628,49629,49630,49631,49633,49634,49635,49637,49638,49639,49641,49642,49643,49644,49645,49646,49647,49650,49652,49653,49654,49655,49656,49657,49658,49659,49662,49663,49665,49666,49667,49669,49670,49671,49672,49673,49674,49675,49678,49680,49682,49683,49684,49685,49686,49687,49690,49691,49693,49694,49697,49698,49699,49700,49701,49702,49703,49706,49708,49710,49712,49715,49717,49718,49719,49720,49721,49722,49723,49724,49725,49726,49727,49728,49729,49730,49731,49732,49733,null,null,null,null,null,null,49734,49735,49737,49738,49739,49740,49741,49742,49743,49746,49747,49749,49750,49751,49753,49754,49755,49756,49757,49758,49759,49761,49762,49763,49764,49766,null,null,null,null,null,null,49767,49768,49769,49770,49771,49774,49775,49777,49778,49779,49781,49782,49783,49784,49785,49786,49787,49790,49792,49794,49795,49796,49797,49798,49799,49802,49803,49804,49805,49806,49807,49809,49810,49811,49812,49813,49814,49815,49817,49818,49820,49822,49823,49824,49825,49826,49827,49830,49831,49833,49834,49835,49838,49839,49840,49841,49842,49843,49846,49848,49850,49851,49852,49853,49854,49855,49856,49857,49858,49859,49860,49861,49862,49863,49864,49865,49866,49867,49868,49869,49870,49871,49872,49873,49874,49875,49876,49877,49878,49879,49880,49881,49882,49883,49886,49887,49889,49890,49893,49894,49895,49896,49897,49898,49902,49904,49906,49907,49908,49909,49911,49914,49917,49918,49919,49921,49922,49923,49924,49925,49926,49927,49930,49931,49934,49935,49936,49937,49938,49942,49943,49945,49946,49947,49949,49950,49951,49952,49953,49954,49955,49958,49959,49962,49963,49964,49965,49966,49967,49968,49969,49970,null,null,null,null,null,null,49971,49972,49973,49974,49975,49976,49977,49978,49979,49980,49981,49982,49983,49984,49985,49986,49987,49988,49990,49991,49992,49993,49994,49995,49996,49997,null,null,null,null,null,null,49998,49999,50000,50001,50002,50003,50004,50005,50006,50007,50008,50009,50010,50011,50012,50013,50014,50015,50016,50017,50018,50019,50020,50021,50022,50023,50026,50027,50029,50030,50031,50033,50035,50036,50037,50038,50039,50042,50043,50046,50047,50048,50049,50050,50051,50053,50054,50055,50057,50058,50059,50061,50062,50063,50064,50065,50066,50067,50068,50069,50070,50071,50072,50073,50074,50075,50076,50077,50078,50079,50080,50081,50082,50083,50084,50085,50086,50087,50088,50089,50090,50091,50092,50093,50094,50095,50096,50097,50098,50099,50100,50101,50102,50103,50104,50105,50106,50107,50108,50109,50110,50111,50113,50114,50115,50116,50117,50118,50119,50120,50121,50122,50123,50124,50125,50126,50127,50128,50129,50130,50131,50132,50133,50134,50135,50138,50139,50141,50142,50145,50147,50148,50149,50150,50151,50154,50155,50156,50158,50159,50160,50161,50162,50163,50166,50167,50169,50170,50171,50172,50173,50174,null,null,null,null,null,null,50175,50176,50177,50178,50179,50180,50181,50182,50183,50185,50186,50187,50188,50189,50190,50191,50193,50194,50195,50196,50197,50198,50199,50200,50201,50202,null,null,null,null,null,null,50203,50204,50205,50206,50207,50208,50209,50210,50211,50213,50214,50215,50216,50217,50218,50219,50221,50222,50223,50225,50226,50227,50229,50230,50231,50232,50233,50234,50235,50238,50239,50240,50241,50242,50243,50244,50245,50246,50247,50249,50250,50251,50252,50253,50254,50255,50256,50257,50258,50259,50260,50261,50262,50263,50264,50265,50266,50267,50268,50269,50270,50271,50272,50273,50274,50275,50278,50279,50281,50282,50283,50285,50286,50287,50288,50289,50290,50291,50294,50295,50296,50298,50299,50300,50301,50302,50303,50305,50306,50307,50308,50309,50310,50311,50312,50313,50314,50315,50316,50317,50318,50319,50320,50321,50322,50323,50325,50326,50327,50328,50329,50330,50331,50333,50334,50335,50336,50337,50338,50339,50340,50341,50342,50343,50344,50345,50346,50347,50348,50349,50350,50351,50352,50353,50354,50355,50356,50357,50358,50359,50361,50362,50363,50365,50366,50367,50368,50369,50370,50371,50372,50373,null,null,null,null,null,null,50374,50375,50376,50377,50378,50379,50380,50381,50382,50383,50384,50385,50386,50387,50388,50389,50390,50391,50392,50393,50394,50395,50396,50397,50398,50399,null,null,null,null,null,null,50400,50401,50402,50403,50404,50405,50406,50407,50408,50410,50411,50412,50413,50414,50415,50418,50419,50421,50422,50423,50425,50427,50428,50429,50430,50434,50435,50436,50437,50438,50439,50440,50441,50442,50443,50445,50446,50447,50449,50450,50451,50453,50454,50455,50456,50457,50458,50459,50461,50462,50463,50464,50465,50466,50467,50468,50469,50470,50471,50474,50475,50477,50478,50479,50481,50482,50483,50484,50485,50486,50487,50490,50492,50494,50495,50496,50497,50498,50499,50502,50503,50507,50511,50512,50513,50514,50518,50522,50523,50524,50527,50530,50531,50533,50534,50535,50537,50538,50539,50540,50541,50542,50543,50546,50550,50551,50552,50553,50554,50555,50558,50559,50561,50562,50563,50565,50566,50568,50569,50570,50571,50574,50576,50578,50579,50580,50582,50585,50586,50587,50589,50590,50591,50593,50594,50595,50596,50597,50598,50599,50600,50602,50603,50604,50605,50606,50607,50608,50609,50610,50611,50614,null,null,null,null,null,null,50615,50618,50623,50624,50625,50626,50627,50635,50637,50639,50642,50643,50645,50646,50647,50649,50650,50651,50652,50653,50654,50655,50658,50660,50662,50663,null,null,null,null,null,null,50664,50665,50666,50667,50671,50673,50674,50675,50677,50680,50681,50682,50683,50690,50691,50692,50697,50698,50699,50701,50702,50703,50705,50706,50707,50708,50709,50710,50711,50714,50717,50718,50719,50720,50721,50722,50723,50726,50727,50729,50730,50731,50735,50737,50738,50742,50744,50746,50748,50749,50750,50751,50754,50755,50757,50758,50759,50761,50762,50763,50764,50765,50766,50767,50770,50774,50775,50776,50777,50778,50779,50782,50783,50785,50786,50787,50788,50789,50790,50791,50792,50793,50794,50795,50797,50798,50800,50802,50803,50804,50805,50806,50807,50810,50811,50813,50814,50815,50817,50818,50819,50820,50821,50822,50823,50826,50828,50830,50831,50832,50833,50834,50835,50838,50839,50841,50842,50843,50845,50846,50847,50848,50849,50850,50851,50854,50856,50858,50859,50860,50861,50862,50863,50866,50867,50869,50870,50871,50875,50876,50877,50878,50879,50882,50884,50886,50887,50888,50889,50890,50891,50894,null,null,null,null,null,null,50895,50897,50898,50899,50901,50902,50903,50904,50905,50906,50907,50910,50911,50914,50915,50916,50917,50918,50919,50922,50923,50925,50926,50927,50929,50930,null,null,null,null,null,null,50931,50932,50933,50934,50935,50938,50939,50940,50942,50943,50944,50945,50946,50947,50950,50951,50953,50954,50955,50957,50958,50959,50960,50961,50962,50963,50966,50968,50970,50971,50972,50973,50974,50975,50978,50979,50981,50982,50983,50985,50986,50987,50988,50989,50990,50991,50994,50996,50998,51000,51001,51002,51003,51006,51007,51009,51010,51011,51013,51014,51015,51016,51017,51019,51022,51024,51033,51034,51035,51037,51038,51039,51041,51042,51043,51044,51045,51046,51047,51049,51050,51052,51053,51054,51055,51056,51057,51058,51059,51062,51063,51065,51066,51067,51071,51072,51073,51074,51078,51083,51084,51085,51087,51090,51091,51093,51097,51099,51100,51101,51102,51103,51106,51111,51112,51113,51114,51115,51118,51119,51121,51122,51123,51125,51126,51127,51128,51129,51130,51131,51134,51138,51139,51140,51141,51142,51143,51146,51147,51149,51151,51153,51154,51155,51156,51157,51158,51159,51161,51162,51163,51164,null,null,null,null,null,null,51166,51167,51168,51169,51170,51171,51173,51174,51175,51177,51178,51179,51181,51182,51183,51184,51185,51186,51187,51188,51189,51190,51191,51192,51193,51194,null,null,null,null,null,null,51195,51196,51197,51198,51199,51202,51203,51205,51206,51207,51209,51211,51212,51213,51214,51215,51218,51220,51223,51224,51225,51226,51227,51230,51231,51233,51234,51235,51237,51238,51239,51240,51241,51242,51243,51246,51248,51250,51251,51252,51253,51254,51255,51257,51258,51259,51261,51262,51263,51265,51266,51267,51268,51269,51270,51271,51274,51275,51278,51279,51280,51281,51282,51283,51285,51286,51287,51288,51289,51290,51291,51292,51293,51294,51295,51296,51297,51298,51299,51300,51301,51302,51303,51304,51305,51306,51307,51308,51309,51310,51311,51314,51315,51317,51318,51319,51321,51323,51324,51325,51326,51327,51330,51332,51336,51337,51338,51342,51343,51344,51345,51346,51347,51349,51350,51351,51352,51353,51354,51355,51356,51358,51360,51362,51363,51364,51365,51366,51367,51369,51370,51371,51372,51373,51374,51375,51376,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,51387,51390,51391,51392,51393,null,null,null,null,null,null,51394,51395,51397,51398,51399,51401,51402,51403,51405,51406,51407,51408,51409,51410,51411,51414,51416,51418,51419,51420,51421,51422,51423,51426,51427,51429,null,null,null,null,null,null,51430,51431,51432,51433,51434,51435,51436,51437,51438,51439,51440,51441,51442,51443,51444,51446,51447,51448,51449,51450,51451,51454,51455,51457,51458,51459,51463,51464,51465,51466,51467,51470,12288,12289,12290,183,8229,8230,168,12291,173,8213,8741,65340,8764,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,177,215,247,8800,8804,8805,8734,8756,176,8242,8243,8451,8491,65504,65505,65509,9794,9792,8736,8869,8978,8706,8711,8801,8786,167,8251,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8594,8592,8593,8595,8596,12307,8810,8811,8730,8765,8733,8757,8747,8748,8712,8715,8838,8839,8834,8835,8746,8745,8743,8744,65506,51472,51474,51475,51476,51477,51478,51479,51481,51482,51483,51484,51485,51486,51487,51488,51489,51490,51491,51492,51493,51494,51495,51496,51497,51498,51499,null,null,null,null,null,null,51501,51502,51503,51504,51505,51506,51507,51509,51510,51511,51512,51513,51514,51515,51516,51517,51518,51519,51520,51521,51522,51523,51524,51525,51526,51527,null,null,null,null,null,null,51528,51529,51530,51531,51532,51533,51534,51535,51538,51539,51541,51542,51543,51545,51546,51547,51548,51549,51550,51551,51554,51556,51557,51558,51559,51560,51561,51562,51563,51565,51566,51567,8658,8660,8704,8707,180,65374,711,728,733,730,729,184,731,161,191,720,8750,8721,8719,164,8457,8240,9665,9664,9655,9654,9828,9824,9825,9829,9831,9827,8857,9672,9635,9680,9681,9618,9636,9637,9640,9639,9638,9641,9832,9743,9742,9756,9758,182,8224,8225,8597,8599,8601,8598,8600,9837,9833,9834,9836,12927,12828,8470,13255,8482,13250,13272,8481,8364,174,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51569,51570,51571,51573,51574,51575,51576,51577,51578,51579,51581,51582,51583,51584,51585,51586,51587,51588,51589,51590,51591,51594,51595,51597,51598,51599,null,null,null,null,null,null,51601,51602,51603,51604,51605,51606,51607,51610,51612,51614,51615,51616,51617,51618,51619,51620,51621,51622,51623,51624,51625,51626,51627,51628,51629,51630,null,null,null,null,null,null,51631,51632,51633,51634,51635,51636,51637,51638,51639,51640,51641,51642,51643,51644,51645,51646,51647,51650,51651,51653,51654,51657,51659,51660,51661,51662,51663,51666,51668,51671,51672,51675,65281,65282,65283,65284,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65510,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,51678,51679,51681,51683,51685,51686,51688,51689,51690,51691,51694,51698,51699,51700,51701,51702,51703,51706,51707,51709,51710,51711,51713,51714,51715,51716,null,null,null,null,null,null,51717,51718,51719,51722,51726,51727,51728,51729,51730,51731,51733,51734,51735,51737,51738,51739,51740,51741,51742,51743,51744,51745,51746,51747,51748,51749,null,null,null,null,null,null,51750,51751,51752,51754,51755,51756,51757,51758,51759,51760,51761,51762,51763,51764,51765,51766,51767,51768,51769,51770,51771,51772,51773,51774,51775,51776,51777,51778,51779,51780,51781,51782,12593,12594,12595,12596,12597,12598,12599,12600,12601,12602,12603,12604,12605,12606,12607,12608,12609,12610,12611,12612,12613,12614,12615,12616,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,12630,12631,12632,12633,12634,12635,12636,12637,12638,12639,12640,12641,12642,12643,12644,12645,12646,12647,12648,12649,12650,12651,12652,12653,12654,12655,12656,12657,12658,12659,12660,12661,12662,12663,12664,12665,12666,12667,12668,12669,12670,12671,12672,12673,12674,12675,12676,12677,12678,12679,12680,12681,12682,12683,12684,12685,12686,51783,51784,51785,51786,51787,51790,51791,51793,51794,51795,51797,51798,51799,51800,51801,51802,51803,51806,51810,51811,51812,51813,51814,51815,51817,51818,null,null,null,null,null,null,51819,51820,51821,51822,51823,51824,51825,51826,51827,51828,51829,51830,51831,51832,51833,51834,51835,51836,51838,51839,51840,51841,51842,51843,51845,51846,null,null,null,null,null,null,51847,51848,51849,51850,51851,51852,51853,51854,51855,51856,51857,51858,51859,51860,51861,51862,51863,51865,51866,51867,51868,51869,51870,51871,51872,51873,51874,51875,51876,51877,51878,51879,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,null,null,null,null,null,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,51880,51881,51882,51883,51884,51885,51886,51887,51888,51889,51890,51891,51892,51893,51894,51895,51896,51897,51898,51899,51902,51903,51905,51906,51907,51909,null,null,null,null,null,null,51910,51911,51912,51913,51914,51915,51918,51920,51922,51924,51925,51926,51927,51930,51931,51932,51933,51934,51935,51937,51938,51939,51940,51941,51942,51943,null,null,null,null,null,null,51944,51945,51946,51947,51949,51950,51951,51952,51953,51954,51955,51957,51958,51959,51960,51961,51962,51963,51964,51965,51966,51967,51968,51969,51970,51971,51972,51973,51974,51975,51977,51978,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,9490,9489,9498,9497,9494,9493,9486,9485,9502,9503,9505,9506,9510,9511,9513,9514,9517,9518,9521,9522,9525,9526,9529,9530,9533,9534,9536,9537,9539,9540,9541,9542,9543,9544,9545,9546,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,51979,51980,51981,51982,51983,51985,51986,51987,51989,51990,51991,51993,51994,51995,51996,51997,51998,51999,52002,52003,52004,52005,52006,52007,52008,52009,null,null,null,null,null,null,52010,52011,52012,52013,52014,52015,52016,52017,52018,52019,52020,52021,52022,52023,52024,52025,52026,52027,52028,52029,52030,52031,52032,52034,52035,52036,null,null,null,null,null,null,52037,52038,52039,52042,52043,52045,52046,52047,52049,52050,52051,52052,52053,52054,52055,52058,52059,52060,52062,52063,52064,52065,52066,52067,52069,52070,52071,52072,52073,52074,52075,52076,13205,13206,13207,8467,13208,13252,13219,13220,13221,13222,13209,13210,13211,13212,13213,13214,13215,13216,13217,13218,13258,13197,13198,13199,13263,13192,13193,13256,13223,13224,13232,13233,13234,13235,13236,13237,13238,13239,13240,13241,13184,13185,13186,13187,13188,13242,13243,13244,13245,13246,13247,13200,13201,13202,13203,13204,8486,13248,13249,13194,13195,13196,13270,13253,13229,13230,13231,13275,13225,13226,13227,13228,13277,13264,13267,13251,13257,13276,13254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52077,52078,52079,52080,52081,52082,52083,52084,52085,52086,52087,52090,52091,52092,52093,52094,52095,52096,52097,52098,52099,52100,52101,52102,52103,52104,null,null,null,null,null,null,52105,52106,52107,52108,52109,52110,52111,52112,52113,52114,52115,52116,52117,52118,52119,52120,52121,52122,52123,52125,52126,52127,52128,52129,52130,52131,null,null,null,null,null,null,52132,52133,52134,52135,52136,52137,52138,52139,52140,52141,52142,52143,52144,52145,52146,52147,52148,52149,52150,52151,52153,52154,52155,52156,52157,52158,52159,52160,52161,52162,52163,52164,198,208,170,294,null,306,null,319,321,216,338,186,222,358,330,null,12896,12897,12898,12899,12900,12901,12902,12903,12904,12905,12906,12907,12908,12909,12910,12911,12912,12913,12914,12915,12916,12917,12918,12919,12920,12921,12922,12923,9424,9425,9426,9427,9428,9429,9430,9431,9432,9433,9434,9435,9436,9437,9438,9439,9440,9441,9442,9443,9444,9445,9446,9447,9448,9449,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,189,8531,8532,188,190,8539,8540,8541,8542,52165,52166,52167,52168,52169,52170,52171,52172,52173,52174,52175,52176,52177,52178,52179,52181,52182,52183,52184,52185,52186,52187,52188,52189,52190,52191,null,null,null,null,null,null,52192,52193,52194,52195,52197,52198,52200,52202,52203,52204,52205,52206,52207,52208,52209,52210,52211,52212,52213,52214,52215,52216,52217,52218,52219,52220,null,null,null,null,null,null,52221,52222,52223,52224,52225,52226,52227,52228,52229,52230,52231,52232,52233,52234,52235,52238,52239,52241,52242,52243,52245,52246,52247,52248,52249,52250,52251,52254,52255,52256,52259,52260,230,273,240,295,305,307,312,320,322,248,339,223,254,359,331,329,12800,12801,12802,12803,12804,12805,12806,12807,12808,12809,12810,12811,12812,12813,12814,12815,12816,12817,12818,12819,12820,12821,12822,12823,12824,12825,12826,12827,9372,9373,9374,9375,9376,9377,9378,9379,9380,9381,9382,9383,9384,9385,9386,9387,9388,9389,9390,9391,9392,9393,9394,9395,9396,9397,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,185,178,179,8308,8319,8321,8322,8323,8324,52261,52262,52266,52267,52269,52271,52273,52274,52275,52276,52277,52278,52279,52282,52287,52288,52289,52290,52291,52294,52295,52297,52298,52299,52301,52302,null,null,null,null,null,null,52303,52304,52305,52306,52307,52310,52314,52315,52316,52317,52318,52319,52321,52322,52323,52325,52327,52329,52330,52331,52332,52333,52334,52335,52337,52338,null,null,null,null,null,null,52339,52340,52342,52343,52344,52345,52346,52347,52348,52349,52350,52351,52352,52353,52354,52355,52356,52357,52358,52359,52360,52361,52362,52363,52364,52365,52366,52367,52368,52369,52370,52371,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,52372,52373,52374,52375,52378,52379,52381,52382,52383,52385,52386,52387,52388,52389,52390,52391,52394,52398,52399,52400,52401,52402,52403,52406,52407,52409,null,null,null,null,null,null,52410,52411,52413,52414,52415,52416,52417,52418,52419,52422,52424,52426,52427,52428,52429,52430,52431,52433,52434,52435,52437,52438,52439,52440,52441,52442,null,null,null,null,null,null,52443,52444,52445,52446,52447,52448,52449,52450,52451,52453,52454,52455,52456,52457,52458,52459,52461,52462,52463,52465,52466,52467,52468,52469,52470,52471,52472,52473,52474,52475,52476,52477,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,52478,52479,52480,52482,52483,52484,52485,52486,52487,52490,52491,52493,52494,52495,52497,52498,52499,52500,52501,52502,52503,52506,52508,52510,52511,52512,null,null,null,null,null,null,52513,52514,52515,52517,52518,52519,52521,52522,52523,52525,52526,52527,52528,52529,52530,52531,52532,52533,52534,52535,52536,52538,52539,52540,52541,52542,null,null,null,null,null,null,52543,52544,52545,52546,52547,52548,52549,52550,52551,52552,52553,52554,52555,52556,52557,52558,52559,52560,52561,52562,52563,52564,52565,52566,52567,52568,52569,52570,52571,52573,52574,52575,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,52577,52578,52579,52581,52582,52583,52584,52585,52586,52587,52590,52592,52594,52595,52596,52597,52598,52599,52601,52602,52603,52604,52605,52606,52607,52608,null,null,null,null,null,null,52609,52610,52611,52612,52613,52614,52615,52617,52618,52619,52620,52621,52622,52623,52624,52625,52626,52627,52630,52631,52633,52634,52635,52637,52638,52639,null,null,null,null,null,null,52640,52641,52642,52643,52646,52648,52650,52651,52652,52653,52654,52655,52657,52658,52659,52660,52661,52662,52663,52664,52665,52666,52667,52668,52669,52670,52671,52672,52673,52674,52675,52677,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52678,52679,52680,52681,52682,52683,52685,52686,52687,52689,52690,52691,52692,52693,52694,52695,52696,52697,52698,52699,52700,52701,52702,52703,52704,52705,null,null,null,null,null,null,52706,52707,52708,52709,52710,52711,52713,52714,52715,52717,52718,52719,52721,52722,52723,52724,52725,52726,52727,52730,52732,52734,52735,52736,52737,52738,null,null,null,null,null,null,52739,52741,52742,52743,52745,52746,52747,52749,52750,52751,52752,52753,52754,52755,52757,52758,52759,52760,52762,52763,52764,52765,52766,52767,52770,52771,52773,52774,52775,52777,52778,52779,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52780,52781,52782,52783,52786,52788,52790,52791,52792,52793,52794,52795,52796,52797,52798,52799,52800,52801,52802,52803,52804,52805,52806,52807,52808,52809,null,null,null,null,null,null,52810,52811,52812,52813,52814,52815,52816,52817,52818,52819,52820,52821,52822,52823,52826,52827,52829,52830,52834,52835,52836,52837,52838,52839,52842,52844,null,null,null,null,null,null,52846,52847,52848,52849,52850,52851,52854,52855,52857,52858,52859,52861,52862,52863,52864,52865,52866,52867,52870,52872,52874,52875,52876,52877,52878,52879,52882,52883,52885,52886,52887,52889,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,52890,52891,52892,52893,52894,52895,52898,52902,52903,52904,52905,52906,52907,52910,52911,52912,52913,52914,52915,52916,52917,52918,52919,52920,52921,52922,null,null,null,null,null,null,52923,52924,52925,52926,52927,52928,52930,52931,52932,52933,52934,52935,52936,52937,52938,52939,52940,52941,52942,52943,52944,52945,52946,52947,52948,52949,null,null,null,null,null,null,52950,52951,52952,52953,52954,52955,52956,52957,52958,52959,52960,52961,52962,52963,52966,52967,52969,52970,52973,52974,52975,52976,52977,52978,52979,52982,52986,52987,52988,52989,52990,52991,44032,44033,44036,44039,44040,44041,44042,44048,44049,44050,44051,44052,44053,44054,44055,44057,44058,44059,44060,44061,44064,44068,44076,44077,44079,44080,44081,44088,44089,44092,44096,44107,44109,44116,44120,44124,44144,44145,44148,44151,44152,44154,44160,44161,44163,44164,44165,44166,44169,44170,44171,44172,44176,44180,44188,44189,44191,44192,44193,44200,44201,44202,44204,44207,44208,44216,44217,44219,44220,44221,44225,44228,44232,44236,44245,44247,44256,44257,44260,44263,44264,44266,44268,44271,44272,44273,44275,44277,44278,44284,44285,44288,44292,44294,52994,52995,52997,52998,52999,53001,53002,53003,53004,53005,53006,53007,53010,53012,53014,53015,53016,53017,53018,53019,53021,53022,53023,53025,53026,53027,null,null,null,null,null,null,53029,53030,53031,53032,53033,53034,53035,53038,53042,53043,53044,53045,53046,53047,53049,53050,53051,53052,53053,53054,53055,53056,53057,53058,53059,53060,null,null,null,null,null,null,53061,53062,53063,53064,53065,53066,53067,53068,53069,53070,53071,53072,53073,53074,53075,53078,53079,53081,53082,53083,53085,53086,53087,53088,53089,53090,53091,53094,53096,53098,53099,53100,44300,44301,44303,44305,44312,44316,44320,44329,44332,44333,44340,44341,44344,44348,44356,44357,44359,44361,44368,44372,44376,44385,44387,44396,44397,44400,44403,44404,44405,44406,44411,44412,44413,44415,44417,44418,44424,44425,44428,44432,44444,44445,44452,44471,44480,44481,44484,44488,44496,44497,44499,44508,44512,44516,44536,44537,44540,44543,44544,44545,44552,44553,44555,44557,44564,44592,44593,44596,44599,44600,44602,44608,44609,44611,44613,44614,44618,44620,44621,44622,44624,44628,44630,44636,44637,44639,44640,44641,44645,44648,44649,44652,44656,44664,53101,53102,53103,53106,53107,53109,53110,53111,53113,53114,53115,53116,53117,53118,53119,53121,53122,53123,53124,53126,53127,53128,53129,53130,53131,53133,null,null,null,null,null,null,53134,53135,53136,53137,53138,53139,53140,53141,53142,53143,53144,53145,53146,53147,53148,53149,53150,53151,53152,53154,53155,53156,53157,53158,53159,53161,null,null,null,null,null,null,53162,53163,53164,53165,53166,53167,53169,53170,53171,53172,53173,53174,53175,53176,53177,53178,53179,53180,53181,53182,53183,53184,53185,53186,53187,53189,53190,53191,53192,53193,53194,53195,44665,44667,44668,44669,44676,44677,44684,44732,44733,44734,44736,44740,44748,44749,44751,44752,44753,44760,44761,44764,44776,44779,44781,44788,44792,44796,44807,44808,44813,44816,44844,44845,44848,44850,44852,44860,44861,44863,44865,44866,44867,44872,44873,44880,44892,44893,44900,44901,44921,44928,44932,44936,44944,44945,44949,44956,44984,44985,44988,44992,44999,45000,45001,45003,45005,45006,45012,45020,45032,45033,45040,45041,45044,45048,45056,45057,45060,45068,45072,45076,45084,45085,45096,45124,45125,45128,45130,45132,45134,45139,45140,45141,45143,45145,53196,53197,53198,53199,53200,53201,53202,53203,53204,53205,53206,53207,53208,53209,53210,53211,53212,53213,53214,53215,53218,53219,53221,53222,53223,53225,null,null,null,null,null,null,53226,53227,53228,53229,53230,53231,53234,53236,53238,53239,53240,53241,53242,53243,53245,53246,53247,53249,53250,53251,53253,53254,53255,53256,53257,53258,null,null,null,null,null,null,53259,53260,53261,53262,53263,53264,53266,53267,53268,53269,53270,53271,53273,53274,53275,53276,53277,53278,53279,53280,53281,53282,53283,53284,53285,53286,53287,53288,53289,53290,53291,53292,45149,45180,45181,45184,45188,45196,45197,45199,45201,45208,45209,45210,45212,45215,45216,45217,45218,45224,45225,45227,45228,45229,45230,45231,45233,45235,45236,45237,45240,45244,45252,45253,45255,45256,45257,45264,45265,45268,45272,45280,45285,45320,45321,45323,45324,45328,45330,45331,45336,45337,45339,45340,45341,45347,45348,45349,45352,45356,45364,45365,45367,45368,45369,45376,45377,45380,45384,45392,45393,45396,45397,45400,45404,45408,45432,45433,45436,45440,45442,45448,45449,45451,45453,45458,45459,45460,45464,45468,45480,45516,45520,45524,45532,45533,53294,53295,53296,53297,53298,53299,53302,53303,53305,53306,53307,53309,53310,53311,53312,53313,53314,53315,53318,53320,53322,53323,53324,53325,53326,53327,null,null,null,null,null,null,53329,53330,53331,53333,53334,53335,53337,53338,53339,53340,53341,53342,53343,53345,53346,53347,53348,53349,53350,53351,53352,53353,53354,53355,53358,53359,null,null,null,null,null,null,53361,53362,53363,53365,53366,53367,53368,53369,53370,53371,53374,53375,53376,53378,53379,53380,53381,53382,53383,53384,53385,53386,53387,53388,53389,53390,53391,53392,53393,53394,53395,53396,45535,45544,45545,45548,45552,45561,45563,45565,45572,45573,45576,45579,45580,45588,45589,45591,45593,45600,45620,45628,45656,45660,45664,45672,45673,45684,45685,45692,45700,45701,45705,45712,45713,45716,45720,45721,45722,45728,45729,45731,45733,45734,45738,45740,45744,45748,45768,45769,45772,45776,45778,45784,45785,45787,45789,45794,45796,45797,45798,45800,45803,45804,45805,45806,45807,45811,45812,45813,45815,45816,45817,45818,45819,45823,45824,45825,45828,45832,45840,45841,45843,45844,45845,45852,45908,45909,45910,45912,45915,45916,45918,45919,45924,45925,53397,53398,53399,53400,53401,53402,53403,53404,53405,53406,53407,53408,53409,53410,53411,53414,53415,53417,53418,53419,53421,53422,53423,53424,53425,53426,null,null,null,null,null,null,53427,53430,53432,53434,53435,53436,53437,53438,53439,53442,53443,53445,53446,53447,53450,53451,53452,53453,53454,53455,53458,53462,53463,53464,53465,53466,null,null,null,null,null,null,53467,53470,53471,53473,53474,53475,53477,53478,53479,53480,53481,53482,53483,53486,53490,53491,53492,53493,53494,53495,53497,53498,53499,53500,53501,53502,53503,53504,53505,53506,53507,53508,45927,45929,45931,45934,45936,45937,45940,45944,45952,45953,45955,45956,45957,45964,45968,45972,45984,45985,45992,45996,46020,46021,46024,46027,46028,46030,46032,46036,46037,46039,46041,46043,46045,46048,46052,46056,46076,46096,46104,46108,46112,46120,46121,46123,46132,46160,46161,46164,46168,46176,46177,46179,46181,46188,46208,46216,46237,46244,46248,46252,46261,46263,46265,46272,46276,46280,46288,46293,46300,46301,46304,46307,46308,46310,46316,46317,46319,46321,46328,46356,46357,46360,46363,46364,46372,46373,46375,46376,46377,46378,46384,46385,46388,46392,53509,53510,53511,53512,53513,53514,53515,53516,53518,53519,53520,53521,53522,53523,53524,53525,53526,53527,53528,53529,53530,53531,53532,53533,53534,53535,null,null,null,null,null,null,53536,53537,53538,53539,53540,53541,53542,53543,53544,53545,53546,53547,53548,53549,53550,53551,53554,53555,53557,53558,53559,53561,53563,53564,53565,53566,null,null,null,null,null,null,53567,53570,53574,53575,53576,53577,53578,53579,53582,53583,53585,53586,53587,53589,53590,53591,53592,53593,53594,53595,53598,53600,53602,53603,53604,53605,53606,53607,53609,53610,53611,53613,46400,46401,46403,46404,46405,46411,46412,46413,46416,46420,46428,46429,46431,46432,46433,46496,46497,46500,46504,46506,46507,46512,46513,46515,46516,46517,46523,46524,46525,46528,46532,46540,46541,46543,46544,46545,46552,46572,46608,46609,46612,46616,46629,46636,46644,46664,46692,46696,46748,46749,46752,46756,46763,46764,46769,46804,46832,46836,46840,46848,46849,46853,46888,46889,46892,46895,46896,46904,46905,46907,46916,46920,46924,46932,46933,46944,46948,46952,46960,46961,46963,46965,46972,46973,46976,46980,46988,46989,46991,46992,46993,46994,46998,46999,53614,53615,53616,53617,53618,53619,53620,53621,53622,53623,53624,53625,53626,53627,53629,53630,53631,53632,53633,53634,53635,53637,53638,53639,53641,53642,null,null,null,null,null,null,53643,53644,53645,53646,53647,53648,53649,53650,53651,53652,53653,53654,53655,53656,53657,53658,53659,53660,53661,53662,53663,53666,53667,53669,53670,53671,null,null,null,null,null,null,53673,53674,53675,53676,53677,53678,53679,53682,53684,53686,53687,53688,53689,53691,53693,53694,53695,53697,53698,53699,53700,53701,53702,53703,53704,53705,53706,53707,53708,53709,53710,53711,47000,47001,47004,47008,47016,47017,47019,47020,47021,47028,47029,47032,47047,47049,47084,47085,47088,47092,47100,47101,47103,47104,47105,47111,47112,47113,47116,47120,47128,47129,47131,47133,47140,47141,47144,47148,47156,47157,47159,47160,47161,47168,47172,47185,47187,47196,47197,47200,47204,47212,47213,47215,47217,47224,47228,47245,47272,47280,47284,47288,47296,47297,47299,47301,47308,47312,47316,47325,47327,47329,47336,47337,47340,47344,47352,47353,47355,47357,47364,47384,47392,47420,47421,47424,47428,47436,47439,47441,47448,47449,47452,47456,47464,47465,53712,53713,53714,53715,53716,53717,53718,53719,53721,53722,53723,53724,53725,53726,53727,53728,53729,53730,53731,53732,53733,53734,53735,53736,53737,53738,null,null,null,null,null,null,53739,53740,53741,53742,53743,53744,53745,53746,53747,53749,53750,53751,53753,53754,53755,53756,53757,53758,53759,53760,53761,53762,53763,53764,53765,53766,null,null,null,null,null,null,53768,53770,53771,53772,53773,53774,53775,53777,53778,53779,53780,53781,53782,53783,53784,53785,53786,53787,53788,53789,53790,53791,53792,53793,53794,53795,53796,53797,53798,53799,53800,53801,47467,47469,47476,47477,47480,47484,47492,47493,47495,47497,47498,47501,47502,47532,47533,47536,47540,47548,47549,47551,47553,47560,47561,47564,47566,47567,47568,47569,47570,47576,47577,47579,47581,47582,47585,47587,47588,47589,47592,47596,47604,47605,47607,47608,47609,47610,47616,47617,47624,47637,47672,47673,47676,47680,47682,47688,47689,47691,47693,47694,47699,47700,47701,47704,47708,47716,47717,47719,47720,47721,47728,47729,47732,47736,47747,47748,47749,47751,47756,47784,47785,47787,47788,47792,47794,47800,47801,47803,47805,47812,47816,47832,47833,47868,53802,53803,53806,53807,53809,53810,53811,53813,53814,53815,53816,53817,53818,53819,53822,53824,53826,53827,53828,53829,53830,53831,53833,53834,53835,53836,null,null,null,null,null,null,53837,53838,53839,53840,53841,53842,53843,53844,53845,53846,53847,53848,53849,53850,53851,53853,53854,53855,53856,53857,53858,53859,53861,53862,53863,53864,null,null,null,null,null,null,53865,53866,53867,53868,53869,53870,53871,53872,53873,53874,53875,53876,53877,53878,53879,53880,53881,53882,53883,53884,53885,53886,53887,53890,53891,53893,53894,53895,53897,53898,53899,53900,47872,47876,47885,47887,47889,47896,47900,47904,47913,47915,47924,47925,47926,47928,47931,47932,47933,47934,47940,47941,47943,47945,47949,47951,47952,47956,47960,47969,47971,47980,48008,48012,48016,48036,48040,48044,48052,48055,48064,48068,48072,48080,48083,48120,48121,48124,48127,48128,48130,48136,48137,48139,48140,48141,48143,48145,48148,48149,48150,48151,48152,48155,48156,48157,48158,48159,48164,48165,48167,48169,48173,48176,48177,48180,48184,48192,48193,48195,48196,48197,48201,48204,48205,48208,48221,48260,48261,48264,48267,48268,48270,48276,48277,48279,53901,53902,53903,53906,53907,53908,53910,53911,53912,53913,53914,53915,53917,53918,53919,53921,53922,53923,53925,53926,53927,53928,53929,53930,53931,53933,null,null,null,null,null,null,53934,53935,53936,53938,53939,53940,53941,53942,53943,53946,53947,53949,53950,53953,53955,53956,53957,53958,53959,53962,53964,53965,53966,53967,53968,53969,null,null,null,null,null,null,53970,53971,53973,53974,53975,53977,53978,53979,53981,53982,53983,53984,53985,53986,53987,53990,53991,53992,53993,53994,53995,53996,53997,53998,53999,54002,54003,54005,54006,54007,54009,54010,48281,48282,48288,48289,48292,48295,48296,48304,48305,48307,48308,48309,48316,48317,48320,48324,48333,48335,48336,48337,48341,48344,48348,48372,48373,48374,48376,48380,48388,48389,48391,48393,48400,48404,48420,48428,48448,48456,48457,48460,48464,48472,48473,48484,48488,48512,48513,48516,48519,48520,48521,48522,48528,48529,48531,48533,48537,48538,48540,48548,48560,48568,48596,48597,48600,48604,48617,48624,48628,48632,48640,48643,48645,48652,48653,48656,48660,48668,48669,48671,48708,48709,48712,48716,48718,48724,48725,48727,48729,48730,48731,48736,48737,48740,54011,54012,54013,54014,54015,54018,54020,54022,54023,54024,54025,54026,54027,54031,54033,54034,54035,54037,54039,54040,54041,54042,54043,54046,54050,54051,null,null,null,null,null,null,54052,54054,54055,54058,54059,54061,54062,54063,54065,54066,54067,54068,54069,54070,54071,54074,54078,54079,54080,54081,54082,54083,54086,54087,54088,54089,null,null,null,null,null,null,54090,54091,54092,54093,54094,54095,54096,54097,54098,54099,54100,54101,54102,54103,54104,54105,54106,54107,54108,54109,54110,54111,54112,54113,54114,54115,54116,54117,54118,54119,54120,54121,48744,48746,48752,48753,48755,48756,48757,48763,48764,48765,48768,48772,48780,48781,48783,48784,48785,48792,48793,48808,48848,48849,48852,48855,48856,48864,48867,48868,48869,48876,48897,48904,48905,48920,48921,48923,48924,48925,48960,48961,48964,48968,48976,48977,48981,49044,49072,49093,49100,49101,49104,49108,49116,49119,49121,49212,49233,49240,49244,49248,49256,49257,49296,49297,49300,49304,49312,49313,49315,49317,49324,49325,49327,49328,49331,49332,49333,49334,49340,49341,49343,49344,49345,49349,49352,49353,49356,49360,49368,49369,49371,49372,49373,49380,54122,54123,54124,54125,54126,54127,54128,54129,54130,54131,54132,54133,54134,54135,54136,54137,54138,54139,54142,54143,54145,54146,54147,54149,54150,54151,null,null,null,null,null,null,54152,54153,54154,54155,54158,54162,54163,54164,54165,54166,54167,54170,54171,54173,54174,54175,54177,54178,54179,54180,54181,54182,54183,54186,54188,54190,null,null,null,null,null,null,54191,54192,54193,54194,54195,54197,54198,54199,54201,54202,54203,54205,54206,54207,54208,54209,54210,54211,54214,54215,54218,54219,54220,54221,54222,54223,54225,54226,54227,54228,54229,54230,49381,49384,49388,49396,49397,49399,49401,49408,49412,49416,49424,49429,49436,49437,49438,49439,49440,49443,49444,49446,49447,49452,49453,49455,49456,49457,49462,49464,49465,49468,49472,49480,49481,49483,49484,49485,49492,49493,49496,49500,49508,49509,49511,49512,49513,49520,49524,49528,49541,49548,49549,49550,49552,49556,49558,49564,49565,49567,49569,49573,49576,49577,49580,49584,49597,49604,49608,49612,49620,49623,49624,49632,49636,49640,49648,49649,49651,49660,49661,49664,49668,49676,49677,49679,49681,49688,49689,49692,49695,49696,49704,49705,49707,49709,54231,54233,54234,54235,54236,54237,54238,54239,54240,54242,54244,54245,54246,54247,54248,54249,54250,54251,54254,54255,54257,54258,54259,54261,54262,54263,null,null,null,null,null,null,54264,54265,54266,54267,54270,54272,54274,54275,54276,54277,54278,54279,54281,54282,54283,54284,54285,54286,54287,54288,54289,54290,54291,54292,54293,54294,null,null,null,null,null,null,54295,54296,54297,54298,54299,54300,54302,54303,54304,54305,54306,54307,54308,54309,54310,54311,54312,54313,54314,54315,54316,54317,54318,54319,54320,54321,54322,54323,54324,54325,54326,54327,49711,49713,49714,49716,49736,49744,49745,49748,49752,49760,49765,49772,49773,49776,49780,49788,49789,49791,49793,49800,49801,49808,49816,49819,49821,49828,49829,49832,49836,49837,49844,49845,49847,49849,49884,49885,49888,49891,49892,49899,49900,49901,49903,49905,49910,49912,49913,49915,49916,49920,49928,49929,49932,49933,49939,49940,49941,49944,49948,49956,49957,49960,49961,49989,50024,50025,50028,50032,50034,50040,50041,50044,50045,50052,50056,50060,50112,50136,50137,50140,50143,50144,50146,50152,50153,50157,50164,50165,50168,50184,50192,50212,50220,50224,54328,54329,54330,54331,54332,54333,54334,54335,54337,54338,54339,54341,54342,54343,54344,54345,54346,54347,54348,54349,54350,54351,54352,54353,54354,54355,null,null,null,null,null,null,54356,54357,54358,54359,54360,54361,54362,54363,54365,54366,54367,54369,54370,54371,54373,54374,54375,54376,54377,54378,54379,54380,54382,54384,54385,54386,null,null,null,null,null,null,54387,54388,54389,54390,54391,54394,54395,54397,54398,54401,54403,54404,54405,54406,54407,54410,54412,54414,54415,54416,54417,54418,54419,54421,54422,54423,54424,54425,54426,54427,54428,54429,50228,50236,50237,50248,50276,50277,50280,50284,50292,50293,50297,50304,50324,50332,50360,50364,50409,50416,50417,50420,50424,50426,50431,50432,50433,50444,50448,50452,50460,50472,50473,50476,50480,50488,50489,50491,50493,50500,50501,50504,50505,50506,50508,50509,50510,50515,50516,50517,50519,50520,50521,50525,50526,50528,50529,50532,50536,50544,50545,50547,50548,50549,50556,50557,50560,50564,50567,50572,50573,50575,50577,50581,50583,50584,50588,50592,50601,50612,50613,50616,50617,50619,50620,50621,50622,50628,50629,50630,50631,50632,50633,50634,50636,50638,54430,54431,54432,54433,54434,54435,54436,54437,54438,54439,54440,54442,54443,54444,54445,54446,54447,54448,54449,54450,54451,54452,54453,54454,54455,54456,null,null,null,null,null,null,54457,54458,54459,54460,54461,54462,54463,54464,54465,54466,54467,54468,54469,54470,54471,54472,54473,54474,54475,54477,54478,54479,54481,54482,54483,54485,null,null,null,null,null,null,54486,54487,54488,54489,54490,54491,54493,54494,54496,54497,54498,54499,54500,54501,54502,54503,54505,54506,54507,54509,54510,54511,54513,54514,54515,54516,54517,54518,54519,54521,54522,54524,50640,50641,50644,50648,50656,50657,50659,50661,50668,50669,50670,50672,50676,50678,50679,50684,50685,50686,50687,50688,50689,50693,50694,50695,50696,50700,50704,50712,50713,50715,50716,50724,50725,50728,50732,50733,50734,50736,50739,50740,50741,50743,50745,50747,50752,50753,50756,50760,50768,50769,50771,50772,50773,50780,50781,50784,50796,50799,50801,50808,50809,50812,50816,50824,50825,50827,50829,50836,50837,50840,50844,50852,50853,50855,50857,50864,50865,50868,50872,50873,50874,50880,50881,50883,50885,50892,50893,50896,50900,50908,50909,50912,50913,50920,54526,54527,54528,54529,54530,54531,54533,54534,54535,54537,54538,54539,54541,54542,54543,54544,54545,54546,54547,54550,54552,54553,54554,54555,54556,54557,null,null,null,null,null,null,54558,54559,54560,54561,54562,54563,54564,54565,54566,54567,54568,54569,54570,54571,54572,54573,54574,54575,54576,54577,54578,54579,54580,54581,54582,54583,null,null,null,null,null,null,54584,54585,54586,54587,54590,54591,54593,54594,54595,54597,54598,54599,54600,54601,54602,54603,54606,54608,54610,54611,54612,54613,54614,54615,54618,54619,54621,54622,54623,54625,54626,54627,50921,50924,50928,50936,50937,50941,50948,50949,50952,50956,50964,50965,50967,50969,50976,50977,50980,50984,50992,50993,50995,50997,50999,51004,51005,51008,51012,51018,51020,51021,51023,51025,51026,51027,51028,51029,51030,51031,51032,51036,51040,51048,51051,51060,51061,51064,51068,51069,51070,51075,51076,51077,51079,51080,51081,51082,51086,51088,51089,51092,51094,51095,51096,51098,51104,51105,51107,51108,51109,51110,51116,51117,51120,51124,51132,51133,51135,51136,51137,51144,51145,51148,51150,51152,51160,51165,51172,51176,51180,51200,51201,51204,51208,51210,54628,54630,54631,54634,54636,54638,54639,54640,54641,54642,54643,54646,54647,54649,54650,54651,54653,54654,54655,54656,54657,54658,54659,54662,54666,54667,null,null,null,null,null,null,54668,54669,54670,54671,54673,54674,54675,54676,54677,54678,54679,54680,54681,54682,54683,54684,54685,54686,54687,54688,54689,54690,54691,54692,54694,54695,null,null,null,null,null,null,54696,54697,54698,54699,54700,54701,54702,54703,54704,54705,54706,54707,54708,54709,54710,54711,54712,54713,54714,54715,54716,54717,54718,54719,54720,54721,54722,54723,54724,54725,54726,54727,51216,51217,51219,51221,51222,51228,51229,51232,51236,51244,51245,51247,51249,51256,51260,51264,51272,51273,51276,51277,51284,51312,51313,51316,51320,51322,51328,51329,51331,51333,51334,51335,51339,51340,51341,51348,51357,51359,51361,51368,51388,51389,51396,51400,51404,51412,51413,51415,51417,51424,51425,51428,51445,51452,51453,51456,51460,51461,51462,51468,51469,51471,51473,51480,51500,51508,51536,51537,51540,51544,51552,51553,51555,51564,51568,51572,51580,51592,51593,51596,51600,51608,51609,51611,51613,51648,51649,51652,51655,51656,51658,51664,51665,51667,54730,54731,54733,54734,54735,54737,54739,54740,54741,54742,54743,54746,54748,54750,54751,54752,54753,54754,54755,54758,54759,54761,54762,54763,54765,54766,null,null,null,null,null,null,54767,54768,54769,54770,54771,54774,54776,54778,54779,54780,54781,54782,54783,54786,54787,54789,54790,54791,54793,54794,54795,54796,54797,54798,54799,54802,null,null,null,null,null,null,54806,54807,54808,54809,54810,54811,54813,54814,54815,54817,54818,54819,54821,54822,54823,54824,54825,54826,54827,54828,54830,54831,54832,54833,54834,54835,54836,54837,54838,54839,54842,54843,51669,51670,51673,51674,51676,51677,51680,51682,51684,51687,51692,51693,51695,51696,51697,51704,51705,51708,51712,51720,51721,51723,51724,51725,51732,51736,51753,51788,51789,51792,51796,51804,51805,51807,51808,51809,51816,51837,51844,51864,51900,51901,51904,51908,51916,51917,51919,51921,51923,51928,51929,51936,51948,51956,51976,51984,51988,51992,52000,52001,52033,52040,52041,52044,52048,52056,52057,52061,52068,52088,52089,52124,52152,52180,52196,52199,52201,52236,52237,52240,52244,52252,52253,52257,52258,52263,52264,52265,52268,52270,52272,52280,52281,52283,54845,54846,54847,54849,54850,54851,54852,54854,54855,54858,54860,54862,54863,54864,54866,54867,54870,54871,54873,54874,54875,54877,54878,54879,54880,54881,null,null,null,null,null,null,54882,54883,54884,54885,54886,54888,54890,54891,54892,54893,54894,54895,54898,54899,54901,54902,54903,54904,54905,54906,54907,54908,54909,54910,54911,54912,null,null,null,null,null,null,54913,54914,54916,54918,54919,54920,54921,54922,54923,54926,54927,54929,54930,54931,54933,54934,54935,54936,54937,54938,54939,54940,54942,54944,54946,54947,54948,54949,54950,54951,54953,54954,52284,52285,52286,52292,52293,52296,52300,52308,52309,52311,52312,52313,52320,52324,52326,52328,52336,52341,52376,52377,52380,52384,52392,52393,52395,52396,52397,52404,52405,52408,52412,52420,52421,52423,52425,52432,52436,52452,52460,52464,52481,52488,52489,52492,52496,52504,52505,52507,52509,52516,52520,52524,52537,52572,52576,52580,52588,52589,52591,52593,52600,52616,52628,52629,52632,52636,52644,52645,52647,52649,52656,52676,52684,52688,52712,52716,52720,52728,52729,52731,52733,52740,52744,52748,52756,52761,52768,52769,52772,52776,52784,52785,52787,52789,54955,54957,54958,54959,54961,54962,54963,54964,54965,54966,54967,54968,54970,54972,54973,54974,54975,54976,54977,54978,54979,54982,54983,54985,54986,54987,null,null,null,null,null,null,54989,54990,54991,54992,54994,54995,54997,54998,55000,55002,55003,55004,55005,55006,55007,55009,55010,55011,55013,55014,55015,55017,55018,55019,55020,55021,null,null,null,null,null,null,55022,55023,55025,55026,55027,55028,55030,55031,55032,55033,55034,55035,55038,55039,55041,55042,55043,55045,55046,55047,55048,55049,55050,55051,55052,55053,55054,55055,55056,55058,55059,55060,52824,52825,52828,52831,52832,52833,52840,52841,52843,52845,52852,52853,52856,52860,52868,52869,52871,52873,52880,52881,52884,52888,52896,52897,52899,52900,52901,52908,52909,52929,52964,52965,52968,52971,52972,52980,52981,52983,52984,52985,52992,52993,52996,53000,53008,53009,53011,53013,53020,53024,53028,53036,53037,53039,53040,53041,53048,53076,53077,53080,53084,53092,53093,53095,53097,53104,53105,53108,53112,53120,53125,53132,53153,53160,53168,53188,53216,53217,53220,53224,53232,53233,53235,53237,53244,53248,53252,53265,53272,53293,53300,53301,53304,53308,55061,55062,55063,55066,55067,55069,55070,55071,55073,55074,55075,55076,55077,55078,55079,55082,55084,55086,55087,55088,55089,55090,55091,55094,55095,55097,null,null,null,null,null,null,55098,55099,55101,55102,55103,55104,55105,55106,55107,55109,55110,55112,55114,55115,55116,55117,55118,55119,55122,55123,55125,55130,55131,55132,55133,55134,null,null,null,null,null,null,55135,55138,55140,55142,55143,55144,55146,55147,55149,55150,55151,55153,55154,55155,55157,55158,55159,55160,55161,55162,55163,55166,55167,55168,55170,55171,55172,55173,55174,55175,55178,55179,53316,53317,53319,53321,53328,53332,53336,53344,53356,53357,53360,53364,53372,53373,53377,53412,53413,53416,53420,53428,53429,53431,53433,53440,53441,53444,53448,53449,53456,53457,53459,53460,53461,53468,53469,53472,53476,53484,53485,53487,53488,53489,53496,53517,53552,53553,53556,53560,53562,53568,53569,53571,53572,53573,53580,53581,53584,53588,53596,53597,53599,53601,53608,53612,53628,53636,53640,53664,53665,53668,53672,53680,53681,53683,53685,53690,53692,53696,53720,53748,53752,53767,53769,53776,53804,53805,53808,53812,53820,53821,53823,53825,53832,53852,55181,55182,55183,55185,55186,55187,55188,55189,55190,55191,55194,55196,55198,55199,55200,55201,55202,55203,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,53860,53888,53889,53892,53896,53904,53905,53909,53916,53920,53924,53932,53937,53944,53945,53948,53951,53952,53954,53960,53961,53963,53972,53976,53980,53988,53989,54000,54001,54004,54008,54016,54017,54019,54021,54028,54029,54030,54032,54036,54038,54044,54045,54047,54048,54049,54053,54056,54057,54060,54064,54072,54073,54075,54076,54077,54084,54085,54140,54141,54144,54148,54156,54157,54159,54160,54161,54168,54169,54172,54176,54184,54185,54187,54189,54196,54200,54204,54212,54213,54216,54217,54224,54232,54241,54243,54252,54253,54256,54260,54268,54269,54271,54273,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54280,54301,54336,54340,54364,54368,54372,54381,54383,54392,54393,54396,54399,54400,54402,54408,54409,54411,54413,54420,54441,54476,54480,54484,54492,54495,54504,54508,54512,54520,54523,54525,54532,54536,54540,54548,54549,54551,54588,54589,54592,54596,54604,54605,54607,54609,54616,54617,54620,54624,54629,54632,54633,54635,54637,54644,54645,54648,54652,54660,54661,54663,54664,54665,54672,54693,54728,54729,54732,54736,54738,54744,54745,54747,54749,54756,54757,54760,54764,54772,54773,54775,54777,54784,54785,54788,54792,54800,54801,54803,54804,54805,54812,54816,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,54820,54829,54840,54841,54844,54848,54853,54856,54857,54859,54861,54865,54868,54869,54872,54876,54887,54889,54896,54897,54900,54915,54917,54924,54925,54928,54932,54941,54943,54945,54952,54956,54960,54969,54971,54980,54981,54984,54988,54993,54996,54999,55001,55008,55012,55016,55024,55029,55036,55037,55040,55044,55057,55064,55065,55068,55072,55080,55081,55083,55085,55092,55093,55096,55100,55108,55111,55113,55120,55121,55124,55126,55127,55128,55129,55136,55137,55139,55141,55145,55148,55152,55156,55164,55165,55169,55176,55177,55180,55184,55192,55193,55195,55197,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20285,20339,20551,20729,21152,21487,21621,21733,22025,23233,23478,26247,26550,26551,26607,27468,29634,30146,31292,33499,33540,34903,34952,35382,36040,36303,36603,36838,39381,21051,21364,21508,24682,24932,27580,29647,33050,35258,35282,38307,20355,21002,22718,22904,23014,24178,24185,25031,25536,26438,26604,26751,28567,30286,30475,30965,31240,31487,31777,32925,33390,33393,35563,38291,20075,21917,26359,28212,30883,31469,33883,35088,34638,38824,21208,22350,22570,23884,24863,25022,25121,25954,26577,27204,28187,29976,30131,30435,30640,32058,37039,37969,37970,40853,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21283,23724,30002,32987,37440,38296,21083,22536,23004,23713,23831,24247,24378,24394,24951,27743,30074,30086,31968,32115,32177,32652,33108,33313,34193,35137,35611,37628,38477,40007,20171,20215,20491,20977,22607,24887,24894,24936,25913,27114,28433,30117,30342,30422,31623,33445,33995,63744,37799,38283,21888,23458,22353,63745,31923,32697,37301,20520,21435,23621,24040,25298,25454,25818,25831,28192,28844,31067,36317,36382,63746,36989,37445,37624,20094,20214,20581,24062,24314,24838,26967,33137,34388,36423,37749,39467,20062,20625,26480,26688,20745,21133,21138,27298,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30652,37392,40660,21163,24623,36850,20552,25001,25581,25802,26684,27268,28608,33160,35233,38548,22533,29309,29356,29956,32121,32365,32937,35211,35700,36963,40273,25225,27770,28500,32080,32570,35363,20860,24906,31645,35609,37463,37772,20140,20435,20510,20670,20742,21185,21197,21375,22384,22659,24218,24465,24950,25004,25806,25964,26223,26299,26356,26775,28039,28805,28913,29855,29861,29898,30169,30828,30956,31455,31478,32069,32147,32789,32831,33051,33686,35686,36629,36885,37857,38915,38968,39514,39912,20418,21843,22586,22865,23395,23622,24760,25106,26690,26800,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26856,28330,30028,30328,30926,31293,31995,32363,32380,35336,35489,35903,38542,40388,21476,21481,21578,21617,22266,22993,23396,23611,24235,25335,25911,25925,25970,26272,26543,27073,27837,30204,30352,30590,31295,32660,32771,32929,33167,33510,33533,33776,34241,34865,34996,35493,63747,36764,37678,38599,39015,39640,40723,21741,26011,26354,26767,31296,35895,40288,22256,22372,23825,26118,26801,26829,28414,29736,34974,39908,27752,63748,39592,20379,20844,20849,21151,23380,24037,24656,24685,25329,25511,25915,29657,31354,34467,36002,38799,20018,23521,25096,26524,29916,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31185,33747,35463,35506,36328,36942,37707,38982,24275,27112,34303,37101,63749,20896,23448,23532,24931,26874,27454,28748,29743,29912,31649,32592,33733,35264,36011,38364,39208,21038,24669,25324,36866,20362,20809,21281,22745,24291,26336,27960,28826,29378,29654,31568,33009,37979,21350,25499,32619,20054,20608,22602,22750,24618,24871,25296,27088,39745,23439,32024,32945,36703,20132,20689,21676,21932,23308,23968,24039,25898,25934,26657,27211,29409,30350,30703,32094,32761,33184,34126,34527,36611,36686,37066,39171,39509,39851,19992,20037,20061,20167,20465,20855,21246,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21312,21475,21477,21646,22036,22389,22434,23495,23943,24272,25084,25304,25937,26552,26601,27083,27472,27590,27628,27714,28317,28792,29399,29590,29699,30655,30697,31350,32127,32777,33276,33285,33290,33503,34914,35635,36092,36544,36881,37041,37476,37558,39378,39493,40169,40407,40860,22283,23616,33738,38816,38827,40628,21531,31384,32676,35033,36557,37089,22528,23624,25496,31391,23470,24339,31353,31406,33422,36524,20518,21048,21240,21367,22280,25331,25458,27402,28099,30519,21413,29527,34152,36470,38357,26426,27331,28528,35437,36556,39243,63750,26231,27512,36020,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,39740,63751,21483,22317,22862,25542,27131,29674,30789,31418,31429,31998,33909,35215,36211,36917,38312,21243,22343,30023,31584,33740,37406,63752,27224,20811,21067,21127,25119,26840,26997,38553,20677,21156,21220,25027,26020,26681,27135,29822,31563,33465,33771,35250,35641,36817,39241,63753,20170,22935,25810,26129,27278,29748,31105,31165,33449,34942,34943,35167,63754,37670,20235,21450,24613,25201,27762,32026,32102,20120,20834,30684,32943,20225,20238,20854,20864,21980,22120,22331,22522,22524,22804,22855,22931,23492,23696,23822,24049,24190,24524,25216,26071,26083,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26398,26399,26462,26827,26820,27231,27450,27683,27773,27778,28103,29592,29734,29738,29826,29859,30072,30079,30849,30959,31041,31047,31048,31098,31637,32000,32186,32648,32774,32813,32908,35352,35663,35912,36215,37665,37668,39138,39249,39438,39439,39525,40594,32202,20342,21513,25326,26708,37329,21931,20794,63755,63756,23068,25062,63757,25295,25343,63758,63759,63760,63761,63762,63763,37027,63764,63765,63766,63767,63768,35582,63769,63770,63771,63772,26262,63773,29014,63774,63775,38627,63776,25423,25466,21335,63777,26511,26976,28275,63778,30007,63779,63780,63781,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32013,63782,63783,34930,22218,23064,63784,63785,63786,63787,63788,20035,63789,20839,22856,26608,32784,63790,22899,24180,25754,31178,24565,24684,25288,25467,23527,23511,21162,63791,22900,24361,24594,63792,63793,63794,29785,63795,63796,63797,63798,63799,63800,39377,63801,63802,63803,63804,63805,63806,63807,63808,63809,63810,63811,28611,63812,63813,33215,36786,24817,63814,63815,33126,63816,63817,23615,63818,63819,63820,63821,63822,63823,63824,63825,23273,35365,26491,32016,63826,63827,63828,63829,63830,63831,33021,63832,63833,23612,27877,21311,28346,22810,33590,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20025,20150,20294,21934,22296,22727,24406,26039,26086,27264,27573,28237,30701,31471,31774,32222,34507,34962,37170,37723,25787,28606,29562,30136,36948,21846,22349,25018,25812,26311,28129,28251,28525,28601,30192,32835,33213,34113,35203,35527,35674,37663,27795,30035,31572,36367,36957,21776,22530,22616,24162,25095,25758,26848,30070,31958,34739,40680,20195,22408,22382,22823,23565,23729,24118,24453,25140,25825,29619,33274,34955,36024,38538,40667,23429,24503,24755,20498,20992,21040,22294,22581,22615,23566,23648,23798,23947,24230,24466,24764,25361,25481,25623,26691,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26873,27330,28120,28193,28372,28644,29182,30428,30585,31153,31291,33796,35241,36077,36339,36424,36867,36884,36947,37117,37709,38518,38876,27602,28678,29272,29346,29544,30563,31167,31716,32411,35712,22697,24775,25958,26109,26302,27788,28958,29129,35930,38931,20077,31361,20189,20908,20941,21205,21516,24999,26481,26704,26847,27934,28540,30140,30643,31461,33012,33891,37509,20828,26007,26460,26515,30168,31431,33651,63834,35910,36887,38957,23663,33216,33434,36929,36975,37389,24471,23965,27225,29128,30331,31561,34276,35588,37159,39472,21895,25078,63835,30313,32645,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34367,34746,35064,37007,63836,27931,28889,29662,32097,33853,63837,37226,39409,63838,20098,21365,27396,27410,28734,29211,34349,40478,21068,36771,23888,25829,25900,27414,28651,31811,32412,34253,35172,35261,25289,33240,34847,24266,26391,28010,29436,29701,29807,34690,37086,20358,23821,24480,33802,20919,25504,30053,20142,20486,20841,20937,26753,27153,31918,31921,31975,33391,35538,36635,37327,20406,20791,21237,21570,24300,24942,25150,26053,27354,28670,31018,34268,34851,38317,39522,39530,40599,40654,21147,26310,27511,28701,31019,36706,38722,24976,25088,25891,28451,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29001,29833,32244,32879,34030,36646,36899,37706,20925,21015,21155,27916,28872,35010,24265,25986,27566,28610,31806,29557,20196,20278,22265,63839,23738,23994,24604,29618,31533,32666,32718,32838,36894,37428,38646,38728,38936,40801,20363,28583,31150,37300,38583,21214,63840,25736,25796,27347,28510,28696,29200,30439,32769,34310,34396,36335,36613,38706,39791,40442,40565,30860,31103,32160,33737,37636,40575,40595,35542,22751,24324,26407,28711,29903,31840,32894,20769,28712,29282,30922,36034,36058,36084,38647,20102,20698,23534,24278,26009,29134,30274,30637,32842,34044,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36988,39719,40845,22744,23105,23650,27155,28122,28431,30267,32047,32311,34078,35128,37860,38475,21129,26066,26611,27060,27969,28316,28687,29705,29792,30041,30244,30827,35628,39006,20845,25134,38520,20374,20523,23833,28138,32184,36650,24459,24900,26647,63841,38534,21202,32907,20956,20940,26974,31260,32190,33777,38517,20442,21033,21400,21519,21774,23653,24743,26446,26792,28012,29313,29432,29702,29827,63842,30178,31852,32633,32696,33673,35023,35041,37324,37328,38626,39881,21533,28542,29136,29848,34298,36522,38563,40023,40607,26519,28107,29747,33256,38678,30764,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31435,31520,31890,25705,29802,30194,30908,30952,39340,39764,40635,23518,24149,28448,33180,33707,37000,19975,21325,23081,24018,24398,24930,25405,26217,26364,28415,28459,28771,30622,33836,34067,34875,36627,39237,39995,21788,25273,26411,27819,33545,35178,38778,20129,22916,24536,24537,26395,32178,32596,33426,33579,33725,36638,37017,22475,22969,23186,23504,26151,26522,26757,27599,29028,32629,36023,36067,36993,39749,33032,35978,38476,39488,40613,23391,27667,29467,30450,30431,33804,20906,35219,20813,20885,21193,26825,27796,30468,30496,32191,32236,38754,40629,28357,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34065,20901,21517,21629,26126,26269,26919,28319,30399,30609,33559,33986,34719,37225,37528,40180,34946,20398,20882,21215,22982,24125,24917,25720,25721,26286,26576,27169,27597,27611,29279,29281,29761,30520,30683,32791,33468,33541,35584,35624,35980,26408,27792,29287,30446,30566,31302,40361,27519,27794,22818,26406,33945,21359,22675,22937,24287,25551,26164,26483,28218,29483,31447,33495,37672,21209,24043,25006,25035,25098,25287,25771,26080,26969,27494,27595,28961,29687,30045,32326,33310,33538,34154,35491,36031,38695,40289,22696,40664,20497,21006,21563,21839,25991,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27766,32010,32011,32862,34442,38272,38639,21247,27797,29289,21619,23194,23614,23883,24396,24494,26410,26806,26979,28220,28228,30473,31859,32654,34183,35598,36855,38753,40692,23735,24758,24845,25003,25935,26107,26108,27665,27887,29599,29641,32225,38292,23494,34588,35600,21085,21338,25293,25615,25778,26420,27192,27850,29632,29854,31636,31893,32283,33162,33334,34180,36843,38649,39361,20276,21322,21453,21467,25292,25644,25856,26001,27075,27886,28504,29677,30036,30242,30436,30460,30928,30971,31020,32070,33324,34784,36820,38930,39151,21187,25300,25765,28196,28497,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30332,36299,37297,37474,39662,39747,20515,20621,22346,22952,23592,24135,24439,25151,25918,26041,26049,26121,26507,27036,28354,30917,32033,32938,33152,33323,33459,33953,34444,35370,35607,37030,38450,40848,20493,20467,63843,22521,24472,25308,25490,26479,28227,28953,30403,32972,32986,35060,35061,35097,36064,36649,37197,38506,20271,20336,24091,26575,26658,30333,30334,39748,24161,27146,29033,29140,30058,63844,32321,34115,34281,39132,20240,31567,32624,38309,20961,24070,26805,27710,27726,27867,29359,31684,33539,27861,29754,20731,21128,22721,25816,27287,29863,30294,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,30887,34327,38370,38713,63845,21342,24321,35722,36776,36783,37002,21029,30629,40009,40712,19993,20482,20853,23643,24183,26142,26170,26564,26821,28851,29953,30149,31177,31453,36647,39200,39432,20445,22561,22577,23542,26222,27493,27921,28282,28541,29668,29995,33769,35036,35091,35676,36628,20239,20693,21264,21340,23443,24489,26381,31119,33145,33583,34068,35079,35206,36665,36667,39333,39954,26412,20086,20472,22857,23553,23791,23792,25447,26834,28925,29090,29739,32299,34028,34562,36898,37586,40179,19981,20184,20463,20613,21078,21103,21542,21648,22496,22827,23142,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23386,23413,23500,24220,63846,25206,25975,26023,28014,28325,29238,31526,31807,32566,33104,33105,33178,33344,33433,33705,35331,36000,36070,36091,36212,36282,37096,37340,38428,38468,39385,40167,21271,20998,21545,22132,22707,22868,22894,24575,24996,25198,26128,27774,28954,30406,31881,31966,32027,33452,36033,38640,63847,20315,24343,24447,25282,23849,26379,26842,30844,32323,40300,19989,20633,21269,21290,21329,22915,23138,24199,24754,24970,25161,25209,26000,26503,27047,27604,27606,27607,27608,27832,63848,29749,30202,30738,30865,31189,31192,31875,32203,32737,32933,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,33086,33218,33778,34586,35048,35513,35692,36027,37145,38750,39131,40763,22188,23338,24428,25996,27315,27567,27996,28657,28693,29277,29613,36007,36051,38971,24977,27703,32856,39425,20045,20107,20123,20181,20282,20284,20351,20447,20735,21490,21496,21766,21987,22235,22763,22882,23057,23531,23546,23556,24051,24107,24473,24605,25448,26012,26031,26614,26619,26797,27515,27801,27863,28195,28681,29509,30722,31038,31040,31072,31169,31721,32023,32114,32902,33293,33678,34001,34503,35039,35408,35422,35613,36060,36198,36781,37034,39164,39391,40605,21066,63849,26388,63850,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20632,21034,23665,25955,27733,29642,29987,30109,31639,33948,37240,38704,20087,25746,27578,29022,34217,19977,63851,26441,26862,28183,33439,34072,34923,25591,28545,37394,39087,19978,20663,20687,20767,21830,21930,22039,23360,23577,23776,24120,24202,24224,24258,24819,26705,27233,28248,29245,29248,29376,30456,31077,31665,32724,35059,35316,35443,35937,36062,38684,22622,29885,36093,21959,63852,31329,32034,33394,29298,29983,29989,63853,31513,22661,22779,23996,24207,24246,24464,24661,25234,25471,25933,26257,26329,26360,26646,26866,29312,29790,31598,32110,32214,32626,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32997,33298,34223,35199,35475,36893,37604,40653,40736,22805,22893,24109,24796,26132,26227,26512,27728,28101,28511,30707,30889,33990,37323,37675,20185,20682,20808,21892,23307,23459,25159,25982,26059,28210,29053,29697,29764,29831,29887,30316,31146,32218,32341,32680,33146,33203,33337,34330,34796,35445,36323,36984,37521,37925,39245,39854,21352,23633,26964,27844,27945,28203,33292,34203,35131,35373,35498,38634,40807,21089,26297,27570,32406,34814,36109,38275,38493,25885,28041,29166,63854,22478,22995,23468,24615,24826,25104,26143,26207,29481,29689,30427,30465,31596,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32854,32882,33125,35488,37266,19990,21218,27506,27927,31237,31545,32048,63855,36016,21484,22063,22609,23477,23567,23569,24034,25152,25475,25620,26157,26803,27836,28040,28335,28703,28836,29138,29990,30095,30094,30233,31505,31712,31787,32032,32057,34092,34157,34311,35380,36877,36961,37045,37559,38902,39479,20439,23660,26463,28049,31903,32396,35606,36118,36895,23403,24061,25613,33984,36956,39137,29575,23435,24730,26494,28126,35359,35494,36865,38924,21047,63856,28753,30862,37782,34928,37335,20462,21463,22013,22234,22402,22781,23234,23432,23723,23744,24101,24833,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,25101,25163,25480,25628,25910,25976,27193,27530,27700,27929,28465,29159,29417,29560,29703,29874,30246,30561,31168,31319,31466,31929,32143,32172,32353,32670,33065,33585,33936,34010,34282,34966,35504,35728,36664,36930,36995,37228,37526,37561,38539,38567,38568,38614,38656,38920,39318,39635,39706,21460,22654,22809,23408,23487,28113,28506,29087,29729,29881,32901,33789,24033,24455,24490,24642,26092,26642,26991,27219,27529,27957,28147,29667,30462,30636,31565,32020,33059,33308,33600,34036,34147,35426,35524,37255,37662,38918,39348,25100,34899,36848,37477,23815,23847,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,23913,29791,33181,34664,28629,25342,32722,35126,35186,19998,20056,20711,21213,21319,25215,26119,32361,34821,38494,20365,21273,22070,22987,23204,23608,23630,23629,24066,24337,24643,26045,26159,26178,26558,26612,29468,30690,31034,32709,33940,33997,35222,35430,35433,35553,35925,35962,22516,23508,24335,24687,25325,26893,27542,28252,29060,31698,34645,35672,36606,39135,39166,20280,20353,20449,21627,23072,23480,24892,26032,26216,29180,30003,31070,32051,33102,33251,33688,34218,34254,34563,35338,36523,36763,63857,36805,22833,23460,23526,24713,23529,23563,24515,27777,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63858,28145,28683,29978,33455,35574,20160,21313,63859,38617,27663,20126,20420,20818,21854,23077,23784,25105,29273,33469,33706,34558,34905,35357,38463,38597,39187,40201,40285,22538,23731,23997,24132,24801,24853,25569,27138,28197,37122,37716,38990,39952,40823,23433,23736,25353,26191,26696,30524,38593,38797,38996,39839,26017,35585,36555,38332,21813,23721,24022,24245,26263,30284,33780,38343,22739,25276,29390,40232,20208,22830,24591,26171,27523,31207,40230,21395,21696,22467,23830,24859,26326,28079,30861,33406,38552,38724,21380,25212,25494,28082,32266,33099,38989,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,27387,32588,40367,40474,20063,20539,20918,22812,24825,25590,26928,29242,32822,63860,37326,24369,63861,63862,32004,33509,33903,33979,34277,36493,63863,20335,63864,63865,22756,23363,24665,25562,25880,25965,26264,63866,26954,27171,27915,28673,29036,30162,30221,31155,31344,63867,32650,63868,35140,63869,35731,37312,38525,63870,39178,22276,24481,26044,28417,30208,31142,35486,39341,39770,40812,20740,25014,25233,27277,33222,20547,22576,24422,28937,35328,35578,23420,34326,20474,20796,22196,22852,25513,28153,23978,26989,20870,20104,20313,63871,63872,63873,22914,63874,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63875,27487,27741,63876,29877,30998,63877,33287,33349,33593,36671,36701,63878,39192,63879,63880,63881,20134,63882,22495,24441,26131,63883,63884,30123,32377,35695,63885,36870,39515,22181,22567,23032,23071,23476,63886,24310,63887,63888,25424,25403,63889,26941,27783,27839,28046,28051,28149,28436,63890,28895,28982,29017,63891,29123,29141,63892,30799,30831,63893,31605,32227,63894,32303,63895,34893,36575,63896,63897,63898,37467,63899,40182,63900,63901,63902,24709,28037,63903,29105,63904,63905,38321,21421,63906,63907,63908,26579,63909,28814,28976,29744,33398,33490,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63910,38331,39653,40573,26308,63911,29121,33865,63912,63913,22603,63914,63915,23992,24433,63916,26144,26254,27001,27054,27704,27891,28214,28481,28634,28699,28719,29008,29151,29552,63917,29787,63918,29908,30408,31310,32403,63919,63920,33521,35424,36814,63921,37704,63922,38681,63923,63924,20034,20522,63925,21000,21473,26355,27757,28618,29450,30591,31330,33454,34269,34306,63926,35028,35427,35709,35947,63927,37555,63928,38675,38928,20116,20237,20425,20658,21320,21566,21555,21978,22626,22714,22887,23067,23524,24735,63929,25034,25942,26111,26212,26791,27738,28595,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28879,29100,29522,31613,34568,35492,39986,40711,23627,27779,29508,29577,37434,28331,29797,30239,31337,32277,34314,20800,22725,25793,29934,29973,30320,32705,37013,38605,39252,28198,29926,31401,31402,33253,34521,34680,35355,23113,23436,23451,26785,26880,28003,29609,29715,29740,30871,32233,32747,33048,33109,33694,35916,38446,38929,26352,24448,26106,26505,27754,29579,20525,23043,27498,30702,22806,23916,24013,29477,30031,63930,63931,20709,20985,22575,22829,22934,23002,23525,63932,63933,23970,25303,25622,25747,25854,63934,26332,63935,27208,63936,29183,29796,63937,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31368,31407,32327,32350,32768,33136,63938,34799,35201,35616,36953,63939,36992,39250,24958,27442,28020,32287,35109,36785,20433,20653,20887,21191,22471,22665,23481,24248,24898,27029,28044,28263,28342,29076,29794,29992,29996,32883,33592,33993,36362,37780,37854,63940,20110,20305,20598,20778,21448,21451,21491,23431,23507,23588,24858,24962,26100,29275,29591,29760,30402,31056,31121,31161,32006,32701,33419,34261,34398,36802,36935,37109,37354,38533,38632,38633,21206,24423,26093,26161,26671,29020,31286,37057,38922,20113,63941,27218,27550,28560,29065,32792,33464,34131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36939,38549,38642,38907,34074,39729,20112,29066,38596,20803,21407,21729,22291,22290,22435,23195,23236,23491,24616,24895,25588,27781,27961,28274,28304,29232,29503,29783,33489,34945,36677,36960,63942,38498,39000,40219,26376,36234,37470,20301,20553,20702,21361,22285,22996,23041,23561,24944,26256,28205,29234,29771,32239,32963,33806,33894,34111,34655,34907,35096,35586,36949,38859,39759,20083,20369,20754,20842,63943,21807,21929,23418,23461,24188,24189,24254,24736,24799,24840,24841,25540,25912,26377,63944,26580,26586,63945,26977,26978,27833,27943,63946,28216,63947,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,28641,29494,29495,63948,29788,30001,63949,30290,63950,63951,32173,33278,33848,35029,35480,35547,35565,36400,36418,36938,36926,36986,37193,37321,37742,63952,63953,22537,63954,27603,32905,32946,63955,63956,20801,22891,23609,63957,63958,28516,29607,32996,36103,63959,37399,38287,63960,63961,63962,63963,32895,25102,28700,32104,34701,63964,22432,24681,24903,27575,35518,37504,38577,20057,21535,28139,34093,38512,38899,39150,25558,27875,37009,20957,25033,33210,40441,20381,20506,20736,23452,24847,25087,25836,26885,27589,30097,30691,32681,33380,34191,34811,34915,35516,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,35696,37291,20108,20197,20234,63965,63966,22839,23016,63967,24050,24347,24411,24609,63968,63969,63970,63971,29246,29669,63972,30064,30157,63973,31227,63974,32780,32819,32900,33505,33617,63975,63976,36029,36019,36999,63977,63978,39156,39180,63979,63980,28727,30410,32714,32716,32764,35610,20154,20161,20995,21360,63981,21693,22240,23035,23493,24341,24525,28270,63982,63983,32106,33589,63984,34451,35469,63985,38765,38775,63986,63987,19968,20314,20350,22777,26085,28322,36920,37808,39353,20219,22764,22922,23001,24641,63988,63989,31252,63990,33615,36035,20837,21316,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,63991,63992,63993,20173,21097,23381,33471,20180,21050,21672,22985,23039,23376,23383,23388,24675,24904,28363,28825,29038,29574,29943,30133,30913,32043,32773,33258,33576,34071,34249,35566,36039,38604,20316,21242,22204,26027,26152,28796,28856,29237,32189,33421,37196,38592,40306,23409,26855,27544,28538,30430,23697,26283,28507,31668,31786,34870,38620,19976,20183,21280,22580,22715,22767,22892,23559,24115,24196,24373,25484,26290,26454,27167,27299,27404,28479,29254,63994,29520,29835,31456,31911,33144,33247,33255,33674,33900,34083,34196,34255,35037,36115,37292,38263,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38556,20877,21705,22312,23472,25165,26448,26685,26771,28221,28371,28797,32289,35009,36001,36617,40779,40782,29229,31631,35533,37658,20295,20302,20786,21632,22992,24213,25269,26485,26990,27159,27822,28186,29401,29482,30141,31672,32053,33511,33785,33879,34295,35419,36015,36487,36889,37048,38606,40799,21219,21514,23265,23490,25688,25973,28404,29380,63995,30340,31309,31515,31821,32318,32735,33659,35627,36042,36196,36321,36447,36842,36857,36969,37841,20291,20346,20659,20840,20856,21069,21098,22625,22652,22880,23560,23637,24283,24731,25136,26643,27583,27656,28593,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29006,29728,30000,30008,30033,30322,31564,31627,31661,31686,32399,35438,36670,36681,37439,37523,37666,37931,38651,39002,39019,39198,20999,25130,25240,27993,30308,31434,31680,32118,21344,23742,24215,28472,28857,31896,38673,39822,40670,25509,25722,34678,19969,20117,20141,20572,20597,21576,22979,23450,24128,24237,24311,24449,24773,25402,25919,25972,26060,26230,26232,26622,26984,27273,27491,27712,28096,28136,28191,28254,28702,28833,29582,29693,30010,30555,30855,31118,31243,31357,31934,32142,33351,35330,35562,35998,37165,37194,37336,37478,37580,37664,38662,38742,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38748,38914,40718,21046,21137,21884,22564,24093,24351,24716,25552,26799,28639,31085,31532,33229,34234,35069,35576,36420,37261,38500,38555,38717,38988,40778,20430,20806,20939,21161,22066,24340,24427,25514,25805,26089,26177,26362,26361,26397,26781,26839,27133,28437,28526,29031,29157,29226,29866,30522,31062,31066,31199,31264,31381,31895,31967,32068,32368,32903,34299,34468,35412,35519,36249,36481,36896,36973,37347,38459,38613,40165,26063,31751,36275,37827,23384,23562,21330,25305,29469,20519,23447,24478,24752,24939,26837,28121,29742,31278,32066,32156,32305,33131,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36394,36405,37758,37912,20304,22352,24038,24231,25387,32618,20027,20303,20367,20570,23005,32964,21610,21608,22014,22863,23449,24030,24282,26205,26417,26609,26666,27880,27954,28234,28557,28855,29664,30087,31820,32002,32044,32162,33311,34523,35387,35461,36208,36490,36659,36913,37198,37202,37956,39376,31481,31909,20426,20737,20934,22472,23535,23803,26201,27197,27994,28310,28652,28940,30063,31459,34850,36897,36981,38603,39423,33537,20013,20210,34886,37325,21373,27355,26987,27713,33914,22686,24974,26366,25327,28893,29969,30151,32338,33976,35657,36104,20043,21482,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21675,22320,22336,24535,25345,25351,25711,25903,26088,26234,26525,26547,27490,27744,27802,28460,30693,30757,31049,31063,32025,32930,33026,33267,33437,33463,34584,35468,63996,36100,36286,36978,30452,31257,31287,32340,32887,21767,21972,22645,25391,25634,26185,26187,26733,27035,27524,27941,28337,29645,29800,29857,30043,30137,30433,30494,30603,31206,32265,32285,33275,34095,34967,35386,36049,36587,36784,36914,37805,38499,38515,38663,20356,21489,23018,23241,24089,26702,29894,30142,31209,31378,33187,34541,36074,36300,36845,26015,26389,63997,22519,28503,32221,36655,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37878,38598,24501,25074,28548,19988,20376,20511,21449,21983,23919,24046,27425,27492,30923,31642,63998,36425,36554,36974,25417,25662,30528,31364,37679,38015,40810,25776,28591,29158,29864,29914,31428,31762,32386,31922,32408,35738,36106,38013,39184,39244,21049,23519,25830,26413,32046,20717,21443,22649,24920,24921,25082,26028,31449,35730,35734,20489,20513,21109,21809,23100,24288,24432,24884,25950,26124,26166,26274,27085,28356,28466,29462,30241,31379,33081,33369,33750,33980,20661,22512,23488,23528,24425,25505,30758,32181,33756,34081,37319,37365,20874,26613,31574,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36012,20932,22971,24765,34389,20508,63999,21076,23610,24957,25114,25299,25842,26021,28364,30240,33034,36448,38495,38587,20191,21315,21912,22825,24029,25797,27849,28154,29588,31359,33307,34214,36068,36368,36983,37351,38369,38433,38854,20984,21746,21894,24505,25764,28552,32180,36639,36685,37941,20681,23574,27838,28155,29979,30651,31805,31844,35449,35522,22558,22974,24086,25463,29266,30090,30571,35548,36028,36626,24307,26228,28152,32893,33729,35531,38737,39894,64000,21059,26367,28053,28399,32224,35558,36910,36958,39636,21021,21119,21736,24980,25220,25307,26786,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,26898,26970,27189,28818,28966,30813,30977,30990,31186,31245,32918,33400,33493,33609,34121,35970,36229,37218,37259,37294,20419,22225,29165,30679,34560,35320,23544,24534,26449,37032,21474,22618,23541,24740,24961,25696,32317,32880,34085,37507,25774,20652,23828,26368,22684,25277,25512,26894,27000,27166,28267,30394,31179,33467,33833,35535,36264,36861,37138,37195,37276,37648,37656,37786,38619,39478,39949,19985,30044,31069,31482,31569,31689,32302,33988,36441,36468,36600,36880,26149,26943,29763,20986,26414,40668,20805,24544,27798,34802,34909,34935,24756,33205,33795,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,36101,21462,21561,22068,23094,23601,28810,32736,32858,33030,33261,36259,37257,39519,40434,20596,20164,21408,24827,28204,23652,20360,20516,21988,23769,24159,24677,26772,27835,28100,29118,30164,30196,30305,31258,31305,32199,32251,32622,33268,34473,36636,38601,39347,40786,21063,21189,39149,35242,19971,26578,28422,20405,23522,26517,27784,28024,29723,30759,37341,37756,34756,31204,31281,24555,20182,21668,21822,22702,22949,24816,25171,25302,26422,26965,33333,38464,39345,39389,20524,21331,21828,22396,64001,25176,64002,25826,26219,26589,28609,28655,29730,29752,35351,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,37944,21585,22022,22374,24392,24986,27470,28760,28845,32187,35477,22890,33067,25506,30472,32829,36010,22612,25645,27067,23445,24081,28271,64003,34153,20812,21488,22826,24608,24907,27526,27760,27888,31518,32974,33492,36294,37040,39089,64004,25799,28580,25745,25860,20814,21520,22303,35342,24927,26742,64005,30171,31570,32113,36890,22534,27084,33151,35114,36864,38969,20600,22871,22956,25237,36879,39722,24925,29305,38358,22369,23110,24052,25226,25773,25850,26487,27874,27966,29228,29750,30772,32631,33453,36315,38935,21028,22338,26495,29256,29923,36009,36774,37393,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,38442,20843,21485,25420,20329,21764,24726,25943,27803,28031,29260,29437,31255,35207,35997,24429,28558,28921,33192,24846,20415,20559,25153,29255,31687,32232,32745,36941,38829,39449,36022,22378,24179,26544,33805,35413,21536,23318,24163,24290,24330,25987,32954,34109,38281,38491,20296,21253,21261,21263,21638,21754,22275,24067,24598,25243,25265,25429,64006,27873,28006,30129,30770,32990,33071,33502,33889,33970,34957,35090,36875,37610,39165,39825,24133,26292,26333,28689,29190,64007,20469,21117,24426,24915,26451,27161,28418,29922,31080,34920,35961,39111,39108,39491,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,21697,31263,26963,35575,35914,39080,39342,24444,25259,30130,30382,34987,36991,38466,21305,24380,24517,27852,29644,30050,30091,31558,33534,39325,20047,36924,19979,20309,21414,22799,24264,26160,27827,29781,33655,34662,36032,36944,38686,39957,22737,23416,34384,35604,40372,23506,24680,24717,26097,27735,28450,28579,28698,32597,32752,38289,38290,38480,38867,21106,36676,20989,21547,21688,21859,21898,27323,28085,32216,33382,37532,38519,40569,21512,21704,30418,34532,38308,38356,38492,20130,20233,23022,23270,24055,24658,25239,26477,26689,27782,28207,32568,32923,33322,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,64008,64009,38917,20133,20565,21683,22419,22874,23401,23475,25032,26999,28023,28707,34809,35299,35442,35559,36994,39405,39608,21182,26680,20502,24184,26447,33607,34892,20139,21521,22190,29670,37141,38911,39177,39255,39321,22099,22687,34395,35377,25010,27382,29563,36562,27463,38570,39511,22869,29184,36203,38761,20436,23796,24358,25080,26203,27883,28843,29572,29625,29694,30505,30541,32067,32098,32291,33335,34898,64010,36066,37449,39023,23377,31348,34880,38913,23244,20448,21332,22846,23805,25406,28025,29433,33029,33031,33698,37583,38960,20136,20804,21009,22411,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24418,27842,28366,28677,28752,28847,29074,29673,29801,33610,34722,34913,36872,37026,37795,39336,20846,24407,24800,24935,26291,34137,36426,37295,38795,20046,20114,21628,22741,22778,22909,23733,24359,25142,25160,26122,26215,27627,28009,28111,28246,28408,28564,28640,28649,28765,29392,29733,29786,29920,30355,31068,31946,32286,32993,33446,33899,33983,34382,34399,34676,35703,35946,37804,38912,39013,24785,25110,37239,23130,26127,28151,28222,29759,39746,24573,24794,31503,21700,24344,27742,27859,27946,28888,32005,34425,35340,40251,21270,21644,23301,27194,28779,30069,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,31117,31166,33457,33775,35441,35649,36008,38772,64011,25844,25899,30906,30907,31339,20024,21914,22864,23462,24187,24739,25563,27489,26213,26707,28185,29029,29872,32008,36996,39529,39973,27963,28369,29502,35905,38346,20976,24140,24488,24653,24822,24880,24908,26179,26180,27045,27841,28255,28361,28514,29004,29852,30343,31681,31783,33618,34647,36945,38541,40643,21295,22238,24315,24458,24674,24724,25079,26214,26371,27292,28142,28590,28784,29546,32362,33214,33588,34516,35496,36036,21123,29554,23446,27243,37892,21742,22150,23389,25928,25989,26313,26783,28045,28102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,29243,32948,37237,39501,20399,20505,21402,21518,21564,21897,21957,24127,24460,26429,29030,29661,36869,21211,21235,22628,22734,28932,29071,29179,34224,35347,26248,34216,21927,26244,29002,33841,21321,21913,27585,24409,24509,25582,26249,28999,35569,36637,40638,20241,25658,28875,30054,34407,24676,35662,40440,20807,20982,21256,27958,33016,40657,26133,27427,28824,30165,21507,23673,32007,35350,27424,27453,27462,21560,24688,27965,32725,33288,20694,20958,21916,22123,22221,23020,23305,24076,24985,24984,25137,26206,26342,29081,29113,29114,29351,31143,31232,32690,35440,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "gb18030":[19970,19972,19973,19974,19983,19986,19991,19999,20000,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,20515,20516,20519,20523,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20539,20541,20543,20544,20545,20546,20548,20549,20550,20553,20554,20555,20557,20560,20561,20562,20563,20564,20566,20567,20568,20569,20571,20573,20574,20575,20576,20577,20578,20579,20580,20582,20583,20584,20585,20586,20587,20589,20590,20591,20592,20593,20594,20595,20596,20597,20600,20601,20602,20604,20605,20609,20610,20611,20612,20614,20615,20617,20618,20619,20620,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20644,20646,20650,20651,20653,20654,20655,20656,20657,20659,20660,20661,20662,20663,20664,20665,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20688,20689,20690,20691,20692,20693,20695,20696,20697,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20712,20713,20714,20715,20719,20720,20721,20722,20724,20726,20727,20728,20729,20730,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20744,20745,20746,20748,20749,20750,20751,20752,20753,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20802,20807,20810,20812,20814,20815,20816,20818,20819,20823,20824,20825,20827,20829,20830,20831,20832,20833,20835,20836,20838,20839,20841,20842,20847,20850,20858,20862,20863,20867,20868,20870,20871,20874,20875,20878,20879,20880,20881,20883,20884,20888,20890,20893,20894,20895,20897,20899,20902,20903,20904,20905,20906,20909,20910,20916,20920,20921,20922,20926,20927,20929,20930,20931,20933,20936,20938,20941,20942,20944,20946,20947,20948,20949,20950,20951,20952,20953,20954,20956,20958,20959,20962,20963,20965,20966,20967,20968,20969,20970,20972,20974,20977,20978,20980,20983,20990,20996,20997,21001,21003,21004,21007,21008,21011,21012,21013,21020,21022,21023,21025,21026,21027,21029,21030,21031,21034,21036,21039,21041,21042,21044,21045,21052,21054,21060,21061,21062,21063,21064,21065,21067,21070,21071,21074,21075,21077,21079,21080,21081,21082,21083,21085,21087,21088,21090,21091,21092,21094,21096,21099,21100,21101,21102,21104,21105,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21118,21120,21123,21124,21125,21126,21127,21129,21130,21131,21132,21133,21134,21135,21137,21138,21140,21141,21142,21143,21144,21145,21146,21148,21156,21157,21158,21159,21166,21167,21168,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21184,21185,21186,21188,21189,21190,21192,21194,21196,21197,21198,21199,21201,21203,21204,21205,21207,21209,21210,21211,21212,21213,21214,21216,21217,21218,21219,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21233,21234,21235,21236,21237,21238,21239,21240,21243,21244,21245,21249,21250,21251,21252,21255,21257,21258,21259,21260,21262,21265,21266,21267,21268,21272,21275,21276,21278,21279,21282,21284,21285,21287,21288,21289,21291,21292,21293,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21308,21309,21312,21314,21316,21318,21323,21324,21325,21328,21332,21336,21337,21339,21341,21349,21352,21354,21356,21357,21362,21366,21369,21371,21372,21373,21374,21376,21377,21379,21383,21384,21386,21390,21391,21392,21393,21394,21395,21396,21398,21399,21401,21403,21404,21406,21408,21409,21412,21415,21418,21419,21420,21421,21423,21424,21425,21426,21427,21428,21429,21431,21432,21433,21434,21436,21437,21438,21440,21443,21444,21445,21446,21447,21454,21455,21456,21458,21459,21461,21466,21468,21469,21470,21473,21474,21479,21492,21498,21502,21503,21504,21506,21509,21511,21515,21524,21528,21529,21530,21532,21538,21540,21541,21546,21552,21555,21558,21559,21562,21565,21567,21569,21570,21572,21573,21575,21577,21580,21581,21582,21583,21585,21594,21597,21598,21599,21600,21601,21603,21605,21607,21609,21610,21611,21612,21613,21614,21615,21616,21620,21625,21626,21630,21631,21633,21635,21637,21639,21640,21641,21642,21645,21649,21651,21655,21656,21660,21662,21663,21664,21665,21666,21669,21678,21680,21682,21685,21686,21687,21689,21690,21692,21694,21699,21701,21706,21707,21718,21720,21723,21728,21729,21730,21731,21732,21739,21740,21743,21744,21745,21748,21749,21750,21751,21752,21753,21755,21758,21760,21762,21763,21764,21765,21768,21770,21771,21772,21773,21774,21778,21779,21781,21782,21783,21784,21785,21786,21788,21789,21790,21791,21793,21797,21798,21800,21801,21803,21805,21810,21812,21813,21814,21816,21817,21818,21819,21821,21824,21826,21829,21831,21832,21835,21836,21837,21838,21839,21841,21842,21843,21844,21847,21848,21849,21850,21851,21853,21854,21855,21856,21858,21859,21864,21865,21867,21871,21872,21873,21874,21875,21876,21881,21882,21885,21887,21893,21894,21900,21901,21902,21904,21906,21907,21909,21910,21911,21914,21915,21918,21920,21921,21922,21923,21924,21925,21926,21928,21929,21930,21931,21932,21933,21934,21935,21936,21938,21940,21942,21944,21946,21948,21951,21952,21953,21954,21955,21958,21959,21960,21962,21963,21966,21967,21968,21973,21975,21976,21977,21978,21979,21982,21984,21986,21991,21993,21997,21998,22000,22001,22004,22006,22008,22009,22010,22011,22012,22015,22018,22019,22020,22021,22022,22023,22026,22027,22029,22032,22033,22034,22035,22036,22037,22038,22039,22041,22042,22044,22045,22048,22049,22050,22053,22054,22056,22057,22058,22059,22062,22063,22064,22067,22069,22071,22072,22074,22076,22077,22078,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22095,22096,22097,22098,22099,22101,22102,22106,22107,22109,22110,22111,22112,22113,22115,22117,22118,22119,22125,22126,22127,22128,22130,22131,22132,22133,22135,22136,22137,22138,22141,22142,22143,22144,22145,22146,22147,22148,22151,22152,22153,22154,22155,22156,22157,22160,22161,22162,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22192,22193,22194,22195,22196,22197,22198,22200,22201,22202,22203,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22219,22220,22221,22222,22223,22224,22225,22226,22227,22229,22230,22232,22233,22236,22243,22245,22246,22247,22248,22249,22250,22252,22254,22255,22258,22259,22262,22263,22264,22267,22268,22272,22273,22274,22277,22279,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22301,22302,22304,22305,22306,22308,22309,22310,22311,22315,22321,22322,22324,22325,22326,22327,22328,22332,22333,22335,22337,22339,22340,22341,22342,22344,22345,22347,22354,22355,22356,22357,22358,22360,22361,22370,22371,22373,22375,22380,22382,22384,22385,22386,22388,22389,22392,22393,22394,22397,22398,22399,22400,22401,22407,22408,22409,22410,22413,22414,22415,22416,22417,22420,22421,22422,22423,22424,22425,22426,22428,22429,22430,22431,22437,22440,22442,22444,22447,22448,22449,22451,22453,22454,22455,22457,22458,22459,22460,22461,22462,22463,22464,22465,22468,22469,22470,22471,22472,22473,22474,22476,22477,22480,22481,22483,22486,22487,22491,22492,22494,22497,22498,22499,22501,22502,22503,22504,22505,22506,22507,22508,22510,22512,22513,22514,22515,22517,22518,22519,22523,22524,22526,22527,22529,22531,22532,22533,22536,22537,22538,22540,22542,22543,22544,22546,22547,22548,22550,22551,22552,22554,22555,22556,22557,22559,22562,22563,22565,22566,22567,22568,22569,22571,22572,22573,22574,22575,22577,22578,22579,22580,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22597,22598,22599,22600,22601,22602,22603,22606,22607,22608,22610,22611,22613,22614,22615,22617,22618,22619,22620,22621,22623,22624,22625,22626,22627,22628,22630,22631,22632,22633,22634,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22655,22658,22660,22662,22663,22664,22666,22667,22668,22669,22670,22671,22672,22673,22676,22677,22678,22679,22680,22683,22684,22685,22688,22689,22690,22691,22692,22693,22694,22695,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22717,22718,22719,22720,22722,22723,22724,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22738,22739,22740,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22757,22758,22759,22760,22761,22762,22765,22767,22769,22770,22772,22773,22775,22776,22778,22779,22780,22781,22782,22783,22784,22785,22787,22789,22790,22792,22793,22794,22795,22796,22798,22800,22801,22802,22803,22807,22808,22811,22813,22814,22816,22817,22818,22819,22822,22824,22828,22832,22834,22835,22837,22838,22843,22845,22846,22847,22848,22851,22853,22854,22858,22860,22861,22864,22866,22867,22873,22875,22876,22877,22878,22879,22881,22883,22884,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22901,22903,22906,22907,22908,22910,22911,22912,22917,22921,22923,22924,22926,22927,22928,22929,22932,22933,22936,22938,22939,22940,22941,22943,22944,22945,22946,22950,22951,22956,22957,22960,22961,22963,22964,22965,22966,22967,22968,22970,22972,22973,22975,22976,22977,22978,22979,22980,22981,22983,22984,22985,22988,22989,22990,22991,22997,22998,23001,23003,23006,23007,23008,23009,23010,23012,23014,23015,23017,23018,23019,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23034,23036,23037,23038,23040,23042,23050,23051,23053,23054,23055,23056,23058,23060,23061,23062,23063,23065,23066,23067,23069,23070,23073,23074,23076,23078,23079,23080,23082,23083,23084,23085,23086,23087,23088,23091,23093,23095,23096,23097,23098,23099,23101,23102,23103,23105,23106,23107,23108,23109,23111,23112,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23126,23127,23128,23129,23131,23132,23133,23134,23135,23136,23137,23139,23140,23141,23142,23144,23145,23147,23148,23149,23150,23151,23152,23153,23154,23155,23160,23161,23163,23164,23165,23166,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23187,23188,23189,23190,23191,23192,23193,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23211,23212,23213,23214,23215,23216,23217,23220,23222,23223,23225,23226,23227,23228,23229,23231,23232,23235,23236,23237,23238,23239,23240,23242,23243,23245,23246,23247,23248,23249,23251,23253,23255,23257,23258,23259,23261,23262,23263,23266,23268,23269,23271,23272,23274,23276,23277,23278,23279,23280,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23347,23349,23350,23352,23353,23354,23355,23356,23357,23358,23359,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23378,23382,23390,23392,23393,23399,23400,23403,23405,23406,23407,23410,23412,23414,23415,23416,23417,23419,23420,23422,23423,23426,23430,23434,23437,23438,23440,23441,23442,23444,23446,23455,23463,23464,23465,23468,23469,23470,23471,23473,23474,23479,23482,23483,23484,23488,23489,23491,23496,23497,23498,23499,23501,23502,23503,23505,23508,23509,23510,23511,23512,23513,23514,23515,23516,23520,23522,23523,23526,23527,23529,23530,23531,23532,23533,23535,23537,23538,23539,23540,23541,23542,23543,23549,23550,23552,23554,23555,23557,23559,23560,23563,23564,23565,23566,23568,23570,23571,23575,23577,23579,23582,23583,23584,23585,23587,23590,23592,23593,23594,23595,23597,23598,23599,23600,23602,23603,23605,23606,23607,23619,23620,23622,23623,23628,23629,23634,23635,23636,23638,23639,23640,23642,23643,23644,23645,23647,23650,23652,23655,23656,23657,23658,23659,23660,23661,23664,23666,23667,23668,23669,23670,23671,23672,23675,23676,23677,23678,23680,23683,23684,23685,23686,23687,23689,23690,23691,23694,23695,23698,23699,23701,23709,23710,23711,23712,23713,23716,23717,23718,23719,23720,23722,23726,23727,23728,23730,23732,23734,23737,23738,23739,23740,23742,23744,23746,23747,23749,23750,23751,23752,23753,23754,23756,23757,23758,23759,23760,23761,23763,23764,23765,23766,23767,23768,23770,23771,23772,23773,23774,23775,23776,23778,23779,23783,23785,23787,23788,23790,23791,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23804,23805,23806,23807,23808,23809,23812,23813,23816,23817,23818,23819,23820,23821,23823,23824,23825,23826,23827,23829,23831,23832,23833,23834,23836,23837,23839,23840,23841,23842,23843,23845,23848,23850,23851,23852,23855,23856,23857,23858,23859,23861,23862,23863,23864,23865,23866,23867,23868,23871,23872,23873,23874,23875,23876,23877,23878,23880,23881,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23897,23898,23900,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23914,23917,23918,23920,23921,23922,23923,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23962,23963,23964,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24006,24007,24008,24009,24010,24011,24012,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24028,24031,24032,24035,24036,24042,24044,24045,24048,24053,24054,24056,24057,24058,24059,24060,24063,24064,24068,24071,24073,24074,24075,24077,24078,24082,24083,24087,24094,24095,24096,24097,24098,24099,24100,24101,24104,24105,24106,24107,24108,24111,24112,24114,24115,24116,24117,24118,24121,24122,24126,24127,24128,24129,24131,24134,24135,24136,24137,24138,24139,24141,24142,24143,24144,24145,24146,24147,24150,24151,24152,24153,24154,24156,24157,24159,24160,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24181,24183,24185,24190,24193,24194,24195,24197,24200,24201,24204,24205,24206,24210,24216,24219,24221,24225,24226,24227,24228,24232,24233,24234,24235,24236,24238,24239,24240,24241,24242,24244,24250,24251,24252,24253,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24267,24268,24269,24270,24271,24272,24276,24277,24279,24280,24281,24282,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24297,24299,24300,24301,24302,24303,24304,24305,24306,24307,24309,24312,24313,24315,24316,24317,24325,24326,24327,24329,24332,24333,24334,24336,24338,24340,24342,24345,24346,24348,24349,24350,24353,24354,24355,24356,24360,24363,24364,24366,24368,24370,24371,24372,24373,24374,24375,24376,24379,24381,24382,24383,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24401,24404,24409,24410,24411,24412,24414,24415,24416,24419,24421,24423,24424,24427,24430,24431,24434,24436,24437,24438,24440,24442,24445,24446,24447,24451,24454,24461,24462,24463,24465,24467,24468,24470,24474,24475,24477,24478,24479,24480,24482,24483,24484,24485,24486,24487,24489,24491,24492,24495,24496,24497,24498,24499,24500,24502,24504,24505,24506,24507,24510,24511,24512,24513,24514,24519,24520,24522,24523,24526,24531,24532,24533,24538,24539,24540,24542,24543,24546,24547,24549,24550,24552,24553,24556,24559,24560,24562,24563,24564,24566,24567,24569,24570,24572,24583,24584,24585,24587,24588,24592,24593,24595,24599,24600,24602,24606,24607,24610,24611,24612,24620,24621,24622,24624,24625,24626,24627,24628,24630,24631,24632,24633,24634,24637,24638,24640,24644,24645,24646,24647,24648,24649,24650,24652,24654,24655,24657,24659,24660,24662,24663,24664,24667,24668,24670,24671,24672,24673,24677,24678,24686,24689,24690,24692,24693,24695,24702,24704,24705,24706,24709,24710,24711,24712,24714,24715,24718,24719,24720,24721,24723,24725,24727,24728,24729,24732,24734,24737,24738,24740,24741,24743,24745,24746,24750,24752,24755,24757,24758,24759,24761,24762,24765,24766,24767,24768,24769,24770,24771,24772,24775,24776,24777,24780,24781,24782,24783,24784,24786,24787,24788,24790,24791,24793,24795,24798,24801,24802,24803,24804,24805,24810,24817,24818,24821,24823,24824,24827,24828,24829,24830,24831,24834,24835,24836,24837,24839,24842,24843,24844,24848,24849,24850,24851,24852,24854,24855,24856,24857,24859,24860,24861,24862,24865,24866,24869,24872,24873,24874,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24896,24897,24898,24899,24900,24901,24902,24903,24905,24907,24909,24911,24912,24914,24915,24916,24918,24919,24920,24921,24922,24923,24924,24926,24927,24928,24929,24931,24932,24933,24934,24937,24938,24939,24940,24941,24942,24943,24945,24946,24947,24948,24950,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24972,24973,24975,24976,24977,24978,24979,24981,24982,24983,24984,24985,24986,24987,24988,24990,24991,24992,24993,24994,24995,24996,24997,24998,25002,25003,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25016,25017,25018,25019,25020,25021,25023,25024,25025,25027,25028,25029,25030,25031,25033,25036,25037,25038,25039,25040,25043,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25078,25079,25080,25081,25082,25083,25084,25085,25086,25088,25089,25090,25091,25092,25093,25095,25097,25107,25108,25113,25116,25117,25118,25120,25123,25126,25127,25128,25129,25131,25133,25135,25136,25137,25138,25141,25142,25144,25145,25146,25147,25148,25154,25156,25157,25158,25162,25167,25168,25173,25174,25175,25177,25178,25180,25181,25182,25183,25184,25185,25186,25188,25189,25192,25201,25202,25204,25205,25207,25208,25210,25211,25213,25217,25218,25219,25221,25222,25223,25224,25227,25228,25229,25230,25231,25232,25236,25241,25244,25245,25246,25251,25254,25255,25257,25258,25261,25262,25263,25264,25266,25267,25268,25270,25271,25272,25274,25278,25280,25281,25283,25291,25295,25297,25301,25309,25310,25312,25313,25316,25322,25323,25328,25330,25333,25336,25337,25338,25339,25344,25347,25348,25349,25350,25354,25355,25356,25357,25359,25360,25362,25363,25364,25365,25367,25368,25369,25372,25382,25383,25385,25388,25389,25390,25392,25393,25395,25396,25397,25398,25399,25400,25403,25404,25406,25407,25408,25409,25412,25415,25416,25418,25425,25426,25427,25428,25430,25431,25432,25433,25434,25435,25436,25437,25440,25444,25445,25446,25448,25450,25451,25452,25455,25456,25458,25459,25460,25461,25464,25465,25468,25469,25470,25471,25473,25475,25476,25477,25478,25483,25485,25489,25491,25492,25493,25495,25497,25498,25499,25500,25501,25502,25503,25505,25508,25510,25515,25519,25521,25522,25525,25526,25529,25531,25533,25535,25536,25537,25538,25539,25541,25543,25544,25546,25547,25548,25553,25555,25556,25557,25559,25560,25561,25562,25563,25564,25565,25567,25570,25572,25573,25574,25575,25576,25579,25580,25582,25583,25584,25585,25587,25589,25591,25593,25594,25595,25596,25598,25603,25604,25606,25607,25608,25609,25610,25613,25614,25617,25618,25621,25622,25623,25624,25625,25626,25629,25631,25634,25635,25636,25637,25639,25640,25641,25643,25646,25647,25648,25649,25650,25651,25653,25654,25655,25656,25657,25659,25660,25662,25664,25666,25667,25673,25675,25676,25677,25678,25679,25680,25681,25683,25685,25686,25687,25689,25690,25691,25692,25693,25695,25696,25697,25698,25699,25700,25701,25702,25704,25706,25707,25708,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25723,25724,25725,25726,25727,25728,25729,25731,25734,25736,25737,25738,25739,25740,25741,25742,25743,25744,25747,25748,25751,25752,25754,25755,25756,25757,25759,25760,25761,25762,25763,25765,25766,25767,25768,25770,25771,25775,25777,25778,25779,25780,25782,25785,25787,25789,25790,25791,25793,25795,25796,25798,25799,25800,25801,25802,25803,25804,25807,25809,25811,25812,25813,25814,25817,25818,25819,25820,25821,25823,25824,25825,25827,25829,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25857,25858,25859,25860,25861,25862,25863,25864,25866,25867,25868,25869,25870,25871,25872,25873,25875,25876,25877,25878,25879,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25894,25895,25896,25897,25898,25900,25901,25904,25905,25906,25907,25911,25914,25916,25917,25920,25921,25922,25923,25924,25926,25927,25930,25931,25933,25934,25936,25938,25939,25940,25943,25944,25946,25948,25951,25952,25953,25956,25957,25959,25960,25961,25962,25965,25966,25967,25969,25971,25973,25974,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25992,25993,25994,25997,25998,25999,26002,26004,26005,26006,26008,26010,26013,26014,26016,26018,26019,26022,26024,26026,26028,26030,26033,26034,26035,26036,26037,26038,26039,26040,26042,26043,26046,26047,26048,26050,26055,26056,26057,26058,26061,26064,26065,26067,26068,26069,26072,26073,26074,26075,26076,26077,26078,26079,26081,26083,26084,26090,26091,26098,26099,26100,26101,26104,26105,26107,26108,26109,26110,26111,26113,26116,26117,26119,26120,26121,26123,26125,26128,26129,26130,26134,26135,26136,26138,26139,26140,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26162,26163,26167,26168,26169,26170,26171,26173,26175,26176,26178,26180,26181,26182,26183,26184,26185,26186,26189,26190,26192,26193,26200,26201,26203,26204,26205,26206,26208,26210,26211,26213,26215,26217,26218,26219,26220,26221,26225,26226,26227,26229,26232,26233,26235,26236,26237,26239,26240,26241,26243,26245,26246,26248,26249,26250,26251,26253,26254,26255,26256,26258,26259,26260,26261,26264,26265,26266,26267,26268,26270,26271,26272,26273,26274,26275,26276,26277,26278,26281,26282,26283,26284,26285,26287,26288,26289,26290,26291,26293,26294,26295,26296,26298,26299,26300,26301,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26330,26334,26335,26336,26337,26338,26339,26340,26341,26343,26344,26346,26347,26348,26349,26350,26351,26353,26357,26358,26360,26362,26363,26365,26369,26370,26371,26372,26373,26374,26375,26380,26382,26383,26385,26386,26387,26390,26392,26393,26394,26396,26398,26400,26401,26402,26403,26404,26405,26407,26409,26414,26416,26418,26419,26422,26423,26424,26425,26427,26428,26430,26431,26433,26436,26437,26439,26442,26443,26445,26450,26452,26453,26455,26456,26457,26458,26459,26461,26466,26467,26468,26470,26471,26475,26476,26478,26481,26484,26486,26488,26489,26490,26491,26493,26496,26498,26499,26501,26502,26504,26506,26508,26509,26510,26511,26513,26514,26515,26516,26518,26521,26523,26527,26528,26529,26532,26534,26537,26540,26542,26545,26546,26548,26553,26554,26555,26556,26557,26558,26559,26560,26562,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26581,26582,26583,26587,26591,26593,26595,26596,26598,26599,26600,26602,26603,26605,26606,26610,26613,26614,26615,26616,26617,26618,26619,26620,26622,26625,26626,26627,26628,26630,26637,26640,26642,26644,26645,26648,26649,26650,26651,26652,26654,26655,26656,26658,26659,26660,26661,26662,26663,26664,26667,26668,26669,26670,26671,26672,26673,26676,26677,26678,26682,26683,26687,26695,26699,26701,26703,26706,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26730,26732,26733,26734,26735,26736,26737,26738,26739,26741,26744,26745,26746,26747,26748,26749,26750,26751,26752,26754,26756,26759,26760,26761,26762,26763,26764,26765,26766,26768,26769,26770,26772,26773,26774,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26787,26788,26789,26793,26794,26795,26796,26798,26801,26802,26804,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26817,26819,26820,26821,26822,26823,26824,26826,26828,26830,26831,26832,26833,26835,26836,26838,26839,26841,26843,26844,26845,26846,26847,26849,26850,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26863,26866,26867,26868,26870,26871,26872,26875,26877,26878,26879,26880,26882,26883,26884,26886,26887,26888,26889,26890,26892,26895,26897,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26913,26914,26915,26917,26918,26919,26920,26921,26922,26923,26924,26926,26927,26929,26930,26931,26933,26934,26935,26936,26938,26939,26940,26942,26944,26945,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26965,26966,26968,26969,26971,26972,26975,26977,26978,26980,26981,26983,26984,26985,26986,26988,26989,26991,26992,26994,26995,26996,26997,26998,27002,27003,27005,27006,27007,27009,27011,27013,27018,27019,27020,27022,27023,27024,27025,27026,27027,27030,27031,27033,27034,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27049,27050,27052,27054,27055,27056,27058,27059,27061,27062,27064,27065,27066,27068,27069,27070,27071,27072,27074,27075,27076,27077,27078,27079,27080,27081,27083,27085,27087,27089,27090,27091,27093,27094,27095,27096,27097,27098,27100,27101,27102,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27118,27119,27120,27121,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27134,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27161,27162,27163,27164,27165,27166,27168,27170,27171,27172,27173,27174,27175,27177,27179,27180,27181,27182,27184,27186,27187,27188,27190,27191,27192,27193,27194,27195,27196,27199,27200,27201,27202,27203,27205,27206,27208,27209,27210,27211,27212,27213,27214,27215,27217,27218,27219,27220,27221,27222,27223,27226,27228,27229,27230,27231,27232,27234,27235,27236,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27250,27251,27252,27253,27254,27255,27256,27258,27259,27261,27262,27263,27265,27266,27267,27269,27270,27271,27272,27273,27274,27275,27276,27277,27279,27282,27283,27284,27285,27286,27288,27289,27290,27291,27292,27293,27294,27295,27297,27298,27299,27300,27301,27302,27303,27304,27306,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27429,27430,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27443,27444,27445,27446,27448,27451,27452,27453,27455,27456,27457,27458,27460,27461,27464,27466,27467,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27482,27483,27484,27485,27486,27487,27488,27489,27496,27497,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27514,27517,27518,27519,27520,27525,27528,27532,27534,27535,27536,27537,27540,27541,27543,27544,27545,27548,27549,27550,27551,27552,27554,27555,27556,27557,27558,27559,27560,27561,27563,27564,27565,27566,27567,27568,27569,27570,27574,27576,27577,27578,27579,27580,27581,27582,27584,27587,27588,27590,27591,27592,27593,27594,27596,27598,27600,27601,27608,27610,27612,27613,27614,27615,27616,27618,27619,27620,27621,27622,27623,27624,27625,27628,27629,27630,27632,27633,27634,27636,27638,27639,27640,27642,27643,27644,27646,27647,27648,27649,27650,27651,27652,27656,27657,27658,27659,27660,27662,27666,27671,27676,27677,27678,27680,27683,27685,27691,27692,27693,27697,27699,27702,27703,27705,27706,27707,27708,27710,27711,27715,27716,27717,27720,27723,27724,27725,27726,27727,27729,27730,27731,27734,27736,27737,27738,27746,27747,27749,27750,27751,27755,27756,27757,27758,27759,27761,27763,27765,27767,27768,27770,27771,27772,27775,27776,27780,27783,27786,27787,27789,27790,27793,27794,27797,27798,27799,27800,27802,27804,27805,27806,27808,27810,27816,27820,27823,27824,27828,27829,27830,27831,27834,27840,27841,27842,27843,27846,27847,27848,27851,27853,27854,27855,27857,27858,27864,27865,27866,27868,27869,27871,27876,27878,27879,27881,27884,27885,27890,27892,27897,27903,27904,27906,27907,27909,27910,27912,27913,27914,27917,27919,27920,27921,27923,27924,27925,27926,27928,27932,27933,27935,27936,27937,27938,27939,27940,27942,27944,27945,27948,27949,27951,27952,27956,27958,27959,27960,27962,27967,27968,27970,27972,27977,27980,27984,27989,27990,27991,27992,27995,27997,27999,28001,28002,28004,28005,28007,28008,28011,28012,28013,28016,28017,28018,28019,28021,28022,28025,28026,28027,28029,28030,28031,28032,28033,28035,28036,28038,28039,28042,28043,28045,28047,28048,28050,28054,28055,28056,28057,28058,28060,28066,28069,28076,28077,28080,28081,28083,28084,28086,28087,28089,28090,28091,28092,28093,28094,28097,28098,28099,28104,28105,28106,28109,28110,28111,28112,28114,28115,28116,28117,28119,28122,28123,28124,28127,28130,28131,28133,28135,28136,28137,28138,28141,28143,28144,28146,28148,28149,28150,28152,28154,28157,28158,28159,28160,28161,28162,28163,28164,28166,28167,28168,28169,28171,28175,28178,28179,28181,28184,28185,28187,28188,28190,28191,28194,28198,28199,28200,28202,28204,28206,28208,28209,28211,28213,28214,28215,28217,28219,28220,28221,28222,28223,28224,28225,28226,28229,28230,28231,28232,28233,28234,28235,28236,28239,28240,28241,28242,28245,28247,28249,28250,28252,28253,28254,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28268,28269,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28288,28289,28290,28292,28295,28296,28298,28299,28300,28301,28302,28305,28306,28307,28308,28309,28310,28311,28313,28314,28315,28317,28318,28320,28321,28323,28324,28326,28328,28329,28331,28332,28333,28334,28336,28339,28341,28344,28345,28348,28350,28351,28352,28355,28356,28357,28358,28360,28361,28362,28364,28365,28366,28368,28370,28374,28376,28377,28379,28380,28381,28387,28391,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28405,28406,28407,28408,28410,28411,28412,28413,28414,28415,28416,28417,28419,28420,28421,28423,28424,28426,28427,28428,28429,28430,28432,28433,28434,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28449,28450,28451,28453,28454,28455,28456,28460,28462,28464,28466,28468,28469,28471,28472,28473,28474,28475,28476,28477,28479,28480,28481,28482,28483,28484,28485,28488,28489,28490,28492,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28505,28506,28507,28509,28511,28512,28513,28515,28516,28517,28519,28520,28521,28522,28523,28524,28527,28528,28529,28531,28533,28534,28535,28537,28539,28541,28542,28543,28544,28545,28546,28547,28549,28550,28551,28554,28555,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28573,28574,28575,28576,28578,28579,28580,28581,28582,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28596,28597,28599,28600,28602,28603,28604,28605,28606,28607,28609,28611,28612,28613,28614,28615,28616,28618,28619,28620,28621,28622,28623,28624,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28639,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28690,28691,28692,28693,28694,28695,28696,28697,28700,28701,28702,28703,28704,28705,28706,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28726,28727,28728,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28749,28750,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28782,28785,28786,28787,28788,28791,28793,28794,28795,28797,28801,28802,28803,28804,28806,28807,28808,28811,28812,28813,28815,28816,28817,28819,28823,28824,28826,28827,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28848,28850,28852,28853,28854,28858,28862,28863,28868,28869,28870,28871,28873,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28890,28892,28893,28894,28896,28897,28898,28899,28901,28906,28910,28912,28913,28914,28915,28916,28917,28918,28920,28922,28923,28924,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28939,28940,28941,28942,28943,28945,28946,28948,28951,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28967,28968,28969,28970,28971,28972,28973,28974,28978,28979,28980,28981,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28998,28999,29000,29001,29003,29005,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29021,29023,29024,29025,29026,29027,29029,29033,29034,29035,29036,29037,29039,29040,29041,29044,29045,29046,29047,29049,29051,29052,29054,29055,29056,29057,29058,29059,29061,29062,29063,29064,29065,29067,29068,29069,29070,29072,29073,29074,29075,29077,29078,29079,29082,29083,29084,29085,29086,29089,29090,29091,29092,29093,29094,29095,29097,29098,29099,29101,29102,29103,29104,29105,29106,29108,29110,29111,29112,29114,29115,29116,29117,29118,29119,29120,29121,29122,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29135,29136,29137,29138,29139,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29153,29154,29155,29156,29158,29160,29161,29162,29163,29164,29165,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29225,29227,29229,29230,29231,29234,29235,29236,29242,29244,29246,29248,29249,29250,29251,29252,29253,29254,29257,29258,29259,29262,29263,29264,29265,29267,29268,29269,29271,29272,29274,29276,29278,29280,29283,29284,29285,29288,29290,29291,29292,29293,29296,29297,29299,29300,29302,29303,29304,29307,29308,29309,29314,29315,29317,29318,29319,29320,29321,29324,29326,29328,29329,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29358,29361,29362,29363,29365,29370,29371,29372,29373,29374,29375,29376,29381,29382,29383,29385,29386,29387,29388,29391,29393,29395,29396,29397,29398,29400,29402,29403,58566,58567,58568,58569,58570,58571,58572,58573,58574,58575,58576,58577,58578,58579,58580,58581,58582,58583,58584,58585,58586,58587,58588,58589,58590,58591,58592,58593,58594,58595,58596,58597,58598,58599,58600,58601,58602,58603,58604,58605,58606,58607,58608,58609,58610,58611,58612,58613,58614,58615,58616,58617,58618,58619,58620,58621,58622,58623,58624,58625,58626,58627,58628,58629,58630,58631,58632,58633,58634,58635,58636,58637,58638,58639,58640,58641,58642,58643,58644,58645,58646,58647,58648,58649,58650,58651,58652,58653,58654,58655,58656,58657,58658,58659,58660,58661,12288,12289,12290,183,713,711,168,12291,12293,8212,65374,8214,8230,8216,8217,8220,8221,12308,12309,12296,12297,12298,12299,12300,12301,12302,12303,12310,12311,12304,12305,177,215,247,8758,8743,8744,8721,8719,8746,8745,8712,8759,8730,8869,8741,8736,8978,8857,8747,8750,8801,8780,8776,8765,8733,8800,8814,8815,8804,8805,8734,8757,8756,9794,9792,176,8242,8243,8451,65284,164,65504,65505,8240,167,8470,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,8251,8594,8592,8593,8595,12307,58662,58663,58664,58665,58666,58667,58668,58669,58670,58671,58672,58673,58674,58675,58676,58677,58678,58679,58680,58681,58682,58683,58684,58685,58686,58687,58688,58689,58690,58691,58692,58693,58694,58695,58696,58697,58698,58699,58700,58701,58702,58703,58704,58705,58706,58707,58708,58709,58710,58711,58712,58713,58714,58715,58716,58717,58718,58719,58720,58721,58722,58723,58724,58725,58726,58727,58728,58729,58730,58731,58732,58733,58734,58735,58736,58737,58738,58739,58740,58741,58742,58743,58744,58745,58746,58747,58748,58749,58750,58751,58752,58753,58754,58755,58756,58757,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,59238,59239,59240,59241,59242,59243,9352,9353,9354,9355,9356,9357,9358,9359,9360,9361,9362,9363,9364,9365,9366,9367,9368,9369,9370,9371,9332,9333,9334,9335,9336,9337,9338,9339,9340,9341,9342,9343,9344,9345,9346,9347,9348,9349,9350,9351,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,8364,59245,12832,12833,12834,12835,12836,12837,12838,12839,12840,12841,59246,59247,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,8554,8555,59248,59249,58758,58759,58760,58761,58762,58763,58764,58765,58766,58767,58768,58769,58770,58771,58772,58773,58774,58775,58776,58777,58778,58779,58780,58781,58782,58783,58784,58785,58786,58787,58788,58789,58790,58791,58792,58793,58794,58795,58796,58797,58798,58799,58800,58801,58802,58803,58804,58805,58806,58807,58808,58809,58810,58811,58812,58813,58814,58815,58816,58817,58818,58819,58820,58821,58822,58823,58824,58825,58826,58827,58828,58829,58830,58831,58832,58833,58834,58835,58836,58837,58838,58839,58840,58841,58842,58843,58844,58845,58846,58847,58848,58849,58850,58851,58852,12288,65281,65282,65283,65509,65285,65286,65287,65288,65289,65290,65291,65292,65293,65294,65295,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,65306,65307,65308,65309,65310,65311,65312,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,65339,65340,65341,65342,65343,65344,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,65371,65372,65373,65507,58854,58855,58856,58857,58858,58859,58860,58861,58862,58863,58864,58865,58866,58867,58868,58869,58870,58871,58872,58873,58874,58875,58876,58877,58878,58879,58880,58881,58882,58883,58884,58885,58886,58887,58888,58889,58890,58891,58892,58893,58894,58895,58896,58897,58898,58899,58900,58901,58902,58903,58904,58905,58906,58907,58908,58909,58910,58911,58912,58913,58914,58915,58916,58917,58918,58919,58920,58921,58922,58923,58924,58925,58926,58927,58928,58929,58930,58931,58932,58933,58934,58935,58936,58937,58938,58939,58940,58941,58942,58943,58944,58945,58946,58947,58948,58949,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,59250,59251,59252,59253,59254,59255,59256,59257,59258,59259,59260,58950,58951,58952,58953,58954,58955,58956,58957,58958,58959,58960,58961,58962,58963,58964,58965,58966,58967,58968,58969,58970,58971,58972,58973,58974,58975,58976,58977,58978,58979,58980,58981,58982,58983,58984,58985,58986,58987,58988,58989,58990,58991,58992,58993,58994,58995,58996,58997,58998,58999,59000,59001,59002,59003,59004,59005,59006,59007,59008,59009,59010,59011,59012,59013,59014,59015,59016,59017,59018,59019,59020,59021,59022,59023,59024,59025,59026,59027,59028,59029,59030,59031,59032,59033,59034,59035,59036,59037,59038,59039,59040,59041,59042,59043,59044,59045,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,59261,59262,59263,59264,59265,59266,59267,59268,59046,59047,59048,59049,59050,59051,59052,59053,59054,59055,59056,59057,59058,59059,59060,59061,59062,59063,59064,59065,59066,59067,59068,59069,59070,59071,59072,59073,59074,59075,59076,59077,59078,59079,59080,59081,59082,59083,59084,59085,59086,59087,59088,59089,59090,59091,59092,59093,59094,59095,59096,59097,59098,59099,59100,59101,59102,59103,59104,59105,59106,59107,59108,59109,59110,59111,59112,59113,59114,59115,59116,59117,59118,59119,59120,59121,59122,59123,59124,59125,59126,59127,59128,59129,59130,59131,59132,59133,59134,59135,59136,59137,59138,59139,59140,59141,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,59269,59270,59271,59272,59273,59274,59275,59276,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,59277,59278,59279,59280,59281,59282,59283,65077,65078,65081,65082,65087,65088,65085,65086,65089,65090,65091,65092,59284,59285,65083,65084,65079,65080,65073,59286,65075,65076,59287,59288,59289,59290,59291,59292,59293,59294,59295,59142,59143,59144,59145,59146,59147,59148,59149,59150,59151,59152,59153,59154,59155,59156,59157,59158,59159,59160,59161,59162,59163,59164,59165,59166,59167,59168,59169,59170,59171,59172,59173,59174,59175,59176,59177,59178,59179,59180,59181,59182,59183,59184,59185,59186,59187,59188,59189,59190,59191,59192,59193,59194,59195,59196,59197,59198,59199,59200,59201,59202,59203,59204,59205,59206,59207,59208,59209,59210,59211,59212,59213,59214,59215,59216,59217,59218,59219,59220,59221,59222,59223,59224,59225,59226,59227,59228,59229,59230,59231,59232,59233,59234,59235,59236,59237,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,59296,59297,59298,59299,59300,59301,59302,59303,59304,59305,59306,59307,59308,59309,59310,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,59311,59312,59313,59314,59315,59316,59317,59318,59319,59320,59321,59322,59323,714,715,729,8211,8213,8229,8245,8453,8457,8598,8599,8600,8601,8725,8735,8739,8786,8806,8807,8895,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9581,9582,9583,9584,9585,9586,9587,9601,9602,9603,9604,9605,9606,9607,9608,9609,9610,9611,9612,9613,9614,9615,9619,9620,9621,9660,9661,9698,9699,9700,9701,9737,8853,12306,12317,12318,59324,59325,59326,59327,59328,59329,59330,59331,59332,59333,59334,257,225,462,224,275,233,283,232,299,237,464,236,333,243,466,242,363,250,468,249,470,472,474,476,252,234,593,7743,324,328,505,609,59337,59338,59339,59340,12549,12550,12551,12552,12553,12554,12555,12556,12557,12558,12559,12560,12561,12562,12563,12564,12565,12566,12567,12568,12569,12570,12571,12572,12573,12574,12575,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,59341,59342,59343,59344,59345,59346,59347,59348,59349,59350,59351,59352,59353,59354,59355,59356,59357,59358,59359,59360,59361,12321,12322,12323,12324,12325,12326,12327,12328,12329,12963,13198,13199,13212,13213,13214,13217,13252,13262,13265,13266,13269,65072,65506,65508,59362,8481,12849,59363,8208,59364,59365,59366,12540,12443,12444,12541,12542,12294,12445,12446,65097,65098,65099,65100,65101,65102,65103,65104,65105,65106,65108,65109,65110,65111,65113,65114,65115,65116,65117,65118,65119,65120,65121,65122,65123,65124,65125,65126,65128,65129,65130,65131,12350,12272,12273,12274,12275,12276,12277,12278,12279,12280,12281,12282,12283,12295,59380,59381,59382,59383,59384,59385,59386,59387,59388,59389,59390,59391,59392,9472,9473,9474,9475,9476,9477,9478,9479,9480,9481,9482,9483,9484,9485,9486,9487,9488,9489,9490,9491,9492,9493,9494,9495,9496,9497,9498,9499,9500,9501,9502,9503,9504,9505,9506,9507,9508,9509,9510,9511,9512,9513,9514,9515,9516,9517,9518,9519,9520,9521,9522,9523,9524,9525,9526,9527,9528,9529,9530,9531,9532,9533,9534,9535,9536,9537,9538,9539,9540,9541,9542,9543,9544,9545,9546,9547,59393,59394,59395,59396,59397,59398,59399,59400,59401,59402,59403,59404,59405,59406,59407,29404,29405,29407,29410,29411,29412,29413,29414,29415,29418,29419,29429,29430,29433,29437,29438,29439,29440,29442,29444,29445,29446,29447,29448,29449,29451,29452,29453,29455,29456,29457,29458,29460,29464,29465,29466,29471,29472,29475,29476,29478,29479,29480,29485,29487,29488,29490,29491,29493,29494,29498,29499,29500,29501,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29518,29519,29521,29523,29524,29525,29526,29528,29529,29530,29531,29532,29533,29534,29535,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29550,29552,29553,57344,57345,57346,57347,57348,57349,57350,57351,57352,57353,57354,57355,57356,57357,57358,57359,57360,57361,57362,57363,57364,57365,57366,57367,57368,57369,57370,57371,57372,57373,57374,57375,57376,57377,57378,57379,57380,57381,57382,57383,57384,57385,57386,57387,57388,57389,57390,57391,57392,57393,57394,57395,57396,57397,57398,57399,57400,57401,57402,57403,57404,57405,57406,57407,57408,57409,57410,57411,57412,57413,57414,57415,57416,57417,57418,57419,57420,57421,57422,57423,57424,57425,57426,57427,57428,57429,57430,57431,57432,57433,57434,57435,57436,57437,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29567,29568,29569,29570,29571,29573,29574,29576,29578,29580,29581,29583,29584,29586,29587,29588,29589,29591,29592,29593,29594,29596,29597,29598,29600,29601,29603,29604,29605,29606,29607,29608,29610,29612,29613,29617,29620,29621,29622,29624,29625,29628,29629,29630,29631,29633,29635,29636,29637,29638,29639,29643,29644,29646,29650,29651,29652,29653,29654,29655,29656,29658,29659,29660,29661,29663,29665,29666,29667,29668,29670,29672,29674,29675,29676,29678,29679,29680,29681,29683,29684,29685,29686,29687,57438,57439,57440,57441,57442,57443,57444,57445,57446,57447,57448,57449,57450,57451,57452,57453,57454,57455,57456,57457,57458,57459,57460,57461,57462,57463,57464,57465,57466,57467,57468,57469,57470,57471,57472,57473,57474,57475,57476,57477,57478,57479,57480,57481,57482,57483,57484,57485,57486,57487,57488,57489,57490,57491,57492,57493,57494,57495,57496,57497,57498,57499,57500,57501,57502,57503,57504,57505,57506,57507,57508,57509,57510,57511,57512,57513,57514,57515,57516,57517,57518,57519,57520,57521,57522,57523,57524,57525,57526,57527,57528,57529,57530,57531,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29700,29703,29704,29707,29708,29709,29710,29713,29714,29715,29716,29717,29718,29719,29720,29721,29724,29725,29726,29727,29728,29729,29731,29732,29735,29737,29739,29741,29743,29745,29746,29751,29752,29753,29754,29755,29757,29758,29759,29760,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29782,29784,29789,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29806,29807,29809,29810,29811,29812,29813,29816,29817,29818,57532,57533,57534,57535,57536,57537,57538,57539,57540,57541,57542,57543,57544,57545,57546,57547,57548,57549,57550,57551,57552,57553,57554,57555,57556,57557,57558,57559,57560,57561,57562,57563,57564,57565,57566,57567,57568,57569,57570,57571,57572,57573,57574,57575,57576,57577,57578,57579,57580,57581,57582,57583,57584,57585,57586,57587,57588,57589,57590,57591,57592,57593,57594,57595,57596,57597,57598,57599,57600,57601,57602,57603,57604,57605,57606,57607,57608,57609,57610,57611,57612,57613,57614,57615,57616,57617,57618,57619,57620,57621,57622,57623,57624,57625,29819,29820,29821,29823,29826,29828,29829,29830,29832,29833,29834,29836,29837,29839,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29853,29855,29856,29857,29858,29859,29860,29861,29862,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29907,29908,29909,29910,29911,29912,29913,29914,29915,29917,29919,29921,29925,29927,29928,29929,29930,29931,29932,29933,29936,29937,29938,57626,57627,57628,57629,57630,57631,57632,57633,57634,57635,57636,57637,57638,57639,57640,57641,57642,57643,57644,57645,57646,57647,57648,57649,57650,57651,57652,57653,57654,57655,57656,57657,57658,57659,57660,57661,57662,57663,57664,57665,57666,57667,57668,57669,57670,57671,57672,57673,57674,57675,57676,57677,57678,57679,57680,57681,57682,57683,57684,57685,57686,57687,57688,57689,57690,57691,57692,57693,57694,57695,57696,57697,57698,57699,57700,57701,57702,57703,57704,57705,57706,57707,57708,57709,57710,57711,57712,57713,57714,57715,57716,57717,57718,57719,29939,29941,29944,29945,29946,29947,29948,29949,29950,29952,29953,29954,29955,29957,29958,29959,29960,29961,29962,29963,29964,29966,29968,29970,29972,29973,29974,29975,29979,29981,29982,29984,29985,29986,29987,29988,29990,29991,29994,29998,30004,30006,30009,30012,30013,30015,30017,30018,30019,30020,30022,30023,30025,30026,30029,30032,30033,30034,30035,30037,30038,30039,30040,30045,30046,30047,30048,30049,30050,30051,30052,30055,30056,30057,30059,30060,30061,30062,30063,30064,30065,30067,30069,30070,30071,30074,30075,30076,30077,30078,30080,30081,30082,30084,30085,30087,57720,57721,57722,57723,57724,57725,57726,57727,57728,57729,57730,57731,57732,57733,57734,57735,57736,57737,57738,57739,57740,57741,57742,57743,57744,57745,57746,57747,57748,57749,57750,57751,57752,57753,57754,57755,57756,57757,57758,57759,57760,57761,57762,57763,57764,57765,57766,57767,57768,57769,57770,57771,57772,57773,57774,57775,57776,57777,57778,57779,57780,57781,57782,57783,57784,57785,57786,57787,57788,57789,57790,57791,57792,57793,57794,57795,57796,57797,57798,57799,57800,57801,57802,57803,57804,57805,57806,57807,57808,57809,57810,57811,57812,57813,30088,30089,30090,30092,30093,30094,30096,30099,30101,30104,30107,30108,30110,30114,30118,30119,30120,30121,30122,30125,30134,30135,30138,30139,30143,30144,30145,30150,30155,30156,30158,30159,30160,30161,30163,30167,30169,30170,30172,30173,30175,30176,30177,30181,30185,30188,30189,30190,30191,30194,30195,30197,30198,30199,30200,30202,30203,30205,30206,30210,30212,30214,30215,30216,30217,30219,30221,30222,30223,30225,30226,30227,30228,30230,30234,30236,30237,30238,30241,30243,30247,30248,30252,30254,30255,30257,30258,30262,30263,30265,30266,30267,30269,30273,30274,30276,57814,57815,57816,57817,57818,57819,57820,57821,57822,57823,57824,57825,57826,57827,57828,57829,57830,57831,57832,57833,57834,57835,57836,57837,57838,57839,57840,57841,57842,57843,57844,57845,57846,57847,57848,57849,57850,57851,57852,57853,57854,57855,57856,57857,57858,57859,57860,57861,57862,57863,57864,57865,57866,57867,57868,57869,57870,57871,57872,57873,57874,57875,57876,57877,57878,57879,57880,57881,57882,57883,57884,57885,57886,57887,57888,57889,57890,57891,57892,57893,57894,57895,57896,57897,57898,57899,57900,57901,57902,57903,57904,57905,57906,57907,30277,30278,30279,30280,30281,30282,30283,30286,30287,30288,30289,30290,30291,30293,30295,30296,30297,30298,30299,30301,30303,30304,30305,30306,30308,30309,30310,30311,30312,30313,30314,30316,30317,30318,30320,30321,30322,30323,30324,30325,30326,30327,30329,30330,30332,30335,30336,30337,30339,30341,30345,30346,30348,30349,30351,30352,30354,30356,30357,30359,30360,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30373,30374,30375,30376,30377,30378,30379,30380,30381,30383,30384,30387,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30400,30401,30403,21834,38463,22467,25384,21710,21769,21696,30353,30284,34108,30702,33406,30861,29233,38552,38797,27688,23433,20474,25353,26263,23736,33018,26696,32942,26114,30414,20985,25942,29100,32753,34948,20658,22885,25034,28595,33453,25420,25170,21485,21543,31494,20843,30116,24052,25300,36299,38774,25226,32793,22365,38712,32610,29240,30333,26575,30334,25670,20336,36133,25308,31255,26001,29677,25644,25203,33324,39041,26495,29256,25198,25292,20276,29923,21322,21150,32458,37030,24110,26758,27036,33152,32465,26834,30917,34444,38225,20621,35876,33502,32990,21253,35090,21093,30404,30407,30409,30411,30412,30419,30421,30425,30426,30428,30429,30430,30432,30433,30434,30435,30436,30438,30439,30440,30441,30442,30443,30444,30445,30448,30451,30453,30454,30455,30458,30459,30461,30463,30464,30466,30467,30469,30470,30474,30476,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30491,30492,30493,30494,30497,30499,30500,30501,30503,30506,30507,30508,30510,30512,30513,30514,30515,30516,30521,30523,30525,30526,30527,30530,30532,30533,30534,30536,30537,30538,30539,30540,30541,30542,30543,30546,30547,30548,30549,30550,30551,30552,30553,30556,34180,38649,20445,22561,39281,23453,25265,25253,26292,35961,40077,29190,26479,30865,24754,21329,21271,36744,32972,36125,38049,20493,29384,22791,24811,28953,34987,22868,33519,26412,31528,23849,32503,29997,27893,36454,36856,36924,40763,27604,37145,31508,24444,30887,34006,34109,27605,27609,27606,24065,24199,30201,38381,25949,24330,24517,36767,22721,33218,36991,38491,38829,36793,32534,36140,25153,20415,21464,21342,36776,36777,36779,36941,26631,24426,33176,34920,40150,24971,21035,30250,24428,25996,28626,28392,23486,25672,20853,20912,26564,19993,31177,39292,28851,30557,30558,30559,30560,30564,30567,30569,30570,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30586,30587,30588,30593,30594,30595,30598,30599,30600,30601,30602,30603,30607,30608,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30625,30627,30628,30630,30632,30635,30637,30638,30639,30641,30642,30644,30646,30647,30648,30649,30650,30652,30654,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30670,30671,30672,30673,30674,30675,30676,30677,30678,30680,30681,30682,30685,30686,30687,30688,30689,30692,30149,24182,29627,33760,25773,25320,38069,27874,21338,21187,25615,38082,31636,20271,24091,33334,33046,33162,28196,27850,39539,25429,21340,21754,34917,22496,19981,24067,27493,31807,37096,24598,25830,29468,35009,26448,25165,36130,30572,36393,37319,24425,33756,34081,39184,21442,34453,27531,24813,24808,28799,33485,33329,20179,27815,34255,25805,31961,27133,26361,33609,21397,31574,20391,20876,27979,23618,36461,25554,21449,33580,33590,26597,30900,25661,23519,23700,24046,35815,25286,26612,35962,25600,25530,34633,39307,35863,32544,38130,20135,38416,39076,26124,29462,30694,30696,30698,30703,30704,30705,30706,30708,30709,30711,30713,30714,30715,30716,30723,30724,30725,30726,30727,30728,30730,30731,30734,30735,30736,30739,30741,30745,30747,30750,30752,30753,30754,30756,30760,30762,30763,30766,30767,30769,30770,30771,30773,30774,30781,30783,30785,30786,30787,30788,30790,30792,30793,30794,30795,30797,30799,30801,30803,30804,30808,30809,30810,30811,30812,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30831,30832,30833,30834,30835,30836,30837,30838,30840,30841,30842,30843,30845,30846,30847,30848,30849,30850,30851,22330,23581,24120,38271,20607,32928,21378,25950,30021,21809,20513,36229,25220,38046,26397,22066,28526,24034,21557,28818,36710,25199,25764,25507,24443,28552,37108,33251,36784,23576,26216,24561,27785,38472,36225,34924,25745,31216,22478,27225,25104,21576,20056,31243,24809,28548,35802,25215,36894,39563,31204,21507,30196,25345,21273,27744,36831,24347,39536,32827,40831,20360,23610,36196,32709,26021,28861,20805,20914,34411,23815,23456,25277,37228,30068,36364,31264,24833,31609,20167,32504,30597,19985,33261,21021,20986,27249,21416,36487,38148,38607,28353,38500,26970,30852,30853,30854,30856,30858,30859,30863,30864,30866,30868,30869,30870,30873,30877,30878,30880,30882,30884,30886,30888,30889,30890,30891,30892,30893,30894,30895,30901,30902,30903,30904,30906,30907,30908,30909,30911,30912,30914,30915,30916,30918,30919,30920,30924,30925,30926,30927,30929,30930,30931,30934,30935,30936,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30953,30954,30955,30957,30958,30959,30960,30961,30963,30965,30966,30968,30969,30971,30972,30973,30974,30975,30976,30978,30979,30980,30982,30983,30984,30985,30986,30987,30988,30784,20648,30679,25616,35302,22788,25571,24029,31359,26941,20256,33337,21912,20018,30126,31383,24162,24202,38383,21019,21561,28810,25462,38180,22402,26149,26943,37255,21767,28147,32431,34850,25139,32496,30133,33576,30913,38604,36766,24904,29943,35789,27492,21050,36176,27425,32874,33905,22257,21254,20174,19995,20945,31895,37259,31751,20419,36479,31713,31388,25703,23828,20652,33030,30209,31929,28140,32736,26449,23384,23544,30923,25774,25619,25514,25387,38169,25645,36798,31572,30249,25171,22823,21574,27513,20643,25140,24102,27526,20195,36151,34955,24453,36910,30989,30990,30991,30992,30993,30994,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31007,31008,31009,31010,31011,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31029,31030,31031,31032,31033,31037,31039,31042,31043,31044,31045,31047,31050,31051,31052,31053,31054,31055,31056,31057,31058,31060,31061,31064,31065,31073,31075,31076,31078,31081,31082,31083,31084,31086,31088,31089,31090,31091,31092,31093,31094,31097,31099,31100,31101,31102,31103,31106,31107,31110,31111,31112,31113,31115,31116,31117,31118,31120,31121,31122,24608,32829,25285,20025,21333,37112,25528,32966,26086,27694,20294,24814,28129,35806,24377,34507,24403,25377,20826,33633,26723,20992,25443,36424,20498,23707,31095,23548,21040,31291,24764,36947,30423,24503,24471,30340,36460,28783,30331,31561,30634,20979,37011,22564,20302,28404,36842,25932,31515,29380,28068,32735,23265,25269,24213,22320,33922,31532,24093,24351,36882,32532,39072,25474,28359,30872,28857,20856,38747,22443,30005,20291,30008,24215,24806,22880,28096,27583,30857,21500,38613,20939,20993,25481,21514,38035,35843,36300,29241,30879,34678,36845,35853,21472,31123,31124,31125,31126,31127,31128,31129,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31156,31157,31158,31159,31160,31164,31167,31170,31172,31173,31175,31176,31178,31180,31182,31183,31184,31187,31188,31190,31191,31193,31194,31195,31196,31197,31198,31200,31201,31202,31205,31208,31210,31212,31214,31217,31218,31219,31220,31221,31222,31223,31225,31226,31228,31230,31231,31233,31236,31237,31239,31240,31241,31242,31244,31247,31248,31249,31250,31251,31253,31254,31256,31257,31259,31260,19969,30447,21486,38025,39030,40718,38189,23450,35746,20002,19996,20908,33891,25026,21160,26635,20375,24683,20923,27934,20828,25238,26007,38497,35910,36887,30168,37117,30563,27602,29322,29420,35835,22581,30585,36172,26460,38208,32922,24230,28193,22930,31471,30701,38203,27573,26029,32526,22534,20817,38431,23545,22697,21544,36466,25958,39039,22244,38045,30462,36929,25479,21702,22810,22842,22427,36530,26421,36346,33333,21057,24816,22549,34558,23784,40517,20420,39069,35769,23077,24694,21380,25212,36943,37122,39295,24681,32780,20799,32819,23572,39285,27953,20108,31261,31263,31265,31266,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31284,31285,31286,31288,31290,31294,31296,31297,31298,31299,31300,31301,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31314,31315,31316,31317,31318,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31345,31346,31347,31349,31355,31356,31357,31358,31362,31365,31367,31369,31370,31371,31372,31374,31375,31376,31379,31380,31385,31386,31387,31390,31393,31394,36144,21457,32602,31567,20240,20047,38400,27861,29648,34281,24070,30058,32763,27146,30718,38034,32321,20961,28902,21453,36820,33539,36137,29359,39277,27867,22346,33459,26041,32938,25151,38450,22952,20223,35775,32442,25918,33778,38750,21857,39134,32933,21290,35837,21536,32954,24223,27832,36153,33452,37210,21545,27675,20998,32439,22367,28954,27774,31881,22859,20221,24575,24868,31914,20016,23553,26539,34562,23792,38155,39118,30127,28925,36898,20911,32541,35773,22857,20964,20315,21542,22827,25975,32932,23413,25206,25282,36752,24133,27679,31526,20239,20440,26381,31395,31396,31399,31401,31402,31403,31406,31407,31408,31409,31410,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31447,31448,31450,31451,31452,31453,31457,31458,31460,31463,31464,31465,31466,31467,31468,31470,31472,31473,31474,31475,31476,31477,31478,31479,31480,31483,31484,31486,31488,31489,31490,31493,31495,31497,31500,31501,31502,31504,31506,31507,31510,31511,31512,31514,31516,31517,31519,31521,31522,31523,31527,31529,31533,28014,28074,31119,34993,24343,29995,25242,36741,20463,37340,26023,33071,33105,24220,33104,36212,21103,35206,36171,22797,20613,20184,38428,29238,33145,36127,23500,35747,38468,22919,32538,21648,22134,22030,35813,25913,27010,38041,30422,28297,24178,29976,26438,26577,31487,32925,36214,24863,31174,25954,36195,20872,21018,38050,32568,32923,32434,23703,28207,26464,31705,30347,39640,33167,32660,31957,25630,38224,31295,21578,21733,27468,25601,25096,40509,33011,30105,21106,38761,33883,26684,34532,38401,38548,38124,20010,21508,32473,26681,36319,32789,26356,24218,32697,31535,31536,31538,31540,31541,31542,31543,31545,31547,31549,31551,31552,31553,31554,31555,31556,31558,31560,31562,31565,31566,31571,31573,31575,31577,31580,31582,31583,31585,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31599,31600,31603,31604,31606,31608,31610,31612,31613,31615,31617,31618,31619,31620,31622,31623,31624,31625,31626,31627,31628,31630,31631,31633,31634,31635,31638,31640,31641,31642,31643,31646,31647,31648,31651,31652,31653,31662,31663,31664,31666,31667,31669,31670,31671,31673,31674,31675,31676,31677,31678,31679,31680,31682,31683,31684,22466,32831,26775,24037,25915,21151,24685,40858,20379,36524,20844,23467,24339,24041,27742,25329,36129,20849,38057,21246,27807,33503,29399,22434,26500,36141,22815,36764,33735,21653,31629,20272,27837,23396,22993,40723,21476,34506,39592,35895,32929,25925,39038,22266,38599,21038,29916,21072,23521,25346,35074,20054,25296,24618,26874,20851,23448,20896,35266,31649,39302,32592,24815,28748,36143,20809,24191,36891,29808,35268,22317,30789,24402,40863,38394,36712,39740,35809,30328,26690,26588,36330,36149,21053,36746,28378,26829,38149,37101,22269,26524,35065,36807,21704,31685,31688,31689,31690,31691,31693,31694,31695,31696,31698,31700,31701,31702,31703,31704,31707,31708,31710,31711,31712,31714,31715,31716,31719,31720,31721,31723,31724,31725,31727,31728,31730,31731,31732,31733,31734,31736,31737,31738,31739,31741,31743,31744,31745,31746,31747,31748,31749,31750,31752,31753,31754,31757,31758,31760,31761,31762,31763,31764,31765,31767,31768,31769,31770,31771,31772,31773,31774,31776,31777,31778,31779,31780,31781,31784,31785,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31801,31802,31803,31804,31805,31806,31810,39608,23401,28023,27686,20133,23475,39559,37219,25000,37039,38889,21547,28085,23506,20989,21898,32597,32752,25788,25421,26097,25022,24717,28938,27735,27721,22831,26477,33322,22741,22158,35946,27627,37085,22909,32791,21495,28009,21621,21917,33655,33743,26680,31166,21644,20309,21512,30418,35977,38402,27827,28088,36203,35088,40548,36154,22079,40657,30165,24456,29408,24680,21756,20136,27178,34913,24658,36720,21700,28888,34425,40511,27946,23439,24344,32418,21897,20399,29492,21564,21402,20505,21518,21628,20046,24573,29786,22774,33899,32993,34676,29392,31946,28246,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31861,31862,31863,31864,31865,31866,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31882,31883,31884,31885,31886,31887,31888,31891,31892,31894,31897,31898,31899,31904,31905,31907,31910,31911,31912,31913,31915,31916,31917,31919,31920,31924,31925,31926,31927,31928,31930,31931,24359,34382,21804,25252,20114,27818,25143,33457,21719,21326,29502,28369,30011,21010,21270,35805,27088,24458,24576,28142,22351,27426,29615,26707,36824,32531,25442,24739,21796,30186,35938,28949,28067,23462,24187,33618,24908,40644,30970,34647,31783,30343,20976,24822,29004,26179,24140,24653,35854,28784,25381,36745,24509,24674,34516,22238,27585,24724,24935,21321,24800,26214,36159,31229,20250,28905,27719,35763,35826,32472,33636,26127,23130,39746,27985,28151,35905,27963,20249,28779,33719,25110,24785,38669,36135,31096,20987,22334,22522,26426,30072,31293,31215,31637,31935,31936,31938,31939,31940,31942,31945,31947,31950,31951,31952,31953,31954,31955,31956,31960,31962,31963,31965,31966,31969,31970,31971,31972,31973,31974,31975,31977,31978,31979,31980,31981,31982,31984,31985,31986,31987,31988,31989,31990,31991,31993,31994,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32033,32035,32036,32037,32038,32040,32041,32042,32044,32045,32046,32048,32049,32050,32051,32052,32053,32054,32908,39269,36857,28608,35749,40481,23020,32489,32521,21513,26497,26840,36753,31821,38598,21450,24613,30142,27762,21363,23241,32423,25380,20960,33034,24049,34015,25216,20864,23395,20238,31085,21058,24760,27982,23492,23490,35745,35760,26082,24524,38469,22931,32487,32426,22025,26551,22841,20339,23478,21152,33626,39050,36158,30002,38078,20551,31292,20215,26550,39550,23233,27516,30417,22362,23574,31546,38388,29006,20860,32937,33392,22904,32516,33575,26816,26604,30897,30839,25315,25441,31616,20461,21098,20943,33616,27099,37492,36341,36145,35265,38190,31661,20214,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32111,32112,32113,32114,32115,32116,32117,32118,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,20581,33328,21073,39279,28176,28293,28071,24314,20725,23004,23558,27974,27743,30086,33931,26728,22870,35762,21280,37233,38477,34121,26898,30977,28966,33014,20132,37066,27975,39556,23047,22204,25605,38128,30699,20389,33050,29409,35282,39290,32564,32478,21119,25945,37237,36735,36739,21483,31382,25581,25509,30342,31224,34903,38454,25130,21163,33410,26708,26480,25463,30571,31469,27905,32467,35299,22992,25106,34249,33445,30028,20511,20171,30117,35819,23626,24062,31563,26020,37329,20170,27941,35167,32039,38182,20165,35880,36827,38771,26187,31105,36817,28908,28024,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32167,32168,32169,32170,32171,32172,32173,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,23613,21170,33606,20834,33550,30555,26230,40120,20140,24778,31934,31923,32463,20117,35686,26223,39048,38745,22659,25964,38236,24452,30153,38742,31455,31454,20928,28847,31384,25578,31350,32416,29590,38893,20037,28792,20061,37202,21417,25937,26087,33276,33285,21646,23601,30106,38816,25304,29401,30141,23621,39545,33738,23616,21632,30697,20030,27822,32858,25298,25454,24040,20855,36317,36382,38191,20465,21477,24807,28844,21095,25424,40515,23071,20518,30519,21367,32482,25733,25899,25225,25496,20500,29237,35273,20915,35776,32477,22343,33740,38055,20891,21531,23803,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32316,32317,32318,32319,32320,32322,32323,32324,32325,32326,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,20426,31459,27994,37089,39567,21888,21654,21345,21679,24320,25577,26999,20975,24936,21002,22570,21208,22350,30733,30475,24247,24951,31968,25179,25239,20130,28821,32771,25335,28900,38752,22391,33499,26607,26869,30933,39063,31185,22771,21683,21487,28212,20811,21051,23458,35838,32943,21827,22438,24691,22353,21549,31354,24656,23380,25511,25248,21475,25187,23495,26543,21741,31391,33510,37239,24211,35044,22840,22446,25358,36328,33007,22359,31607,20393,24555,23485,27454,21281,31568,29378,26694,30719,30518,26103,20917,20111,30420,23743,31397,33909,22862,39745,20608,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32412,32413,32414,32430,32436,32443,32444,32470,32484,32492,32505,32522,32528,32542,32567,32569,32571,32572,32573,32574,32575,32576,32577,32579,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32594,32595,39304,24871,28291,22372,26118,25414,22256,25324,25193,24275,38420,22403,25289,21895,34593,33098,36771,21862,33713,26469,36182,34013,23146,26639,25318,31726,38417,20848,28572,35888,25597,35272,25042,32518,28866,28389,29701,27028,29436,24266,37070,26391,28010,25438,21171,29282,32769,20332,23013,37226,28889,28061,21202,20048,38647,38253,34174,30922,32047,20769,22418,25794,32907,31867,27882,26865,26974,20919,21400,26792,29313,40654,31729,29432,31163,28435,29702,26446,37324,40100,31036,33673,33620,21519,26647,20029,21385,21169,30782,21382,21033,20616,20363,20432,32598,32601,32603,32604,32605,32606,32608,32611,32612,32613,32614,32615,32619,32620,32621,32623,32624,32627,32629,32630,32631,32632,32634,32635,32636,32637,32639,32640,32642,32643,32644,32645,32646,32647,32648,32649,32651,32653,32655,32656,32657,32658,32659,32661,32662,32663,32664,32665,32667,32668,32672,32674,32675,32677,32678,32680,32681,32682,32683,32684,32685,32686,32689,32691,32692,32693,32694,32695,32698,32699,32702,32704,32706,32707,32708,32710,32711,32712,32713,32715,32717,32719,32720,32721,32722,32723,32726,32727,32729,32730,32731,32732,32733,32734,32738,32739,30178,31435,31890,27813,38582,21147,29827,21737,20457,32852,33714,36830,38256,24265,24604,28063,24088,25947,33080,38142,24651,28860,32451,31918,20937,26753,31921,33391,20004,36742,37327,26238,20142,35845,25769,32842,20698,30103,29134,23525,36797,28518,20102,25730,38243,24278,26009,21015,35010,28872,21155,29454,29747,26519,30967,38678,20020,37051,40158,28107,20955,36161,21533,25294,29618,33777,38646,40836,38083,20278,32666,20940,28789,38517,23725,39046,21478,20196,28316,29705,27060,30827,39311,30041,21016,30244,27969,26611,20845,40857,32843,21657,31548,31423,32740,32743,32744,32746,32747,32748,32749,32751,32754,32756,32757,32758,32759,32760,32761,32762,32765,32766,32767,32770,32775,32776,32777,32778,32782,32783,32785,32787,32794,32795,32797,32798,32799,32801,32803,32804,32811,32812,32813,32814,32815,32816,32818,32820,32825,32826,32828,32830,32832,32833,32836,32837,32839,32840,32841,32846,32847,32848,32849,32851,32853,32854,32855,32857,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32875,32876,32877,32878,32879,32880,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,38534,22404,25314,38471,27004,23044,25602,31699,28431,38475,33446,21346,39045,24208,28809,25523,21348,34383,40065,40595,30860,38706,36335,36162,40575,28510,31108,24405,38470,25134,39540,21525,38109,20387,26053,23653,23649,32533,34385,27695,24459,29575,28388,32511,23782,25371,23402,28390,21365,20081,25504,30053,25249,36718,20262,20177,27814,32438,35770,33821,34746,32599,36923,38179,31657,39585,35064,33853,27931,39558,32476,22920,40635,29595,30721,34434,39532,39554,22043,21527,22475,20080,40614,21334,36808,33033,30610,39314,34542,28385,34067,26364,24930,28459,32894,32897,32898,32901,32904,32906,32909,32910,32911,32912,32913,32914,32916,32917,32919,32921,32926,32931,32934,32935,32936,32940,32944,32947,32949,32950,32952,32953,32955,32965,32967,32968,32969,32970,32971,32975,32976,32977,32978,32979,32980,32981,32984,32991,32992,32994,32995,32998,33006,33013,33015,33017,33019,33022,33023,33024,33025,33027,33028,33029,33031,33032,33035,33036,33045,33047,33049,33051,33052,33053,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33069,33070,33072,33075,33076,33077,33079,33081,33082,33083,33084,33085,33087,35881,33426,33579,30450,27667,24537,33725,29483,33541,38170,27611,30683,38086,21359,33538,20882,24125,35980,36152,20040,29611,26522,26757,37238,38665,29028,27809,30473,23186,38209,27599,32654,26151,23504,22969,23194,38376,38391,20204,33804,33945,27308,30431,38192,29467,26790,23391,30511,37274,38753,31964,36855,35868,24357,31859,31192,35269,27852,34588,23494,24130,26825,30496,32501,20885,20813,21193,23081,32517,38754,33495,25551,30596,34256,31186,28218,24217,22937,34065,28781,27665,25279,30399,25935,24751,38397,26126,34719,40483,38125,21517,21629,35884,25720,33088,33089,33090,33091,33092,33093,33095,33097,33101,33102,33103,33106,33110,33111,33112,33115,33116,33117,33118,33119,33121,33122,33123,33124,33126,33128,33130,33131,33132,33135,33138,33139,33141,33142,33143,33144,33153,33155,33156,33157,33158,33159,33161,33163,33164,33165,33166,33168,33170,33171,33172,33173,33174,33175,33177,33178,33182,33183,33184,33185,33186,33188,33189,33191,33193,33195,33196,33197,33198,33199,33200,33201,33202,33204,33205,33206,33207,33208,33209,33212,33213,33214,33215,33220,33221,33223,33224,33225,33227,33229,33230,33231,33232,33233,33234,33235,25721,34321,27169,33180,30952,25705,39764,25273,26411,33707,22696,40664,27819,28448,23518,38476,35851,29279,26576,25287,29281,20137,22982,27597,22675,26286,24149,21215,24917,26408,30446,30566,29287,31302,25343,21738,21584,38048,37027,23068,32435,27670,20035,22902,32784,22856,21335,30007,38590,22218,25376,33041,24700,38393,28118,21602,39297,20869,23273,33021,22958,38675,20522,27877,23612,25311,20320,21311,33147,36870,28346,34091,25288,24180,30910,25781,25467,24565,23064,37247,40479,23615,25423,32834,23421,21870,38218,38221,28037,24744,26592,29406,20957,23425,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33252,33253,33254,33256,33257,33259,33262,33263,33264,33265,33266,33269,33270,33271,33272,33273,33274,33277,33279,33283,33287,33288,33289,33290,33291,33294,33295,33297,33299,33301,33302,33303,33304,33305,33306,33309,33312,33316,33317,33318,33319,33321,33326,33330,33338,33340,33341,33343,33344,33345,33346,33347,33349,33350,33352,33354,33356,33357,33358,33360,33361,33362,33363,33364,33365,33366,33367,33369,33371,33372,33373,33374,33376,33377,33378,33379,33380,33381,33382,33383,33385,25319,27870,29275,25197,38062,32445,33043,27987,20892,24324,22900,21162,24594,22899,26262,34384,30111,25386,25062,31983,35834,21734,27431,40485,27572,34261,21589,20598,27812,21866,36276,29228,24085,24597,29750,25293,25490,29260,24472,28227,27966,25856,28504,30424,30928,30460,30036,21028,21467,20051,24222,26049,32810,32982,25243,21638,21032,28846,34957,36305,27873,21624,32986,22521,35060,36180,38506,37197,20329,27803,21943,30406,30768,25256,28921,28558,24429,34028,26842,30844,31735,33192,26379,40527,25447,30896,22383,30738,38713,25209,25259,21128,29749,27607,33386,33387,33388,33389,33393,33397,33398,33399,33400,33403,33404,33408,33409,33411,33413,33414,33415,33417,33420,33424,33427,33428,33429,33430,33434,33435,33438,33440,33442,33443,33447,33458,33461,33462,33466,33467,33468,33471,33472,33474,33475,33477,33478,33481,33488,33494,33497,33498,33501,33506,33511,33512,33513,33514,33516,33517,33518,33520,33522,33523,33525,33526,33528,33530,33532,33533,33534,33535,33536,33546,33547,33549,33552,33554,33555,33558,33560,33561,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33577,33578,33582,33584,33586,33591,33595,33597,21860,33086,30130,30382,21305,30174,20731,23617,35692,31687,20559,29255,39575,39128,28418,29922,31080,25735,30629,25340,39057,36139,21697,32856,20050,22378,33529,33805,24179,20973,29942,35780,23631,22369,27900,39047,23110,30772,39748,36843,31893,21078,25169,38138,20166,33670,33889,33769,33970,22484,26420,22275,26222,28006,35889,26333,28689,26399,27450,26646,25114,22971,19971,20932,28422,26578,27791,20854,26827,22855,27495,30054,23822,33040,40784,26071,31048,31041,39569,36215,23682,20062,20225,21551,22865,30732,22120,27668,36804,24323,27773,27875,35755,25488,33598,33599,33601,33602,33604,33605,33608,33610,33611,33612,33613,33614,33619,33621,33622,33623,33624,33625,33629,33634,33648,33649,33650,33651,33652,33653,33654,33657,33658,33662,33663,33664,33665,33666,33667,33668,33671,33672,33674,33675,33676,33677,33679,33680,33681,33684,33685,33686,33687,33689,33690,33693,33695,33697,33698,33699,33700,33701,33702,33703,33708,33709,33710,33711,33717,33723,33726,33727,33730,33731,33732,33734,33736,33737,33739,33741,33742,33744,33745,33746,33747,33749,33751,33753,33754,33755,33758,33762,33763,33764,33766,33767,33768,33771,33772,33773,24688,27965,29301,25190,38030,38085,21315,36801,31614,20191,35878,20094,40660,38065,38067,21069,28508,36963,27973,35892,22545,23884,27424,27465,26538,21595,33108,32652,22681,34103,24378,25250,27207,38201,25970,24708,26725,30631,20052,20392,24039,38808,25772,32728,23789,20431,31373,20999,33540,19988,24623,31363,38054,20405,20146,31206,29748,21220,33465,25810,31165,23517,27777,38738,36731,27682,20542,21375,28165,25806,26228,27696,24773,39031,35831,24198,29756,31351,31179,19992,37041,29699,27714,22234,37195,27845,36235,21306,34502,26354,36527,23624,39537,28192,33774,33775,33779,33780,33781,33782,33783,33786,33787,33788,33790,33791,33792,33794,33797,33799,33800,33801,33802,33808,33810,33811,33812,33813,33814,33815,33817,33818,33819,33822,33823,33824,33825,33826,33827,33833,33834,33835,33836,33837,33838,33839,33840,33842,33843,33844,33845,33846,33847,33849,33850,33851,33854,33855,33856,33857,33858,33859,33860,33861,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33874,33875,33876,33877,33878,33880,33885,33886,33887,33888,33890,33892,33893,33894,33895,33896,33898,33902,33903,33904,33906,33908,33911,33913,33915,33916,21462,23094,40843,36259,21435,22280,39079,26435,37275,27849,20840,30154,25331,29356,21048,21149,32570,28820,30264,21364,40522,27063,30830,38592,35033,32676,28982,29123,20873,26579,29924,22756,25880,22199,35753,39286,25200,32469,24825,28909,22764,20161,20154,24525,38887,20219,35748,20995,22922,32427,25172,20173,26085,25102,33592,33993,33635,34701,29076,28342,23481,32466,20887,25545,26580,32905,33593,34837,20754,23418,22914,36785,20083,27741,20837,35109,36719,38446,34122,29790,38160,38384,28070,33509,24369,25746,27922,33832,33134,40131,22622,36187,19977,21441,33917,33918,33919,33920,33921,33923,33924,33925,33926,33930,33933,33935,33936,33937,33938,33939,33940,33941,33942,33944,33946,33947,33949,33950,33951,33952,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33968,33969,33971,33973,33974,33975,33979,33980,33982,33984,33986,33987,33989,33990,33991,33992,33995,33996,33998,33999,34002,34004,34005,34007,34008,34009,34010,34011,34012,34014,34017,34018,34020,34023,34024,34025,34026,34027,34029,34030,34031,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34045,34046,34048,34049,34050,20254,25955,26705,21971,20007,25620,39578,25195,23234,29791,33394,28073,26862,20711,33678,30722,26432,21049,27801,32433,20667,21861,29022,31579,26194,29642,33515,26441,23665,21024,29053,34923,38378,38485,25797,36193,33203,21892,27733,25159,32558,22674,20260,21830,36175,26188,19978,23578,35059,26786,25422,31245,28903,33421,21242,38902,23569,21736,37045,32461,22882,36170,34503,33292,33293,36198,25668,23556,24913,28041,31038,35774,30775,30003,21627,20280,36523,28145,23072,32453,31070,27784,23457,23158,29978,32958,24910,28183,22768,29983,29989,29298,21319,32499,34051,34052,34053,34054,34055,34056,34057,34058,34059,34061,34062,34063,34064,34066,34068,34069,34070,34072,34073,34075,34076,34077,34078,34080,34082,34083,34084,34085,34086,34087,34088,34089,34090,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34110,34111,34112,34113,34114,34116,34117,34118,34119,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34135,34136,34138,34139,34140,34141,34143,34144,34145,34146,34147,34149,34150,34151,34153,34154,34155,34156,34157,34158,34159,34160,34161,34163,34165,34166,34167,34168,34172,34173,34175,34176,34177,30465,30427,21097,32988,22307,24072,22833,29422,26045,28287,35799,23608,34417,21313,30707,25342,26102,20160,39135,34432,23454,35782,21490,30690,20351,23630,39542,22987,24335,31034,22763,19990,26623,20107,25325,35475,36893,21183,26159,21980,22124,36866,20181,20365,37322,39280,27663,24066,24643,23460,35270,35797,25910,25163,39318,23432,23551,25480,21806,21463,30246,20861,34092,26530,26803,27530,25234,36755,21460,33298,28113,30095,20070,36174,23408,29087,34223,26257,26329,32626,34560,40653,40736,23646,26415,36848,26641,26463,25101,31446,22661,24246,25968,28465,34178,34179,34182,34184,34185,34186,34187,34188,34189,34190,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34205,34206,34207,34208,34209,34210,34211,34213,34214,34215,34217,34219,34220,34221,34225,34226,34227,34228,34229,34230,34232,34234,34235,34236,34237,34238,34239,34240,34242,34243,34244,34245,34246,34247,34248,34250,34251,34252,34253,34254,34257,34258,34260,34262,34263,34264,34265,34266,34267,34269,34270,34271,34272,34273,34274,34275,34277,34278,34279,34280,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,24661,21047,32781,25684,34928,29993,24069,26643,25332,38684,21452,29245,35841,27700,30561,31246,21550,30636,39034,33308,35828,30805,26388,28865,26031,25749,22070,24605,31169,21496,19997,27515,32902,23546,21987,22235,20282,20284,39282,24051,26494,32824,24578,39042,36865,23435,35772,35829,25628,33368,25822,22013,33487,37221,20439,32032,36895,31903,20723,22609,28335,23487,35785,32899,37240,33948,31639,34429,38539,38543,32485,39635,30862,23681,31319,36930,38567,31071,23385,25439,31499,34001,26797,21766,32553,29712,32034,38145,25152,22604,20182,23427,22905,22612,34297,34298,34300,34301,34302,34304,34305,34306,34307,34308,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34322,34323,34324,34325,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34344,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34361,34362,34363,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34386,34387,34389,34390,34391,34392,34393,34395,34396,34397,34399,34400,34401,34403,34404,34405,34406,34407,34408,34409,34410,29549,25374,36427,36367,32974,33492,25260,21488,27888,37214,22826,24577,27760,22349,25674,36138,30251,28393,22363,27264,30192,28525,35885,35848,22374,27631,34962,30899,25506,21497,28845,27748,22616,25642,22530,26848,33179,21776,31958,20504,36538,28108,36255,28907,25487,28059,28372,32486,33796,26691,36867,28120,38518,35752,22871,29305,34276,33150,30140,35466,26799,21076,36386,38161,25552,39064,36420,21884,20307,26367,22159,24789,28053,21059,23625,22825,28155,22635,30000,29980,24684,33300,33094,25361,26465,36834,30522,36339,36148,38081,24086,21381,21548,28867,34413,34415,34416,34418,34419,34420,34421,34422,34423,34424,34435,34436,34437,34438,34439,34440,34441,34446,34447,34448,34449,34450,34452,34454,34455,34456,34457,34458,34459,34462,34463,34464,34465,34466,34469,34470,34475,34477,34478,34482,34483,34487,34488,34489,34491,34492,34493,34494,34495,34497,34498,34499,34501,34504,34508,34509,34514,34515,34517,34518,34519,34522,34524,34525,34528,34529,34530,34531,34533,34534,34535,34536,34538,34539,34540,34543,34549,34550,34551,34554,34555,34556,34557,34559,34561,34564,34565,34566,34571,34572,34574,34575,34576,34577,34580,34582,27712,24311,20572,20141,24237,25402,33351,36890,26704,37230,30643,21516,38108,24420,31461,26742,25413,31570,32479,30171,20599,25237,22836,36879,20984,31171,31361,22270,24466,36884,28034,23648,22303,21520,20820,28237,22242,25512,39059,33151,34581,35114,36864,21534,23663,33216,25302,25176,33073,40501,38464,39534,39548,26925,22949,25299,21822,25366,21703,34521,27964,23043,29926,34972,27498,22806,35916,24367,28286,29609,39037,20024,28919,23436,30871,25405,26202,30358,24779,23451,23113,19975,33109,27754,29579,20129,26505,32593,24448,26106,26395,24536,22916,23041,34585,34587,34589,34591,34592,34596,34598,34599,34600,34602,34603,34604,34605,34607,34608,34610,34611,34613,34614,34616,34617,34618,34620,34621,34624,34625,34626,34627,34628,34629,34630,34634,34635,34637,34639,34640,34641,34642,34644,34645,34646,34648,34650,34651,34652,34653,34654,34655,34657,34658,34662,34663,34664,34665,34666,34667,34668,34669,34671,34673,34674,34675,34677,34679,34680,34681,34682,34687,34688,34689,34692,34694,34695,34697,34698,34700,34702,34703,34704,34705,34706,34708,34709,34710,34712,34713,34714,34715,34716,34717,34718,34720,34721,34722,34723,34724,24013,24494,21361,38886,36829,26693,22260,21807,24799,20026,28493,32500,33479,33806,22996,20255,20266,23614,32428,26410,34074,21619,30031,32963,21890,39759,20301,28205,35859,23561,24944,21355,30239,28201,34442,25991,38395,32441,21563,31283,32010,38382,21985,32705,29934,25373,34583,28065,31389,25105,26017,21351,25569,27779,24043,21596,38056,20044,27745,35820,23627,26080,33436,26791,21566,21556,27595,27494,20116,25410,21320,33310,20237,20398,22366,25098,38654,26212,29289,21247,21153,24735,35823,26132,29081,26512,35199,30802,30717,26224,22075,21560,38177,29306,34725,34726,34727,34729,34730,34734,34736,34737,34738,34740,34742,34743,34744,34745,34747,34748,34750,34751,34753,34754,34755,34756,34757,34759,34760,34761,34764,34765,34766,34767,34768,34772,34773,34774,34775,34776,34777,34778,34780,34781,34782,34783,34785,34786,34787,34788,34790,34791,34792,34793,34795,34796,34797,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34810,34811,34812,34813,34815,34816,34817,34818,34820,34821,34822,34823,34824,34825,34827,34828,34829,34830,34831,34832,34833,34834,34836,34839,34840,34841,34842,34844,34845,34846,34847,34848,34851,31232,24687,24076,24713,33181,22805,24796,29060,28911,28330,27728,29312,27268,34989,24109,20064,23219,21916,38115,27927,31995,38553,25103,32454,30606,34430,21283,38686,36758,26247,23777,20384,29421,19979,21414,22799,21523,25472,38184,20808,20185,40092,32420,21688,36132,34900,33335,38386,28046,24358,23244,26174,38505,29616,29486,21439,33146,39301,32673,23466,38519,38480,32447,30456,21410,38262,39321,31665,35140,28248,20065,32724,31077,35814,24819,21709,20139,39033,24055,27233,20687,21521,35937,33831,30813,38660,21066,21742,22179,38144,28040,23477,28102,26195,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34867,34868,34869,34870,34871,34872,34874,34875,34877,34878,34879,34881,34882,34883,34886,34887,34888,34889,34890,34891,34894,34895,34896,34897,34898,34899,34901,34902,34904,34906,34907,34908,34909,34910,34911,34912,34918,34919,34922,34925,34927,34929,34931,34932,34933,34934,34936,34937,34938,34939,34940,34944,34947,34950,34951,34953,34954,34956,34958,34959,34960,34961,34963,34964,34965,34967,34968,34969,34970,34971,34973,34974,34975,34976,34977,34979,34981,34982,34983,34984,34985,34986,23567,23389,26657,32918,21880,31505,25928,26964,20123,27463,34638,38795,21327,25375,25658,37034,26012,32961,35856,20889,26800,21368,34809,25032,27844,27899,35874,23633,34218,33455,38156,27427,36763,26032,24571,24515,20449,34885,26143,33125,29481,24826,20852,21009,22411,24418,37026,34892,37266,24184,26447,24615,22995,20804,20982,33016,21256,27769,38596,29066,20241,20462,32670,26429,21957,38152,31168,34966,32483,22687,25100,38656,34394,22040,39035,24464,35768,33988,37207,21465,26093,24207,30044,24676,32110,23167,32490,32493,36713,21927,23459,24748,26059,29572,34988,34990,34991,34992,34994,34995,34996,34997,34998,35000,35001,35002,35003,35005,35006,35007,35008,35011,35012,35015,35016,35018,35019,35020,35021,35023,35024,35025,35027,35030,35031,35034,35035,35036,35037,35038,35040,35041,35046,35047,35049,35050,35051,35052,35053,35054,35055,35058,35061,35062,35063,35066,35067,35069,35071,35072,35073,35075,35076,35077,35078,35079,35080,35081,35083,35084,35085,35086,35087,35089,35092,35093,35094,35095,35096,35100,35101,35102,35103,35104,35106,35107,35108,35110,35111,35112,35113,35116,35117,35118,35119,35121,35122,35123,35125,35127,36873,30307,30505,32474,38772,34203,23398,31348,38634,34880,21195,29071,24490,26092,35810,23547,39535,24033,27529,27739,35757,35759,36874,36805,21387,25276,40486,40493,21568,20011,33469,29273,34460,23830,34905,28079,38597,21713,20122,35766,28937,21693,38409,28895,28153,30416,20005,30740,34578,23721,24310,35328,39068,38414,28814,27839,22852,25513,30524,34893,28436,33395,22576,29141,21388,30746,38593,21761,24422,28976,23476,35866,39564,27523,22830,40495,31207,26472,25196,20335,30113,32650,27915,38451,27687,20208,30162,20859,26679,28478,36992,33136,22934,29814,35128,35129,35130,35131,35132,35133,35134,35135,35136,35138,35139,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35168,35169,35170,35171,35172,35173,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35196,35197,35198,35200,35202,35204,35205,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,25671,23591,36965,31377,35875,23002,21676,33280,33647,35201,32768,26928,22094,32822,29239,37326,20918,20063,39029,25494,19994,21494,26355,33099,22812,28082,19968,22777,21307,25558,38129,20381,20234,34915,39056,22839,36951,31227,20202,33008,30097,27778,23452,23016,24413,26885,34433,20506,24050,20057,30691,20197,33402,25233,26131,37009,23673,20159,24441,33222,36920,32900,30123,20134,35028,24847,27589,24518,20041,30410,28322,35811,35758,35850,35793,24322,32764,32716,32462,33589,33643,22240,27575,38899,38452,23035,21535,38134,28139,23493,39278,23609,24341,38544,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35267,35277,35283,35284,35285,35287,35288,35289,35291,35293,35295,35296,35297,35298,35300,35303,35304,35305,35306,35308,35309,35310,35312,35313,35314,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35329,35330,35331,35332,35333,35334,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,21360,33521,27185,23156,40560,24212,32552,33721,33828,33829,33639,34631,36814,36194,30408,24433,39062,30828,26144,21727,25317,20323,33219,30152,24248,38605,36362,34553,21647,27891,28044,27704,24703,21191,29992,24189,20248,24736,24551,23588,30001,37038,38080,29369,27833,28216,37193,26377,21451,21491,20305,37321,35825,21448,24188,36802,28132,20110,30402,27014,34398,24858,33286,20313,20446,36926,40060,24841,28189,28180,38533,20104,23089,38632,19982,23679,31161,23431,35821,32701,29577,22495,33419,37057,21505,36935,21947,23786,24481,24840,27442,29425,32946,35465,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35391,35392,35393,35394,35395,35396,35397,35398,35399,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35450,35451,35452,35453,35454,35455,35456,28020,23507,35029,39044,35947,39533,40499,28170,20900,20803,22435,34945,21407,25588,36757,22253,21592,22278,29503,28304,32536,36828,33489,24895,24616,38498,26352,32422,36234,36291,38053,23731,31908,26376,24742,38405,32792,20113,37095,21248,38504,20801,36816,34164,37213,26197,38901,23381,21277,30776,26434,26685,21705,28798,23472,36733,20877,22312,21681,25874,26242,36190,36163,33039,33900,36973,31967,20991,34299,26531,26089,28577,34468,36481,22122,36896,30338,28790,29157,36131,25321,21017,27901,36156,24590,22686,24974,26366,36192,25166,21939,28195,26413,36711,35457,35458,35459,35460,35461,35462,35463,35464,35467,35468,35469,35470,35471,35472,35473,35474,35476,35477,35478,35479,35480,35481,35482,35483,35484,35485,35486,35487,35488,35489,35490,35491,35492,35493,35494,35495,35496,35497,35498,35499,35500,35501,35502,35503,35504,35505,35506,35507,35508,35509,35510,35511,35512,35513,35514,35515,35516,35517,35518,35519,35520,35521,35522,35523,35524,35525,35526,35527,35528,35529,35530,35531,35532,35533,35534,35535,35536,35537,35538,35539,35540,35541,35542,35543,35544,35545,35546,35547,35548,35549,35550,35551,35552,35553,35554,35555,38113,38392,30504,26629,27048,21643,20045,28856,35784,25688,25995,23429,31364,20538,23528,30651,27617,35449,31896,27838,30415,26025,36759,23853,23637,34360,26632,21344,25112,31449,28251,32509,27167,31456,24432,28467,24352,25484,28072,26454,19976,24080,36134,20183,32960,30260,38556,25307,26157,25214,27836,36213,29031,32617,20806,32903,21484,36974,25240,21746,34544,36761,32773,38167,34071,36825,27993,29645,26015,30495,29956,30759,33275,36126,38024,20390,26517,30137,35786,38663,25391,38215,38453,33976,25379,30529,24449,29424,20105,24596,25972,25327,27491,25919,35556,35557,35558,35559,35560,35561,35562,35563,35564,35565,35566,35567,35568,35569,35570,35571,35572,35573,35574,35575,35576,35577,35578,35579,35580,35581,35582,35583,35584,35585,35586,35587,35588,35589,35590,35592,35593,35594,35595,35596,35597,35598,35599,35600,35601,35602,35603,35604,35605,35606,35607,35608,35609,35610,35611,35612,35613,35614,35615,35616,35617,35618,35619,35620,35621,35623,35624,35625,35626,35627,35628,35629,35630,35631,35632,35633,35634,35635,35636,35637,35638,35639,35640,35641,35642,35643,35644,35645,35646,35647,35648,35649,35650,35651,35652,35653,24103,30151,37073,35777,33437,26525,25903,21553,34584,30693,32930,33026,27713,20043,32455,32844,30452,26893,27542,25191,20540,20356,22336,25351,27490,36286,21482,26088,32440,24535,25370,25527,33267,33268,32622,24092,23769,21046,26234,31209,31258,36136,28825,30164,28382,27835,31378,20013,30405,24544,38047,34935,32456,31181,32959,37325,20210,20247,33311,21608,24030,27954,35788,31909,36724,32920,24090,21650,30385,23449,26172,39588,29664,26666,34523,26417,29482,35832,35803,36880,31481,28891,29038,25284,30633,22065,20027,33879,26609,21161,34496,36142,38136,31569,35654,35655,35656,35657,35658,35659,35660,35661,35662,35663,35664,35665,35666,35667,35668,35669,35670,35671,35672,35673,35674,35675,35676,35677,35678,35679,35680,35681,35682,35683,35684,35685,35687,35688,35689,35690,35691,35693,35694,35695,35696,35697,35698,35699,35700,35701,35702,35703,35704,35705,35706,35707,35708,35709,35710,35711,35712,35713,35714,35715,35716,35717,35718,35719,35720,35721,35722,35723,35724,35725,35726,35727,35728,35729,35730,35731,35732,35733,35734,35735,35736,35737,35738,35739,35740,35741,35742,35743,35756,35761,35771,35783,35792,35818,35849,35870,20303,27880,31069,39547,25235,29226,25341,19987,30742,36716,25776,36186,31686,26729,24196,35013,22918,25758,22766,29366,26894,38181,36861,36184,22368,32512,35846,20934,25417,25305,21331,26700,29730,33537,37196,21828,30528,28796,27978,20857,21672,36164,23039,28363,28100,23388,32043,20180,31869,28371,23376,33258,28173,23383,39683,26837,36394,23447,32508,24635,32437,37049,36208,22863,25549,31199,36275,21330,26063,31062,35781,38459,32452,38075,32386,22068,37257,26368,32618,23562,36981,26152,24038,20304,26590,20570,20316,22352,24231,59408,59409,59410,59411,59412,35896,35897,35898,35899,35900,35901,35902,35903,35904,35906,35907,35908,35909,35912,35914,35915,35917,35918,35919,35920,35921,35922,35923,35924,35926,35927,35928,35929,35931,35932,35933,35934,35935,35936,35939,35940,35941,35942,35943,35944,35945,35948,35949,35950,35951,35952,35953,35954,35956,35957,35958,35959,35963,35964,35965,35966,35967,35968,35969,35971,35972,35974,35975,35976,35979,35981,35982,35983,35984,35985,35986,35987,35989,35990,35991,35993,35994,35995,35996,35997,35998,35999,36000,36001,36002,36003,36004,36005,36006,36007,36008,36009,36010,36011,36012,36013,20109,19980,20800,19984,24319,21317,19989,20120,19998,39730,23404,22121,20008,31162,20031,21269,20039,22829,29243,21358,27664,22239,32996,39319,27603,30590,40727,20022,20127,40720,20060,20073,20115,33416,23387,21868,22031,20164,21389,21405,21411,21413,21422,38757,36189,21274,21493,21286,21294,21310,36188,21350,21347,20994,21000,21006,21037,21043,21055,21056,21068,21086,21089,21084,33967,21117,21122,21121,21136,21139,20866,32596,20155,20163,20169,20162,20200,20193,20203,20190,20251,20211,20258,20324,20213,20261,20263,20233,20267,20318,20327,25912,20314,20317,36014,36015,36016,36017,36018,36019,36020,36021,36022,36023,36024,36025,36026,36027,36028,36029,36030,36031,36032,36033,36034,36035,36036,36037,36038,36039,36040,36041,36042,36043,36044,36045,36046,36047,36048,36049,36050,36051,36052,36053,36054,36055,36056,36057,36058,36059,36060,36061,36062,36063,36064,36065,36066,36067,36068,36069,36070,36071,36072,36073,36074,36075,36076,36077,36078,36079,36080,36081,36082,36083,36084,36085,36086,36087,36088,36089,36090,36091,36092,36093,36094,36095,36096,36097,36098,36099,36100,36101,36102,36103,36104,36105,36106,36107,36108,36109,20319,20311,20274,20285,20342,20340,20369,20361,20355,20367,20350,20347,20394,20348,20396,20372,20454,20456,20458,20421,20442,20451,20444,20433,20447,20472,20521,20556,20467,20524,20495,20526,20525,20478,20508,20492,20517,20520,20606,20547,20565,20552,20558,20588,20603,20645,20647,20649,20666,20694,20742,20717,20716,20710,20718,20743,20747,20189,27709,20312,20325,20430,40864,27718,31860,20846,24061,40649,39320,20865,22804,21241,21261,35335,21264,20971,22809,20821,20128,20822,20147,34926,34980,20149,33044,35026,31104,23348,34819,32696,20907,20913,20925,20924,36110,36111,36112,36113,36114,36115,36116,36117,36118,36119,36120,36121,36122,36123,36124,36128,36177,36178,36183,36191,36197,36200,36201,36202,36204,36206,36207,36209,36210,36216,36217,36218,36219,36220,36221,36222,36223,36224,36226,36227,36230,36231,36232,36233,36236,36237,36238,36239,36240,36242,36243,36245,36246,36247,36248,36249,36250,36251,36252,36253,36254,36256,36257,36258,36260,36261,36262,36263,36264,36265,36266,36267,36268,36269,36270,36271,36272,36274,36278,36279,36281,36283,36285,36288,36289,36290,36293,36295,36296,36297,36298,36301,36304,36306,36307,36308,20935,20886,20898,20901,35744,35750,35751,35754,35764,35765,35767,35778,35779,35787,35791,35790,35794,35795,35796,35798,35800,35801,35804,35807,35808,35812,35816,35817,35822,35824,35827,35830,35833,35836,35839,35840,35842,35844,35847,35852,35855,35857,35858,35860,35861,35862,35865,35867,35864,35869,35871,35872,35873,35877,35879,35882,35883,35886,35887,35890,35891,35893,35894,21353,21370,38429,38434,38433,38449,38442,38461,38460,38466,38473,38484,38495,38503,38508,38514,38516,38536,38541,38551,38576,37015,37019,37021,37017,37036,37025,37044,37043,37046,37050,36309,36312,36313,36316,36320,36321,36322,36325,36326,36327,36329,36333,36334,36336,36337,36338,36340,36342,36348,36350,36351,36352,36353,36354,36355,36356,36358,36359,36360,36363,36365,36366,36368,36369,36370,36371,36373,36374,36375,36376,36377,36378,36379,36380,36384,36385,36388,36389,36390,36391,36392,36395,36397,36400,36402,36403,36404,36406,36407,36408,36411,36412,36414,36415,36419,36421,36422,36428,36429,36430,36431,36432,36435,36436,36437,36438,36439,36440,36442,36443,36444,36445,36446,36447,36448,36449,36450,36451,36452,36453,36455,36456,36458,36459,36462,36465,37048,37040,37071,37061,37054,37072,37060,37063,37075,37094,37090,37084,37079,37083,37099,37103,37118,37124,37154,37150,37155,37169,37167,37177,37187,37190,21005,22850,21154,21164,21165,21182,21759,21200,21206,21232,21471,29166,30669,24308,20981,20988,39727,21430,24321,30042,24047,22348,22441,22433,22654,22716,22725,22737,22313,22316,22314,22323,22329,22318,22319,22364,22331,22338,22377,22405,22379,22406,22396,22395,22376,22381,22390,22387,22445,22436,22412,22450,22479,22439,22452,22419,22432,22485,22488,22490,22489,22482,22456,22516,22511,22520,22500,22493,36467,36469,36471,36472,36473,36474,36475,36477,36478,36480,36482,36483,36484,36486,36488,36489,36490,36491,36492,36493,36494,36497,36498,36499,36501,36502,36503,36504,36505,36506,36507,36509,36511,36512,36513,36514,36515,36516,36517,36518,36519,36520,36521,36522,36525,36526,36528,36529,36531,36532,36533,36534,36535,36536,36537,36539,36540,36541,36542,36543,36544,36545,36546,36547,36548,36549,36550,36551,36552,36553,36554,36555,36556,36557,36559,36560,36561,36562,36563,36564,36565,36566,36567,36568,36569,36570,36571,36572,36573,36574,36575,36576,36577,36578,36579,36580,22539,22541,22525,22509,22528,22558,22553,22596,22560,22629,22636,22657,22665,22682,22656,39336,40729,25087,33401,33405,33407,33423,33418,33448,33412,33422,33425,33431,33433,33451,33464,33470,33456,33480,33482,33507,33432,33463,33454,33483,33484,33473,33449,33460,33441,33450,33439,33476,33486,33444,33505,33545,33527,33508,33551,33543,33500,33524,33490,33496,33548,33531,33491,33553,33562,33542,33556,33557,33504,33493,33564,33617,33627,33628,33544,33682,33596,33588,33585,33691,33630,33583,33615,33607,33603,33631,33600,33559,33632,33581,33594,33587,33638,33637,36581,36582,36583,36584,36585,36586,36587,36588,36589,36590,36591,36592,36593,36594,36595,36596,36597,36598,36599,36600,36601,36602,36603,36604,36605,36606,36607,36608,36609,36610,36611,36612,36613,36614,36615,36616,36617,36618,36619,36620,36621,36622,36623,36624,36625,36626,36627,36628,36629,36630,36631,36632,36633,36634,36635,36636,36637,36638,36639,36640,36641,36642,36643,36644,36645,36646,36647,36648,36649,36650,36651,36652,36653,36654,36655,36656,36657,36658,36659,36660,36661,36662,36663,36664,36665,36666,36667,36668,36669,36670,36671,36672,36673,36674,36675,36676,33640,33563,33641,33644,33642,33645,33646,33712,33656,33715,33716,33696,33706,33683,33692,33669,33660,33718,33705,33661,33720,33659,33688,33694,33704,33722,33724,33729,33793,33765,33752,22535,33816,33803,33757,33789,33750,33820,33848,33809,33798,33748,33759,33807,33795,33784,33785,33770,33733,33728,33830,33776,33761,33884,33873,33882,33881,33907,33927,33928,33914,33929,33912,33852,33862,33897,33910,33932,33934,33841,33901,33985,33997,34000,34022,33981,34003,33994,33983,33978,34016,33953,33977,33972,33943,34021,34019,34060,29965,34104,34032,34105,34079,34106,36677,36678,36679,36680,36681,36682,36683,36684,36685,36686,36687,36688,36689,36690,36691,36692,36693,36694,36695,36696,36697,36698,36699,36700,36701,36702,36703,36704,36705,36706,36707,36708,36709,36714,36736,36748,36754,36765,36768,36769,36770,36772,36773,36774,36775,36778,36780,36781,36782,36783,36786,36787,36788,36789,36791,36792,36794,36795,36796,36799,36800,36803,36806,36809,36810,36811,36812,36813,36815,36818,36822,36823,36826,36832,36833,36835,36839,36844,36847,36849,36850,36852,36853,36854,36858,36859,36860,36862,36863,36871,36872,36876,36878,36883,36885,36888,34134,34107,34047,34044,34137,34120,34152,34148,34142,34170,30626,34115,34162,34171,34212,34216,34183,34191,34169,34222,34204,34181,34233,34231,34224,34259,34241,34268,34303,34343,34309,34345,34326,34364,24318,24328,22844,22849,32823,22869,22874,22872,21263,23586,23589,23596,23604,25164,25194,25247,25275,25290,25306,25303,25326,25378,25334,25401,25419,25411,25517,25590,25457,25466,25486,25524,25453,25516,25482,25449,25518,25532,25586,25592,25568,25599,25540,25566,25550,25682,25542,25534,25669,25665,25611,25627,25632,25612,25638,25633,25694,25732,25709,25750,36889,36892,36899,36900,36901,36903,36904,36905,36906,36907,36908,36912,36913,36914,36915,36916,36919,36921,36922,36925,36927,36928,36931,36933,36934,36936,36937,36938,36939,36940,36942,36948,36949,36950,36953,36954,36956,36957,36958,36959,36960,36961,36964,36966,36967,36969,36970,36971,36972,36975,36976,36977,36978,36979,36982,36983,36984,36985,36986,36987,36988,36990,36993,36996,36997,36998,36999,37001,37002,37004,37005,37006,37007,37008,37010,37012,37014,37016,37018,37020,37022,37023,37024,37028,37029,37031,37032,37033,37035,37037,37042,37047,37052,37053,37055,37056,25722,25783,25784,25753,25786,25792,25808,25815,25828,25826,25865,25893,25902,24331,24530,29977,24337,21343,21489,21501,21481,21480,21499,21522,21526,21510,21579,21586,21587,21588,21590,21571,21537,21591,21593,21539,21554,21634,21652,21623,21617,21604,21658,21659,21636,21622,21606,21661,21712,21677,21698,21684,21714,21671,21670,21715,21716,21618,21667,21717,21691,21695,21708,21721,21722,21724,21673,21674,21668,21725,21711,21726,21787,21735,21792,21757,21780,21747,21794,21795,21775,21777,21799,21802,21863,21903,21941,21833,21869,21825,21845,21823,21840,21820,37058,37059,37062,37064,37065,37067,37068,37069,37074,37076,37077,37078,37080,37081,37082,37086,37087,37088,37091,37092,37093,37097,37098,37100,37102,37104,37105,37106,37107,37109,37110,37111,37113,37114,37115,37116,37119,37120,37121,37123,37125,37126,37127,37128,37129,37130,37131,37132,37133,37134,37135,37136,37137,37138,37139,37140,37141,37142,37143,37144,37146,37147,37148,37149,37151,37152,37153,37156,37157,37158,37159,37160,37161,37162,37163,37164,37165,37166,37168,37170,37171,37172,37173,37174,37175,37176,37178,37179,37180,37181,37182,37183,37184,37185,37186,37188,21815,21846,21877,21878,21879,21811,21808,21852,21899,21970,21891,21937,21945,21896,21889,21919,21886,21974,21905,21883,21983,21949,21950,21908,21913,21994,22007,21961,22047,21969,21995,21996,21972,21990,21981,21956,21999,21989,22002,22003,21964,21965,21992,22005,21988,36756,22046,22024,22028,22017,22052,22051,22014,22016,22055,22061,22104,22073,22103,22060,22093,22114,22105,22108,22092,22100,22150,22116,22129,22123,22139,22140,22149,22163,22191,22228,22231,22237,22241,22261,22251,22265,22271,22276,22282,22281,22300,24079,24089,24084,24081,24113,24123,24124,37189,37191,37192,37201,37203,37204,37205,37206,37208,37209,37211,37212,37215,37216,37222,37223,37224,37227,37229,37235,37242,37243,37244,37248,37249,37250,37251,37252,37254,37256,37258,37262,37263,37267,37268,37269,37270,37271,37272,37273,37276,37277,37278,37279,37280,37281,37284,37285,37286,37287,37288,37289,37291,37292,37296,37297,37298,37299,37302,37303,37304,37305,37307,37308,37309,37310,37311,37312,37313,37314,37315,37316,37317,37318,37320,37323,37328,37330,37331,37332,37333,37334,37335,37336,37337,37338,37339,37341,37342,37343,37344,37345,37346,37347,37348,37349,24119,24132,24148,24155,24158,24161,23692,23674,23693,23696,23702,23688,23704,23705,23697,23706,23708,23733,23714,23741,23724,23723,23729,23715,23745,23735,23748,23762,23780,23755,23781,23810,23811,23847,23846,23854,23844,23838,23814,23835,23896,23870,23860,23869,23916,23899,23919,23901,23915,23883,23882,23913,23924,23938,23961,23965,35955,23991,24005,24435,24439,24450,24455,24457,24460,24469,24473,24476,24488,24493,24501,24508,34914,24417,29357,29360,29364,29367,29368,29379,29377,29390,29389,29394,29416,29423,29417,29426,29428,29431,29441,29427,29443,29434,37350,37351,37352,37353,37354,37355,37356,37357,37358,37359,37360,37361,37362,37363,37364,37365,37366,37367,37368,37369,37370,37371,37372,37373,37374,37375,37376,37377,37378,37379,37380,37381,37382,37383,37384,37385,37386,37387,37388,37389,37390,37391,37392,37393,37394,37395,37396,37397,37398,37399,37400,37401,37402,37403,37404,37405,37406,37407,37408,37409,37410,37411,37412,37413,37414,37415,37416,37417,37418,37419,37420,37421,37422,37423,37424,37425,37426,37427,37428,37429,37430,37431,37432,37433,37434,37435,37436,37437,37438,37439,37440,37441,37442,37443,37444,37445,29435,29463,29459,29473,29450,29470,29469,29461,29474,29497,29477,29484,29496,29489,29520,29517,29527,29536,29548,29551,29566,33307,22821,39143,22820,22786,39267,39271,39272,39273,39274,39275,39276,39284,39287,39293,39296,39300,39303,39306,39309,39312,39313,39315,39316,39317,24192,24209,24203,24214,24229,24224,24249,24245,24254,24243,36179,24274,24273,24283,24296,24298,33210,24516,24521,24534,24527,24579,24558,24580,24545,24548,24574,24581,24582,24554,24557,24568,24601,24629,24614,24603,24591,24589,24617,24619,24586,24639,24609,24696,24697,24699,24698,24642,37446,37447,37448,37449,37450,37451,37452,37453,37454,37455,37456,37457,37458,37459,37460,37461,37462,37463,37464,37465,37466,37467,37468,37469,37470,37471,37472,37473,37474,37475,37476,37477,37478,37479,37480,37481,37482,37483,37484,37485,37486,37487,37488,37489,37490,37491,37493,37494,37495,37496,37497,37498,37499,37500,37501,37502,37503,37504,37505,37506,37507,37508,37509,37510,37511,37512,37513,37514,37515,37516,37517,37519,37520,37521,37522,37523,37524,37525,37526,37527,37528,37529,37530,37531,37532,37533,37534,37535,37536,37537,37538,37539,37540,37541,37542,37543,24682,24701,24726,24730,24749,24733,24707,24722,24716,24731,24812,24763,24753,24797,24792,24774,24794,24756,24864,24870,24853,24867,24820,24832,24846,24875,24906,24949,25004,24980,24999,25015,25044,25077,24541,38579,38377,38379,38385,38387,38389,38390,38396,38398,38403,38404,38406,38408,38410,38411,38412,38413,38415,38418,38421,38422,38423,38425,38426,20012,29247,25109,27701,27732,27740,27722,27811,27781,27792,27796,27788,27752,27753,27764,27766,27782,27817,27856,27860,27821,27895,27896,27889,27863,27826,27872,27862,27898,27883,27886,27825,27859,27887,27902,37544,37545,37546,37547,37548,37549,37551,37552,37553,37554,37555,37556,37557,37558,37559,37560,37561,37562,37563,37564,37565,37566,37567,37568,37569,37570,37571,37572,37573,37574,37575,37577,37578,37579,37580,37581,37582,37583,37584,37585,37586,37587,37588,37589,37590,37591,37592,37593,37594,37595,37596,37597,37598,37599,37600,37601,37602,37603,37604,37605,37606,37607,37608,37609,37610,37611,37612,37613,37614,37615,37616,37617,37618,37619,37620,37621,37622,37623,37624,37625,37626,37627,37628,37629,37630,37631,37632,37633,37634,37635,37636,37637,37638,37639,37640,37641,27961,27943,27916,27971,27976,27911,27908,27929,27918,27947,27981,27950,27957,27930,27983,27986,27988,27955,28049,28015,28062,28064,27998,28051,28052,27996,28000,28028,28003,28186,28103,28101,28126,28174,28095,28128,28177,28134,28125,28121,28182,28075,28172,28078,28203,28270,28238,28267,28338,28255,28294,28243,28244,28210,28197,28228,28383,28337,28312,28384,28461,28386,28325,28327,28349,28347,28343,28375,28340,28367,28303,28354,28319,28514,28486,28487,28452,28437,28409,28463,28470,28491,28532,28458,28425,28457,28553,28557,28556,28536,28530,28540,28538,28625,37642,37643,37644,37645,37646,37647,37648,37649,37650,37651,37652,37653,37654,37655,37656,37657,37658,37659,37660,37661,37662,37663,37664,37665,37666,37667,37668,37669,37670,37671,37672,37673,37674,37675,37676,37677,37678,37679,37680,37681,37682,37683,37684,37685,37686,37687,37688,37689,37690,37691,37692,37693,37695,37696,37697,37698,37699,37700,37701,37702,37703,37704,37705,37706,37707,37708,37709,37710,37711,37712,37713,37714,37715,37716,37717,37718,37719,37720,37721,37722,37723,37724,37725,37726,37727,37728,37729,37730,37731,37732,37733,37734,37735,37736,37737,37739,28617,28583,28601,28598,28610,28641,28654,28638,28640,28655,28698,28707,28699,28729,28725,28751,28766,23424,23428,23445,23443,23461,23480,29999,39582,25652,23524,23534,35120,23536,36423,35591,36790,36819,36821,36837,36846,36836,36841,36838,36851,36840,36869,36868,36875,36902,36881,36877,36886,36897,36917,36918,36909,36911,36932,36945,36946,36944,36968,36952,36962,36955,26297,36980,36989,36994,37000,36995,37003,24400,24407,24406,24408,23611,21675,23632,23641,23409,23651,23654,32700,24362,24361,24365,33396,24380,39739,23662,22913,22915,22925,22953,22954,22947,37740,37741,37742,37743,37744,37745,37746,37747,37748,37749,37750,37751,37752,37753,37754,37755,37756,37757,37758,37759,37760,37761,37762,37763,37764,37765,37766,37767,37768,37769,37770,37771,37772,37773,37774,37776,37777,37778,37779,37780,37781,37782,37783,37784,37785,37786,37787,37788,37789,37790,37791,37792,37793,37794,37795,37796,37797,37798,37799,37800,37801,37802,37803,37804,37805,37806,37807,37808,37809,37810,37811,37812,37813,37814,37815,37816,37817,37818,37819,37820,37821,37822,37823,37824,37825,37826,37827,37828,37829,37830,37831,37832,37833,37835,37836,37837,22935,22986,22955,22942,22948,22994,22962,22959,22999,22974,23045,23046,23005,23048,23011,23000,23033,23052,23049,23090,23092,23057,23075,23059,23104,23143,23114,23125,23100,23138,23157,33004,23210,23195,23159,23162,23230,23275,23218,23250,23252,23224,23264,23267,23281,23254,23270,23256,23260,23305,23319,23318,23346,23351,23360,23573,23580,23386,23397,23411,23377,23379,23394,39541,39543,39544,39546,39551,39549,39552,39553,39557,39560,39562,39568,39570,39571,39574,39576,39579,39580,39581,39583,39584,39586,39587,39589,39591,32415,32417,32419,32421,32424,32425,37838,37839,37840,37841,37842,37843,37844,37845,37847,37848,37849,37850,37851,37852,37853,37854,37855,37856,37857,37858,37859,37860,37861,37862,37863,37864,37865,37866,37867,37868,37869,37870,37871,37872,37873,37874,37875,37876,37877,37878,37879,37880,37881,37882,37883,37884,37885,37886,37887,37888,37889,37890,37891,37892,37893,37894,37895,37896,37897,37898,37899,37900,37901,37902,37903,37904,37905,37906,37907,37908,37909,37910,37911,37912,37913,37914,37915,37916,37917,37918,37919,37920,37921,37922,37923,37924,37925,37926,37927,37928,37929,37930,37931,37932,37933,37934,32429,32432,32446,32448,32449,32450,32457,32459,32460,32464,32468,32471,32475,32480,32481,32488,32491,32494,32495,32497,32498,32525,32502,32506,32507,32510,32513,32514,32515,32519,32520,32523,32524,32527,32529,32530,32535,32537,32540,32539,32543,32545,32546,32547,32548,32549,32550,32551,32554,32555,32556,32557,32559,32560,32561,32562,32563,32565,24186,30079,24027,30014,37013,29582,29585,29614,29602,29599,29647,29634,29649,29623,29619,29632,29641,29640,29669,29657,39036,29706,29673,29671,29662,29626,29682,29711,29738,29787,29734,29733,29736,29744,29742,29740,37935,37936,37937,37938,37939,37940,37941,37942,37943,37944,37945,37946,37947,37948,37949,37951,37952,37953,37954,37955,37956,37957,37958,37959,37960,37961,37962,37963,37964,37965,37966,37967,37968,37969,37970,37971,37972,37973,37974,37975,37976,37977,37978,37979,37980,37981,37982,37983,37984,37985,37986,37987,37988,37989,37990,37991,37992,37993,37994,37996,37997,37998,37999,38000,38001,38002,38003,38004,38005,38006,38007,38008,38009,38010,38011,38012,38013,38014,38015,38016,38017,38018,38019,38020,38033,38038,38040,38087,38095,38099,38100,38106,38118,38139,38172,38176,29723,29722,29761,29788,29783,29781,29785,29815,29805,29822,29852,29838,29824,29825,29831,29835,29854,29864,29865,29840,29863,29906,29882,38890,38891,38892,26444,26451,26462,26440,26473,26533,26503,26474,26483,26520,26535,26485,26536,26526,26541,26507,26487,26492,26608,26633,26584,26634,26601,26544,26636,26585,26549,26586,26547,26589,26624,26563,26552,26594,26638,26561,26621,26674,26675,26720,26721,26702,26722,26692,26724,26755,26653,26709,26726,26689,26727,26688,26686,26698,26697,26665,26805,26767,26740,26743,26771,26731,26818,26990,26876,26911,26912,26873,38183,38195,38205,38211,38216,38219,38229,38234,38240,38254,38260,38261,38263,38264,38265,38266,38267,38268,38269,38270,38272,38273,38274,38275,38276,38277,38278,38279,38280,38281,38282,38283,38284,38285,38286,38287,38288,38289,38290,38291,38292,38293,38294,38295,38296,38297,38298,38299,38300,38301,38302,38303,38304,38305,38306,38307,38308,38309,38310,38311,38312,38313,38314,38315,38316,38317,38318,38319,38320,38321,38322,38323,38324,38325,38326,38327,38328,38329,38330,38331,38332,38333,38334,38335,38336,38337,38338,38339,38340,38341,38342,38343,38344,38345,38346,38347,26916,26864,26891,26881,26967,26851,26896,26993,26937,26976,26946,26973,27012,26987,27008,27032,27000,26932,27084,27015,27016,27086,27017,26982,26979,27001,27035,27047,27067,27051,27053,27092,27057,27073,27082,27103,27029,27104,27021,27135,27183,27117,27159,27160,27237,27122,27204,27198,27296,27216,27227,27189,27278,27257,27197,27176,27224,27260,27281,27280,27305,27287,27307,29495,29522,27521,27522,27527,27524,27538,27539,27533,27546,27547,27553,27562,36715,36717,36721,36722,36723,36725,36726,36728,36727,36729,36730,36732,36734,36737,36738,36740,36743,36747,38348,38349,38350,38351,38352,38353,38354,38355,38356,38357,38358,38359,38360,38361,38362,38363,38364,38365,38366,38367,38368,38369,38370,38371,38372,38373,38374,38375,38380,38399,38407,38419,38424,38427,38430,38432,38435,38436,38437,38438,38439,38440,38441,38443,38444,38445,38447,38448,38455,38456,38457,38458,38462,38465,38467,38474,38478,38479,38481,38482,38483,38486,38487,38488,38489,38490,38492,38493,38494,38496,38499,38501,38502,38507,38509,38510,38511,38512,38513,38515,38520,38521,38522,38523,38524,38525,38526,38527,38528,38529,38530,38531,38532,38535,38537,38538,36749,36750,36751,36760,36762,36558,25099,25111,25115,25119,25122,25121,25125,25124,25132,33255,29935,29940,29951,29967,29969,29971,25908,26094,26095,26096,26122,26137,26482,26115,26133,26112,28805,26359,26141,26164,26161,26166,26165,32774,26207,26196,26177,26191,26198,26209,26199,26231,26244,26252,26279,26269,26302,26331,26332,26342,26345,36146,36147,36150,36155,36157,36160,36165,36166,36168,36169,36167,36173,36181,36185,35271,35274,35275,35276,35278,35279,35280,35281,29294,29343,29277,29286,29295,29310,29311,29316,29323,29325,29327,29330,25352,25394,25520,38540,38542,38545,38546,38547,38549,38550,38554,38555,38557,38558,38559,38560,38561,38562,38563,38564,38565,38566,38568,38569,38570,38571,38572,38573,38574,38575,38577,38578,38580,38581,38583,38584,38586,38587,38591,38594,38595,38600,38602,38603,38608,38609,38611,38612,38614,38615,38616,38617,38618,38619,38620,38621,38622,38623,38625,38626,38627,38628,38629,38630,38631,38635,38636,38637,38638,38640,38641,38642,38644,38645,38648,38650,38651,38652,38653,38655,38658,38659,38661,38666,38667,38668,38672,38673,38674,38676,38677,38679,38680,38681,38682,38683,38685,38687,38688,25663,25816,32772,27626,27635,27645,27637,27641,27653,27655,27654,27661,27669,27672,27673,27674,27681,27689,27684,27690,27698,25909,25941,25963,29261,29266,29270,29232,34402,21014,32927,32924,32915,32956,26378,32957,32945,32939,32941,32948,32951,32999,33000,33001,33002,32987,32962,32964,32985,32973,32983,26384,32989,33003,33009,33012,33005,33037,33038,33010,33020,26389,33042,35930,33078,33054,33068,33048,33074,33096,33100,33107,33140,33113,33114,33137,33120,33129,33148,33149,33133,33127,22605,23221,33160,33154,33169,28373,33187,33194,33228,26406,33226,33211,38689,38690,38691,38692,38693,38694,38695,38696,38697,38699,38700,38702,38703,38705,38707,38708,38709,38710,38711,38714,38715,38716,38717,38719,38720,38721,38722,38723,38724,38725,38726,38727,38728,38729,38730,38731,38732,38733,38734,38735,38736,38737,38740,38741,38743,38744,38746,38748,38749,38751,38755,38756,38758,38759,38760,38762,38763,38764,38765,38766,38767,38768,38769,38770,38773,38775,38776,38777,38778,38779,38781,38782,38783,38784,38785,38786,38787,38788,38790,38791,38792,38793,38794,38796,38798,38799,38800,38803,38805,38806,38807,38809,38810,38811,38812,38813,33217,33190,27428,27447,27449,27459,27462,27481,39121,39122,39123,39125,39129,39130,27571,24384,27586,35315,26000,40785,26003,26044,26054,26052,26051,26060,26062,26066,26070,28800,28828,28822,28829,28859,28864,28855,28843,28849,28904,28874,28944,28947,28950,28975,28977,29043,29020,29032,28997,29042,29002,29048,29050,29080,29107,29109,29096,29088,29152,29140,29159,29177,29213,29224,28780,28952,29030,29113,25150,25149,25155,25160,25161,31035,31040,31046,31049,31067,31068,31059,31066,31074,31063,31072,31087,31079,31098,31109,31114,31130,31143,31155,24529,24528,38814,38815,38817,38818,38820,38821,38822,38823,38824,38825,38826,38828,38830,38832,38833,38835,38837,38838,38839,38840,38841,38842,38843,38844,38845,38846,38847,38848,38849,38850,38851,38852,38853,38854,38855,38856,38857,38858,38859,38860,38861,38862,38863,38864,38865,38866,38867,38868,38869,38870,38871,38872,38873,38874,38875,38876,38877,38878,38879,38880,38881,38882,38883,38884,38885,38888,38894,38895,38896,38897,38898,38900,38903,38904,38905,38906,38907,38908,38909,38910,38911,38912,38913,38914,38915,38916,38917,38918,38919,38920,38921,38922,38923,38924,38925,38926,24636,24669,24666,24679,24641,24665,24675,24747,24838,24845,24925,25001,24989,25035,25041,25094,32896,32895,27795,27894,28156,30710,30712,30720,30729,30743,30744,30737,26027,30765,30748,30749,30777,30778,30779,30751,30780,30757,30764,30755,30761,30798,30829,30806,30807,30758,30800,30791,30796,30826,30875,30867,30874,30855,30876,30881,30883,30898,30905,30885,30932,30937,30921,30956,30962,30981,30964,30995,31012,31006,31028,40859,40697,40699,40700,30449,30468,30477,30457,30471,30472,30490,30498,30489,30509,30502,30517,30520,30544,30545,30535,30531,30554,30568,38927,38928,38929,38930,38931,38932,38933,38934,38935,38936,38937,38938,38939,38940,38941,38942,38943,38944,38945,38946,38947,38948,38949,38950,38951,38952,38953,38954,38955,38956,38957,38958,38959,38960,38961,38962,38963,38964,38965,38966,38967,38968,38969,38970,38971,38972,38973,38974,38975,38976,38977,38978,38979,38980,38981,38982,38983,38984,38985,38986,38987,38988,38989,38990,38991,38992,38993,38994,38995,38996,38997,38998,38999,39000,39001,39002,39003,39004,39005,39006,39007,39008,39009,39010,39011,39012,39013,39014,39015,39016,39017,39018,39019,39020,39021,39022,30562,30565,30591,30605,30589,30592,30604,30609,30623,30624,30640,30645,30653,30010,30016,30030,30027,30024,30043,30066,30073,30083,32600,32609,32607,35400,32616,32628,32625,32633,32641,32638,30413,30437,34866,38021,38022,38023,38027,38026,38028,38029,38031,38032,38036,38039,38037,38042,38043,38044,38051,38052,38059,38058,38061,38060,38063,38064,38066,38068,38070,38071,38072,38073,38074,38076,38077,38079,38084,38088,38089,38090,38091,38092,38093,38094,38096,38097,38098,38101,38102,38103,38105,38104,38107,38110,38111,38112,38114,38116,38117,38119,38120,38122,39023,39024,39025,39026,39027,39028,39051,39054,39058,39061,39065,39075,39080,39081,39082,39083,39084,39085,39086,39087,39088,39089,39090,39091,39092,39093,39094,39095,39096,39097,39098,39099,39100,39101,39102,39103,39104,39105,39106,39107,39108,39109,39110,39111,39112,39113,39114,39115,39116,39117,39119,39120,39124,39126,39127,39131,39132,39133,39136,39137,39138,39139,39140,39141,39142,39145,39146,39147,39148,39149,39150,39151,39152,39153,39154,39155,39156,39157,39158,39159,39160,39161,39162,39163,39164,39165,39166,39167,39168,39169,39170,39171,39172,39173,39174,39175,38121,38123,38126,38127,38131,38132,38133,38135,38137,38140,38141,38143,38147,38146,38150,38151,38153,38154,38157,38158,38159,38162,38163,38164,38165,38166,38168,38171,38173,38174,38175,38178,38186,38187,38185,38188,38193,38194,38196,38198,38199,38200,38204,38206,38207,38210,38197,38212,38213,38214,38217,38220,38222,38223,38226,38227,38228,38230,38231,38232,38233,38235,38238,38239,38237,38241,38242,38244,38245,38246,38247,38248,38249,38250,38251,38252,38255,38257,38258,38259,38202,30695,30700,38601,31189,31213,31203,31211,31238,23879,31235,31234,31262,31252,39176,39177,39178,39179,39180,39182,39183,39185,39186,39187,39188,39189,39190,39191,39192,39193,39194,39195,39196,39197,39198,39199,39200,39201,39202,39203,39204,39205,39206,39207,39208,39209,39210,39211,39212,39213,39215,39216,39217,39218,39219,39220,39221,39222,39223,39224,39225,39226,39227,39228,39229,39230,39231,39232,39233,39234,39235,39236,39237,39238,39239,39240,39241,39242,39243,39244,39245,39246,39247,39248,39249,39250,39251,39254,39255,39256,39257,39258,39259,39260,39261,39262,39263,39264,39265,39266,39268,39270,39283,39288,39289,39291,39294,39298,39299,39305,31289,31287,31313,40655,39333,31344,30344,30350,30355,30361,30372,29918,29920,29996,40480,40482,40488,40489,40490,40491,40492,40498,40497,40502,40504,40503,40505,40506,40510,40513,40514,40516,40518,40519,40520,40521,40523,40524,40526,40529,40533,40535,40538,40539,40540,40542,40547,40550,40551,40552,40553,40554,40555,40556,40561,40557,40563,30098,30100,30102,30112,30109,30124,30115,30131,30132,30136,30148,30129,30128,30147,30146,30166,30157,30179,30184,30182,30180,30187,30183,30211,30193,30204,30207,30224,30208,30213,30220,30231,30218,30245,30232,30229,30233,39308,39310,39322,39323,39324,39325,39326,39327,39328,39329,39330,39331,39332,39334,39335,39337,39338,39339,39340,39341,39342,39343,39344,39345,39346,39347,39348,39349,39350,39351,39352,39353,39354,39355,39356,39357,39358,39359,39360,39361,39362,39363,39364,39365,39366,39367,39368,39369,39370,39371,39372,39373,39374,39375,39376,39377,39378,39379,39380,39381,39382,39383,39384,39385,39386,39387,39388,39389,39390,39391,39392,39393,39394,39395,39396,39397,39398,39399,39400,39401,39402,39403,39404,39405,39406,39407,39408,39409,39410,39411,39412,39413,39414,39415,39416,39417,30235,30268,30242,30240,30272,30253,30256,30271,30261,30275,30270,30259,30285,30302,30292,30300,30294,30315,30319,32714,31462,31352,31353,31360,31366,31368,31381,31398,31392,31404,31400,31405,31411,34916,34921,34930,34941,34943,34946,34978,35014,34999,35004,35017,35042,35022,35043,35045,35057,35098,35068,35048,35070,35056,35105,35097,35091,35099,35082,35124,35115,35126,35137,35174,35195,30091,32997,30386,30388,30684,32786,32788,32790,32796,32800,32802,32805,32806,32807,32809,32808,32817,32779,32821,32835,32838,32845,32850,32873,32881,35203,39032,39040,39043,39418,39419,39420,39421,39422,39423,39424,39425,39426,39427,39428,39429,39430,39431,39432,39433,39434,39435,39436,39437,39438,39439,39440,39441,39442,39443,39444,39445,39446,39447,39448,39449,39450,39451,39452,39453,39454,39455,39456,39457,39458,39459,39460,39461,39462,39463,39464,39465,39466,39467,39468,39469,39470,39471,39472,39473,39474,39475,39476,39477,39478,39479,39480,39481,39482,39483,39484,39485,39486,39487,39488,39489,39490,39491,39492,39493,39494,39495,39496,39497,39498,39499,39500,39501,39502,39503,39504,39505,39506,39507,39508,39509,39510,39511,39512,39513,39049,39052,39053,39055,39060,39066,39067,39070,39071,39073,39074,39077,39078,34381,34388,34412,34414,34431,34426,34428,34427,34472,34445,34443,34476,34461,34471,34467,34474,34451,34473,34486,34500,34485,34510,34480,34490,34481,34479,34505,34511,34484,34537,34545,34546,34541,34547,34512,34579,34526,34548,34527,34520,34513,34563,34567,34552,34568,34570,34573,34569,34595,34619,34590,34597,34606,34586,34622,34632,34612,34609,34601,34615,34623,34690,34594,34685,34686,34683,34656,34672,34636,34670,34699,34643,34659,34684,34660,34649,34661,34707,34735,34728,34770,39514,39515,39516,39517,39518,39519,39520,39521,39522,39523,39524,39525,39526,39527,39528,39529,39530,39531,39538,39555,39561,39565,39566,39572,39573,39577,39590,39593,39594,39595,39596,39597,39598,39599,39602,39603,39604,39605,39609,39611,39613,39614,39615,39619,39620,39622,39623,39624,39625,39626,39629,39630,39631,39632,39634,39636,39637,39638,39639,39641,39642,39643,39644,39645,39646,39648,39650,39651,39652,39653,39655,39656,39657,39658,39660,39662,39664,39665,39666,39667,39668,39669,39670,39671,39672,39674,39676,39677,39678,39679,39680,39681,39682,39684,39685,39686,34758,34696,34693,34733,34711,34691,34731,34789,34732,34741,34739,34763,34771,34749,34769,34752,34762,34779,34794,34784,34798,34838,34835,34814,34826,34843,34849,34873,34876,32566,32578,32580,32581,33296,31482,31485,31496,31491,31492,31509,31498,31531,31503,31559,31544,31530,31513,31534,31537,31520,31525,31524,31539,31550,31518,31576,31578,31557,31605,31564,31581,31584,31598,31611,31586,31602,31601,31632,31654,31655,31672,31660,31645,31656,31621,31658,31644,31650,31659,31668,31697,31681,31692,31709,31706,31717,31718,31722,31756,31742,31740,31759,31766,31755,39687,39689,39690,39691,39692,39693,39694,39696,39697,39698,39700,39701,39702,39703,39704,39705,39706,39707,39708,39709,39710,39712,39713,39714,39716,39717,39718,39719,39720,39721,39722,39723,39724,39725,39726,39728,39729,39731,39732,39733,39734,39735,39736,39737,39738,39741,39742,39743,39744,39750,39754,39755,39756,39758,39760,39762,39763,39765,39766,39767,39768,39769,39770,39771,39772,39773,39774,39775,39776,39777,39778,39779,39780,39781,39782,39783,39784,39785,39786,39787,39788,39789,39790,39791,39792,39793,39794,39795,39796,39797,39798,39799,39800,39801,39802,39803,31775,31786,31782,31800,31809,31808,33278,33281,33282,33284,33260,34884,33313,33314,33315,33325,33327,33320,33323,33336,33339,33331,33332,33342,33348,33353,33355,33359,33370,33375,33384,34942,34949,34952,35032,35039,35166,32669,32671,32679,32687,32688,32690,31868,25929,31889,31901,31900,31902,31906,31922,31932,31933,31937,31943,31948,31949,31944,31941,31959,31976,33390,26280,32703,32718,32725,32741,32737,32742,32745,32750,32755,31992,32119,32166,32174,32327,32411,40632,40628,36211,36228,36244,36241,36273,36199,36205,35911,35913,37194,37200,37198,37199,37220,39804,39805,39806,39807,39808,39809,39810,39811,39812,39813,39814,39815,39816,39817,39818,39819,39820,39821,39822,39823,39824,39825,39826,39827,39828,39829,39830,39831,39832,39833,39834,39835,39836,39837,39838,39839,39840,39841,39842,39843,39844,39845,39846,39847,39848,39849,39850,39851,39852,39853,39854,39855,39856,39857,39858,39859,39860,39861,39862,39863,39864,39865,39866,39867,39868,39869,39870,39871,39872,39873,39874,39875,39876,39877,39878,39879,39880,39881,39882,39883,39884,39885,39886,39887,39888,39889,39890,39891,39892,39893,39894,39895,39896,39897,39898,39899,37218,37217,37232,37225,37231,37245,37246,37234,37236,37241,37260,37253,37264,37261,37265,37282,37283,37290,37293,37294,37295,37301,37300,37306,35925,40574,36280,36331,36357,36441,36457,36277,36287,36284,36282,36292,36310,36311,36314,36318,36302,36303,36315,36294,36332,36343,36344,36323,36345,36347,36324,36361,36349,36372,36381,36383,36396,36398,36387,36399,36410,36416,36409,36405,36413,36401,36425,36417,36418,36433,36434,36426,36464,36470,36476,36463,36468,36485,36495,36500,36496,36508,36510,35960,35970,35978,35973,35992,35988,26011,35286,35294,35290,35292,39900,39901,39902,39903,39904,39905,39906,39907,39908,39909,39910,39911,39912,39913,39914,39915,39916,39917,39918,39919,39920,39921,39922,39923,39924,39925,39926,39927,39928,39929,39930,39931,39932,39933,39934,39935,39936,39937,39938,39939,39940,39941,39942,39943,39944,39945,39946,39947,39948,39949,39950,39951,39952,39953,39954,39955,39956,39957,39958,39959,39960,39961,39962,39963,39964,39965,39966,39967,39968,39969,39970,39971,39972,39973,39974,39975,39976,39977,39978,39979,39980,39981,39982,39983,39984,39985,39986,39987,39988,39989,39990,39991,39992,39993,39994,39995,35301,35307,35311,35390,35622,38739,38633,38643,38639,38662,38657,38664,38671,38670,38698,38701,38704,38718,40832,40835,40837,40838,40839,40840,40841,40842,40844,40702,40715,40717,38585,38588,38589,38606,38610,30655,38624,37518,37550,37576,37694,37738,37834,37775,37950,37995,40063,40066,40069,40070,40071,40072,31267,40075,40078,40080,40081,40082,40084,40085,40090,40091,40094,40095,40096,40097,40098,40099,40101,40102,40103,40104,40105,40107,40109,40110,40112,40113,40114,40115,40116,40117,40118,40119,40122,40123,40124,40125,40132,40133,40134,40135,40138,40139,39996,39997,39998,39999,40000,40001,40002,40003,40004,40005,40006,40007,40008,40009,40010,40011,40012,40013,40014,40015,40016,40017,40018,40019,40020,40021,40022,40023,40024,40025,40026,40027,40028,40029,40030,40031,40032,40033,40034,40035,40036,40037,40038,40039,40040,40041,40042,40043,40044,40045,40046,40047,40048,40049,40050,40051,40052,40053,40054,40055,40056,40057,40058,40059,40061,40062,40064,40067,40068,40073,40074,40076,40079,40083,40086,40087,40088,40089,40093,40106,40108,40111,40121,40126,40127,40128,40129,40130,40136,40137,40145,40146,40154,40155,40160,40161,40140,40141,40142,40143,40144,40147,40148,40149,40151,40152,40153,40156,40157,40159,40162,38780,38789,38801,38802,38804,38831,38827,38819,38834,38836,39601,39600,39607,40536,39606,39610,39612,39617,39616,39621,39618,39627,39628,39633,39749,39747,39751,39753,39752,39757,39761,39144,39181,39214,39253,39252,39647,39649,39654,39663,39659,39675,39661,39673,39688,39695,39699,39711,39715,40637,40638,32315,40578,40583,40584,40587,40594,37846,40605,40607,40667,40668,40669,40672,40671,40674,40681,40679,40677,40682,40687,40738,40748,40751,40761,40759,40765,40766,40772,40163,40164,40165,40166,40167,40168,40169,40170,40171,40172,40173,40174,40175,40176,40177,40178,40179,40180,40181,40182,40183,40184,40185,40186,40187,40188,40189,40190,40191,40192,40193,40194,40195,40196,40197,40198,40199,40200,40201,40202,40203,40204,40205,40206,40207,40208,40209,40210,40211,40212,40213,40214,40215,40216,40217,40218,40219,40220,40221,40222,40223,40224,40225,40226,40227,40228,40229,40230,40231,40232,40233,40234,40235,40236,40237,40238,40239,40240,40241,40242,40243,40244,40245,40246,40247,40248,40249,40250,40251,40252,40253,40254,40255,40256,40257,40258,57908,57909,57910,57911,57912,57913,57914,57915,57916,57917,57918,57919,57920,57921,57922,57923,57924,57925,57926,57927,57928,57929,57930,57931,57932,57933,57934,57935,57936,57937,57938,57939,57940,57941,57942,57943,57944,57945,57946,57947,57948,57949,57950,57951,57952,57953,57954,57955,57956,57957,57958,57959,57960,57961,57962,57963,57964,57965,57966,57967,57968,57969,57970,57971,57972,57973,57974,57975,57976,57977,57978,57979,57980,57981,57982,57983,57984,57985,57986,57987,57988,57989,57990,57991,57992,57993,57994,57995,57996,57997,57998,57999,58000,58001,40259,40260,40261,40262,40263,40264,40265,40266,40267,40268,40269,40270,40271,40272,40273,40274,40275,40276,40277,40278,40279,40280,40281,40282,40283,40284,40285,40286,40287,40288,40289,40290,40291,40292,40293,40294,40295,40296,40297,40298,40299,40300,40301,40302,40303,40304,40305,40306,40307,40308,40309,40310,40311,40312,40313,40314,40315,40316,40317,40318,40319,40320,40321,40322,40323,40324,40325,40326,40327,40328,40329,40330,40331,40332,40333,40334,40335,40336,40337,40338,40339,40340,40341,40342,40343,40344,40345,40346,40347,40348,40349,40350,40351,40352,40353,40354,58002,58003,58004,58005,58006,58007,58008,58009,58010,58011,58012,58013,58014,58015,58016,58017,58018,58019,58020,58021,58022,58023,58024,58025,58026,58027,58028,58029,58030,58031,58032,58033,58034,58035,58036,58037,58038,58039,58040,58041,58042,58043,58044,58045,58046,58047,58048,58049,58050,58051,58052,58053,58054,58055,58056,58057,58058,58059,58060,58061,58062,58063,58064,58065,58066,58067,58068,58069,58070,58071,58072,58073,58074,58075,58076,58077,58078,58079,58080,58081,58082,58083,58084,58085,58086,58087,58088,58089,58090,58091,58092,58093,58094,58095,40355,40356,40357,40358,40359,40360,40361,40362,40363,40364,40365,40366,40367,40368,40369,40370,40371,40372,40373,40374,40375,40376,40377,40378,40379,40380,40381,40382,40383,40384,40385,40386,40387,40388,40389,40390,40391,40392,40393,40394,40395,40396,40397,40398,40399,40400,40401,40402,40403,40404,40405,40406,40407,40408,40409,40410,40411,40412,40413,40414,40415,40416,40417,40418,40419,40420,40421,40422,40423,40424,40425,40426,40427,40428,40429,40430,40431,40432,40433,40434,40435,40436,40437,40438,40439,40440,40441,40442,40443,40444,40445,40446,40447,40448,40449,40450,58096,58097,58098,58099,58100,58101,58102,58103,58104,58105,58106,58107,58108,58109,58110,58111,58112,58113,58114,58115,58116,58117,58118,58119,58120,58121,58122,58123,58124,58125,58126,58127,58128,58129,58130,58131,58132,58133,58134,58135,58136,58137,58138,58139,58140,58141,58142,58143,58144,58145,58146,58147,58148,58149,58150,58151,58152,58153,58154,58155,58156,58157,58158,58159,58160,58161,58162,58163,58164,58165,58166,58167,58168,58169,58170,58171,58172,58173,58174,58175,58176,58177,58178,58179,58180,58181,58182,58183,58184,58185,58186,58187,58188,58189,40451,40452,40453,40454,40455,40456,40457,40458,40459,40460,40461,40462,40463,40464,40465,40466,40467,40468,40469,40470,40471,40472,40473,40474,40475,40476,40477,40478,40484,40487,40494,40496,40500,40507,40508,40512,40525,40528,40530,40531,40532,40534,40537,40541,40543,40544,40545,40546,40549,40558,40559,40562,40564,40565,40566,40567,40568,40569,40570,40571,40572,40573,40576,40577,40579,40580,40581,40582,40585,40586,40588,40589,40590,40591,40592,40593,40596,40597,40598,40599,40600,40601,40602,40603,40604,40606,40608,40609,40610,40611,40612,40613,40615,40616,40617,40618,58190,58191,58192,58193,58194,58195,58196,58197,58198,58199,58200,58201,58202,58203,58204,58205,58206,58207,58208,58209,58210,58211,58212,58213,58214,58215,58216,58217,58218,58219,58220,58221,58222,58223,58224,58225,58226,58227,58228,58229,58230,58231,58232,58233,58234,58235,58236,58237,58238,58239,58240,58241,58242,58243,58244,58245,58246,58247,58248,58249,58250,58251,58252,58253,58254,58255,58256,58257,58258,58259,58260,58261,58262,58263,58264,58265,58266,58267,58268,58269,58270,58271,58272,58273,58274,58275,58276,58277,58278,58279,58280,58281,58282,58283,40619,40620,40621,40622,40623,40624,40625,40626,40627,40629,40630,40631,40633,40634,40636,40639,40640,40641,40642,40643,40645,40646,40647,40648,40650,40651,40652,40656,40658,40659,40661,40662,40663,40665,40666,40670,40673,40675,40676,40678,40680,40683,40684,40685,40686,40688,40689,40690,40691,40692,40693,40694,40695,40696,40698,40701,40703,40704,40705,40706,40707,40708,40709,40710,40711,40712,40713,40714,40716,40719,40721,40722,40724,40725,40726,40728,40730,40731,40732,40733,40734,40735,40737,40739,40740,40741,40742,40743,40744,40745,40746,40747,40749,40750,40752,40753,58284,58285,58286,58287,58288,58289,58290,58291,58292,58293,58294,58295,58296,58297,58298,58299,58300,58301,58302,58303,58304,58305,58306,58307,58308,58309,58310,58311,58312,58313,58314,58315,58316,58317,58318,58319,58320,58321,58322,58323,58324,58325,58326,58327,58328,58329,58330,58331,58332,58333,58334,58335,58336,58337,58338,58339,58340,58341,58342,58343,58344,58345,58346,58347,58348,58349,58350,58351,58352,58353,58354,58355,58356,58357,58358,58359,58360,58361,58362,58363,58364,58365,58366,58367,58368,58369,58370,58371,58372,58373,58374,58375,58376,58377,40754,40755,40756,40757,40758,40760,40762,40764,40767,40768,40769,40770,40771,40773,40774,40775,40776,40777,40778,40779,40780,40781,40782,40783,40786,40787,40788,40789,40790,40791,40792,40793,40794,40795,40796,40797,40798,40799,40800,40801,40802,40803,40804,40805,40806,40807,40808,40809,40810,40811,40812,40813,40814,40815,40816,40817,40818,40819,40820,40821,40822,40823,40824,40825,40826,40827,40828,40829,40830,40833,40834,40845,40846,40847,40848,40849,40850,40851,40852,40853,40854,40855,40856,40860,40861,40862,40865,40866,40867,40868,40869,63788,63865,63893,63975,63985,58378,58379,58380,58381,58382,58383,58384,58385,58386,58387,58388,58389,58390,58391,58392,58393,58394,58395,58396,58397,58398,58399,58400,58401,58402,58403,58404,58405,58406,58407,58408,58409,58410,58411,58412,58413,58414,58415,58416,58417,58418,58419,58420,58421,58422,58423,58424,58425,58426,58427,58428,58429,58430,58431,58432,58433,58434,58435,58436,58437,58438,58439,58440,58441,58442,58443,58444,58445,58446,58447,58448,58449,58450,58451,58452,58453,58454,58455,58456,58457,58458,58459,58460,58461,58462,58463,58464,58465,58466,58467,58468,58469,58470,58471,64012,64013,64014,64015,64017,64019,64020,64024,64031,64032,64033,64035,64036,64039,64040,64041,11905,59414,59415,59416,11908,13427,13383,11912,11915,59422,13726,13850,13838,11916,11927,14702,14616,59430,14799,14815,14963,14800,59435,59436,15182,15470,15584,11943,59441,59442,11946,16470,16735,11950,17207,11955,11958,11959,59451,17329,17324,11963,17373,17622,18017,17996,59459,18211,18217,18300,18317,11978,18759,18810,18813,18818,18819,18821,18822,18847,18843,18871,18870,59476,59477,19619,19615,19616,19617,19575,19618,19731,19732,19733,19734,19735,19736,19737,19886,59492,58472,58473,58474,58475,58476,58477,58478,58479,58480,58481,58482,58483,58484,58485,58486,58487,58488,58489,58490,58491,58492,58493,58494,58495,58496,58497,58498,58499,58500,58501,58502,58503,58504,58505,58506,58507,58508,58509,58510,58511,58512,58513,58514,58515,58516,58517,58518,58519,58520,58521,58522,58523,58524,58525,58526,58527,58528,58529,58530,58531,58532,58533,58534,58535,58536,58537,58538,58539,58540,58541,58542,58543,58544,58545,58546,58547,58548,58549,58550,58551,58552,58553,58554,58555,58556,58557,58558,58559,58560,58561,58562,58563,58564,58565],
+ "gb18030-ranges":[[0,128],[36,165],[38,169],[45,178],[50,184],[81,216],[89,226],[95,235],[96,238],[100,244],[103,248],[104,251],[105,253],[109,258],[126,276],[133,284],[148,300],[172,325],[175,329],[179,334],[208,364],[306,463],[307,465],[308,467],[309,469],[310,471],[311,473],[312,475],[313,477],[341,506],[428,594],[443,610],[544,712],[545,716],[558,730],[741,930],[742,938],[749,962],[750,970],[805,1026],[819,1104],[820,1106],[7922,8209],[7924,8215],[7925,8218],[7927,8222],[7934,8231],[7943,8241],[7944,8244],[7945,8246],[7950,8252],[8062,8365],[8148,8452],[8149,8454],[8152,8458],[8164,8471],[8174,8482],[8236,8556],[8240,8570],[8262,8596],[8264,8602],[8374,8713],[8380,8720],[8381,8722],[8384,8726],[8388,8731],[8390,8737],[8392,8740],[8393,8742],[8394,8748],[8396,8751],[8401,8760],[8406,8766],[8416,8777],[8419,8781],[8424,8787],[8437,8802],[8439,8808],[8445,8816],[8482,8854],[8485,8858],[8496,8870],[8521,8896],[8603,8979],[8936,9322],[8946,9372],[9046,9548],[9050,9588],[9063,9616],[9066,9622],[9076,9634],[9092,9652],[9100,9662],[9108,9672],[9111,9676],[9113,9680],[9131,9702],[9162,9735],[9164,9738],[9218,9793],[9219,9795],[11329,11906],[11331,11909],[11334,11913],[11336,11917],[11346,11928],[11361,11944],[11363,11947],[11366,11951],[11370,11956],[11372,11960],[11375,11964],[11389,11979],[11682,12284],[11686,12292],[11687,12312],[11692,12319],[11694,12330],[11714,12351],[11716,12436],[11723,12447],[11725,12535],[11730,12543],[11736,12586],[11982,12842],[11989,12850],[12102,12964],[12336,13200],[12348,13215],[12350,13218],[12384,13253],[12393,13263],[12395,13267],[12397,13270],[12510,13384],[12553,13428],[12851,13727],[12962,13839],[12973,13851],[13738,14617],[13823,14703],[13919,14801],[13933,14816],[14080,14964],[14298,15183],[14585,15471],[14698,15585],[15583,16471],[15847,16736],[16318,17208],[16434,17325],[16438,17330],[16481,17374],[16729,17623],[17102,17997],[17122,18018],[17315,18212],[17320,18218],[17402,18301],[17418,18318],[17859,18760],[17909,18811],[17911,18814],[17915,18820],[17916,18823],[17936,18844],[17939,18848],[17961,18872],[18664,19576],[18703,19620],[18814,19738],[18962,19887],[19043,40870],[33469,59244],[33470,59336],[33471,59367],[33484,59413],[33485,59417],[33490,59423],[33497,59431],[33501,59437],[33505,59443],[33513,59452],[33520,59460],[33536,59478],[33550,59493],[37845,63789],[37921,63866],[37948,63894],[38029,63976],[38038,63986],[38064,64016],[38065,64018],[38066,64021],[38069,64025],[38075,64034],[38076,64037],[38078,64042],[39108,65074],[39109,65093],[39113,65107],[39114,65112],[39115,65127],[39116,65132],[39265,65375],[39394,65510],[189000,65536]],
+ "jis0208":[12288,12289,12290,65292,65294,12539,65306,65307,65311,65281,12443,12444,180,65344,168,65342,65507,65343,12541,12542,12445,12446,12291,20189,12293,12294,12295,12540,8213,8208,65295,65340,65374,8741,65372,8230,8229,8216,8217,8220,8221,65288,65289,12308,12309,65339,65341,65371,65373,12296,12297,12298,12299,12300,12301,12302,12303,12304,12305,65291,65293,177,215,247,65309,8800,65308,65310,8806,8807,8734,8756,9794,9792,176,8242,8243,8451,65509,65284,65504,65505,65285,65283,65286,65290,65312,167,9734,9733,9675,9679,9678,9671,9670,9633,9632,9651,9650,9661,9660,8251,12306,8594,8592,8593,8595,12307,null,null,null,null,null,null,null,null,null,null,null,8712,8715,8838,8839,8834,8835,8746,8745,null,null,null,null,null,null,null,null,8743,8744,65506,8658,8660,8704,8707,null,null,null,null,null,null,null,null,null,null,null,8736,8869,8978,8706,8711,8801,8786,8810,8811,8730,8765,8733,8757,8747,8748,null,null,null,null,null,null,null,8491,8240,9839,9837,9834,8224,8225,182,null,null,null,null,9711,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,65296,65297,65298,65299,65300,65301,65302,65303,65304,65305,null,null,null,null,null,null,null,65313,65314,65315,65316,65317,65318,65319,65320,65321,65322,65323,65324,65325,65326,65327,65328,65329,65330,65331,65332,65333,65334,65335,65336,65337,65338,null,null,null,null,null,null,65345,65346,65347,65348,65349,65350,65351,65352,65353,65354,65355,65356,65357,65358,65359,65360,65361,65362,65363,65364,65365,65366,65367,65368,65369,65370,null,null,null,null,12353,12354,12355,12356,12357,12358,12359,12360,12361,12362,12363,12364,12365,12366,12367,12368,12369,12370,12371,12372,12373,12374,12375,12376,12377,12378,12379,12380,12381,12382,12383,12384,12385,12386,12387,12388,12389,12390,12391,12392,12393,12394,12395,12396,12397,12398,12399,12400,12401,12402,12403,12404,12405,12406,12407,12408,12409,12410,12411,12412,12413,12414,12415,12416,12417,12418,12419,12420,12421,12422,12423,12424,12425,12426,12427,12428,12429,12430,12431,12432,12433,12434,12435,null,null,null,null,null,null,null,null,null,null,null,12449,12450,12451,12452,12453,12454,12455,12456,12457,12458,12459,12460,12461,12462,12463,12464,12465,12466,12467,12468,12469,12470,12471,12472,12473,12474,12475,12476,12477,12478,12479,12480,12481,12482,12483,12484,12485,12486,12487,12488,12489,12490,12491,12492,12493,12494,12495,12496,12497,12498,12499,12500,12501,12502,12503,12504,12505,12506,12507,12508,12509,12510,12511,12512,12513,12514,12515,12516,12517,12518,12519,12520,12521,12522,12523,12524,12525,12526,12527,12528,12529,12530,12531,12532,12533,12534,null,null,null,null,null,null,null,null,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,null,null,null,null,null,null,null,null,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,963,964,965,966,967,968,969,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1040,1041,1042,1043,1044,1045,1025,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1072,1073,1074,1075,1076,1077,1105,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,null,null,null,null,null,null,null,null,null,null,null,null,null,9472,9474,9484,9488,9496,9492,9500,9516,9508,9524,9532,9473,9475,9487,9491,9499,9495,9507,9523,9515,9531,9547,9504,9519,9512,9527,9535,9501,9520,9509,9528,9538,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,9322,9323,9324,9325,9326,9327,9328,9329,9330,9331,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,null,13129,13076,13090,13133,13080,13095,13059,13110,13137,13143,13069,13094,13091,13099,13130,13115,13212,13213,13214,13198,13199,13252,13217,null,null,null,null,null,null,null,null,13179,12317,12319,8470,13261,8481,12964,12965,12966,12967,12968,12849,12850,12857,13182,13181,13180,8786,8801,8747,8750,8721,8730,8869,8736,8735,8895,8757,8745,8746,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20124,21782,23043,38463,21696,24859,25384,23030,36898,33909,33564,31312,24746,25569,28197,26093,33894,33446,39925,26771,22311,26017,25201,23451,22992,34427,39156,32098,32190,39822,25110,31903,34999,23433,24245,25353,26263,26696,38343,38797,26447,20197,20234,20301,20381,20553,22258,22839,22996,23041,23561,24799,24847,24944,26131,26885,28858,30031,30064,31227,32173,32239,32963,33806,34915,35586,36949,36986,21307,20117,20133,22495,32946,37057,30959,19968,22769,28322,36920,31282,33576,33419,39983,20801,21360,21693,21729,22240,23035,24341,39154,28139,32996,34093,38498,38512,38560,38907,21515,21491,23431,28879,32701,36802,38632,21359,40284,31418,19985,30867,33276,28198,22040,21764,27421,34074,39995,23013,21417,28006,29916,38287,22082,20113,36939,38642,33615,39180,21473,21942,23344,24433,26144,26355,26628,27704,27891,27945,29787,30408,31310,38964,33521,34907,35424,37613,28082,30123,30410,39365,24742,35585,36234,38322,27022,21421,20870,22290,22576,22852,23476,24310,24616,25513,25588,27839,28436,28814,28948,29017,29141,29503,32257,33398,33489,34199,36960,37467,40219,22633,26044,27738,29989,20985,22830,22885,24448,24540,25276,26106,27178,27431,27572,29579,32705,35158,40236,40206,40644,23713,27798,33659,20740,23627,25014,33222,26742,29281,20057,20474,21368,24681,28201,31311,38899,19979,21270,20206,20309,20285,20385,20339,21152,21487,22025,22799,23233,23478,23521,31185,26247,26524,26550,27468,27827,28779,29634,31117,31166,31292,31623,33457,33499,33540,33655,33775,33747,34662,35506,22057,36008,36838,36942,38686,34442,20420,23784,25105,29273,30011,33253,33469,34558,36032,38597,39187,39381,20171,20250,35299,22238,22602,22730,24315,24555,24618,24724,24674,25040,25106,25296,25913,39745,26214,26800,28023,28784,30028,30342,32117,33445,34809,38283,38542,35997,20977,21182,22806,21683,23475,23830,24936,27010,28079,30861,33995,34903,35442,37799,39608,28012,39336,34521,22435,26623,34510,37390,21123,22151,21508,24275,25313,25785,26684,26680,27579,29554,30906,31339,35226,35282,36203,36611,37101,38307,38548,38761,23398,23731,27005,38989,38990,25499,31520,27179,27263,26806,39949,28511,21106,21917,24688,25324,27963,28167,28369,33883,35088,36676,19988,39993,21494,26907,27194,38788,26666,20828,31427,33970,37340,37772,22107,40232,26658,33541,33841,31909,21000,33477,29926,20094,20355,20896,23506,21002,21208,21223,24059,21914,22570,23014,23436,23448,23515,24178,24185,24739,24863,24931,25022,25563,25954,26577,26707,26874,27454,27475,27735,28450,28567,28485,29872,29976,30435,30475,31487,31649,31777,32233,32566,32752,32925,33382,33694,35251,35532,36011,36996,37969,38291,38289,38306,38501,38867,39208,33304,20024,21547,23736,24012,29609,30284,30524,23721,32747,36107,38593,38929,38996,39000,20225,20238,21361,21916,22120,22522,22855,23305,23492,23696,24076,24190,24524,25582,26426,26071,26082,26399,26827,26820,27231,24112,27589,27671,27773,30079,31048,23395,31232,32000,24509,35215,35352,36020,36215,36556,36637,39138,39438,39740,20096,20605,20736,22931,23452,25135,25216,25836,27450,29344,30097,31047,32681,34811,35516,35696,25516,33738,38816,21513,21507,21931,26708,27224,35440,30759,26485,40653,21364,23458,33050,34384,36870,19992,20037,20167,20241,21450,21560,23470,24339,24613,25937,26429,27714,27762,27875,28792,29699,31350,31406,31496,32026,31998,32102,26087,29275,21435,23621,24040,25298,25312,25369,28192,34394,35377,36317,37624,28417,31142,39770,20136,20139,20140,20379,20384,20689,20807,31478,20849,20982,21332,21281,21375,21483,21932,22659,23777,24375,24394,24623,24656,24685,25375,25945,27211,27841,29378,29421,30703,33016,33029,33288,34126,37111,37857,38911,39255,39514,20208,20957,23597,26241,26989,23616,26354,26997,29577,26704,31873,20677,21220,22343,24062,37670,26020,27427,27453,29748,31105,31165,31563,32202,33465,33740,34943,35167,35641,36817,37329,21535,37504,20061,20534,21477,21306,29399,29590,30697,33510,36527,39366,39368,39378,20855,24858,34398,21936,31354,20598,23507,36935,38533,20018,27355,37351,23633,23624,25496,31391,27795,38772,36705,31402,29066,38536,31874,26647,32368,26705,37740,21234,21531,34219,35347,32676,36557,37089,21350,34952,31041,20418,20670,21009,20804,21843,22317,29674,22411,22865,24418,24452,24693,24950,24935,25001,25522,25658,25964,26223,26690,28179,30054,31293,31995,32076,32153,32331,32619,33550,33610,34509,35336,35427,35686,36605,38938,40335,33464,36814,39912,21127,25119,25731,28608,38553,26689,20625,27424,27770,28500,31348,32080,34880,35363,26376,20214,20537,20518,20581,20860,21048,21091,21927,22287,22533,23244,24314,25010,25080,25331,25458,26908,27177,29309,29356,29486,30740,30831,32121,30476,32937,35211,35609,36066,36562,36963,37749,38522,38997,39443,40568,20803,21407,21427,24187,24358,28187,28304,29572,29694,32067,33335,35328,35578,38480,20046,20491,21476,21628,22266,22993,23396,24049,24235,24359,25144,25925,26543,28246,29392,31946,34996,32929,32993,33776,34382,35463,36328,37431,38599,39015,40723,20116,20114,20237,21320,21577,21566,23087,24460,24481,24735,26791,27278,29786,30849,35486,35492,35703,37264,20062,39881,20132,20348,20399,20505,20502,20809,20844,21151,21177,21246,21402,21475,21521,21518,21897,22353,22434,22909,23380,23389,23439,24037,24039,24055,24184,24195,24218,24247,24344,24658,24908,25239,25304,25511,25915,26114,26179,26356,26477,26657,26775,27083,27743,27946,28009,28207,28317,30002,30343,30828,31295,31968,32005,32024,32094,32177,32789,32771,32943,32945,33108,33167,33322,33618,34892,34913,35611,36002,36092,37066,37237,37489,30783,37628,38308,38477,38917,39321,39640,40251,21083,21163,21495,21512,22741,25335,28640,35946,36703,40633,20811,21051,21578,22269,31296,37239,40288,40658,29508,28425,33136,29969,24573,24794,39592,29403,36796,27492,38915,20170,22256,22372,22718,23130,24680,25031,26127,26118,26681,26801,28151,30165,32058,33390,39746,20123,20304,21449,21766,23919,24038,24046,26619,27801,29811,30722,35408,37782,35039,22352,24231,25387,20661,20652,20877,26368,21705,22622,22971,23472,24425,25165,25505,26685,27507,28168,28797,37319,29312,30741,30758,31085,25998,32048,33756,35009,36617,38555,21092,22312,26448,32618,36001,20916,22338,38442,22586,27018,32948,21682,23822,22524,30869,40442,20316,21066,21643,25662,26152,26388,26613,31364,31574,32034,37679,26716,39853,31545,21273,20874,21047,23519,25334,25774,25830,26413,27578,34217,38609,30352,39894,25420,37638,39851,30399,26194,19977,20632,21442,23665,24808,25746,25955,26719,29158,29642,29987,31639,32386,34453,35715,36059,37240,39184,26028,26283,27531,20181,20180,20282,20351,21050,21496,21490,21987,22235,22763,22987,22985,23039,23376,23629,24066,24107,24535,24605,25351,25903,23388,26031,26045,26088,26525,27490,27515,27663,29509,31049,31169,31992,32025,32043,32930,33026,33267,35222,35422,35433,35430,35468,35566,36039,36060,38604,39164,27503,20107,20284,20365,20816,23383,23546,24904,25345,26178,27425,28363,27835,29246,29885,30164,30913,31034,32780,32819,33258,33940,36766,27728,40575,24335,35672,40235,31482,36600,23437,38635,19971,21489,22519,22833,23241,23460,24713,28287,28422,30142,36074,23455,34048,31712,20594,26612,33437,23649,34122,32286,33294,20889,23556,25448,36198,26012,29038,31038,32023,32773,35613,36554,36974,34503,37034,20511,21242,23610,26451,28796,29237,37196,37320,37675,33509,23490,24369,24825,20027,21462,23432,25163,26417,27530,29417,29664,31278,33131,36259,37202,39318,20754,21463,21610,23551,25480,27193,32172,38656,22234,21454,21608,23447,23601,24030,20462,24833,25342,27954,31168,31179,32066,32333,32722,33261,33311,33936,34886,35186,35728,36468,36655,36913,37195,37228,38598,37276,20160,20303,20805,21313,24467,25102,26580,27713,28171,29539,32294,37325,37507,21460,22809,23487,28113,31069,32302,31899,22654,29087,20986,34899,36848,20426,23803,26149,30636,31459,33308,39423,20934,24490,26092,26991,27529,28147,28310,28516,30462,32020,24033,36981,37255,38918,20966,21021,25152,26257,26329,28186,24246,32210,32626,26360,34223,34295,35576,21161,21465,22899,24207,24464,24661,37604,38500,20663,20767,21213,21280,21319,21484,21736,21830,21809,22039,22888,22974,23100,23477,23558,23567,23569,23578,24196,24202,24288,24432,25215,25220,25307,25484,25463,26119,26124,26157,26230,26494,26786,27167,27189,27836,28040,28169,28248,28988,28966,29031,30151,30465,30813,30977,31077,31216,31456,31505,31911,32057,32918,33750,33931,34121,34909,35059,35359,35388,35412,35443,35937,36062,37284,37478,37758,37912,38556,38808,19978,19976,19998,20055,20887,21104,22478,22580,22732,23330,24120,24773,25854,26465,26454,27972,29366,30067,31331,33976,35698,37304,37664,22065,22516,39166,25325,26893,27542,29165,32340,32887,33394,35302,39135,34645,36785,23611,20280,20449,20405,21767,23072,23517,23529,24515,24910,25391,26032,26187,26862,27035,28024,28145,30003,30137,30495,31070,31206,32051,33251,33455,34218,35242,35386,36523,36763,36914,37341,38663,20154,20161,20995,22645,22764,23563,29978,23613,33102,35338,36805,38499,38765,31525,35535,38920,37218,22259,21416,36887,21561,22402,24101,25512,27700,28810,30561,31883,32736,34928,36930,37204,37648,37656,38543,29790,39620,23815,23913,25968,26530,36264,38619,25454,26441,26905,33733,38935,38592,35070,28548,25722,23544,19990,28716,30045,26159,20932,21046,21218,22995,24449,24615,25104,25919,25972,26143,26228,26866,26646,27491,28165,29298,29983,30427,31934,32854,22768,35069,35199,35488,35475,35531,36893,37266,38738,38745,25993,31246,33030,38587,24109,24796,25114,26021,26132,26512,30707,31309,31821,32318,33034,36012,36196,36321,36447,30889,20999,25305,25509,25666,25240,35373,31363,31680,35500,38634,32118,33292,34633,20185,20808,21315,21344,23459,23554,23574,24029,25126,25159,25776,26643,26676,27849,27973,27927,26579,28508,29006,29053,26059,31359,31661,32218,32330,32680,33146,33307,33337,34214,35438,36046,36341,36984,36983,37549,37521,38275,39854,21069,21892,28472,28982,20840,31109,32341,33203,31950,22092,22609,23720,25514,26366,26365,26970,29401,30095,30094,30990,31062,31199,31895,32032,32068,34311,35380,38459,36961,40736,20711,21109,21452,21474,20489,21930,22766,22863,29245,23435,23652,21277,24803,24819,25436,25475,25407,25531,25805,26089,26361,24035,27085,27133,28437,29157,20105,30185,30456,31379,31967,32207,32156,32865,33609,33624,33900,33980,34299,35013,36208,36865,36973,37783,38684,39442,20687,22679,24974,33235,34101,36104,36896,20419,20596,21063,21363,24687,25417,26463,28204,36275,36895,20439,23646,36042,26063,32154,21330,34966,20854,25539,23384,23403,23562,25613,26449,36956,20182,22810,22826,27760,35409,21822,22549,22949,24816,25171,26561,33333,26965,38464,39364,39464,20307,22534,23550,32784,23729,24111,24453,24608,24907,25140,26367,27888,28382,32974,33151,33492,34955,36024,36864,36910,38538,40667,39899,20195,21488,22823,31532,37261,38988,40441,28381,28711,21331,21828,23429,25176,25246,25299,27810,28655,29730,35351,37944,28609,35582,33592,20967,34552,21482,21481,20294,36948,36784,22890,33073,24061,31466,36799,26842,35895,29432,40008,27197,35504,20025,21336,22022,22374,25285,25506,26086,27470,28129,28251,28845,30701,31471,31658,32187,32829,32966,34507,35477,37723,22243,22727,24382,26029,26262,27264,27573,30007,35527,20516,30693,22320,24347,24677,26234,27744,30196,31258,32622,33268,34584,36933,39347,31689,30044,31481,31569,33988,36880,31209,31378,33590,23265,30528,20013,20210,23449,24544,25277,26172,26609,27880,34411,34935,35387,37198,37619,39376,27159,28710,29482,33511,33879,36015,19969,20806,20939,21899,23541,24086,24115,24193,24340,24373,24427,24500,25074,25361,26274,26397,28526,29266,30010,30522,32884,33081,33144,34678,35519,35548,36229,36339,37530,38263,38914,40165,21189,25431,30452,26389,27784,29645,36035,37806,38515,27941,22684,26894,27084,36861,37786,30171,36890,22618,26626,25524,27131,20291,28460,26584,36795,34086,32180,37716,26943,28528,22378,22775,23340,32044,29226,21514,37347,40372,20141,20302,20572,20597,21059,35998,21576,22564,23450,24093,24213,24237,24311,24351,24716,25269,25402,25552,26799,27712,30855,31118,31243,32224,33351,35330,35558,36420,36883,37048,37165,37336,40718,27877,25688,25826,25973,28404,30340,31515,36969,37841,28346,21746,24505,25764,36685,36845,37444,20856,22635,22825,23637,24215,28155,32399,29980,36028,36578,39003,28857,20253,27583,28593,30000,38651,20814,21520,22581,22615,22956,23648,24466,26007,26460,28193,30331,33759,36077,36884,37117,37709,30757,30778,21162,24230,22303,22900,24594,20498,20826,20908,20941,20992,21776,22612,22616,22871,23445,23798,23947,24764,25237,25645,26481,26691,26812,26847,30423,28120,28271,28059,28783,29128,24403,30168,31095,31561,31572,31570,31958,32113,21040,33891,34153,34276,35342,35588,35910,36367,36867,36879,37913,38518,38957,39472,38360,20685,21205,21516,22530,23566,24999,25758,27934,30643,31461,33012,33796,36947,37509,23776,40199,21311,24471,24499,28060,29305,30563,31167,31716,27602,29420,35501,26627,27233,20984,31361,26932,23626,40182,33515,23493,37193,28702,22136,23663,24775,25958,27788,35930,36929,38931,21585,26311,37389,22856,37027,20869,20045,20970,34201,35598,28760,25466,37707,26978,39348,32260,30071,21335,26976,36575,38627,27741,20108,23612,24336,36841,21250,36049,32905,34425,24319,26085,20083,20837,22914,23615,38894,20219,22922,24525,35469,28641,31152,31074,23527,33905,29483,29105,24180,24565,25467,25754,29123,31896,20035,24316,20043,22492,22178,24745,28611,32013,33021,33075,33215,36786,35223,34468,24052,25226,25773,35207,26487,27874,27966,29750,30772,23110,32629,33453,39340,20467,24259,25309,25490,25943,26479,30403,29260,32972,32954,36649,37197,20493,22521,23186,26757,26995,29028,29437,36023,22770,36064,38506,36889,34687,31204,30695,33833,20271,21093,21338,25293,26575,27850,30333,31636,31893,33334,34180,36843,26333,28448,29190,32283,33707,39361,40614,20989,31665,30834,31672,32903,31560,27368,24161,32908,30033,30048,20843,37474,28300,30330,37271,39658,20240,32624,25244,31567,38309,40169,22138,22617,34532,38588,20276,21028,21322,21453,21467,24070,25644,26001,26495,27710,27726,29256,29359,29677,30036,32321,33324,34281,36009,31684,37318,29033,38930,39151,25405,26217,30058,30436,30928,34115,34542,21290,21329,21542,22915,24199,24444,24754,25161,25209,25259,26000,27604,27852,30130,30382,30865,31192,32203,32631,32933,34987,35513,36027,36991,38750,39131,27147,31800,20633,23614,24494,26503,27608,29749,30473,32654,40763,26570,31255,21305,30091,39661,24422,33181,33777,32920,24380,24517,30050,31558,36924,26727,23019,23195,32016,30334,35628,20469,24426,27161,27703,28418,29922,31080,34920,35413,35961,24287,25551,30149,31186,33495,37672,37618,33948,34541,39981,21697,24428,25996,27996,28693,36007,36051,38971,25935,29942,19981,20184,22496,22827,23142,23500,20904,24067,24220,24598,25206,25975,26023,26222,28014,29238,31526,33104,33178,33433,35676,36000,36070,36212,38428,38468,20398,25771,27494,33310,33889,34154,37096,23553,26963,39080,33914,34135,20239,21103,24489,24133,26381,31119,33145,35079,35206,28149,24343,25173,27832,20175,29289,39826,20998,21563,22132,22707,24996,25198,28954,22894,31881,31966,32027,38640,25991,32862,19993,20341,20853,22592,24163,24179,24330,26564,20006,34109,38281,38491,31859,38913,20731,22721,30294,30887,21029,30629,34065,31622,20559,22793,29255,31687,32232,36794,36820,36941,20415,21193,23081,24321,38829,20445,33303,37610,22275,25429,27497,29995,35036,36628,31298,21215,22675,24917,25098,26286,27597,31807,33769,20515,20472,21253,21574,22577,22857,23453,23792,23791,23849,24214,25265,25447,25918,26041,26379,27861,27873,28921,30770,32299,32990,33459,33804,34028,34562,35090,35370,35914,37030,37586,39165,40179,40300,20047,20129,20621,21078,22346,22952,24125,24536,24537,25151,26292,26395,26576,26834,20882,32033,32938,33192,35584,35980,36031,37502,38450,21536,38956,21271,20693,21340,22696,25778,26420,29287,30566,31302,37350,21187,27809,27526,22528,24140,22868,26412,32763,20961,30406,25705,30952,39764,40635,22475,22969,26151,26522,27598,21737,27097,24149,33180,26517,39850,26622,40018,26717,20134,20451,21448,25273,26411,27819,36804,20397,32365,40639,19975,24930,28288,28459,34067,21619,26410,39749,24051,31637,23724,23494,34588,28234,34001,31252,33032,22937,31885,27665,30496,21209,22818,28961,29279,30683,38695,40289,26891,23167,23064,20901,21517,21629,26126,30431,36855,37528,40180,23018,29277,28357,20813,26825,32191,32236,38754,40634,25720,27169,33538,22916,23391,27611,29467,30450,32178,32791,33945,20786,26408,40665,30446,26466,21247,39173,23588,25147,31870,36016,21839,24758,32011,38272,21249,20063,20918,22812,29242,32822,37326,24357,30690,21380,24441,32004,34220,35379,36493,38742,26611,34222,37971,24841,24840,27833,30290,35565,36664,21807,20305,20778,21191,21451,23461,24189,24736,24962,25558,26377,26586,28263,28044,29494,29495,30001,31056,35029,35480,36938,37009,37109,38596,34701,22805,20104,20313,19982,35465,36671,38928,20653,24188,22934,23481,24248,25562,25594,25793,26332,26954,27096,27915,28342,29076,29992,31407,32650,32768,33865,33993,35201,35617,36362,36965,38525,39178,24958,25233,27442,27779,28020,32716,32764,28096,32645,34746,35064,26469,33713,38972,38647,27931,32097,33853,37226,20081,21365,23888,27396,28651,34253,34349,35239,21033,21519,23653,26446,26792,29702,29827,30178,35023,35041,37324,38626,38520,24459,29575,31435,33870,25504,30053,21129,27969,28316,29705,30041,30827,31890,38534,31452,40845,20406,24942,26053,34396,20102,20142,20698,20001,20940,23534,26009,26753,28092,29471,30274,30637,31260,31975,33391,35538,36988,37327,38517,38936,21147,32209,20523,21400,26519,28107,29136,29747,33256,36650,38563,40023,40607,29792,22593,28057,32047,39006,20196,20278,20363,20919,21169,23994,24604,29618,31036,33491,37428,38583,38646,38666,40599,40802,26278,27508,21015,21155,28872,35010,24265,24651,24976,28451,29001,31806,32244,32879,34030,36899,37676,21570,39791,27347,28809,36034,36335,38706,21172,23105,24266,24324,26391,27004,27028,28010,28431,29282,29436,31725,32769,32894,34635,37070,20845,40595,31108,32907,37682,35542,20525,21644,35441,27498,36036,33031,24785,26528,40434,20121,20120,39952,35435,34241,34152,26880,28286,30871,33109,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24332,19984,19989,20010,20017,20022,20028,20031,20034,20054,20056,20098,20101,35947,20106,33298,24333,20110,20126,20127,20128,20130,20144,20147,20150,20174,20173,20164,20166,20162,20183,20190,20205,20191,20215,20233,20314,20272,20315,20317,20311,20295,20342,20360,20367,20376,20347,20329,20336,20369,20335,20358,20374,20760,20436,20447,20430,20440,20443,20433,20442,20432,20452,20453,20506,20520,20500,20522,20517,20485,20252,20470,20513,20521,20524,20478,20463,20497,20486,20547,20551,26371,20565,20560,20552,20570,20566,20588,20600,20608,20634,20613,20660,20658,20681,20682,20659,20674,20694,20702,20709,20717,20707,20718,20729,20725,20745,20737,20738,20758,20757,20756,20762,20769,20794,20791,20796,20795,20799,20800,20818,20812,20820,20834,31480,20841,20842,20846,20864,20866,22232,20876,20873,20879,20881,20883,20885,20886,20900,20902,20898,20905,20906,20907,20915,20913,20914,20912,20917,20925,20933,20937,20955,20960,34389,20969,20973,20976,20981,20990,20996,21003,21012,21006,21031,21034,21038,21043,21049,21071,21060,21067,21068,21086,21076,21098,21108,21097,21107,21119,21117,21133,21140,21138,21105,21128,21137,36776,36775,21164,21165,21180,21173,21185,21197,21207,21214,21219,21222,39149,21216,21235,21237,21240,21241,21254,21256,30008,21261,21264,21263,21269,21274,21283,21295,21297,21299,21304,21312,21318,21317,19991,21321,21325,20950,21342,21353,21358,22808,21371,21367,21378,21398,21408,21414,21413,21422,21424,21430,21443,31762,38617,21471,26364,29166,21486,21480,21485,21498,21505,21565,21568,21548,21549,21564,21550,21558,21545,21533,21582,21647,21621,21646,21599,21617,21623,21616,21650,21627,21632,21622,21636,21648,21638,21703,21666,21688,21669,21676,21700,21704,21672,21675,21698,21668,21694,21692,21720,21733,21734,21775,21780,21757,21742,21741,21754,21730,21817,21824,21859,21836,21806,21852,21829,21846,21847,21816,21811,21853,21913,21888,21679,21898,21919,21883,21886,21912,21918,21934,21884,21891,21929,21895,21928,21978,21957,21983,21956,21980,21988,21972,22036,22007,22038,22014,22013,22043,22009,22094,22096,29151,22068,22070,22066,22072,22123,22116,22063,22124,22122,22150,22144,22154,22176,22164,22159,22181,22190,22198,22196,22210,22204,22209,22211,22208,22216,22222,22225,22227,22231,22254,22265,22272,22271,22276,22281,22280,22283,22285,22291,22296,22294,21959,22300,22310,22327,22328,22350,22331,22336,22351,22377,22464,22408,22369,22399,22409,22419,22432,22451,22436,22442,22448,22467,22470,22484,22482,22483,22538,22486,22499,22539,22553,22557,22642,22561,22626,22603,22640,27584,22610,22589,22649,22661,22713,22687,22699,22714,22750,22715,22712,22702,22725,22739,22737,22743,22745,22744,22757,22748,22756,22751,22767,22778,22777,22779,22780,22781,22786,22794,22800,22811,26790,22821,22828,22829,22834,22840,22846,31442,22869,22864,22862,22874,22872,22882,22880,22887,22892,22889,22904,22913,22941,20318,20395,22947,22962,22982,23016,23004,22925,23001,23002,23077,23071,23057,23068,23049,23066,23104,23148,23113,23093,23094,23138,23146,23194,23228,23230,23243,23234,23229,23267,23255,23270,23273,23254,23290,23291,23308,23307,23318,23346,23248,23338,23350,23358,23363,23365,23360,23377,23381,23386,23387,23397,23401,23408,23411,23413,23416,25992,23418,23424,23427,23462,23480,23491,23495,23497,23508,23504,23524,23526,23522,23518,23525,23531,23536,23542,23539,23557,23559,23560,23565,23571,23584,23586,23592,23608,23609,23617,23622,23630,23635,23632,23631,23409,23660,23662,20066,23670,23673,23692,23697,23700,22939,23723,23739,23734,23740,23735,23749,23742,23751,23769,23785,23805,23802,23789,23948,23786,23819,23829,23831,23900,23839,23835,23825,23828,23842,23834,23833,23832,23884,23890,23886,23883,23916,23923,23926,23943,23940,23938,23970,23965,23980,23982,23997,23952,23991,23996,24009,24013,24019,24018,24022,24027,24043,24050,24053,24075,24090,24089,24081,24091,24118,24119,24132,24131,24128,24142,24151,24148,24159,24162,24164,24135,24181,24182,24186,40636,24191,24224,24257,24258,24264,24272,24271,24278,24291,24285,24282,24283,24290,24289,24296,24297,24300,24305,24307,24304,24308,24312,24318,24323,24329,24413,24412,24331,24337,24342,24361,24365,24376,24385,24392,24396,24398,24367,24401,24406,24407,24409,24417,24429,24435,24439,24451,24450,24447,24458,24456,24465,24455,24478,24473,24472,24480,24488,24493,24508,24534,24571,24548,24568,24561,24541,24755,24575,24609,24672,24601,24592,24617,24590,24625,24603,24597,24619,24614,24591,24634,24666,24641,24682,24695,24671,24650,24646,24653,24675,24643,24676,24642,24684,24683,24665,24705,24717,24807,24707,24730,24708,24731,24726,24727,24722,24743,24715,24801,24760,24800,24787,24756,24560,24765,24774,24757,24792,24909,24853,24838,24822,24823,24832,24820,24826,24835,24865,24827,24817,24845,24846,24903,24894,24872,24871,24906,24895,24892,24876,24884,24893,24898,24900,24947,24951,24920,24921,24922,24939,24948,24943,24933,24945,24927,24925,24915,24949,24985,24982,24967,25004,24980,24986,24970,24977,25003,25006,25036,25034,25033,25079,25032,25027,25030,25018,25035,32633,25037,25062,25059,25078,25082,25076,25087,25085,25084,25086,25088,25096,25097,25101,25100,25108,25115,25118,25121,25130,25134,25136,25138,25139,25153,25166,25182,25187,25179,25184,25192,25212,25218,25225,25214,25234,25235,25238,25300,25219,25236,25303,25297,25275,25295,25343,25286,25812,25288,25308,25292,25290,25282,25287,25243,25289,25356,25326,25329,25383,25346,25352,25327,25333,25424,25406,25421,25628,25423,25494,25486,25472,25515,25462,25507,25487,25481,25503,25525,25451,25449,25534,25577,25536,25542,25571,25545,25554,25590,25540,25622,25652,25606,25619,25638,25654,25885,25623,25640,25615,25703,25711,25718,25678,25898,25749,25747,25765,25769,25736,25788,25818,25810,25797,25799,25787,25816,25794,25841,25831,33289,25824,25825,25260,25827,25839,25900,25846,25844,25842,25850,25856,25853,25880,25884,25861,25892,25891,25899,25908,25909,25911,25910,25912,30027,25928,25942,25941,25933,25944,25950,25949,25970,25976,25986,25987,35722,26011,26015,26027,26039,26051,26054,26049,26052,26060,26066,26075,26073,26080,26081,26097,26482,26122,26115,26107,26483,26165,26166,26164,26140,26191,26180,26185,26177,26206,26205,26212,26215,26216,26207,26210,26224,26243,26248,26254,26249,26244,26264,26269,26305,26297,26313,26302,26300,26308,26296,26326,26330,26336,26175,26342,26345,26352,26357,26359,26383,26390,26398,26406,26407,38712,26414,26431,26422,26433,26424,26423,26438,26462,26464,26457,26467,26468,26505,26480,26537,26492,26474,26508,26507,26534,26529,26501,26551,26607,26548,26604,26547,26601,26552,26596,26590,26589,26594,26606,26553,26574,26566,26599,27292,26654,26694,26665,26688,26701,26674,26702,26803,26667,26713,26723,26743,26751,26783,26767,26797,26772,26781,26779,26755,27310,26809,26740,26805,26784,26810,26895,26765,26750,26881,26826,26888,26840,26914,26918,26849,26892,26829,26836,26855,26837,26934,26898,26884,26839,26851,26917,26873,26848,26863,26920,26922,26906,26915,26913,26822,27001,26999,26972,27000,26987,26964,27006,26990,26937,26996,26941,26969,26928,26977,26974,26973,27009,26986,27058,27054,27088,27071,27073,27091,27070,27086,23528,27082,27101,27067,27075,27047,27182,27025,27040,27036,27029,27060,27102,27112,27138,27163,27135,27402,27129,27122,27111,27141,27057,27166,27117,27156,27115,27146,27154,27329,27171,27155,27204,27148,27250,27190,27256,27207,27234,27225,27238,27208,27192,27170,27280,27277,27296,27268,27298,27299,27287,34327,27323,27331,27330,27320,27315,27308,27358,27345,27359,27306,27354,27370,27387,27397,34326,27386,27410,27414,39729,27423,27448,27447,30428,27449,39150,27463,27459,27465,27472,27481,27476,27483,27487,27489,27512,27513,27519,27520,27524,27523,27533,27544,27541,27550,27556,27562,27563,27567,27570,27569,27571,27575,27580,27590,27595,27603,27615,27628,27627,27635,27631,40638,27656,27667,27668,27675,27684,27683,27742,27733,27746,27754,27778,27789,27802,27777,27803,27774,27752,27763,27794,27792,27844,27889,27859,27837,27863,27845,27869,27822,27825,27838,27834,27867,27887,27865,27882,27935,34893,27958,27947,27965,27960,27929,27957,27955,27922,27916,28003,28051,28004,27994,28025,27993,28046,28053,28644,28037,28153,28181,28170,28085,28103,28134,28088,28102,28140,28126,28108,28136,28114,28101,28154,28121,28132,28117,28138,28142,28205,28270,28206,28185,28274,28255,28222,28195,28267,28203,28278,28237,28191,28227,28218,28238,28196,28415,28189,28216,28290,28330,28312,28361,28343,28371,28349,28335,28356,28338,28372,28373,28303,28325,28354,28319,28481,28433,28748,28396,28408,28414,28479,28402,28465,28399,28466,28364,28478,28435,28407,28550,28538,28536,28545,28544,28527,28507,28659,28525,28546,28540,28504,28558,28561,28610,28518,28595,28579,28577,28580,28601,28614,28586,28639,28629,28652,28628,28632,28657,28654,28635,28681,28683,28666,28689,28673,28687,28670,28699,28698,28532,28701,28696,28703,28720,28734,28722,28753,28771,28825,28818,28847,28913,28844,28856,28851,28846,28895,28875,28893,28889,28937,28925,28956,28953,29029,29013,29064,29030,29026,29004,29014,29036,29071,29179,29060,29077,29096,29100,29143,29113,29118,29138,29129,29140,29134,29152,29164,29159,29173,29180,29177,29183,29197,29200,29211,29224,29229,29228,29232,29234,29243,29244,29247,29248,29254,29259,29272,29300,29310,29314,29313,29319,29330,29334,29346,29351,29369,29362,29379,29382,29380,29390,29394,29410,29408,29409,29433,29431,20495,29463,29450,29468,29462,29469,29492,29487,29481,29477,29502,29518,29519,40664,29527,29546,29544,29552,29560,29557,29563,29562,29640,29619,29646,29627,29632,29669,29678,29662,29858,29701,29807,29733,29688,29746,29754,29781,29759,29791,29785,29761,29788,29801,29808,29795,29802,29814,29822,29835,29854,29863,29898,29903,29908,29681,29920,29923,29927,29929,29934,29938,29936,29937,29944,29943,29956,29955,29957,29964,29966,29965,29973,29971,29982,29990,29996,30012,30020,30029,30026,30025,30043,30022,30042,30057,30052,30055,30059,30061,30072,30070,30086,30087,30068,30090,30089,30082,30100,30106,30109,30117,30115,30146,30131,30147,30133,30141,30136,30140,30129,30157,30154,30162,30169,30179,30174,30206,30207,30204,30209,30192,30202,30194,30195,30219,30221,30217,30239,30247,30240,30241,30242,30244,30260,30256,30267,30279,30280,30278,30300,30296,30305,30306,30312,30313,30314,30311,30316,30320,30322,30326,30328,30332,30336,30339,30344,30347,30350,30358,30355,30361,30362,30384,30388,30392,30393,30394,30402,30413,30422,30418,30430,30433,30437,30439,30442,34351,30459,30472,30471,30468,30505,30500,30494,30501,30502,30491,30519,30520,30535,30554,30568,30571,30555,30565,30591,30590,30585,30606,30603,30609,30624,30622,30640,30646,30649,30655,30652,30653,30651,30663,30669,30679,30682,30684,30691,30702,30716,30732,30738,31014,30752,31018,30789,30862,30836,30854,30844,30874,30860,30883,30901,30890,30895,30929,30918,30923,30932,30910,30908,30917,30922,30956,30951,30938,30973,30964,30983,30994,30993,31001,31020,31019,31040,31072,31063,31071,31066,31061,31059,31098,31103,31114,31133,31143,40779,31146,31150,31155,31161,31162,31177,31189,31207,31212,31201,31203,31240,31245,31256,31257,31264,31263,31104,31281,31291,31294,31287,31299,31319,31305,31329,31330,31337,40861,31344,31353,31357,31368,31383,31381,31384,31382,31401,31432,31408,31414,31429,31428,31423,36995,31431,31434,31437,31439,31445,31443,31449,31450,31453,31457,31458,31462,31469,31472,31490,31503,31498,31494,31539,31512,31513,31518,31541,31528,31542,31568,31610,31492,31565,31499,31564,31557,31605,31589,31604,31591,31600,31601,31596,31598,31645,31640,31647,31629,31644,31642,31627,31634,31631,31581,31641,31691,31681,31692,31695,31668,31686,31709,31721,31761,31764,31718,31717,31840,31744,31751,31763,31731,31735,31767,31757,31734,31779,31783,31786,31775,31799,31787,31805,31820,31811,31828,31823,31808,31824,31832,31839,31844,31830,31845,31852,31861,31875,31888,31908,31917,31906,31915,31905,31912,31923,31922,31921,31918,31929,31933,31936,31941,31938,31960,31954,31964,31970,39739,31983,31986,31988,31990,31994,32006,32002,32028,32021,32010,32069,32075,32046,32050,32063,32053,32070,32115,32086,32078,32114,32104,32110,32079,32099,32147,32137,32091,32143,32125,32155,32186,32174,32163,32181,32199,32189,32171,32317,32162,32175,32220,32184,32159,32176,32216,32221,32228,32222,32251,32242,32225,32261,32266,32291,32289,32274,32305,32287,32265,32267,32290,32326,32358,32315,32309,32313,32323,32311,32306,32314,32359,32349,32342,32350,32345,32346,32377,32362,32361,32380,32379,32387,32213,32381,36782,32383,32392,32393,32396,32402,32400,32403,32404,32406,32398,32411,32412,32568,32570,32581,32588,32589,32590,32592,32593,32597,32596,32600,32607,32608,32616,32617,32615,32632,32642,32646,32643,32648,32647,32652,32660,32670,32669,32666,32675,32687,32690,32697,32686,32694,32696,35697,32709,32710,32714,32725,32724,32737,32742,32745,32755,32761,39132,32774,32772,32779,32786,32792,32793,32796,32801,32808,32831,32827,32842,32838,32850,32856,32858,32863,32866,32872,32883,32882,32880,32886,32889,32893,32895,32900,32902,32901,32923,32915,32922,32941,20880,32940,32987,32997,32985,32989,32964,32986,32982,33033,33007,33009,33051,33065,33059,33071,33099,38539,33094,33086,33107,33105,33020,33137,33134,33125,33126,33140,33155,33160,33162,33152,33154,33184,33173,33188,33187,33119,33171,33193,33200,33205,33214,33208,33213,33216,33218,33210,33225,33229,33233,33241,33240,33224,33242,33247,33248,33255,33274,33275,33278,33281,33282,33285,33287,33290,33293,33296,33302,33321,33323,33336,33331,33344,33369,33368,33373,33370,33375,33380,33378,33384,33386,33387,33326,33393,33399,33400,33406,33421,33426,33451,33439,33467,33452,33505,33507,33503,33490,33524,33523,33530,33683,33539,33531,33529,33502,33542,33500,33545,33497,33589,33588,33558,33586,33585,33600,33593,33616,33605,33583,33579,33559,33560,33669,33690,33706,33695,33698,33686,33571,33678,33671,33674,33660,33717,33651,33653,33696,33673,33704,33780,33811,33771,33742,33789,33795,33752,33803,33729,33783,33799,33760,33778,33805,33826,33824,33725,33848,34054,33787,33901,33834,33852,34138,33924,33911,33899,33965,33902,33922,33897,33862,33836,33903,33913,33845,33994,33890,33977,33983,33951,34009,33997,33979,34010,34000,33985,33990,34006,33953,34081,34047,34036,34071,34072,34092,34079,34069,34068,34044,34112,34147,34136,34120,34113,34306,34123,34133,34176,34212,34184,34193,34186,34216,34157,34196,34203,34282,34183,34204,34167,34174,34192,34249,34234,34255,34233,34256,34261,34269,34277,34268,34297,34314,34323,34315,34302,34298,34310,34338,34330,34352,34367,34381,20053,34388,34399,34407,34417,34451,34467,34473,34474,34443,34444,34486,34479,34500,34502,34480,34505,34851,34475,34516,34526,34537,34540,34527,34523,34543,34578,34566,34568,34560,34563,34555,34577,34569,34573,34553,34570,34612,34623,34615,34619,34597,34601,34586,34656,34655,34680,34636,34638,34676,34647,34664,34670,34649,34643,34659,34666,34821,34722,34719,34690,34735,34763,34749,34752,34768,38614,34731,34756,34739,34759,34758,34747,34799,34802,34784,34831,34829,34814,34806,34807,34830,34770,34833,34838,34837,34850,34849,34865,34870,34873,34855,34875,34884,34882,34898,34905,34910,34914,34923,34945,34942,34974,34933,34941,34997,34930,34946,34967,34962,34990,34969,34978,34957,34980,34992,35007,34993,35011,35012,35028,35032,35033,35037,35065,35074,35068,35060,35048,35058,35076,35084,35082,35091,35139,35102,35109,35114,35115,35137,35140,35131,35126,35128,35148,35101,35168,35166,35174,35172,35181,35178,35183,35188,35191,35198,35203,35208,35210,35219,35224,35233,35241,35238,35244,35247,35250,35258,35261,35263,35264,35290,35292,35293,35303,35316,35320,35331,35350,35344,35340,35355,35357,35365,35382,35393,35419,35410,35398,35400,35452,35437,35436,35426,35461,35458,35460,35496,35489,35473,35493,35494,35482,35491,35524,35533,35522,35546,35563,35571,35559,35556,35569,35604,35552,35554,35575,35550,35547,35596,35591,35610,35553,35606,35600,35607,35616,35635,38827,35622,35627,35646,35624,35649,35660,35663,35662,35657,35670,35675,35674,35691,35679,35692,35695,35700,35709,35712,35724,35726,35730,35731,35734,35737,35738,35898,35905,35903,35912,35916,35918,35920,35925,35938,35948,35960,35962,35970,35977,35973,35978,35981,35982,35988,35964,35992,25117,36013,36010,36029,36018,36019,36014,36022,36040,36033,36068,36067,36058,36093,36090,36091,36100,36101,36106,36103,36111,36109,36112,40782,36115,36045,36116,36118,36199,36205,36209,36211,36225,36249,36290,36286,36282,36303,36314,36310,36300,36315,36299,36330,36331,36319,36323,36348,36360,36361,36351,36381,36382,36368,36383,36418,36405,36400,36404,36426,36423,36425,36428,36432,36424,36441,36452,36448,36394,36451,36437,36470,36466,36476,36481,36487,36485,36484,36491,36490,36499,36497,36500,36505,36522,36513,36524,36528,36550,36529,36542,36549,36552,36555,36571,36579,36604,36603,36587,36606,36618,36613,36629,36626,36633,36627,36636,36639,36635,36620,36646,36659,36667,36665,36677,36674,36670,36684,36681,36678,36686,36695,36700,36706,36707,36708,36764,36767,36771,36781,36783,36791,36826,36837,36834,36842,36847,36999,36852,36869,36857,36858,36881,36885,36897,36877,36894,36886,36875,36903,36918,36917,36921,36856,36943,36944,36945,36946,36878,36937,36926,36950,36952,36958,36968,36975,36982,38568,36978,36994,36989,36993,36992,37002,37001,37007,37032,37039,37041,37045,37090,37092,25160,37083,37122,37138,37145,37170,37168,37194,37206,37208,37219,37221,37225,37235,37234,37259,37257,37250,37282,37291,37295,37290,37301,37300,37306,37312,37313,37321,37323,37328,37334,37343,37345,37339,37372,37365,37366,37406,37375,37396,37420,37397,37393,37470,37463,37445,37449,37476,37448,37525,37439,37451,37456,37532,37526,37523,37531,37466,37583,37561,37559,37609,37647,37626,37700,37678,37657,37666,37658,37667,37690,37685,37691,37724,37728,37756,37742,37718,37808,37804,37805,37780,37817,37846,37847,37864,37861,37848,37827,37853,37840,37832,37860,37914,37908,37907,37891,37895,37904,37942,37931,37941,37921,37946,37953,37970,37956,37979,37984,37986,37982,37994,37417,38000,38005,38007,38013,37978,38012,38014,38017,38015,38274,38279,38282,38292,38294,38296,38297,38304,38312,38311,38317,38332,38331,38329,38334,38346,28662,38339,38349,38348,38357,38356,38358,38364,38369,38373,38370,38433,38440,38446,38447,38466,38476,38479,38475,38519,38492,38494,38493,38495,38502,38514,38508,38541,38552,38549,38551,38570,38567,38577,38578,38576,38580,38582,38584,38585,38606,38603,38601,38605,35149,38620,38669,38613,38649,38660,38662,38664,38675,38670,38673,38671,38678,38681,38692,38698,38704,38713,38717,38718,38724,38726,38728,38722,38729,38748,38752,38756,38758,38760,21202,38763,38769,38777,38789,38780,38785,38778,38790,38795,38799,38800,38812,38824,38822,38819,38835,38836,38851,38854,38856,38859,38876,38893,40783,38898,31455,38902,38901,38927,38924,38968,38948,38945,38967,38973,38982,38991,38987,39019,39023,39024,39025,39028,39027,39082,39087,39089,39094,39108,39107,39110,39145,39147,39171,39177,39186,39188,39192,39201,39197,39198,39204,39200,39212,39214,39229,39230,39234,39241,39237,39248,39243,39249,39250,39244,39253,39319,39320,39333,39341,39342,39356,39391,39387,39389,39384,39377,39405,39406,39409,39410,39419,39416,39425,39439,39429,39394,39449,39467,39479,39493,39490,39488,39491,39486,39509,39501,39515,39511,39519,39522,39525,39524,39529,39531,39530,39597,39600,39612,39616,39631,39633,39635,39636,39646,39647,39650,39651,39654,39663,39659,39662,39668,39665,39671,39675,39686,39704,39706,39711,39714,39715,39717,39719,39720,39721,39722,39726,39727,39730,39748,39747,39759,39757,39758,39761,39768,39796,39827,39811,39825,39830,39831,39839,39840,39848,39860,39872,39882,39865,39878,39887,39889,39890,39907,39906,39908,39892,39905,39994,39922,39921,39920,39957,39956,39945,39955,39948,39942,39944,39954,39946,39940,39982,39963,39973,39972,39969,39984,40007,39986,40006,39998,40026,40032,40039,40054,40056,40167,40172,40176,40201,40200,40171,40195,40198,40234,40230,40367,40227,40223,40260,40213,40210,40257,40255,40254,40262,40264,40285,40286,40292,40273,40272,40281,40306,40329,40327,40363,40303,40314,40346,40356,40361,40370,40388,40385,40379,40376,40378,40390,40399,40386,40409,40403,40440,40422,40429,40431,40445,40474,40475,40478,40565,40569,40573,40577,40584,40587,40588,40594,40597,40593,40605,40613,40617,40632,40618,40621,38753,40652,40654,40655,40656,40660,40668,40670,40669,40672,40677,40680,40687,40692,40694,40695,40697,40699,40700,40701,40711,40712,30391,40725,40737,40748,40766,40778,40786,40788,40803,40799,40800,40801,40806,40807,40812,40810,40823,40818,40822,40853,40860,40864,22575,27079,36953,29796,20956,29081,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,65506,65508,65287,65282,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8560,8561,8562,8563,8564,8565,8566,8567,8568,8569,8544,8545,8546,8547,8548,8549,8550,8551,8552,8553,65506,65508,65287,65282,12849,8470,8481,8757,32394,35100,37704,37512,34012,20425,28859,26161,26824,37625,26363,24389,20008,20193,20220,20224,20227,20281,20310,20370,20362,20378,20372,20429,20544,20514,20479,20510,20550,20592,20546,20628,20724,20696,20810,20836,20893,20926,20972,21013,21148,21158,21184,21211,21248,21255,21284,21362,21395,21426,21469,64014,21660,21642,21673,21759,21894,22361,22373,22444,22472,22471,64015,64016,22686,22706,22795,22867,22875,22877,22883,22948,22970,23382,23488,29999,23512,23532,23582,23718,23738,23797,23847,23891,64017,23874,23917,23992,23993,24016,24353,24372,24423,24503,24542,24669,24709,24714,24798,24789,24864,24818,24849,24887,24880,24984,25107,25254,25589,25696,25757,25806,25934,26112,26133,26171,26121,26158,26142,26148,26213,26199,26201,64018,26227,26265,26272,26290,26303,26362,26382,63785,26470,26555,26706,26560,26625,26692,26831,64019,26984,64020,27032,27106,27184,27243,27206,27251,27262,27362,27364,27606,27711,27740,27782,27759,27866,27908,28039,28015,28054,28076,28111,28152,28146,28156,28217,28252,28199,28220,28351,28552,28597,28661,28677,28679,28712,28805,28843,28943,28932,29020,28998,28999,64021,29121,29182,29361,29374,29476,64022,29559,29629,29641,29654,29667,29650,29703,29685,29734,29738,29737,29742,29794,29833,29855,29953,30063,30338,30364,30366,30363,30374,64023,30534,21167,30753,30798,30820,30842,31024,64024,64025,64026,31124,64027,31131,31441,31463,64028,31467,31646,64029,32072,32092,32183,32160,32214,32338,32583,32673,64030,33537,33634,33663,33735,33782,33864,33972,34131,34137,34155,64031,34224,64032,64033,34823,35061,35346,35383,35449,35495,35518,35551,64034,35574,35667,35711,36080,36084,36114,36214,64035,36559,64036,64037,36967,37086,64038,37141,37159,37338,37335,37342,37357,37358,37348,37349,37382,37392,37386,37434,37440,37436,37454,37465,37457,37433,37479,37543,37495,37496,37607,37591,37593,37584,64039,37589,37600,37587,37669,37665,37627,64040,37662,37631,37661,37634,37744,37719,37796,37830,37854,37880,37937,37957,37960,38290,63964,64041,38557,38575,38707,38715,38723,38733,38735,38737,38741,38999,39013,64042,64043,39207,64044,39326,39502,39641,39644,39797,39794,39823,39857,39867,39936,40304,40299,64045,40473,40657,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "jis0212":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,728,711,184,729,733,175,731,730,65374,900,901,null,null,null,null,null,null,null,null,161,166,191,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,186,170,169,174,8482,164,8470,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,902,904,905,906,938,null,908,null,910,939,null,911,null,null,null,null,940,941,942,943,970,912,972,962,973,971,944,974,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1038,1039,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1118,1119,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,198,272,null,294,null,306,null,321,319,null,330,216,338,null,358,222,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,230,273,240,295,305,307,312,322,320,329,331,248,339,223,359,254,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,193,192,196,194,258,461,256,260,197,195,262,264,268,199,266,270,201,200,203,202,282,278,274,280,null,284,286,290,288,292,205,204,207,206,463,304,298,302,296,308,310,313,317,315,323,327,325,209,211,210,214,212,465,336,332,213,340,344,342,346,348,352,350,356,354,218,217,220,219,364,467,368,362,370,366,360,471,475,473,469,372,221,376,374,377,381,379,null,null,null,null,null,null,null,225,224,228,226,259,462,257,261,229,227,263,265,269,231,267,271,233,232,235,234,283,279,275,281,501,285,287,null,289,293,237,236,239,238,464,null,299,303,297,309,311,314,318,316,324,328,326,241,243,242,246,244,466,337,333,245,341,345,343,347,349,353,351,357,355,250,249,252,251,365,468,369,363,371,367,361,472,476,474,470,373,253,255,375,378,382,380,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,19970,19972,19973,19980,19986,19999,20003,20004,20008,20011,20014,20015,20016,20021,20032,20033,20036,20039,20049,20058,20060,20067,20072,20073,20084,20085,20089,20095,20109,20118,20119,20125,20143,20153,20163,20176,20186,20187,20192,20193,20194,20200,20207,20209,20211,20213,20221,20222,20223,20224,20226,20227,20232,20235,20236,20242,20245,20246,20247,20249,20270,20273,20320,20275,20277,20279,20281,20283,20286,20288,20290,20296,20297,20299,20300,20306,20308,20310,20312,20319,20323,20330,20332,20334,20337,20343,20344,20345,20346,20349,20350,20353,20354,20356,20357,20361,20362,20364,20366,20368,20370,20371,20372,20375,20377,20378,20382,20383,20402,20407,20409,20411,20412,20413,20414,20416,20417,20421,20422,20424,20425,20427,20428,20429,20431,20434,20444,20448,20450,20464,20466,20476,20477,20479,20480,20481,20484,20487,20490,20492,20494,20496,20499,20503,20504,20507,20508,20509,20510,20514,20519,20526,20528,20530,20531,20533,20544,20545,20546,20549,20550,20554,20556,20558,20561,20562,20563,20567,20569,20575,20576,20578,20579,20582,20583,20586,20589,20592,20593,20539,20609,20611,20612,20614,20618,20622,20623,20624,20626,20627,20628,20630,20635,20636,20638,20639,20640,20641,20642,20650,20655,20656,20665,20666,20669,20672,20675,20676,20679,20684,20686,20688,20691,20692,20696,20700,20701,20703,20706,20708,20710,20712,20713,20719,20721,20726,20730,20734,20739,20742,20743,20744,20747,20748,20749,20750,20722,20752,20759,20761,20763,20764,20765,20766,20771,20775,20776,20780,20781,20783,20785,20787,20788,20789,20792,20793,20802,20810,20815,20819,20821,20823,20824,20831,20836,20838,20862,20867,20868,20875,20878,20888,20893,20897,20899,20909,20920,20922,20924,20926,20927,20930,20936,20943,20945,20946,20947,20949,20952,20958,20962,20965,20974,20978,20979,20980,20983,20993,20994,20997,21010,21011,21013,21014,21016,21026,21032,21041,21042,21045,21052,21061,21065,21077,21079,21080,21082,21084,21087,21088,21089,21094,21102,21111,21112,21113,21120,21122,21125,21130,21132,21139,21141,21142,21143,21144,21146,21148,21156,21157,21158,21159,21167,21168,21174,21175,21176,21178,21179,21181,21184,21188,21190,21192,21196,21199,21201,21204,21206,21211,21212,21217,21221,21224,21225,21226,21228,21232,21233,21236,21238,21239,21248,21251,21258,21259,21260,21265,21267,21272,21275,21276,21278,21279,21285,21287,21288,21289,21291,21292,21293,21296,21298,21301,21308,21309,21310,21314,21324,21323,21337,21339,21345,21347,21349,21356,21357,21362,21369,21374,21379,21383,21384,21390,21395,21396,21401,21405,21409,21412,21418,21419,21423,21426,21428,21429,21431,21432,21434,21437,21440,21445,21455,21458,21459,21461,21466,21469,21470,21472,21478,21479,21493,21506,21523,21530,21537,21543,21544,21546,21551,21553,21556,21557,21571,21572,21575,21581,21583,21598,21602,21604,21606,21607,21609,21611,21613,21614,21620,21631,21633,21635,21637,21640,21641,21645,21649,21653,21654,21660,21663,21665,21670,21671,21673,21674,21677,21678,21681,21687,21689,21690,21691,21695,21702,21706,21709,21710,21728,21738,21740,21743,21750,21756,21758,21759,21760,21761,21765,21768,21769,21772,21773,21774,21781,21802,21803,21810,21813,21814,21819,21820,21821,21825,21831,21833,21834,21837,21840,21841,21848,21850,21851,21854,21856,21857,21860,21862,21887,21889,21890,21894,21896,21902,21903,21905,21906,21907,21908,21911,21923,21924,21933,21938,21951,21953,21955,21958,21961,21963,21964,21966,21969,21970,21971,21975,21976,21979,21982,21986,21993,22006,22015,22021,22024,22026,22029,22030,22031,22032,22033,22034,22041,22060,22064,22067,22069,22071,22073,22075,22076,22077,22079,22080,22081,22083,22084,22086,22089,22091,22093,22095,22100,22110,22112,22113,22114,22115,22118,22121,22125,22127,22129,22130,22133,22148,22149,22152,22155,22156,22165,22169,22170,22173,22174,22175,22182,22183,22184,22185,22187,22188,22189,22193,22195,22199,22206,22213,22217,22218,22219,22223,22224,22220,22221,22233,22236,22237,22239,22241,22244,22245,22246,22247,22248,22257,22251,22253,22262,22263,22273,22274,22279,22282,22284,22289,22293,22298,22299,22301,22304,22306,22307,22308,22309,22313,22314,22316,22318,22319,22323,22324,22333,22334,22335,22341,22342,22348,22349,22354,22370,22373,22375,22376,22379,22381,22382,22383,22384,22385,22387,22388,22389,22391,22393,22394,22395,22396,22398,22401,22403,22412,22420,22423,22425,22426,22428,22429,22430,22431,22433,22421,22439,22440,22441,22444,22456,22461,22471,22472,22476,22479,22485,22493,22494,22500,22502,22503,22505,22509,22512,22517,22518,22520,22525,22526,22527,22531,22532,22536,22537,22497,22540,22541,22555,22558,22559,22560,22566,22567,22573,22578,22585,22591,22601,22604,22605,22607,22608,22613,22623,22625,22628,22631,22632,22648,22652,22655,22656,22657,22663,22664,22665,22666,22668,22669,22671,22672,22676,22678,22685,22688,22689,22690,22694,22697,22705,22706,22724,22716,22722,22728,22733,22734,22736,22738,22740,22742,22746,22749,22753,22754,22761,22771,22789,22790,22795,22796,22802,22803,22804,34369,22813,22817,22819,22820,22824,22831,22832,22835,22837,22838,22847,22851,22854,22866,22867,22873,22875,22877,22878,22879,22881,22883,22891,22893,22895,22898,22901,22902,22905,22907,22908,22923,22924,22926,22930,22933,22935,22943,22948,22951,22957,22958,22959,22960,22963,22967,22970,22972,22977,22979,22980,22984,22986,22989,22994,23005,23006,23007,23011,23012,23015,23022,23023,23025,23026,23028,23031,23040,23044,23052,23053,23054,23058,23059,23070,23075,23076,23079,23080,23082,23085,23088,23108,23109,23111,23112,23116,23120,23125,23134,23139,23141,23143,23149,23159,23162,23163,23166,23179,23184,23187,23190,23193,23196,23198,23199,23200,23202,23207,23212,23217,23218,23219,23221,23224,23226,23227,23231,23236,23238,23240,23247,23258,23260,23264,23269,23274,23278,23285,23286,23293,23296,23297,23304,23319,23348,23321,23323,23325,23329,23333,23341,23352,23361,23371,23372,23378,23382,23390,23400,23406,23407,23420,23421,23422,23423,23425,23428,23430,23434,23438,23440,23441,23443,23444,23446,23464,23465,23468,23469,23471,23473,23474,23479,23482,23484,23488,23489,23501,23503,23510,23511,23512,23513,23514,23520,23535,23537,23540,23549,23564,23575,23582,23583,23587,23590,23593,23595,23596,23598,23600,23602,23605,23606,23641,23642,23644,23650,23651,23655,23656,23657,23661,23664,23668,23669,23674,23675,23676,23677,23687,23688,23690,23695,23698,23709,23711,23712,23714,23715,23718,23722,23730,23732,23733,23738,23753,23755,23762,23773,23767,23790,23793,23794,23796,23809,23814,23821,23826,23851,23843,23844,23846,23847,23857,23860,23865,23869,23871,23874,23875,23878,23880,23893,23889,23897,23882,23903,23904,23905,23906,23908,23914,23917,23920,23929,23930,23934,23935,23937,23939,23944,23946,23954,23955,23956,23957,23961,23963,23967,23968,23975,23979,23984,23988,23992,23993,24003,24007,24011,24016,24014,24024,24025,24032,24036,24041,24056,24057,24064,24071,24077,24082,24084,24085,24088,24095,24096,24110,24104,24114,24117,24126,24139,24144,24137,24145,24150,24152,24155,24156,24158,24168,24170,24171,24172,24173,24174,24176,24192,24203,24206,24226,24228,24229,24232,24234,24236,24241,24243,24253,24254,24255,24262,24268,24267,24270,24273,24274,24276,24277,24284,24286,24293,24299,24322,24326,24327,24328,24334,24345,24348,24349,24353,24354,24355,24356,24360,24363,24364,24366,24368,24372,24374,24379,24381,24383,24384,24388,24389,24391,24397,24400,24404,24408,24411,24416,24419,24420,24423,24431,24434,24436,24437,24440,24442,24445,24446,24457,24461,24463,24470,24476,24477,24482,24487,24491,24484,24492,24495,24496,24497,24504,24516,24519,24520,24521,24523,24528,24529,24530,24531,24532,24542,24545,24546,24552,24553,24554,24556,24557,24558,24559,24562,24563,24566,24570,24572,24583,24586,24589,24595,24596,24599,24600,24602,24607,24612,24621,24627,24629,24640,24647,24648,24649,24652,24657,24660,24662,24663,24669,24673,24679,24689,24702,24703,24706,24710,24712,24714,24718,24721,24723,24725,24728,24733,24734,24738,24740,24741,24744,24752,24753,24759,24763,24766,24770,24772,24776,24777,24778,24779,24782,24783,24788,24789,24793,24795,24797,24798,24802,24805,24818,24821,24824,24828,24829,24834,24839,24842,24844,24848,24849,24850,24851,24852,24854,24855,24857,24860,24862,24866,24874,24875,24880,24881,24885,24886,24887,24889,24897,24901,24902,24905,24926,24928,24940,24946,24952,24955,24956,24959,24960,24961,24963,24964,24971,24973,24978,24979,24983,24984,24988,24989,24991,24992,24997,25000,25002,25005,25016,25017,25020,25024,25025,25026,25038,25039,25045,25052,25053,25054,25055,25057,25058,25063,25065,25061,25068,25069,25071,25089,25091,25092,25095,25107,25109,25116,25120,25122,25123,25127,25129,25131,25145,25149,25154,25155,25156,25158,25164,25168,25169,25170,25172,25174,25178,25180,25188,25197,25199,25203,25210,25213,25229,25230,25231,25232,25254,25256,25267,25270,25271,25274,25278,25279,25284,25294,25301,25302,25306,25322,25330,25332,25340,25341,25347,25348,25354,25355,25357,25360,25363,25366,25368,25385,25386,25389,25397,25398,25401,25404,25409,25410,25411,25412,25414,25418,25419,25422,25426,25427,25428,25432,25435,25445,25446,25452,25453,25457,25460,25461,25464,25468,25469,25471,25474,25476,25479,25482,25488,25492,25493,25497,25498,25502,25508,25510,25517,25518,25519,25533,25537,25541,25544,25550,25553,25555,25556,25557,25564,25568,25573,25578,25580,25586,25587,25589,25592,25593,25609,25610,25616,25618,25620,25624,25630,25632,25634,25636,25637,25641,25642,25647,25648,25653,25661,25663,25675,25679,25681,25682,25683,25684,25690,25691,25692,25693,25695,25696,25697,25699,25709,25715,25716,25723,25725,25733,25735,25743,25744,25745,25752,25753,25755,25757,25759,25761,25763,25766,25768,25772,25779,25789,25790,25791,25796,25801,25802,25803,25804,25806,25808,25809,25813,25815,25828,25829,25833,25834,25837,25840,25845,25847,25851,25855,25857,25860,25864,25865,25866,25871,25875,25876,25878,25881,25883,25886,25887,25890,25894,25897,25902,25905,25914,25916,25917,25923,25927,25929,25936,25938,25940,25951,25952,25959,25963,25978,25981,25985,25989,25994,26002,26005,26008,26013,26016,26019,26022,26030,26034,26035,26036,26047,26050,26056,26057,26062,26064,26068,26070,26072,26079,26096,26098,26100,26101,26105,26110,26111,26112,26116,26120,26121,26125,26129,26130,26133,26134,26141,26142,26145,26146,26147,26148,26150,26153,26154,26155,26156,26158,26160,26161,26163,26169,26167,26176,26181,26182,26186,26188,26193,26190,26199,26200,26201,26203,26204,26208,26209,26363,26218,26219,26220,26238,26227,26229,26239,26231,26232,26233,26235,26240,26236,26251,26252,26253,26256,26258,26265,26266,26267,26268,26271,26272,26276,26285,26289,26290,26293,26299,26303,26304,26306,26307,26312,26316,26318,26319,26324,26331,26335,26344,26347,26348,26350,26362,26373,26375,26382,26387,26393,26396,26400,26402,26419,26430,26437,26439,26440,26444,26452,26453,26461,26470,26476,26478,26484,26486,26491,26497,26500,26510,26511,26513,26515,26518,26520,26521,26523,26544,26545,26546,26549,26555,26556,26557,26617,26560,26562,26563,26565,26568,26569,26578,26583,26585,26588,26593,26598,26608,26610,26614,26615,26706,26644,26649,26653,26655,26664,26663,26668,26669,26671,26672,26673,26675,26683,26687,26692,26693,26698,26700,26709,26711,26712,26715,26731,26734,26735,26736,26737,26738,26741,26745,26746,26747,26748,26754,26756,26758,26760,26774,26776,26778,26780,26785,26787,26789,26793,26794,26798,26802,26811,26821,26824,26828,26831,26832,26833,26835,26838,26841,26844,26845,26853,26856,26858,26859,26860,26861,26864,26865,26869,26870,26875,26876,26877,26886,26889,26890,26896,26897,26899,26902,26903,26929,26931,26933,26936,26939,26946,26949,26953,26958,26967,26971,26979,26980,26981,26982,26984,26985,26988,26992,26993,26994,27002,27003,27007,27008,27021,27026,27030,27032,27041,27045,27046,27048,27051,27053,27055,27063,27064,27066,27068,27077,27080,27089,27094,27095,27106,27109,27118,27119,27121,27123,27125,27134,27136,27137,27139,27151,27153,27157,27162,27165,27168,27172,27176,27184,27186,27188,27191,27195,27198,27199,27205,27206,27209,27210,27214,27216,27217,27218,27221,27222,27227,27236,27239,27242,27249,27251,27262,27265,27267,27270,27271,27273,27275,27281,27291,27293,27294,27295,27301,27307,27311,27312,27313,27316,27325,27326,27327,27334,27337,27336,27340,27344,27348,27349,27350,27356,27357,27364,27367,27372,27376,27377,27378,27388,27389,27394,27395,27398,27399,27401,27407,27408,27409,27415,27419,27422,27428,27432,27435,27436,27439,27445,27446,27451,27455,27462,27466,27469,27474,27478,27480,27485,27488,27495,27499,27502,27504,27509,27517,27518,27522,27525,27543,27547,27551,27552,27554,27555,27560,27561,27564,27565,27566,27568,27576,27577,27581,27582,27587,27588,27593,27596,27606,27610,27617,27619,27622,27623,27630,27633,27639,27641,27647,27650,27652,27653,27657,27661,27662,27664,27666,27673,27679,27686,27687,27688,27692,27694,27699,27701,27702,27706,27707,27711,27722,27723,27725,27727,27730,27732,27737,27739,27740,27755,27757,27759,27764,27766,27768,27769,27771,27781,27782,27783,27785,27796,27797,27799,27800,27804,27807,27824,27826,27828,27842,27846,27853,27855,27856,27857,27858,27860,27862,27866,27868,27872,27879,27881,27883,27884,27886,27890,27892,27908,27911,27914,27918,27919,27921,27923,27930,27942,27943,27944,27751,27950,27951,27953,27961,27964,27967,27991,27998,27999,28001,28005,28007,28015,28016,28028,28034,28039,28049,28050,28052,28054,28055,28056,28074,28076,28084,28087,28089,28093,28095,28100,28104,28106,28110,28111,28118,28123,28125,28127,28128,28130,28133,28137,28143,28144,28148,28150,28156,28160,28164,28190,28194,28199,28210,28214,28217,28219,28220,28228,28229,28232,28233,28235,28239,28241,28242,28243,28244,28247,28252,28253,28254,28258,28259,28264,28275,28283,28285,28301,28307,28313,28320,28327,28333,28334,28337,28339,28347,28351,28352,28353,28355,28359,28360,28362,28365,28366,28367,28395,28397,28398,28409,28411,28413,28420,28424,28426,28428,28429,28438,28440,28442,28443,28454,28457,28458,28463,28464,28467,28470,28475,28476,28461,28495,28497,28498,28499,28503,28505,28506,28509,28510,28513,28514,28520,28524,28541,28542,28547,28551,28552,28555,28556,28557,28560,28562,28563,28564,28566,28570,28575,28576,28581,28582,28583,28584,28590,28591,28592,28597,28598,28604,28613,28615,28616,28618,28634,28638,28648,28649,28656,28661,28665,28668,28669,28672,28677,28678,28679,28685,28695,28704,28707,28719,28724,28727,28729,28732,28739,28740,28744,28745,28746,28747,28756,28757,28765,28766,28750,28772,28773,28780,28782,28789,28790,28798,28801,28805,28806,28820,28821,28822,28823,28824,28827,28836,28843,28848,28849,28852,28855,28874,28881,28883,28884,28885,28886,28888,28892,28900,28922,28931,28932,28933,28934,28935,28939,28940,28943,28958,28960,28971,28973,28975,28976,28977,28984,28993,28997,28998,28999,29002,29003,29008,29010,29015,29018,29020,29022,29024,29032,29049,29056,29061,29063,29068,29074,29082,29083,29088,29090,29103,29104,29106,29107,29114,29119,29120,29121,29124,29131,29132,29139,29142,29145,29146,29148,29176,29182,29184,29191,29192,29193,29203,29207,29210,29213,29215,29220,29227,29231,29236,29240,29241,29249,29250,29251,29253,29262,29263,29264,29267,29269,29270,29274,29276,29278,29280,29283,29288,29291,29294,29295,29297,29303,29304,29307,29308,29311,29316,29321,29325,29326,29331,29339,29352,29357,29358,29361,29364,29374,29377,29383,29385,29388,29397,29398,29400,29407,29413,29427,29428,29434,29435,29438,29442,29444,29445,29447,29451,29453,29458,29459,29464,29465,29470,29474,29476,29479,29480,29484,29489,29490,29493,29498,29499,29501,29507,29517,29520,29522,29526,29528,29533,29534,29535,29536,29542,29543,29545,29547,29548,29550,29551,29553,29559,29561,29564,29568,29569,29571,29573,29574,29582,29584,29587,29589,29591,29592,29596,29598,29599,29600,29602,29605,29606,29610,29611,29613,29621,29623,29625,29628,29629,29631,29637,29638,29641,29643,29644,29647,29650,29651,29654,29657,29661,29665,29667,29670,29671,29673,29684,29685,29687,29689,29690,29691,29693,29695,29696,29697,29700,29703,29706,29713,29722,29723,29732,29734,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29753,29760,29763,29764,29766,29767,29771,29773,29777,29778,29783,29789,29794,29798,29799,29800,29803,29805,29806,29809,29810,29824,29825,29829,29830,29831,29833,29839,29840,29841,29842,29848,29849,29850,29852,29855,29856,29857,29859,29862,29864,29865,29866,29867,29870,29871,29873,29874,29877,29881,29883,29887,29896,29897,29900,29904,29907,29912,29914,29915,29918,29919,29924,29928,29930,29931,29935,29940,29946,29947,29948,29951,29958,29970,29974,29975,29984,29985,29988,29991,29993,29994,29999,30006,30009,30013,30014,30015,30016,30019,30023,30024,30030,30032,30034,30039,30046,30047,30049,30063,30065,30073,30074,30075,30076,30077,30078,30081,30085,30096,30098,30099,30101,30105,30108,30114,30116,30132,30138,30143,30144,30145,30148,30150,30156,30158,30159,30167,30172,30175,30176,30177,30180,30183,30188,30190,30191,30193,30201,30208,30210,30211,30212,30215,30216,30218,30220,30223,30226,30227,30229,30230,30233,30235,30236,30237,30238,30243,30245,30246,30249,30253,30258,30259,30261,30264,30265,30266,30268,30282,30272,30273,30275,30276,30277,30281,30283,30293,30297,30303,30308,30309,30317,30318,30319,30321,30324,30337,30341,30348,30349,30357,30363,30364,30365,30367,30368,30370,30371,30372,30373,30374,30375,30376,30378,30381,30397,30401,30405,30409,30411,30412,30414,30420,30425,30432,30438,30440,30444,30448,30449,30454,30457,30460,30464,30470,30474,30478,30482,30484,30485,30487,30489,30490,30492,30498,30504,30509,30510,30511,30516,30517,30518,30521,30525,30526,30530,30533,30534,30538,30541,30542,30543,30546,30550,30551,30556,30558,30559,30560,30562,30564,30567,30570,30572,30576,30578,30579,30580,30586,30589,30592,30596,30604,30605,30612,30613,30614,30618,30623,30626,30631,30634,30638,30639,30641,30645,30654,30659,30665,30673,30674,30677,30681,30686,30687,30688,30692,30694,30698,30700,30704,30705,30708,30712,30715,30725,30726,30729,30733,30734,30737,30749,30753,30754,30755,30765,30766,30768,30773,30775,30787,30788,30791,30792,30796,30798,30802,30812,30814,30816,30817,30819,30820,30824,30826,30830,30842,30846,30858,30863,30868,30872,30881,30877,30878,30879,30884,30888,30892,30893,30896,30897,30898,30899,30907,30909,30911,30919,30920,30921,30924,30926,30930,30931,30933,30934,30948,30939,30943,30944,30945,30950,30954,30962,30963,30976,30966,30967,30970,30971,30975,30982,30988,30992,31002,31004,31006,31007,31008,31013,31015,31017,31021,31025,31028,31029,31035,31037,31039,31044,31045,31046,31050,31051,31055,31057,31060,31064,31067,31068,31079,31081,31083,31090,31097,31099,31100,31102,31115,31116,31121,31123,31124,31125,31126,31128,31131,31132,31137,31144,31145,31147,31151,31153,31156,31160,31163,31170,31172,31175,31176,31178,31183,31188,31190,31194,31197,31198,31200,31202,31205,31210,31211,31213,31217,31224,31228,31234,31235,31239,31241,31242,31244,31249,31253,31259,31262,31265,31271,31275,31277,31279,31280,31284,31285,31288,31289,31290,31300,31301,31303,31304,31308,31317,31318,31321,31324,31325,31327,31328,31333,31335,31338,31341,31349,31352,31358,31360,31362,31365,31366,31370,31371,31376,31377,31380,31390,31392,31395,31404,31411,31413,31417,31419,31420,31430,31433,31436,31438,31441,31451,31464,31465,31467,31468,31473,31476,31483,31485,31486,31495,31508,31519,31523,31527,31529,31530,31531,31533,31534,31535,31536,31537,31540,31549,31551,31552,31553,31559,31566,31573,31584,31588,31590,31593,31594,31597,31599,31602,31603,31607,31620,31625,31630,31632,31633,31638,31643,31646,31648,31653,31660,31663,31664,31666,31669,31670,31674,31675,31676,31677,31682,31685,31688,31690,31700,31702,31703,31705,31706,31707,31720,31722,31730,31732,31733,31736,31737,31738,31740,31742,31745,31746,31747,31748,31750,31753,31755,31756,31758,31759,31769,31771,31776,31781,31782,31784,31788,31793,31795,31796,31798,31801,31802,31814,31818,31829,31825,31826,31827,31833,31834,31835,31836,31837,31838,31841,31843,31847,31849,31853,31854,31856,31858,31865,31868,31869,31878,31879,31887,31892,31902,31904,31910,31920,31926,31927,31930,31931,31932,31935,31940,31943,31944,31945,31949,31951,31955,31956,31957,31959,31961,31962,31965,31974,31977,31979,31989,32003,32007,32008,32009,32015,32017,32018,32019,32022,32029,32030,32035,32038,32042,32045,32049,32060,32061,32062,32064,32065,32071,32072,32077,32081,32083,32087,32089,32090,32092,32093,32101,32103,32106,32112,32120,32122,32123,32127,32129,32130,32131,32133,32134,32136,32139,32140,32141,32145,32150,32151,32157,32158,32166,32167,32170,32179,32182,32183,32185,32194,32195,32196,32197,32198,32204,32205,32206,32215,32217,32256,32226,32229,32230,32234,32235,32237,32241,32245,32246,32249,32250,32264,32272,32273,32277,32279,32284,32285,32288,32295,32296,32300,32301,32303,32307,32310,32319,32324,32325,32327,32334,32336,32338,32344,32351,32353,32354,32357,32363,32366,32367,32371,32376,32382,32385,32390,32391,32394,32397,32401,32405,32408,32410,32413,32414,32572,32571,32573,32574,32575,32579,32580,32583,32591,32594,32595,32603,32604,32605,32609,32611,32612,32613,32614,32621,32625,32637,32638,32639,32640,32651,32653,32655,32656,32657,32662,32663,32668,32673,32674,32678,32682,32685,32692,32700,32703,32704,32707,32712,32718,32719,32731,32735,32739,32741,32744,32748,32750,32751,32754,32762,32765,32766,32767,32775,32776,32778,32781,32782,32783,32785,32787,32788,32790,32797,32798,32799,32800,32804,32806,32812,32814,32816,32820,32821,32823,32825,32826,32828,32830,32832,32836,32864,32868,32870,32877,32881,32885,32897,32904,32910,32924,32926,32934,32935,32939,32952,32953,32968,32973,32975,32978,32980,32981,32983,32984,32992,33005,33006,33008,33010,33011,33014,33017,33018,33022,33027,33035,33046,33047,33048,33052,33054,33056,33060,33063,33068,33072,33077,33082,33084,33093,33095,33098,33100,33106,33111,33120,33121,33127,33128,33129,33133,33135,33143,33153,33168,33156,33157,33158,33163,33166,33174,33176,33179,33182,33186,33198,33202,33204,33211,33227,33219,33221,33226,33230,33231,33237,33239,33243,33245,33246,33249,33252,33259,33260,33264,33265,33266,33269,33270,33272,33273,33277,33279,33280,33283,33295,33299,33300,33305,33306,33309,33313,33314,33320,33330,33332,33338,33347,33348,33349,33350,33355,33358,33359,33361,33366,33372,33376,33379,33383,33389,33396,33403,33405,33407,33408,33409,33411,33412,33415,33417,33418,33422,33425,33428,33430,33432,33434,33435,33440,33441,33443,33444,33447,33448,33449,33450,33454,33456,33458,33460,33463,33466,33468,33470,33471,33478,33488,33493,33498,33504,33506,33508,33512,33514,33517,33519,33526,33527,33533,33534,33536,33537,33543,33544,33546,33547,33620,33563,33565,33566,33567,33569,33570,33580,33581,33582,33584,33587,33591,33594,33596,33597,33602,33603,33604,33607,33613,33614,33617,33621,33622,33623,33648,33656,33661,33663,33664,33666,33668,33670,33677,33682,33684,33685,33688,33689,33691,33692,33693,33702,33703,33705,33708,33726,33727,33728,33735,33737,33743,33744,33745,33748,33757,33619,33768,33770,33782,33784,33785,33788,33793,33798,33802,33807,33809,33813,33817,33709,33839,33849,33861,33863,33864,33866,33869,33871,33873,33874,33878,33880,33881,33882,33884,33888,33892,33893,33895,33898,33904,33907,33908,33910,33912,33916,33917,33921,33925,33938,33939,33941,33950,33958,33960,33961,33962,33967,33969,33972,33978,33981,33982,33984,33986,33991,33992,33996,33999,34003,34012,34023,34026,34031,34032,34033,34034,34039,34098,34042,34043,34045,34050,34051,34055,34060,34062,34064,34076,34078,34082,34083,34084,34085,34087,34090,34091,34095,34099,34100,34102,34111,34118,34127,34128,34129,34130,34131,34134,34137,34140,34141,34142,34143,34144,34145,34146,34148,34155,34159,34169,34170,34171,34173,34175,34177,34181,34182,34185,34187,34188,34191,34195,34200,34205,34207,34208,34210,34213,34215,34228,34230,34231,34232,34236,34237,34238,34239,34242,34247,34250,34251,34254,34221,34264,34266,34271,34272,34278,34280,34285,34291,34294,34300,34303,34304,34308,34309,34317,34318,34320,34321,34322,34328,34329,34331,34334,34337,34343,34345,34358,34360,34362,34364,34365,34368,34370,34374,34386,34387,34390,34391,34392,34393,34397,34400,34401,34402,34403,34404,34409,34412,34415,34421,34422,34423,34426,34445,34449,34454,34456,34458,34460,34465,34470,34471,34472,34477,34481,34483,34484,34485,34487,34488,34489,34495,34496,34497,34499,34501,34513,34514,34517,34519,34522,34524,34528,34531,34533,34535,34440,34554,34556,34557,34564,34565,34567,34571,34574,34575,34576,34579,34580,34585,34590,34591,34593,34595,34600,34606,34607,34609,34610,34617,34618,34620,34621,34622,34624,34627,34629,34637,34648,34653,34657,34660,34661,34671,34673,34674,34683,34691,34692,34693,34694,34695,34696,34697,34699,34700,34704,34707,34709,34711,34712,34713,34718,34720,34723,34727,34732,34733,34734,34737,34741,34750,34751,34753,34760,34761,34762,34766,34773,34774,34777,34778,34780,34783,34786,34787,34788,34794,34795,34797,34801,34803,34808,34810,34815,34817,34819,34822,34825,34826,34827,34832,34841,34834,34835,34836,34840,34842,34843,34844,34846,34847,34856,34861,34862,34864,34866,34869,34874,34876,34881,34883,34885,34888,34889,34890,34891,34894,34897,34901,34902,34904,34906,34908,34911,34912,34916,34921,34929,34937,34939,34944,34968,34970,34971,34972,34975,34976,34984,34986,35002,35005,35006,35008,35018,35019,35020,35021,35022,35025,35026,35027,35035,35038,35047,35055,35056,35057,35061,35063,35073,35078,35085,35086,35087,35093,35094,35096,35097,35098,35100,35104,35110,35111,35112,35120,35121,35122,35125,35129,35130,35134,35136,35138,35141,35142,35145,35151,35154,35159,35162,35163,35164,35169,35170,35171,35179,35182,35184,35187,35189,35194,35195,35196,35197,35209,35213,35216,35220,35221,35227,35228,35231,35232,35237,35248,35252,35253,35254,35255,35260,35284,35285,35286,35287,35288,35301,35305,35307,35309,35313,35315,35318,35321,35325,35327,35332,35333,35335,35343,35345,35346,35348,35349,35358,35360,35362,35364,35366,35371,35372,35375,35381,35383,35389,35390,35392,35395,35397,35399,35401,35405,35406,35411,35414,35415,35416,35420,35421,35425,35429,35431,35445,35446,35447,35449,35450,35451,35454,35455,35456,35459,35462,35467,35471,35472,35474,35478,35479,35481,35487,35495,35497,35502,35503,35507,35510,35511,35515,35518,35523,35526,35528,35529,35530,35537,35539,35540,35541,35543,35549,35551,35564,35568,35572,35573,35574,35580,35583,35589,35590,35595,35601,35612,35614,35615,35594,35629,35632,35639,35644,35650,35651,35652,35653,35654,35656,35666,35667,35668,35673,35661,35678,35683,35693,35702,35704,35705,35708,35710,35713,35716,35717,35723,35725,35727,35732,35733,35740,35742,35743,35896,35897,35901,35902,35909,35911,35913,35915,35919,35921,35923,35924,35927,35928,35931,35933,35929,35939,35940,35942,35944,35945,35949,35955,35957,35958,35963,35966,35974,35975,35979,35984,35986,35987,35993,35995,35996,36004,36025,36026,36037,36038,36041,36043,36047,36054,36053,36057,36061,36065,36072,36076,36079,36080,36082,36085,36087,36088,36094,36095,36097,36099,36105,36114,36119,36123,36197,36201,36204,36206,36223,36226,36228,36232,36237,36240,36241,36245,36254,36255,36256,36262,36267,36268,36271,36274,36277,36279,36281,36283,36288,36293,36294,36295,36296,36298,36302,36305,36308,36309,36311,36313,36324,36325,36327,36332,36336,36284,36337,36338,36340,36349,36353,36356,36357,36358,36363,36369,36372,36374,36384,36385,36386,36387,36390,36391,36401,36403,36406,36407,36408,36409,36413,36416,36417,36427,36429,36430,36431,36436,36443,36444,36445,36446,36449,36450,36457,36460,36461,36463,36464,36465,36473,36474,36475,36482,36483,36489,36496,36498,36501,36506,36507,36509,36510,36514,36519,36521,36525,36526,36531,36533,36538,36539,36544,36545,36547,36548,36551,36559,36561,36564,36572,36584,36590,36592,36593,36599,36601,36602,36589,36608,36610,36615,36616,36623,36624,36630,36631,36632,36638,36640,36641,36643,36645,36647,36648,36652,36653,36654,36660,36661,36662,36663,36666,36672,36673,36675,36679,36687,36689,36690,36691,36692,36693,36696,36701,36702,36709,36765,36768,36769,36772,36773,36774,36789,36790,36792,36798,36800,36801,36806,36810,36811,36813,36816,36818,36819,36821,36832,36835,36836,36840,36846,36849,36853,36854,36859,36862,36866,36868,36872,36876,36888,36891,36904,36905,36911,36906,36908,36909,36915,36916,36919,36927,36931,36932,36940,36955,36957,36962,36966,36967,36972,36976,36980,36985,36997,37000,37003,37004,37006,37008,37013,37015,37016,37017,37019,37024,37025,37026,37029,37040,37042,37043,37044,37046,37053,37068,37054,37059,37060,37061,37063,37064,37077,37079,37080,37081,37084,37085,37087,37093,37074,37110,37099,37103,37104,37108,37118,37119,37120,37124,37125,37126,37128,37133,37136,37140,37142,37143,37144,37146,37148,37150,37152,37157,37154,37155,37159,37161,37166,37167,37169,37172,37174,37175,37177,37178,37180,37181,37187,37191,37192,37199,37203,37207,37209,37210,37211,37217,37220,37223,37229,37236,37241,37242,37243,37249,37251,37253,37254,37258,37262,37265,37267,37268,37269,37272,37278,37281,37286,37288,37292,37293,37294,37296,37297,37298,37299,37302,37307,37308,37309,37311,37314,37315,37317,37331,37332,37335,37337,37338,37342,37348,37349,37353,37354,37356,37357,37358,37359,37360,37361,37367,37369,37371,37373,37376,37377,37380,37381,37382,37383,37385,37386,37388,37392,37394,37395,37398,37400,37404,37405,37411,37412,37413,37414,37416,37422,37423,37424,37427,37429,37430,37432,37433,37434,37436,37438,37440,37442,37443,37446,37447,37450,37453,37454,37455,37457,37464,37465,37468,37469,37472,37473,37477,37479,37480,37481,37486,37487,37488,37493,37494,37495,37496,37497,37499,37500,37501,37503,37512,37513,37514,37517,37518,37522,37527,37529,37535,37536,37540,37541,37543,37544,37547,37551,37554,37558,37560,37562,37563,37564,37565,37567,37568,37569,37570,37571,37573,37574,37575,37576,37579,37580,37581,37582,37584,37587,37589,37591,37592,37593,37596,37597,37599,37600,37601,37603,37605,37607,37608,37612,37614,37616,37625,37627,37631,37632,37634,37640,37645,37649,37652,37653,37660,37661,37662,37663,37665,37668,37669,37671,37673,37674,37683,37684,37686,37687,37703,37704,37705,37712,37713,37714,37717,37719,37720,37722,37726,37732,37733,37735,37737,37738,37741,37743,37744,37745,37747,37748,37750,37754,37757,37759,37760,37761,37762,37768,37770,37771,37773,37775,37778,37781,37784,37787,37790,37793,37795,37796,37798,37800,37803,37812,37813,37814,37818,37801,37825,37828,37829,37830,37831,37833,37834,37835,37836,37837,37843,37849,37852,37854,37855,37858,37862,37863,37881,37879,37880,37882,37883,37885,37889,37890,37892,37896,37897,37901,37902,37903,37909,37910,37911,37919,37934,37935,37937,37938,37939,37940,37947,37951,37949,37955,37957,37960,37962,37964,37973,37977,37980,37983,37985,37987,37992,37995,37997,37998,37999,38001,38002,38020,38019,38264,38265,38270,38276,38280,38284,38285,38286,38301,38302,38303,38305,38310,38313,38315,38316,38324,38326,38330,38333,38335,38342,38344,38345,38347,38352,38353,38354,38355,38361,38362,38365,38366,38367,38368,38372,38374,38429,38430,38434,38436,38437,38438,38444,38449,38451,38455,38456,38457,38458,38460,38461,38465,38482,38484,38486,38487,38488,38497,38510,38516,38523,38524,38526,38527,38529,38530,38531,38532,38537,38545,38550,38554,38557,38559,38564,38565,38566,38569,38574,38575,38579,38586,38602,38610,23986,38616,38618,38621,38622,38623,38633,38639,38641,38650,38658,38659,38661,38665,38682,38683,38685,38689,38690,38691,38696,38705,38707,38721,38723,38730,38734,38735,38741,38743,38744,38746,38747,38755,38759,38762,38766,38771,38774,38775,38776,38779,38781,38783,38784,38793,38805,38806,38807,38809,38810,38814,38815,38818,38828,38830,38833,38834,38837,38838,38840,38841,38842,38844,38846,38847,38849,38852,38853,38855,38857,38858,38860,38861,38862,38864,38865,38868,38871,38872,38873,38877,38878,38880,38875,38881,38884,38895,38897,38900,38903,38904,38906,38919,38922,38937,38925,38926,38932,38934,38940,38942,38944,38947,38950,38955,38958,38959,38960,38962,38963,38965,38949,38974,38980,38983,38986,38993,38994,38995,38998,38999,39001,39002,39010,39011,39013,39014,39018,39020,39083,39085,39086,39088,39092,39095,39096,39098,39099,39103,39106,39109,39112,39116,39137,39139,39141,39142,39143,39146,39155,39158,39170,39175,39176,39185,39189,39190,39191,39194,39195,39196,39199,39202,39206,39207,39211,39217,39218,39219,39220,39221,39225,39226,39227,39228,39232,39233,39238,39239,39240,39245,39246,39252,39256,39257,39259,39260,39262,39263,39264,39323,39325,39327,39334,39344,39345,39346,39349,39353,39354,39357,39359,39363,39369,39379,39380,39385,39386,39388,39390,39399,39402,39403,39404,39408,39412,39413,39417,39421,39422,39426,39427,39428,39435,39436,39440,39441,39446,39454,39456,39458,39459,39460,39463,39469,39470,39475,39477,39478,39480,39495,39489,39492,39498,39499,39500,39502,39505,39508,39510,39517,39594,39596,39598,39599,39602,39604,39605,39606,39609,39611,39614,39615,39617,39619,39622,39624,39630,39632,39634,39637,39638,39639,39643,39644,39648,39652,39653,39655,39657,39660,39666,39667,39669,39673,39674,39677,39679,39680,39681,39682,39683,39684,39685,39688,39689,39691,39692,39693,39694,39696,39698,39702,39705,39707,39708,39712,39718,39723,39725,39731,39732,39733,39735,39737,39738,39741,39752,39755,39756,39765,39766,39767,39771,39774,39777,39779,39781,39782,39784,39786,39787,39788,39789,39790,39795,39797,39799,39800,39801,39807,39808,39812,39813,39814,39815,39817,39818,39819,39821,39823,39824,39828,39834,39837,39838,39846,39847,39849,39852,39856,39857,39858,39863,39864,39867,39868,39870,39871,39873,39879,39880,39886,39888,39895,39896,39901,39903,39909,39911,39914,39915,39919,39923,39927,39928,39929,39930,39933,39935,39936,39938,39947,39951,39953,39958,39960,39961,39962,39964,39966,39970,39971,39974,39975,39976,39977,39978,39985,39989,39990,39991,39997,40001,40003,40004,40005,40009,40010,40014,40015,40016,40019,40020,40022,40024,40027,40029,40030,40031,40035,40041,40042,40028,40043,40040,40046,40048,40050,40053,40055,40059,40166,40178,40183,40185,40203,40194,40209,40215,40216,40220,40221,40222,40239,40240,40242,40243,40244,40250,40252,40261,40253,40258,40259,40263,40266,40275,40276,40287,40291,40290,40293,40297,40298,40299,40304,40310,40311,40315,40316,40318,40323,40324,40326,40330,40333,40334,40338,40339,40341,40342,40343,40344,40353,40362,40364,40366,40369,40373,40377,40380,40383,40387,40391,40393,40394,40404,40405,40406,40407,40410,40414,40415,40416,40421,40423,40425,40427,40430,40432,40435,40436,40446,40458,40450,40455,40462,40464,40465,40466,40469,40470,40473,40476,40477,40570,40571,40572,40576,40578,40579,40580,40581,40583,40590,40591,40598,40600,40603,40606,40612,40616,40620,40622,40623,40624,40627,40628,40629,40646,40648,40651,40661,40671,40676,40679,40684,40685,40686,40688,40689,40690,40693,40696,40703,40706,40707,40713,40719,40720,40721,40722,40724,40726,40727,40729,40730,40731,40735,40738,40742,40746,40747,40751,40753,40754,40756,40759,40761,40762,40764,40765,40767,40769,40771,40772,40773,40774,40775,40787,40789,40790,40791,40792,40794,40797,40798,40808,40809,40813,40814,40815,40816,40817,40819,40821,40826,40829,40847,40848,40849,40850,40852,40854,40855,40862,40865,40866,40867,40869,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "ibm866":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],
+ "iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
+ "iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],
+ "iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],
+ "iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],
+ "iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],
+ "iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
+ "iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
+ "iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],
+ "iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],
+ "iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],
+ "iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
+ "iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],
+ "koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
+ "koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],
+ "macintosh":[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],
+ "windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],
+ "windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],
+ "windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],
+ "windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],
+ "windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],
+ "windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],
+ "windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],
+ "windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],
+ "windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],
+ "windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],
+ "x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]
+};
+
+// For strict environments where `this` inside the global scope
+// is `undefined`, take a pure object instead
+}(this || {}));
\ No newline at end of file
diff --git a/node_modules/@sinonjs/text-encoding/lib/encoding.js b/node_modules/@sinonjs/text-encoding/lib/encoding.js
new file mode 100644
index 0000000..13aca2c
--- /dev/null
+++ b/node_modules/@sinonjs/text-encoding/lib/encoding.js
@@ -0,0 +1,3313 @@
+// This is free and unencumbered software released into the public domain.
+// See LICENSE.md for more information.
+
+/**
+ * @fileoverview Global |this| required for resolving indexes in node.
+ * @suppress {globalThis}
+ */
+(function(global) {
+ 'use strict';
+
+ // If we're in node require encoding-indexes and attach it to the global.
+ if (typeof module !== "undefined" && module.exports &&
+ !global["encoding-indexes"]) {
+ global["encoding-indexes"] =
+ require("./encoding-indexes.js")["encoding-indexes"];
+ }
+
+ //
+ // Utilities
+ //
+
+ /**
+ * @param {number} a The number to test.
+ * @param {number} min The minimum value in the range, inclusive.
+ * @param {number} max The maximum value in the range, inclusive.
+ * @return {boolean} True if a >= min and a <= max.
+ */
+ function inRange(a, min, max) {
+ return min <= a && a <= max;
+ }
+
+ /**
+ * @param {!Array.<*>} array The array to check.
+ * @param {*} item The item to look for in the array.
+ * @return {boolean} True if the item appears in the array.
+ */
+ function includes(array, item) {
+ return array.indexOf(item) !== -1;
+ }
+
+ var floor = Math.floor;
+
+ /**
+ * @param {*} o
+ * @return {Object}
+ */
+ function ToDictionary(o) {
+ if (o === undefined) return {};
+ if (o === Object(o)) return o;
+ throw TypeError('Could not convert argument to dictionary');
+ }
+
+ /**
+ * @param {string} string Input string of UTF-16 code units.
+ * @return {!Array.} Code points.
+ */
+ function stringToCodePoints(string) {
+ // https://heycam.github.io/webidl/#dfn-obtain-unicode
+
+ // 1. Let S be the DOMString value.
+ var s = String(string);
+
+ // 2. Let n be the length of S.
+ var n = s.length;
+
+ // 3. Initialize i to 0.
+ var i = 0;
+
+ // 4. Initialize U to be an empty sequence of Unicode characters.
+ var u = [];
+
+ // 5. While i < n:
+ while (i < n) {
+
+ // 1. Let c be the code unit in S at index i.
+ var c = s.charCodeAt(i);
+
+ // 2. Depending on the value of c:
+
+ // c < 0xD800 or c > 0xDFFF
+ if (c < 0xD800 || c > 0xDFFF) {
+ // Append to U the Unicode character with code point c.
+ u.push(c);
+ }
+
+ // 0xDC00 ≤ c ≤ 0xDFFF
+ else if (0xDC00 <= c && c <= 0xDFFF) {
+ // Append to U a U+FFFD REPLACEMENT CHARACTER.
+ u.push(0xFFFD);
+ }
+
+ // 0xD800 ≤ c ≤ 0xDBFF
+ else if (0xD800 <= c && c <= 0xDBFF) {
+ // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT
+ // CHARACTER.
+ if (i === n - 1) {
+ u.push(0xFFFD);
+ }
+ // 2. Otherwise, i < n−1:
+ else {
+ // 1. Let d be the code unit in S at index i+1.
+ var d = s.charCodeAt(i + 1);
+
+ // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:
+ if (0xDC00 <= d && d <= 0xDFFF) {
+ // 1. Let a be c & 0x3FF.
+ var a = c & 0x3FF;
+
+ // 2. Let b be d & 0x3FF.
+ var b = d & 0x3FF;
+
+ // 3. Append to U the Unicode character with code point
+ // 2^16+2^10*a+b.
+ u.push(0x10000 + (a << 10) + b);
+
+ // 4. Set i to i+1.
+ i += 1;
+ }
+
+ // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a
+ // U+FFFD REPLACEMENT CHARACTER.
+ else {
+ u.push(0xFFFD);
+ }
+ }
+ }
+
+ // 3. Set i to i+1.
+ i += 1;
+ }
+
+ // 6. Return U.
+ return u;
+ }
+
+ /**
+ * @param {!Array.} code_points Array of code points.
+ * @return {string} string String of UTF-16 code units.
+ */
+ function codePointsToString(code_points) {
+ var s = '';
+ for (var i = 0; i < code_points.length; ++i) {
+ var cp = code_points[i];
+ if (cp <= 0xFFFF) {
+ s += String.fromCharCode(cp);
+ } else {
+ cp -= 0x10000;
+ s += String.fromCharCode((cp >> 10) + 0xD800,
+ (cp & 0x3FF) + 0xDC00);
+ }
+ }
+ return s;
+ }
+
+
+ //
+ // Implementation of Encoding specification
+ // https://encoding.spec.whatwg.org/
+ //
+
+ //
+ // 4. Terminology
+ //
+
+ /**
+ * An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
+ * @param {number} a The number to test.
+ * @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
+ */
+ function isASCIIByte(a) {
+ return 0x00 <= a && a <= 0x7F;
+ }
+
+ /**
+ * An ASCII code point is a code point in the range U+0000 to
+ * U+007F, inclusive.
+ */
+ var isASCIICodePoint = isASCIIByte;
+
+
+ /**
+ * End-of-stream is a special token that signifies no more tokens
+ * are in the stream.
+ * @const
+ */ var end_of_stream = -1;
+
+ /**
+ * A stream represents an ordered sequence of tokens.
+ *
+ * @constructor
+ * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide
+ * the stream.
+ */
+ function Stream(tokens) {
+ /** @type {!Array.} */
+ this.tokens = [].slice.call(tokens);
+ // Reversed as push/pop is more efficient than shift/unshift.
+ this.tokens.reverse();
+ }
+
+ Stream.prototype = {
+ /**
+ * @return {boolean} True if end-of-stream has been hit.
+ */
+ endOfStream: function() {
+ return !this.tokens.length;
+ },
+
+ /**
+ * When a token is read from a stream, the first token in the
+ * stream must be returned and subsequently removed, and
+ * end-of-stream must be returned otherwise.
+ *
+ * @return {number} Get the next token from the stream, or
+ * end_of_stream.
+ */
+ read: function() {
+ if (!this.tokens.length)
+ return end_of_stream;
+ return this.tokens.pop();
+ },
+
+ /**
+ * When one or more tokens are prepended to a stream, those tokens
+ * must be inserted, in given order, before the first token in the
+ * stream.
+ *
+ * @param {(number|!Array.)} token The token(s) to prepend to the
+ * stream.
+ */
+ prepend: function(token) {
+ if (Array.isArray(token)) {
+ var tokens = /**@type {!Array.}*/(token);
+ while (tokens.length)
+ this.tokens.push(tokens.pop());
+ } else {
+ this.tokens.push(token);
+ }
+ },
+
+ /**
+ * When one or more tokens are pushed to a stream, those tokens
+ * must be inserted, in given order, after the last token in the
+ * stream.
+ *
+ * @param {(number|!Array.)} token The tokens(s) to push to the
+ * stream.
+ */
+ push: function(token) {
+ if (Array.isArray(token)) {
+ var tokens = /**@type {!Array.}*/(token);
+ while (tokens.length)
+ this.tokens.unshift(tokens.shift());
+ } else {
+ this.tokens.unshift(token);
+ }
+ }
+ };
+
+ //
+ // 5. Encodings
+ //
+
+ // 5.1 Encoders and decoders
+
+ /** @const */
+ var finished = -1;
+
+ /**
+ * @param {boolean} fatal If true, decoding errors raise an exception.
+ * @param {number=} opt_code_point Override the standard fallback code point.
+ * @return {number} The code point to insert on a decoding error.
+ */
+ function decoderError(fatal, opt_code_point) {
+ if (fatal)
+ throw TypeError('Decoder error');
+ return opt_code_point || 0xFFFD;
+ }
+
+ /**
+ * @param {number} code_point The code point that could not be encoded.
+ * @return {number} Always throws, no value is actually returned.
+ */
+ function encoderError(code_point) {
+ throw TypeError('The code point ' + code_point + ' could not be encoded.');
+ }
+
+ /** @interface */
+ function Decoder() {}
+ Decoder.prototype = {
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point, or |finished|.
+ */
+ handler: function(stream, bite) {}
+ };
+
+ /** @interface */
+ function Encoder() {}
+ Encoder.prototype = {
+ /**
+ * @param {Stream} stream The stream of code points being encoded.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit, or |finished|.
+ */
+ handler: function(stream, code_point) {}
+ };
+
+ // 5.2 Names and labels
+
+ // TODO: Define @typedef for Encoding: {name:string,labels:Array.}
+ // https://github.com/google/closure-compiler/issues/247
+
+ /**
+ * @param {string} label The encoding label.
+ * @return {?{name:string,labels:Array.}}
+ */
+ function getEncoding(label) {
+ // 1. Remove any leading and trailing ASCII whitespace from label.
+ label = String(label).trim().toLowerCase();
+
+ // 2. If label is an ASCII case-insensitive match for any of the
+ // labels listed in the table below, return the corresponding
+ // encoding, and failure otherwise.
+ if (Object.prototype.hasOwnProperty.call(label_to_encoding, label)) {
+ return label_to_encoding[label];
+ }
+ return null;
+ }
+
+ /**
+ * Encodings table: https://encoding.spec.whatwg.org/encodings.json
+ * @const
+ * @type {!Array.<{
+ * heading: string,
+ * encodings: Array.<{name:string,labels:Array.}>
+ * }>}
+ */
+ var encodings = [
+ {
+ "encodings": [
+ {
+ "labels": [
+ "unicode-1-1-utf-8",
+ "utf-8",
+ "utf8"
+ ],
+ "name": "UTF-8"
+ }
+ ],
+ "heading": "The Encoding"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "866",
+ "cp866",
+ "csibm866",
+ "ibm866"
+ ],
+ "name": "IBM866"
+ },
+ {
+ "labels": [
+ "csisolatin2",
+ "iso-8859-2",
+ "iso-ir-101",
+ "iso8859-2",
+ "iso88592",
+ "iso_8859-2",
+ "iso_8859-2:1987",
+ "l2",
+ "latin2"
+ ],
+ "name": "ISO-8859-2"
+ },
+ {
+ "labels": [
+ "csisolatin3",
+ "iso-8859-3",
+ "iso-ir-109",
+ "iso8859-3",
+ "iso88593",
+ "iso_8859-3",
+ "iso_8859-3:1988",
+ "l3",
+ "latin3"
+ ],
+ "name": "ISO-8859-3"
+ },
+ {
+ "labels": [
+ "csisolatin4",
+ "iso-8859-4",
+ "iso-ir-110",
+ "iso8859-4",
+ "iso88594",
+ "iso_8859-4",
+ "iso_8859-4:1988",
+ "l4",
+ "latin4"
+ ],
+ "name": "ISO-8859-4"
+ },
+ {
+ "labels": [
+ "csisolatincyrillic",
+ "cyrillic",
+ "iso-8859-5",
+ "iso-ir-144",
+ "iso8859-5",
+ "iso88595",
+ "iso_8859-5",
+ "iso_8859-5:1988"
+ ],
+ "name": "ISO-8859-5"
+ },
+ {
+ "labels": [
+ "arabic",
+ "asmo-708",
+ "csiso88596e",
+ "csiso88596i",
+ "csisolatinarabic",
+ "ecma-114",
+ "iso-8859-6",
+ "iso-8859-6-e",
+ "iso-8859-6-i",
+ "iso-ir-127",
+ "iso8859-6",
+ "iso88596",
+ "iso_8859-6",
+ "iso_8859-6:1987"
+ ],
+ "name": "ISO-8859-6"
+ },
+ {
+ "labels": [
+ "csisolatingreek",
+ "ecma-118",
+ "elot_928",
+ "greek",
+ "greek8",
+ "iso-8859-7",
+ "iso-ir-126",
+ "iso8859-7",
+ "iso88597",
+ "iso_8859-7",
+ "iso_8859-7:1987",
+ "sun_eu_greek"
+ ],
+ "name": "ISO-8859-7"
+ },
+ {
+ "labels": [
+ "csiso88598e",
+ "csisolatinhebrew",
+ "hebrew",
+ "iso-8859-8",
+ "iso-8859-8-e",
+ "iso-ir-138",
+ "iso8859-8",
+ "iso88598",
+ "iso_8859-8",
+ "iso_8859-8:1988",
+ "visual"
+ ],
+ "name": "ISO-8859-8"
+ },
+ {
+ "labels": [
+ "csiso88598i",
+ "iso-8859-8-i",
+ "logical"
+ ],
+ "name": "ISO-8859-8-I"
+ },
+ {
+ "labels": [
+ "csisolatin6",
+ "iso-8859-10",
+ "iso-ir-157",
+ "iso8859-10",
+ "iso885910",
+ "l6",
+ "latin6"
+ ],
+ "name": "ISO-8859-10"
+ },
+ {
+ "labels": [
+ "iso-8859-13",
+ "iso8859-13",
+ "iso885913"
+ ],
+ "name": "ISO-8859-13"
+ },
+ {
+ "labels": [
+ "iso-8859-14",
+ "iso8859-14",
+ "iso885914"
+ ],
+ "name": "ISO-8859-14"
+ },
+ {
+ "labels": [
+ "csisolatin9",
+ "iso-8859-15",
+ "iso8859-15",
+ "iso885915",
+ "iso_8859-15",
+ "l9"
+ ],
+ "name": "ISO-8859-15"
+ },
+ {
+ "labels": [
+ "iso-8859-16"
+ ],
+ "name": "ISO-8859-16"
+ },
+ {
+ "labels": [
+ "cskoi8r",
+ "koi",
+ "koi8",
+ "koi8-r",
+ "koi8_r"
+ ],
+ "name": "KOI8-R"
+ },
+ {
+ "labels": [
+ "koi8-ru",
+ "koi8-u"
+ ],
+ "name": "KOI8-U"
+ },
+ {
+ "labels": [
+ "csmacintosh",
+ "mac",
+ "macintosh",
+ "x-mac-roman"
+ ],
+ "name": "macintosh"
+ },
+ {
+ "labels": [
+ "dos-874",
+ "iso-8859-11",
+ "iso8859-11",
+ "iso885911",
+ "tis-620",
+ "windows-874"
+ ],
+ "name": "windows-874"
+ },
+ {
+ "labels": [
+ "cp1250",
+ "windows-1250",
+ "x-cp1250"
+ ],
+ "name": "windows-1250"
+ },
+ {
+ "labels": [
+ "cp1251",
+ "windows-1251",
+ "x-cp1251"
+ ],
+ "name": "windows-1251"
+ },
+ {
+ "labels": [
+ "ansi_x3.4-1968",
+ "ascii",
+ "cp1252",
+ "cp819",
+ "csisolatin1",
+ "ibm819",
+ "iso-8859-1",
+ "iso-ir-100",
+ "iso8859-1",
+ "iso88591",
+ "iso_8859-1",
+ "iso_8859-1:1987",
+ "l1",
+ "latin1",
+ "us-ascii",
+ "windows-1252",
+ "x-cp1252"
+ ],
+ "name": "windows-1252"
+ },
+ {
+ "labels": [
+ "cp1253",
+ "windows-1253",
+ "x-cp1253"
+ ],
+ "name": "windows-1253"
+ },
+ {
+ "labels": [
+ "cp1254",
+ "csisolatin5",
+ "iso-8859-9",
+ "iso-ir-148",
+ "iso8859-9",
+ "iso88599",
+ "iso_8859-9",
+ "iso_8859-9:1989",
+ "l5",
+ "latin5",
+ "windows-1254",
+ "x-cp1254"
+ ],
+ "name": "windows-1254"
+ },
+ {
+ "labels": [
+ "cp1255",
+ "windows-1255",
+ "x-cp1255"
+ ],
+ "name": "windows-1255"
+ },
+ {
+ "labels": [
+ "cp1256",
+ "windows-1256",
+ "x-cp1256"
+ ],
+ "name": "windows-1256"
+ },
+ {
+ "labels": [
+ "cp1257",
+ "windows-1257",
+ "x-cp1257"
+ ],
+ "name": "windows-1257"
+ },
+ {
+ "labels": [
+ "cp1258",
+ "windows-1258",
+ "x-cp1258"
+ ],
+ "name": "windows-1258"
+ },
+ {
+ "labels": [
+ "x-mac-cyrillic",
+ "x-mac-ukrainian"
+ ],
+ "name": "x-mac-cyrillic"
+ }
+ ],
+ "heading": "Legacy single-byte encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "chinese",
+ "csgb2312",
+ "csiso58gb231280",
+ "gb2312",
+ "gb_2312",
+ "gb_2312-80",
+ "gbk",
+ "iso-ir-58",
+ "x-gbk"
+ ],
+ "name": "GBK"
+ },
+ {
+ "labels": [
+ "gb18030"
+ ],
+ "name": "gb18030"
+ }
+ ],
+ "heading": "Legacy multi-byte Chinese (simplified) encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "big5",
+ "big5-hkscs",
+ "cn-big5",
+ "csbig5",
+ "x-x-big5"
+ ],
+ "name": "Big5"
+ }
+ ],
+ "heading": "Legacy multi-byte Chinese (traditional) encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "cseucpkdfmtjapanese",
+ "euc-jp",
+ "x-euc-jp"
+ ],
+ "name": "EUC-JP"
+ },
+ {
+ "labels": [
+ "csiso2022jp",
+ "iso-2022-jp"
+ ],
+ "name": "ISO-2022-JP"
+ },
+ {
+ "labels": [
+ "csshiftjis",
+ "ms932",
+ "ms_kanji",
+ "shift-jis",
+ "shift_jis",
+ "sjis",
+ "windows-31j",
+ "x-sjis"
+ ],
+ "name": "Shift_JIS"
+ }
+ ],
+ "heading": "Legacy multi-byte Japanese encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "cseuckr",
+ "csksc56011987",
+ "euc-kr",
+ "iso-ir-149",
+ "korean",
+ "ks_c_5601-1987",
+ "ks_c_5601-1989",
+ "ksc5601",
+ "ksc_5601",
+ "windows-949"
+ ],
+ "name": "EUC-KR"
+ }
+ ],
+ "heading": "Legacy multi-byte Korean encodings"
+ },
+ {
+ "encodings": [
+ {
+ "labels": [
+ "csiso2022kr",
+ "hz-gb-2312",
+ "iso-2022-cn",
+ "iso-2022-cn-ext",
+ "iso-2022-kr"
+ ],
+ "name": "replacement"
+ },
+ {
+ "labels": [
+ "utf-16be"
+ ],
+ "name": "UTF-16BE"
+ },
+ {
+ "labels": [
+ "utf-16",
+ "utf-16le"
+ ],
+ "name": "UTF-16LE"
+ },
+ {
+ "labels": [
+ "x-user-defined"
+ ],
+ "name": "x-user-defined"
+ }
+ ],
+ "heading": "Legacy miscellaneous encodings"
+ }
+ ];
+
+ // Label to encoding registry.
+ /** @type {Object.}>} */
+ var label_to_encoding = {};
+ encodings.forEach(function(category) {
+ category.encodings.forEach(function(encoding) {
+ encoding.labels.forEach(function(label) {
+ label_to_encoding[label] = encoding;
+ });
+ });
+ });
+
+ // Registry of of encoder/decoder factories, by encoding name.
+ /** @type {Object.} */
+ var encoders = {};
+ /** @type {Object.} */
+ var decoders = {};
+
+ //
+ // 6. Indexes
+ //
+
+ /**
+ * @param {number} pointer The |pointer| to search for.
+ * @param {(!Array.|undefined)} index The |index| to search within.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in |index|.
+ */
+ function indexCodePointFor(pointer, index) {
+ if (!index) return null;
+ return index[pointer] || null;
+ }
+
+ /**
+ * @param {number} code_point The |code point| to search for.
+ * @param {!Array.} index The |index| to search within.
+ * @return {?number} The first pointer corresponding to |code point| in
+ * |index|, or null if |code point| is not in |index|.
+ */
+ function indexPointerFor(code_point, index) {
+ var pointer = index.indexOf(code_point);
+ return pointer === -1 ? null : pointer;
+ }
+
+ /**
+ * @param {string} name Name of the index.
+ * @return {(!Array.|!Array.>)}
+ * */
+ function index(name) {
+ if (!('encoding-indexes' in global)) {
+ throw Error("Indexes missing." +
+ " Did you forget to include encoding-indexes.js first?");
+ }
+ return global['encoding-indexes'][name];
+ }
+
+ /**
+ * @param {number} pointer The |pointer| to search for in the gb18030 index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the gb18030 index.
+ */
+ function indexGB18030RangesCodePointFor(pointer) {
+ // 1. If pointer is greater than 39419 and less than 189000, or
+ // pointer is greater than 1237575, return null.
+ if ((pointer > 39419 && pointer < 189000) || (pointer > 1237575))
+ return null;
+
+ // 2. If pointer is 7457, return code point U+E7C7.
+ if (pointer === 7457) return 0xE7C7;
+
+ // 3. Let offset be the last pointer in index gb18030 ranges that
+ // is equal to or less than pointer and let code point offset be
+ // its corresponding code point.
+ var offset = 0;
+ var code_point_offset = 0;
+ var idx = index('gb18030-ranges');
+ var i;
+ for (i = 0; i < idx.length; ++i) {
+ /** @type {!Array.} */
+ var entry = idx[i];
+ if (entry[0] <= pointer) {
+ offset = entry[0];
+ code_point_offset = entry[1];
+ } else {
+ break;
+ }
+ }
+
+ // 4. Return a code point whose value is code point offset +
+ // pointer − offset.
+ return code_point_offset + pointer - offset;
+ }
+
+ /**
+ * @param {number} code_point The |code point| to locate in the gb18030 index.
+ * @return {number} The first pointer corresponding to |code point| in the
+ * gb18030 index.
+ */
+ function indexGB18030RangesPointerFor(code_point) {
+ // 1. If code point is U+E7C7, return pointer 7457.
+ if (code_point === 0xE7C7) return 7457;
+
+ // 2. Let offset be the last code point in index gb18030 ranges
+ // that is equal to or less than code point and let pointer offset
+ // be its corresponding pointer.
+ var offset = 0;
+ var pointer_offset = 0;
+ var idx = index('gb18030-ranges');
+ var i;
+ for (i = 0; i < idx.length; ++i) {
+ /** @type {!Array.} */
+ var entry = idx[i];
+ if (entry[1] <= code_point) {
+ offset = entry[1];
+ pointer_offset = entry[0];
+ } else {
+ break;
+ }
+ }
+
+ // 3. Return a pointer whose value is pointer offset + code point
+ // − offset.
+ return pointer_offset + code_point - offset;
+ }
+
+ /**
+ * @param {number} code_point The |code_point| to search for in the Shift_JIS
+ * index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the Shift_JIS index.
+ */
+ function indexShiftJISPointerFor(code_point) {
+ // 1. Let index be index jis0208 excluding all entries whose
+ // pointer is in the range 8272 to 8835, inclusive.
+ shift_jis_index = shift_jis_index ||
+ index('jis0208').map(function(code_point, pointer) {
+ return inRange(pointer, 8272, 8835) ? null : code_point;
+ });
+ var index_ = shift_jis_index;
+
+ // 2. Return the index pointer for code point in index.
+ return index_.indexOf(code_point);
+ }
+ var shift_jis_index;
+
+ /**
+ * @param {number} code_point The |code_point| to search for in the big5
+ * index.
+ * @return {?number} The code point corresponding to |pointer| in |index|,
+ * or null if |code point| is not in the big5 index.
+ */
+ function indexBig5PointerFor(code_point) {
+ // 1. Let index be index Big5 excluding all entries whose pointer
+ big5_index_no_hkscs = big5_index_no_hkscs ||
+ index('big5').map(function(code_point, pointer) {
+ return (pointer < (0xA1 - 0x81) * 157) ? null : code_point;
+ });
+ var index_ = big5_index_no_hkscs;
+
+ // 2. If code point is U+2550, U+255E, U+2561, U+256A, U+5341, or
+ // U+5345, return the last pointer corresponding to code point in
+ // index.
+ if (code_point === 0x2550 || code_point === 0x255E ||
+ code_point === 0x2561 || code_point === 0x256A ||
+ code_point === 0x5341 || code_point === 0x5345) {
+ return index_.lastIndexOf(code_point);
+ }
+
+ // 3. Return the index pointer for code point in index.
+ return indexPointerFor(code_point, index_);
+ }
+ var big5_index_no_hkscs;
+
+ //
+ // 8. API
+ //
+
+ /** @const */ var DEFAULT_ENCODING = 'utf-8';
+
+ // 8.1 Interface TextDecoder
+
+ /**
+ * @constructor
+ * @param {string=} label The label of the encoding;
+ * defaults to 'utf-8'.
+ * @param {Object=} options
+ */
+ function TextDecoder(label, options) {
+ // Web IDL conventions
+ if (!(this instanceof TextDecoder))
+ throw TypeError('Called as a function. Did you forget \'new\'?');
+ label = label !== undefined ? String(label) : DEFAULT_ENCODING;
+ options = ToDictionary(options);
+
+ // A TextDecoder object has an associated encoding, decoder,
+ // stream, ignore BOM flag (initially unset), BOM seen flag
+ // (initially unset), error mode (initially replacement), and do
+ // not flush flag (initially unset).
+
+ /** @private */
+ this._encoding = null;
+ /** @private @type {?Decoder} */
+ this._decoder = null;
+ /** @private @type {boolean} */
+ this._ignoreBOM = false;
+ /** @private @type {boolean} */
+ this._BOMseen = false;
+ /** @private @type {string} */
+ this._error_mode = 'replacement';
+ /** @private @type {boolean} */
+ this._do_not_flush = false;
+
+
+ // 1. Let encoding be the result of getting an encoding from
+ // label.
+ var encoding = getEncoding(label);
+
+ // 2. If encoding is failure or replacement, throw a RangeError.
+ if (encoding === null || encoding.name === 'replacement')
+ throw RangeError('Unknown encoding: ' + label);
+ if (!decoders[encoding.name]) {
+ throw Error('Decoder not present.' +
+ ' Did you forget to include encoding-indexes.js first?');
+ }
+
+ // 3. Let dec be a new TextDecoder object.
+ var dec = this;
+
+ // 4. Set dec's encoding to encoding.
+ dec._encoding = encoding;
+
+ // 5. If options's fatal member is true, set dec's error mode to
+ // fatal.
+ if (Boolean(options['fatal']))
+ dec._error_mode = 'fatal';
+
+ // 6. If options's ignoreBOM member is true, set dec's ignore BOM
+ // flag.
+ if (Boolean(options['ignoreBOM']))
+ dec._ignoreBOM = true;
+
+ // For pre-ES5 runtimes:
+ if (!Object.defineProperty) {
+ this.encoding = dec._encoding.name.toLowerCase();
+ this.fatal = dec._error_mode === 'fatal';
+ this.ignoreBOM = dec._ignoreBOM;
+ }
+
+ // 7. Return dec.
+ return dec;
+ }
+
+ if (Object.defineProperty) {
+ // The encoding attribute's getter must return encoding's name.
+ Object.defineProperty(TextDecoder.prototype, 'encoding', {
+ /** @this {TextDecoder} */
+ get: function() { return this._encoding.name.toLowerCase(); }
+ });
+
+ // The fatal attribute's getter must return true if error mode
+ // is fatal, and false otherwise.
+ Object.defineProperty(TextDecoder.prototype, 'fatal', {
+ /** @this {TextDecoder} */
+ get: function() { return this._error_mode === 'fatal'; }
+ });
+
+ // The ignoreBOM attribute's getter must return true if ignore
+ // BOM flag is set, and false otherwise.
+ Object.defineProperty(TextDecoder.prototype, 'ignoreBOM', {
+ /** @this {TextDecoder} */
+ get: function() { return this._ignoreBOM; }
+ });
+ }
+
+ /**
+ * @param {BufferSource=} input The buffer of bytes to decode.
+ * @param {Object=} options
+ * @return {string} The decoded string.
+ */
+ TextDecoder.prototype.decode = function decode(input, options) {
+ var bytes;
+ if (typeof input === 'object' && input instanceof ArrayBuffer) {
+ bytes = new Uint8Array(input);
+ } else if (typeof input === 'object' && 'buffer' in input &&
+ input.buffer instanceof ArrayBuffer) {
+ bytes = new Uint8Array(input.buffer,
+ input.byteOffset,
+ input.byteLength);
+ } else {
+ bytes = new Uint8Array(0);
+ }
+
+ options = ToDictionary(options);
+
+ // 1. If the do not flush flag is unset, set decoder to a new
+ // encoding's decoder, set stream to a new stream, and unset the
+ // BOM seen flag.
+ if (!this._do_not_flush) {
+ this._decoder = decoders[this._encoding.name]({
+ fatal: this._error_mode === 'fatal'});
+ this._BOMseen = false;
+ }
+
+ // 2. If options's stream is true, set the do not flush flag, and
+ // unset the do not flush flag otherwise.
+ this._do_not_flush = Boolean(options['stream']);
+
+ // 3. If input is given, push a copy of input to stream.
+ // TODO: Align with spec algorithm - maintain stream on instance.
+ var input_stream = new Stream(bytes);
+
+ // 4. Let output be a new stream.
+ var output = [];
+
+ /** @type {?(number|!Array.)} */
+ var result;
+
+ // 5. While true:
+ while (true) {
+ // 1. Let token be the result of reading from stream.
+ var token = input_stream.read();
+
+ // 2. If token is end-of-stream and the do not flush flag is
+ // set, return output, serialized.
+ // TODO: Align with spec algorithm.
+ if (token === end_of_stream)
+ break;
+
+ // 3. Otherwise, run these subsubsteps:
+
+ // 1. Let result be the result of processing token for decoder,
+ // stream, output, and error mode.
+ result = this._decoder.handler(input_stream, token);
+
+ // 2. If result is finished, return output, serialized.
+ if (result === finished)
+ break;
+
+ if (result !== null) {
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+
+ // 3. Otherwise, if result is error, throw a TypeError.
+ // (Thrown in handler)
+
+ // 4. Otherwise, do nothing.
+ }
+ // TODO: Align with spec algorithm.
+ if (!this._do_not_flush) {
+ do {
+ result = this._decoder.handler(input_stream, input_stream.read());
+ if (result === finished)
+ break;
+ if (result === null)
+ continue;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ } while (!input_stream.endOfStream());
+ this._decoder = null;
+ }
+
+ // A TextDecoder object also has an associated serialize stream
+ // algorithm...
+ /**
+ * @param {!Array.} stream
+ * @return {string}
+ * @this {TextDecoder}
+ */
+ function serializeStream(stream) {
+ // 1. Let token be the result of reading from stream.
+ // (Done in-place on array, rather than as a stream)
+
+ // 2. If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore
+ // BOM flag and BOM seen flag are unset, run these subsubsteps:
+ if (includes(['UTF-8', 'UTF-16LE', 'UTF-16BE'], this._encoding.name) &&
+ !this._ignoreBOM && !this._BOMseen) {
+ if (stream.length > 0 && stream[0] === 0xFEFF) {
+ // 1. If token is U+FEFF, set BOM seen flag.
+ this._BOMseen = true;
+ stream.shift();
+ } else if (stream.length > 0) {
+ // 2. Otherwise, if token is not end-of-stream, set BOM seen
+ // flag and append token to stream.
+ this._BOMseen = true;
+ } else {
+ // 3. Otherwise, if token is not end-of-stream, append token
+ // to output.
+ // (no-op)
+ }
+ }
+ // 4. Otherwise, return output.
+ return codePointsToString(stream);
+ }
+
+ return serializeStream.call(this, output);
+ };
+
+ // 8.2 Interface TextEncoder
+
+ /**
+ * @constructor
+ * @param {string=} label The label of the encoding. NONSTANDARD.
+ * @param {Object=} options NONSTANDARD.
+ */
+ function TextEncoder(label, options) {
+ // Web IDL conventions
+ if (!(this instanceof TextEncoder))
+ throw TypeError('Called as a function. Did you forget \'new\'?');
+ options = ToDictionary(options);
+
+ // A TextEncoder object has an associated encoding and encoder.
+
+ /** @private */
+ this._encoding = null;
+ /** @private @type {?Encoder} */
+ this._encoder = null;
+
+ // Non-standard
+ /** @private @type {boolean} */
+ this._do_not_flush = false;
+ /** @private @type {string} */
+ this._fatal = Boolean(options['fatal']) ? 'fatal' : 'replacement';
+
+ // 1. Let enc be a new TextEncoder object.
+ var enc = this;
+
+ // 2. Set enc's encoding to UTF-8's encoder.
+ if (Boolean(options['NONSTANDARD_allowLegacyEncoding'])) {
+ // NONSTANDARD behavior.
+ label = label !== undefined ? String(label) : DEFAULT_ENCODING;
+ var encoding = getEncoding(label);
+ if (encoding === null || encoding.name === 'replacement')
+ throw RangeError('Unknown encoding: ' + label);
+ if (!encoders[encoding.name]) {
+ throw Error('Encoder not present.' +
+ ' Did you forget to include encoding-indexes.js first?');
+ }
+ enc._encoding = encoding;
+ } else {
+ // Standard behavior.
+ enc._encoding = getEncoding('utf-8');
+
+ if (label !== undefined && 'console' in global) {
+ console.warn('TextEncoder constructor called with encoding label, '
+ + 'which is ignored.');
+ }
+ }
+
+ // For pre-ES5 runtimes:
+ if (!Object.defineProperty)
+ this.encoding = enc._encoding.name.toLowerCase();
+
+ // 3. Return enc.
+ return enc;
+ }
+
+ if (Object.defineProperty) {
+ // The encoding attribute's getter must return encoding's name.
+ Object.defineProperty(TextEncoder.prototype, 'encoding', {
+ /** @this {TextEncoder} */
+ get: function() { return this._encoding.name.toLowerCase(); }
+ });
+ }
+
+ /**
+ * @param {string=} opt_string The string to encode.
+ * @param {Object=} options
+ * @return {!Uint8Array} Encoded bytes, as a Uint8Array.
+ */
+ TextEncoder.prototype.encode = function encode(opt_string, options) {
+ opt_string = opt_string === undefined ? '' : String(opt_string);
+ options = ToDictionary(options);
+
+ // NOTE: This option is nonstandard. None of the encodings
+ // permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
+ // the input is a USVString so streaming is not necessary.
+ if (!this._do_not_flush)
+ this._encoder = encoders[this._encoding.name]({
+ fatal: this._fatal === 'fatal'});
+ this._do_not_flush = Boolean(options['stream']);
+
+ // 1. Convert input to a stream.
+ var input = new Stream(stringToCodePoints(opt_string));
+
+ // 2. Let output be a new stream
+ var output = [];
+
+ /** @type {?(number|!Array.)} */
+ var result;
+ // 3. While true, run these substeps:
+ while (true) {
+ // 1. Let token be the result of reading from input.
+ var token = input.read();
+ if (token === end_of_stream)
+ break;
+ // 2. Let result be the result of processing token for encoder,
+ // input, output.
+ result = this._encoder.handler(input, token);
+ if (result === finished)
+ break;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+ // TODO: Align with spec algorithm.
+ if (!this._do_not_flush) {
+ while (true) {
+ result = this._encoder.handler(input, input.read());
+ if (result === finished)
+ break;
+ if (Array.isArray(result))
+ output.push.apply(output, /**@type {!Array.}*/(result));
+ else
+ output.push(result);
+ }
+ this._encoder = null;
+ }
+ // 3. If result is finished, convert output into a byte sequence,
+ // and then return a Uint8Array object wrapping an ArrayBuffer
+ // containing output.
+ return new Uint8Array(output);
+ };
+
+
+ //
+ // 9. The encoding
+ //
+
+ // 9.1 utf-8
+
+ // 9.1.1 utf-8 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function UTF8Decoder(options) {
+ var fatal = options.fatal;
+
+ // utf-8's decoder's has an associated utf-8 code point, utf-8
+ // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8
+ // lower boundary (initially 0x80), and a utf-8 upper boundary
+ // (initially 0xBF).
+ var /** @type {number} */ utf8_code_point = 0,
+ /** @type {number} */ utf8_bytes_seen = 0,
+ /** @type {number} */ utf8_bytes_needed = 0,
+ /** @type {number} */ utf8_lower_boundary = 0x80,
+ /** @type {number} */ utf8_upper_boundary = 0xBF;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,
+ // set utf-8 bytes needed to 0 and return error.
+ if (bite === end_of_stream && utf8_bytes_needed !== 0) {
+ utf8_bytes_needed = 0;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 3. If utf-8 bytes needed is 0, based on byte:
+ if (utf8_bytes_needed === 0) {
+
+ // 0x00 to 0x7F
+ if (inRange(bite, 0x00, 0x7F)) {
+ // Return a code point whose value is byte.
+ return bite;
+ }
+
+ // 0xC2 to 0xDF
+ else if (inRange(bite, 0xC2, 0xDF)) {
+ // 1. Set utf-8 bytes needed to 1.
+ utf8_bytes_needed = 1;
+
+ // 2. Set UTF-8 code point to byte & 0x1F.
+ utf8_code_point = bite & 0x1F;
+ }
+
+ // 0xE0 to 0xEF
+ else if (inRange(bite, 0xE0, 0xEF)) {
+ // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.
+ if (bite === 0xE0)
+ utf8_lower_boundary = 0xA0;
+ // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.
+ if (bite === 0xED)
+ utf8_upper_boundary = 0x9F;
+ // 3. Set utf-8 bytes needed to 2.
+ utf8_bytes_needed = 2;
+ // 4. Set UTF-8 code point to byte & 0xF.
+ utf8_code_point = bite & 0xF;
+ }
+
+ // 0xF0 to 0xF4
+ else if (inRange(bite, 0xF0, 0xF4)) {
+ // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.
+ if (bite === 0xF0)
+ utf8_lower_boundary = 0x90;
+ // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.
+ if (bite === 0xF4)
+ utf8_upper_boundary = 0x8F;
+ // 3. Set utf-8 bytes needed to 3.
+ utf8_bytes_needed = 3;
+ // 4. Set UTF-8 code point to byte & 0x7.
+ utf8_code_point = bite & 0x7;
+ }
+
+ // Otherwise
+ else {
+ // Return error.
+ return decoderError(fatal);
+ }
+
+ // Return continue.
+ return null;
+ }
+
+ // 4. If byte is not in the range utf-8 lower boundary to utf-8
+ // upper boundary, inclusive, run these substeps:
+ if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {
+
+ // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8
+ // bytes seen to 0, set utf-8 lower boundary to 0x80, and set
+ // utf-8 upper boundary to 0xBF.
+ utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
+ utf8_lower_boundary = 0x80;
+ utf8_upper_boundary = 0xBF;
+
+ // 2. Prepend byte to stream.
+ stream.prepend(bite);
+
+ // 3. Return error.
+ return decoderError(fatal);
+ }
+
+ // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary
+ // to 0xBF.
+ utf8_lower_boundary = 0x80;
+ utf8_upper_boundary = 0xBF;
+
+ // 6. Set UTF-8 code point to (UTF-8 code point << 6) | (byte &
+ // 0x3F)
+ utf8_code_point = (utf8_code_point << 6) | (bite & 0x3F);
+
+ // 7. Increase utf-8 bytes seen by one.
+ utf8_bytes_seen += 1;
+
+ // 8. If utf-8 bytes seen is not equal to utf-8 bytes needed,
+ // continue.
+ if (utf8_bytes_seen !== utf8_bytes_needed)
+ return null;
+
+ // 9. Let code point be utf-8 code point.
+ var code_point = utf8_code_point;
+
+ // 10. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes
+ // seen to 0.
+ utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
+
+ // 11. Return a code point whose value is code point.
+ return code_point;
+ };
+ }
+
+ // 9.1.2 utf-8 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function UTF8Encoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Set count and offset based on the range code point is in:
+ var count, offset;
+ // U+0080 to U+07FF, inclusive:
+ if (inRange(code_point, 0x0080, 0x07FF)) {
+ // 1 and 0xC0
+ count = 1;
+ offset = 0xC0;
+ }
+ // U+0800 to U+FFFF, inclusive:
+ else if (inRange(code_point, 0x0800, 0xFFFF)) {
+ // 2 and 0xE0
+ count = 2;
+ offset = 0xE0;
+ }
+ // U+10000 to U+10FFFF, inclusive:
+ else if (inRange(code_point, 0x10000, 0x10FFFF)) {
+ // 3 and 0xF0
+ count = 3;
+ offset = 0xF0;
+ }
+
+ // 4. Let bytes be a byte sequence whose first byte is (code
+ // point >> (6 × count)) + offset.
+ var bytes = [(code_point >> (6 * count)) + offset];
+
+ // 5. Run these substeps while count is greater than 0:
+ while (count > 0) {
+
+ // 1. Set temp to code point >> (6 × (count − 1)).
+ var temp = code_point >> (6 * (count - 1));
+
+ // 2. Append to bytes 0x80 | (temp & 0x3F).
+ bytes.push(0x80 | (temp & 0x3F));
+
+ // 3. Decrease count by one.
+ count -= 1;
+ }
+
+ // 6. Return bytes bytes, in order.
+ return bytes;
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-8'] = function(options) {
+ return new UTF8Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-8'] = function(options) {
+ return new UTF8Decoder(options);
+ };
+
+ //
+ // 10. Legacy single-byte encodings
+ //
+
+ // 10.1 single-byte decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {!Array.} index The encoding index.
+ * @param {{fatal: boolean}} options
+ */
+ function SingleByteDecoder(index, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 2. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 3. Let code point be the index code point for byte − 0x80 in
+ // index single-byte.
+ var code_point = index[bite - 0x80];
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ };
+ }
+
+ // 10.2 single-byte encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {!Array.} index The encoding index.
+ * @param {{fatal: boolean}} options
+ */
+ function SingleByteEncoder(index, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index pointer for code point in index
+ // single-byte.
+ var pointer = indexPointerFor(code_point, index);
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ encoderError(code_point);
+
+ // 5. Return a byte whose value is pointer + 0x80.
+ return pointer + 0x80;
+ };
+ }
+
+ (function() {
+ if (!('encoding-indexes' in global))
+ return;
+ encodings.forEach(function(category) {
+ if (category.heading !== 'Legacy single-byte encodings')
+ return;
+ category.encodings.forEach(function(encoding) {
+ var name = encoding.name;
+ var idx = index(name.toLowerCase());
+ /** @param {{fatal: boolean}} options */
+ decoders[name] = function(options) {
+ return new SingleByteDecoder(idx, options);
+ };
+ /** @param {{fatal: boolean}} options */
+ encoders[name] = function(options) {
+ return new SingleByteEncoder(idx, options);
+ };
+ });
+ });
+ }());
+
+ //
+ // 11. Legacy multi-byte Chinese (simplified) encodings
+ //
+
+ // 11.1 gbk
+
+ // 11.1.1 gbk decoder
+ // gbk's decoder is gb18030's decoder.
+ /** @param {{fatal: boolean}} options */
+ decoders['GBK'] = function(options) {
+ return new GB18030Decoder(options);
+ };
+
+ // 11.1.2 gbk encoder
+ // gbk's encoder is gb18030's encoder with its gbk flag set.
+ /** @param {{fatal: boolean}} options */
+ encoders['GBK'] = function(options) {
+ return new GB18030Encoder(options, true);
+ };
+
+ // 11.2 gb18030
+
+ // 11.2.1 gb18030 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function GB18030Decoder(options) {
+ var fatal = options.fatal;
+ // gb18030's decoder has an associated gb18030 first, gb18030
+ // second, and gb18030 third (all initially 0x00).
+ var /** @type {number} */ gb18030_first = 0x00,
+ /** @type {number} */ gb18030_second = 0x00,
+ /** @type {number} */ gb18030_third = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and gb18030 first, gb18030
+ // second, and gb18030 third are 0x00, return finished.
+ if (bite === end_of_stream && gb18030_first === 0x00 &&
+ gb18030_second === 0x00 && gb18030_third === 0x00) {
+ return finished;
+ }
+ // 2. If byte is end-of-stream, and gb18030 first, gb18030
+ // second, or gb18030 third is not 0x00, set gb18030 first,
+ // gb18030 second, and gb18030 third to 0x00, and return error.
+ if (bite === end_of_stream &&
+ (gb18030_first !== 0x00 || gb18030_second !== 0x00 ||
+ gb18030_third !== 0x00)) {
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ gb18030_third = 0x00;
+ decoderError(fatal);
+ }
+ var code_point;
+ // 3. If gb18030 third is not 0x00, run these substeps:
+ if (gb18030_third !== 0x00) {
+ // 1. Let code point be null.
+ code_point = null;
+ // 2. If byte is in the range 0x30 to 0x39, inclusive, set
+ // code point to the index gb18030 ranges code point for
+ // (((gb18030 first − 0x81) × 10 + gb18030 second − 0x30) ×
+ // 126 + gb18030 third − 0x81) × 10 + byte − 0x30.
+ if (inRange(bite, 0x30, 0x39)) {
+ code_point = indexGB18030RangesCodePointFor(
+ (((gb18030_first - 0x81) * 10 + gb18030_second - 0x30) * 126 +
+ gb18030_third - 0x81) * 10 + bite - 0x30);
+ }
+
+ // 3. Let buffer be a byte sequence consisting of gb18030
+ // second, gb18030 third, and byte, in order.
+ var buffer = [gb18030_second, gb18030_third, bite];
+
+ // 4. Set gb18030 first, gb18030 second, and gb18030 third to
+ // 0x00.
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ gb18030_third = 0x00;
+
+ // 5. If code point is null, prepend buffer to stream and
+ // return error.
+ if (code_point === null) {
+ stream.prepend(buffer);
+ return decoderError(fatal);
+ }
+
+ // 6. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If gb18030 second is not 0x00, run these substeps:
+ if (gb18030_second !== 0x00) {
+
+ // 1. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // gb18030 third to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ gb18030_third = bite;
+ return null;
+ }
+
+ // 2. Prepend gb18030 second followed by byte to stream, set
+ // gb18030 first and gb18030 second to 0x00, and return error.
+ stream.prepend([gb18030_second, bite]);
+ gb18030_first = 0x00;
+ gb18030_second = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 5. If gb18030 first is not 0x00, run these substeps:
+ if (gb18030_first !== 0x00) {
+
+ // 1. If byte is in the range 0x30 to 0x39, inclusive, set
+ // gb18030 second to byte and return continue.
+ if (inRange(bite, 0x30, 0x39)) {
+ gb18030_second = bite;
+ return null;
+ }
+
+ // 2. Let lead be gb18030 first, let pointer be null, and set
+ // gb18030 first to 0x00.
+ var lead = gb18030_first;
+ var pointer = null;
+ gb18030_first = 0x00;
+
+ // 3. Let offset be 0x40 if byte is less than 0x7F and 0x41
+ // otherwise.
+ var offset = bite < 0x7F ? 0x40 : 0x41;
+
+ // 4. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
+ // to 0xFE, inclusive, set pointer to (lead − 0x81) × 190 +
+ // (byte − offset).
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFE))
+ pointer = (lead - 0x81) * 190 + (bite - offset);
+
+ // 5. Let code point be null if pointer is null and the index
+ // code point for pointer in index gb18030 otherwise.
+ code_point = pointer === null ? null :
+ indexCodePointFor(pointer, index('gb18030'));
+
+ // 6. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 7. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 8. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 6. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 7. If byte is 0x80, return code point U+20AC.
+ if (bite === 0x80)
+ return 0x20AC;
+
+ // 8. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // gb18030 first to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ gb18030_first = bite;
+ return null;
+ }
+
+ // 9. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 11.2.2 gb18030 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ * @param {boolean=} gbk_flag
+ */
+ function GB18030Encoder(options, gbk_flag) {
+ var fatal = options.fatal;
+ // gb18030's decoder has an associated gbk flag (initially unset).
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is U+E5E5, return error with code point.
+ if (code_point === 0xE5E5)
+ return encoderError(code_point);
+
+ // 4. If the gbk flag is set and code point is U+20AC, return
+ // byte 0x80.
+ if (gbk_flag && code_point === 0x20AC)
+ return 0x80;
+
+ // 5. Let pointer be the index pointer for code point in index
+ // gb18030.
+ var pointer = indexPointerFor(code_point, index('gb18030'));
+
+ // 6. If pointer is not null, run these substeps:
+ if (pointer !== null) {
+
+ // 1. Let lead be floor(pointer / 190) + 0x81.
+ var lead = floor(pointer / 190) + 0x81;
+
+ // 2. Let trail be pointer % 190.
+ var trail = pointer % 190;
+
+ // 3. Let offset be 0x40 if trail is less than 0x3F and 0x41 otherwise.
+ var offset = trail < 0x3F ? 0x40 : 0x41;
+
+ // 4. Return two bytes whose values are lead and trail + offset.
+ return [lead, trail + offset];
+ }
+
+ // 7. If gbk flag is set, return error with code point.
+ if (gbk_flag)
+ return encoderError(code_point);
+
+ // 8. Set pointer to the index gb18030 ranges pointer for code
+ // point.
+ pointer = indexGB18030RangesPointerFor(code_point);
+
+ // 9. Let byte1 be floor(pointer / 10 / 126 / 10).
+ var byte1 = floor(pointer / 10 / 126 / 10);
+
+ // 10. Set pointer to pointer − byte1 × 10 × 126 × 10.
+ pointer = pointer - byte1 * 10 * 126 * 10;
+
+ // 11. Let byte2 be floor(pointer / 10 / 126).
+ var byte2 = floor(pointer / 10 / 126);
+
+ // 12. Set pointer to pointer − byte2 × 10 × 126.
+ pointer = pointer - byte2 * 10 * 126;
+
+ // 13. Let byte3 be floor(pointer / 10).
+ var byte3 = floor(pointer / 10);
+
+ // 14. Let byte4 be pointer − byte3 × 10.
+ var byte4 = pointer - byte3 * 10;
+
+ // 15. Return four bytes whose values are byte1 + 0x81, byte2 +
+ // 0x30, byte3 + 0x81, byte4 + 0x30.
+ return [byte1 + 0x81,
+ byte2 + 0x30,
+ byte3 + 0x81,
+ byte4 + 0x30];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['gb18030'] = function(options) {
+ return new GB18030Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['gb18030'] = function(options) {
+ return new GB18030Decoder(options);
+ };
+
+
+ //
+ // 12. Legacy multi-byte Chinese (traditional) encodings
+ //
+
+ // 12.1 Big5
+
+ // 12.1.1 Big5 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function Big5Decoder(options) {
+ var fatal = options.fatal;
+ // Big5's decoder has an associated Big5 lead (initially 0x00).
+ var /** @type {number} */ Big5_lead = 0x00;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and Big5 lead is not 0x00, set
+ // Big5 lead to 0x00 and return error.
+ if (bite === end_of_stream && Big5_lead !== 0x00) {
+ Big5_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and Big5 lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && Big5_lead === 0x00)
+ return finished;
+
+ // 3. If Big5 lead is not 0x00, let lead be Big5 lead, let
+ // pointer be null, set Big5 lead to 0x00, and then run these
+ // substeps:
+ if (Big5_lead !== 0x00) {
+ var lead = Big5_lead;
+ var pointer = null;
+ Big5_lead = 0x00;
+
+ // 1. Let offset be 0x40 if byte is less than 0x7F and 0x62
+ // otherwise.
+ var offset = bite < 0x7F ? 0x40 : 0x62;
+
+ // 2. If byte is in the range 0x40 to 0x7E, inclusive, or 0xA1
+ // to 0xFE, inclusive, set pointer to (lead − 0x81) × 157 +
+ // (byte − offset).
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0xA1, 0xFE))
+ pointer = (lead - 0x81) * 157 + (bite - offset);
+
+ // 3. If there is a row in the table below whose first column
+ // is pointer, return the two code points listed in its second
+ // column
+ // Pointer | Code points
+ // --------+--------------
+ // 1133 | U+00CA U+0304
+ // 1135 | U+00CA U+030C
+ // 1164 | U+00EA U+0304
+ // 1166 | U+00EA U+030C
+ switch (pointer) {
+ case 1133: return [0x00CA, 0x0304];
+ case 1135: return [0x00CA, 0x030C];
+ case 1164: return [0x00EA, 0x0304];
+ case 1166: return [0x00EA, 0x030C];
+ }
+
+ // 4. Let code point be null if pointer is null and the index
+ // code point for pointer in index Big5 otherwise.
+ var code_point = (pointer === null) ? null :
+ indexCodePointFor(pointer, index('big5'));
+
+ // 5. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 6. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 7. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 5. If byte is in the range 0x81 to 0xFE, inclusive, set Big5
+ // lead to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ Big5_lead = bite;
+ return null;
+ }
+
+ // 6. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 12.1.2 Big5 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function Big5Encoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index Big5 pointer for code point.
+ var pointer = indexBig5PointerFor(code_point);
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 5. Let lead be floor(pointer / 157) + 0x81.
+ var lead = floor(pointer / 157) + 0x81;
+
+ // 6. If lead is less than 0xA1, return error with code point.
+ if (lead < 0xA1)
+ return encoderError(code_point);
+
+ // 7. Let trail be pointer % 157.
+ var trail = pointer % 157;
+
+ // 8. Let offset be 0x40 if trail is less than 0x3F and 0x62
+ // otherwise.
+ var offset = trail < 0x3F ? 0x40 : 0x62;
+
+ // Return two bytes whose values are lead and trail + offset.
+ return [lead, trail + offset];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['Big5'] = function(options) {
+ return new Big5Encoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['Big5'] = function(options) {
+ return new Big5Decoder(options);
+ };
+
+
+ //
+ // 13. Legacy multi-byte Japanese encodings
+ //
+
+ // 13.1 euc-jp
+
+ // 13.1.1 euc-jp decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCJPDecoder(options) {
+ var fatal = options.fatal;
+
+ // euc-jp's decoder has an associated euc-jp jis0212 flag
+ // (initially unset) and euc-jp lead (initially 0x00).
+ var /** @type {boolean} */ eucjp_jis0212_flag = false,
+ /** @type {number} */ eucjp_lead = 0x00;
+
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and euc-jp lead is not 0x00, set
+ // euc-jp lead to 0x00, and return error.
+ if (bite === end_of_stream && eucjp_lead !== 0x00) {
+ eucjp_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and euc-jp lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && eucjp_lead === 0x00)
+ return finished;
+
+ // 3. If euc-jp lead is 0x8E and byte is in the range 0xA1 to
+ // 0xDF, inclusive, set euc-jp lead to 0x00 and return a code
+ // point whose value is 0xFF61 − 0xA1 + byte.
+ if (eucjp_lead === 0x8E && inRange(bite, 0xA1, 0xDF)) {
+ eucjp_lead = 0x00;
+ return 0xFF61 - 0xA1 + bite;
+ }
+
+ // 4. If euc-jp lead is 0x8F and byte is in the range 0xA1 to
+ // 0xFE, inclusive, set the euc-jp jis0212 flag, set euc-jp lead
+ // to byte, and return continue.
+ if (eucjp_lead === 0x8F && inRange(bite, 0xA1, 0xFE)) {
+ eucjp_jis0212_flag = true;
+ eucjp_lead = bite;
+ return null;
+ }
+
+ // 5. If euc-jp lead is not 0x00, let lead be euc-jp lead, set
+ // euc-jp lead to 0x00, and run these substeps:
+ if (eucjp_lead !== 0x00) {
+ var lead = eucjp_lead;
+ eucjp_lead = 0x00;
+
+ // 1. Let code point be null.
+ var code_point = null;
+
+ // 2. If lead and byte are both in the range 0xA1 to 0xFE,
+ // inclusive, set code point to the index code point for (lead
+ // − 0xA1) × 94 + byte − 0xA1 in index jis0208 if the euc-jp
+ // jis0212 flag is unset and in index jis0212 otherwise.
+ if (inRange(lead, 0xA1, 0xFE) && inRange(bite, 0xA1, 0xFE)) {
+ code_point = indexCodePointFor(
+ (lead - 0xA1) * 94 + (bite - 0xA1),
+ index(!eucjp_jis0212_flag ? 'jis0208' : 'jis0212'));
+ }
+
+ // 3. Unset the euc-jp jis0212 flag.
+ eucjp_jis0212_flag = false;
+
+ // 4. If byte is not in the range 0xA1 to 0xFE, inclusive,
+ // prepend byte to stream.
+ if (!inRange(bite, 0xA1, 0xFE))
+ stream.prepend(bite);
+
+ // 5. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 6. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 6. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 7. If byte is 0x8E, 0x8F, or in the range 0xA1 to 0xFE,
+ // inclusive, set euc-jp lead to byte and return continue.
+ if (bite === 0x8E || bite === 0x8F || inRange(bite, 0xA1, 0xFE)) {
+ eucjp_lead = bite;
+ return null;
+ }
+
+ // 8. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 13.1.2 euc-jp encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCJPEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 4. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+
+ // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
+ // return two bytes whose values are 0x8E and code point −
+ // 0xFF61 + 0xA1.
+ if (inRange(code_point, 0xFF61, 0xFF9F))
+ return [0x8E, code_point - 0xFF61 + 0xA1];
+
+ // 6. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 7. Let pointer be the index pointer for code point in index
+ // jis0208.
+ var pointer = indexPointerFor(code_point, index('jis0208'));
+
+ // 8. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 9. Let lead be floor(pointer / 94) + 0xA1.
+ var lead = floor(pointer / 94) + 0xA1;
+
+ // 10. Let trail be pointer % 94 + 0xA1.
+ var trail = pointer % 94 + 0xA1;
+
+ // 11. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['EUC-JP'] = function(options) {
+ return new EUCJPEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['EUC-JP'] = function(options) {
+ return new EUCJPDecoder(options);
+ };
+
+ // 13.2 iso-2022-jp
+
+ // 13.2.1 iso-2022-jp decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ISO2022JPDecoder(options) {
+ var fatal = options.fatal;
+ /** @enum */
+ var states = {
+ ASCII: 0,
+ Roman: 1,
+ Katakana: 2,
+ LeadByte: 3,
+ TrailByte: 4,
+ EscapeStart: 5,
+ Escape: 6
+ };
+ // iso-2022-jp's decoder has an associated iso-2022-jp decoder
+ // state (initially ASCII), iso-2022-jp decoder output state
+ // (initially ASCII), iso-2022-jp lead (initially 0x00), and
+ // iso-2022-jp output flag (initially unset).
+ var /** @type {number} */ iso2022jp_decoder_state = states.ASCII,
+ /** @type {number} */ iso2022jp_decoder_output_state = states.ASCII,
+ /** @type {number} */ iso2022jp_lead = 0x00,
+ /** @type {boolean} */ iso2022jp_output_flag = false;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // switching on iso-2022-jp decoder state:
+ switch (iso2022jp_decoder_state) {
+ default:
+ case states.ASCII:
+ // ASCII
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x00 to 0x7F, excluding 0x0E, 0x0F, and 0x1B
+ if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E
+ && bite !== 0x0F && bite !== 0x1B) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is byte.
+ iso2022jp_output_flag = false;
+ return bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.Roman:
+ // Roman
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x5C
+ if (bite === 0x5C) {
+ // Unset the iso-2022-jp output flag and return code point
+ // U+00A5.
+ iso2022jp_output_flag = false;
+ return 0x00A5;
+ }
+
+ // 0x7E
+ if (bite === 0x7E) {
+ // Unset the iso-2022-jp output flag and return code point
+ // U+203E.
+ iso2022jp_output_flag = false;
+ return 0x203E;
+ }
+
+ // 0x00 to 0x7F, excluding 0x0E, 0x0F, 0x1B, 0x5C, and 0x7E
+ if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E && bite !== 0x0F
+ && bite !== 0x1B && bite !== 0x5C && bite !== 0x7E) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is byte.
+ iso2022jp_output_flag = false;
+ return bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.Katakana:
+ // Katakana
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x21 to 0x5F
+ if (inRange(bite, 0x21, 0x5F)) {
+ // Unset the iso-2022-jp output flag and return a code point
+ // whose value is 0xFF61 − 0x21 + byte.
+ iso2022jp_output_flag = false;
+ return 0xFF61 - 0x21 + bite;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.LeadByte:
+ // Lead byte
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return null;
+ }
+
+ // 0x21 to 0x7E
+ if (inRange(bite, 0x21, 0x7E)) {
+ // Unset the iso-2022-jp output flag, set iso-2022-jp lead
+ // to byte, iso-2022-jp decoder state to trail byte, and
+ // return continue.
+ iso2022jp_output_flag = false;
+ iso2022jp_lead = bite;
+ iso2022jp_decoder_state = states.TrailByte;
+ return null;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Return finished.
+ return finished;
+ }
+
+ // Otherwise
+ // Unset the iso-2022-jp output flag and return error.
+ iso2022jp_output_flag = false;
+ return decoderError(fatal);
+
+ case states.TrailByte:
+ // Trail byte
+ // Based on byte:
+
+ // 0x1B
+ if (bite === 0x1B) {
+ // Set iso-2022-jp decoder state to escape start and return
+ // continue.
+ iso2022jp_decoder_state = states.EscapeStart;
+ return decoderError(fatal);
+ }
+
+ // 0x21 to 0x7E
+ if (inRange(bite, 0x21, 0x7E)) {
+ // 1. Set the iso-2022-jp decoder state to lead byte.
+ iso2022jp_decoder_state = states.LeadByte;
+
+ // 2. Let pointer be (iso-2022-jp lead − 0x21) × 94 + byte − 0x21.
+ var pointer = (iso2022jp_lead - 0x21) * 94 + bite - 0x21;
+
+ // 3. Let code point be the index code point for pointer in
+ // index jis0208.
+ var code_point = indexCodePointFor(pointer, index('jis0208'));
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // end-of-stream
+ if (bite === end_of_stream) {
+ // Set the iso-2022-jp decoder state to lead byte, prepend
+ // byte to stream, and return error.
+ iso2022jp_decoder_state = states.LeadByte;
+ stream.prepend(bite);
+ return decoderError(fatal);
+ }
+
+ // Otherwise
+ // Set iso-2022-jp decoder state to lead byte and return
+ // error.
+ iso2022jp_decoder_state = states.LeadByte;
+ return decoderError(fatal);
+
+ case states.EscapeStart:
+ // Escape start
+
+ // 1. If byte is either 0x24 or 0x28, set iso-2022-jp lead to
+ // byte, iso-2022-jp decoder state to escape, and return
+ // continue.
+ if (bite === 0x24 || bite === 0x28) {
+ iso2022jp_lead = bite;
+ iso2022jp_decoder_state = states.Escape;
+ return null;
+ }
+
+ // 2. Prepend byte to stream.
+ stream.prepend(bite);
+
+ // 3. Unset the iso-2022-jp output flag, set iso-2022-jp
+ // decoder state to iso-2022-jp decoder output state, and
+ // return error.
+ iso2022jp_output_flag = false;
+ iso2022jp_decoder_state = iso2022jp_decoder_output_state;
+ return decoderError(fatal);
+
+ case states.Escape:
+ // Escape
+
+ // 1. Let lead be iso-2022-jp lead and set iso-2022-jp lead to
+ // 0x00.
+ var lead = iso2022jp_lead;
+ iso2022jp_lead = 0x00;
+
+ // 2. Let state be null.
+ var state = null;
+
+ // 3. If lead is 0x28 and byte is 0x42, set state to ASCII.
+ if (lead === 0x28 && bite === 0x42)
+ state = states.ASCII;
+
+ // 4. If lead is 0x28 and byte is 0x4A, set state to Roman.
+ if (lead === 0x28 && bite === 0x4A)
+ state = states.Roman;
+
+ // 5. If lead is 0x28 and byte is 0x49, set state to Katakana.
+ if (lead === 0x28 && bite === 0x49)
+ state = states.Katakana;
+
+ // 6. If lead is 0x24 and byte is either 0x40 or 0x42, set
+ // state to lead byte.
+ if (lead === 0x24 && (bite === 0x40 || bite === 0x42))
+ state = states.LeadByte;
+
+ // 7. If state is non-null, run these substeps:
+ if (state !== null) {
+ // 1. Set iso-2022-jp decoder state and iso-2022-jp decoder
+ // output state to states.
+ iso2022jp_decoder_state = iso2022jp_decoder_state = state;
+
+ // 2. Let output flag be the iso-2022-jp output flag.
+ var output_flag = iso2022jp_output_flag;
+
+ // 3. Set the iso-2022-jp output flag.
+ iso2022jp_output_flag = true;
+
+ // 4. Return continue, if output flag is unset, and error
+ // otherwise.
+ return !output_flag ? null : decoderError(fatal);
+ }
+
+ // 8. Prepend lead and byte to stream.
+ stream.prepend([lead, bite]);
+
+ // 9. Unset the iso-2022-jp output flag, set iso-2022-jp
+ // decoder state to iso-2022-jp decoder output state and
+ // return error.
+ iso2022jp_output_flag = false;
+ iso2022jp_decoder_state = iso2022jp_decoder_output_state;
+ return decoderError(fatal);
+ }
+ };
+ }
+
+ // 13.2.2 iso-2022-jp encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ISO2022JPEncoder(options) {
+ var fatal = options.fatal;
+ // iso-2022-jp's encoder has an associated iso-2022-jp encoder
+ // state which is one of ASCII, Roman, and jis0208 (initially
+ // ASCII).
+ /** @enum */
+ var states = {
+ ASCII: 0,
+ Roman: 1,
+ jis0208: 2
+ };
+ var /** @type {number} */ iso2022jp_state = states.ASCII;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream and iso-2022-jp encoder
+ // state is not ASCII, prepend code point to stream, set
+ // iso-2022-jp encoder state to ASCII, and return three bytes
+ // 0x1B 0x28 0x42.
+ if (code_point === end_of_stream &&
+ iso2022jp_state !== states.ASCII) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.ASCII;
+ return [0x1B, 0x28, 0x42];
+ }
+
+ // 2. If code point is end-of-stream and iso-2022-jp encoder
+ // state is ASCII, return finished.
+ if (code_point === end_of_stream && iso2022jp_state === states.ASCII)
+ return finished;
+
+ // 3. If ISO-2022-JP encoder state is ASCII or Roman, and code
+ // point is U+000E, U+000F, or U+001B, return error with U+FFFD.
+ if ((iso2022jp_state === states.ASCII ||
+ iso2022jp_state === states.Roman) &&
+ (code_point === 0x000E || code_point === 0x000F ||
+ code_point === 0x001B)) {
+ return encoderError(0xFFFD);
+ }
+
+ // 4. If iso-2022-jp encoder state is ASCII and code point is an
+ // ASCII code point, return a byte whose value is code point.
+ if (iso2022jp_state === states.ASCII &&
+ isASCIICodePoint(code_point))
+ return code_point;
+
+ // 5. If iso-2022-jp encoder state is Roman and code point is an
+ // ASCII code point, excluding U+005C and U+007E, or is U+00A5
+ // or U+203E, run these substeps:
+ if (iso2022jp_state === states.Roman &&
+ ((isASCIICodePoint(code_point) &&
+ code_point !== 0x005C && code_point !== 0x007E) ||
+ (code_point == 0x00A5 || code_point == 0x203E))) {
+
+ // 1. If code point is an ASCII code point, return a byte
+ // whose value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 2. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 3. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+ }
+
+ // 6. If code point is an ASCII code point, and iso-2022-jp
+ // encoder state is not ASCII, prepend code point to stream, set
+ // iso-2022-jp encoder state to ASCII, and return three bytes
+ // 0x1B 0x28 0x42.
+ if (isASCIICodePoint(code_point) &&
+ iso2022jp_state !== states.ASCII) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.ASCII;
+ return [0x1B, 0x28, 0x42];
+ }
+
+ // 7. If code point is either U+00A5 or U+203E, and iso-2022-jp
+ // encoder state is not Roman, prepend code point to stream, set
+ // iso-2022-jp encoder state to Roman, and return three bytes
+ // 0x1B 0x28 0x4A.
+ if ((code_point === 0x00A5 || code_point === 0x203E) &&
+ iso2022jp_state !== states.Roman) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.Roman;
+ return [0x1B, 0x28, 0x4A];
+ }
+
+ // 8. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 9. Let pointer be the index pointer for code point in index
+ // jis0208.
+ var pointer = indexPointerFor(code_point, index('jis0208'));
+
+ // 10. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 11. If iso-2022-jp encoder state is not jis0208, prepend code
+ // point to stream, set iso-2022-jp encoder state to jis0208,
+ // and return three bytes 0x1B 0x24 0x42.
+ if (iso2022jp_state !== states.jis0208) {
+ stream.prepend(code_point);
+ iso2022jp_state = states.jis0208;
+ return [0x1B, 0x24, 0x42];
+ }
+
+ // 12. Let lead be floor(pointer / 94) + 0x21.
+ var lead = floor(pointer / 94) + 0x21;
+
+ // 13. Let trail be pointer % 94 + 0x21.
+ var trail = pointer % 94 + 0x21;
+
+ // 14. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['ISO-2022-JP'] = function(options) {
+ return new ISO2022JPEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['ISO-2022-JP'] = function(options) {
+ return new ISO2022JPDecoder(options);
+ };
+
+ // 13.3 Shift_JIS
+
+ // 13.3.1 Shift_JIS decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ShiftJISDecoder(options) {
+ var fatal = options.fatal;
+ // Shift_JIS's decoder has an associated Shift_JIS lead (initially
+ // 0x00).
+ var /** @type {number} */ Shift_JIS_lead = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and Shift_JIS lead is not 0x00,
+ // set Shift_JIS lead to 0x00 and return error.
+ if (bite === end_of_stream && Shift_JIS_lead !== 0x00) {
+ Shift_JIS_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and Shift_JIS lead is 0x00,
+ // return finished.
+ if (bite === end_of_stream && Shift_JIS_lead === 0x00)
+ return finished;
+
+ // 3. If Shift_JIS lead is not 0x00, let lead be Shift_JIS lead,
+ // let pointer be null, set Shift_JIS lead to 0x00, and then run
+ // these substeps:
+ if (Shift_JIS_lead !== 0x00) {
+ var lead = Shift_JIS_lead;
+ var pointer = null;
+ Shift_JIS_lead = 0x00;
+
+ // 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
+ // otherwise.
+ var offset = (bite < 0x7F) ? 0x40 : 0x41;
+
+ // 2. Let lead offset be 0x81, if lead is less than 0xA0, and
+ // 0xC1 otherwise.
+ var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;
+
+ // 3. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
+ // to 0xFC, inclusive, set pointer to (lead − lead offset) ×
+ // 188 + byte − offset.
+ if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
+ pointer = (lead - lead_offset) * 188 + bite - offset;
+
+ // 4. If pointer is in the range 8836 to 10715, inclusive,
+ // return a code point whose value is 0xE000 − 8836 + pointer.
+ if (inRange(pointer, 8836, 10715))
+ return 0xE000 - 8836 + pointer;
+
+ // 5. Let code point be null, if pointer is null, and the
+ // index code point for pointer in index jis0208 otherwise.
+ var code_point = (pointer === null) ? null :
+ indexCodePointFor(pointer, index('jis0208'));
+
+ // 6. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (code_point === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 7. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 8. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte or 0x80, return a code point
+ // whose value is byte.
+ if (isASCIIByte(bite) || bite === 0x80)
+ return bite;
+
+ // 5. If byte is in the range 0xA1 to 0xDF, inclusive, return a
+ // code point whose value is 0xFF61 − 0xA1 + byte.
+ if (inRange(bite, 0xA1, 0xDF))
+ return 0xFF61 - 0xA1 + bite;
+
+ // 6. If byte is in the range 0x81 to 0x9F, inclusive, or 0xE0
+ // to 0xFC, inclusive, set Shift_JIS lead to byte and return
+ // continue.
+ if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
+ Shift_JIS_lead = bite;
+ return null;
+ }
+
+ // 7. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 13.3.2 Shift_JIS encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function ShiftJISEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point or U+0080, return a
+ // byte whose value is code point.
+ if (isASCIICodePoint(code_point) || code_point === 0x0080)
+ return code_point;
+
+ // 3. If code point is U+00A5, return byte 0x5C.
+ if (code_point === 0x00A5)
+ return 0x5C;
+
+ // 4. If code point is U+203E, return byte 0x7E.
+ if (code_point === 0x203E)
+ return 0x7E;
+
+ // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
+ // return a byte whose value is code point − 0xFF61 + 0xA1.
+ if (inRange(code_point, 0xFF61, 0xFF9F))
+ return code_point - 0xFF61 + 0xA1;
+
+ // 6. If code point is U+2212, set it to U+FF0D.
+ if (code_point === 0x2212)
+ code_point = 0xFF0D;
+
+ // 7. Let pointer be the index Shift_JIS pointer for code point.
+ var pointer = indexShiftJISPointerFor(code_point);
+
+ // 8. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 9. Let lead be floor(pointer / 188).
+ var lead = floor(pointer / 188);
+
+ // 10. Let lead offset be 0x81, if lead is less than 0x1F, and
+ // 0xC1 otherwise.
+ var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;
+
+ // 11. Let trail be pointer % 188.
+ var trail = pointer % 188;
+
+ // 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
+ // otherwise.
+ var offset = (trail < 0x3F) ? 0x40 : 0x41;
+
+ // 13. Return two bytes whose values are lead + lead offset and
+ // trail + offset.
+ return [lead + lead_offset, trail + offset];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['Shift_JIS'] = function(options) {
+ return new ShiftJISEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['Shift_JIS'] = function(options) {
+ return new ShiftJISDecoder(options);
+ };
+
+ //
+ // 14. Legacy multi-byte Korean encodings
+ //
+
+ // 14.1 euc-kr
+
+ // 14.1.1 euc-kr decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCKRDecoder(options) {
+ var fatal = options.fatal;
+
+ // euc-kr's decoder has an associated euc-kr lead (initially 0x00).
+ var /** @type {number} */ euckr_lead = 0x00;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and euc-kr lead is not 0x00, set
+ // euc-kr lead to 0x00 and return error.
+ if (bite === end_of_stream && euckr_lead !== 0) {
+ euckr_lead = 0x00;
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and euc-kr lead is 0x00, return
+ // finished.
+ if (bite === end_of_stream && euckr_lead === 0)
+ return finished;
+
+ // 3. If euc-kr lead is not 0x00, let lead be euc-kr lead, let
+ // pointer be null, set euc-kr lead to 0x00, and then run these
+ // substeps:
+ if (euckr_lead !== 0x00) {
+ var lead = euckr_lead;
+ var pointer = null;
+ euckr_lead = 0x00;
+
+ // 1. If byte is in the range 0x41 to 0xFE, inclusive, set
+ // pointer to (lead − 0x81) × 190 + (byte − 0x41).
+ if (inRange(bite, 0x41, 0xFE))
+ pointer = (lead - 0x81) * 190 + (bite - 0x41);
+
+ // 2. Let code point be null, if pointer is null, and the
+ // index code point for pointer in index euc-kr otherwise.
+ var code_point = (pointer === null)
+ ? null : indexCodePointFor(pointer, index('euc-kr'));
+
+ // 3. If code point is null and byte is an ASCII byte, prepend
+ // byte to stream.
+ if (pointer === null && isASCIIByte(bite))
+ stream.prepend(bite);
+
+ // 4. If code point is null, return error.
+ if (code_point === null)
+ return decoderError(fatal);
+
+ // 5. Return a code point whose value is code point.
+ return code_point;
+ }
+
+ // 4. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 5. If byte is in the range 0x81 to 0xFE, inclusive, set
+ // euc-kr lead to byte and return continue.
+ if (inRange(bite, 0x81, 0xFE)) {
+ euckr_lead = bite;
+ return null;
+ }
+
+ // 6. Return error.
+ return decoderError(fatal);
+ };
+ }
+
+ // 14.1.2 euc-kr encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function EUCKREncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. Let pointer be the index pointer for code point in index
+ // euc-kr.
+ var pointer = indexPointerFor(code_point, index('euc-kr'));
+
+ // 4. If pointer is null, return error with code point.
+ if (pointer === null)
+ return encoderError(code_point);
+
+ // 5. Let lead be floor(pointer / 190) + 0x81.
+ var lead = floor(pointer / 190) + 0x81;
+
+ // 6. Let trail be pointer % 190 + 0x41.
+ var trail = (pointer % 190) + 0x41;
+
+ // 7. Return two bytes whose values are lead and trail.
+ return [lead, trail];
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['EUC-KR'] = function(options) {
+ return new EUCKREncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['EUC-KR'] = function(options) {
+ return new EUCKRDecoder(options);
+ };
+
+
+ //
+ // 15. Legacy miscellaneous encodings
+ //
+
+ // 15.1 replacement
+
+ // Not needed - API throws RangeError
+
+ // 15.2 Common infrastructure for utf-16be and utf-16le
+
+ /**
+ * @param {number} code_unit
+ * @param {boolean} utf16be
+ * @return {!Array.} bytes
+ */
+ function convertCodeUnitToBytes(code_unit, utf16be) {
+ // 1. Let byte1 be code unit >> 8.
+ var byte1 = code_unit >> 8;
+
+ // 2. Let byte2 be code unit & 0x00FF.
+ var byte2 = code_unit & 0x00FF;
+
+ // 3. Then return the bytes in order:
+ // utf-16be flag is set: byte1, then byte2.
+ if (utf16be)
+ return [byte1, byte2];
+ // utf-16be flag is unset: byte2, then byte1.
+ return [byte2, byte1];
+ }
+
+ // 15.2.1 shared utf-16 decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {boolean} utf16_be True if big-endian, false if little-endian.
+ * @param {{fatal: boolean}} options
+ */
+ function UTF16Decoder(utf16_be, options) {
+ var fatal = options.fatal;
+ var /** @type {?number} */ utf16_lead_byte = null,
+ /** @type {?number} */ utf16_lead_surrogate = null;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream and either utf-16 lead byte or
+ // utf-16 lead surrogate is not null, set utf-16 lead byte and
+ // utf-16 lead surrogate to null, and return error.
+ if (bite === end_of_stream && (utf16_lead_byte !== null ||
+ utf16_lead_surrogate !== null)) {
+ return decoderError(fatal);
+ }
+
+ // 2. If byte is end-of-stream and utf-16 lead byte and utf-16
+ // lead surrogate are null, return finished.
+ if (bite === end_of_stream && utf16_lead_byte === null &&
+ utf16_lead_surrogate === null) {
+ return finished;
+ }
+
+ // 3. If utf-16 lead byte is null, set utf-16 lead byte to byte
+ // and return continue.
+ if (utf16_lead_byte === null) {
+ utf16_lead_byte = bite;
+ return null;
+ }
+
+ // 4. Let code unit be the result of:
+ var code_unit;
+ if (utf16_be) {
+ // utf-16be decoder flag is set
+ // (utf-16 lead byte << 8) + byte.
+ code_unit = (utf16_lead_byte << 8) + bite;
+ } else {
+ // utf-16be decoder flag is unset
+ // (byte << 8) + utf-16 lead byte.
+ code_unit = (bite << 8) + utf16_lead_byte;
+ }
+ // Then set utf-16 lead byte to null.
+ utf16_lead_byte = null;
+
+ // 5. If utf-16 lead surrogate is not null, let lead surrogate
+ // be utf-16 lead surrogate, set utf-16 lead surrogate to null,
+ // and then run these substeps:
+ if (utf16_lead_surrogate !== null) {
+ var lead_surrogate = utf16_lead_surrogate;
+ utf16_lead_surrogate = null;
+
+ // 1. If code unit is in the range U+DC00 to U+DFFF,
+ // inclusive, return a code point whose value is 0x10000 +
+ // ((lead surrogate − 0xD800) << 10) + (code unit − 0xDC00).
+ if (inRange(code_unit, 0xDC00, 0xDFFF)) {
+ return 0x10000 + (lead_surrogate - 0xD800) * 0x400 +
+ (code_unit - 0xDC00);
+ }
+
+ // 2. Prepend the sequence resulting of converting code unit
+ // to bytes using utf-16be decoder flag to stream and return
+ // error.
+ stream.prepend(convertCodeUnitToBytes(code_unit, utf16_be));
+ return decoderError(fatal);
+ }
+
+ // 6. If code unit is in the range U+D800 to U+DBFF, inclusive,
+ // set utf-16 lead surrogate to code unit and return continue.
+ if (inRange(code_unit, 0xD800, 0xDBFF)) {
+ utf16_lead_surrogate = code_unit;
+ return null;
+ }
+
+ // 7. If code unit is in the range U+DC00 to U+DFFF, inclusive,
+ // return error.
+ if (inRange(code_unit, 0xDC00, 0xDFFF))
+ return decoderError(fatal);
+
+ // 8. Return code point code unit.
+ return code_unit;
+ };
+ }
+
+ // 15.2.2 shared utf-16 encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {boolean} utf16_be True if big-endian, false if little-endian.
+ * @param {{fatal: boolean}} options
+ */
+ function UTF16Encoder(utf16_be, options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1. If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is in the range U+0000 to U+FFFF, inclusive,
+ // return the sequence resulting of converting code point to
+ // bytes using utf-16be encoder flag.
+ if (inRange(code_point, 0x0000, 0xFFFF))
+ return convertCodeUnitToBytes(code_point, utf16_be);
+
+ // 3. Let lead be ((code point − 0x10000) >> 10) + 0xD800,
+ // converted to bytes using utf-16be encoder flag.
+ var lead = convertCodeUnitToBytes(
+ ((code_point - 0x10000) >> 10) + 0xD800, utf16_be);
+
+ // 4. Let trail be ((code point − 0x10000) & 0x3FF) + 0xDC00,
+ // converted to bytes using utf-16be encoder flag.
+ var trail = convertCodeUnitToBytes(
+ ((code_point - 0x10000) & 0x3FF) + 0xDC00, utf16_be);
+
+ // 5. Return a byte sequence of lead followed by trail.
+ return lead.concat(trail);
+ };
+ }
+
+ // 15.3 utf-16be
+ // 15.3.1 utf-16be decoder
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-16BE'] = function(options) {
+ return new UTF16Encoder(true, options);
+ };
+ // 15.3.2 utf-16be encoder
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-16BE'] = function(options) {
+ return new UTF16Decoder(true, options);
+ };
+
+ // 15.4 utf-16le
+ // 15.4.1 utf-16le decoder
+ /** @param {{fatal: boolean}} options */
+ encoders['UTF-16LE'] = function(options) {
+ return new UTF16Encoder(false, options);
+ };
+ // 15.4.2 utf-16le encoder
+ /** @param {{fatal: boolean}} options */
+ decoders['UTF-16LE'] = function(options) {
+ return new UTF16Decoder(false, options);
+ };
+
+ // 15.5 x-user-defined
+
+ // 15.5.1 x-user-defined decoder
+ /**
+ * @constructor
+ * @implements {Decoder}
+ * @param {{fatal: boolean}} options
+ */
+ function XUserDefinedDecoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream The stream of bytes being decoded.
+ * @param {number} bite The next byte read from the stream.
+ * @return {?(number|!Array.)} The next code point(s)
+ * decoded, or null if not enough data exists in the input
+ * stream to decode a complete code point.
+ */
+ this.handler = function(stream, bite) {
+ // 1. If byte is end-of-stream, return finished.
+ if (bite === end_of_stream)
+ return finished;
+
+ // 2. If byte is an ASCII byte, return a code point whose value
+ // is byte.
+ if (isASCIIByte(bite))
+ return bite;
+
+ // 3. Return a code point whose value is 0xF780 + byte − 0x80.
+ return 0xF780 + bite - 0x80;
+ };
+ }
+
+ // 15.5.2 x-user-defined encoder
+ /**
+ * @constructor
+ * @implements {Encoder}
+ * @param {{fatal: boolean}} options
+ */
+ function XUserDefinedEncoder(options) {
+ var fatal = options.fatal;
+ /**
+ * @param {Stream} stream Input stream.
+ * @param {number} code_point Next code point read from the stream.
+ * @return {(number|!Array.)} Byte(s) to emit.
+ */
+ this.handler = function(stream, code_point) {
+ // 1.If code point is end-of-stream, return finished.
+ if (code_point === end_of_stream)
+ return finished;
+
+ // 2. If code point is an ASCII code point, return a byte whose
+ // value is code point.
+ if (isASCIICodePoint(code_point))
+ return code_point;
+
+ // 3. If code point is in the range U+F780 to U+F7FF, inclusive,
+ // return a byte whose value is code point − 0xF780 + 0x80.
+ if (inRange(code_point, 0xF780, 0xF7FF))
+ return code_point - 0xF780 + 0x80;
+
+ // 4. Return error with code point.
+ return encoderError(code_point);
+ };
+ }
+
+ /** @param {{fatal: boolean}} options */
+ encoders['x-user-defined'] = function(options) {
+ return new XUserDefinedEncoder(options);
+ };
+ /** @param {{fatal: boolean}} options */
+ decoders['x-user-defined'] = function(options) {
+ return new XUserDefinedDecoder(options);
+ };
+
+ if (!global['TextEncoder'])
+ global['TextEncoder'] = TextEncoder;
+ if (!global['TextDecoder'])
+ global['TextDecoder'] = TextDecoder;
+
+ if (typeof module !== "undefined" && module.exports) {
+ module.exports = {
+ TextEncoder: global['TextEncoder'],
+ TextDecoder: global['TextDecoder'],
+ EncodingIndexes: global["encoding-indexes"]
+ };
+ }
+
+// For strict environments where `this` inside the global scope
+// is `undefined`, take a pure object instead
+}(this || {}));
\ No newline at end of file
diff --git a/node_modules/@sinonjs/text-encoding/package.json b/node_modules/@sinonjs/text-encoding/package.json
new file mode 100644
index 0000000..8189abb
--- /dev/null
+++ b/node_modules/@sinonjs/text-encoding/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "@sinonjs/text-encoding",
+ "scripts": {
+ "postpublish": "git push --tags"
+ },
+ "author": "Joshua Bell ",
+ "contributors": [
+ "Joshua Bell ",
+ "Rick Eyre ",
+ "Eugen Podaru ",
+ "Filip Dupanović ",
+ "Anne van Kesteren ",
+ "Author: Francis Avila ",
+ "Michael J. Ryan ",
+ "Pierre Queinnec ",
+ "Zack Weinberg "
+ ],
+ "version": "0.7.3",
+ "description": "Polyfill for the Encoding Living Standard's API.",
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "lib/encoding.js",
+ "lib/encoding-indexes.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/sinonjs/text-encoding.git"
+ },
+ "keywords": [
+ "encoding",
+ "decoding",
+ "living standard"
+ ],
+ "bugs": {
+ "url": "https://github.com/sinonjs/text-encoding/issues"
+ },
+ "homepage": "https://github.com/sinonjs/text-encoding",
+ "license": "(Unlicense OR Apache-2.0)"
+}
diff --git a/node_modules/@supabase/auth-js/LICENSE b/node_modules/@supabase/auth-js/LICENSE
new file mode 100644
index 0000000..ddeba6a
--- /dev/null
+++ b/node_modules/@supabase/auth-js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@supabase/auth-js/README.md b/node_modules/@supabase/auth-js/README.md
new file mode 100644
index 0000000..018a192
--- /dev/null
+++ b/node_modules/@supabase/auth-js/README.md
@@ -0,0 +1,50 @@
+# `auth-js`
+
+An isomorphic JavaScript client library for the [Supabase Auth](https://github.com/supabase/auth) API.
+
+## Docs
+
+- Using `auth-js`: https://supabase.com/docs/reference/javascript/auth-signup
+- TypeDoc: https://supabase.github.io/auth-js/v2
+
+## Quick start
+
+Install
+
+```bash
+npm install --save @supabase/auth-js
+```
+
+Usage
+
+```js
+import { AuthClient } from '@supabase/auth-js'
+
+const GOTRUE_URL = 'http://localhost:9999'
+
+const auth = new AuthClient({ url: GOTRUE_URL })
+```
+
+- `signUp()`: https://supabase.io/docs/reference/javascript/auth-signup
+- `signIn()`: https://supabase.io/docs/reference/javascript/auth-signin
+- `signOut()`: https://supabase.io/docs/reference/javascript/auth-signout
+
+### Custom `fetch` implementation
+
+`auth-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
+
+```js
+import { AuthClient } from '@supabase/auth-js'
+
+const AUTH_URL = 'http://localhost:9999'
+
+const auth = new AuthClient({ url: AUTH_URL, fetch: fetch })
+```
+
+## Sponsors
+
+We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves.
+
+[](https://github.com/sponsors/supabase)
+
+
diff --git a/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js b/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
new file mode 100644
index 0000000..a106cce
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js
@@ -0,0 +1,9 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const GoTrueAdminApi_1 = __importDefault(require("./GoTrueAdminApi"));
+const AuthAdminApi = GoTrueAdminApi_1.default;
+exports.default = AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/AuthClient.js b/node_modules/@supabase/auth-js/dist/main/AuthClient.js
new file mode 100644
index 0000000..da03f10
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/AuthClient.js
@@ -0,0 +1,9 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const GoTrueClient_1 = __importDefault(require("./GoTrueClient"));
+const AuthClient = GoTrueClient_1.default;
+exports.default = AuthClient;
+//# sourceMappingURL=AuthClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js b/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
new file mode 100644
index 0000000..e522e11
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js
@@ -0,0 +1,268 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const fetch_1 = require("./lib/fetch");
+const helpers_1 = require("./lib/helpers");
+const errors_1 = require("./lib/errors");
+class GoTrueAdminApi {
+ constructor({ url = '', headers = {}, fetch, }) {
+ this.url = url;
+ this.headers = headers;
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
+ this.mfa = {
+ listFactors: this._listFactors.bind(this),
+ deleteFactor: this._deleteFactor.bind(this),
+ };
+ }
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ async signOut(jwt, scope = 'global') {
+ try {
+ await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/logout?scope=${scope}`, {
+ headers: this.headers,
+ jwt,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ async inviteUserByEmail(email, options = {}) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/invite`, {
+ body: { email, data: options.data },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ async generateLink(params) {
+ try {
+ const { options } = params, rest = __rest(params, ["options"]);
+ const body = Object.assign(Object.assign({}, rest), options);
+ if ('newEmail' in rest) {
+ // replace newEmail with new_email in request body
+ body.new_email = rest === null || rest === void 0 ? void 0 : rest.newEmail;
+ delete body['newEmail'];
+ }
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
+ body: body,
+ headers: this.headers,
+ xform: fetch_1._generateLinkResponse,
+ redirectTo: options === null || options === void 0 ? void 0 : options.redirectTo,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return {
+ data: {
+ properties: null,
+ user: null,
+ },
+ error,
+ };
+ }
+ throw error;
+ }
+ }
+ // User Admin API
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async createUser(attributes) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/admin/users`, {
+ body: attributes,
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ async listUsers(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: fetch_1._noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const users = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, users), pagination), error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { users: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async getUserById(uid) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async updateUserById(uid, attributes) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
+ body: attributes,
+ headers: this.headers,
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async deleteUser(id, shouldSoftDelete = false) {
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${id}`, {
+ headers: this.headers,
+ body: {
+ should_soft_delete: shouldSoftDelete,
+ },
+ xform: fetch_1._userResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ async _listFactors(params) {
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/factors`, {
+ headers: this.headers,
+ xform: (factors) => {
+ return { data: { factors }, error: null };
+ },
+ });
+ return { data, error };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _deleteFactor(params) {
+ try {
+ const data = await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/factors/${params.id}`, {
+ headers: this.headers,
+ });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+}
+exports.default = GoTrueAdminApi;
+//# sourceMappingURL=GoTrueAdminApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js b/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
new file mode 100644
index 0000000..870e68c
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js
@@ -0,0 +1,1986 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const GoTrueAdminApi_1 = __importDefault(require("./GoTrueAdminApi"));
+const constants_1 = require("./lib/constants");
+const errors_1 = require("./lib/errors");
+const fetch_1 = require("./lib/fetch");
+const helpers_1 = require("./lib/helpers");
+const local_storage_1 = require("./lib/local-storage");
+const polyfills_1 = require("./lib/polyfills");
+const version_1 = require("./lib/version");
+const locks_1 = require("./lib/locks");
+(0, polyfills_1.polyfillGlobalThis)(); // Make "globalThis" available
+const DEFAULT_OPTIONS = {
+ url: constants_1.GOTRUE_URL,
+ storageKey: constants_1.STORAGE_KEY,
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ headers: constants_1.DEFAULT_HEADERS,
+ flowType: 'implicit',
+ debug: false,
+ hasCustomAuthorizationHeader: false,
+};
+/** Current session will be checked for refresh at this interval. */
+const AUTO_REFRESH_TICK_DURATION = 30 * 1000;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+const AUTO_REFRESH_TICK_THRESHOLD = 3;
+async function lockNoOp(name, acquireTimeout, fn) {
+ return await fn();
+}
+class GoTrueClient {
+ /**
+ * Create a new client for use in the browser.
+ */
+ constructor(options) {
+ var _a, _b;
+ this.memoryStorage = null;
+ this.stateChangeEmitters = new Map();
+ this.autoRefreshTicker = null;
+ this.visibilityChangedCallback = null;
+ this.refreshingDeferred = null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the the auth state is known and it's save to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ this.initializePromise = null;
+ this.detectSessionInUrl = true;
+ this.hasCustomAuthorizationHeader = false;
+ this.suppressGetSessionWarning = false;
+ this.lockAcquired = false;
+ this.pendingInLock = [];
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ this.broadcastChannel = null;
+ this.logger = console.log;
+ this.instanceID = GoTrueClient.nextInstanceID;
+ GoTrueClient.nextInstanceID += 1;
+ if (this.instanceID > 0 && (0, helpers_1.isBrowser)()) {
+ console.warn('Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.');
+ }
+ const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);
+ this.logDebugMessages = !!settings.debug;
+ if (typeof settings.debug === 'function') {
+ this.logger = settings.debug;
+ }
+ this.persistSession = settings.persistSession;
+ this.storageKey = settings.storageKey;
+ this.autoRefreshToken = settings.autoRefreshToken;
+ this.admin = new GoTrueAdminApi_1.default({
+ url: settings.url,
+ headers: settings.headers,
+ fetch: settings.fetch,
+ });
+ this.url = settings.url;
+ this.headers = settings.headers;
+ this.fetch = (0, helpers_1.resolveFetch)(settings.fetch);
+ this.lock = settings.lock || lockNoOp;
+ this.detectSessionInUrl = settings.detectSessionInUrl;
+ this.flowType = settings.flowType;
+ this.hasCustomAuthorizationHeader = settings.hasCustomAuthorizationHeader;
+ if (settings.lock) {
+ this.lock = settings.lock;
+ }
+ else if ((0, helpers_1.isBrowser)() && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.locks)) {
+ this.lock = locks_1.navigatorLock;
+ }
+ else {
+ this.lock = lockNoOp;
+ }
+ this.mfa = {
+ verify: this._verify.bind(this),
+ enroll: this._enroll.bind(this),
+ unenroll: this._unenroll.bind(this),
+ challenge: this._challenge.bind(this),
+ listFactors: this._listFactors.bind(this),
+ challengeAndVerify: this._challengeAndVerify.bind(this),
+ getAuthenticatorAssuranceLevel: this._getAuthenticatorAssuranceLevel.bind(this),
+ };
+ if (this.persistSession) {
+ if (settings.storage) {
+ this.storage = settings.storage;
+ }
+ else {
+ if ((0, helpers_1.supportsLocalStorage)()) {
+ this.storage = local_storage_1.localStorageAdapter;
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = (0, local_storage_1.memoryLocalStorageAdapter)(this.memoryStorage);
+ }
+ }
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = (0, local_storage_1.memoryLocalStorageAdapter)(this.memoryStorage);
+ }
+ if ((0, helpers_1.isBrowser)() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
+ try {
+ this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
+ }
+ catch (e) {
+ console.error('Failed to create a new BroadcastChannel, multi-tab state changes will not be available', e);
+ }
+ (_b = this.broadcastChannel) === null || _b === void 0 ? void 0 : _b.addEventListener('message', async (event) => {
+ this._debug('received broadcast notification from other tab or client', event);
+ await this._notifyAllSubscribers(event.data.event, event.data.session, false); // broadcast = false so we don't get an endless loop of messages
+ });
+ }
+ this.initialize();
+ }
+ _debug(...args) {
+ if (this.logDebugMessages) {
+ this.logger(`GoTrueClient@${this.instanceID} (${version_1.version}) ${new Date().toISOString()}`, ...args);
+ }
+ return this;
+ }
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ async initialize() {
+ if (this.initializePromise) {
+ return await this.initializePromise;
+ }
+ this.initializePromise = (async () => {
+ return await this._acquireLock(-1, async () => {
+ return await this._initialize();
+ });
+ })();
+ return await this.initializePromise;
+ }
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ async _initialize() {
+ var _a;
+ try {
+ const params = (0, helpers_1.parseParametersFromURL)(window.location.href);
+ let callbackUrlType = 'none';
+ if (this._isImplicitGrantCallback(params)) {
+ callbackUrlType = 'implicit';
+ }
+ else if (await this._isPKCECallback(params)) {
+ callbackUrlType = 'pkce';
+ }
+ /**
+ * Attempt to get the session from the URL only if these conditions are fulfilled
+ *
+ * Note: If the URL isn't one of the callback url types (implicit or pkce),
+ * then there could be an existing session so we don't want to prematurely remove it
+ */
+ if ((0, helpers_1.isBrowser)() && this.detectSessionInUrl && callbackUrlType !== 'none') {
+ const { data, error } = await this._getSessionFromURL(params, callbackUrlType);
+ if (error) {
+ this._debug('#_initialize()', 'error detecting session from URL', error);
+ if ((0, errors_1.isAuthImplicitGrantRedirectError)(error)) {
+ const errorCode = (_a = error.details) === null || _a === void 0 ? void 0 : _a.code;
+ if (errorCode === 'identity_already_exists' ||
+ errorCode === 'identity_not_found' ||
+ errorCode === 'single_identity_not_deletable') {
+ return { error };
+ }
+ }
+ // failed login attempt via url,
+ // remove old session as in verifyOtp, signUp and signInWith*
+ await this._removeSession();
+ return { error };
+ }
+ const { session, redirectType } = data;
+ this._debug('#_initialize()', 'detected session in URL', session, 'redirect type', redirectType);
+ await this._saveSession(session);
+ setTimeout(async () => {
+ if (redirectType === 'recovery') {
+ await this._notifyAllSubscribers('PASSWORD_RECOVERY', session);
+ }
+ else {
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ }, 0);
+ return { error: null };
+ }
+ // no login attempt via callback url try to recover session from storage
+ await this._recoverAndRefresh();
+ return { error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { error };
+ }
+ return {
+ error: new errors_1.AuthUnknownError('Unexpected error during initialization', error),
+ };
+ }
+ finally {
+ await this._handleVisibilityChange();
+ this._debug('#_initialize()', 'end');
+ }
+ }
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ async signInAnonymously(credentials) {
+ var _a, _b, _c;
+ try {
+ const res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ data: (_b = (_a = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {},
+ gotrue_meta_security: { captcha_token: (_c = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _c === void 0 ? void 0 : _c.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ const { data, error } = res;
+ if (error || !data) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ async signUp(credentials) {
+ var _a, _b, _c;
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: {
+ email,
+ password,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ data: (_b = options === null || options === void 0 ? void 0 : options.data) !== null && _b !== void 0 ? _b : {},
+ channel: (_c = options === null || options === void 0 ? void 0 : options.channel) !== null && _c !== void 0 ? _c : 'sms',
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ }
+ else {
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error || !data) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ async signInWithPassword(credentials) {
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ email,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponsePassword,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponsePassword,
+ });
+ }
+ else {
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error) {
+ return { data: { user: null, session: null }, error };
+ }
+ else if (!data || !data.session || !data.user) {
+ return { data: { user: null, session: null }, error: new errors_1.AuthInvalidTokenResponseError() };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return {
+ data: Object.assign({ user: data.user, session: data.session }, (data.weak_password ? { weakPassword: data.weak_password } : null)),
+ error,
+ };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ async signInWithOAuth(credentials) {
+ var _a, _b, _c, _d;
+ return await this._handleProviderSignIn(credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: (_d = credentials.options) === null || _d === void 0 ? void 0 : _d.skipBrowserRedirect,
+ });
+ }
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ async exchangeCodeForSession(authCode) {
+ await this.initializePromise;
+ return this._acquireLock(-1, async () => {
+ return this._exchangeCodeForSession(authCode);
+ });
+ }
+ async _exchangeCodeForSession(authCode) {
+ const storageItem = await (0, helpers_1.getItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ const [codeVerifier, redirectType] = (storageItem !== null && storageItem !== void 0 ? storageItem : '').split('/');
+ try {
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=pkce`, {
+ headers: this.headers,
+ body: {
+ auth_code: authCode,
+ code_verifier: codeVerifier,
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ return {
+ data: { user: null, session: null, redirectType: null },
+ error: new errors_1.AuthInvalidTokenResponseError(),
+ };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return { data: Object.assign(Object.assign({}, data), { redirectType: redirectType !== null && redirectType !== void 0 ? redirectType : null }), error };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null, redirectType: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ async signInWithIdToken(credentials) {
+ try {
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: fetch_1._sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return { data: { user: null, session: null }, error };
+ }
+ else if (!data || !data.session || !data.user) {
+ return {
+ data: { user: null, session: null },
+ error: new errors_1.AuthInvalidTokenResponseError(),
+ };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return { data, error };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ async signInWithOtp(credentials) {
+ var _a, _b, _c, _d, _e;
+ try {
+ if ('email' in credentials) {
+ const { email, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ const { error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ email,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ create_user: (_b = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _b !== void 0 ? _b : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return { data: { user: null, session: null }, error };
+ }
+ if ('phone' in credentials) {
+ const { phone, options } = credentials;
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ phone,
+ data: (_c = options === null || options === void 0 ? void 0 : options.data) !== null && _c !== void 0 ? _c : {},
+ create_user: (_d = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _d !== void 0 ? _d : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ channel: (_e = options === null || options === void 0 ? void 0 : options.channel) !== null && _e !== void 0 ? _e : 'sms',
+ },
+ });
+ return { data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id }, error };
+ }
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number.');
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ async verifyOtp(params) {
+ var _a, _b;
+ try {
+ let redirectTo = undefined;
+ let captchaToken = undefined;
+ if ('options' in params) {
+ redirectTo = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo;
+ captchaToken = (_b = params.options) === null || _b === void 0 ? void 0 : _b.captchaToken;
+ }
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/verify`, {
+ headers: this.headers,
+ body: Object.assign(Object.assign({}, params), { gotrue_meta_security: { captcha_token: captchaToken } }),
+ redirectTo,
+ xform: fetch_1._sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data) {
+ throw new Error('An error occurred on token verification.');
+ }
+ const session = data.session;
+ const user = data.user;
+ if (session === null || session === void 0 ? void 0 : session.access_token) {
+ await this._saveSession(session);
+ await this._notifyAllSubscribers(params.type == 'recovery' ? 'PASSWORD_RECOVERY' : 'SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ async signInWithSSO(params) {
+ var _a, _b, _c;
+ try {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/sso`, {
+ body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ('providerId' in params ? { provider_id: params.providerId } : null)), ('domain' in params ? { domain: params.domain } : null)), { redirect_to: (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo) !== null && _b !== void 0 ? _b : undefined }), (((_c = params === null || params === void 0 ? void 0 : params.options) === null || _c === void 0 ? void 0 : _c.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: params.options.captchaToken } }
+ : null)), { skip_http_redirect: true, code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ headers: this.headers,
+ xform: fetch_1._ssoResponse,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ async reauthenticate() {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._reauthenticate();
+ });
+ }
+ async _reauthenticate() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError)
+ throw sessionError;
+ if (!session)
+ throw new errors_1.AuthSessionMissingError();
+ const { error } = await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/reauthenticate`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ });
+ return { data: { user: null, session: null }, error };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ async resend(credentials) {
+ try {
+ const endpoint = `${this.url}/resend`;
+ if ('email' in credentials) {
+ const { email, type, options } = credentials;
+ const { error } = await (0, fetch_1._request)(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ email,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return { data: { user: null, session: null }, error };
+ }
+ else if ('phone' in credentials) {
+ const { phone, type, options } = credentials;
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ phone,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ });
+ return { data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id }, error };
+ }
+ throw new errors_1.AuthInvalidCredentialsError('You must provide either an email or phone number and a type');
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ async getSession() {
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return this._useSession(async (result) => {
+ return result;
+ });
+ });
+ return result;
+ }
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ async _acquireLock(acquireTimeout, fn) {
+ this._debug('#_acquireLock', 'begin', acquireTimeout);
+ try {
+ if (this.lockAcquired) {
+ const last = this.pendingInLock.length
+ ? this.pendingInLock[this.pendingInLock.length - 1]
+ : Promise.resolve();
+ const result = (async () => {
+ await last;
+ return await fn();
+ })();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ return result;
+ }
+ return await this.lock(`lock:${this.storageKey}`, acquireTimeout, async () => {
+ this._debug('#_acquireLock', 'lock acquired for storage key', this.storageKey);
+ try {
+ this.lockAcquired = true;
+ const result = fn();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ await result;
+ // keep draining the queue until there's nothing to wait on
+ while (this.pendingInLock.length) {
+ const waitOn = [...this.pendingInLock];
+ await Promise.all(waitOn);
+ this.pendingInLock.splice(0, waitOn.length);
+ }
+ return await result;
+ }
+ finally {
+ this._debug('#_acquireLock', 'lock released for storage key', this.storageKey);
+ this.lockAcquired = false;
+ }
+ });
+ }
+ finally {
+ this._debug('#_acquireLock', 'end');
+ }
+ }
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ async _useSession(fn) {
+ this._debug('#_useSession', 'begin');
+ try {
+ // the use of __loadSession here is the only correct use of the function!
+ const result = await this.__loadSession();
+ return await fn(result);
+ }
+ finally {
+ this._debug('#_useSession', 'end');
+ }
+ }
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ async __loadSession() {
+ this._debug('#__loadSession()', 'begin');
+ if (!this.lockAcquired) {
+ this._debug('#__loadSession()', 'used outside of an acquired lock!', new Error().stack);
+ }
+ try {
+ let currentSession = null;
+ const maybeSession = await (0, helpers_1.getItemAsync)(this.storage, this.storageKey);
+ this._debug('#getSession()', 'session from storage', maybeSession);
+ if (maybeSession !== null) {
+ if (this._isValidSession(maybeSession)) {
+ currentSession = maybeSession;
+ }
+ else {
+ this._debug('#getSession()', 'session from storage is not valid');
+ await this._removeSession();
+ }
+ }
+ if (!currentSession) {
+ return { data: { session: null }, error: null };
+ }
+ const hasExpired = currentSession.expires_at
+ ? currentSession.expires_at <= Date.now() / 1000
+ : false;
+ this._debug('#__loadSession()', `session has${hasExpired ? '' : ' not'} expired`, 'expires_at', currentSession.expires_at);
+ if (!hasExpired) {
+ if (this.storage.isServer) {
+ let suppressWarning = this.suppressGetSessionWarning;
+ const proxySession = new Proxy(currentSession, {
+ get: (target, prop, receiver) => {
+ if (!suppressWarning && prop === 'user') {
+ // only show warning when the user object is being accessed from the server
+ console.warn('Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.');
+ suppressWarning = true; // keeps this proxy instance from logging additional warnings
+ this.suppressGetSessionWarning = true; // keeps this client's future proxy instances from warning
+ }
+ return Reflect.get(target, prop, receiver);
+ },
+ });
+ currentSession = proxySession;
+ }
+ return { data: { session: currentSession }, error: null };
+ }
+ const { session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { session: null }, error };
+ }
+ return { data: { session }, error: null };
+ }
+ finally {
+ this._debug('#__loadSession()', 'end');
+ }
+ }
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ async getUser(jwt) {
+ if (jwt) {
+ return await this._getUser(jwt);
+ }
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return await this._getUser();
+ });
+ return result;
+ }
+ async _getUser(jwt) {
+ try {
+ if (jwt) {
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: jwt,
+ xform: fetch_1._userResponse,
+ });
+ }
+ return await this._useSession(async (result) => {
+ var _a, _b, _c;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ // returns an error if there is no access_token or custom authorization header
+ if (!((_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) && !this.hasCustomAuthorizationHeader) {
+ return { data: { user: null }, error: new errors_1.AuthSessionMissingError() };
+ }
+ return await (0, fetch_1._request)(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: (_c = (_b = data.session) === null || _b === void 0 ? void 0 : _b.access_token) !== null && _c !== void 0 ? _c : undefined,
+ xform: fetch_1._userResponse,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ if ((0, errors_1.isAuthSessionMissingError)(error)) {
+ // JWT contains a `session_id` which does not correspond to an active
+ // session in the database, indicating the user is signed out.
+ await this._removeSession();
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates user data for a logged in user.
+ */
+ async updateUser(attributes, options = {}) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._updateUser(attributes, options);
+ });
+ }
+ async _updateUser(attributes, options = {}) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ throw sessionError;
+ }
+ if (!sessionData.session) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const session = sessionData.session;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce' && attributes.email != null) {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ }
+ const { data, error: userError } = await (0, fetch_1._request)(this.fetch, 'PUT', `${this.url}/user`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: Object.assign(Object.assign({}, attributes), { code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ jwt: session.access_token,
+ xform: fetch_1._userResponse,
+ });
+ if (userError)
+ throw userError;
+ session.user = data.user;
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('USER_UPDATED', session);
+ return { data: { user: session.user }, error: null };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Decodes a JWT (without performing any validation).
+ */
+ _decodeJWT(jwt) {
+ return (0, helpers_1.decodeJWTPayload)(jwt);
+ }
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ async setSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._setSession(currentSession);
+ });
+ }
+ async _setSession(currentSession) {
+ try {
+ if (!currentSession.access_token || !currentSession.refresh_token) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const timeNow = Date.now() / 1000;
+ let expiresAt = timeNow;
+ let hasExpired = true;
+ let session = null;
+ const payload = (0, helpers_1.decodeJWTPayload)(currentSession.access_token);
+ if (payload.exp) {
+ expiresAt = payload.exp;
+ hasExpired = expiresAt <= timeNow;
+ }
+ if (hasExpired) {
+ const { session: refreshedSession, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ if (!refreshedSession) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ session = refreshedSession;
+ }
+ else {
+ const { data, error } = await this._getUser(currentSession.access_token);
+ if (error) {
+ throw error;
+ }
+ session = {
+ access_token: currentSession.access_token,
+ refresh_token: currentSession.refresh_token,
+ user: data.user,
+ token_type: 'bearer',
+ expires_in: expiresAt - timeNow,
+ expires_at: expiresAt,
+ };
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user: session.user, session }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { session: null, user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ async refreshSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._refreshSession(currentSession);
+ });
+ }
+ async _refreshSession(currentSession) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ if (!currentSession) {
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ currentSession = (_a = data.session) !== null && _a !== void 0 ? _a : undefined;
+ }
+ if (!(currentSession === null || currentSession === void 0 ? void 0 : currentSession.refresh_token)) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ const { session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ if (!session) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ return { data: { user: session.user, session }, error: null };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets the session data from a URL string
+ */
+ async _getSessionFromURL(params, callbackUrlType) {
+ try {
+ if (!(0, helpers_1.isBrowser)())
+ throw new errors_1.AuthImplicitGrantRedirectError('No browser detected.');
+ // If there's an error in the URL, it doesn't matter what flow it is, we just return the error.
+ if (params.error || params.error_description || params.error_code) {
+ // The error class returned implies that the redirect is from an implicit grant flow
+ // but it could also be from a redirect error from a PKCE flow.
+ throw new errors_1.AuthImplicitGrantRedirectError(params.error_description || 'Error in URL with unspecified error_description', {
+ error: params.error || 'unspecified_error',
+ code: params.error_code || 'unspecified_code',
+ });
+ }
+ // Checks for mismatches between the flowType initialised in the client and the URL parameters
+ switch (callbackUrlType) {
+ case 'implicit':
+ if (this.flowType === 'pkce') {
+ throw new errors_1.AuthPKCEGrantCodeExchangeError('Not a valid PKCE flow url.');
+ }
+ break;
+ case 'pkce':
+ if (this.flowType === 'implicit') {
+ throw new errors_1.AuthImplicitGrantRedirectError('Not a valid implicit grant flow url.');
+ }
+ break;
+ default:
+ // there's no mismatch so we continue
+ }
+ // Since this is a redirect for PKCE, we attempt to retrieve the code from the URL for the code exchange
+ if (callbackUrlType === 'pkce') {
+ this._debug('#_initialize()', 'begin', 'is PKCE flow', true);
+ if (!params.code)
+ throw new errors_1.AuthPKCEGrantCodeExchangeError('No code detected.');
+ const { data, error } = await this._exchangeCodeForSession(params.code);
+ if (error)
+ throw error;
+ const url = new URL(window.location.href);
+ url.searchParams.delete('code');
+ window.history.replaceState(window.history.state, '', url.toString());
+ return { data: { session: data.session, redirectType: null }, error: null };
+ }
+ const { provider_token, provider_refresh_token, access_token, refresh_token, expires_in, expires_at, token_type, } = params;
+ if (!access_token || !expires_in || !refresh_token || !token_type) {
+ throw new errors_1.AuthImplicitGrantRedirectError('No session defined in URL');
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresIn = parseInt(expires_in);
+ let expiresAt = timeNow + expiresIn;
+ if (expires_at) {
+ expiresAt = parseInt(expires_at);
+ }
+ const actuallyExpiresIn = expiresAt - timeNow;
+ if (actuallyExpiresIn * 1000 <= AUTO_REFRESH_TICK_DURATION) {
+ console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${actuallyExpiresIn}s, should have been closer to ${expiresIn}s`);
+ }
+ const issuedAt = expiresAt - expiresIn;
+ if (timeNow - issuedAt >= 120) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale', issuedAt, expiresAt, timeNow);
+ }
+ else if (timeNow - issuedAt < 0) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew', issuedAt, expiresAt, timeNow);
+ }
+ const { data, error } = await this._getUser(access_token);
+ if (error)
+ throw error;
+ const session = {
+ provider_token,
+ provider_refresh_token,
+ access_token,
+ expires_in: expiresIn,
+ expires_at: expiresAt,
+ refresh_token,
+ token_type,
+ user: data.user,
+ };
+ // Remove tokens from URL
+ window.location.hash = '';
+ this._debug('#_getSessionFromURL()', 'clearing window.location.hash');
+ return { data: { session, redirectType: params.type }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { session: null, redirectType: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ _isImplicitGrantCallback(params) {
+ return Boolean(params.access_token || params.error_description);
+ }
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ async _isPKCECallback(params) {
+ const currentStorageContent = await (0, helpers_1.getItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ return !!(params.code && currentStorageContent);
+ }
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ async signOut(options = { scope: 'global' }) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._signOut(options);
+ });
+ }
+ async _signOut({ scope } = { scope: 'global' }) {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data, error: sessionError } = result;
+ if (sessionError) {
+ return { error: sessionError };
+ }
+ const accessToken = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token;
+ if (accessToken) {
+ const { error } = await this.admin.signOut(accessToken, scope);
+ if (error) {
+ // ignore 404s since user might not exist anymore
+ // ignore 401s since an invalid or expired JWT should sign out the current session
+ if (!((0, errors_1.isAuthApiError)(error) &&
+ (error.status === 404 || error.status === 401 || error.status === 403))) {
+ return { error };
+ }
+ }
+ }
+ if (scope !== 'others') {
+ await this._removeSession();
+ await (0, helpers_1.removeItemAsync)(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return { error: null };
+ });
+ }
+ /**
+ * Receive a notification every time an auth event happens.
+ * @param callback A callback function to be invoked when an auth event happens.
+ */
+ onAuthStateChange(callback) {
+ const id = (0, helpers_1.uuid)();
+ const subscription = {
+ id,
+ callback,
+ unsubscribe: () => {
+ this._debug('#unsubscribe()', 'state change callback with id removed', id);
+ this.stateChangeEmitters.delete(id);
+ },
+ };
+ this._debug('#onAuthStateChange()', 'registered callback with id', id);
+ this.stateChangeEmitters.set(id, subscription);
+ (async () => {
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ this._emitInitialSession(id);
+ });
+ })();
+ return { data: { subscription } };
+ }
+ async _emitInitialSession(id) {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ try {
+ const { data: { session }, error, } = result;
+ if (error)
+ throw error;
+ await ((_a = this.stateChangeEmitters.get(id)) === null || _a === void 0 ? void 0 : _a.callback('INITIAL_SESSION', session));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'session', session);
+ }
+ catch (err) {
+ await ((_b = this.stateChangeEmitters.get(id)) === null || _b === void 0 ? void 0 : _b.callback('INITIAL_SESSION', null));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'error', err);
+ console.error(err);
+ }
+ });
+ }
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ async resetPasswordForEmail(email, options = {}) {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey, true // isPasswordRecovery
+ );
+ }
+ try {
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/recover`, {
+ body: {
+ email,
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ gotrue_meta_security: { captcha_token: options.captchaToken },
+ },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets all the identities linked to a user.
+ */
+ async getUserIdentities() {
+ var _a;
+ try {
+ const { data, error } = await this.getUser();
+ if (error)
+ throw error;
+ return { data: { identities: (_a = data.user.identities) !== null && _a !== void 0 ? _a : [] }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Links an oauth identity to an existing user.
+ * This method supports the PKCE flow.
+ */
+ async linkIdentity(credentials) {
+ var _a;
+ try {
+ const { data, error } = await this._useSession(async (result) => {
+ var _a, _b, _c, _d, _e;
+ const { data, error } = result;
+ if (error)
+ throw error;
+ const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: true,
+ });
+ return await (0, fetch_1._request)(this.fetch, 'GET', url, {
+ headers: this.headers,
+ jwt: (_e = (_d = data.session) === null || _d === void 0 ? void 0 : _d.access_token) !== null && _e !== void 0 ? _e : undefined,
+ });
+ });
+ if (error)
+ throw error;
+ if ((0, helpers_1.isBrowser)() && !((_a = credentials.options) === null || _a === void 0 ? void 0 : _a.skipBrowserRedirect)) {
+ window.location.assign(data === null || data === void 0 ? void 0 : data.url);
+ }
+ return { data: { provider: credentials.provider, url: data === null || data === void 0 ? void 0 : data.url }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { provider: credentials.provider, url: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ async unlinkIdentity(identity) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/user/identities/${identity.identity_id}`, {
+ headers: this.headers,
+ jwt: (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : undefined,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ async _refreshAccessToken(refreshToken) {
+ const debugName = `#_refreshAccessToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ const startedAt = Date.now();
+ // will attempt to refresh the token with exponential backoff
+ return await (0, helpers_1.retryable)(async (attempt) => {
+ if (attempt > 0) {
+ await (0, helpers_1.sleep)(200 * Math.pow(2, attempt - 1)); // 200, 400, 800, ...
+ }
+ this._debug(debugName, 'refreshing attempt', attempt);
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/token?grant_type=refresh_token`, {
+ body: { refresh_token: refreshToken },
+ headers: this.headers,
+ xform: fetch_1._sessionResponse,
+ });
+ }, (attempt, error) => {
+ const nextBackOffInterval = 200 * Math.pow(2, attempt);
+ return (error &&
+ (0, errors_1.isAuthRetryableFetchError)(error) &&
+ // retryable only if the request can be sent before the backoff overflows the tick duration
+ Date.now() + nextBackOffInterval - startedAt < AUTO_REFRESH_TICK_DURATION);
+ });
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: { session: null, user: null }, error };
+ }
+ throw error;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ _isValidSession(maybeSession) {
+ const isValidSession = typeof maybeSession === 'object' &&
+ maybeSession !== null &&
+ 'access_token' in maybeSession &&
+ 'refresh_token' in maybeSession &&
+ 'expires_at' in maybeSession;
+ return isValidSession;
+ }
+ async _handleProviderSignIn(provider, options) {
+ const url = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
+ redirectTo: options.redirectTo,
+ scopes: options.scopes,
+ queryParams: options.queryParams,
+ });
+ this._debug('#_handleProviderSignIn()', 'provider', provider, 'options', options, 'url', url);
+ // try to open on the browser
+ if ((0, helpers_1.isBrowser)() && !options.skipBrowserRedirect) {
+ window.location.assign(url);
+ }
+ return { data: { provider, url }, error: null };
+ }
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ async _recoverAndRefresh() {
+ var _a;
+ const debugName = '#_recoverAndRefresh()';
+ this._debug(debugName, 'begin');
+ try {
+ const currentSession = await (0, helpers_1.getItemAsync)(this.storage, this.storageKey);
+ this._debug(debugName, 'session from storage', currentSession);
+ if (!this._isValidSession(currentSession)) {
+ this._debug(debugName, 'session is not valid');
+ if (currentSession !== null) {
+ await this._removeSession();
+ }
+ return;
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresWithMargin = ((_a = currentSession.expires_at) !== null && _a !== void 0 ? _a : Infinity) < timeNow + constants_1.EXPIRY_MARGIN;
+ this._debug(debugName, `session has${expiresWithMargin ? '' : ' not'} expired with margin of ${constants_1.EXPIRY_MARGIN}s`);
+ if (expiresWithMargin) {
+ if (this.autoRefreshToken && currentSession.refresh_token) {
+ const { error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ console.error(error);
+ if (!(0, errors_1.isAuthRetryableFetchError)(error)) {
+ this._debug(debugName, 'refresh failed with a non-retryable error, removing the session', error);
+ await this._removeSession();
+ }
+ }
+ }
+ }
+ else {
+ // no need to persist currentSession again, as we just loaded it from
+ // local storage; persisting it again may overwrite a value saved by
+ // another client with access to the same local storage
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ }
+ catch (err) {
+ this._debug(debugName, 'error', err);
+ console.error(err);
+ return;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ async _callRefreshToken(refreshToken) {
+ var _a, _b;
+ if (!refreshToken) {
+ throw new errors_1.AuthSessionMissingError();
+ }
+ // refreshing is already in progress
+ if (this.refreshingDeferred) {
+ return this.refreshingDeferred.promise;
+ }
+ const debugName = `#_callRefreshToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ this.refreshingDeferred = new helpers_1.Deferred();
+ const { data, error } = await this._refreshAccessToken(refreshToken);
+ if (error)
+ throw error;
+ if (!data.session)
+ throw new errors_1.AuthSessionMissingError();
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('TOKEN_REFRESHED', data.session);
+ const result = { session: data.session, error: null };
+ this.refreshingDeferred.resolve(result);
+ return result;
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if ((0, errors_1.isAuthError)(error)) {
+ const result = { session: null, error };
+ if (!(0, errors_1.isAuthRetryableFetchError)(error)) {
+ await this._removeSession();
+ }
+ (_a = this.refreshingDeferred) === null || _a === void 0 ? void 0 : _a.resolve(result);
+ return result;
+ }
+ (_b = this.refreshingDeferred) === null || _b === void 0 ? void 0 : _b.reject(error);
+ throw error;
+ }
+ finally {
+ this.refreshingDeferred = null;
+ this._debug(debugName, 'end');
+ }
+ }
+ async _notifyAllSubscribers(event, session, broadcast = true) {
+ const debugName = `#_notifyAllSubscribers(${event})`;
+ this._debug(debugName, 'begin', session, `broadcast = ${broadcast}`);
+ try {
+ if (this.broadcastChannel && broadcast) {
+ this.broadcastChannel.postMessage({ event, session });
+ }
+ const errors = [];
+ const promises = Array.from(this.stateChangeEmitters.values()).map(async (x) => {
+ try {
+ await x.callback(event, session);
+ }
+ catch (e) {
+ errors.push(e);
+ }
+ });
+ await Promise.all(promises);
+ if (errors.length > 0) {
+ for (let i = 0; i < errors.length; i += 1) {
+ console.error(errors[i]);
+ }
+ throw errors[0];
+ }
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ async _saveSession(session) {
+ this._debug('#_saveSession()', session);
+ // _saveSession is always called whenever a new session has been acquired
+ // so we can safely suppress the warning returned by future getSession calls
+ this.suppressGetSessionWarning = true;
+ await (0, helpers_1.setItemAsync)(this.storage, this.storageKey, session);
+ }
+ async _removeSession() {
+ this._debug('#_removeSession()');
+ await (0, helpers_1.removeItemAsync)(this.storage, this.storageKey);
+ await this._notifyAllSubscribers('SIGNED_OUT', null);
+ }
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ _removeVisibilityChangedCallback() {
+ this._debug('#_removeVisibilityChangedCallback()');
+ const callback = this.visibilityChangedCallback;
+ this.visibilityChangedCallback = null;
+ try {
+ if (callback && (0, helpers_1.isBrowser)() && (window === null || window === void 0 ? void 0 : window.removeEventListener)) {
+ window.removeEventListener('visibilitychange', callback);
+ }
+ }
+ catch (e) {
+ console.error('removing visibilitychange callback failed', e);
+ }
+ }
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ async _startAutoRefresh() {
+ await this._stopAutoRefresh();
+ this._debug('#_startAutoRefresh()');
+ const ticker = setInterval(() => this._autoRefreshTokenTick(), AUTO_REFRESH_TICK_DURATION);
+ this.autoRefreshTicker = ticker;
+ if (ticker && typeof ticker === 'object' && typeof ticker.unref === 'function') {
+ // ticker is a NodeJS Timeout object that has an `unref` method
+ // https://nodejs.org/api/timers.html#timeoutunref
+ // When auto refresh is used in NodeJS (like for testing) the
+ // `setInterval` is preventing the process from being marked as
+ // finished and tests run endlessly. This can be prevented by calling
+ // `unref()` on the returned object.
+ ticker.unref();
+ // @ts-expect-error TS has no context of Deno
+ }
+ else if (typeof Deno !== 'undefined' && typeof Deno.unrefTimer === 'function') {
+ // similar like for NodeJS, but with the Deno API
+ // https://deno.land/api@latest?unstable&s=Deno.unrefTimer
+ // @ts-expect-error TS has no context of Deno
+ Deno.unrefTimer(ticker);
+ }
+ // run the tick immediately, but in the next pass of the event loop so that
+ // #_initialize can be allowed to complete without recursively waiting on
+ // itself
+ setTimeout(async () => {
+ await this.initializePromise;
+ await this._autoRefreshTokenTick();
+ }, 0);
+ }
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ async _stopAutoRefresh() {
+ this._debug('#_stopAutoRefresh()');
+ const ticker = this.autoRefreshTicker;
+ this.autoRefreshTicker = null;
+ if (ticker) {
+ clearInterval(ticker);
+ }
+ }
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ async startAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._startAutoRefresh();
+ }
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ async stopAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._stopAutoRefresh();
+ }
+ /**
+ * Runs the auto refresh token tick.
+ */
+ async _autoRefreshTokenTick() {
+ this._debug('#_autoRefreshTokenTick()', 'begin');
+ try {
+ await this._acquireLock(0, async () => {
+ try {
+ const now = Date.now();
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, } = result;
+ if (!session || !session.refresh_token || !session.expires_at) {
+ this._debug('#_autoRefreshTokenTick()', 'no session');
+ return;
+ }
+ // session will expire in this many ticks (or has already expired if <= 0)
+ const expiresInTicks = Math.floor((session.expires_at * 1000 - now) / AUTO_REFRESH_TICK_DURATION);
+ this._debug('#_autoRefreshTokenTick()', `access token expires in ${expiresInTicks} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`);
+ if (expiresInTicks <= AUTO_REFRESH_TICK_THRESHOLD) {
+ await this._callRefreshToken(session.refresh_token);
+ }
+ });
+ }
+ catch (e) {
+ console.error('Auto refresh tick failed with error. This is likely a transient error.', e);
+ }
+ }
+ finally {
+ this._debug('#_autoRefreshTokenTick()', 'end');
+ }
+ });
+ }
+ catch (e) {
+ if (e.isAcquireTimeout || e instanceof locks_1.LockAcquireTimeoutError) {
+ this._debug('auto refresh token tick lock not available');
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ async _handleVisibilityChange() {
+ this._debug('#_handleVisibilityChange()');
+ if (!(0, helpers_1.isBrowser)() || !(window === null || window === void 0 ? void 0 : window.addEventListener)) {
+ if (this.autoRefreshToken) {
+ // in non-browser environments the refresh token ticker runs always
+ this.startAutoRefresh();
+ }
+ return false;
+ }
+ try {
+ this.visibilityChangedCallback = async () => await this._onVisibilityChanged(false);
+ window === null || window === void 0 ? void 0 : window.addEventListener('visibilitychange', this.visibilityChangedCallback);
+ // now immediately call the visbility changed callback to setup with the
+ // current visbility state
+ await this._onVisibilityChanged(true); // initial call
+ }
+ catch (error) {
+ console.error('_handleVisibilityChange', error);
+ }
+ }
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ async _onVisibilityChanged(calledFromInitialize) {
+ const methodName = `#_onVisibilityChanged(${calledFromInitialize})`;
+ this._debug(methodName, 'visibilityState', document.visibilityState);
+ if (document.visibilityState === 'visible') {
+ if (this.autoRefreshToken) {
+ // in browser environments the refresh token ticker runs only on focused tabs
+ // which prevents race conditions
+ this._startAutoRefresh();
+ }
+ if (!calledFromInitialize) {
+ // called when the visibility has changed, i.e. the browser
+ // transitioned from hidden -> visible so we need to see if the session
+ // should be recovered immediately... but to do that we need to acquire
+ // the lock first asynchronously
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ if (document.visibilityState !== 'visible') {
+ this._debug(methodName, 'acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting');
+ // visibility has changed while waiting for the lock, abort
+ return;
+ }
+ // recover the session
+ await this._recoverAndRefresh();
+ });
+ }
+ }
+ else if (document.visibilityState === 'hidden') {
+ if (this.autoRefreshToken) {
+ this._stopAutoRefresh();
+ }
+ }
+ }
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ async _getUrlForProvider(url, provider, options) {
+ const urlParams = [`provider=${encodeURIComponent(provider)}`];
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`);
+ }
+ if (options === null || options === void 0 ? void 0 : options.scopes) {
+ urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);
+ }
+ if (this.flowType === 'pkce') {
+ const [codeChallenge, codeChallengeMethod] = await (0, helpers_1.getCodeChallengeAndMethod)(this.storage, this.storageKey);
+ const flowParams = new URLSearchParams({
+ code_challenge: `${encodeURIComponent(codeChallenge)}`,
+ code_challenge_method: `${encodeURIComponent(codeChallengeMethod)}`,
+ });
+ urlParams.push(flowParams.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.queryParams) {
+ const query = new URLSearchParams(options.queryParams);
+ urlParams.push(query.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.skipBrowserRedirect) {
+ urlParams.push(`skip_http_redirect=${options.skipBrowserRedirect}`);
+ }
+ return `${url}?${urlParams.join('&')}`;
+ }
+ async _unenroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ return await (0, fetch_1._request)(this.fetch, 'DELETE', `${this.url}/factors/${params.factorId}`, {
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _enroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ const body = Object.assign({ friendly_name: params.friendlyName, factor_type: params.factorType }, (params.factorType === 'phone' ? { phone: params.phone } : { issuer: params.issuer }));
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return { data: null, error };
+ }
+ if (params.factorType === 'totp' && ((_b = data === null || data === void 0 ? void 0 : data.totp) === null || _b === void 0 ? void 0 : _b.qr_code)) {
+ data.totp.qr_code = `data:image/svg+xml;utf-8,${data.totp.qr_code}`;
+ }
+ return { data, error: null };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * {@see GoTrueMFAApi#verify}
+ */
+ async _verify(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ const { data, error } = await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/verify`, {
+ body: { code: params.code, challenge_id: params.challengeId },
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return { data: null, error };
+ }
+ await this._saveSession(Object.assign({ expires_at: Math.round(Date.now() / 1000) + data.expires_in }, data));
+ await this._notifyAllSubscribers('MFA_CHALLENGE_VERIFIED', data);
+ return { data, error };
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challenge}
+ */
+ async _challenge(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ return await (0, fetch_1._request)(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/challenge`, {
+ body: { channel: params.channel },
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if ((0, errors_1.isAuthError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ async _challengeAndVerify(params) {
+ // both _challenge and _verify independently acquire the lock, so no need
+ // to acquire it here
+ const { data: challengeData, error: challengeError } = await this._challenge({
+ factorId: params.factorId,
+ });
+ if (challengeError) {
+ return { data: null, error: challengeError };
+ }
+ return await this._verify({
+ factorId: params.factorId,
+ challengeId: challengeData.id,
+ code: params.code,
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ async _listFactors() {
+ // use #getUser instead of #_getUser as the former acquires a lock
+ const { data: { user }, error: userError, } = await this.getUser();
+ if (userError) {
+ return { data: null, error: userError };
+ }
+ const factors = (user === null || user === void 0 ? void 0 : user.factors) || [];
+ const totp = factors.filter((factor) => factor.factor_type === 'totp' && factor.status === 'verified');
+ const phone = factors.filter((factor) => factor.factor_type === 'phone' && factor.status === 'verified');
+ return {
+ data: {
+ all: factors,
+ totp,
+ phone,
+ },
+ error: null,
+ };
+ }
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ async _getAuthenticatorAssuranceLevel() {
+ return this._acquireLock(-1, async () => {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ if (!session) {
+ return {
+ data: { currentLevel: null, nextLevel: null, currentAuthenticationMethods: [] },
+ error: null,
+ };
+ }
+ const payload = this._decodeJWT(session.access_token);
+ let currentLevel = null;
+ if (payload.aal) {
+ currentLevel = payload.aal;
+ }
+ let nextLevel = currentLevel;
+ const verifiedFactors = (_b = (_a = session.user.factors) === null || _a === void 0 ? void 0 : _a.filter((factor) => factor.status === 'verified')) !== null && _b !== void 0 ? _b : [];
+ if (verifiedFactors.length > 0) {
+ nextLevel = 'aal2';
+ }
+ const currentAuthenticationMethods = payload.amr || [];
+ return { data: { currentLevel, nextLevel, currentAuthenticationMethods }, error: null };
+ });
+ });
+ }
+}
+exports.default = GoTrueClient;
+GoTrueClient.nextInstanceID = 0;
+//# sourceMappingURL=GoTrueClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/index.js b/node_modules/@supabase/auth-js/dist/main/index.js
new file mode 100644
index 0000000..cf926b8
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/index.js
@@ -0,0 +1,35 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.lockInternals = exports.NavigatorLockAcquireTimeoutError = exports.navigatorLock = exports.AuthClient = exports.AuthAdminApi = exports.GoTrueClient = exports.GoTrueAdminApi = void 0;
+const GoTrueAdminApi_1 = __importDefault(require("./GoTrueAdminApi"));
+exports.GoTrueAdminApi = GoTrueAdminApi_1.default;
+const GoTrueClient_1 = __importDefault(require("./GoTrueClient"));
+exports.GoTrueClient = GoTrueClient_1.default;
+const AuthAdminApi_1 = __importDefault(require("./AuthAdminApi"));
+exports.AuthAdminApi = AuthAdminApi_1.default;
+const AuthClient_1 = __importDefault(require("./AuthClient"));
+exports.AuthClient = AuthClient_1.default;
+__exportStar(require("./lib/types"), exports);
+__exportStar(require("./lib/errors"), exports);
+var locks_1 = require("./lib/locks");
+Object.defineProperty(exports, "navigatorLock", { enumerable: true, get: function () { return locks_1.navigatorLock; } });
+Object.defineProperty(exports, "NavigatorLockAcquireTimeoutError", { enumerable: true, get: function () { return locks_1.NavigatorLockAcquireTimeoutError; } });
+Object.defineProperty(exports, "lockInternals", { enumerable: true, get: function () { return locks_1.internals; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/constants.js b/node_modules/@supabase/auth-js/dist/main/lib/constants.js
new file mode 100644
index 0000000..da83097
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/constants.js
@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.EXPIRY_MARGIN = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = void 0;
+const version_1 = require("./version");
+exports.GOTRUE_URL = 'http://localhost:9999';
+exports.STORAGE_KEY = 'supabase.auth.token';
+exports.AUDIENCE = '';
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `gotrue-js/${version_1.version}` };
+exports.EXPIRY_MARGIN = 10; // in seconds
+exports.NETWORK_FAILURE = {
+ MAX_RETRIES: 10,
+ RETRY_INTERVAL: 2, // in deciseconds
+};
+exports.API_VERSION_HEADER_NAME = 'X-Supabase-Api-Version';
+exports.API_VERSIONS = {
+ '2024-01-01': {
+ timestamp: Date.parse('2024-01-01T00:00:00.0Z'),
+ name: '2024-01-01',
+ },
+};
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js b/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js
new file mode 100644
index 0000000..afa679a
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=error-codes.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/errors.js b/node_modules/@supabase/auth-js/dist/main/lib/errors.js
new file mode 100644
index 0000000..2ca2c46
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/errors.js
@@ -0,0 +1,131 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isAuthWeakPasswordError = exports.AuthWeakPasswordError = exports.isAuthRetryableFetchError = exports.AuthRetryableFetchError = exports.AuthPKCEGrantCodeExchangeError = exports.isAuthImplicitGrantRedirectError = exports.AuthImplicitGrantRedirectError = exports.AuthInvalidCredentialsError = exports.AuthInvalidTokenResponseError = exports.isAuthSessionMissingError = exports.AuthSessionMissingError = exports.CustomAuthError = exports.AuthUnknownError = exports.isAuthApiError = exports.AuthApiError = exports.isAuthError = exports.AuthError = void 0;
+class AuthError extends Error {
+ constructor(message, status, code) {
+ super(message);
+ this.__isAuthError = true;
+ this.name = 'AuthError';
+ this.status = status;
+ this.code = code;
+ }
+}
+exports.AuthError = AuthError;
+function isAuthError(error) {
+ return typeof error === 'object' && error !== null && '__isAuthError' in error;
+}
+exports.isAuthError = isAuthError;
+class AuthApiError extends AuthError {
+ constructor(message, status, code) {
+ super(message, status, code);
+ this.name = 'AuthApiError';
+ this.status = status;
+ this.code = code;
+ }
+}
+exports.AuthApiError = AuthApiError;
+function isAuthApiError(error) {
+ return isAuthError(error) && error.name === 'AuthApiError';
+}
+exports.isAuthApiError = isAuthApiError;
+class AuthUnknownError extends AuthError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'AuthUnknownError';
+ this.originalError = originalError;
+ }
+}
+exports.AuthUnknownError = AuthUnknownError;
+class CustomAuthError extends AuthError {
+ constructor(message, name, status, code) {
+ super(message, status, code);
+ this.name = name;
+ this.status = status;
+ }
+}
+exports.CustomAuthError = CustomAuthError;
+class AuthSessionMissingError extends CustomAuthError {
+ constructor() {
+ super('Auth session missing!', 'AuthSessionMissingError', 400, undefined);
+ }
+}
+exports.AuthSessionMissingError = AuthSessionMissingError;
+function isAuthSessionMissingError(error) {
+ return isAuthError(error) && error.name === 'AuthSessionMissingError';
+}
+exports.isAuthSessionMissingError = isAuthSessionMissingError;
+class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor() {
+ super('Auth session or user missing', 'AuthInvalidTokenResponseError', 500, undefined);
+ }
+}
+exports.AuthInvalidTokenResponseError = AuthInvalidTokenResponseError;
+class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidCredentialsError', 400, undefined);
+ }
+}
+exports.AuthInvalidCredentialsError = AuthInvalidCredentialsError;
+class AuthImplicitGrantRedirectError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthImplicitGrantRedirectError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+exports.AuthImplicitGrantRedirectError = AuthImplicitGrantRedirectError;
+function isAuthImplicitGrantRedirectError(error) {
+ return isAuthError(error) && error.name === 'AuthImplicitGrantRedirectError';
+}
+exports.isAuthImplicitGrantRedirectError = isAuthImplicitGrantRedirectError;
+class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthPKCEGrantCodeExchangeError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+exports.AuthPKCEGrantCodeExchangeError = AuthPKCEGrantCodeExchangeError;
+class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message, status) {
+ super(message, 'AuthRetryableFetchError', status, undefined);
+ }
+}
+exports.AuthRetryableFetchError = AuthRetryableFetchError;
+function isAuthRetryableFetchError(error) {
+ return isAuthError(error) && error.name === 'AuthRetryableFetchError';
+}
+exports.isAuthRetryableFetchError = isAuthRetryableFetchError;
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+class AuthWeakPasswordError extends CustomAuthError {
+ constructor(message, status, reasons) {
+ super(message, 'AuthWeakPasswordError', status, 'weak_password');
+ this.reasons = reasons;
+ }
+}
+exports.AuthWeakPasswordError = AuthWeakPasswordError;
+function isAuthWeakPasswordError(error) {
+ return isAuthError(error) && error.name === 'AuthWeakPasswordError';
+}
+exports.isAuthWeakPasswordError = isAuthWeakPasswordError;
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/fetch.js b/node_modules/@supabase/auth-js/dist/main/lib/fetch.js
new file mode 100644
index 0000000..a844406
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/fetch.js
@@ -0,0 +1,195 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports._noResolveJsonResponse = exports._generateLinkResponse = exports._ssoResponse = exports._userResponse = exports._sessionResponsePassword = exports._sessionResponse = exports._request = exports.handleError = void 0;
+const constants_1 = require("./constants");
+const helpers_1 = require("./helpers");
+const errors_1 = require("./errors");
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const NETWORK_ERROR_CODES = [502, 503, 504];
+async function handleError(error) {
+ var _a;
+ if (!(0, helpers_1.looksLikeFetchResponse)(error)) {
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), 0);
+ }
+ if (NETWORK_ERROR_CODES.includes(error.status)) {
+ // status in 500...599 range - server had an error, request might be retryed.
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(error), error.status);
+ }
+ let data;
+ try {
+ data = await error.json();
+ }
+ catch (e) {
+ throw new errors_1.AuthUnknownError(_getErrorMessage(e), e);
+ }
+ let errorCode = undefined;
+ const responseAPIVersion = (0, helpers_1.parseResponseAPIVersion)(error);
+ if (responseAPIVersion &&
+ responseAPIVersion.getTime() >= constants_1.API_VERSIONS['2024-01-01'].timestamp &&
+ typeof data === 'object' &&
+ data &&
+ typeof data.code === 'string') {
+ errorCode = data.code;
+ }
+ else if (typeof data === 'object' && data && typeof data.error_code === 'string') {
+ errorCode = data.error_code;
+ }
+ if (!errorCode) {
+ // Legacy support for weak password errors, when there were no error codes
+ if (typeof data === 'object' &&
+ data &&
+ typeof data.weak_password === 'object' &&
+ data.weak_password &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, data.weak_password.reasons);
+ }
+ }
+ else if (errorCode === 'weak_password') {
+ throw new errors_1.AuthWeakPasswordError(_getErrorMessage(data), error.status, ((_a = data.weak_password) === null || _a === void 0 ? void 0 : _a.reasons) || []);
+ }
+ else if (errorCode === 'session_not_found') {
+ // The `session_id` inside the JWT does not correspond to a row in the
+ // `sessions` table. This usually means the user has signed out, has been
+ // deleted, or their session has somehow been terminated.
+ throw new errors_1.AuthSessionMissingError();
+ }
+ throw new errors_1.AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
+}
+exports.handleError = handleError;
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers);
+ params.body = JSON.stringify(body);
+ return Object.assign(Object.assign({}, params), parameters);
+};
+async function _request(fetcher, method, url, options) {
+ var _a;
+ const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers);
+ if (!headers[constants_1.API_VERSION_HEADER_NAME]) {
+ headers[constants_1.API_VERSION_HEADER_NAME] = constants_1.API_VERSIONS['2024-01-01'].name;
+ }
+ if (options === null || options === void 0 ? void 0 : options.jwt) {
+ headers['Authorization'] = `Bearer ${options.jwt}`;
+ }
+ const qs = (_a = options === null || options === void 0 ? void 0 : options.query) !== null && _a !== void 0 ? _a : {};
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ qs['redirect_to'] = options.redirectTo;
+ }
+ const queryString = Object.keys(qs).length ? '?' + new URLSearchParams(qs).toString() : '';
+ const data = await _handleRequest(fetcher, method, url + queryString, {
+ headers,
+ noResolveJson: options === null || options === void 0 ? void 0 : options.noResolveJson,
+ }, {}, options === null || options === void 0 ? void 0 : options.body);
+ return (options === null || options === void 0 ? void 0 : options.xform) ? options === null || options === void 0 ? void 0 : options.xform(data) : { data: Object.assign({}, data), error: null };
+}
+exports._request = _request;
+async function _handleRequest(fetcher, method, url, options, parameters, body) {
+ const requestParams = _getRequestParams(method, options, parameters, body);
+ let result;
+ try {
+ result = await fetcher(url, Object.assign({}, requestParams));
+ }
+ catch (e) {
+ console.error(e);
+ // fetch failed, likely due to a network or CORS error
+ throw new errors_1.AuthRetryableFetchError(_getErrorMessage(e), 0);
+ }
+ if (!result.ok) {
+ await handleError(result);
+ }
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson) {
+ return result;
+ }
+ try {
+ return await result.json();
+ }
+ catch (e) {
+ await handleError(e);
+ }
+}
+function _sessionResponse(data) {
+ var _a;
+ let session = null;
+ if (hasSession(data)) {
+ session = Object.assign({}, data);
+ if (!data.expires_at) {
+ session.expires_at = (0, helpers_1.expiresAt)(data.expires_in);
+ }
+ }
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { session, user }, error: null };
+}
+exports._sessionResponse = _sessionResponse;
+function _sessionResponsePassword(data) {
+ const response = _sessionResponse(data);
+ if (!response.error &&
+ data.weak_password &&
+ typeof data.weak_password === 'object' &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.message &&
+ typeof data.weak_password.message === 'string' &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ response.data.weak_password = data.weak_password;
+ }
+ return response;
+}
+exports._sessionResponsePassword = _sessionResponsePassword;
+function _userResponse(data) {
+ var _a;
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { user }, error: null };
+}
+exports._userResponse = _userResponse;
+function _ssoResponse(data) {
+ return { data, error: null };
+}
+exports._ssoResponse = _ssoResponse;
+function _generateLinkResponse(data) {
+ const { action_link, email_otp, hashed_token, redirect_to, verification_type } = data, rest = __rest(data, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]);
+ const properties = {
+ action_link,
+ email_otp,
+ hashed_token,
+ redirect_to,
+ verification_type,
+ };
+ const user = Object.assign({}, rest);
+ return {
+ data: {
+ properties,
+ user,
+ },
+ error: null,
+ };
+}
+exports._generateLinkResponse = _generateLinkResponse;
+function _noResolveJsonResponse(data) {
+ return data;
+}
+exports._noResolveJsonResponse = _noResolveJsonResponse;
+/**
+ * hasSession checks if the response object contains a valid session
+ * @param data A response object
+ * @returns true if a session is in the response
+ */
+function hasSession(data) {
+ return data.access_token && data.refresh_token && data.expires_in;
+}
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/helpers.js b/node_modules/@supabase/auth-js/dist/main/lib/helpers.js
new file mode 100644
index 0000000..2320d1c
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/helpers.js
@@ -0,0 +1,324 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.parseResponseAPIVersion = exports.getCodeChallengeAndMethod = exports.generatePKCEChallenge = exports.generatePKCEVerifier = exports.retryable = exports.sleep = exports.decodeJWTPayload = exports.Deferred = exports.decodeBase64URL = exports.removeItemAsync = exports.getItemAsync = exports.setItemAsync = exports.looksLikeFetchResponse = exports.resolveFetch = exports.parseParametersFromURL = exports.supportsLocalStorage = exports.isBrowser = exports.uuid = exports.expiresAt = void 0;
+const constants_1 = require("./constants");
+function expiresAt(expiresIn) {
+ const timeNow = Math.round(Date.now() / 1000);
+ return timeNow + expiresIn;
+}
+exports.expiresAt = expiresAt;
+function uuid() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
+ return v.toString(16);
+ });
+}
+exports.uuid = uuid;
+const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
+exports.isBrowser = isBrowser;
+const localStorageWriteTests = {
+ tested: false,
+ writable: false,
+};
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+const supportsLocalStorage = () => {
+ if (!(0, exports.isBrowser)()) {
+ return false;
+ }
+ try {
+ if (typeof globalThis.localStorage !== 'object') {
+ return false;
+ }
+ }
+ catch (e) {
+ // DOM exception when accessing `localStorage`
+ return false;
+ }
+ if (localStorageWriteTests.tested) {
+ return localStorageWriteTests.writable;
+ }
+ const randomKey = `lswt-${Math.random()}${Math.random()}`;
+ try {
+ globalThis.localStorage.setItem(randomKey, randomKey);
+ globalThis.localStorage.removeItem(randomKey);
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = true;
+ }
+ catch (e) {
+ // localStorage can't be written to
+ // https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = false;
+ }
+ return localStorageWriteTests.writable;
+};
+exports.supportsLocalStorage = supportsLocalStorage;
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+function parseParametersFromURL(href) {
+ const result = {};
+ const url = new URL(href);
+ if (url.hash && url.hash[0] === '#') {
+ try {
+ const hashSearchParams = new URLSearchParams(url.hash.substring(1));
+ hashSearchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ }
+ catch (e) {
+ // hash is not a query string
+ }
+ }
+ // search parameters take precedence over hash parameters
+ url.searchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ return result;
+}
+exports.parseParametersFromURL = parseParametersFromURL;
+const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => Promise.resolve().then(() => __importStar(require('@supabase/node-fetch'))).then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+exports.resolveFetch = resolveFetch;
+const looksLikeFetchResponse = (maybeResponse) => {
+ return (typeof maybeResponse === 'object' &&
+ maybeResponse !== null &&
+ 'status' in maybeResponse &&
+ 'ok' in maybeResponse &&
+ 'json' in maybeResponse &&
+ typeof maybeResponse.json === 'function');
+};
+exports.looksLikeFetchResponse = looksLikeFetchResponse;
+// Storage helpers
+const setItemAsync = async (storage, key, data) => {
+ await storage.setItem(key, JSON.stringify(data));
+};
+exports.setItemAsync = setItemAsync;
+const getItemAsync = async (storage, key) => {
+ const value = await storage.getItem(key);
+ if (!value) {
+ return null;
+ }
+ try {
+ return JSON.parse(value);
+ }
+ catch (_a) {
+ return value;
+ }
+};
+exports.getItemAsync = getItemAsync;
+const removeItemAsync = async (storage, key) => {
+ await storage.removeItem(key);
+};
+exports.removeItemAsync = removeItemAsync;
+function decodeBase64URL(value) {
+ const key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ let base64 = '';
+ let chr1, chr2, chr3;
+ let enc1, enc2, enc3, enc4;
+ let i = 0;
+ value = value.replace('-', '+').replace('_', '/');
+ while (i < value.length) {
+ enc1 = key.indexOf(value.charAt(i++));
+ enc2 = key.indexOf(value.charAt(i++));
+ enc3 = key.indexOf(value.charAt(i++));
+ enc4 = key.indexOf(value.charAt(i++));
+ chr1 = (enc1 << 2) | (enc2 >> 4);
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+ chr3 = ((enc3 & 3) << 6) | enc4;
+ base64 = base64 + String.fromCharCode(chr1);
+ if (enc3 != 64 && chr2 != 0) {
+ base64 = base64 + String.fromCharCode(chr2);
+ }
+ if (enc4 != 64 && chr3 != 0) {
+ base64 = base64 + String.fromCharCode(chr3);
+ }
+ }
+ return base64;
+}
+exports.decodeBase64URL = decodeBase64URL;
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+class Deferred {
+ constructor() {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.promise = new Deferred.promiseConstructor((res, rej) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.resolve = res;
+ this.reject = rej;
+ });
+ }
+}
+exports.Deferred = Deferred;
+Deferred.promiseConstructor = Promise;
+// Taken from: https://stackoverflow.com/questions/38552003/how-to-decode-jwt-token-in-javascript-without-using-a-library
+function decodeJWTPayload(token) {
+ // Regex checks for base64url format
+ const base64UrlRegex = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i;
+ const parts = token.split('.');
+ if (parts.length !== 3) {
+ throw new Error('JWT is not valid: not a JWT structure');
+ }
+ if (!base64UrlRegex.test(parts[1])) {
+ throw new Error('JWT is not valid: payload is not in base64url format');
+ }
+ const base64Url = parts[1];
+ return JSON.parse(decodeBase64URL(base64Url));
+}
+exports.decodeJWTPayload = decodeJWTPayload;
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+async function sleep(time) {
+ return await new Promise((accept) => {
+ setTimeout(() => accept(null), time);
+ });
+}
+exports.sleep = sleep;
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+function retryable(fn, isRetryable) {
+ const promise = new Promise((accept, reject) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ (async () => {
+ for (let attempt = 0; attempt < Infinity; attempt++) {
+ try {
+ const result = await fn(attempt);
+ if (!isRetryable(attempt, null, result)) {
+ accept(result);
+ return;
+ }
+ }
+ catch (e) {
+ if (!isRetryable(attempt, e)) {
+ reject(e);
+ return;
+ }
+ }
+ }
+ })();
+ });
+ return promise;
+}
+exports.retryable = retryable;
+function dec2hex(dec) {
+ return ('0' + dec.toString(16)).substr(-2);
+}
+// Functions below taken from: https://stackoverflow.com/questions/63309409/creating-a-code-verifier-and-challenge-for-pkce-auth-on-spotify-api-in-reactjs
+function generatePKCEVerifier() {
+ const verifierLength = 56;
+ const array = new Uint32Array(verifierLength);
+ if (typeof crypto === 'undefined') {
+ const charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';
+ const charSetLen = charSet.length;
+ let verifier = '';
+ for (let i = 0; i < verifierLength; i++) {
+ verifier += charSet.charAt(Math.floor(Math.random() * charSetLen));
+ }
+ return verifier;
+ }
+ crypto.getRandomValues(array);
+ return Array.from(array, dec2hex).join('');
+}
+exports.generatePKCEVerifier = generatePKCEVerifier;
+async function sha256(randomString) {
+ const encoder = new TextEncoder();
+ const encodedData = encoder.encode(randomString);
+ const hash = await crypto.subtle.digest('SHA-256', encodedData);
+ const bytes = new Uint8Array(hash);
+ return Array.from(bytes)
+ .map((c) => String.fromCharCode(c))
+ .join('');
+}
+function base64urlencode(str) {
+ return btoa(str).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
+}
+async function generatePKCEChallenge(verifier) {
+ const hasCryptoSupport = typeof crypto !== 'undefined' &&
+ typeof crypto.subtle !== 'undefined' &&
+ typeof TextEncoder !== 'undefined';
+ if (!hasCryptoSupport) {
+ console.warn('WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.');
+ return verifier;
+ }
+ const hashed = await sha256(verifier);
+ return base64urlencode(hashed);
+}
+exports.generatePKCEChallenge = generatePKCEChallenge;
+async function getCodeChallengeAndMethod(storage, storageKey, isPasswordRecovery = false) {
+ const codeVerifier = generatePKCEVerifier();
+ let storedCodeVerifier = codeVerifier;
+ if (isPasswordRecovery) {
+ storedCodeVerifier += '/PASSWORD_RECOVERY';
+ }
+ await (0, exports.setItemAsync)(storage, `${storageKey}-code-verifier`, storedCodeVerifier);
+ const codeChallenge = await generatePKCEChallenge(codeVerifier);
+ const codeChallengeMethod = codeVerifier === codeChallenge ? 'plain' : 's256';
+ return [codeChallenge, codeChallengeMethod];
+}
+exports.getCodeChallengeAndMethod = getCodeChallengeAndMethod;
+/** Parses the API version which is 2YYY-MM-DD. */
+const API_VERSION_REGEX = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
+function parseResponseAPIVersion(response) {
+ const apiVersion = response.headers.get(constants_1.API_VERSION_HEADER_NAME);
+ if (!apiVersion) {
+ return null;
+ }
+ if (!apiVersion.match(API_VERSION_REGEX)) {
+ return null;
+ }
+ try {
+ const date = new Date(`${apiVersion}T00:00:00.0Z`);
+ return date;
+ }
+ catch (e) {
+ return null;
+ }
+}
+exports.parseResponseAPIVersion = parseResponseAPIVersion;
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/internal-types.js b/node_modules/@supabase/auth-js/dist/main/lib/internal-types.js
new file mode 100644
index 0000000..0d014f4
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/internal-types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=internal-types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js b/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
new file mode 100644
index 0000000..39425da
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js
@@ -0,0 +1,46 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.memoryLocalStorageAdapter = exports.localStorageAdapter = void 0;
+const helpers_1 = require("./helpers");
+/**
+ * Provides safe access to the globalThis.localStorage property.
+ */
+exports.localStorageAdapter = {
+ getItem: (key) => {
+ if (!(0, helpers_1.supportsLocalStorage)()) {
+ return null;
+ }
+ return globalThis.localStorage.getItem(key);
+ },
+ setItem: (key, value) => {
+ if (!(0, helpers_1.supportsLocalStorage)()) {
+ return;
+ }
+ globalThis.localStorage.setItem(key, value);
+ },
+ removeItem: (key) => {
+ if (!(0, helpers_1.supportsLocalStorage)()) {
+ return;
+ }
+ globalThis.localStorage.removeItem(key);
+ },
+};
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+function memoryLocalStorageAdapter(store = {}) {
+ return {
+ getItem: (key) => {
+ return store[key] || null;
+ },
+ setItem: (key, value) => {
+ store[key] = value;
+ },
+ removeItem: (key) => {
+ delete store[key];
+ },
+ };
+}
+exports.memoryLocalStorageAdapter = memoryLocalStorageAdapter;
+//# sourceMappingURL=local-storage.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/locks.js b/node_modules/@supabase/auth-js/dist/main/lib/locks.js
new file mode 100644
index 0000000..a9953b8
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/locks.js
@@ -0,0 +1,187 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.processLock = exports.navigatorLock = exports.ProcessLockAcquireTimeoutError = exports.NavigatorLockAcquireTimeoutError = exports.LockAcquireTimeoutError = exports.internals = void 0;
+const helpers_1 = require("./helpers");
+/**
+ * @experimental
+ */
+exports.internals = {
+ /**
+ * @experimental
+ */
+ debug: !!(globalThis &&
+ (0, helpers_1.supportsLocalStorage)() &&
+ globalThis.localStorage &&
+ globalThis.localStorage.getItem('supabase.gotrue-js.locks.debug') === 'true'),
+};
+/**
+ * An error thrown when a lock cannot be acquired after some amount of time.
+ *
+ * Use the {@link #isAcquireTimeout} property instead of checking with `instanceof`.
+ */
+class LockAcquireTimeoutError extends Error {
+ constructor(message) {
+ super(message);
+ this.isAcquireTimeout = true;
+ }
+}
+exports.LockAcquireTimeoutError = LockAcquireTimeoutError;
+class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+exports.NavigatorLockAcquireTimeoutError = NavigatorLockAcquireTimeoutError;
+class ProcessLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+exports.ProcessLockAcquireTimeoutError = ProcessLockAcquireTimeoutError;
+/**
+ * Implements a global exclusive lock using the Navigator LockManager API. It
+ * is available on all browsers released after 2022-03-15 with Safari being the
+ * last one to release support. If the API is not available, this function will
+ * throw. Make sure you check availablility before configuring {@link
+ * GoTrueClient}.
+ *
+ * You can turn on debugging by setting the `supabase.gotrue-js.locks.debug`
+ * local storage item to `true`.
+ *
+ * Internals:
+ *
+ * Since the LockManager API does not preserve stack traces for the async
+ * function passed in the `request` method, a trick is used where acquiring the
+ * lock releases a previously started promise to run the operation in the `fn`
+ * function. The lock waits for that promise to finish (with or without error),
+ * while the function will finally wait for the result anyway.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ */
+async function navigatorLock(name, acquireTimeout, fn) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquire lock', name, acquireTimeout);
+ }
+ const abortController = new globalThis.AbortController();
+ if (acquireTimeout > 0) {
+ setTimeout(() => {
+ abortController.abort();
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock acquire timed out', name);
+ }
+ }, acquireTimeout);
+ }
+ // MDN article: https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request
+ // Wrapping navigator.locks.request() with a plain Promise is done as some
+ // libraries like zone.js patch the Promise object to track the execution
+ // context. However, it appears that most browsers use an internal promise
+ // implementation when using the navigator.locks.request() API causing them
+ // to lose context and emit confusing log messages or break certain features.
+ // This wrapping is believed to help zone.js track the execution context
+ // better.
+ return await Promise.resolve().then(() => globalThis.navigator.locks.request(name, acquireTimeout === 0
+ ? {
+ mode: 'exclusive',
+ ifAvailable: true,
+ }
+ : {
+ mode: 'exclusive',
+ signal: abortController.signal,
+ }, async (lock) => {
+ if (lock) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquired', name, lock.name);
+ }
+ try {
+ return await fn();
+ }
+ finally {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: released', name, lock.name);
+ }
+ }
+ }
+ else {
+ if (acquireTimeout === 0) {
+ if (exports.internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: not immediately available', name);
+ }
+ throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`);
+ }
+ else {
+ if (exports.internals.debug) {
+ try {
+ const result = await globalThis.navigator.locks.query();
+ console.log('@supabase/gotrue-js: Navigator LockManager state', JSON.stringify(result, null, ' '));
+ }
+ catch (e) {
+ console.warn('@supabase/gotrue-js: Error when querying Navigator LockManager state', e);
+ }
+ }
+ // Browser is not following the Navigator LockManager spec, it
+ // returned a null lock when we didn't use ifAvailable. So we can
+ // pretend the lock is acquired in the name of backward compatibility
+ // and user experience and just run the function.
+ console.warn('@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request');
+ return await fn();
+ }
+ }
+ }));
+}
+exports.navigatorLock = navigatorLock;
+const PROCESS_LOCKS = {};
+/**
+ * Implements a global exclusive lock that works only in the current process.
+ * Useful for environments like React Native or other non-browser
+ * single-process (i.e. no concept of "tabs") environments.
+ *
+ * Use {@link #navigatorLock} in browser environments.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ */
+async function processLock(name, acquireTimeout, fn) {
+ var _a;
+ const previousOperation = (_a = PROCESS_LOCKS[name]) !== null && _a !== void 0 ? _a : Promise.resolve();
+ const currentOperation = Promise.race([
+ previousOperation.catch(() => {
+ // ignore error of previous operation that we're waiting to finish
+ return null;
+ }),
+ acquireTimeout >= 0
+ ? new Promise((_, reject) => {
+ setTimeout(() => {
+ reject(new ProcessLockAcquireTimeoutError(`Acquring process lock with name "${name}" timed out`));
+ }, acquireTimeout);
+ })
+ : null,
+ ].filter((x) => x))
+ .catch((e) => {
+ if (e && e.isAcquireTimeout) {
+ throw e;
+ }
+ return null;
+ })
+ .then(async () => {
+ // previous operations finished and we didn't get a race on the acquire
+ // timeout, so the current operation can finally start
+ return await fn();
+ });
+ PROCESS_LOCKS[name] = currentOperation.catch(async (e) => {
+ if (e && e.isAcquireTimeout) {
+ // if the current operation timed out, it doesn't mean that the previous
+ // operation finished, so we need contnue waiting for it to finish
+ await previousOperation;
+ return null;
+ }
+ throw e;
+ });
+ // finally wait for the current operation to finish successfully, with an
+ // error or with an acquire timeout error
+ return await currentOperation;
+}
+exports.processLock = processLock;
+//# sourceMappingURL=locks.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js b/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
new file mode 100644
index 0000000..9e146fc
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js
@@ -0,0 +1,30 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.polyfillGlobalThis = void 0;
+/**
+ * https://mathiasbynens.be/notes/globalthis
+ */
+function polyfillGlobalThis() {
+ if (typeof globalThis === 'object')
+ return;
+ try {
+ Object.defineProperty(Object.prototype, '__magic__', {
+ get: function () {
+ return this;
+ },
+ configurable: true,
+ });
+ // @ts-expect-error 'Allow access to magic'
+ __magic__.globalThis = __magic__;
+ // @ts-expect-error 'Allow access to magic'
+ delete Object.prototype.__magic__;
+ }
+ catch (e) {
+ if (typeof self !== 'undefined') {
+ // @ts-expect-error 'Allow access to globals'
+ self.globalThis = self;
+ }
+ }
+}
+exports.polyfillGlobalThis = polyfillGlobalThis;
+//# sourceMappingURL=polyfills.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/types.js b/node_modules/@supabase/auth-js/dist/main/lib/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/main/lib/version.js b/node_modules/@supabase/auth-js/dist/main/lib/version.js
new file mode 100644
index 0000000..3f31450
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/main/lib/version.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+exports.version = '2.67.3';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js b/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js
new file mode 100644
index 0000000..339c7ab
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js
@@ -0,0 +1,4 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+const AuthAdminApi = GoTrueAdminApi;
+export default AuthAdminApi;
+//# sourceMappingURL=AuthAdminApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/AuthClient.js b/node_modules/@supabase/auth-js/dist/module/AuthClient.js
new file mode 100644
index 0000000..03bd60d
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/AuthClient.js
@@ -0,0 +1,4 @@
+import GoTrueClient from './GoTrueClient';
+const AuthClient = GoTrueClient;
+export default AuthClient;
+//# sourceMappingURL=AuthClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js b/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js
new file mode 100644
index 0000000..e05a35b
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js
@@ -0,0 +1,265 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+import { _generateLinkResponse, _noResolveJsonResponse, _request, _userResponse, } from './lib/fetch';
+import { resolveFetch } from './lib/helpers';
+import { isAuthError } from './lib/errors';
+export default class GoTrueAdminApi {
+ constructor({ url = '', headers = {}, fetch, }) {
+ this.url = url;
+ this.headers = headers;
+ this.fetch = resolveFetch(fetch);
+ this.mfa = {
+ listFactors: this._listFactors.bind(this),
+ deleteFactor: this._deleteFactor.bind(this),
+ };
+ }
+ /**
+ * Removes a logged-in session.
+ * @param jwt A valid, logged-in JWT.
+ * @param scope The logout sope.
+ */
+ async signOut(jwt, scope = 'global') {
+ try {
+ await _request(this.fetch, 'POST', `${this.url}/logout?scope=${scope}`, {
+ headers: this.headers,
+ jwt,
+ noResolveJson: true,
+ });
+ return { data: null, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends an invite link to an email address.
+ * @param email The email address of the user.
+ * @param options Additional options to be included when inviting.
+ */
+ async inviteUserByEmail(email, options = {}) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/invite`, {
+ body: { email, data: options.data },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates email links and OTPs to be sent via a custom email provider.
+ * @param email The user's email.
+ * @param options.password User password. For signup only.
+ * @param options.data Optional user metadata. For signup only.
+ * @param options.redirectTo The redirect url which should be appended to the generated link
+ */
+ async generateLink(params) {
+ try {
+ const { options } = params, rest = __rest(params, ["options"]);
+ const body = Object.assign(Object.assign({}, rest), options);
+ if ('newEmail' in rest) {
+ // replace newEmail with new_email in request body
+ body.new_email = rest === null || rest === void 0 ? void 0 : rest.newEmail;
+ delete body['newEmail'];
+ }
+ return await _request(this.fetch, 'POST', `${this.url}/admin/generate_link`, {
+ body: body,
+ headers: this.headers,
+ xform: _generateLinkResponse,
+ redirectTo: options === null || options === void 0 ? void 0 : options.redirectTo,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return {
+ data: {
+ properties: null,
+ user: null,
+ },
+ error,
+ };
+ }
+ throw error;
+ }
+ }
+ // User Admin API
+ /**
+ * Creates a new user.
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async createUser(attributes) {
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/admin/users`, {
+ body: attributes,
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get a list of users.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ * @param params An object which supports `page` and `perPage` as numbers, to alter the paginated results.
+ */
+ async listUsers(params) {
+ var _a, _b, _c, _d, _e, _f, _g;
+ try {
+ const pagination = { nextPage: null, lastPage: 0, total: 0 };
+ const response = await _request(this.fetch, 'GET', `${this.url}/admin/users`, {
+ headers: this.headers,
+ noResolveJson: true,
+ query: {
+ page: (_b = (_a = params === null || params === void 0 ? void 0 : params.page) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '',
+ per_page: (_d = (_c = params === null || params === void 0 ? void 0 : params.perPage) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '',
+ },
+ xform: _noResolveJsonResponse,
+ });
+ if (response.error)
+ throw response.error;
+ const users = await response.json();
+ const total = (_e = response.headers.get('x-total-count')) !== null && _e !== void 0 ? _e : 0;
+ const links = (_g = (_f = response.headers.get('link')) === null || _f === void 0 ? void 0 : _f.split(',')) !== null && _g !== void 0 ? _g : [];
+ if (links.length > 0) {
+ links.forEach((link) => {
+ const page = parseInt(link.split(';')[0].split('=')[1].substring(0, 1));
+ const rel = JSON.parse(link.split(';')[1].split('=')[1]);
+ pagination[`${rel}Page`] = page;
+ });
+ pagination.total = parseInt(total);
+ }
+ return { data: Object.assign(Object.assign({}, users), pagination), error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { users: [] }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Get user by id.
+ *
+ * @param uid The user's unique identifier
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async getUserById(uid) {
+ try {
+ return await _request(this.fetch, 'GET', `${this.url}/admin/users/${uid}`, {
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates the user data.
+ *
+ * @param attributes The data you want to update.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async updateUserById(uid, attributes) {
+ try {
+ return await _request(this.fetch, 'PUT', `${this.url}/admin/users/${uid}`, {
+ body: attributes,
+ headers: this.headers,
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Delete a user. Requires a `service_role` key.
+ *
+ * @param id The user id you want to remove.
+ * @param shouldSoftDelete If true, then the user will be soft-deleted from the auth schema. Soft deletion allows user identification from the hashed user ID but is not reversible.
+ * Defaults to false for backward compatibility.
+ *
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
+ */
+ async deleteUser(id, shouldSoftDelete = false) {
+ try {
+ return await _request(this.fetch, 'DELETE', `${this.url}/admin/users/${id}`, {
+ headers: this.headers,
+ body: {
+ should_soft_delete: shouldSoftDelete,
+ },
+ xform: _userResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ async _listFactors(params) {
+ try {
+ const { data, error } = await _request(this.fetch, 'GET', `${this.url}/admin/users/${params.userId}/factors`, {
+ headers: this.headers,
+ xform: (factors) => {
+ return { data: { factors }, error: null };
+ },
+ });
+ return { data, error };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _deleteFactor(params) {
+ try {
+ const data = await _request(this.fetch, 'DELETE', `${this.url}/admin/users/${params.userId}/factors/${params.id}`, {
+ headers: this.headers,
+ });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+}
+//# sourceMappingURL=GoTrueAdminApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js b/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js
new file mode 100644
index 0000000..5a5923b
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js
@@ -0,0 +1,1980 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import { DEFAULT_HEADERS, EXPIRY_MARGIN, GOTRUE_URL, STORAGE_KEY } from './lib/constants';
+import { AuthImplicitGrantRedirectError, AuthPKCEGrantCodeExchangeError, AuthInvalidCredentialsError, AuthSessionMissingError, AuthInvalidTokenResponseError, AuthUnknownError, isAuthApiError, isAuthError, isAuthRetryableFetchError, isAuthSessionMissingError, isAuthImplicitGrantRedirectError, } from './lib/errors';
+import { _request, _sessionResponse, _sessionResponsePassword, _userResponse, _ssoResponse, } from './lib/fetch';
+import { decodeJWTPayload, Deferred, getItemAsync, isBrowser, removeItemAsync, resolveFetch, setItemAsync, uuid, retryable, sleep, supportsLocalStorage, parseParametersFromURL, getCodeChallengeAndMethod, } from './lib/helpers';
+import { localStorageAdapter, memoryLocalStorageAdapter } from './lib/local-storage';
+import { polyfillGlobalThis } from './lib/polyfills';
+import { version } from './lib/version';
+import { LockAcquireTimeoutError, navigatorLock } from './lib/locks';
+polyfillGlobalThis(); // Make "globalThis" available
+const DEFAULT_OPTIONS = {
+ url: GOTRUE_URL,
+ storageKey: STORAGE_KEY,
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ headers: DEFAULT_HEADERS,
+ flowType: 'implicit',
+ debug: false,
+ hasCustomAuthorizationHeader: false,
+};
+/** Current session will be checked for refresh at this interval. */
+const AUTO_REFRESH_TICK_DURATION = 30 * 1000;
+/**
+ * A token refresh will be attempted this many ticks before the current session expires. */
+const AUTO_REFRESH_TICK_THRESHOLD = 3;
+async function lockNoOp(name, acquireTimeout, fn) {
+ return await fn();
+}
+export default class GoTrueClient {
+ /**
+ * Create a new client for use in the browser.
+ */
+ constructor(options) {
+ var _a, _b;
+ this.memoryStorage = null;
+ this.stateChangeEmitters = new Map();
+ this.autoRefreshTicker = null;
+ this.visibilityChangedCallback = null;
+ this.refreshingDeferred = null;
+ /**
+ * Keeps track of the async client initialization.
+ * When null or not yet resolved the auth state is `unknown`
+ * Once resolved the the auth state is known and it's save to call any further client methods.
+ * Keep extra care to never reject or throw uncaught errors
+ */
+ this.initializePromise = null;
+ this.detectSessionInUrl = true;
+ this.hasCustomAuthorizationHeader = false;
+ this.suppressGetSessionWarning = false;
+ this.lockAcquired = false;
+ this.pendingInLock = [];
+ /**
+ * Used to broadcast state change events to other tabs listening.
+ */
+ this.broadcastChannel = null;
+ this.logger = console.log;
+ this.instanceID = GoTrueClient.nextInstanceID;
+ GoTrueClient.nextInstanceID += 1;
+ if (this.instanceID > 0 && isBrowser()) {
+ console.warn('Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.');
+ }
+ const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);
+ this.logDebugMessages = !!settings.debug;
+ if (typeof settings.debug === 'function') {
+ this.logger = settings.debug;
+ }
+ this.persistSession = settings.persistSession;
+ this.storageKey = settings.storageKey;
+ this.autoRefreshToken = settings.autoRefreshToken;
+ this.admin = new GoTrueAdminApi({
+ url: settings.url,
+ headers: settings.headers,
+ fetch: settings.fetch,
+ });
+ this.url = settings.url;
+ this.headers = settings.headers;
+ this.fetch = resolveFetch(settings.fetch);
+ this.lock = settings.lock || lockNoOp;
+ this.detectSessionInUrl = settings.detectSessionInUrl;
+ this.flowType = settings.flowType;
+ this.hasCustomAuthorizationHeader = settings.hasCustomAuthorizationHeader;
+ if (settings.lock) {
+ this.lock = settings.lock;
+ }
+ else if (isBrowser() && ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) === null || _a === void 0 ? void 0 : _a.locks)) {
+ this.lock = navigatorLock;
+ }
+ else {
+ this.lock = lockNoOp;
+ }
+ this.mfa = {
+ verify: this._verify.bind(this),
+ enroll: this._enroll.bind(this),
+ unenroll: this._unenroll.bind(this),
+ challenge: this._challenge.bind(this),
+ listFactors: this._listFactors.bind(this),
+ challengeAndVerify: this._challengeAndVerify.bind(this),
+ getAuthenticatorAssuranceLevel: this._getAuthenticatorAssuranceLevel.bind(this),
+ };
+ if (this.persistSession) {
+ if (settings.storage) {
+ this.storage = settings.storage;
+ }
+ else {
+ if (supportsLocalStorage()) {
+ this.storage = localStorageAdapter;
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
+ }
+ }
+ }
+ else {
+ this.memoryStorage = {};
+ this.storage = memoryLocalStorageAdapter(this.memoryStorage);
+ }
+ if (isBrowser() && globalThis.BroadcastChannel && this.persistSession && this.storageKey) {
+ try {
+ this.broadcastChannel = new globalThis.BroadcastChannel(this.storageKey);
+ }
+ catch (e) {
+ console.error('Failed to create a new BroadcastChannel, multi-tab state changes will not be available', e);
+ }
+ (_b = this.broadcastChannel) === null || _b === void 0 ? void 0 : _b.addEventListener('message', async (event) => {
+ this._debug('received broadcast notification from other tab or client', event);
+ await this._notifyAllSubscribers(event.data.event, event.data.session, false); // broadcast = false so we don't get an endless loop of messages
+ });
+ }
+ this.initialize();
+ }
+ _debug(...args) {
+ if (this.logDebugMessages) {
+ this.logger(`GoTrueClient@${this.instanceID} (${version}) ${new Date().toISOString()}`, ...args);
+ }
+ return this;
+ }
+ /**
+ * Initializes the client session either from the url or from storage.
+ * This method is automatically called when instantiating the client, but should also be called
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
+ */
+ async initialize() {
+ if (this.initializePromise) {
+ return await this.initializePromise;
+ }
+ this.initializePromise = (async () => {
+ return await this._acquireLock(-1, async () => {
+ return await this._initialize();
+ });
+ })();
+ return await this.initializePromise;
+ }
+ /**
+ * IMPORTANT:
+ * 1. Never throw in this method, as it is called from the constructor
+ * 2. Never return a session from this method as it would be cached over
+ * the whole lifetime of the client
+ */
+ async _initialize() {
+ var _a;
+ try {
+ const params = parseParametersFromURL(window.location.href);
+ let callbackUrlType = 'none';
+ if (this._isImplicitGrantCallback(params)) {
+ callbackUrlType = 'implicit';
+ }
+ else if (await this._isPKCECallback(params)) {
+ callbackUrlType = 'pkce';
+ }
+ /**
+ * Attempt to get the session from the URL only if these conditions are fulfilled
+ *
+ * Note: If the URL isn't one of the callback url types (implicit or pkce),
+ * then there could be an existing session so we don't want to prematurely remove it
+ */
+ if (isBrowser() && this.detectSessionInUrl && callbackUrlType !== 'none') {
+ const { data, error } = await this._getSessionFromURL(params, callbackUrlType);
+ if (error) {
+ this._debug('#_initialize()', 'error detecting session from URL', error);
+ if (isAuthImplicitGrantRedirectError(error)) {
+ const errorCode = (_a = error.details) === null || _a === void 0 ? void 0 : _a.code;
+ if (errorCode === 'identity_already_exists' ||
+ errorCode === 'identity_not_found' ||
+ errorCode === 'single_identity_not_deletable') {
+ return { error };
+ }
+ }
+ // failed login attempt via url,
+ // remove old session as in verifyOtp, signUp and signInWith*
+ await this._removeSession();
+ return { error };
+ }
+ const { session, redirectType } = data;
+ this._debug('#_initialize()', 'detected session in URL', session, 'redirect type', redirectType);
+ await this._saveSession(session);
+ setTimeout(async () => {
+ if (redirectType === 'recovery') {
+ await this._notifyAllSubscribers('PASSWORD_RECOVERY', session);
+ }
+ else {
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ }, 0);
+ return { error: null };
+ }
+ // no login attempt via callback url try to recover session from storage
+ await this._recoverAndRefresh();
+ return { error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { error };
+ }
+ return {
+ error: new AuthUnknownError('Unexpected error during initialization', error),
+ };
+ }
+ finally {
+ await this._handleVisibilityChange();
+ this._debug('#_initialize()', 'end');
+ }
+ }
+ /**
+ * Creates a new anonymous user.
+ *
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
+ */
+ async signInAnonymously(credentials) {
+ var _a, _b, _c;
+ try {
+ const res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ data: (_b = (_a = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : {},
+ gotrue_meta_security: { captcha_token: (_c = credentials === null || credentials === void 0 ? void 0 : credentials.options) === null || _c === void 0 ? void 0 : _c.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ const { data, error } = res;
+ if (error || !data) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Creates a new user.
+ *
+ * Be aware that if a user account exists in the system you may get back an
+ * error message that attempts to hide this information from the user.
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
+ *
+ * @returns A logged-in session if the server has "autoconfirm" ON
+ * @returns A user if the server has "autoconfirm" OFF
+ */
+ async signUp(credentials) {
+ var _a, _b, _c;
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: {
+ email,
+ password,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ xform: _sessionResponse,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/signup`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ data: (_b = options === null || options === void 0 ? void 0 : options.data) !== null && _b !== void 0 ? _b : {},
+ channel: (_c = options === null || options === void 0 ? void 0 : options.channel) !== null && _c !== void 0 ? _c : 'sms',
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ }
+ else {
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error || !data) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ const session = data.session;
+ const user = data.user;
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user with an email and password or phone and password.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or that the
+ * email/phone and password combination is wrong or that the account can only
+ * be accessed via social login.
+ */
+ async signInWithPassword(credentials) {
+ try {
+ let res;
+ if ('email' in credentials) {
+ const { email, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ email,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponsePassword,
+ });
+ }
+ else if ('phone' in credentials) {
+ const { phone, password, options } = credentials;
+ res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=password`, {
+ headers: this.headers,
+ body: {
+ phone,
+ password,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponsePassword,
+ });
+ }
+ else {
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a password');
+ }
+ const { data, error } = res;
+ if (error) {
+ return { data: { user: null, session: null }, error };
+ }
+ else if (!data || !data.session || !data.user) {
+ return { data: { user: null, session: null }, error: new AuthInvalidTokenResponseError() };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return {
+ data: Object.assign({ user: data.user, session: data.session }, (data.weak_password ? { weakPassword: data.weak_password } : null)),
+ error,
+ };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in an existing user via a third-party provider.
+ * This method supports the PKCE flow.
+ */
+ async signInWithOAuth(credentials) {
+ var _a, _b, _c, _d;
+ return await this._handleProviderSignIn(credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: (_d = credentials.options) === null || _d === void 0 ? void 0 : _d.skipBrowserRedirect,
+ });
+ }
+ /**
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
+ */
+ async exchangeCodeForSession(authCode) {
+ await this.initializePromise;
+ return this._acquireLock(-1, async () => {
+ return this._exchangeCodeForSession(authCode);
+ });
+ }
+ async _exchangeCodeForSession(authCode) {
+ const storageItem = await getItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ const [codeVerifier, redirectType] = (storageItem !== null && storageItem !== void 0 ? storageItem : '').split('/');
+ try {
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=pkce`, {
+ headers: this.headers,
+ body: {
+ auth_code: authCode,
+ code_verifier: codeVerifier,
+ },
+ xform: _sessionResponse,
+ });
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ if (error) {
+ throw error;
+ }
+ if (!data || !data.session || !data.user) {
+ return {
+ data: { user: null, session: null, redirectType: null },
+ error: new AuthInvalidTokenResponseError(),
+ };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return { data: Object.assign(Object.assign({}, data), { redirectType: redirectType !== null && redirectType !== void 0 ? redirectType : null }), error };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null, redirectType: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Allows signing in with an OIDC ID token. The authentication provider used
+ * should be enabled and configured.
+ */
+ async signInWithIdToken(credentials) {
+ try {
+ const { options, provider, token, access_token, nonce } = credentials;
+ const res = await _request(this.fetch, 'POST', `${this.url}/token?grant_type=id_token`, {
+ headers: this.headers,
+ body: {
+ provider,
+ id_token: token,
+ access_token,
+ nonce,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ xform: _sessionResponse,
+ });
+ const { data, error } = res;
+ if (error) {
+ return { data: { user: null, session: null }, error };
+ }
+ else if (!data || !data.session || !data.user) {
+ return {
+ data: { user: null, session: null },
+ error: new AuthInvalidTokenResponseError(),
+ };
+ }
+ if (data.session) {
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('SIGNED_IN', data.session);
+ }
+ return { data, error };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user using magiclink or a one-time password (OTP).
+ *
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
+ *
+ * Be aware that you may get back an error message that will not distinguish
+ * between the cases where the account does not exist or, that the account
+ * can only be accessed via social login.
+ *
+ * Do note that you will need to configure a Whatsapp sender on Twilio
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
+ * channel is not supported on other providers
+ * at this time.
+ * This method supports PKCE when an email is passed.
+ */
+ async signInWithOtp(credentials) {
+ var _a, _b, _c, _d, _e;
+ try {
+ if ('email' in credentials) {
+ const { email, options } = credentials;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ const { error } = await _request(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ email,
+ data: (_a = options === null || options === void 0 ? void 0 : options.data) !== null && _a !== void 0 ? _a : {},
+ create_user: (_b = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _b !== void 0 ? _b : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return { data: { user: null, session: null }, error };
+ }
+ if ('phone' in credentials) {
+ const { phone, options } = credentials;
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/otp`, {
+ headers: this.headers,
+ body: {
+ phone,
+ data: (_c = options === null || options === void 0 ? void 0 : options.data) !== null && _c !== void 0 ? _c : {},
+ create_user: (_d = options === null || options === void 0 ? void 0 : options.shouldCreateUser) !== null && _d !== void 0 ? _d : true,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ channel: (_e = options === null || options === void 0 ? void 0 : options.channel) !== null && _e !== void 0 ? _e : 'sms',
+ },
+ });
+ return { data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id }, error };
+ }
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number.');
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
+ */
+ async verifyOtp(params) {
+ var _a, _b;
+ try {
+ let redirectTo = undefined;
+ let captchaToken = undefined;
+ if ('options' in params) {
+ redirectTo = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo;
+ captchaToken = (_b = params.options) === null || _b === void 0 ? void 0 : _b.captchaToken;
+ }
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/verify`, {
+ headers: this.headers,
+ body: Object.assign(Object.assign({}, params), { gotrue_meta_security: { captcha_token: captchaToken } }),
+ redirectTo,
+ xform: _sessionResponse,
+ });
+ if (error) {
+ throw error;
+ }
+ if (!data) {
+ throw new Error('An error occurred on token verification.');
+ }
+ const session = data.session;
+ const user = data.user;
+ if (session === null || session === void 0 ? void 0 : session.access_token) {
+ await this._saveSession(session);
+ await this._notifyAllSubscribers(params.type == 'recovery' ? 'PASSWORD_RECOVERY' : 'SIGNED_IN', session);
+ }
+ return { data: { user, session }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Attempts a single-sign on using an enterprise Identity Provider. A
+ * successful SSO attempt will redirect the current page to the identity
+ * provider authorization page. The redirect URL is implementation and SSO
+ * protocol specific.
+ *
+ * You can use it by providing a SSO domain. Typically you can extract this
+ * domain by asking users for their email address. If this domain is
+ * registered on the Auth instance the redirect will use that organization's
+ * currently active SSO Identity Provider for the login.
+ *
+ * If you have built an organization-specific login page, you can use the
+ * organization's SSO Identity Provider UUID directly instead.
+ */
+ async signInWithSSO(params) {
+ var _a, _b, _c;
+ try {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ return await _request(this.fetch, 'POST', `${this.url}/sso`, {
+ body: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ('providerId' in params ? { provider_id: params.providerId } : null)), ('domain' in params ? { domain: params.domain } : null)), { redirect_to: (_b = (_a = params.options) === null || _a === void 0 ? void 0 : _a.redirectTo) !== null && _b !== void 0 ? _b : undefined }), (((_c = params === null || params === void 0 ? void 0 : params.options) === null || _c === void 0 ? void 0 : _c.captchaToken)
+ ? { gotrue_meta_security: { captcha_token: params.options.captchaToken } }
+ : null)), { skip_http_redirect: true, code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ headers: this.headers,
+ xform: _ssoResponse,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Sends a reauthentication OTP to the user's email or phone number.
+ * Requires the user to be signed-in.
+ */
+ async reauthenticate() {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._reauthenticate();
+ });
+ }
+ async _reauthenticate() {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError)
+ throw sessionError;
+ if (!session)
+ throw new AuthSessionMissingError();
+ const { error } = await _request(this.fetch, 'GET', `${this.url}/reauthenticate`, {
+ headers: this.headers,
+ jwt: session.access_token,
+ });
+ return { data: { user: null, session: null }, error };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
+ */
+ async resend(credentials) {
+ try {
+ const endpoint = `${this.url}/resend`;
+ if ('email' in credentials) {
+ const { email, type, options } = credentials;
+ const { error } = await _request(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ email,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ });
+ return { data: { user: null, session: null }, error };
+ }
+ else if ('phone' in credentials) {
+ const { phone, type, options } = credentials;
+ const { data, error } = await _request(this.fetch, 'POST', endpoint, {
+ headers: this.headers,
+ body: {
+ phone,
+ type,
+ gotrue_meta_security: { captcha_token: options === null || options === void 0 ? void 0 : options.captchaToken },
+ },
+ });
+ return { data: { user: null, session: null, messageId: data === null || data === void 0 ? void 0 : data.message_id }, error };
+ }
+ throw new AuthInvalidCredentialsError('You must provide either an email or phone number and a type');
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns the session, refreshing it if necessary.
+ *
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
+ *
+ * **IMPORTANT:** This method loads values directly from the storage attached
+ * to the client. If that storage is based on request cookies for example,
+ * the values in it may not be authentic and therefore it's strongly advised
+ * against using this method and its results in such circumstances. A warning
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
+ */
+ async getSession() {
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return this._useSession(async (result) => {
+ return result;
+ });
+ });
+ return result;
+ }
+ /**
+ * Acquires a global lock based on the storage key.
+ */
+ async _acquireLock(acquireTimeout, fn) {
+ this._debug('#_acquireLock', 'begin', acquireTimeout);
+ try {
+ if (this.lockAcquired) {
+ const last = this.pendingInLock.length
+ ? this.pendingInLock[this.pendingInLock.length - 1]
+ : Promise.resolve();
+ const result = (async () => {
+ await last;
+ return await fn();
+ })();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ return result;
+ }
+ return await this.lock(`lock:${this.storageKey}`, acquireTimeout, async () => {
+ this._debug('#_acquireLock', 'lock acquired for storage key', this.storageKey);
+ try {
+ this.lockAcquired = true;
+ const result = fn();
+ this.pendingInLock.push((async () => {
+ try {
+ await result;
+ }
+ catch (e) {
+ // we just care if it finished
+ }
+ })());
+ await result;
+ // keep draining the queue until there's nothing to wait on
+ while (this.pendingInLock.length) {
+ const waitOn = [...this.pendingInLock];
+ await Promise.all(waitOn);
+ this.pendingInLock.splice(0, waitOn.length);
+ }
+ return await result;
+ }
+ finally {
+ this._debug('#_acquireLock', 'lock released for storage key', this.storageKey);
+ this.lockAcquired = false;
+ }
+ });
+ }
+ finally {
+ this._debug('#_acquireLock', 'end');
+ }
+ }
+ /**
+ * Use instead of {@link #getSession} inside the library. It is
+ * semantically usually what you want, as getting a session involves some
+ * processing afterwards that requires only one client operating on the
+ * session at once across multiple tabs or processes.
+ */
+ async _useSession(fn) {
+ this._debug('#_useSession', 'begin');
+ try {
+ // the use of __loadSession here is the only correct use of the function!
+ const result = await this.__loadSession();
+ return await fn(result);
+ }
+ finally {
+ this._debug('#_useSession', 'end');
+ }
+ }
+ /**
+ * NEVER USE DIRECTLY!
+ *
+ * Always use {@link #_useSession}.
+ */
+ async __loadSession() {
+ this._debug('#__loadSession()', 'begin');
+ if (!this.lockAcquired) {
+ this._debug('#__loadSession()', 'used outside of an acquired lock!', new Error().stack);
+ }
+ try {
+ let currentSession = null;
+ const maybeSession = await getItemAsync(this.storage, this.storageKey);
+ this._debug('#getSession()', 'session from storage', maybeSession);
+ if (maybeSession !== null) {
+ if (this._isValidSession(maybeSession)) {
+ currentSession = maybeSession;
+ }
+ else {
+ this._debug('#getSession()', 'session from storage is not valid');
+ await this._removeSession();
+ }
+ }
+ if (!currentSession) {
+ return { data: { session: null }, error: null };
+ }
+ const hasExpired = currentSession.expires_at
+ ? currentSession.expires_at <= Date.now() / 1000
+ : false;
+ this._debug('#__loadSession()', `session has${hasExpired ? '' : ' not'} expired`, 'expires_at', currentSession.expires_at);
+ if (!hasExpired) {
+ if (this.storage.isServer) {
+ let suppressWarning = this.suppressGetSessionWarning;
+ const proxySession = new Proxy(currentSession, {
+ get: (target, prop, receiver) => {
+ if (!suppressWarning && prop === 'user') {
+ // only show warning when the user object is being accessed from the server
+ console.warn('Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.');
+ suppressWarning = true; // keeps this proxy instance from logging additional warnings
+ this.suppressGetSessionWarning = true; // keeps this client's future proxy instances from warning
+ }
+ return Reflect.get(target, prop, receiver);
+ },
+ });
+ currentSession = proxySession;
+ }
+ return { data: { session: currentSession }, error: null };
+ }
+ const { session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { session: null }, error };
+ }
+ return { data: { session }, error: null };
+ }
+ finally {
+ this._debug('#__loadSession()', 'end');
+ }
+ }
+ /**
+ * Gets the current user details if there is an existing session. This method
+ * performs a network request to the Supabase Auth server, so the returned
+ * value is authentic and can be used to base authorization rules on.
+ *
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
+ */
+ async getUser(jwt) {
+ if (jwt) {
+ return await this._getUser(jwt);
+ }
+ await this.initializePromise;
+ const result = await this._acquireLock(-1, async () => {
+ return await this._getUser();
+ });
+ return result;
+ }
+ async _getUser(jwt) {
+ try {
+ if (jwt) {
+ return await _request(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: jwt,
+ xform: _userResponse,
+ });
+ }
+ return await this._useSession(async (result) => {
+ var _a, _b, _c;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ // returns an error if there is no access_token or custom authorization header
+ if (!((_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) && !this.hasCustomAuthorizationHeader) {
+ return { data: { user: null }, error: new AuthSessionMissingError() };
+ }
+ return await _request(this.fetch, 'GET', `${this.url}/user`, {
+ headers: this.headers,
+ jwt: (_c = (_b = data.session) === null || _b === void 0 ? void 0 : _b.access_token) !== null && _c !== void 0 ? _c : undefined,
+ xform: _userResponse,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ if (isAuthSessionMissingError(error)) {
+ // JWT contains a `session_id` which does not correspond to an active
+ // session in the database, indicating the user is signed out.
+ await this._removeSession();
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Updates user data for a logged in user.
+ */
+ async updateUser(attributes, options = {}) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._updateUser(attributes, options);
+ });
+ }
+ async _updateUser(attributes, options = {}) {
+ try {
+ return await this._useSession(async (result) => {
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ throw sessionError;
+ }
+ if (!sessionData.session) {
+ throw new AuthSessionMissingError();
+ }
+ const session = sessionData.session;
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce' && attributes.email != null) {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ }
+ const { data, error: userError } = await _request(this.fetch, 'PUT', `${this.url}/user`, {
+ headers: this.headers,
+ redirectTo: options === null || options === void 0 ? void 0 : options.emailRedirectTo,
+ body: Object.assign(Object.assign({}, attributes), { code_challenge: codeChallenge, code_challenge_method: codeChallengeMethod }),
+ jwt: session.access_token,
+ xform: _userResponse,
+ });
+ if (userError)
+ throw userError;
+ session.user = data.user;
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('USER_UPDATED', session);
+ return { data: { user: session.user }, error: null };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Decodes a JWT (without performing any validation).
+ */
+ _decodeJWT(jwt) {
+ return decodeJWTPayload(jwt);
+ }
+ /**
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
+ * @param currentSession The current session that minimally contains an access token and refresh token.
+ */
+ async setSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._setSession(currentSession);
+ });
+ }
+ async _setSession(currentSession) {
+ try {
+ if (!currentSession.access_token || !currentSession.refresh_token) {
+ throw new AuthSessionMissingError();
+ }
+ const timeNow = Date.now() / 1000;
+ let expiresAt = timeNow;
+ let hasExpired = true;
+ let session = null;
+ const payload = decodeJWTPayload(currentSession.access_token);
+ if (payload.exp) {
+ expiresAt = payload.exp;
+ hasExpired = expiresAt <= timeNow;
+ }
+ if (hasExpired) {
+ const { session: refreshedSession, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ if (!refreshedSession) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ session = refreshedSession;
+ }
+ else {
+ const { data, error } = await this._getUser(currentSession.access_token);
+ if (error) {
+ throw error;
+ }
+ session = {
+ access_token: currentSession.access_token,
+ refresh_token: currentSession.refresh_token,
+ user: data.user,
+ token_type: 'bearer',
+ expires_in: expiresAt - timeNow,
+ expires_at: expiresAt,
+ };
+ await this._saveSession(session);
+ await this._notifyAllSubscribers('SIGNED_IN', session);
+ }
+ return { data: { user: session.user, session }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { session: null, user: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Returns a new session, regardless of expiry status.
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
+ * If the current session's refresh token is invalid, an error will be thrown.
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
+ */
+ async refreshSession(currentSession) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._refreshSession(currentSession);
+ });
+ }
+ async _refreshSession(currentSession) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ if (!currentSession) {
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ currentSession = (_a = data.session) !== null && _a !== void 0 ? _a : undefined;
+ }
+ if (!(currentSession === null || currentSession === void 0 ? void 0 : currentSession.refresh_token)) {
+ throw new AuthSessionMissingError();
+ }
+ const { session, error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ return { data: { user: null, session: null }, error: error };
+ }
+ if (!session) {
+ return { data: { user: null, session: null }, error: null };
+ }
+ return { data: { user: session.user, session }, error: null };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { user: null, session: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets the session data from a URL string
+ */
+ async _getSessionFromURL(params, callbackUrlType) {
+ try {
+ if (!isBrowser())
+ throw new AuthImplicitGrantRedirectError('No browser detected.');
+ // If there's an error in the URL, it doesn't matter what flow it is, we just return the error.
+ if (params.error || params.error_description || params.error_code) {
+ // The error class returned implies that the redirect is from an implicit grant flow
+ // but it could also be from a redirect error from a PKCE flow.
+ throw new AuthImplicitGrantRedirectError(params.error_description || 'Error in URL with unspecified error_description', {
+ error: params.error || 'unspecified_error',
+ code: params.error_code || 'unspecified_code',
+ });
+ }
+ // Checks for mismatches between the flowType initialised in the client and the URL parameters
+ switch (callbackUrlType) {
+ case 'implicit':
+ if (this.flowType === 'pkce') {
+ throw new AuthPKCEGrantCodeExchangeError('Not a valid PKCE flow url.');
+ }
+ break;
+ case 'pkce':
+ if (this.flowType === 'implicit') {
+ throw new AuthImplicitGrantRedirectError('Not a valid implicit grant flow url.');
+ }
+ break;
+ default:
+ // there's no mismatch so we continue
+ }
+ // Since this is a redirect for PKCE, we attempt to retrieve the code from the URL for the code exchange
+ if (callbackUrlType === 'pkce') {
+ this._debug('#_initialize()', 'begin', 'is PKCE flow', true);
+ if (!params.code)
+ throw new AuthPKCEGrantCodeExchangeError('No code detected.');
+ const { data, error } = await this._exchangeCodeForSession(params.code);
+ if (error)
+ throw error;
+ const url = new URL(window.location.href);
+ url.searchParams.delete('code');
+ window.history.replaceState(window.history.state, '', url.toString());
+ return { data: { session: data.session, redirectType: null }, error: null };
+ }
+ const { provider_token, provider_refresh_token, access_token, refresh_token, expires_in, expires_at, token_type, } = params;
+ if (!access_token || !expires_in || !refresh_token || !token_type) {
+ throw new AuthImplicitGrantRedirectError('No session defined in URL');
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresIn = parseInt(expires_in);
+ let expiresAt = timeNow + expiresIn;
+ if (expires_at) {
+ expiresAt = parseInt(expires_at);
+ }
+ const actuallyExpiresIn = expiresAt - timeNow;
+ if (actuallyExpiresIn * 1000 <= AUTO_REFRESH_TICK_DURATION) {
+ console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${actuallyExpiresIn}s, should have been closer to ${expiresIn}s`);
+ }
+ const issuedAt = expiresAt - expiresIn;
+ if (timeNow - issuedAt >= 120) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale', issuedAt, expiresAt, timeNow);
+ }
+ else if (timeNow - issuedAt < 0) {
+ console.warn('@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew', issuedAt, expiresAt, timeNow);
+ }
+ const { data, error } = await this._getUser(access_token);
+ if (error)
+ throw error;
+ const session = {
+ provider_token,
+ provider_refresh_token,
+ access_token,
+ expires_in: expiresIn,
+ expires_at: expiresAt,
+ refresh_token,
+ token_type,
+ user: data.user,
+ };
+ // Remove tokens from URL
+ window.location.hash = '';
+ this._debug('#_getSessionFromURL()', 'clearing window.location.hash');
+ return { data: { session, redirectType: params.type }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { session: null, redirectType: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
+ */
+ _isImplicitGrantCallback(params) {
+ return Boolean(params.access_token || params.error_description);
+ }
+ /**
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
+ */
+ async _isPKCECallback(params) {
+ const currentStorageContent = await getItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ return !!(params.code && currentStorageContent);
+ }
+ /**
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
+ *
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
+ *
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
+ */
+ async signOut(options = { scope: 'global' }) {
+ await this.initializePromise;
+ return await this._acquireLock(-1, async () => {
+ return await this._signOut(options);
+ });
+ }
+ async _signOut({ scope } = { scope: 'global' }) {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data, error: sessionError } = result;
+ if (sessionError) {
+ return { error: sessionError };
+ }
+ const accessToken = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token;
+ if (accessToken) {
+ const { error } = await this.admin.signOut(accessToken, scope);
+ if (error) {
+ // ignore 404s since user might not exist anymore
+ // ignore 401s since an invalid or expired JWT should sign out the current session
+ if (!(isAuthApiError(error) &&
+ (error.status === 404 || error.status === 401 || error.status === 403))) {
+ return { error };
+ }
+ }
+ }
+ if (scope !== 'others') {
+ await this._removeSession();
+ await removeItemAsync(this.storage, `${this.storageKey}-code-verifier`);
+ }
+ return { error: null };
+ });
+ }
+ /**
+ * Receive a notification every time an auth event happens.
+ * @param callback A callback function to be invoked when an auth event happens.
+ */
+ onAuthStateChange(callback) {
+ const id = uuid();
+ const subscription = {
+ id,
+ callback,
+ unsubscribe: () => {
+ this._debug('#unsubscribe()', 'state change callback with id removed', id);
+ this.stateChangeEmitters.delete(id);
+ },
+ };
+ this._debug('#onAuthStateChange()', 'registered callback with id', id);
+ this.stateChangeEmitters.set(id, subscription);
+ (async () => {
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ this._emitInitialSession(id);
+ });
+ })();
+ return { data: { subscription } };
+ }
+ async _emitInitialSession(id) {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ try {
+ const { data: { session }, error, } = result;
+ if (error)
+ throw error;
+ await ((_a = this.stateChangeEmitters.get(id)) === null || _a === void 0 ? void 0 : _a.callback('INITIAL_SESSION', session));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'session', session);
+ }
+ catch (err) {
+ await ((_b = this.stateChangeEmitters.get(id)) === null || _b === void 0 ? void 0 : _b.callback('INITIAL_SESSION', null));
+ this._debug('INITIAL_SESSION', 'callback id', id, 'error', err);
+ console.error(err);
+ }
+ });
+ }
+ /**
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
+ *
+ * @param email The email address of the user.
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
+ */
+ async resetPasswordForEmail(email, options = {}) {
+ let codeChallenge = null;
+ let codeChallengeMethod = null;
+ if (this.flowType === 'pkce') {
+ ;
+ [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey, true // isPasswordRecovery
+ );
+ }
+ try {
+ return await _request(this.fetch, 'POST', `${this.url}/recover`, {
+ body: {
+ email,
+ code_challenge: codeChallenge,
+ code_challenge_method: codeChallengeMethod,
+ gotrue_meta_security: { captcha_token: options.captchaToken },
+ },
+ headers: this.headers,
+ redirectTo: options.redirectTo,
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Gets all the identities linked to a user.
+ */
+ async getUserIdentities() {
+ var _a;
+ try {
+ const { data, error } = await this.getUser();
+ if (error)
+ throw error;
+ return { data: { identities: (_a = data.user.identities) !== null && _a !== void 0 ? _a : [] }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Links an oauth identity to an existing user.
+ * This method supports the PKCE flow.
+ */
+ async linkIdentity(credentials) {
+ var _a;
+ try {
+ const { data, error } = await this._useSession(async (result) => {
+ var _a, _b, _c, _d, _e;
+ const { data, error } = result;
+ if (error)
+ throw error;
+ const url = await this._getUrlForProvider(`${this.url}/user/identities/authorize`, credentials.provider, {
+ redirectTo: (_a = credentials.options) === null || _a === void 0 ? void 0 : _a.redirectTo,
+ scopes: (_b = credentials.options) === null || _b === void 0 ? void 0 : _b.scopes,
+ queryParams: (_c = credentials.options) === null || _c === void 0 ? void 0 : _c.queryParams,
+ skipBrowserRedirect: true,
+ });
+ return await _request(this.fetch, 'GET', url, {
+ headers: this.headers,
+ jwt: (_e = (_d = data.session) === null || _d === void 0 ? void 0 : _d.access_token) !== null && _e !== void 0 ? _e : undefined,
+ });
+ });
+ if (error)
+ throw error;
+ if (isBrowser() && !((_a = credentials.options) === null || _a === void 0 ? void 0 : _a.skipBrowserRedirect)) {
+ window.location.assign(data === null || data === void 0 ? void 0 : data.url);
+ }
+ return { data: { provider: credentials.provider, url: data === null || data === void 0 ? void 0 : data.url }, error: null };
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: { provider: credentials.provider, url: null }, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
+ */
+ async unlinkIdentity(identity) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data, error } = result;
+ if (error) {
+ throw error;
+ }
+ return await _request(this.fetch, 'DELETE', `${this.url}/user/identities/${identity.identity_id}`, {
+ headers: this.headers,
+ jwt: (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : undefined,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * Generates a new JWT.
+ * @param refreshToken A valid refresh token that was returned on login.
+ */
+ async _refreshAccessToken(refreshToken) {
+ const debugName = `#_refreshAccessToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ const startedAt = Date.now();
+ // will attempt to refresh the token with exponential backoff
+ return await retryable(async (attempt) => {
+ if (attempt > 0) {
+ await sleep(200 * Math.pow(2, attempt - 1)); // 200, 400, 800, ...
+ }
+ this._debug(debugName, 'refreshing attempt', attempt);
+ return await _request(this.fetch, 'POST', `${this.url}/token?grant_type=refresh_token`, {
+ body: { refresh_token: refreshToken },
+ headers: this.headers,
+ xform: _sessionResponse,
+ });
+ }, (attempt, error) => {
+ const nextBackOffInterval = 200 * Math.pow(2, attempt);
+ return (error &&
+ isAuthRetryableFetchError(error) &&
+ // retryable only if the request can be sent before the backoff overflows the tick duration
+ Date.now() + nextBackOffInterval - startedAt < AUTO_REFRESH_TICK_DURATION);
+ });
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if (isAuthError(error)) {
+ return { data: { session: null, user: null }, error };
+ }
+ throw error;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ _isValidSession(maybeSession) {
+ const isValidSession = typeof maybeSession === 'object' &&
+ maybeSession !== null &&
+ 'access_token' in maybeSession &&
+ 'refresh_token' in maybeSession &&
+ 'expires_at' in maybeSession;
+ return isValidSession;
+ }
+ async _handleProviderSignIn(provider, options) {
+ const url = await this._getUrlForProvider(`${this.url}/authorize`, provider, {
+ redirectTo: options.redirectTo,
+ scopes: options.scopes,
+ queryParams: options.queryParams,
+ });
+ this._debug('#_handleProviderSignIn()', 'provider', provider, 'options', options, 'url', url);
+ // try to open on the browser
+ if (isBrowser() && !options.skipBrowserRedirect) {
+ window.location.assign(url);
+ }
+ return { data: { provider, url }, error: null };
+ }
+ /**
+ * Recovers the session from LocalStorage and refreshes the token
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
+ */
+ async _recoverAndRefresh() {
+ var _a;
+ const debugName = '#_recoverAndRefresh()';
+ this._debug(debugName, 'begin');
+ try {
+ const currentSession = await getItemAsync(this.storage, this.storageKey);
+ this._debug(debugName, 'session from storage', currentSession);
+ if (!this._isValidSession(currentSession)) {
+ this._debug(debugName, 'session is not valid');
+ if (currentSession !== null) {
+ await this._removeSession();
+ }
+ return;
+ }
+ const timeNow = Math.round(Date.now() / 1000);
+ const expiresWithMargin = ((_a = currentSession.expires_at) !== null && _a !== void 0 ? _a : Infinity) < timeNow + EXPIRY_MARGIN;
+ this._debug(debugName, `session has${expiresWithMargin ? '' : ' not'} expired with margin of ${EXPIRY_MARGIN}s`);
+ if (expiresWithMargin) {
+ if (this.autoRefreshToken && currentSession.refresh_token) {
+ const { error } = await this._callRefreshToken(currentSession.refresh_token);
+ if (error) {
+ console.error(error);
+ if (!isAuthRetryableFetchError(error)) {
+ this._debug(debugName, 'refresh failed with a non-retryable error, removing the session', error);
+ await this._removeSession();
+ }
+ }
+ }
+ }
+ else {
+ // no need to persist currentSession again, as we just loaded it from
+ // local storage; persisting it again may overwrite a value saved by
+ // another client with access to the same local storage
+ await this._notifyAllSubscribers('SIGNED_IN', currentSession);
+ }
+ }
+ catch (err) {
+ this._debug(debugName, 'error', err);
+ console.error(err);
+ return;
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ async _callRefreshToken(refreshToken) {
+ var _a, _b;
+ if (!refreshToken) {
+ throw new AuthSessionMissingError();
+ }
+ // refreshing is already in progress
+ if (this.refreshingDeferred) {
+ return this.refreshingDeferred.promise;
+ }
+ const debugName = `#_callRefreshToken(${refreshToken.substring(0, 5)}...)`;
+ this._debug(debugName, 'begin');
+ try {
+ this.refreshingDeferred = new Deferred();
+ const { data, error } = await this._refreshAccessToken(refreshToken);
+ if (error)
+ throw error;
+ if (!data.session)
+ throw new AuthSessionMissingError();
+ await this._saveSession(data.session);
+ await this._notifyAllSubscribers('TOKEN_REFRESHED', data.session);
+ const result = { session: data.session, error: null };
+ this.refreshingDeferred.resolve(result);
+ return result;
+ }
+ catch (error) {
+ this._debug(debugName, 'error', error);
+ if (isAuthError(error)) {
+ const result = { session: null, error };
+ if (!isAuthRetryableFetchError(error)) {
+ await this._removeSession();
+ }
+ (_a = this.refreshingDeferred) === null || _a === void 0 ? void 0 : _a.resolve(result);
+ return result;
+ }
+ (_b = this.refreshingDeferred) === null || _b === void 0 ? void 0 : _b.reject(error);
+ throw error;
+ }
+ finally {
+ this.refreshingDeferred = null;
+ this._debug(debugName, 'end');
+ }
+ }
+ async _notifyAllSubscribers(event, session, broadcast = true) {
+ const debugName = `#_notifyAllSubscribers(${event})`;
+ this._debug(debugName, 'begin', session, `broadcast = ${broadcast}`);
+ try {
+ if (this.broadcastChannel && broadcast) {
+ this.broadcastChannel.postMessage({ event, session });
+ }
+ const errors = [];
+ const promises = Array.from(this.stateChangeEmitters.values()).map(async (x) => {
+ try {
+ await x.callback(event, session);
+ }
+ catch (e) {
+ errors.push(e);
+ }
+ });
+ await Promise.all(promises);
+ if (errors.length > 0) {
+ for (let i = 0; i < errors.length; i += 1) {
+ console.error(errors[i]);
+ }
+ throw errors[0];
+ }
+ }
+ finally {
+ this._debug(debugName, 'end');
+ }
+ }
+ /**
+ * set currentSession and currentUser
+ * process to _startAutoRefreshToken if possible
+ */
+ async _saveSession(session) {
+ this._debug('#_saveSession()', session);
+ // _saveSession is always called whenever a new session has been acquired
+ // so we can safely suppress the warning returned by future getSession calls
+ this.suppressGetSessionWarning = true;
+ await setItemAsync(this.storage, this.storageKey, session);
+ }
+ async _removeSession() {
+ this._debug('#_removeSession()');
+ await removeItemAsync(this.storage, this.storageKey);
+ await this._notifyAllSubscribers('SIGNED_OUT', null);
+ }
+ /**
+ * Removes any registered visibilitychange callback.
+ *
+ * {@see #startAutoRefresh}
+ * {@see #stopAutoRefresh}
+ */
+ _removeVisibilityChangedCallback() {
+ this._debug('#_removeVisibilityChangedCallback()');
+ const callback = this.visibilityChangedCallback;
+ this.visibilityChangedCallback = null;
+ try {
+ if (callback && isBrowser() && (window === null || window === void 0 ? void 0 : window.removeEventListener)) {
+ window.removeEventListener('visibilitychange', callback);
+ }
+ }
+ catch (e) {
+ console.error('removing visibilitychange callback failed', e);
+ }
+ }
+ /**
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
+ * within the library.
+ */
+ async _startAutoRefresh() {
+ await this._stopAutoRefresh();
+ this._debug('#_startAutoRefresh()');
+ const ticker = setInterval(() => this._autoRefreshTokenTick(), AUTO_REFRESH_TICK_DURATION);
+ this.autoRefreshTicker = ticker;
+ if (ticker && typeof ticker === 'object' && typeof ticker.unref === 'function') {
+ // ticker is a NodeJS Timeout object that has an `unref` method
+ // https://nodejs.org/api/timers.html#timeoutunref
+ // When auto refresh is used in NodeJS (like for testing) the
+ // `setInterval` is preventing the process from being marked as
+ // finished and tests run endlessly. This can be prevented by calling
+ // `unref()` on the returned object.
+ ticker.unref();
+ // @ts-expect-error TS has no context of Deno
+ }
+ else if (typeof Deno !== 'undefined' && typeof Deno.unrefTimer === 'function') {
+ // similar like for NodeJS, but with the Deno API
+ // https://deno.land/api@latest?unstable&s=Deno.unrefTimer
+ // @ts-expect-error TS has no context of Deno
+ Deno.unrefTimer(ticker);
+ }
+ // run the tick immediately, but in the next pass of the event loop so that
+ // #_initialize can be allowed to complete without recursively waiting on
+ // itself
+ setTimeout(async () => {
+ await this.initializePromise;
+ await this._autoRefreshTokenTick();
+ }, 0);
+ }
+ /**
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
+ * within the library.
+ */
+ async _stopAutoRefresh() {
+ this._debug('#_stopAutoRefresh()');
+ const ticker = this.autoRefreshTicker;
+ this.autoRefreshTicker = null;
+ if (ticker) {
+ clearInterval(ticker);
+ }
+ }
+ /**
+ * Starts an auto-refresh process in the background. The session is checked
+ * every few seconds. Close to the time of expiration a process is started to
+ * refresh the session. If refreshing fails it will be retried for as long as
+ * necessary.
+ *
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
+ * to call this function, it will be called for you.
+ *
+ * On browsers the refresh process works only when the tab/window is in the
+ * foreground to conserve resources as well as prevent race conditions and
+ * flooding auth with requests. If you call this method any managed
+ * visibility change callback will be removed and you must manage visibility
+ * changes on your own.
+ *
+ * On non-browser platforms the refresh process works *continuously* in the
+ * background, which may not be desirable. You should hook into your
+ * platform's foreground indication mechanism and call these methods
+ * appropriately to conserve resources.
+ *
+ * {@see #stopAutoRefresh}
+ */
+ async startAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._startAutoRefresh();
+ }
+ /**
+ * Stops an active auto refresh process running in the background (if any).
+ *
+ * If you call this method any managed visibility change callback will be
+ * removed and you must manage visibility changes on your own.
+ *
+ * See {@link #startAutoRefresh} for more details.
+ */
+ async stopAutoRefresh() {
+ this._removeVisibilityChangedCallback();
+ await this._stopAutoRefresh();
+ }
+ /**
+ * Runs the auto refresh token tick.
+ */
+ async _autoRefreshTokenTick() {
+ this._debug('#_autoRefreshTokenTick()', 'begin');
+ try {
+ await this._acquireLock(0, async () => {
+ try {
+ const now = Date.now();
+ try {
+ return await this._useSession(async (result) => {
+ const { data: { session }, } = result;
+ if (!session || !session.refresh_token || !session.expires_at) {
+ this._debug('#_autoRefreshTokenTick()', 'no session');
+ return;
+ }
+ // session will expire in this many ticks (or has already expired if <= 0)
+ const expiresInTicks = Math.floor((session.expires_at * 1000 - now) / AUTO_REFRESH_TICK_DURATION);
+ this._debug('#_autoRefreshTokenTick()', `access token expires in ${expiresInTicks} ticks, a tick lasts ${AUTO_REFRESH_TICK_DURATION}ms, refresh threshold is ${AUTO_REFRESH_TICK_THRESHOLD} ticks`);
+ if (expiresInTicks <= AUTO_REFRESH_TICK_THRESHOLD) {
+ await this._callRefreshToken(session.refresh_token);
+ }
+ });
+ }
+ catch (e) {
+ console.error('Auto refresh tick failed with error. This is likely a transient error.', e);
+ }
+ }
+ finally {
+ this._debug('#_autoRefreshTokenTick()', 'end');
+ }
+ });
+ }
+ catch (e) {
+ if (e.isAcquireTimeout || e instanceof LockAcquireTimeoutError) {
+ this._debug('auto refresh token tick lock not available');
+ }
+ else {
+ throw e;
+ }
+ }
+ }
+ /**
+ * Registers callbacks on the browser / platform, which in-turn run
+ * algorithms when the browser window/tab are in foreground. On non-browser
+ * platforms it assumes always foreground.
+ */
+ async _handleVisibilityChange() {
+ this._debug('#_handleVisibilityChange()');
+ if (!isBrowser() || !(window === null || window === void 0 ? void 0 : window.addEventListener)) {
+ if (this.autoRefreshToken) {
+ // in non-browser environments the refresh token ticker runs always
+ this.startAutoRefresh();
+ }
+ return false;
+ }
+ try {
+ this.visibilityChangedCallback = async () => await this._onVisibilityChanged(false);
+ window === null || window === void 0 ? void 0 : window.addEventListener('visibilitychange', this.visibilityChangedCallback);
+ // now immediately call the visbility changed callback to setup with the
+ // current visbility state
+ await this._onVisibilityChanged(true); // initial call
+ }
+ catch (error) {
+ console.error('_handleVisibilityChange', error);
+ }
+ }
+ /**
+ * Callback registered with `window.addEventListener('visibilitychange')`.
+ */
+ async _onVisibilityChanged(calledFromInitialize) {
+ const methodName = `#_onVisibilityChanged(${calledFromInitialize})`;
+ this._debug(methodName, 'visibilityState', document.visibilityState);
+ if (document.visibilityState === 'visible') {
+ if (this.autoRefreshToken) {
+ // in browser environments the refresh token ticker runs only on focused tabs
+ // which prevents race conditions
+ this._startAutoRefresh();
+ }
+ if (!calledFromInitialize) {
+ // called when the visibility has changed, i.e. the browser
+ // transitioned from hidden -> visible so we need to see if the session
+ // should be recovered immediately... but to do that we need to acquire
+ // the lock first asynchronously
+ await this.initializePromise;
+ await this._acquireLock(-1, async () => {
+ if (document.visibilityState !== 'visible') {
+ this._debug(methodName, 'acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting');
+ // visibility has changed while waiting for the lock, abort
+ return;
+ }
+ // recover the session
+ await this._recoverAndRefresh();
+ });
+ }
+ }
+ else if (document.visibilityState === 'hidden') {
+ if (this.autoRefreshToken) {
+ this._stopAutoRefresh();
+ }
+ }
+ }
+ /**
+ * Generates the relevant login URL for a third-party provider.
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
+ */
+ async _getUrlForProvider(url, provider, options) {
+ const urlParams = [`provider=${encodeURIComponent(provider)}`];
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`);
+ }
+ if (options === null || options === void 0 ? void 0 : options.scopes) {
+ urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);
+ }
+ if (this.flowType === 'pkce') {
+ const [codeChallenge, codeChallengeMethod] = await getCodeChallengeAndMethod(this.storage, this.storageKey);
+ const flowParams = new URLSearchParams({
+ code_challenge: `${encodeURIComponent(codeChallenge)}`,
+ code_challenge_method: `${encodeURIComponent(codeChallengeMethod)}`,
+ });
+ urlParams.push(flowParams.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.queryParams) {
+ const query = new URLSearchParams(options.queryParams);
+ urlParams.push(query.toString());
+ }
+ if (options === null || options === void 0 ? void 0 : options.skipBrowserRedirect) {
+ urlParams.push(`skip_http_redirect=${options.skipBrowserRedirect}`);
+ }
+ return `${url}?${urlParams.join('&')}`;
+ }
+ async _unenroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ return await _request(this.fetch, 'DELETE', `${this.url}/factors/${params.factorId}`, {
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ async _enroll(params) {
+ try {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ const body = Object.assign({ friendly_name: params.friendlyName, factor_type: params.factorType }, (params.factorType === 'phone' ? { phone: params.phone } : { issuer: params.issuer }));
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/factors`, {
+ body,
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return { data: null, error };
+ }
+ if (params.factorType === 'totp' && ((_b = data === null || data === void 0 ? void 0 : data.totp) === null || _b === void 0 ? void 0 : _b.qr_code)) {
+ data.totp.qr_code = `data:image/svg+xml;utf-8,${data.totp.qr_code}`;
+ }
+ return { data, error: null };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ }
+ /**
+ * {@see GoTrueMFAApi#verify}
+ */
+ async _verify(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ const { data, error } = await _request(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/verify`, {
+ body: { code: params.code, challenge_id: params.challengeId },
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ if (error) {
+ return { data: null, error };
+ }
+ await this._saveSession(Object.assign({ expires_at: Math.round(Date.now() / 1000) + data.expires_in }, data));
+ await this._notifyAllSubscribers('MFA_CHALLENGE_VERIFIED', data);
+ return { data, error };
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challenge}
+ */
+ async _challenge(params) {
+ return this._acquireLock(-1, async () => {
+ try {
+ return await this._useSession(async (result) => {
+ var _a;
+ const { data: sessionData, error: sessionError } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ return await _request(this.fetch, 'POST', `${this.url}/factors/${params.factorId}/challenge`, {
+ body: { channel: params.channel },
+ headers: this.headers,
+ jwt: (_a = sessionData === null || sessionData === void 0 ? void 0 : sessionData.session) === null || _a === void 0 ? void 0 : _a.access_token,
+ });
+ });
+ }
+ catch (error) {
+ if (isAuthError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#challengeAndVerify}
+ */
+ async _challengeAndVerify(params) {
+ // both _challenge and _verify independently acquire the lock, so no need
+ // to acquire it here
+ const { data: challengeData, error: challengeError } = await this._challenge({
+ factorId: params.factorId,
+ });
+ if (challengeError) {
+ return { data: null, error: challengeError };
+ }
+ return await this._verify({
+ factorId: params.factorId,
+ challengeId: challengeData.id,
+ code: params.code,
+ });
+ }
+ /**
+ * {@see GoTrueMFAApi#listFactors}
+ */
+ async _listFactors() {
+ // use #getUser instead of #_getUser as the former acquires a lock
+ const { data: { user }, error: userError, } = await this.getUser();
+ if (userError) {
+ return { data: null, error: userError };
+ }
+ const factors = (user === null || user === void 0 ? void 0 : user.factors) || [];
+ const totp = factors.filter((factor) => factor.factor_type === 'totp' && factor.status === 'verified');
+ const phone = factors.filter((factor) => factor.factor_type === 'phone' && factor.status === 'verified');
+ return {
+ data: {
+ all: factors,
+ totp,
+ phone,
+ },
+ error: null,
+ };
+ }
+ /**
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
+ */
+ async _getAuthenticatorAssuranceLevel() {
+ return this._acquireLock(-1, async () => {
+ return await this._useSession(async (result) => {
+ var _a, _b;
+ const { data: { session }, error: sessionError, } = result;
+ if (sessionError) {
+ return { data: null, error: sessionError };
+ }
+ if (!session) {
+ return {
+ data: { currentLevel: null, nextLevel: null, currentAuthenticationMethods: [] },
+ error: null,
+ };
+ }
+ const payload = this._decodeJWT(session.access_token);
+ let currentLevel = null;
+ if (payload.aal) {
+ currentLevel = payload.aal;
+ }
+ let nextLevel = currentLevel;
+ const verifiedFactors = (_b = (_a = session.user.factors) === null || _a === void 0 ? void 0 : _a.filter((factor) => factor.status === 'verified')) !== null && _b !== void 0 ? _b : [];
+ if (verifiedFactors.length > 0) {
+ nextLevel = 'aal2';
+ }
+ const currentAuthenticationMethods = payload.amr || [];
+ return { data: { currentLevel, nextLevel, currentAuthenticationMethods }, error: null };
+ });
+ });
+ }
+}
+GoTrueClient.nextInstanceID = 0;
+//# sourceMappingURL=GoTrueClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/index.js b/node_modules/@supabase/auth-js/dist/module/index.js
new file mode 100644
index 0000000..b0b0ef9
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/index.js
@@ -0,0 +1,9 @@
+import GoTrueAdminApi from './GoTrueAdminApi';
+import GoTrueClient from './GoTrueClient';
+import AuthAdminApi from './AuthAdminApi';
+import AuthClient from './AuthClient';
+export { GoTrueAdminApi, GoTrueClient, AuthAdminApi, AuthClient };
+export * from './lib/types';
+export * from './lib/errors';
+export { navigatorLock, NavigatorLockAcquireTimeoutError, internals as lockInternals, } from './lib/locks';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/constants.js b/node_modules/@supabase/auth-js/dist/module/lib/constants.js
new file mode 100644
index 0000000..8d7633e
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/constants.js
@@ -0,0 +1,18 @@
+import { version } from './version';
+export const GOTRUE_URL = 'http://localhost:9999';
+export const STORAGE_KEY = 'supabase.auth.token';
+export const AUDIENCE = '';
+export const DEFAULT_HEADERS = { 'X-Client-Info': `gotrue-js/${version}` };
+export const EXPIRY_MARGIN = 10; // in seconds
+export const NETWORK_FAILURE = {
+ MAX_RETRIES: 10,
+ RETRY_INTERVAL: 2, // in deciseconds
+};
+export const API_VERSION_HEADER_NAME = 'X-Supabase-Api-Version';
+export const API_VERSIONS = {
+ '2024-01-01': {
+ timestamp: Date.parse('2024-01-01T00:00:00.0Z'),
+ name: '2024-01-01',
+ },
+};
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js b/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js
new file mode 100644
index 0000000..035bf41
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=error-codes.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/errors.js b/node_modules/@supabase/auth-js/dist/module/lib/errors.js
new file mode 100644
index 0000000..eb601cd
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/errors.js
@@ -0,0 +1,111 @@
+export class AuthError extends Error {
+ constructor(message, status, code) {
+ super(message);
+ this.__isAuthError = true;
+ this.name = 'AuthError';
+ this.status = status;
+ this.code = code;
+ }
+}
+export function isAuthError(error) {
+ return typeof error === 'object' && error !== null && '__isAuthError' in error;
+}
+export class AuthApiError extends AuthError {
+ constructor(message, status, code) {
+ super(message, status, code);
+ this.name = 'AuthApiError';
+ this.status = status;
+ this.code = code;
+ }
+}
+export function isAuthApiError(error) {
+ return isAuthError(error) && error.name === 'AuthApiError';
+}
+export class AuthUnknownError extends AuthError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'AuthUnknownError';
+ this.originalError = originalError;
+ }
+}
+export class CustomAuthError extends AuthError {
+ constructor(message, name, status, code) {
+ super(message, status, code);
+ this.name = name;
+ this.status = status;
+ }
+}
+export class AuthSessionMissingError extends CustomAuthError {
+ constructor() {
+ super('Auth session missing!', 'AuthSessionMissingError', 400, undefined);
+ }
+}
+export function isAuthSessionMissingError(error) {
+ return isAuthError(error) && error.name === 'AuthSessionMissingError';
+}
+export class AuthInvalidTokenResponseError extends CustomAuthError {
+ constructor() {
+ super('Auth session or user missing', 'AuthInvalidTokenResponseError', 500, undefined);
+ }
+}
+export class AuthInvalidCredentialsError extends CustomAuthError {
+ constructor(message) {
+ super(message, 'AuthInvalidCredentialsError', 400, undefined);
+ }
+}
+export class AuthImplicitGrantRedirectError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthImplicitGrantRedirectError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+export function isAuthImplicitGrantRedirectError(error) {
+ return isAuthError(error) && error.name === 'AuthImplicitGrantRedirectError';
+}
+export class AuthPKCEGrantCodeExchangeError extends CustomAuthError {
+ constructor(message, details = null) {
+ super(message, 'AuthPKCEGrantCodeExchangeError', 500, undefined);
+ this.details = null;
+ this.details = details;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ details: this.details,
+ };
+ }
+}
+export class AuthRetryableFetchError extends CustomAuthError {
+ constructor(message, status) {
+ super(message, 'AuthRetryableFetchError', status, undefined);
+ }
+}
+export function isAuthRetryableFetchError(error) {
+ return isAuthError(error) && error.name === 'AuthRetryableFetchError';
+}
+/**
+ * This error is thrown on certain methods when the password used is deemed
+ * weak. Inspect the reasons to identify what password strength rules are
+ * inadequate.
+ */
+export class AuthWeakPasswordError extends CustomAuthError {
+ constructor(message, status, reasons) {
+ super(message, 'AuthWeakPasswordError', status, 'weak_password');
+ this.reasons = reasons;
+ }
+}
+export function isAuthWeakPasswordError(error) {
+ return isAuthError(error) && error.name === 'AuthWeakPasswordError';
+}
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/fetch.js b/node_modules/@supabase/auth-js/dist/module/lib/fetch.js
new file mode 100644
index 0000000..7a16be9
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/fetch.js
@@ -0,0 +1,184 @@
+var __rest = (this && this.__rest) || function (s, e) {
+ var t = {};
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+ t[p] = s[p];
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+ t[p[i]] = s[p[i]];
+ }
+ return t;
+};
+import { API_VERSIONS, API_VERSION_HEADER_NAME } from './constants';
+import { expiresAt, looksLikeFetchResponse, parseResponseAPIVersion } from './helpers';
+import { AuthApiError, AuthRetryableFetchError, AuthWeakPasswordError, AuthUnknownError, AuthSessionMissingError, } from './errors';
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const NETWORK_ERROR_CODES = [502, 503, 504];
+export async function handleError(error) {
+ var _a;
+ if (!looksLikeFetchResponse(error)) {
+ throw new AuthRetryableFetchError(_getErrorMessage(error), 0);
+ }
+ if (NETWORK_ERROR_CODES.includes(error.status)) {
+ // status in 500...599 range - server had an error, request might be retryed.
+ throw new AuthRetryableFetchError(_getErrorMessage(error), error.status);
+ }
+ let data;
+ try {
+ data = await error.json();
+ }
+ catch (e) {
+ throw new AuthUnknownError(_getErrorMessage(e), e);
+ }
+ let errorCode = undefined;
+ const responseAPIVersion = parseResponseAPIVersion(error);
+ if (responseAPIVersion &&
+ responseAPIVersion.getTime() >= API_VERSIONS['2024-01-01'].timestamp &&
+ typeof data === 'object' &&
+ data &&
+ typeof data.code === 'string') {
+ errorCode = data.code;
+ }
+ else if (typeof data === 'object' && data && typeof data.error_code === 'string') {
+ errorCode = data.error_code;
+ }
+ if (!errorCode) {
+ // Legacy support for weak password errors, when there were no error codes
+ if (typeof data === 'object' &&
+ data &&
+ typeof data.weak_password === 'object' &&
+ data.weak_password &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ throw new AuthWeakPasswordError(_getErrorMessage(data), error.status, data.weak_password.reasons);
+ }
+ }
+ else if (errorCode === 'weak_password') {
+ throw new AuthWeakPasswordError(_getErrorMessage(data), error.status, ((_a = data.weak_password) === null || _a === void 0 ? void 0 : _a.reasons) || []);
+ }
+ else if (errorCode === 'session_not_found') {
+ // The `session_id` inside the JWT does not correspond to a row in the
+ // `sessions` table. This usually means the user has signed out, has been
+ // deleted, or their session has somehow been terminated.
+ throw new AuthSessionMissingError();
+ }
+ throw new AuthApiError(_getErrorMessage(data), error.status || 500, errorCode);
+}
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers);
+ params.body = JSON.stringify(body);
+ return Object.assign(Object.assign({}, params), parameters);
+};
+export async function _request(fetcher, method, url, options) {
+ var _a;
+ const headers = Object.assign({}, options === null || options === void 0 ? void 0 : options.headers);
+ if (!headers[API_VERSION_HEADER_NAME]) {
+ headers[API_VERSION_HEADER_NAME] = API_VERSIONS['2024-01-01'].name;
+ }
+ if (options === null || options === void 0 ? void 0 : options.jwt) {
+ headers['Authorization'] = `Bearer ${options.jwt}`;
+ }
+ const qs = (_a = options === null || options === void 0 ? void 0 : options.query) !== null && _a !== void 0 ? _a : {};
+ if (options === null || options === void 0 ? void 0 : options.redirectTo) {
+ qs['redirect_to'] = options.redirectTo;
+ }
+ const queryString = Object.keys(qs).length ? '?' + new URLSearchParams(qs).toString() : '';
+ const data = await _handleRequest(fetcher, method, url + queryString, {
+ headers,
+ noResolveJson: options === null || options === void 0 ? void 0 : options.noResolveJson,
+ }, {}, options === null || options === void 0 ? void 0 : options.body);
+ return (options === null || options === void 0 ? void 0 : options.xform) ? options === null || options === void 0 ? void 0 : options.xform(data) : { data: Object.assign({}, data), error: null };
+}
+async function _handleRequest(fetcher, method, url, options, parameters, body) {
+ const requestParams = _getRequestParams(method, options, parameters, body);
+ let result;
+ try {
+ result = await fetcher(url, Object.assign({}, requestParams));
+ }
+ catch (e) {
+ console.error(e);
+ // fetch failed, likely due to a network or CORS error
+ throw new AuthRetryableFetchError(_getErrorMessage(e), 0);
+ }
+ if (!result.ok) {
+ await handleError(result);
+ }
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson) {
+ return result;
+ }
+ try {
+ return await result.json();
+ }
+ catch (e) {
+ await handleError(e);
+ }
+}
+export function _sessionResponse(data) {
+ var _a;
+ let session = null;
+ if (hasSession(data)) {
+ session = Object.assign({}, data);
+ if (!data.expires_at) {
+ session.expires_at = expiresAt(data.expires_in);
+ }
+ }
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { session, user }, error: null };
+}
+export function _sessionResponsePassword(data) {
+ const response = _sessionResponse(data);
+ if (!response.error &&
+ data.weak_password &&
+ typeof data.weak_password === 'object' &&
+ Array.isArray(data.weak_password.reasons) &&
+ data.weak_password.reasons.length &&
+ data.weak_password.message &&
+ typeof data.weak_password.message === 'string' &&
+ data.weak_password.reasons.reduce((a, i) => a && typeof i === 'string', true)) {
+ response.data.weak_password = data.weak_password;
+ }
+ return response;
+}
+export function _userResponse(data) {
+ var _a;
+ const user = (_a = data.user) !== null && _a !== void 0 ? _a : data;
+ return { data: { user }, error: null };
+}
+export function _ssoResponse(data) {
+ return { data, error: null };
+}
+export function _generateLinkResponse(data) {
+ const { action_link, email_otp, hashed_token, redirect_to, verification_type } = data, rest = __rest(data, ["action_link", "email_otp", "hashed_token", "redirect_to", "verification_type"]);
+ const properties = {
+ action_link,
+ email_otp,
+ hashed_token,
+ redirect_to,
+ verification_type,
+ };
+ const user = Object.assign({}, rest);
+ return {
+ data: {
+ properties,
+ user,
+ },
+ error: null,
+ };
+}
+export function _noResolveJsonResponse(data) {
+ return data;
+}
+/**
+ * hasSession checks if the response object contains a valid session
+ * @param data A response object
+ * @returns true if a session is in the response
+ */
+function hasSession(data) {
+ return data.access_token && data.refresh_token && data.expires_in;
+}
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/helpers.js b/node_modules/@supabase/auth-js/dist/module/lib/helpers.js
new file mode 100644
index 0000000..9e1809b
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/helpers.js
@@ -0,0 +1,279 @@
+import { API_VERSION_HEADER_NAME } from './constants';
+export function expiresAt(expiresIn) {
+ const timeNow = Math.round(Date.now() / 1000);
+ return timeNow + expiresIn;
+}
+export function uuid() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
+ return v.toString(16);
+ });
+}
+export const isBrowser = () => typeof window !== 'undefined' && typeof document !== 'undefined';
+const localStorageWriteTests = {
+ tested: false,
+ writable: false,
+};
+/**
+ * Checks whether localStorage is supported on this browser.
+ */
+export const supportsLocalStorage = () => {
+ if (!isBrowser()) {
+ return false;
+ }
+ try {
+ if (typeof globalThis.localStorage !== 'object') {
+ return false;
+ }
+ }
+ catch (e) {
+ // DOM exception when accessing `localStorage`
+ return false;
+ }
+ if (localStorageWriteTests.tested) {
+ return localStorageWriteTests.writable;
+ }
+ const randomKey = `lswt-${Math.random()}${Math.random()}`;
+ try {
+ globalThis.localStorage.setItem(randomKey, randomKey);
+ globalThis.localStorage.removeItem(randomKey);
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = true;
+ }
+ catch (e) {
+ // localStorage can't be written to
+ // https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document
+ localStorageWriteTests.tested = true;
+ localStorageWriteTests.writable = false;
+ }
+ return localStorageWriteTests.writable;
+};
+/**
+ * Extracts parameters encoded in the URL both in the query and fragment.
+ */
+export function parseParametersFromURL(href) {
+ const result = {};
+ const url = new URL(href);
+ if (url.hash && url.hash[0] === '#') {
+ try {
+ const hashSearchParams = new URLSearchParams(url.hash.substring(1));
+ hashSearchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ }
+ catch (e) {
+ // hash is not a query string
+ }
+ }
+ // search parameters take precedence over hash parameters
+ url.searchParams.forEach((value, key) => {
+ result[key] = value;
+ });
+ return result;
+}
+export const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => import('@supabase/node-fetch').then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+export const looksLikeFetchResponse = (maybeResponse) => {
+ return (typeof maybeResponse === 'object' &&
+ maybeResponse !== null &&
+ 'status' in maybeResponse &&
+ 'ok' in maybeResponse &&
+ 'json' in maybeResponse &&
+ typeof maybeResponse.json === 'function');
+};
+// Storage helpers
+export const setItemAsync = async (storage, key, data) => {
+ await storage.setItem(key, JSON.stringify(data));
+};
+export const getItemAsync = async (storage, key) => {
+ const value = await storage.getItem(key);
+ if (!value) {
+ return null;
+ }
+ try {
+ return JSON.parse(value);
+ }
+ catch (_a) {
+ return value;
+ }
+};
+export const removeItemAsync = async (storage, key) => {
+ await storage.removeItem(key);
+};
+export function decodeBase64URL(value) {
+ const key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
+ let base64 = '';
+ let chr1, chr2, chr3;
+ let enc1, enc2, enc3, enc4;
+ let i = 0;
+ value = value.replace('-', '+').replace('_', '/');
+ while (i < value.length) {
+ enc1 = key.indexOf(value.charAt(i++));
+ enc2 = key.indexOf(value.charAt(i++));
+ enc3 = key.indexOf(value.charAt(i++));
+ enc4 = key.indexOf(value.charAt(i++));
+ chr1 = (enc1 << 2) | (enc2 >> 4);
+ chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+ chr3 = ((enc3 & 3) << 6) | enc4;
+ base64 = base64 + String.fromCharCode(chr1);
+ if (enc3 != 64 && chr2 != 0) {
+ base64 = base64 + String.fromCharCode(chr2);
+ }
+ if (enc4 != 64 && chr3 != 0) {
+ base64 = base64 + String.fromCharCode(chr3);
+ }
+ }
+ return base64;
+}
+/**
+ * A deferred represents some asynchronous work that is not yet finished, which
+ * may or may not culminate in a value.
+ * Taken from: https://github.com/mike-north/types/blob/master/src/async.ts
+ */
+export class Deferred {
+ constructor() {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.promise = new Deferred.promiseConstructor((res, rej) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ this.resolve = res;
+ this.reject = rej;
+ });
+ }
+}
+Deferred.promiseConstructor = Promise;
+// Taken from: https://stackoverflow.com/questions/38552003/how-to-decode-jwt-token-in-javascript-without-using-a-library
+export function decodeJWTPayload(token) {
+ // Regex checks for base64url format
+ const base64UrlRegex = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i;
+ const parts = token.split('.');
+ if (parts.length !== 3) {
+ throw new Error('JWT is not valid: not a JWT structure');
+ }
+ if (!base64UrlRegex.test(parts[1])) {
+ throw new Error('JWT is not valid: payload is not in base64url format');
+ }
+ const base64Url = parts[1];
+ return JSON.parse(decodeBase64URL(base64Url));
+}
+/**
+ * Creates a promise that resolves to null after some time.
+ */
+export async function sleep(time) {
+ return await new Promise((accept) => {
+ setTimeout(() => accept(null), time);
+ });
+}
+/**
+ * Converts the provided async function into a retryable function. Each result
+ * or thrown error is sent to the isRetryable function which should return true
+ * if the function should run again.
+ */
+export function retryable(fn, isRetryable) {
+ const promise = new Promise((accept, reject) => {
+ // eslint-disable-next-line @typescript-eslint/no-extra-semi
+ ;
+ (async () => {
+ for (let attempt = 0; attempt < Infinity; attempt++) {
+ try {
+ const result = await fn(attempt);
+ if (!isRetryable(attempt, null, result)) {
+ accept(result);
+ return;
+ }
+ }
+ catch (e) {
+ if (!isRetryable(attempt, e)) {
+ reject(e);
+ return;
+ }
+ }
+ }
+ })();
+ });
+ return promise;
+}
+function dec2hex(dec) {
+ return ('0' + dec.toString(16)).substr(-2);
+}
+// Functions below taken from: https://stackoverflow.com/questions/63309409/creating-a-code-verifier-and-challenge-for-pkce-auth-on-spotify-api-in-reactjs
+export function generatePKCEVerifier() {
+ const verifierLength = 56;
+ const array = new Uint32Array(verifierLength);
+ if (typeof crypto === 'undefined') {
+ const charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~';
+ const charSetLen = charSet.length;
+ let verifier = '';
+ for (let i = 0; i < verifierLength; i++) {
+ verifier += charSet.charAt(Math.floor(Math.random() * charSetLen));
+ }
+ return verifier;
+ }
+ crypto.getRandomValues(array);
+ return Array.from(array, dec2hex).join('');
+}
+async function sha256(randomString) {
+ const encoder = new TextEncoder();
+ const encodedData = encoder.encode(randomString);
+ const hash = await crypto.subtle.digest('SHA-256', encodedData);
+ const bytes = new Uint8Array(hash);
+ return Array.from(bytes)
+ .map((c) => String.fromCharCode(c))
+ .join('');
+}
+function base64urlencode(str) {
+ return btoa(str).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
+}
+export async function generatePKCEChallenge(verifier) {
+ const hasCryptoSupport = typeof crypto !== 'undefined' &&
+ typeof crypto.subtle !== 'undefined' &&
+ typeof TextEncoder !== 'undefined';
+ if (!hasCryptoSupport) {
+ console.warn('WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.');
+ return verifier;
+ }
+ const hashed = await sha256(verifier);
+ return base64urlencode(hashed);
+}
+export async function getCodeChallengeAndMethod(storage, storageKey, isPasswordRecovery = false) {
+ const codeVerifier = generatePKCEVerifier();
+ let storedCodeVerifier = codeVerifier;
+ if (isPasswordRecovery) {
+ storedCodeVerifier += '/PASSWORD_RECOVERY';
+ }
+ await setItemAsync(storage, `${storageKey}-code-verifier`, storedCodeVerifier);
+ const codeChallenge = await generatePKCEChallenge(codeVerifier);
+ const codeChallengeMethod = codeVerifier === codeChallenge ? 'plain' : 's256';
+ return [codeChallenge, codeChallengeMethod];
+}
+/** Parses the API version which is 2YYY-MM-DD. */
+const API_VERSION_REGEX = /^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;
+export function parseResponseAPIVersion(response) {
+ const apiVersion = response.headers.get(API_VERSION_HEADER_NAME);
+ if (!apiVersion) {
+ return null;
+ }
+ if (!apiVersion.match(API_VERSION_REGEX)) {
+ return null;
+ }
+ try {
+ const date = new Date(`${apiVersion}T00:00:00.0Z`);
+ return date;
+ }
+ catch (e) {
+ return null;
+ }
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/internal-types.js b/node_modules/@supabase/auth-js/dist/module/lib/internal-types.js
new file mode 100644
index 0000000..b63c357
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/internal-types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=internal-types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js b/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js
new file mode 100644
index 0000000..0575c07
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js
@@ -0,0 +1,42 @@
+import { supportsLocalStorage } from './helpers';
+/**
+ * Provides safe access to the globalThis.localStorage property.
+ */
+export const localStorageAdapter = {
+ getItem: (key) => {
+ if (!supportsLocalStorage()) {
+ return null;
+ }
+ return globalThis.localStorage.getItem(key);
+ },
+ setItem: (key, value) => {
+ if (!supportsLocalStorage()) {
+ return;
+ }
+ globalThis.localStorage.setItem(key, value);
+ },
+ removeItem: (key) => {
+ if (!supportsLocalStorage()) {
+ return;
+ }
+ globalThis.localStorage.removeItem(key);
+ },
+};
+/**
+ * Returns a localStorage-like object that stores the key-value pairs in
+ * memory.
+ */
+export function memoryLocalStorageAdapter(store = {}) {
+ return {
+ getItem: (key) => {
+ return store[key] || null;
+ },
+ setItem: (key, value) => {
+ store[key] = value;
+ },
+ removeItem: (key) => {
+ delete store[key];
+ },
+ };
+}
+//# sourceMappingURL=local-storage.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/locks.js b/node_modules/@supabase/auth-js/dist/module/lib/locks.js
new file mode 100644
index 0000000..8bf9410
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/locks.js
@@ -0,0 +1,179 @@
+import { supportsLocalStorage } from './helpers';
+/**
+ * @experimental
+ */
+export const internals = {
+ /**
+ * @experimental
+ */
+ debug: !!(globalThis &&
+ supportsLocalStorage() &&
+ globalThis.localStorage &&
+ globalThis.localStorage.getItem('supabase.gotrue-js.locks.debug') === 'true'),
+};
+/**
+ * An error thrown when a lock cannot be acquired after some amount of time.
+ *
+ * Use the {@link #isAcquireTimeout} property instead of checking with `instanceof`.
+ */
+export class LockAcquireTimeoutError extends Error {
+ constructor(message) {
+ super(message);
+ this.isAcquireTimeout = true;
+ }
+}
+export class NavigatorLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+export class ProcessLockAcquireTimeoutError extends LockAcquireTimeoutError {
+}
+/**
+ * Implements a global exclusive lock using the Navigator LockManager API. It
+ * is available on all browsers released after 2022-03-15 with Safari being the
+ * last one to release support. If the API is not available, this function will
+ * throw. Make sure you check availablility before configuring {@link
+ * GoTrueClient}.
+ *
+ * You can turn on debugging by setting the `supabase.gotrue-js.locks.debug`
+ * local storage item to `true`.
+ *
+ * Internals:
+ *
+ * Since the LockManager API does not preserve stack traces for the async
+ * function passed in the `request` method, a trick is used where acquiring the
+ * lock releases a previously started promise to run the operation in the `fn`
+ * function. The lock waits for that promise to finish (with or without error),
+ * while the function will finally wait for the result anyway.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ */
+export async function navigatorLock(name, acquireTimeout, fn) {
+ if (internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquire lock', name, acquireTimeout);
+ }
+ const abortController = new globalThis.AbortController();
+ if (acquireTimeout > 0) {
+ setTimeout(() => {
+ abortController.abort();
+ if (internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock acquire timed out', name);
+ }
+ }, acquireTimeout);
+ }
+ // MDN article: https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request
+ // Wrapping navigator.locks.request() with a plain Promise is done as some
+ // libraries like zone.js patch the Promise object to track the execution
+ // context. However, it appears that most browsers use an internal promise
+ // implementation when using the navigator.locks.request() API causing them
+ // to lose context and emit confusing log messages or break certain features.
+ // This wrapping is believed to help zone.js track the execution context
+ // better.
+ return await Promise.resolve().then(() => globalThis.navigator.locks.request(name, acquireTimeout === 0
+ ? {
+ mode: 'exclusive',
+ ifAvailable: true,
+ }
+ : {
+ mode: 'exclusive',
+ signal: abortController.signal,
+ }, async (lock) => {
+ if (lock) {
+ if (internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: acquired', name, lock.name);
+ }
+ try {
+ return await fn();
+ }
+ finally {
+ if (internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: released', name, lock.name);
+ }
+ }
+ }
+ else {
+ if (acquireTimeout === 0) {
+ if (internals.debug) {
+ console.log('@supabase/gotrue-js: navigatorLock: not immediately available', name);
+ }
+ throw new NavigatorLockAcquireTimeoutError(`Acquiring an exclusive Navigator LockManager lock "${name}" immediately failed`);
+ }
+ else {
+ if (internals.debug) {
+ try {
+ const result = await globalThis.navigator.locks.query();
+ console.log('@supabase/gotrue-js: Navigator LockManager state', JSON.stringify(result, null, ' '));
+ }
+ catch (e) {
+ console.warn('@supabase/gotrue-js: Error when querying Navigator LockManager state', e);
+ }
+ }
+ // Browser is not following the Navigator LockManager spec, it
+ // returned a null lock when we didn't use ifAvailable. So we can
+ // pretend the lock is acquired in the name of backward compatibility
+ // and user experience and just run the function.
+ console.warn('@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request');
+ return await fn();
+ }
+ }
+ }));
+}
+const PROCESS_LOCKS = {};
+/**
+ * Implements a global exclusive lock that works only in the current process.
+ * Useful for environments like React Native or other non-browser
+ * single-process (i.e. no concept of "tabs") environments.
+ *
+ * Use {@link #navigatorLock} in browser environments.
+ *
+ * @param name Name of the lock to be acquired.
+ * @param acquireTimeout If negative, no timeout. If 0 an error is thrown if
+ * the lock can't be acquired without waiting. If positive, the lock acquire
+ * will time out after so many milliseconds. An error is
+ * a timeout if it has `isAcquireTimeout` set to true.
+ * @param fn The operation to run once the lock is acquired.
+ */
+export async function processLock(name, acquireTimeout, fn) {
+ var _a;
+ const previousOperation = (_a = PROCESS_LOCKS[name]) !== null && _a !== void 0 ? _a : Promise.resolve();
+ const currentOperation = Promise.race([
+ previousOperation.catch(() => {
+ // ignore error of previous operation that we're waiting to finish
+ return null;
+ }),
+ acquireTimeout >= 0
+ ? new Promise((_, reject) => {
+ setTimeout(() => {
+ reject(new ProcessLockAcquireTimeoutError(`Acquring process lock with name "${name}" timed out`));
+ }, acquireTimeout);
+ })
+ : null,
+ ].filter((x) => x))
+ .catch((e) => {
+ if (e && e.isAcquireTimeout) {
+ throw e;
+ }
+ return null;
+ })
+ .then(async () => {
+ // previous operations finished and we didn't get a race on the acquire
+ // timeout, so the current operation can finally start
+ return await fn();
+ });
+ PROCESS_LOCKS[name] = currentOperation.catch(async (e) => {
+ if (e && e.isAcquireTimeout) {
+ // if the current operation timed out, it doesn't mean that the previous
+ // operation finished, so we need contnue waiting for it to finish
+ await previousOperation;
+ return null;
+ }
+ throw e;
+ });
+ // finally wait for the current operation to finish successfully, with an
+ // error or with an acquire timeout error
+ return await currentOperation;
+}
+//# sourceMappingURL=locks.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js b/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js
new file mode 100644
index 0000000..7ab7d6c
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js
@@ -0,0 +1,26 @@
+/**
+ * https://mathiasbynens.be/notes/globalthis
+ */
+export function polyfillGlobalThis() {
+ if (typeof globalThis === 'object')
+ return;
+ try {
+ Object.defineProperty(Object.prototype, '__magic__', {
+ get: function () {
+ return this;
+ },
+ configurable: true,
+ });
+ // @ts-expect-error 'Allow access to magic'
+ __magic__.globalThis = __magic__;
+ // @ts-expect-error 'Allow access to magic'
+ delete Object.prototype.__magic__;
+ }
+ catch (e) {
+ if (typeof self !== 'undefined') {
+ // @ts-expect-error 'Allow access to globals'
+ self.globalThis = self;
+ }
+ }
+}
+//# sourceMappingURL=polyfills.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/types.js b/node_modules/@supabase/auth-js/dist/module/lib/types.js
new file mode 100644
index 0000000..718fd38
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/dist/module/lib/version.js b/node_modules/@supabase/auth-js/dist/module/lib/version.js
new file mode 100644
index 0000000..c3cf039
--- /dev/null
+++ b/node_modules/@supabase/auth-js/dist/module/lib/version.js
@@ -0,0 +1,2 @@
+export const version = '2.67.3';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/auth-js/package.json b/node_modules/@supabase/auth-js/package.json
new file mode 100644
index 0000000..ae33378
--- /dev/null
+++ b/node_modules/@supabase/auth-js/package.json
@@ -0,0 +1,69 @@
+{
+ "name": "@supabase/auth-js",
+ "version": "2.67.3",
+ "private": false,
+ "description": "Official client library for Supabase Auth",
+ "keywords": [
+ "auth",
+ "supabase",
+ "auth",
+ "authentication"
+ ],
+ "homepage": "https://github.com/supabase/auth-js",
+ "bugs": "https://github.com/supabase/auth-js/issues",
+ "license": "MIT",
+ "author": "Supabase",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "main": "dist/main/index.js",
+ "module": "dist/module/index.js",
+ "types": "dist/module/index.d.ts",
+ "repository": "supabase/auth-js",
+ "scripts": {
+ "clean": "rimraf dist docs",
+ "coverage": "echo \"run npm test\"",
+ "format": "prettier --write \"{src,test}/**/*.ts\"",
+ "build": "genversion src/lib/version.ts --es6 && run-s clean format build:* && run-s lint",
+ "build:main": "tsc -p tsconfig.json",
+ "build:module": "tsc -p tsconfig.module.json",
+ "lint": "eslint ./src/**/* test/**/*.test.ts",
+ "test": "run-s test:clean test:infra test:suite test:clean",
+ "test:suite": "jest --runInBand",
+ "test:infra": "cd infra && docker compose down && docker compose pull && docker compose up -d && sleep 30",
+ "test:clean": "cd infra && docker compose down",
+ "docs": "typedoc src/index.ts --out docs/v2 --excludePrivate --excludeProtected",
+ "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals --excludePrivate --excludeProtected src/index.ts"
+ },
+ "dependencies": {
+ "@supabase/node-fetch": "^2.6.14"
+ },
+ "devDependencies": {
+ "@types/faker": "^5.1.6",
+ "@types/jest": "^28.1.6",
+ "@types/jsonwebtoken": "^8.5.6",
+ "@types/node": "^18.16.19",
+ "@types/node-fetch": "^2.6.4",
+ "@typescript-eslint/eslint-plugin": "^5.30.7",
+ "@typescript-eslint/parser": "^5.30.7",
+ "eslint": "^8.20.0",
+ "eslint-config-prettier": "^8.5.0",
+ "eslint-config-standard": "^17.0.0",
+ "eslint-plugin-import": "^2.26.0",
+ "eslint-plugin-node": "^11.1.0",
+ "eslint-plugin-promise": "^6.0.0",
+ "faker": "^5.3.1",
+ "genversion": "^3.1.1",
+ "jest": "^28.1.3",
+ "jest-mock-server": "^0.1.0",
+ "jsonwebtoken": "^9.0.0",
+ "npm-run-all": "^4.1.5",
+ "prettier": "2.7.1",
+ "rimraf": "^3.0.2",
+ "semantic-release-plugin-update-version-in-files": "^1.1.0",
+ "ts-jest": "^28.0.7",
+ "typedoc": "^0.22.16",
+ "typescript": "^4.7.4"
+ }
+}
diff --git a/node_modules/@supabase/functions-js/LICENSE b/node_modules/@supabase/functions-js/LICENSE
new file mode 100644
index 0000000..ddeba6a
--- /dev/null
+++ b/node_modules/@supabase/functions-js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@supabase/functions-js/README.md b/node_modules/@supabase/functions-js/README.md
new file mode 100644
index 0000000..15cfadd
--- /dev/null
+++ b/node_modules/@supabase/functions-js/README.md
@@ -0,0 +1,22 @@
+# `functions-js`
+
+[](https://coveralls.io/github/supabase/functions-js?branch=main)
+
+JS Client library to interact with Supabase Functions.
+
+## Docs
+
+
+
+## testing
+
+To run tests you will need Node 20+.
+
+You are going to need docker daemon running to execute tests.
+
+To start test run use the following command:
+
+```sh
+npm i
+npm run test
+```
diff --git a/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js b/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js
new file mode 100644
index 0000000..ae33f96
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js
@@ -0,0 +1,118 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FunctionsClient = void 0;
+const helper_1 = require("./helper");
+const types_1 = require("./types");
+class FunctionsClient {
+ constructor(url, { headers = {}, customFetch, region = types_1.FunctionRegion.Any, } = {}) {
+ this.url = url;
+ this.headers = headers;
+ this.region = region;
+ this.fetch = (0, helper_1.resolveFetch)(customFetch);
+ }
+ /**
+ * Updates the authorization header
+ * @param token - the new jwt token sent in the authorisation header
+ */
+ setAuth(token) {
+ this.headers.Authorization = `Bearer ${token}`;
+ }
+ /**
+ * Invokes a function
+ * @param functionName - The name of the Function to invoke.
+ * @param options - Options for invoking the Function.
+ */
+ invoke(functionName, options = {}) {
+ var _a;
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const { headers, method, body: functionArgs } = options;
+ let _headers = {};
+ let { region } = options;
+ if (!region) {
+ region = this.region;
+ }
+ if (region && region !== 'any') {
+ _headers['x-region'] = region;
+ }
+ let body;
+ if (functionArgs &&
+ ((headers && !Object.prototype.hasOwnProperty.call(headers, 'Content-Type')) || !headers)) {
+ if ((typeof Blob !== 'undefined' && functionArgs instanceof Blob) ||
+ functionArgs instanceof ArrayBuffer) {
+ // will work for File as File inherits Blob
+ // also works for ArrayBuffer as it is the same underlying structure as a Blob
+ _headers['Content-Type'] = 'application/octet-stream';
+ body = functionArgs;
+ }
+ else if (typeof functionArgs === 'string') {
+ // plain string
+ _headers['Content-Type'] = 'text/plain';
+ body = functionArgs;
+ }
+ else if (typeof FormData !== 'undefined' && functionArgs instanceof FormData) {
+ // don't set content-type headers
+ // Request will automatically add the right boundary value
+ body = functionArgs;
+ }
+ else {
+ // default, assume this is JSON
+ _headers['Content-Type'] = 'application/json';
+ body = JSON.stringify(functionArgs);
+ }
+ }
+ const response = yield this.fetch(`${this.url}/${functionName}`, {
+ method: method || 'POST',
+ // headers priority is (high to low):
+ // 1. invoke-level headers
+ // 2. client-level headers
+ // 3. default Content-Type header
+ headers: Object.assign(Object.assign(Object.assign({}, _headers), this.headers), headers),
+ body,
+ }).catch((fetchError) => {
+ throw new types_1.FunctionsFetchError(fetchError);
+ });
+ const isRelayError = response.headers.get('x-relay-error');
+ if (isRelayError && isRelayError === 'true') {
+ throw new types_1.FunctionsRelayError(response);
+ }
+ if (!response.ok) {
+ throw new types_1.FunctionsHttpError(response);
+ }
+ let responseType = ((_a = response.headers.get('Content-Type')) !== null && _a !== void 0 ? _a : 'text/plain').split(';')[0].trim();
+ let data;
+ if (responseType === 'application/json') {
+ data = yield response.json();
+ }
+ else if (responseType === 'application/octet-stream') {
+ data = yield response.blob();
+ }
+ else if (responseType === 'text/event-stream') {
+ data = response;
+ }
+ else if (responseType === 'multipart/form-data') {
+ data = yield response.formData();
+ }
+ else {
+ // default to text
+ data = yield response.text();
+ }
+ return { data, error: null };
+ }
+ catch (error) {
+ return { data: null, error };
+ }
+ });
+ }
+}
+exports.FunctionsClient = FunctionsClient;
+//# sourceMappingURL=FunctionsClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/main/helper.js b/node_modules/@supabase/functions-js/dist/main/helper.js
new file mode 100644
index 0000000..48928e5
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/main/helper.js
@@ -0,0 +1,41 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.resolveFetch = void 0;
+const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => Promise.resolve().then(() => __importStar(require('@supabase/node-fetch'))).then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+exports.resolveFetch = resolveFetch;
+//# sourceMappingURL=helper.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/main/index.js b/node_modules/@supabase/functions-js/dist/main/index.js
new file mode 100644
index 0000000..2cdb2fa
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/main/index.js
@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FunctionRegion = exports.FunctionsRelayError = exports.FunctionsHttpError = exports.FunctionsFetchError = exports.FunctionsError = exports.FunctionsClient = void 0;
+var FunctionsClient_1 = require("./FunctionsClient");
+Object.defineProperty(exports, "FunctionsClient", { enumerable: true, get: function () { return FunctionsClient_1.FunctionsClient; } });
+var types_1 = require("./types");
+Object.defineProperty(exports, "FunctionsError", { enumerable: true, get: function () { return types_1.FunctionsError; } });
+Object.defineProperty(exports, "FunctionsFetchError", { enumerable: true, get: function () { return types_1.FunctionsFetchError; } });
+Object.defineProperty(exports, "FunctionsHttpError", { enumerable: true, get: function () { return types_1.FunctionsHttpError; } });
+Object.defineProperty(exports, "FunctionsRelayError", { enumerable: true, get: function () { return types_1.FunctionsRelayError; } });
+Object.defineProperty(exports, "FunctionRegion", { enumerable: true, get: function () { return types_1.FunctionRegion; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/main/types.js b/node_modules/@supabase/functions-js/dist/main/types.js
new file mode 100644
index 0000000..e276796
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/main/types.js
@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.FunctionRegion = exports.FunctionsHttpError = exports.FunctionsRelayError = exports.FunctionsFetchError = exports.FunctionsError = void 0;
+class FunctionsError extends Error {
+ constructor(message, name = 'FunctionsError', context) {
+ super(message);
+ this.name = name;
+ this.context = context;
+ }
+}
+exports.FunctionsError = FunctionsError;
+class FunctionsFetchError extends FunctionsError {
+ constructor(context) {
+ super('Failed to send a request to the Edge Function', 'FunctionsFetchError', context);
+ }
+}
+exports.FunctionsFetchError = FunctionsFetchError;
+class FunctionsRelayError extends FunctionsError {
+ constructor(context) {
+ super('Relay Error invoking the Edge Function', 'FunctionsRelayError', context);
+ }
+}
+exports.FunctionsRelayError = FunctionsRelayError;
+class FunctionsHttpError extends FunctionsError {
+ constructor(context) {
+ super('Edge Function returned a non-2xx status code', 'FunctionsHttpError', context);
+ }
+}
+exports.FunctionsHttpError = FunctionsHttpError;
+// Define the enum for the 'region' property
+var FunctionRegion;
+(function (FunctionRegion) {
+ FunctionRegion["Any"] = "any";
+ FunctionRegion["ApNortheast1"] = "ap-northeast-1";
+ FunctionRegion["ApNortheast2"] = "ap-northeast-2";
+ FunctionRegion["ApSouth1"] = "ap-south-1";
+ FunctionRegion["ApSoutheast1"] = "ap-southeast-1";
+ FunctionRegion["ApSoutheast2"] = "ap-southeast-2";
+ FunctionRegion["CaCentral1"] = "ca-central-1";
+ FunctionRegion["EuCentral1"] = "eu-central-1";
+ FunctionRegion["EuWest1"] = "eu-west-1";
+ FunctionRegion["EuWest2"] = "eu-west-2";
+ FunctionRegion["EuWest3"] = "eu-west-3";
+ FunctionRegion["SaEast1"] = "sa-east-1";
+ FunctionRegion["UsEast1"] = "us-east-1";
+ FunctionRegion["UsWest1"] = "us-west-1";
+ FunctionRegion["UsWest2"] = "us-west-2";
+})(FunctionRegion = exports.FunctionRegion || (exports.FunctionRegion = {}));
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/main/version.js b/node_modules/@supabase/functions-js/dist/main/version.js
new file mode 100644
index 0000000..6823a20
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/main/version.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+exports.version = '2.4.4';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js b/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js
new file mode 100644
index 0000000..feccde5
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js
@@ -0,0 +1,114 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { resolveFetch } from './helper';
+import { FunctionsFetchError, FunctionsHttpError, FunctionsRelayError, FunctionRegion, } from './types';
+export class FunctionsClient {
+ constructor(url, { headers = {}, customFetch, region = FunctionRegion.Any, } = {}) {
+ this.url = url;
+ this.headers = headers;
+ this.region = region;
+ this.fetch = resolveFetch(customFetch);
+ }
+ /**
+ * Updates the authorization header
+ * @param token - the new jwt token sent in the authorisation header
+ */
+ setAuth(token) {
+ this.headers.Authorization = `Bearer ${token}`;
+ }
+ /**
+ * Invokes a function
+ * @param functionName - The name of the Function to invoke.
+ * @param options - Options for invoking the Function.
+ */
+ invoke(functionName, options = {}) {
+ var _a;
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const { headers, method, body: functionArgs } = options;
+ let _headers = {};
+ let { region } = options;
+ if (!region) {
+ region = this.region;
+ }
+ if (region && region !== 'any') {
+ _headers['x-region'] = region;
+ }
+ let body;
+ if (functionArgs &&
+ ((headers && !Object.prototype.hasOwnProperty.call(headers, 'Content-Type')) || !headers)) {
+ if ((typeof Blob !== 'undefined' && functionArgs instanceof Blob) ||
+ functionArgs instanceof ArrayBuffer) {
+ // will work for File as File inherits Blob
+ // also works for ArrayBuffer as it is the same underlying structure as a Blob
+ _headers['Content-Type'] = 'application/octet-stream';
+ body = functionArgs;
+ }
+ else if (typeof functionArgs === 'string') {
+ // plain string
+ _headers['Content-Type'] = 'text/plain';
+ body = functionArgs;
+ }
+ else if (typeof FormData !== 'undefined' && functionArgs instanceof FormData) {
+ // don't set content-type headers
+ // Request will automatically add the right boundary value
+ body = functionArgs;
+ }
+ else {
+ // default, assume this is JSON
+ _headers['Content-Type'] = 'application/json';
+ body = JSON.stringify(functionArgs);
+ }
+ }
+ const response = yield this.fetch(`${this.url}/${functionName}`, {
+ method: method || 'POST',
+ // headers priority is (high to low):
+ // 1. invoke-level headers
+ // 2. client-level headers
+ // 3. default Content-Type header
+ headers: Object.assign(Object.assign(Object.assign({}, _headers), this.headers), headers),
+ body,
+ }).catch((fetchError) => {
+ throw new FunctionsFetchError(fetchError);
+ });
+ const isRelayError = response.headers.get('x-relay-error');
+ if (isRelayError && isRelayError === 'true') {
+ throw new FunctionsRelayError(response);
+ }
+ if (!response.ok) {
+ throw new FunctionsHttpError(response);
+ }
+ let responseType = ((_a = response.headers.get('Content-Type')) !== null && _a !== void 0 ? _a : 'text/plain').split(';')[0].trim();
+ let data;
+ if (responseType === 'application/json') {
+ data = yield response.json();
+ }
+ else if (responseType === 'application/octet-stream') {
+ data = yield response.blob();
+ }
+ else if (responseType === 'text/event-stream') {
+ data = response;
+ }
+ else if (responseType === 'multipart/form-data') {
+ data = yield response.formData();
+ }
+ else {
+ // default to text
+ data = yield response.text();
+ }
+ return { data, error: null };
+ }
+ catch (error) {
+ return { data: null, error };
+ }
+ });
+ }
+}
+//# sourceMappingURL=FunctionsClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/module/helper.js b/node_modules/@supabase/functions-js/dist/module/helper.js
new file mode 100644
index 0000000..a32ec1f
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/module/helper.js
@@ -0,0 +1,14 @@
+export const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => import('@supabase/node-fetch').then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+//# sourceMappingURL=helper.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/module/index.js b/node_modules/@supabase/functions-js/dist/module/index.js
new file mode 100644
index 0000000..3a815c5
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/module/index.js
@@ -0,0 +1,3 @@
+export { FunctionsClient } from './FunctionsClient';
+export { FunctionsError, FunctionsFetchError, FunctionsHttpError, FunctionsRelayError, FunctionRegion, } from './types';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/module/types.js b/node_modules/@supabase/functions-js/dist/module/types.js
new file mode 100644
index 0000000..3e4c54f
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/module/types.js
@@ -0,0 +1,42 @@
+export class FunctionsError extends Error {
+ constructor(message, name = 'FunctionsError', context) {
+ super(message);
+ this.name = name;
+ this.context = context;
+ }
+}
+export class FunctionsFetchError extends FunctionsError {
+ constructor(context) {
+ super('Failed to send a request to the Edge Function', 'FunctionsFetchError', context);
+ }
+}
+export class FunctionsRelayError extends FunctionsError {
+ constructor(context) {
+ super('Relay Error invoking the Edge Function', 'FunctionsRelayError', context);
+ }
+}
+export class FunctionsHttpError extends FunctionsError {
+ constructor(context) {
+ super('Edge Function returned a non-2xx status code', 'FunctionsHttpError', context);
+ }
+}
+// Define the enum for the 'region' property
+export var FunctionRegion;
+(function (FunctionRegion) {
+ FunctionRegion["Any"] = "any";
+ FunctionRegion["ApNortheast1"] = "ap-northeast-1";
+ FunctionRegion["ApNortheast2"] = "ap-northeast-2";
+ FunctionRegion["ApSouth1"] = "ap-south-1";
+ FunctionRegion["ApSoutheast1"] = "ap-southeast-1";
+ FunctionRegion["ApSoutheast2"] = "ap-southeast-2";
+ FunctionRegion["CaCentral1"] = "ca-central-1";
+ FunctionRegion["EuCentral1"] = "eu-central-1";
+ FunctionRegion["EuWest1"] = "eu-west-1";
+ FunctionRegion["EuWest2"] = "eu-west-2";
+ FunctionRegion["EuWest3"] = "eu-west-3";
+ FunctionRegion["SaEast1"] = "sa-east-1";
+ FunctionRegion["UsEast1"] = "us-east-1";
+ FunctionRegion["UsWest1"] = "us-west-1";
+ FunctionRegion["UsWest2"] = "us-west-2";
+})(FunctionRegion || (FunctionRegion = {}));
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/dist/module/version.js b/node_modules/@supabase/functions-js/dist/module/version.js
new file mode 100644
index 0000000..e541bc5
--- /dev/null
+++ b/node_modules/@supabase/functions-js/dist/module/version.js
@@ -0,0 +1,2 @@
+export const version = '2.4.4';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/functions-js/package.json b/node_modules/@supabase/functions-js/package.json
new file mode 100644
index 0000000..0cc1e89
--- /dev/null
+++ b/node_modules/@supabase/functions-js/package.json
@@ -0,0 +1,65 @@
+{
+ "name": "@supabase/functions-js",
+ "version": "2.4.4",
+ "description": "JS Client library to interact with Supabase Functions.",
+ "main": "dist/main/index.js",
+ "module": "dist/module/index.js",
+ "types": "dist/module/index.d.ts",
+ "sideEffects": false,
+ "scripts": {
+ "clean": "rimraf dist docs/v2",
+ "format": "prettier --write \"{src,test}/**/*.ts\"",
+ "build": "run-s clean format build:*",
+ "build:main": "tsc -p tsconfig.json",
+ "build:module": "tsc -p tsconfig.module.json",
+ "docs": "typedoc src/index.ts --out docs/v2",
+ "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals src/index.ts",
+ "test": "jest",
+ "test:coverage": "jest --coverage"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/supabase/functions-js.git"
+ },
+ "keywords": [
+ "functions",
+ "supabase"
+ ],
+ "author": "Supabase",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/supabase/functions-js/issues"
+ },
+ "homepage": "https://github.com/supabase/functions-js#readme",
+ "dependencies": {
+ "@supabase/node-fetch": "^2.6.14"
+ },
+ "devDependencies": {
+ "@sebbo2002/semantic-release-jsr": "^1.0.0",
+ "@types/jest": "^28.1.0",
+ "@types/jsonwebtoken": "^8.5.8",
+ "@types/node": "^18.7.0",
+ "genversion": "^3.0.2",
+ "jest": "^28.1.0",
+ "jsonwebtoken": "^9.0.0",
+ "nanoid": "^3.3.1",
+ "npm-run-all": "^4.1.5",
+ "openai": "^4.52.5",
+ "prettier": "^2.6.0",
+ "rimraf": "^3.0.2",
+ "semantic-release-plugin-update-version-in-files": "^1.1.0",
+ "testcontainers": "^8.5.1",
+ "ts-jest": "^28.0.0",
+ "ts-node": "^10.9.0",
+ "ts-test-decorators": "^0.0.6",
+ "typedoc": "^0.22.13",
+ "typescript": "^4.6.2"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/node_modules/@supabase/node-fetch/LICENSE.md b/node_modules/@supabase/node-fetch/LICENSE.md
new file mode 100644
index 0000000..660ffec
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/LICENSE.md
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 David Frank
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/@supabase/node-fetch/README.md b/node_modules/@supabase/node-fetch/README.md
new file mode 100644
index 0000000..4f87a59
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/README.md
@@ -0,0 +1,633 @@
+node-fetch
+==========
+
+[![npm version][npm-image]][npm-url]
+[![build status][travis-image]][travis-url]
+[![coverage status][codecov-image]][codecov-url]
+[![install size][install-size-image]][install-size-url]
+[![Discord][discord-image]][discord-url]
+
+A light-weight module that brings `window.fetch` to Node.js
+
+(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567))
+
+[![Backers][opencollective-image]][opencollective-url]
+
+
+
+- [Motivation](#motivation)
+- [Features](#features)
+- [Difference from client-side fetch](#difference-from-client-side-fetch)
+- [Installation](#installation)
+- [Loading and configuring the module](#loading-and-configuring-the-module)
+- [Common Usage](#common-usage)
+ - [Plain text or HTML](#plain-text-or-html)
+ - [JSON](#json)
+ - [Simple Post](#simple-post)
+ - [Post with JSON](#post-with-json)
+ - [Post with form parameters](#post-with-form-parameters)
+ - [Handling exceptions](#handling-exceptions)
+ - [Handling client and server errors](#handling-client-and-server-errors)
+- [Advanced Usage](#advanced-usage)
+ - [Streams](#streams)
+ - [Buffer](#buffer)
+ - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data)
+ - [Extract Set-Cookie Header](#extract-set-cookie-header)
+ - [Post data using a file stream](#post-data-using-a-file-stream)
+ - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart)
+ - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal)
+- [API](#api)
+ - [fetch(url[, options])](#fetchurl-options)
+ - [Options](#options)
+ - [Class: Request](#class-request)
+ - [Class: Response](#class-response)
+ - [Class: Headers](#class-headers)
+ - [Interface: Body](#interface-body)
+ - [Class: FetchError](#class-fetcherror)
+- [License](#license)
+- [Acknowledgement](#acknowledgement)
+
+
+
+## Motivation
+
+Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime.
+
+See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side).
+
+## Features
+
+- Stay consistent with `window.fetch` API.
+- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences.
+- Use native promise but allow substituting it with [insert your favorite promise library].
+- Use native Node streams for body on both request and response.
+- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically.
+- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting.
+
+## Difference from client-side fetch
+
+- See [Known Differences](LIMITS.md) for details.
+- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue.
+- Pull requests are welcomed too!
+
+## Installation
+
+Current stable release (`2.x`)
+
+```sh
+$ npm install node-fetch
+```
+
+## Loading and configuring the module
+We suggest you load the module via `require` until the stabilization of ES modules in node:
+```js
+const fetch = require('node-fetch');
+```
+
+If you are using a Promise library other than native, set it through `fetch.Promise`:
+```js
+const Bluebird = require('bluebird');
+
+fetch.Promise = Bluebird;
+```
+
+## Common Usage
+
+NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences.
+
+#### Plain text or HTML
+```js
+fetch('https://github.com/')
+ .then(res => res.text())
+ .then(body => console.log(body));
+```
+
+#### JSON
+
+```js
+
+fetch('https://api.github.com/users/github')
+ .then(res => res.json())
+ .then(json => console.log(json));
+```
+
+#### Simple Post
+```js
+fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' })
+ .then(res => res.json()) // expecting a json response
+ .then(json => console.log(json));
+```
+
+#### Post with JSON
+
+```js
+const body = { a: 1 };
+
+fetch('https://httpbin.org/post', {
+ method: 'post',
+ body: JSON.stringify(body),
+ headers: { 'Content-Type': 'application/json' },
+ })
+ .then(res => res.json())
+ .then(json => console.log(json));
+```
+
+#### Post with form parameters
+`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods.
+
+NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such:
+
+```js
+const { URLSearchParams } = require('url');
+
+const params = new URLSearchParams();
+params.append('a', 1);
+
+fetch('https://httpbin.org/post', { method: 'POST', body: params })
+ .then(res => res.json())
+ .then(json => console.log(json));
+```
+
+#### Handling exceptions
+NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information.
+
+Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details.
+
+```js
+fetch('https://domain.invalid/')
+ .catch(err => console.error(err));
+```
+
+#### Handling client and server errors
+It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses:
+
+```js
+function checkStatus(res) {
+ if (res.ok) { // res.status >= 200 && res.status < 300
+ return res;
+ } else {
+ throw MyCustomError(res.statusText);
+ }
+}
+
+fetch('https://httpbin.org/status/400')
+ .then(checkStatus)
+ .then(res => console.log('will not get here...'))
+```
+
+## Advanced Usage
+
+#### Streams
+The "Node.js way" is to use streams when possible:
+
+```js
+fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
+ .then(res => {
+ const dest = fs.createWriteStream('./octocat.png');
+ res.body.pipe(dest);
+ });
+```
+
+In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch
+errors -- the longer a response runs, the more likely it is to encounter an error.
+
+```js
+const fetch = require('node-fetch');
+const response = await fetch('https://httpbin.org/stream/3');
+try {
+ for await (const chunk of response.body) {
+ console.dir(JSON.parse(chunk.toString()));
+ }
+} catch (err) {
+ console.error(err.stack);
+}
+```
+
+In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams
+did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors
+directly from the stream and wait on it response to fully close.
+
+```js
+const fetch = require('node-fetch');
+const read = async body => {
+ let error;
+ body.on('error', err => {
+ error = err;
+ });
+ for await (const chunk of body) {
+ console.dir(JSON.parse(chunk.toString()));
+ }
+ return new Promise((resolve, reject) => {
+ body.on('close', () => {
+ error ? reject(error) : resolve();
+ });
+ });
+};
+try {
+ const response = await fetch('https://httpbin.org/stream/3');
+ await read(response.body);
+} catch (err) {
+ console.error(err.stack);
+}
+```
+
+#### Buffer
+If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API)
+
+```js
+const fileType = require('file-type');
+
+fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
+ .then(res => res.buffer())
+ .then(buffer => fileType(buffer))
+ .then(type => { /* ... */ });
+```
+
+#### Accessing Headers and other Meta data
+```js
+fetch('https://github.com/')
+ .then(res => {
+ console.log(res.ok);
+ console.log(res.status);
+ console.log(res.statusText);
+ console.log(res.headers.raw());
+ console.log(res.headers.get('content-type'));
+ });
+```
+
+#### Extract Set-Cookie Header
+
+Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API.
+
+```js
+fetch(url).then(res => {
+ // returns an array of values, instead of a string of comma-separated values
+ console.log(res.headers.raw()['set-cookie']);
+});
+```
+
+#### Post data using a file stream
+
+```js
+const { createReadStream } = require('fs');
+
+const stream = createReadStream('input.txt');
+
+fetch('https://httpbin.org/post', { method: 'POST', body: stream })
+ .then(res => res.json())
+ .then(json => console.log(json));
+```
+
+#### Post with form-data (detect multipart)
+
+```js
+const FormData = require('form-data');
+
+const form = new FormData();
+form.append('a', 1);
+
+fetch('https://httpbin.org/post', { method: 'POST', body: form })
+ .then(res => res.json())
+ .then(json => console.log(json));
+
+// OR, using custom headers
+// NOTE: getHeaders() is non-standard API
+
+const form = new FormData();
+form.append('a', 1);
+
+const options = {
+ method: 'POST',
+ body: form,
+ headers: form.getHeaders()
+}
+
+fetch('https://httpbin.org/post', options)
+ .then(res => res.json())
+ .then(json => console.log(json));
+```
+
+#### Request cancellation with AbortSignal
+
+> NOTE: You may cancel streamed requests only on Node >= v8.0.0
+
+You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller).
+
+An example of timing out a request after 150ms could be achieved as the following:
+
+```js
+import AbortController from 'abort-controller';
+
+const controller = new AbortController();
+const timeout = setTimeout(
+ () => { controller.abort(); },
+ 150,
+);
+
+fetch(url, { signal: controller.signal })
+ .then(res => res.json())
+ .then(
+ data => {
+ useData(data)
+ },
+ err => {
+ if (err.name === 'AbortError') {
+ // request was aborted
+ }
+ },
+ )
+ .finally(() => {
+ clearTimeout(timeout);
+ });
+```
+
+See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples.
+
+
+## API
+
+### fetch(url[, options])
+
+- `url` A string representing the URL for fetching
+- `options` [Options](#fetch-options) for the HTTP(S) request
+- Returns: Promise<[Response](#class-response)>
+
+Perform an HTTP(S) fetch.
+
+`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`.
+
+
+### Options
+
+The default values are shown after each option key.
+
+```js
+{
+ // These properties are part of the Fetch Standard
+ method: 'GET',
+ headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below)
+ body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream
+ redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect
+ signal: null, // pass an instance of AbortSignal to optionally abort requests
+
+ // The following properties are node-fetch extensions
+ follow: 20, // maximum redirect count. 0 to not follow redirect
+ timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead.
+ compress: true, // support gzip/deflate content encoding. false to disable
+ size: 0, // maximum response body size in bytes. 0 to disable
+ agent: null // http(s).Agent instance or function that returns an instance (see below)
+}
+```
+
+##### Default Headers
+
+If no values are set, the following request headers will be sent automatically:
+
+Header | Value
+------------------- | --------------------------------------------------------
+`Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_
+`Accept` | `*/*`
+`Connection` | `close` _(when no `options.agent` is present)_
+`Content-Length` | _(automatically calculated, if possible)_
+`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_
+`User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)`
+
+Note: when `body` is a `Stream`, `Content-Length` is not set automatically.
+
+##### Custom Agent
+
+The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following:
+
+- Support self-signed certificate
+- Use only IPv4 or IPv6
+- Custom DNS Lookup
+
+See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information.
+
+In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol.
+
+```js
+const httpAgent = new http.Agent({
+ keepAlive: true
+});
+const httpsAgent = new https.Agent({
+ keepAlive: true
+});
+
+const options = {
+ agent: function (_parsedURL) {
+ if (_parsedURL.protocol == 'http:') {
+ return httpAgent;
+ } else {
+ return httpsAgent;
+ }
+ }
+}
+```
+
+
+### Class: Request
+
+An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface.
+
+Due to the nature of Node.js, the following properties are not implemented at this moment:
+
+- `type`
+- `destination`
+- `referrer`
+- `referrerPolicy`
+- `mode`
+- `credentials`
+- `cache`
+- `integrity`
+- `keepalive`
+
+The following node-fetch extension properties are provided:
+
+- `follow`
+- `compress`
+- `counter`
+- `agent`
+
+See [options](#fetch-options) for exact meaning of these extensions.
+
+#### new Request(input[, options])
+
+*(spec-compliant)*
+
+- `input` A string representing a URL, or another `Request` (which will be cloned)
+- `options` [Options][#fetch-options] for the HTTP(S) request
+
+Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
+
+In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object.
+
+
+### Class: Response
+
+An HTTP(S) response. This class implements the [Body](#iface-body) interface.
+
+The following properties are not implemented in node-fetch at this moment:
+
+- `Response.error()`
+- `Response.redirect()`
+- `type`
+- `trailer`
+
+#### new Response([body[, options]])
+
+*(spec-compliant)*
+
+- `body` A `String` or [`Readable` stream][node-readable]
+- `options` A [`ResponseInit`][response-init] options dictionary
+
+Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response).
+
+Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly.
+
+#### response.ok
+
+*(spec-compliant)*
+
+Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300.
+
+#### response.redirected
+
+*(spec-compliant)*
+
+Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0.
+
+
+### Class: Headers
+
+This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented.
+
+#### new Headers([init])
+
+*(spec-compliant)*
+
+- `init` Optional argument to pre-fill the `Headers` object
+
+Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object.
+
+```js
+// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class
+
+const meta = {
+ 'Content-Type': 'text/xml',
+ 'Breaking-Bad': '<3'
+};
+const headers = new Headers(meta);
+
+// The above is equivalent to
+const meta = [
+ [ 'Content-Type', 'text/xml' ],
+ [ 'Breaking-Bad', '<3' ]
+];
+const headers = new Headers(meta);
+
+// You can in fact use any iterable objects, like a Map or even another Headers
+const meta = new Map();
+meta.set('Content-Type', 'text/xml');
+meta.set('Breaking-Bad', '<3');
+const headers = new Headers(meta);
+const copyOfHeaders = new Headers(headers);
+```
+
+
+### Interface: Body
+
+`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes.
+
+The following methods are not yet implemented in node-fetch at this moment:
+
+- `formData()`
+
+#### body.body
+
+*(deviation from spec)*
+
+* Node.js [`Readable` stream][node-readable]
+
+Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable].
+
+#### body.bodyUsed
+
+*(spec-compliant)*
+
+* `Boolean`
+
+A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again.
+
+#### body.arrayBuffer()
+#### body.blob()
+#### body.json()
+#### body.text()
+
+*(spec-compliant)*
+
+* Returns: Promise
+
+Consume the body and return a promise that will resolve to one of these formats.
+
+#### body.buffer()
+
+*(node-fetch extension)*
+
+* Returns: Promise<Buffer>
+
+Consume the body and return a promise that will resolve to a Buffer.
+
+#### body.textConverted()
+
+*(node-fetch extension)*
+
+* Returns: Promise<String>
+
+Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible.
+
+(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.)
+
+
+### Class: FetchError
+
+*(node-fetch extension)*
+
+An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info.
+
+
+### Class: AbortError
+
+*(node-fetch extension)*
+
+An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info.
+
+## Acknowledgement
+
+Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference.
+
+`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr).
+
+## License
+
+MIT
+
+[npm-image]: https://flat.badgen.net/npm/v/node-fetch
+[npm-url]: https://www.npmjs.com/package/node-fetch
+[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch
+[travis-url]: https://travis-ci.org/bitinn/node-fetch
+[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master
+[codecov-url]: https://codecov.io/gh/bitinn/node-fetch
+[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch
+[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch
+[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square
+[discord-url]: https://discord.gg/Zxbndcm
+[opencollective-image]: https://opencollective.com/node-fetch/backers.svg
+[opencollective-url]: https://opencollective.com/node-fetch
+[whatwg-fetch]: https://fetch.spec.whatwg.org/
+[response-init]: https://fetch.spec.whatwg.org/#responseinit
+[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams
+[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers
+[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md
+[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md
+[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md
diff --git a/node_modules/@supabase/node-fetch/browser.js b/node_modules/@supabase/node-fetch/browser.js
new file mode 100644
index 0000000..113b510
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/browser.js
@@ -0,0 +1,22 @@
+"use strict";
+
+// ref: https://github.com/tc39/proposal-global
+var getGlobal = function() {
+ // the only reliable means to get the global object is
+ // `Function('return this')()`
+ // However, this causes CSP violations in Chrome apps.
+ if (typeof self !== 'undefined') { return self; }
+ if (typeof window !== 'undefined') { return window; }
+ if (typeof global !== 'undefined') { return global; }
+ throw new Error('unable to locate global object');
+}
+
+var globalObject = getGlobal();
+
+export const fetch = globalObject.fetch;
+
+export default globalObject.fetch.bind(globalObject);
+
+export const Headers = globalObject.Headers;
+export const Request = globalObject.Request;
+export const Response = globalObject.Response;
diff --git a/node_modules/@supabase/node-fetch/lib/index.es.js b/node_modules/@supabase/node-fetch/lib/index.es.js
new file mode 100644
index 0000000..dc6b054
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/lib/index.es.js
@@ -0,0 +1,1778 @@
+process.emitWarning("The .es.js file is deprecated. Use .mjs instead.");
+
+import Stream from 'stream';
+import http from 'http';
+import Url from 'url';
+import whatwgUrl from 'whatwg-url';
+import https from 'https';
+import zlib from 'zlib';
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+ constructor() {
+ this[TYPE] = '';
+
+ const blobParts = arguments[0];
+ const options = arguments[1];
+
+ const buffers = [];
+ let size = 0;
+
+ if (blobParts) {
+ const a = blobParts;
+ const length = Number(a.length);
+ for (let i = 0; i < length; i++) {
+ const element = a[i];
+ let buffer;
+ if (element instanceof Buffer) {
+ buffer = element;
+ } else if (ArrayBuffer.isView(element)) {
+ buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+ } else if (element instanceof ArrayBuffer) {
+ buffer = Buffer.from(element);
+ } else if (element instanceof Blob) {
+ buffer = element[BUFFER];
+ } else {
+ buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+ }
+ size += buffer.length;
+ buffers.push(buffer);
+ }
+ }
+
+ this[BUFFER] = Buffer.concat(buffers);
+
+ let type = options && options.type !== undefined && String(options.type).toLowerCase();
+ if (type && !/[^\u0020-\u007E]/.test(type)) {
+ this[TYPE] = type;
+ }
+ }
+ get size() {
+ return this[BUFFER].length;
+ }
+ get type() {
+ return this[TYPE];
+ }
+ text() {
+ return Promise.resolve(this[BUFFER].toString());
+ }
+ arrayBuffer() {
+ const buf = this[BUFFER];
+ const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ return Promise.resolve(ab);
+ }
+ stream() {
+ const readable = new Readable();
+ readable._read = function () {};
+ readable.push(this[BUFFER]);
+ readable.push(null);
+ return readable;
+ }
+ toString() {
+ return '[object Blob]';
+ }
+ slice() {
+ const size = this.size;
+
+ const start = arguments[0];
+ const end = arguments[1];
+ let relativeStart, relativeEnd;
+ if (start === undefined) {
+ relativeStart = 0;
+ } else if (start < 0) {
+ relativeStart = Math.max(size + start, 0);
+ } else {
+ relativeStart = Math.min(start, size);
+ }
+ if (end === undefined) {
+ relativeEnd = size;
+ } else if (end < 0) {
+ relativeEnd = Math.max(size + end, 0);
+ } else {
+ relativeEnd = Math.min(end, size);
+ }
+ const span = Math.max(relativeEnd - relativeStart, 0);
+
+ const buffer = this[BUFFER];
+ const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+ const blob = new Blob([], { type: arguments[2] });
+ blob[BUFFER] = slicedBuffer;
+ return blob;
+ }
+}
+
+Object.defineProperties(Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+ value: 'Blob',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param String message Error message for human
+ * @param String type Error type for machine
+ * @param String systemError For Node.js system error
+ * @return FetchError
+ */
+function FetchError(message, type, systemError) {
+ Error.call(this, message);
+
+ this.message = message;
+ this.type = type;
+
+ // when err.type is `system`, err.code contains system error code
+ if (systemError) {
+ this.code = this.errno = systemError.code;
+ }
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+function Body(body) {
+ var _this = this;
+
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ _ref$size = _ref.size;
+
+ let size = _ref$size === undefined ? 0 : _ref$size;
+ var _ref$timeout = _ref.timeout;
+ let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+ if (body == null) {
+ // body is undefined or null
+ body = null;
+ } else if (isURLSearchParams(body)) {
+ // body is a URLSearchParams
+ body = Buffer.from(body.toString());
+ } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+ // body is ArrayBuffer
+ body = Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ // body is ArrayBufferView
+ body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof Stream) ; else {
+ // none of the above
+ // coerce to string then buffer
+ body = Buffer.from(String(body));
+ }
+ this[INTERNALS] = {
+ body,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+ this.timeout = timeout;
+
+ if (body instanceof Stream) {
+ body.on('error', function (err) {
+ const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+ _this[INTERNALS].error = error;
+ });
+ }
+}
+
+Body.prototype = {
+ get body() {
+ return this[INTERNALS].body;
+ },
+
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ },
+
+ /**
+ * Decode response as ArrayBuffer
+ *
+ * @return Promise
+ */
+ arrayBuffer() {
+ return consumeBody.call(this).then(function (buf) {
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ });
+ },
+
+ /**
+ * Return raw response as Blob
+ *
+ * @return Promise
+ */
+ blob() {
+ let ct = this.headers && this.headers.get('content-type') || '';
+ return consumeBody.call(this).then(function (buf) {
+ return Object.assign(
+ // Prevent copying
+ new Blob([], {
+ type: ct.toLowerCase()
+ }), {
+ [BUFFER]: buf
+ });
+ });
+ },
+
+ /**
+ * Decode response as json
+ *
+ * @return Promise
+ */
+ json() {
+ var _this2 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ try {
+ return JSON.parse(buffer.toString());
+ } catch (err) {
+ return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+ }
+ });
+ },
+
+ /**
+ * Decode response as text
+ *
+ * @return Promise
+ */
+ text() {
+ return consumeBody.call(this).then(function (buffer) {
+ return buffer.toString();
+ });
+ },
+
+ /**
+ * Decode response as buffer (non-spec api)
+ *
+ * @return Promise
+ */
+ buffer() {
+ return consumeBody.call(this);
+ },
+
+ /**
+ * Decode response as text, while automatically detecting the encoding and
+ * trying to decode to UTF-8 (non-spec api)
+ *
+ * @return Promise
+ */
+ textConverted() {
+ var _this3 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ return convertBody(buffer, _this3.headers);
+ });
+ }
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+ body: { enumerable: true },
+ bodyUsed: { enumerable: true },
+ arrayBuffer: { enumerable: true },
+ blob: { enumerable: true },
+ json: { enumerable: true },
+ text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+ for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+ // istanbul ignore else: future proof
+ if (!(name in proto)) {
+ const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+ Object.defineProperty(proto, name, desc);
+ }
+ }
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+function consumeBody() {
+ var _this4 = this;
+
+ if (this[INTERNALS].disturbed) {
+ return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+ }
+
+ this[INTERNALS].disturbed = true;
+
+ if (this[INTERNALS].error) {
+ return Body.Promise.reject(this[INTERNALS].error);
+ }
+
+ let body = this.body;
+
+ // body is null
+ if (body === null) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is blob
+ if (isBlob(body)) {
+ body = body.stream();
+ }
+
+ // body is buffer
+ if (Buffer.isBuffer(body)) {
+ return Body.Promise.resolve(body);
+ }
+
+ // istanbul ignore if: should never happen
+ if (!(body instanceof Stream)) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is stream
+ // get ready to actually consume the body
+ let accum = [];
+ let accumBytes = 0;
+ let abort = false;
+
+ return new Body.Promise(function (resolve, reject) {
+ let resTimeout;
+
+ // allow timeout on slow response body
+ if (_this4.timeout) {
+ resTimeout = setTimeout(function () {
+ abort = true;
+ reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+ }, _this4.timeout);
+ }
+
+ // handle stream errors
+ body.on('error', function (err) {
+ if (err.name === 'AbortError') {
+ // if the request was aborted, reject with this Error
+ abort = true;
+ reject(err);
+ } else {
+ // other errors, such as incorrect content-encoding
+ reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+
+ body.on('data', function (chunk) {
+ if (abort || chunk === null) {
+ return;
+ }
+
+ if (_this4.size && accumBytes + chunk.length > _this4.size) {
+ abort = true;
+ reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+ return;
+ }
+
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ });
+
+ body.on('end', function () {
+ if (abort) {
+ return;
+ }
+
+ clearTimeout(resTimeout);
+
+ try {
+ resolve(Buffer.concat(accum, accumBytes));
+ } catch (err) {
+ // handle streams that have accumulated too much data (issue #414)
+ reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+ });
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param Buffer buffer Incoming buffer
+ * @param String encoding Target encoding
+ * @return String
+ */
+function convertBody(buffer, headers) {
+ {
+ throw new Error('The package `encoding` must be installed to use the textConverted() function');
+ }
+
+ const ct = headers.get('content-type');
+ let charset = 'utf-8';
+ let res, str;
+
+ // header
+ if (ct) {
+ res = /charset=([^;]*)/i.exec(ct);
+ }
+
+ // no charset in content type, peek at response body for at most 1024 bytes
+ str = buffer.slice(0, 1024).toString();
+
+ // html5
+ if (!res && str) {
+ res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+ this[MAP] = Object.create(null);
+
+ if (init instanceof Headers) {
+ const rawHeaders = init.raw();
+ const headerNames = Object.keys(rawHeaders);
+
+ for (const headerName of headerNames) {
+ for (const value of rawHeaders[headerName]) {
+ this.append(headerName, value);
+ }
+ }
+
+ return;
+ }
+
+ // We don't worry about converting prop to ByteString here as append()
+ // will handle it.
+ if (init == null) ; else if (typeof init === 'object') {
+ const method = init[Symbol.iterator];
+ if (method != null) {
+ if (typeof method !== 'function') {
+ throw new TypeError('Header pairs must be iterable');
+ }
+
+ // sequence>
+ // Note: per spec we have to first exhaust the lists then process them
+ const pairs = [];
+ for (const pair of init) {
+ if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+ throw new TypeError('Each header pair must be iterable');
+ }
+ pairs.push(Array.from(pair));
+ }
+
+ for (const pair of pairs) {
+ if (pair.length !== 2) {
+ throw new TypeError('Each header pair must be a name/value tuple');
+ }
+ this.append(pair[0], pair[1]);
+ }
+ } else {
+ // record
+ for (const key of Object.keys(init)) {
+ const value = init[key];
+ this.append(key, value);
+ }
+ }
+ } else {
+ throw new TypeError('Provided initializer must be an object');
+ }
+ }
+
+ /**
+ * Return combined header value given name
+ *
+ * @param String name Header name
+ * @return Mixed
+ */
+ get(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key === undefined) {
+ return null;
+ }
+
+ return this[MAP][key].join(', ');
+ }
+
+ /**
+ * Iterate over all headers
+ *
+ * @param Function callback Executed for each item with parameters (value, name, thisArg)
+ * @param Boolean thisArg `this` context for callback function
+ * @return Void
+ */
+ forEach(callback) {
+ let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+ let pairs = getHeaders(this);
+ let i = 0;
+ while (i < pairs.length) {
+ var _pairs$i = pairs[i];
+ const name = _pairs$i[0],
+ value = _pairs$i[1];
+
+ callback.call(thisArg, value, name, this);
+ pairs = getHeaders(this);
+ i++;
+ }
+ }
+
+ /**
+ * Overwrite header values given name
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ set(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ this[MAP][key !== undefined ? key : name] = [value];
+ }
+
+ /**
+ * Append a value onto existing header
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ append(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ this[MAP][key].push(value);
+ } else {
+ this[MAP][name] = [value];
+ }
+ }
+
+ /**
+ * Check for header name existence
+ *
+ * @param String name Header name
+ * @return Boolean
+ */
+ has(name) {
+ name = `${name}`;
+ validateName(name);
+ return find(this[MAP], name) !== undefined;
+ }
+
+ /**
+ * Delete all header values given name
+ *
+ * @param String name Header name
+ * @return Void
+ */
+ delete(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ delete this[MAP][key];
+ }
+ }
+
+ /**
+ * Return raw headers (non-spec api)
+ *
+ * @return Object
+ */
+ raw() {
+ return this[MAP];
+ }
+
+ /**
+ * Get an iterator on keys.
+ *
+ * @return Iterator
+ */
+ keys() {
+ return createHeadersIterator(this, 'key');
+ }
+
+ /**
+ * Get an iterator on values.
+ *
+ * @return Iterator
+ */
+ values() {
+ return createHeadersIterator(this, 'value');
+ }
+
+ /**
+ * Get an iterator on entries.
+ *
+ * This is the default iterator of the Headers object.
+ *
+ * @return Iterator
+ */
+ [Symbol.iterator]() {
+ return createHeadersIterator(this, 'key+value');
+ }
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+ value: 'Headers',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+ get: { enumerable: true },
+ forEach: { enumerable: true },
+ set: { enumerable: true },
+ append: { enumerable: true },
+ has: { enumerable: true },
+ delete: { enumerable: true },
+ keys: { enumerable: true },
+ values: { enumerable: true },
+ entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+ let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+ const keys = Object.keys(headers[MAP]).sort();
+ return keys.map(kind === 'key' ? function (k) {
+ return k.toLowerCase();
+ } : kind === 'value' ? function (k) {
+ return headers[MAP][k].join(', ');
+ } : function (k) {
+ return [k.toLowerCase(), headers[MAP][k].join(', ')];
+ });
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+ const iterator = Object.create(HeadersIteratorPrototype);
+ iterator[INTERNAL] = {
+ target,
+ kind,
+ index: 0
+ };
+ return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+ next() {
+ // istanbul ignore if
+ if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+ throw new TypeError('Value of `this` is not a HeadersIterator');
+ }
+
+ var _INTERNAL = this[INTERNAL];
+ const target = _INTERNAL.target,
+ kind = _INTERNAL.kind,
+ index = _INTERNAL.index;
+
+ const values = getHeaders(target, kind);
+ const len = values.length;
+ if (index >= len) {
+ return {
+ value: undefined,
+ done: true
+ };
+ }
+
+ this[INTERNAL].index = index + 1;
+
+ return {
+ value: values[index],
+ done: false
+ };
+ }
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+ value: 'HeadersIterator',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param Headers headers
+ * @return Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+ const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+ // http.request() only supports string as Host header. This hack makes
+ // specifying custom Host header possible.
+ const hostHeaderKey = find(headers[MAP], 'Host');
+ if (hostHeaderKey !== undefined) {
+ obj[hostHeaderKey] = obj[hostHeaderKey][0];
+ }
+
+ return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param Object obj Object of headers
+ * @return Headers
+ */
+function createHeadersLenient(obj) {
+ const headers = new Headers();
+ for (const name of Object.keys(obj)) {
+ if (invalidTokenRegex.test(name)) {
+ continue;
+ }
+ if (Array.isArray(obj[name])) {
+ for (const val of obj[name]) {
+ if (invalidHeaderCharRegex.test(val)) {
+ continue;
+ }
+ if (headers[MAP][name] === undefined) {
+ headers[MAP][name] = [val];
+ } else {
+ headers[MAP][name].push(val);
+ }
+ }
+ } else if (!invalidHeaderCharRegex.test(obj[name])) {
+ headers[MAP][name] = [obj[name]];
+ }
+ }
+ return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+class Response {
+ constructor() {
+ let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+ let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ Body.call(this, body, opts);
+
+ const status = opts.status || 200;
+ const headers = new Headers(opts.headers);
+
+ if (body != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(body);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ this[INTERNALS$1] = {
+ url: opts.url,
+ status,
+ statusText: opts.statusText || STATUS_CODES[status],
+ headers,
+ counter: opts.counter
+ };
+ }
+
+ get url() {
+ return this[INTERNALS$1].url || '';
+ }
+
+ get status() {
+ return this[INTERNALS$1].status;
+ }
+
+ /**
+ * Convenience property representing if the request ended normally
+ */
+ get ok() {
+ return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+ }
+
+ get redirected() {
+ return this[INTERNALS$1].counter > 0;
+ }
+
+ get statusText() {
+ return this[INTERNALS$1].statusText;
+ }
+
+ get headers() {
+ return this[INTERNALS$1].headers;
+ }
+
+ /**
+ * Clone this response
+ *
+ * @return Response
+ */
+ clone() {
+ return new Response(clone(this), {
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected
+ });
+ }
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+ url: { enumerable: true },
+ status: { enumerable: true },
+ ok: { enumerable: true },
+ redirected: { enumerable: true },
+ statusText: { enumerable: true },
+ headers: { enumerable: true },
+ clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+ value: 'Response',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+const URL = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+/**
+ * Wrapper around `new URL` to handle arbitrary URLs
+ *
+ * @param {string} urlStr
+ * @return {void}
+ */
+function parseURL(urlStr) {
+ /*
+ Check whether the URL is absolute or not
+ Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
+ Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
+ */
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
+ urlStr = new URL(urlStr).toString();
+ }
+
+ // Fallback to old implementation for arbitrary URLs
+ return parse_url(urlStr);
+}
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param Mixed input
+ * @return Boolean
+ */
+function isRequest(input) {
+ return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+ const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+ return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param Mixed input Url or Request instance
+ * @param Object init Custom options
+ * @return Void
+ */
+class Request {
+ constructor(input) {
+ let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ let parsedURL;
+
+ // normalize input
+ if (!isRequest(input)) {
+ if (input && input.href) {
+ // in order to support Node.js' Url objects; though WHATWG's URL objects
+ // will fall into this branch also (since their `toString()` will return
+ // `href` property anyway)
+ parsedURL = parseURL(input.href);
+ } else {
+ // coerce input to a string before attempting to parse
+ parsedURL = parseURL(`${input}`);
+ }
+ input = {};
+ } else {
+ parsedURL = parseURL(input.url);
+ }
+
+ let method = init.method || input.method || 'GET';
+ method = method.toUpperCase();
+
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+ throw new TypeError('Request with GET/HEAD method cannot have body');
+ }
+
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+ Body.call(this, inputBody, {
+ timeout: init.timeout || input.timeout || 0,
+ size: init.size || input.size || 0
+ });
+
+ const headers = new Headers(init.headers || input.headers || {});
+
+ if (inputBody != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(inputBody);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ let signal = isRequest(input) ? input.signal : null;
+ if ('signal' in init) signal = init.signal;
+
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError('Expected signal to be an instanceof AbortSignal');
+ }
+
+ this[INTERNALS$2] = {
+ method,
+ redirect: init.redirect || input.redirect || 'follow',
+ headers,
+ parsedURL,
+ signal
+ };
+
+ // node-fetch-only options
+ this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+ this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
+ }
+
+ get method() {
+ return this[INTERNALS$2].method;
+ }
+
+ get url() {
+ return format_url(this[INTERNALS$2].parsedURL);
+ }
+
+ get headers() {
+ return this[INTERNALS$2].headers;
+ }
+
+ get redirect() {
+ return this[INTERNALS$2].redirect;
+ }
+
+ get signal() {
+ return this[INTERNALS$2].signal;
+ }
+
+ /**
+ * Clone this request
+ *
+ * @return Request
+ */
+ clone() {
+ return new Request(this);
+ }
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+ value: 'Request',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+ method: { enumerable: true },
+ url: { enumerable: true },
+ headers: { enumerable: true },
+ redirect: { enumerable: true },
+ clone: { enumerable: true },
+ signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param Request A Request instance
+ * @return Object The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+ const parsedURL = request[INTERNALS$2].parsedURL;
+ const headers = new Headers(request[INTERNALS$2].headers);
+
+ // fetch step 1.3
+ if (!headers.has('Accept')) {
+ headers.set('Accept', '*/*');
+ }
+
+ // Basic fetch
+ if (!parsedURL.protocol || !parsedURL.hostname) {
+ throw new TypeError('Only absolute URLs are supported');
+ }
+
+ if (!/^https?:$/.test(parsedURL.protocol)) {
+ throw new TypeError('Only HTTP(S) protocols are supported');
+ }
+
+ if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+ throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+ }
+
+ // HTTP-network-or-cache fetch steps 2.4-2.7
+ let contentLengthValue = null;
+ if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+ contentLengthValue = '0';
+ }
+ if (request.body != null) {
+ const totalBytes = getTotalBytes(request);
+ if (typeof totalBytes === 'number') {
+ contentLengthValue = String(totalBytes);
+ }
+ }
+ if (contentLengthValue) {
+ headers.set('Content-Length', contentLengthValue);
+ }
+
+ // HTTP-network-or-cache fetch step 2.11
+ if (!headers.has('User-Agent')) {
+ headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+ }
+
+ // HTTP-network-or-cache fetch step 2.15
+ if (request.compress && !headers.has('Accept-Encoding')) {
+ headers.set('Accept-Encoding', 'gzip,deflate');
+ }
+
+ let agent = request.agent;
+ if (typeof agent === 'function') {
+ agent = agent(parsedURL);
+ }
+
+ if (!headers.has('Connection') && !agent) {
+ headers.set('Connection', 'close');
+ }
+
+ // HTTP-network fetch step 4.2
+ // chunked encoding is handled by Node.js
+
+ return Object.assign({}, parsedURL, {
+ method: request.method,
+ headers: exportNodeCompatibleHeaders(headers),
+ agent
+ });
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param String message Error message for human
+ * @return AbortError
+ */
+function AbortError(message) {
+ Error.call(this, message);
+
+ this.type = 'aborted';
+ this.message = message;
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+const URL$1 = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+
+const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
+ const orig = new URL$1(original).hostname;
+ const dest = new URL$1(destination).hostname;
+
+ return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
+};
+
+/**
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+const isSameProtocol = function isSameProtocol(destination, original) {
+ const orig = new URL$1(original).protocol;
+ const dest = new URL$1(destination).protocol;
+
+ return orig === dest;
+};
+
+/**
+ * Fetch function
+ *
+ * @param Mixed url Absolute url or Request instance
+ * @param Object opts Fetch options
+ * @return Promise
+ */
+function fetch(url, opts) {
+
+ // allow custom promise
+ if (!fetch.Promise) {
+ throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+ }
+
+ Body.Promise = fetch.Promise;
+
+ // wrap http.request into fetch
+ return new fetch.Promise(function (resolve, reject) {
+ // build request object
+ const request = new Request(url, opts);
+ const options = getNodeRequestOptions(request);
+
+ const send = (options.protocol === 'https:' ? https : http).request;
+ const signal = request.signal;
+
+ let response = null;
+
+ const abort = function abort() {
+ let error = new AbortError('The user aborted a request.');
+ reject(error);
+ if (request.body && request.body instanceof Stream.Readable) {
+ destroyStream(request.body, error);
+ }
+ if (!response || !response.body) return;
+ response.body.emit('error', error);
+ };
+
+ if (signal && signal.aborted) {
+ abort();
+ return;
+ }
+
+ const abortAndFinalize = function abortAndFinalize() {
+ abort();
+ finalize();
+ };
+
+ // send request
+ const req = send(options);
+ let reqTimeout;
+
+ if (signal) {
+ signal.addEventListener('abort', abortAndFinalize);
+ }
+
+ function finalize() {
+ req.abort();
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ clearTimeout(reqTimeout);
+ }
+
+ if (request.timeout) {
+ req.once('socket', function (socket) {
+ reqTimeout = setTimeout(function () {
+ reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+ finalize();
+ }, request.timeout);
+ });
+ }
+
+ req.on('error', function (err) {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+
+ finalize();
+ });
+
+ fixResponseChunkedTransferBadEnding(req, function (err) {
+ if (signal && signal.aborted) {
+ return;
+ }
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+ });
+
+ /* c8 ignore next 18 */
+ if (parseInt(process.version.substring(1)) < 14) {
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
+ // properly handle when the socket close/end events are out of order.
+ req.on('socket', function (s) {
+ s.addListener('close', function (hadError) {
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = s.listenerCount('data') > 0;
+
+ // if end happened before close but the socket didn't emit an error, do it now
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ response.body.emit('error', err);
+ }
+ });
+ });
+ }
+
+ req.on('response', function (res) {
+ clearTimeout(reqTimeout);
+
+ const headers = createHeadersLenient(res.headers);
+
+ // HTTP fetch step 5
+ if (fetch.isRedirect(res.statusCode)) {
+ // HTTP fetch step 5.2
+ const location = headers.get('Location');
+
+ // HTTP fetch step 5.3
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL$1(location, request.url).toString();
+ } catch (err) {
+ // error here can only be invalid URL in Location: header
+ // do not throw when options.redirect == manual
+ // let the user extract the errorneous redirect URL
+ if (request.redirect !== 'manual') {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+ finalize();
+ return;
+ }
+ }
+
+ // HTTP fetch step 5.5
+ switch (request.redirect) {
+ case 'error':
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+ finalize();
+ return;
+ case 'manual':
+ // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+ if (locationURL !== null) {
+ // handle corrupted header
+ try {
+ headers.set('Location', locationURL);
+ } catch (err) {
+ // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+ reject(err);
+ }
+ }
+ break;
+ case 'follow':
+ // HTTP-redirect fetch step 2
+ if (locationURL === null) {
+ break;
+ }
+
+ // HTTP-redirect fetch step 5
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 6 (counter increment)
+ // Create a new Request object.
+ const requestOpts = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: request.body,
+ signal: request.signal,
+ timeout: request.timeout,
+ size: request.size
+ };
+
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+ for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+ requestOpts.headers.delete(name);
+ }
+ }
+
+ // HTTP-redirect fetch step 9
+ if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+ reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 11
+ if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+ requestOpts.method = 'GET';
+ requestOpts.body = undefined;
+ requestOpts.headers.delete('content-length');
+ }
+
+ // HTTP-redirect fetch step 15
+ resolve(fetch(new Request(locationURL, requestOpts)));
+ finalize();
+ return;
+ }
+ }
+
+ // prepare response
+ res.once('end', function () {
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ });
+ let body = res.pipe(new PassThrough$1());
+
+ const response_options = {
+ url: request.url,
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: headers,
+ size: request.size,
+ timeout: request.timeout,
+ counter: request.counter
+ };
+
+ // HTTP-network fetch step 12.1.1.3
+ const codings = headers.get('Content-Encoding');
+
+ // HTTP-network fetch step 12.1.1.4: handle content codings
+
+ // in following scenarios we ignore compression support
+ // 1. compression support is disabled
+ // 2. HEAD request
+ // 3. no Content-Encoding header
+ // 4. no content response (204)
+ // 5. content not modified response (304)
+ if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // For Node v6+
+ // Be less strict when decoding compressed responses, since sometimes
+ // servers send slightly invalid responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ const zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ };
+
+ // for gzip
+ if (codings == 'gzip' || codings == 'x-gzip') {
+ body = body.pipe(zlib.createGunzip(zlibOptions));
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // for deflate
+ if (codings == 'deflate' || codings == 'x-deflate') {
+ // handle the infamous raw deflate response from old servers
+ // a hack for old IIS and Apache servers
+ const raw = res.pipe(new PassThrough$1());
+ raw.once('data', function (chunk) {
+ // see http://stackoverflow.com/questions/37519828
+ if ((chunk[0] & 0x0F) === 0x08) {
+ body = body.pipe(zlib.createInflate());
+ } else {
+ body = body.pipe(zlib.createInflateRaw());
+ }
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+ raw.on('end', function () {
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
+ if (!response) {
+ response = new Response(body, response_options);
+ resolve(response);
+ }
+ });
+ return;
+ }
+
+ // for br
+ if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+ body = body.pipe(zlib.createBrotliDecompress());
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // otherwise, use response as-is
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+
+ writeToStream(req, request);
+ });
+}
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ let socket;
+
+ request.on('socket', function (s) {
+ socket = s;
+ });
+
+ request.on('response', function (response) {
+ const headers = response.headers;
+
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
+ response.once('close', function (hadError) {
+ // tests for socket presence, as in some situations the
+ // the 'socket' event is not triggered for the request
+ // (happens in deno), avoids `TypeError`
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = socket && socket.listenerCount('data') > 0;
+
+ if (hasDataListener && !hadError) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ errorCallback(err);
+ }
+ });
+ }
+ });
+}
+
+function destroyStream(stream, err) {
+ if (stream.destroy) {
+ stream.destroy(err);
+ } else {
+ // node < 8
+ stream.emit('error', err);
+ stream.end();
+ }
+}
+
+/**
+ * Redirect code matching
+ *
+ * @param Number code Status code
+ * @return Boolean
+ */
+fetch.isRedirect = function (code) {
+ return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+export default fetch;
+export { Headers, Request, Response, FetchError };
diff --git a/node_modules/@supabase/node-fetch/lib/index.js b/node_modules/@supabase/node-fetch/lib/index.js
new file mode 100644
index 0000000..2e69fa2
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/lib/index.js
@@ -0,0 +1,1787 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+
+var Stream = _interopDefault(require('stream'));
+var http = _interopDefault(require('http'));
+var Url = _interopDefault(require('url'));
+var whatwgUrl = _interopDefault(require('whatwg-url'));
+var https = _interopDefault(require('https'));
+var zlib = _interopDefault(require('zlib'));
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+ constructor() {
+ this[TYPE] = '';
+
+ const blobParts = arguments[0];
+ const options = arguments[1];
+
+ const buffers = [];
+ let size = 0;
+
+ if (blobParts) {
+ const a = blobParts;
+ const length = Number(a.length);
+ for (let i = 0; i < length; i++) {
+ const element = a[i];
+ let buffer;
+ if (element instanceof Buffer) {
+ buffer = element;
+ } else if (ArrayBuffer.isView(element)) {
+ buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+ } else if (element instanceof ArrayBuffer) {
+ buffer = Buffer.from(element);
+ } else if (element instanceof Blob) {
+ buffer = element[BUFFER];
+ } else {
+ buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+ }
+ size += buffer.length;
+ buffers.push(buffer);
+ }
+ }
+
+ this[BUFFER] = Buffer.concat(buffers);
+
+ let type = options && options.type !== undefined && String(options.type).toLowerCase();
+ if (type && !/[^\u0020-\u007E]/.test(type)) {
+ this[TYPE] = type;
+ }
+ }
+ get size() {
+ return this[BUFFER].length;
+ }
+ get type() {
+ return this[TYPE];
+ }
+ text() {
+ return Promise.resolve(this[BUFFER].toString());
+ }
+ arrayBuffer() {
+ const buf = this[BUFFER];
+ const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ return Promise.resolve(ab);
+ }
+ stream() {
+ const readable = new Readable();
+ readable._read = function () {};
+ readable.push(this[BUFFER]);
+ readable.push(null);
+ return readable;
+ }
+ toString() {
+ return '[object Blob]';
+ }
+ slice() {
+ const size = this.size;
+
+ const start = arguments[0];
+ const end = arguments[1];
+ let relativeStart, relativeEnd;
+ if (start === undefined) {
+ relativeStart = 0;
+ } else if (start < 0) {
+ relativeStart = Math.max(size + start, 0);
+ } else {
+ relativeStart = Math.min(start, size);
+ }
+ if (end === undefined) {
+ relativeEnd = size;
+ } else if (end < 0) {
+ relativeEnd = Math.max(size + end, 0);
+ } else {
+ relativeEnd = Math.min(end, size);
+ }
+ const span = Math.max(relativeEnd - relativeStart, 0);
+
+ const buffer = this[BUFFER];
+ const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+ const blob = new Blob([], { type: arguments[2] });
+ blob[BUFFER] = slicedBuffer;
+ return blob;
+ }
+}
+
+Object.defineProperties(Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+ value: 'Blob',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param String message Error message for human
+ * @param String type Error type for machine
+ * @param String systemError For Node.js system error
+ * @return FetchError
+ */
+function FetchError(message, type, systemError) {
+ Error.call(this, message);
+
+ this.message = message;
+ this.type = type;
+
+ // when err.type is `system`, err.code contains system error code
+ if (systemError) {
+ this.code = this.errno = systemError.code;
+ }
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+function Body(body) {
+ var _this = this;
+
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ _ref$size = _ref.size;
+
+ let size = _ref$size === undefined ? 0 : _ref$size;
+ var _ref$timeout = _ref.timeout;
+ let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+ if (body == null) {
+ // body is undefined or null
+ body = null;
+ } else if (isURLSearchParams(body)) {
+ // body is a URLSearchParams
+ body = Buffer.from(body.toString());
+ } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+ // body is ArrayBuffer
+ body = Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ // body is ArrayBufferView
+ body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof Stream) ; else {
+ // none of the above
+ // coerce to string then buffer
+ body = Buffer.from(String(body));
+ }
+ this[INTERNALS] = {
+ body,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+ this.timeout = timeout;
+
+ if (body instanceof Stream) {
+ body.on('error', function (err) {
+ const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+ _this[INTERNALS].error = error;
+ });
+ }
+}
+
+Body.prototype = {
+ get body() {
+ return this[INTERNALS].body;
+ },
+
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ },
+
+ /**
+ * Decode response as ArrayBuffer
+ *
+ * @return Promise
+ */
+ arrayBuffer() {
+ return consumeBody.call(this).then(function (buf) {
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ });
+ },
+
+ /**
+ * Return raw response as Blob
+ *
+ * @return Promise
+ */
+ blob() {
+ let ct = this.headers && this.headers.get('content-type') || '';
+ return consumeBody.call(this).then(function (buf) {
+ return Object.assign(
+ // Prevent copying
+ new Blob([], {
+ type: ct.toLowerCase()
+ }), {
+ [BUFFER]: buf
+ });
+ });
+ },
+
+ /**
+ * Decode response as json
+ *
+ * @return Promise
+ */
+ json() {
+ var _this2 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ try {
+ return JSON.parse(buffer.toString());
+ } catch (err) {
+ return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+ }
+ });
+ },
+
+ /**
+ * Decode response as text
+ *
+ * @return Promise
+ */
+ text() {
+ return consumeBody.call(this).then(function (buffer) {
+ return buffer.toString();
+ });
+ },
+
+ /**
+ * Decode response as buffer (non-spec api)
+ *
+ * @return Promise
+ */
+ buffer() {
+ return consumeBody.call(this);
+ },
+
+ /**
+ * Decode response as text, while automatically detecting the encoding and
+ * trying to decode to UTF-8 (non-spec api)
+ *
+ * @return Promise
+ */
+ textConverted() {
+ var _this3 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ return convertBody(buffer, _this3.headers);
+ });
+ }
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+ body: { enumerable: true },
+ bodyUsed: { enumerable: true },
+ arrayBuffer: { enumerable: true },
+ blob: { enumerable: true },
+ json: { enumerable: true },
+ text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+ for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+ // istanbul ignore else: future proof
+ if (!(name in proto)) {
+ const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+ Object.defineProperty(proto, name, desc);
+ }
+ }
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+function consumeBody() {
+ var _this4 = this;
+
+ if (this[INTERNALS].disturbed) {
+ return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+ }
+
+ this[INTERNALS].disturbed = true;
+
+ if (this[INTERNALS].error) {
+ return Body.Promise.reject(this[INTERNALS].error);
+ }
+
+ let body = this.body;
+
+ // body is null
+ if (body === null) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is blob
+ if (isBlob(body)) {
+ body = body.stream();
+ }
+
+ // body is buffer
+ if (Buffer.isBuffer(body)) {
+ return Body.Promise.resolve(body);
+ }
+
+ // istanbul ignore if: should never happen
+ if (!(body instanceof Stream)) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is stream
+ // get ready to actually consume the body
+ let accum = [];
+ let accumBytes = 0;
+ let abort = false;
+
+ return new Body.Promise(function (resolve, reject) {
+ let resTimeout;
+
+ // allow timeout on slow response body
+ if (_this4.timeout) {
+ resTimeout = setTimeout(function () {
+ abort = true;
+ reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+ }, _this4.timeout);
+ }
+
+ // handle stream errors
+ body.on('error', function (err) {
+ if (err.name === 'AbortError') {
+ // if the request was aborted, reject with this Error
+ abort = true;
+ reject(err);
+ } else {
+ // other errors, such as incorrect content-encoding
+ reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+
+ body.on('data', function (chunk) {
+ if (abort || chunk === null) {
+ return;
+ }
+
+ if (_this4.size && accumBytes + chunk.length > _this4.size) {
+ abort = true;
+ reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+ return;
+ }
+
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ });
+
+ body.on('end', function () {
+ if (abort) {
+ return;
+ }
+
+ clearTimeout(resTimeout);
+
+ try {
+ resolve(Buffer.concat(accum, accumBytes));
+ } catch (err) {
+ // handle streams that have accumulated too much data (issue #414)
+ reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+ });
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param Buffer buffer Incoming buffer
+ * @param String encoding Target encoding
+ * @return String
+ */
+function convertBody(buffer, headers) {
+ {
+ throw new Error('The package `encoding` must be installed to use the textConverted() function');
+ }
+
+ const ct = headers.get('content-type');
+ let charset = 'utf-8';
+ let res, str;
+
+ // header
+ if (ct) {
+ res = /charset=([^;]*)/i.exec(ct);
+ }
+
+ // no charset in content type, peek at response body for at most 1024 bytes
+ str = buffer.slice(0, 1024).toString();
+
+ // html5
+ if (!res && str) {
+ res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+ this[MAP] = Object.create(null);
+
+ if (init instanceof Headers) {
+ const rawHeaders = init.raw();
+ const headerNames = Object.keys(rawHeaders);
+
+ for (const headerName of headerNames) {
+ for (const value of rawHeaders[headerName]) {
+ this.append(headerName, value);
+ }
+ }
+
+ return;
+ }
+
+ // We don't worry about converting prop to ByteString here as append()
+ // will handle it.
+ if (init == null) ; else if (typeof init === 'object') {
+ const method = init[Symbol.iterator];
+ if (method != null) {
+ if (typeof method !== 'function') {
+ throw new TypeError('Header pairs must be iterable');
+ }
+
+ // sequence>
+ // Note: per spec we have to first exhaust the lists then process them
+ const pairs = [];
+ for (const pair of init) {
+ if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+ throw new TypeError('Each header pair must be iterable');
+ }
+ pairs.push(Array.from(pair));
+ }
+
+ for (const pair of pairs) {
+ if (pair.length !== 2) {
+ throw new TypeError('Each header pair must be a name/value tuple');
+ }
+ this.append(pair[0], pair[1]);
+ }
+ } else {
+ // record
+ for (const key of Object.keys(init)) {
+ const value = init[key];
+ this.append(key, value);
+ }
+ }
+ } else {
+ throw new TypeError('Provided initializer must be an object');
+ }
+ }
+
+ /**
+ * Return combined header value given name
+ *
+ * @param String name Header name
+ * @return Mixed
+ */
+ get(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key === undefined) {
+ return null;
+ }
+
+ return this[MAP][key].join(', ');
+ }
+
+ /**
+ * Iterate over all headers
+ *
+ * @param Function callback Executed for each item with parameters (value, name, thisArg)
+ * @param Boolean thisArg `this` context for callback function
+ * @return Void
+ */
+ forEach(callback) {
+ let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+ let pairs = getHeaders(this);
+ let i = 0;
+ while (i < pairs.length) {
+ var _pairs$i = pairs[i];
+ const name = _pairs$i[0],
+ value = _pairs$i[1];
+
+ callback.call(thisArg, value, name, this);
+ pairs = getHeaders(this);
+ i++;
+ }
+ }
+
+ /**
+ * Overwrite header values given name
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ set(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ this[MAP][key !== undefined ? key : name] = [value];
+ }
+
+ /**
+ * Append a value onto existing header
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ append(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ this[MAP][key].push(value);
+ } else {
+ this[MAP][name] = [value];
+ }
+ }
+
+ /**
+ * Check for header name existence
+ *
+ * @param String name Header name
+ * @return Boolean
+ */
+ has(name) {
+ name = `${name}`;
+ validateName(name);
+ return find(this[MAP], name) !== undefined;
+ }
+
+ /**
+ * Delete all header values given name
+ *
+ * @param String name Header name
+ * @return Void
+ */
+ delete(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ delete this[MAP][key];
+ }
+ }
+
+ /**
+ * Return raw headers (non-spec api)
+ *
+ * @return Object
+ */
+ raw() {
+ return this[MAP];
+ }
+
+ /**
+ * Get an iterator on keys.
+ *
+ * @return Iterator
+ */
+ keys() {
+ return createHeadersIterator(this, 'key');
+ }
+
+ /**
+ * Get an iterator on values.
+ *
+ * @return Iterator
+ */
+ values() {
+ return createHeadersIterator(this, 'value');
+ }
+
+ /**
+ * Get an iterator on entries.
+ *
+ * This is the default iterator of the Headers object.
+ *
+ * @return Iterator
+ */
+ [Symbol.iterator]() {
+ return createHeadersIterator(this, 'key+value');
+ }
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+ value: 'Headers',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+ get: { enumerable: true },
+ forEach: { enumerable: true },
+ set: { enumerable: true },
+ append: { enumerable: true },
+ has: { enumerable: true },
+ delete: { enumerable: true },
+ keys: { enumerable: true },
+ values: { enumerable: true },
+ entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+ let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+ const keys = Object.keys(headers[MAP]).sort();
+ return keys.map(kind === 'key' ? function (k) {
+ return k.toLowerCase();
+ } : kind === 'value' ? function (k) {
+ return headers[MAP][k].join(', ');
+ } : function (k) {
+ return [k.toLowerCase(), headers[MAP][k].join(', ')];
+ });
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+ const iterator = Object.create(HeadersIteratorPrototype);
+ iterator[INTERNAL] = {
+ target,
+ kind,
+ index: 0
+ };
+ return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+ next() {
+ // istanbul ignore if
+ if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+ throw new TypeError('Value of `this` is not a HeadersIterator');
+ }
+
+ var _INTERNAL = this[INTERNAL];
+ const target = _INTERNAL.target,
+ kind = _INTERNAL.kind,
+ index = _INTERNAL.index;
+
+ const values = getHeaders(target, kind);
+ const len = values.length;
+ if (index >= len) {
+ return {
+ value: undefined,
+ done: true
+ };
+ }
+
+ this[INTERNAL].index = index + 1;
+
+ return {
+ value: values[index],
+ done: false
+ };
+ }
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+ value: 'HeadersIterator',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param Headers headers
+ * @return Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+ const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+ // http.request() only supports string as Host header. This hack makes
+ // specifying custom Host header possible.
+ const hostHeaderKey = find(headers[MAP], 'Host');
+ if (hostHeaderKey !== undefined) {
+ obj[hostHeaderKey] = obj[hostHeaderKey][0];
+ }
+
+ return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param Object obj Object of headers
+ * @return Headers
+ */
+function createHeadersLenient(obj) {
+ const headers = new Headers();
+ for (const name of Object.keys(obj)) {
+ if (invalidTokenRegex.test(name)) {
+ continue;
+ }
+ if (Array.isArray(obj[name])) {
+ for (const val of obj[name]) {
+ if (invalidHeaderCharRegex.test(val)) {
+ continue;
+ }
+ if (headers[MAP][name] === undefined) {
+ headers[MAP][name] = [val];
+ } else {
+ headers[MAP][name].push(val);
+ }
+ }
+ } else if (!invalidHeaderCharRegex.test(obj[name])) {
+ headers[MAP][name] = [obj[name]];
+ }
+ }
+ return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+class Response {
+ constructor() {
+ let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+ let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ Body.call(this, body, opts);
+
+ const status = opts.status || 200;
+ const headers = new Headers(opts.headers);
+
+ if (body != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(body);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ this[INTERNALS$1] = {
+ url: opts.url,
+ status,
+ statusText: opts.statusText || STATUS_CODES[status],
+ headers,
+ counter: opts.counter
+ };
+ }
+
+ get url() {
+ return this[INTERNALS$1].url || '';
+ }
+
+ get status() {
+ return this[INTERNALS$1].status;
+ }
+
+ /**
+ * Convenience property representing if the request ended normally
+ */
+ get ok() {
+ return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+ }
+
+ get redirected() {
+ return this[INTERNALS$1].counter > 0;
+ }
+
+ get statusText() {
+ return this[INTERNALS$1].statusText;
+ }
+
+ get headers() {
+ return this[INTERNALS$1].headers;
+ }
+
+ /**
+ * Clone this response
+ *
+ * @return Response
+ */
+ clone() {
+ return new Response(clone(this), {
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected
+ });
+ }
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+ url: { enumerable: true },
+ status: { enumerable: true },
+ ok: { enumerable: true },
+ redirected: { enumerable: true },
+ statusText: { enumerable: true },
+ headers: { enumerable: true },
+ clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+ value: 'Response',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+const URL = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+/**
+ * Wrapper around `new URL` to handle arbitrary URLs
+ *
+ * @param {string} urlStr
+ * @return {void}
+ */
+function parseURL(urlStr) {
+ /*
+ Check whether the URL is absolute or not
+ Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
+ Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
+ */
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
+ urlStr = new URL(urlStr).toString();
+ }
+
+ // Fallback to old implementation for arbitrary URLs
+ return parse_url(urlStr);
+}
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param Mixed input
+ * @return Boolean
+ */
+function isRequest(input) {
+ return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+ const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+ return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param Mixed input Url or Request instance
+ * @param Object init Custom options
+ * @return Void
+ */
+class Request {
+ constructor(input) {
+ let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ let parsedURL;
+
+ // normalize input
+ if (!isRequest(input)) {
+ if (input && input.href) {
+ // in order to support Node.js' Url objects; though WHATWG's URL objects
+ // will fall into this branch also (since their `toString()` will return
+ // `href` property anyway)
+ parsedURL = parseURL(input.href);
+ } else {
+ // coerce input to a string before attempting to parse
+ parsedURL = parseURL(`${input}`);
+ }
+ input = {};
+ } else {
+ parsedURL = parseURL(input.url);
+ }
+
+ let method = init.method || input.method || 'GET';
+ method = method.toUpperCase();
+
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+ throw new TypeError('Request with GET/HEAD method cannot have body');
+ }
+
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+ Body.call(this, inputBody, {
+ timeout: init.timeout || input.timeout || 0,
+ size: init.size || input.size || 0
+ });
+
+ const headers = new Headers(init.headers || input.headers || {});
+
+ if (inputBody != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(inputBody);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ let signal = isRequest(input) ? input.signal : null;
+ if ('signal' in init) signal = init.signal;
+
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError('Expected signal to be an instanceof AbortSignal');
+ }
+
+ this[INTERNALS$2] = {
+ method,
+ redirect: init.redirect || input.redirect || 'follow',
+ headers,
+ parsedURL,
+ signal
+ };
+
+ // node-fetch-only options
+ this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+ this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
+ }
+
+ get method() {
+ return this[INTERNALS$2].method;
+ }
+
+ get url() {
+ return format_url(this[INTERNALS$2].parsedURL);
+ }
+
+ get headers() {
+ return this[INTERNALS$2].headers;
+ }
+
+ get redirect() {
+ return this[INTERNALS$2].redirect;
+ }
+
+ get signal() {
+ return this[INTERNALS$2].signal;
+ }
+
+ /**
+ * Clone this request
+ *
+ * @return Request
+ */
+ clone() {
+ return new Request(this);
+ }
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+ value: 'Request',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+ method: { enumerable: true },
+ url: { enumerable: true },
+ headers: { enumerable: true },
+ redirect: { enumerable: true },
+ clone: { enumerable: true },
+ signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param Request A Request instance
+ * @return Object The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+ const parsedURL = request[INTERNALS$2].parsedURL;
+ const headers = new Headers(request[INTERNALS$2].headers);
+
+ // fetch step 1.3
+ if (!headers.has('Accept')) {
+ headers.set('Accept', '*/*');
+ }
+
+ // Basic fetch
+ if (!parsedURL.protocol || !parsedURL.hostname) {
+ throw new TypeError('Only absolute URLs are supported');
+ }
+
+ if (!/^https?:$/.test(parsedURL.protocol)) {
+ throw new TypeError('Only HTTP(S) protocols are supported');
+ }
+
+ if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+ throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+ }
+
+ // HTTP-network-or-cache fetch steps 2.4-2.7
+ let contentLengthValue = null;
+ if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+ contentLengthValue = '0';
+ }
+ if (request.body != null) {
+ const totalBytes = getTotalBytes(request);
+ if (typeof totalBytes === 'number') {
+ contentLengthValue = String(totalBytes);
+ }
+ }
+ if (contentLengthValue) {
+ headers.set('Content-Length', contentLengthValue);
+ }
+
+ // HTTP-network-or-cache fetch step 2.11
+ if (!headers.has('User-Agent')) {
+ headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+ }
+
+ // HTTP-network-or-cache fetch step 2.15
+ if (request.compress && !headers.has('Accept-Encoding')) {
+ headers.set('Accept-Encoding', 'gzip,deflate');
+ }
+
+ let agent = request.agent;
+ if (typeof agent === 'function') {
+ agent = agent(parsedURL);
+ }
+
+ if (!headers.has('Connection') && !agent) {
+ headers.set('Connection', 'close');
+ }
+
+ // HTTP-network fetch step 4.2
+ // chunked encoding is handled by Node.js
+
+ return Object.assign({}, parsedURL, {
+ method: request.method,
+ headers: exportNodeCompatibleHeaders(headers),
+ agent
+ });
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param String message Error message for human
+ * @return AbortError
+ */
+function AbortError(message) {
+ Error.call(this, message);
+
+ this.type = 'aborted';
+ this.message = message;
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+const URL$1 = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+
+const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
+ const orig = new URL$1(original).hostname;
+ const dest = new URL$1(destination).hostname;
+
+ return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
+};
+
+/**
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+const isSameProtocol = function isSameProtocol(destination, original) {
+ const orig = new URL$1(original).protocol;
+ const dest = new URL$1(destination).protocol;
+
+ return orig === dest;
+};
+
+/**
+ * Fetch function
+ *
+ * @param Mixed url Absolute url or Request instance
+ * @param Object opts Fetch options
+ * @return Promise
+ */
+function fetch(url, opts) {
+
+ // allow custom promise
+ if (!fetch.Promise) {
+ throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+ }
+
+ Body.Promise = fetch.Promise;
+
+ // wrap http.request into fetch
+ return new fetch.Promise(function (resolve, reject) {
+ // build request object
+ const request = new Request(url, opts);
+ const options = getNodeRequestOptions(request);
+
+ const send = (options.protocol === 'https:' ? https : http).request;
+ const signal = request.signal;
+
+ let response = null;
+
+ const abort = function abort() {
+ let error = new AbortError('The user aborted a request.');
+ reject(error);
+ if (request.body && request.body instanceof Stream.Readable) {
+ destroyStream(request.body, error);
+ }
+ if (!response || !response.body) return;
+ response.body.emit('error', error);
+ };
+
+ if (signal && signal.aborted) {
+ abort();
+ return;
+ }
+
+ const abortAndFinalize = function abortAndFinalize() {
+ abort();
+ finalize();
+ };
+
+ // send request
+ const req = send(options);
+ let reqTimeout;
+
+ if (signal) {
+ signal.addEventListener('abort', abortAndFinalize);
+ }
+
+ function finalize() {
+ req.abort();
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ clearTimeout(reqTimeout);
+ }
+
+ if (request.timeout) {
+ req.once('socket', function (socket) {
+ reqTimeout = setTimeout(function () {
+ reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+ finalize();
+ }, request.timeout);
+ });
+ }
+
+ req.on('error', function (err) {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+
+ finalize();
+ });
+
+ fixResponseChunkedTransferBadEnding(req, function (err) {
+ if (signal && signal.aborted) {
+ return;
+ }
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+ });
+
+ /* c8 ignore next 18 */
+ if (parseInt(process.version.substring(1)) < 14) {
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
+ // properly handle when the socket close/end events are out of order.
+ req.on('socket', function (s) {
+ s.addListener('close', function (hadError) {
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = s.listenerCount('data') > 0;
+
+ // if end happened before close but the socket didn't emit an error, do it now
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ response.body.emit('error', err);
+ }
+ });
+ });
+ }
+
+ req.on('response', function (res) {
+ clearTimeout(reqTimeout);
+
+ const headers = createHeadersLenient(res.headers);
+
+ // HTTP fetch step 5
+ if (fetch.isRedirect(res.statusCode)) {
+ // HTTP fetch step 5.2
+ const location = headers.get('Location');
+
+ // HTTP fetch step 5.3
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL$1(location, request.url).toString();
+ } catch (err) {
+ // error here can only be invalid URL in Location: header
+ // do not throw when options.redirect == manual
+ // let the user extract the errorneous redirect URL
+ if (request.redirect !== 'manual') {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+ finalize();
+ return;
+ }
+ }
+
+ // HTTP fetch step 5.5
+ switch (request.redirect) {
+ case 'error':
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+ finalize();
+ return;
+ case 'manual':
+ // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+ if (locationURL !== null) {
+ // handle corrupted header
+ try {
+ headers.set('Location', locationURL);
+ } catch (err) {
+ // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+ reject(err);
+ }
+ }
+ break;
+ case 'follow':
+ // HTTP-redirect fetch step 2
+ if (locationURL === null) {
+ break;
+ }
+
+ // HTTP-redirect fetch step 5
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 6 (counter increment)
+ // Create a new Request object.
+ const requestOpts = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: request.body,
+ signal: request.signal,
+ timeout: request.timeout,
+ size: request.size
+ };
+
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+ for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+ requestOpts.headers.delete(name);
+ }
+ }
+
+ // HTTP-redirect fetch step 9
+ if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+ reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 11
+ if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+ requestOpts.method = 'GET';
+ requestOpts.body = undefined;
+ requestOpts.headers.delete('content-length');
+ }
+
+ // HTTP-redirect fetch step 15
+ resolve(fetch(new Request(locationURL, requestOpts)));
+ finalize();
+ return;
+ }
+ }
+
+ // prepare response
+ res.once('end', function () {
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ });
+ let body = res.pipe(new PassThrough$1());
+
+ const response_options = {
+ url: request.url,
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: headers,
+ size: request.size,
+ timeout: request.timeout,
+ counter: request.counter
+ };
+
+ // HTTP-network fetch step 12.1.1.3
+ const codings = headers.get('Content-Encoding');
+
+ // HTTP-network fetch step 12.1.1.4: handle content codings
+
+ // in following scenarios we ignore compression support
+ // 1. compression support is disabled
+ // 2. HEAD request
+ // 3. no Content-Encoding header
+ // 4. no content response (204)
+ // 5. content not modified response (304)
+ if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // For Node v6+
+ // Be less strict when decoding compressed responses, since sometimes
+ // servers send slightly invalid responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ const zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ };
+
+ // for gzip
+ if (codings == 'gzip' || codings == 'x-gzip') {
+ body = body.pipe(zlib.createGunzip(zlibOptions));
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // for deflate
+ if (codings == 'deflate' || codings == 'x-deflate') {
+ // handle the infamous raw deflate response from old servers
+ // a hack for old IIS and Apache servers
+ const raw = res.pipe(new PassThrough$1());
+ raw.once('data', function (chunk) {
+ // see http://stackoverflow.com/questions/37519828
+ if ((chunk[0] & 0x0F) === 0x08) {
+ body = body.pipe(zlib.createInflate());
+ } else {
+ body = body.pipe(zlib.createInflateRaw());
+ }
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+ raw.on('end', function () {
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
+ if (!response) {
+ response = new Response(body, response_options);
+ resolve(response);
+ }
+ });
+ return;
+ }
+
+ // for br
+ if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+ body = body.pipe(zlib.createBrotliDecompress());
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // otherwise, use response as-is
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+
+ writeToStream(req, request);
+ });
+}
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ let socket;
+
+ request.on('socket', function (s) {
+ socket = s;
+ });
+
+ request.on('response', function (response) {
+ const headers = response.headers;
+
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
+ response.once('close', function (hadError) {
+ // tests for socket presence, as in some situations the
+ // the 'socket' event is not triggered for the request
+ // (happens in deno), avoids `TypeError`
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = socket && socket.listenerCount('data') > 0;
+
+ if (hasDataListener && !hadError) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ errorCallback(err);
+ }
+ });
+ }
+ });
+}
+
+function destroyStream(stream, err) {
+ if (stream.destroy) {
+ stream.destroy(err);
+ } else {
+ // node < 8
+ stream.emit('error', err);
+ stream.end();
+ }
+}
+
+/**
+ * Redirect code matching
+ *
+ * @param Number code Status code
+ * @return Boolean
+ */
+fetch.isRedirect = function (code) {
+ return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+module.exports = exports = fetch;
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = exports;
+exports.Headers = Headers;
+exports.Request = Request;
+exports.Response = Response;
+exports.FetchError = FetchError;
diff --git a/node_modules/@supabase/node-fetch/lib/index.mjs b/node_modules/@supabase/node-fetch/lib/index.mjs
new file mode 100644
index 0000000..5dfc413
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/lib/index.mjs
@@ -0,0 +1,1776 @@
+import Stream from 'stream';
+import http from 'http';
+import Url from 'url';
+import whatwgUrl from 'whatwg-url';
+import https from 'https';
+import zlib from 'zlib';
+
+// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
+
+// fix for "Readable" isn't a named export issue
+const Readable = Stream.Readable;
+
+const BUFFER = Symbol('buffer');
+const TYPE = Symbol('type');
+
+class Blob {
+ constructor() {
+ this[TYPE] = '';
+
+ const blobParts = arguments[0];
+ const options = arguments[1];
+
+ const buffers = [];
+ let size = 0;
+
+ if (blobParts) {
+ const a = blobParts;
+ const length = Number(a.length);
+ for (let i = 0; i < length; i++) {
+ const element = a[i];
+ let buffer;
+ if (element instanceof Buffer) {
+ buffer = element;
+ } else if (ArrayBuffer.isView(element)) {
+ buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
+ } else if (element instanceof ArrayBuffer) {
+ buffer = Buffer.from(element);
+ } else if (element instanceof Blob) {
+ buffer = element[BUFFER];
+ } else {
+ buffer = Buffer.from(typeof element === 'string' ? element : String(element));
+ }
+ size += buffer.length;
+ buffers.push(buffer);
+ }
+ }
+
+ this[BUFFER] = Buffer.concat(buffers);
+
+ let type = options && options.type !== undefined && String(options.type).toLowerCase();
+ if (type && !/[^\u0020-\u007E]/.test(type)) {
+ this[TYPE] = type;
+ }
+ }
+ get size() {
+ return this[BUFFER].length;
+ }
+ get type() {
+ return this[TYPE];
+ }
+ text() {
+ return Promise.resolve(this[BUFFER].toString());
+ }
+ arrayBuffer() {
+ const buf = this[BUFFER];
+ const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ return Promise.resolve(ab);
+ }
+ stream() {
+ const readable = new Readable();
+ readable._read = function () {};
+ readable.push(this[BUFFER]);
+ readable.push(null);
+ return readable;
+ }
+ toString() {
+ return '[object Blob]';
+ }
+ slice() {
+ const size = this.size;
+
+ const start = arguments[0];
+ const end = arguments[1];
+ let relativeStart, relativeEnd;
+ if (start === undefined) {
+ relativeStart = 0;
+ } else if (start < 0) {
+ relativeStart = Math.max(size + start, 0);
+ } else {
+ relativeStart = Math.min(start, size);
+ }
+ if (end === undefined) {
+ relativeEnd = size;
+ } else if (end < 0) {
+ relativeEnd = Math.max(size + end, 0);
+ } else {
+ relativeEnd = Math.min(end, size);
+ }
+ const span = Math.max(relativeEnd - relativeStart, 0);
+
+ const buffer = this[BUFFER];
+ const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
+ const blob = new Blob([], { type: arguments[2] });
+ blob[BUFFER] = slicedBuffer;
+ return blob;
+ }
+}
+
+Object.defineProperties(Blob.prototype, {
+ size: { enumerable: true },
+ type: { enumerable: true },
+ slice: { enumerable: true }
+});
+
+Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
+ value: 'Blob',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * fetch-error.js
+ *
+ * FetchError interface for operational errors
+ */
+
+/**
+ * Create FetchError instance
+ *
+ * @param String message Error message for human
+ * @param String type Error type for machine
+ * @param String systemError For Node.js system error
+ * @return FetchError
+ */
+function FetchError(message, type, systemError) {
+ Error.call(this, message);
+
+ this.message = message;
+ this.type = type;
+
+ // when err.type is `system`, err.code contains system error code
+ if (systemError) {
+ this.code = this.errno = systemError.code;
+ }
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+FetchError.prototype = Object.create(Error.prototype);
+FetchError.prototype.constructor = FetchError;
+FetchError.prototype.name = 'FetchError';
+
+let convert;
+
+const INTERNALS = Symbol('Body internals');
+
+// fix an issue where "PassThrough" isn't a named export for node <10
+const PassThrough = Stream.PassThrough;
+
+/**
+ * Body mixin
+ *
+ * Ref: https://fetch.spec.whatwg.org/#body
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+function Body(body) {
+ var _this = this;
+
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ _ref$size = _ref.size;
+
+ let size = _ref$size === undefined ? 0 : _ref$size;
+ var _ref$timeout = _ref.timeout;
+ let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
+
+ if (body == null) {
+ // body is undefined or null
+ body = null;
+ } else if (isURLSearchParams(body)) {
+ // body is a URLSearchParams
+ body = Buffer.from(body.toString());
+ } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
+ // body is ArrayBuffer
+ body = Buffer.from(body);
+ } else if (ArrayBuffer.isView(body)) {
+ // body is ArrayBufferView
+ body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
+ } else if (body instanceof Stream) ; else {
+ // none of the above
+ // coerce to string then buffer
+ body = Buffer.from(String(body));
+ }
+ this[INTERNALS] = {
+ body,
+ disturbed: false,
+ error: null
+ };
+ this.size = size;
+ this.timeout = timeout;
+
+ if (body instanceof Stream) {
+ body.on('error', function (err) {
+ const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
+ _this[INTERNALS].error = error;
+ });
+ }
+}
+
+Body.prototype = {
+ get body() {
+ return this[INTERNALS].body;
+ },
+
+ get bodyUsed() {
+ return this[INTERNALS].disturbed;
+ },
+
+ /**
+ * Decode response as ArrayBuffer
+ *
+ * @return Promise
+ */
+ arrayBuffer() {
+ return consumeBody.call(this).then(function (buf) {
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
+ });
+ },
+
+ /**
+ * Return raw response as Blob
+ *
+ * @return Promise
+ */
+ blob() {
+ let ct = this.headers && this.headers.get('content-type') || '';
+ return consumeBody.call(this).then(function (buf) {
+ return Object.assign(
+ // Prevent copying
+ new Blob([], {
+ type: ct.toLowerCase()
+ }), {
+ [BUFFER]: buf
+ });
+ });
+ },
+
+ /**
+ * Decode response as json
+ *
+ * @return Promise
+ */
+ json() {
+ var _this2 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ try {
+ return JSON.parse(buffer.toString());
+ } catch (err) {
+ return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
+ }
+ });
+ },
+
+ /**
+ * Decode response as text
+ *
+ * @return Promise
+ */
+ text() {
+ return consumeBody.call(this).then(function (buffer) {
+ return buffer.toString();
+ });
+ },
+
+ /**
+ * Decode response as buffer (non-spec api)
+ *
+ * @return Promise
+ */
+ buffer() {
+ return consumeBody.call(this);
+ },
+
+ /**
+ * Decode response as text, while automatically detecting the encoding and
+ * trying to decode to UTF-8 (non-spec api)
+ *
+ * @return Promise
+ */
+ textConverted() {
+ var _this3 = this;
+
+ return consumeBody.call(this).then(function (buffer) {
+ return convertBody(buffer, _this3.headers);
+ });
+ }
+};
+
+// In browsers, all properties are enumerable.
+Object.defineProperties(Body.prototype, {
+ body: { enumerable: true },
+ bodyUsed: { enumerable: true },
+ arrayBuffer: { enumerable: true },
+ blob: { enumerable: true },
+ json: { enumerable: true },
+ text: { enumerable: true }
+});
+
+Body.mixIn = function (proto) {
+ for (const name of Object.getOwnPropertyNames(Body.prototype)) {
+ // istanbul ignore else: future proof
+ if (!(name in proto)) {
+ const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
+ Object.defineProperty(proto, name, desc);
+ }
+ }
+};
+
+/**
+ * Consume and convert an entire Body to a Buffer.
+ *
+ * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
+ *
+ * @return Promise
+ */
+function consumeBody() {
+ var _this4 = this;
+
+ if (this[INTERNALS].disturbed) {
+ return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
+ }
+
+ this[INTERNALS].disturbed = true;
+
+ if (this[INTERNALS].error) {
+ return Body.Promise.reject(this[INTERNALS].error);
+ }
+
+ let body = this.body;
+
+ // body is null
+ if (body === null) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is blob
+ if (isBlob(body)) {
+ body = body.stream();
+ }
+
+ // body is buffer
+ if (Buffer.isBuffer(body)) {
+ return Body.Promise.resolve(body);
+ }
+
+ // istanbul ignore if: should never happen
+ if (!(body instanceof Stream)) {
+ return Body.Promise.resolve(Buffer.alloc(0));
+ }
+
+ // body is stream
+ // get ready to actually consume the body
+ let accum = [];
+ let accumBytes = 0;
+ let abort = false;
+
+ return new Body.Promise(function (resolve, reject) {
+ let resTimeout;
+
+ // allow timeout on slow response body
+ if (_this4.timeout) {
+ resTimeout = setTimeout(function () {
+ abort = true;
+ reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
+ }, _this4.timeout);
+ }
+
+ // handle stream errors
+ body.on('error', function (err) {
+ if (err.name === 'AbortError') {
+ // if the request was aborted, reject with this Error
+ abort = true;
+ reject(err);
+ } else {
+ // other errors, such as incorrect content-encoding
+ reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+
+ body.on('data', function (chunk) {
+ if (abort || chunk === null) {
+ return;
+ }
+
+ if (_this4.size && accumBytes + chunk.length > _this4.size) {
+ abort = true;
+ reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
+ return;
+ }
+
+ accumBytes += chunk.length;
+ accum.push(chunk);
+ });
+
+ body.on('end', function () {
+ if (abort) {
+ return;
+ }
+
+ clearTimeout(resTimeout);
+
+ try {
+ resolve(Buffer.concat(accum, accumBytes));
+ } catch (err) {
+ // handle streams that have accumulated too much data (issue #414)
+ reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
+ }
+ });
+ });
+}
+
+/**
+ * Detect buffer encoding and convert to target encoding
+ * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
+ *
+ * @param Buffer buffer Incoming buffer
+ * @param String encoding Target encoding
+ * @return String
+ */
+function convertBody(buffer, headers) {
+ {
+ throw new Error('The package `encoding` must be installed to use the textConverted() function');
+ }
+
+ const ct = headers.get('content-type');
+ let charset = 'utf-8';
+ let res, str;
+
+ // header
+ if (ct) {
+ res = /charset=([^;]*)/i.exec(ct);
+ }
+
+ // no charset in content type, peek at response body for at most 1024 bytes
+ str = buffer.slice(0, 1024).toString();
+
+ // html5
+ if (!res && str) {
+ res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined;
+
+ this[MAP] = Object.create(null);
+
+ if (init instanceof Headers) {
+ const rawHeaders = init.raw();
+ const headerNames = Object.keys(rawHeaders);
+
+ for (const headerName of headerNames) {
+ for (const value of rawHeaders[headerName]) {
+ this.append(headerName, value);
+ }
+ }
+
+ return;
+ }
+
+ // We don't worry about converting prop to ByteString here as append()
+ // will handle it.
+ if (init == null) ; else if (typeof init === 'object') {
+ const method = init[Symbol.iterator];
+ if (method != null) {
+ if (typeof method !== 'function') {
+ throw new TypeError('Header pairs must be iterable');
+ }
+
+ // sequence>
+ // Note: per spec we have to first exhaust the lists then process them
+ const pairs = [];
+ for (const pair of init) {
+ if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
+ throw new TypeError('Each header pair must be iterable');
+ }
+ pairs.push(Array.from(pair));
+ }
+
+ for (const pair of pairs) {
+ if (pair.length !== 2) {
+ throw new TypeError('Each header pair must be a name/value tuple');
+ }
+ this.append(pair[0], pair[1]);
+ }
+ } else {
+ // record
+ for (const key of Object.keys(init)) {
+ const value = init[key];
+ this.append(key, value);
+ }
+ }
+ } else {
+ throw new TypeError('Provided initializer must be an object');
+ }
+ }
+
+ /**
+ * Return combined header value given name
+ *
+ * @param String name Header name
+ * @return Mixed
+ */
+ get(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key === undefined) {
+ return null;
+ }
+
+ return this[MAP][key].join(', ');
+ }
+
+ /**
+ * Iterate over all headers
+ *
+ * @param Function callback Executed for each item with parameters (value, name, thisArg)
+ * @param Boolean thisArg `this` context for callback function
+ * @return Void
+ */
+ forEach(callback) {
+ let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
+
+ let pairs = getHeaders(this);
+ let i = 0;
+ while (i < pairs.length) {
+ var _pairs$i = pairs[i];
+ const name = _pairs$i[0],
+ value = _pairs$i[1];
+
+ callback.call(thisArg, value, name, this);
+ pairs = getHeaders(this);
+ i++;
+ }
+ }
+
+ /**
+ * Overwrite header values given name
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ set(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ this[MAP][key !== undefined ? key : name] = [value];
+ }
+
+ /**
+ * Append a value onto existing header
+ *
+ * @param String name Header name
+ * @param String value Header value
+ * @return Void
+ */
+ append(name, value) {
+ name = `${name}`;
+ value = `${value}`;
+ validateName(name);
+ validateValue(value);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ this[MAP][key].push(value);
+ } else {
+ this[MAP][name] = [value];
+ }
+ }
+
+ /**
+ * Check for header name existence
+ *
+ * @param String name Header name
+ * @return Boolean
+ */
+ has(name) {
+ name = `${name}`;
+ validateName(name);
+ return find(this[MAP], name) !== undefined;
+ }
+
+ /**
+ * Delete all header values given name
+ *
+ * @param String name Header name
+ * @return Void
+ */
+ delete(name) {
+ name = `${name}`;
+ validateName(name);
+ const key = find(this[MAP], name);
+ if (key !== undefined) {
+ delete this[MAP][key];
+ }
+ }
+
+ /**
+ * Return raw headers (non-spec api)
+ *
+ * @return Object
+ */
+ raw() {
+ return this[MAP];
+ }
+
+ /**
+ * Get an iterator on keys.
+ *
+ * @return Iterator
+ */
+ keys() {
+ return createHeadersIterator(this, 'key');
+ }
+
+ /**
+ * Get an iterator on values.
+ *
+ * @return Iterator
+ */
+ values() {
+ return createHeadersIterator(this, 'value');
+ }
+
+ /**
+ * Get an iterator on entries.
+ *
+ * This is the default iterator of the Headers object.
+ *
+ * @return Iterator
+ */
+ [Symbol.iterator]() {
+ return createHeadersIterator(this, 'key+value');
+ }
+}
+Headers.prototype.entries = Headers.prototype[Symbol.iterator];
+
+Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
+ value: 'Headers',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Headers.prototype, {
+ get: { enumerable: true },
+ forEach: { enumerable: true },
+ set: { enumerable: true },
+ append: { enumerable: true },
+ has: { enumerable: true },
+ delete: { enumerable: true },
+ keys: { enumerable: true },
+ values: { enumerable: true },
+ entries: { enumerable: true }
+});
+
+function getHeaders(headers) {
+ let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
+
+ const keys = Object.keys(headers[MAP]).sort();
+ return keys.map(kind === 'key' ? function (k) {
+ return k.toLowerCase();
+ } : kind === 'value' ? function (k) {
+ return headers[MAP][k].join(', ');
+ } : function (k) {
+ return [k.toLowerCase(), headers[MAP][k].join(', ')];
+ });
+}
+
+const INTERNAL = Symbol('internal');
+
+function createHeadersIterator(target, kind) {
+ const iterator = Object.create(HeadersIteratorPrototype);
+ iterator[INTERNAL] = {
+ target,
+ kind,
+ index: 0
+ };
+ return iterator;
+}
+
+const HeadersIteratorPrototype = Object.setPrototypeOf({
+ next() {
+ // istanbul ignore if
+ if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
+ throw new TypeError('Value of `this` is not a HeadersIterator');
+ }
+
+ var _INTERNAL = this[INTERNAL];
+ const target = _INTERNAL.target,
+ kind = _INTERNAL.kind,
+ index = _INTERNAL.index;
+
+ const values = getHeaders(target, kind);
+ const len = values.length;
+ if (index >= len) {
+ return {
+ value: undefined,
+ done: true
+ };
+ }
+
+ this[INTERNAL].index = index + 1;
+
+ return {
+ value: values[index],
+ done: false
+ };
+ }
+}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
+
+Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
+ value: 'HeadersIterator',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+/**
+ * Export the Headers object in a form that Node.js can consume.
+ *
+ * @param Headers headers
+ * @return Object
+ */
+function exportNodeCompatibleHeaders(headers) {
+ const obj = Object.assign({ __proto__: null }, headers[MAP]);
+
+ // http.request() only supports string as Host header. This hack makes
+ // specifying custom Host header possible.
+ const hostHeaderKey = find(headers[MAP], 'Host');
+ if (hostHeaderKey !== undefined) {
+ obj[hostHeaderKey] = obj[hostHeaderKey][0];
+ }
+
+ return obj;
+}
+
+/**
+ * Create a Headers object from an object of headers, ignoring those that do
+ * not conform to HTTP grammar productions.
+ *
+ * @param Object obj Object of headers
+ * @return Headers
+ */
+function createHeadersLenient(obj) {
+ const headers = new Headers();
+ for (const name of Object.keys(obj)) {
+ if (invalidTokenRegex.test(name)) {
+ continue;
+ }
+ if (Array.isArray(obj[name])) {
+ for (const val of obj[name]) {
+ if (invalidHeaderCharRegex.test(val)) {
+ continue;
+ }
+ if (headers[MAP][name] === undefined) {
+ headers[MAP][name] = [val];
+ } else {
+ headers[MAP][name].push(val);
+ }
+ }
+ } else if (!invalidHeaderCharRegex.test(obj[name])) {
+ headers[MAP][name] = [obj[name]];
+ }
+ }
+ return headers;
+}
+
+const INTERNALS$1 = Symbol('Response internals');
+
+// fix an issue where "STATUS_CODES" aren't a named export for node <10
+const STATUS_CODES = http.STATUS_CODES;
+
+/**
+ * Response class
+ *
+ * @param Stream body Readable stream
+ * @param Object opts Response options
+ * @return Void
+ */
+class Response {
+ constructor() {
+ let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
+ let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ Body.call(this, body, opts);
+
+ const status = opts.status || 200;
+ const headers = new Headers(opts.headers);
+
+ if (body != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(body);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ this[INTERNALS$1] = {
+ url: opts.url,
+ status,
+ statusText: opts.statusText || STATUS_CODES[status],
+ headers,
+ counter: opts.counter
+ };
+ }
+
+ get url() {
+ return this[INTERNALS$1].url || '';
+ }
+
+ get status() {
+ return this[INTERNALS$1].status;
+ }
+
+ /**
+ * Convenience property representing if the request ended normally
+ */
+ get ok() {
+ return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
+ }
+
+ get redirected() {
+ return this[INTERNALS$1].counter > 0;
+ }
+
+ get statusText() {
+ return this[INTERNALS$1].statusText;
+ }
+
+ get headers() {
+ return this[INTERNALS$1].headers;
+ }
+
+ /**
+ * Clone this response
+ *
+ * @return Response
+ */
+ clone() {
+ return new Response(clone(this), {
+ url: this.url,
+ status: this.status,
+ statusText: this.statusText,
+ headers: this.headers,
+ ok: this.ok,
+ redirected: this.redirected
+ });
+ }
+}
+
+Body.mixIn(Response.prototype);
+
+Object.defineProperties(Response.prototype, {
+ url: { enumerable: true },
+ status: { enumerable: true },
+ ok: { enumerable: true },
+ redirected: { enumerable: true },
+ statusText: { enumerable: true },
+ headers: { enumerable: true },
+ clone: { enumerable: true }
+});
+
+Object.defineProperty(Response.prototype, Symbol.toStringTag, {
+ value: 'Response',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+const INTERNALS$2 = Symbol('Request internals');
+const URL = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "format", "parse" aren't a named export for node <10
+const parse_url = Url.parse;
+const format_url = Url.format;
+
+/**
+ * Wrapper around `new URL` to handle arbitrary URLs
+ *
+ * @param {string} urlStr
+ * @return {void}
+ */
+function parseURL(urlStr) {
+ /*
+ Check whether the URL is absolute or not
+ Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
+ Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
+ */
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) {
+ urlStr = new URL(urlStr).toString();
+ }
+
+ // Fallback to old implementation for arbitrary URLs
+ return parse_url(urlStr);
+}
+
+const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
+
+/**
+ * Check if a value is an instance of Request.
+ *
+ * @param Mixed input
+ * @return Boolean
+ */
+function isRequest(input) {
+ return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
+}
+
+function isAbortSignal(signal) {
+ const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
+ return !!(proto && proto.constructor.name === 'AbortSignal');
+}
+
+/**
+ * Request class
+ *
+ * @param Mixed input Url or Request instance
+ * @param Object init Custom options
+ * @return Void
+ */
+class Request {
+ constructor(input) {
+ let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ let parsedURL;
+
+ // normalize input
+ if (!isRequest(input)) {
+ if (input && input.href) {
+ // in order to support Node.js' Url objects; though WHATWG's URL objects
+ // will fall into this branch also (since their `toString()` will return
+ // `href` property anyway)
+ parsedURL = parseURL(input.href);
+ } else {
+ // coerce input to a string before attempting to parse
+ parsedURL = parseURL(`${input}`);
+ }
+ input = {};
+ } else {
+ parsedURL = parseURL(input.url);
+ }
+
+ let method = init.method || input.method || 'GET';
+ method = method.toUpperCase();
+
+ if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
+ throw new TypeError('Request with GET/HEAD method cannot have body');
+ }
+
+ let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
+
+ Body.call(this, inputBody, {
+ timeout: init.timeout || input.timeout || 0,
+ size: init.size || input.size || 0
+ });
+
+ const headers = new Headers(init.headers || input.headers || {});
+
+ if (inputBody != null && !headers.has('Content-Type')) {
+ const contentType = extractContentType(inputBody);
+ if (contentType) {
+ headers.append('Content-Type', contentType);
+ }
+ }
+
+ let signal = isRequest(input) ? input.signal : null;
+ if ('signal' in init) signal = init.signal;
+
+ if (signal != null && !isAbortSignal(signal)) {
+ throw new TypeError('Expected signal to be an instanceof AbortSignal');
+ }
+
+ this[INTERNALS$2] = {
+ method,
+ redirect: init.redirect || input.redirect || 'follow',
+ headers,
+ parsedURL,
+ signal
+ };
+
+ // node-fetch-only options
+ this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
+ this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
+ this.counter = init.counter || input.counter || 0;
+ this.agent = init.agent || input.agent;
+ }
+
+ get method() {
+ return this[INTERNALS$2].method;
+ }
+
+ get url() {
+ return format_url(this[INTERNALS$2].parsedURL);
+ }
+
+ get headers() {
+ return this[INTERNALS$2].headers;
+ }
+
+ get redirect() {
+ return this[INTERNALS$2].redirect;
+ }
+
+ get signal() {
+ return this[INTERNALS$2].signal;
+ }
+
+ /**
+ * Clone this request
+ *
+ * @return Request
+ */
+ clone() {
+ return new Request(this);
+ }
+}
+
+Body.mixIn(Request.prototype);
+
+Object.defineProperty(Request.prototype, Symbol.toStringTag, {
+ value: 'Request',
+ writable: false,
+ enumerable: false,
+ configurable: true
+});
+
+Object.defineProperties(Request.prototype, {
+ method: { enumerable: true },
+ url: { enumerable: true },
+ headers: { enumerable: true },
+ redirect: { enumerable: true },
+ clone: { enumerable: true },
+ signal: { enumerable: true }
+});
+
+/**
+ * Convert a Request to Node.js http request options.
+ *
+ * @param Request A Request instance
+ * @return Object The options object to be passed to http.request
+ */
+function getNodeRequestOptions(request) {
+ const parsedURL = request[INTERNALS$2].parsedURL;
+ const headers = new Headers(request[INTERNALS$2].headers);
+
+ // fetch step 1.3
+ if (!headers.has('Accept')) {
+ headers.set('Accept', '*/*');
+ }
+
+ // Basic fetch
+ if (!parsedURL.protocol || !parsedURL.hostname) {
+ throw new TypeError('Only absolute URLs are supported');
+ }
+
+ if (!/^https?:$/.test(parsedURL.protocol)) {
+ throw new TypeError('Only HTTP(S) protocols are supported');
+ }
+
+ if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
+ throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
+ }
+
+ // HTTP-network-or-cache fetch steps 2.4-2.7
+ let contentLengthValue = null;
+ if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
+ contentLengthValue = '0';
+ }
+ if (request.body != null) {
+ const totalBytes = getTotalBytes(request);
+ if (typeof totalBytes === 'number') {
+ contentLengthValue = String(totalBytes);
+ }
+ }
+ if (contentLengthValue) {
+ headers.set('Content-Length', contentLengthValue);
+ }
+
+ // HTTP-network-or-cache fetch step 2.11
+ if (!headers.has('User-Agent')) {
+ headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
+ }
+
+ // HTTP-network-or-cache fetch step 2.15
+ if (request.compress && !headers.has('Accept-Encoding')) {
+ headers.set('Accept-Encoding', 'gzip,deflate');
+ }
+
+ let agent = request.agent;
+ if (typeof agent === 'function') {
+ agent = agent(parsedURL);
+ }
+
+ if (!headers.has('Connection') && !agent) {
+ headers.set('Connection', 'close');
+ }
+
+ // HTTP-network fetch step 4.2
+ // chunked encoding is handled by Node.js
+
+ return Object.assign({}, parsedURL, {
+ method: request.method,
+ headers: exportNodeCompatibleHeaders(headers),
+ agent
+ });
+}
+
+/**
+ * abort-error.js
+ *
+ * AbortError interface for cancelled requests
+ */
+
+/**
+ * Create AbortError instance
+ *
+ * @param String message Error message for human
+ * @return AbortError
+ */
+function AbortError(message) {
+ Error.call(this, message);
+
+ this.type = 'aborted';
+ this.message = message;
+
+ // hide custom error implementation details from end-users
+ Error.captureStackTrace(this, this.constructor);
+}
+
+AbortError.prototype = Object.create(Error.prototype);
+AbortError.prototype.constructor = AbortError;
+AbortError.prototype.name = 'AbortError';
+
+const URL$1 = Url.URL || whatwgUrl.URL;
+
+// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
+const PassThrough$1 = Stream.PassThrough;
+
+const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {
+ const orig = new URL$1(original).hostname;
+ const dest = new URL$1(destination).hostname;
+
+ return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
+};
+
+/**
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
+ *
+ * Both domains must already be in canonical form.
+ * @param {string|URL} original
+ * @param {string|URL} destination
+ */
+const isSameProtocol = function isSameProtocol(destination, original) {
+ const orig = new URL$1(original).protocol;
+ const dest = new URL$1(destination).protocol;
+
+ return orig === dest;
+};
+
+/**
+ * Fetch function
+ *
+ * @param Mixed url Absolute url or Request instance
+ * @param Object opts Fetch options
+ * @return Promise
+ */
+function fetch(url, opts) {
+
+ // allow custom promise
+ if (!fetch.Promise) {
+ throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
+ }
+
+ Body.Promise = fetch.Promise;
+
+ // wrap http.request into fetch
+ return new fetch.Promise(function (resolve, reject) {
+ // build request object
+ const request = new Request(url, opts);
+ const options = getNodeRequestOptions(request);
+
+ const send = (options.protocol === 'https:' ? https : http).request;
+ const signal = request.signal;
+
+ let response = null;
+
+ const abort = function abort() {
+ let error = new AbortError('The user aborted a request.');
+ reject(error);
+ if (request.body && request.body instanceof Stream.Readable) {
+ destroyStream(request.body, error);
+ }
+ if (!response || !response.body) return;
+ response.body.emit('error', error);
+ };
+
+ if (signal && signal.aborted) {
+ abort();
+ return;
+ }
+
+ const abortAndFinalize = function abortAndFinalize() {
+ abort();
+ finalize();
+ };
+
+ // send request
+ const req = send(options);
+ let reqTimeout;
+
+ if (signal) {
+ signal.addEventListener('abort', abortAndFinalize);
+ }
+
+ function finalize() {
+ req.abort();
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ clearTimeout(reqTimeout);
+ }
+
+ if (request.timeout) {
+ req.once('socket', function (socket) {
+ reqTimeout = setTimeout(function () {
+ reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
+ finalize();
+ }, request.timeout);
+ });
+ }
+
+ req.on('error', function (err) {
+ reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+
+ finalize();
+ });
+
+ fixResponseChunkedTransferBadEnding(req, function (err) {
+ if (signal && signal.aborted) {
+ return;
+ }
+
+ if (response && response.body) {
+ destroyStream(response.body, err);
+ }
+ });
+
+ /* c8 ignore next 18 */
+ if (parseInt(process.version.substring(1)) < 14) {
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
+ // properly handle when the socket close/end events are out of order.
+ req.on('socket', function (s) {
+ s.addListener('close', function (hadError) {
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = s.listenerCount('data') > 0;
+
+ // if end happened before close but the socket didn't emit an error, do it now
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ response.body.emit('error', err);
+ }
+ });
+ });
+ }
+
+ req.on('response', function (res) {
+ clearTimeout(reqTimeout);
+
+ const headers = createHeadersLenient(res.headers);
+
+ // HTTP fetch step 5
+ if (fetch.isRedirect(res.statusCode)) {
+ // HTTP fetch step 5.2
+ const location = headers.get('Location');
+
+ // HTTP fetch step 5.3
+ let locationURL = null;
+ try {
+ locationURL = location === null ? null : new URL$1(location, request.url).toString();
+ } catch (err) {
+ // error here can only be invalid URL in Location: header
+ // do not throw when options.redirect == manual
+ // let the user extract the errorneous redirect URL
+ if (request.redirect !== 'manual') {
+ reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));
+ finalize();
+ return;
+ }
+ }
+
+ // HTTP fetch step 5.5
+ switch (request.redirect) {
+ case 'error':
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
+ finalize();
+ return;
+ case 'manual':
+ // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
+ if (locationURL !== null) {
+ // handle corrupted header
+ try {
+ headers.set('Location', locationURL);
+ } catch (err) {
+ // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
+ reject(err);
+ }
+ }
+ break;
+ case 'follow':
+ // HTTP-redirect fetch step 2
+ if (locationURL === null) {
+ break;
+ }
+
+ // HTTP-redirect fetch step 5
+ if (request.counter >= request.follow) {
+ reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 6 (counter increment)
+ // Create a new Request object.
+ const requestOpts = {
+ headers: new Headers(request.headers),
+ follow: request.follow,
+ counter: request.counter + 1,
+ agent: request.agent,
+ compress: request.compress,
+ method: request.method,
+ body: request.body,
+ signal: request.signal,
+ timeout: request.timeout,
+ size: request.size
+ };
+
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
+ for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
+ requestOpts.headers.delete(name);
+ }
+ }
+
+ // HTTP-redirect fetch step 9
+ if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
+ reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
+ finalize();
+ return;
+ }
+
+ // HTTP-redirect fetch step 11
+ if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
+ requestOpts.method = 'GET';
+ requestOpts.body = undefined;
+ requestOpts.headers.delete('content-length');
+ }
+
+ // HTTP-redirect fetch step 15
+ resolve(fetch(new Request(locationURL, requestOpts)));
+ finalize();
+ return;
+ }
+ }
+
+ // prepare response
+ res.once('end', function () {
+ if (signal) signal.removeEventListener('abort', abortAndFinalize);
+ });
+ let body = res.pipe(new PassThrough$1());
+
+ const response_options = {
+ url: request.url,
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: headers,
+ size: request.size,
+ timeout: request.timeout,
+ counter: request.counter
+ };
+
+ // HTTP-network fetch step 12.1.1.3
+ const codings = headers.get('Content-Encoding');
+
+ // HTTP-network fetch step 12.1.1.4: handle content codings
+
+ // in following scenarios we ignore compression support
+ // 1. compression support is disabled
+ // 2. HEAD request
+ // 3. no Content-Encoding header
+ // 4. no content response (204)
+ // 5. content not modified response (304)
+ if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // For Node v6+
+ // Be less strict when decoding compressed responses, since sometimes
+ // servers send slightly invalid responses that are still accepted
+ // by common browsers.
+ // Always using Z_SYNC_FLUSH is what cURL does.
+ const zlibOptions = {
+ flush: zlib.Z_SYNC_FLUSH,
+ finishFlush: zlib.Z_SYNC_FLUSH
+ };
+
+ // for gzip
+ if (codings == 'gzip' || codings == 'x-gzip') {
+ body = body.pipe(zlib.createGunzip(zlibOptions));
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // for deflate
+ if (codings == 'deflate' || codings == 'x-deflate') {
+ // handle the infamous raw deflate response from old servers
+ // a hack for old IIS and Apache servers
+ const raw = res.pipe(new PassThrough$1());
+ raw.once('data', function (chunk) {
+ // see http://stackoverflow.com/questions/37519828
+ if ((chunk[0] & 0x0F) === 0x08) {
+ body = body.pipe(zlib.createInflate());
+ } else {
+ body = body.pipe(zlib.createInflateRaw());
+ }
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+ raw.on('end', function () {
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
+ if (!response) {
+ response = new Response(body, response_options);
+ resolve(response);
+ }
+ });
+ return;
+ }
+
+ // for br
+ if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
+ body = body.pipe(zlib.createBrotliDecompress());
+ response = new Response(body, response_options);
+ resolve(response);
+ return;
+ }
+
+ // otherwise, use response as-is
+ response = new Response(body, response_options);
+ resolve(response);
+ });
+
+ writeToStream(req, request);
+ });
+}
+function fixResponseChunkedTransferBadEnding(request, errorCallback) {
+ let socket;
+
+ request.on('socket', function (s) {
+ socket = s;
+ });
+
+ request.on('response', function (response) {
+ const headers = response.headers;
+
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
+ response.once('close', function (hadError) {
+ // tests for socket presence, as in some situations the
+ // the 'socket' event is not triggered for the request
+ // (happens in deno), avoids `TypeError`
+ // if a data listener is still present we didn't end cleanly
+ const hasDataListener = socket && socket.listenerCount('data') > 0;
+
+ if (hasDataListener && !hadError) {
+ const err = new Error('Premature close');
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
+ errorCallback(err);
+ }
+ });
+ }
+ });
+}
+
+function destroyStream(stream, err) {
+ if (stream.destroy) {
+ stream.destroy(err);
+ } else {
+ // node < 8
+ stream.emit('error', err);
+ stream.end();
+ }
+}
+
+/**
+ * Redirect code matching
+ *
+ * @param Number code Status code
+ * @return Boolean
+ */
+fetch.isRedirect = function (code) {
+ return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
+};
+
+// expose Promise
+fetch.Promise = global.Promise;
+
+export default fetch;
+export { Headers, Request, Response, FetchError };
diff --git a/node_modules/@supabase/node-fetch/package.json b/node_modules/@supabase/node-fetch/package.json
new file mode 100644
index 0000000..8ce3a1d
--- /dev/null
+++ b/node_modules/@supabase/node-fetch/package.json
@@ -0,0 +1,80 @@
+{
+ "name": "@supabase/node-fetch",
+ "publishConfig": {
+ "access": "public"
+ },
+ "version": "2.6.15",
+ "description": "A light-weight module that brings window.fetch to node.js",
+ "main": "lib/index.js",
+ "browser": "./browser.js",
+ "files": [
+ "lib/index.js",
+ "lib/index.mjs",
+ "lib/index.es.js",
+ "browser.js"
+ ],
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "scripts": {
+ "build": "cross-env BABEL_ENV=rollup rollup -c",
+ "prepare": "npm run build",
+ "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js",
+ "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js",
+ "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json"
+ },
+ "repository": "supabase/node-fetch",
+ "keywords": [
+ "fetch",
+ "http",
+ "promise"
+ ],
+ "author": "David Frank",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/supabase/node-fetch/issues"
+ },
+ "homepage": "https://github.com/supabase/node-fetch",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "devDependencies": {
+ "@ungap/url-search-params": "^0.1.2",
+ "abort-controller": "^1.1.0",
+ "abortcontroller-polyfill": "^1.3.0",
+ "babel-core": "^6.26.3",
+ "babel-plugin-istanbul": "^4.1.6",
+ "babel-plugin-transform-async-generator-functions": "^6.24.1",
+ "babel-polyfill": "^6.26.0",
+ "babel-preset-env": "1.4.0",
+ "babel-register": "^6.16.3",
+ "chai": "^3.5.0",
+ "chai-as-promised": "^7.1.1",
+ "chai-iterator": "^1.1.1",
+ "chai-string": "~1.3.0",
+ "codecov": "3.3.0",
+ "cross-env": "^5.2.0",
+ "form-data": "^2.3.3",
+ "is-builtin-module": "^1.0.0",
+ "mocha": "^5.0.0",
+ "nyc": "11.9.0",
+ "parted": "^0.1.1",
+ "promise": "^8.0.3",
+ "resumer": "0.0.0",
+ "rollup": "^0.63.4",
+ "rollup-plugin-babel": "^3.0.7",
+ "string-to-arraybuffer": "^1.0.2",
+ "teeny-request": "3.7.0"
+ },
+ "release": {
+ "branches": [
+ "+([0-9]).x",
+ "main",
+ "next",
+ {
+ "name": "beta",
+ "prerelease": true
+ }
+ ]
+ }
+}
diff --git a/node_modules/@supabase/postgrest-js/LICENSE b/node_modules/@supabase/postgrest-js/LICENSE
new file mode 100644
index 0000000..ddeba6a
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@supabase/postgrest-js/README.md b/node_modules/@supabase/postgrest-js/README.md
new file mode 100644
index 0000000..4b962dd
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/README.md
@@ -0,0 +1,54 @@
+# `postgrest-js`
+
+[](https://github.com/supabase/postgrest-js/actions?query=branch%3Amaster)
+[](https://www.npmjs.com/package/@supabase/postgrest-js)
+[](#license)
+
+Isomorphic JavaScript client for [PostgREST](https://postgrest.org). The goal of this library is to make an "ORM-like" restful interface.
+
+Full documentation can be found [here](https://supabase.github.io/postgrest-js/v2).
+
+### Quick start
+
+Install
+
+```bash
+npm install @supabase/postgrest-js
+```
+
+Usage
+
+```js
+import { PostgrestClient } from '@supabase/postgrest-js'
+
+const REST_URL = 'http://localhost:3000'
+const postgrest = new PostgrestClient(REST_URL)
+```
+
+- select(): https://supabase.com/docs/reference/javascript/select
+- insert(): https://supabase.com/docs/reference/javascript/insert
+- update(): https://supabase.com/docs/reference/javascript/update
+- delete(): https://supabase.com/docs/reference/javascript/delete
+
+#### Custom `fetch` implementation
+
+`postgrest-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
+
+```js
+import { PostgrestClient } from '@supabase/postgrest-js'
+
+const REST_URL = 'http://localhost:3000'
+const postgrest = new PostgrestClient(REST_URL, {
+ fetch: (...args) => fetch(...args),
+})
+```
+
+## License
+
+This repo is licensed under MIT License.
+
+## Sponsors
+
+We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.
+
+[](https://github.com/sponsors/supabase)
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.js
new file mode 100644
index 0000000..ec226bf
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.js
@@ -0,0 +1,186 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+// @ts-ignore
+const node_fetch_1 = __importDefault(require("@supabase/node-fetch"));
+const PostgrestError_1 = __importDefault(require("./PostgrestError"));
+class PostgrestBuilder {
+ constructor(builder) {
+ this.shouldThrowOnError = false;
+ this.method = builder.method;
+ this.url = builder.url;
+ this.headers = builder.headers;
+ this.schema = builder.schema;
+ this.body = builder.body;
+ this.shouldThrowOnError = builder.shouldThrowOnError;
+ this.signal = builder.signal;
+ this.isMaybeSingle = builder.isMaybeSingle;
+ if (builder.fetch) {
+ this.fetch = builder.fetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ this.fetch = node_fetch_1.default;
+ }
+ else {
+ this.fetch = fetch;
+ }
+ }
+ /**
+ * If there's an error with the query, throwOnError will reject the promise by
+ * throwing the error instead of returning it as part of a successful response.
+ *
+ * {@link https://github.com/supabase/supabase-js/issues/92}
+ */
+ throwOnError() {
+ this.shouldThrowOnError = true;
+ return this;
+ }
+ /**
+ * Set an HTTP header for the request.
+ */
+ setHeader(name, value) {
+ this.headers = Object.assign({}, this.headers);
+ this.headers[name] = value;
+ return this;
+ }
+ then(onfulfilled, onrejected) {
+ // https://postgrest.org/en/stable/api.html#switching-schemas
+ if (this.schema === undefined) {
+ // skip
+ }
+ else if (['GET', 'HEAD'].includes(this.method)) {
+ this.headers['Accept-Profile'] = this.schema;
+ }
+ else {
+ this.headers['Content-Profile'] = this.schema;
+ }
+ if (this.method !== 'GET' && this.method !== 'HEAD') {
+ this.headers['Content-Type'] = 'application/json';
+ }
+ // NOTE: Invoke w/o `this` to avoid illegal invocation error.
+ // https://github.com/supabase/postgrest-js/pull/247
+ const _fetch = this.fetch;
+ let res = _fetch(this.url.toString(), {
+ method: this.method,
+ headers: this.headers,
+ body: JSON.stringify(this.body),
+ signal: this.signal,
+ }).then(async (res) => {
+ var _a, _b, _c;
+ let error = null;
+ let data = null;
+ let count = null;
+ let status = res.status;
+ let statusText = res.statusText;
+ if (res.ok) {
+ if (this.method !== 'HEAD') {
+ const body = await res.text();
+ if (body === '') {
+ // Prefer: return=minimal
+ }
+ else if (this.headers['Accept'] === 'text/csv') {
+ data = body;
+ }
+ else if (this.headers['Accept'] &&
+ this.headers['Accept'].includes('application/vnd.pgrst.plan+text')) {
+ data = body;
+ }
+ else {
+ data = JSON.parse(body);
+ }
+ }
+ const countHeader = (_a = this.headers['Prefer']) === null || _a === void 0 ? void 0 : _a.match(/count=(exact|planned|estimated)/);
+ const contentRange = (_b = res.headers.get('content-range')) === null || _b === void 0 ? void 0 : _b.split('/');
+ if (countHeader && contentRange && contentRange.length > 1) {
+ count = parseInt(contentRange[1]);
+ }
+ // Temporary partial fix for https://github.com/supabase/postgrest-js/issues/361
+ // Issue persists e.g. for `.insert([...]).select().maybeSingle()`
+ if (this.isMaybeSingle && this.method === 'GET' && Array.isArray(data)) {
+ if (data.length > 1) {
+ error = {
+ // https://github.com/PostgREST/postgrest/blob/a867d79c42419af16c18c3fb019eba8df992626f/src/PostgREST/Error.hs#L553
+ code: 'PGRST116',
+ details: `Results contain ${data.length} rows, application/vnd.pgrst.object+json requires 1 row`,
+ hint: null,
+ message: 'JSON object requested, multiple (or no) rows returned',
+ };
+ data = null;
+ count = null;
+ status = 406;
+ statusText = 'Not Acceptable';
+ }
+ else if (data.length === 1) {
+ data = data[0];
+ }
+ else {
+ data = null;
+ }
+ }
+ }
+ else {
+ const body = await res.text();
+ try {
+ error = JSON.parse(body);
+ // Workaround for https://github.com/supabase/postgrest-js/issues/295
+ if (Array.isArray(error) && res.status === 404) {
+ data = [];
+ error = null;
+ status = 200;
+ statusText = 'OK';
+ }
+ }
+ catch (_d) {
+ // Workaround for https://github.com/supabase/postgrest-js/issues/295
+ if (res.status === 404 && body === '') {
+ status = 204;
+ statusText = 'No Content';
+ }
+ else {
+ error = {
+ message: body,
+ };
+ }
+ }
+ if (error && this.isMaybeSingle && ((_c = error === null || error === void 0 ? void 0 : error.details) === null || _c === void 0 ? void 0 : _c.includes('0 rows'))) {
+ error = null;
+ status = 200;
+ statusText = 'OK';
+ }
+ if (error && this.shouldThrowOnError) {
+ throw new PostgrestError_1.default(error);
+ }
+ }
+ const postgrestResponse = {
+ error,
+ data,
+ count,
+ status,
+ statusText,
+ };
+ return postgrestResponse;
+ });
+ if (!this.shouldThrowOnError) {
+ res = res.catch((fetchError) => {
+ var _a, _b, _c;
+ return ({
+ error: {
+ message: `${(_a = fetchError === null || fetchError === void 0 ? void 0 : fetchError.name) !== null && _a !== void 0 ? _a : 'FetchError'}: ${fetchError === null || fetchError === void 0 ? void 0 : fetchError.message}`,
+ details: `${(_b = fetchError === null || fetchError === void 0 ? void 0 : fetchError.stack) !== null && _b !== void 0 ? _b : ''}`,
+ hint: '',
+ code: `${(_c = fetchError === null || fetchError === void 0 ? void 0 : fetchError.code) !== null && _c !== void 0 ? _c : ''}`,
+ },
+ data: null,
+ count: null,
+ status: 0,
+ statusText: '',
+ });
+ });
+ }
+ return res.then(onfulfilled, onrejected);
+ }
+}
+exports.default = PostgrestBuilder;
+//# sourceMappingURL=PostgrestBuilder.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.js
new file mode 100644
index 0000000..1f1e7ec
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.js
@@ -0,0 +1,122 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const PostgrestQueryBuilder_1 = __importDefault(require("./PostgrestQueryBuilder"));
+const PostgrestFilterBuilder_1 = __importDefault(require("./PostgrestFilterBuilder"));
+const constants_1 = require("./constants");
+/**
+ * PostgREST client.
+ *
+ * @typeParam Database - Types for the schema from the [type
+ * generator](https://supabase.com/docs/reference/javascript/next/typescript-support)
+ *
+ * @typeParam SchemaName - Postgres schema to switch to. Must be a string
+ * literal, the same one passed to the constructor. If the schema is not
+ * `"public"`, this must be supplied manually.
+ */
+class PostgrestClient {
+ // TODO: Add back shouldThrowOnError once we figure out the typings
+ /**
+ * Creates a PostgREST client.
+ *
+ * @param url - URL of the PostgREST endpoint
+ * @param options - Named parameters
+ * @param options.headers - Custom headers
+ * @param options.schema - Postgres schema to switch to
+ * @param options.fetch - Custom fetch
+ */
+ constructor(url, { headers = {}, schema, fetch, } = {}) {
+ this.url = url;
+ this.headers = Object.assign(Object.assign({}, constants_1.DEFAULT_HEADERS), headers);
+ this.schemaName = schema;
+ this.fetch = fetch;
+ }
+ /**
+ * Perform a query on a table or a view.
+ *
+ * @param relation - The table or view name to query
+ */
+ from(relation) {
+ const url = new URL(`${this.url}/${relation}`);
+ return new PostgrestQueryBuilder_1.default(url, {
+ headers: Object.assign({}, this.headers),
+ schema: this.schemaName,
+ fetch: this.fetch,
+ });
+ }
+ /**
+ * Select a schema to query or perform an function (rpc) call.
+ *
+ * The schema needs to be on the list of exposed schemas inside Supabase.
+ *
+ * @param schema - The schema to query
+ */
+ schema(schema) {
+ return new PostgrestClient(this.url, {
+ headers: this.headers,
+ schema,
+ fetch: this.fetch,
+ });
+ }
+ /**
+ * Perform a function call.
+ *
+ * @param fn - The function name to call
+ * @param args - The arguments to pass to the function call
+ * @param options - Named parameters
+ * @param options.head - When set to `true`, `data` will not be returned.
+ * Useful if you only need the count.
+ * @param options.get - When set to `true`, the function will be called with
+ * read-only access mode.
+ * @param options.count - Count algorithm to use to count rows returned by the
+ * function. Only applicable for [set-returning
+ * functions](https://www.postgresql.org/docs/current/functions-srf.html).
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ rpc(fn, args = {}, { head = false, get = false, count, } = {}) {
+ let method;
+ const url = new URL(`${this.url}/rpc/${fn}`);
+ let body;
+ if (head || get) {
+ method = head ? 'HEAD' : 'GET';
+ Object.entries(args)
+ // params with undefined value needs to be filtered out, otherwise it'll
+ // show up as `?param=undefined`
+ .filter(([_, value]) => value !== undefined)
+ // array values need special syntax
+ .map(([name, value]) => [name, Array.isArray(value) ? `{${value.join(',')}}` : `${value}`])
+ .forEach(([name, value]) => {
+ url.searchParams.append(name, value);
+ });
+ }
+ else {
+ method = 'POST';
+ body = args;
+ }
+ const headers = Object.assign({}, this.headers);
+ if (count) {
+ headers['Prefer'] = `count=${count}`;
+ }
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url,
+ headers,
+ schema: this.schemaName,
+ body,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+}
+exports.default = PostgrestClient;
+//# sourceMappingURL=PostgrestClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.js
new file mode 100644
index 0000000..2a4b05a
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.js
@@ -0,0 +1,18 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Error format
+ *
+ * {@link https://postgrest.org/en/stable/api.html?highlight=options#errors-and-http-status-codes}
+ */
+class PostgrestError extends Error {
+ constructor(context) {
+ super(context.message);
+ this.name = 'PostgrestError';
+ this.details = context.details;
+ this.hint = context.hint;
+ this.code = context.code;
+ }
+}
+exports.default = PostgrestError;
+//# sourceMappingURL=PostgrestError.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.js
new file mode 100644
index 0000000..8478ce9
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.js
@@ -0,0 +1,381 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const PostgrestTransformBuilder_1 = __importDefault(require("./PostgrestTransformBuilder"));
+class PostgrestFilterBuilder extends PostgrestTransformBuilder_1.default {
+ /**
+ * Match only rows where `column` is equal to `value`.
+ *
+ * To check if the value of `column` is NULL, you should use `.is()` instead.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ eq(column, value) {
+ this.url.searchParams.append(column, `eq.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is not equal to `value`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ neq(column, value) {
+ this.url.searchParams.append(column, `neq.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is greater than `value`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ gt(column, value) {
+ this.url.searchParams.append(column, `gt.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is greater than or equal to `value`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ gte(column, value) {
+ this.url.searchParams.append(column, `gte.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is less than `value`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ lt(column, value) {
+ this.url.searchParams.append(column, `lt.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is less than or equal to `value`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ lte(column, value) {
+ this.url.searchParams.append(column, `lte.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches `pattern` case-sensitively.
+ *
+ * @param column - The column to filter on
+ * @param pattern - The pattern to match with
+ */
+ like(column, pattern) {
+ this.url.searchParams.append(column, `like.${pattern}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches all of `patterns` case-sensitively.
+ *
+ * @param column - The column to filter on
+ * @param patterns - The patterns to match with
+ */
+ likeAllOf(column, patterns) {
+ this.url.searchParams.append(column, `like(all).{${patterns.join(',')}}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches any of `patterns` case-sensitively.
+ *
+ * @param column - The column to filter on
+ * @param patterns - The patterns to match with
+ */
+ likeAnyOf(column, patterns) {
+ this.url.searchParams.append(column, `like(any).{${patterns.join(',')}}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches `pattern` case-insensitively.
+ *
+ * @param column - The column to filter on
+ * @param pattern - The pattern to match with
+ */
+ ilike(column, pattern) {
+ this.url.searchParams.append(column, `ilike.${pattern}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches all of `patterns` case-insensitively.
+ *
+ * @param column - The column to filter on
+ * @param patterns - The patterns to match with
+ */
+ ilikeAllOf(column, patterns) {
+ this.url.searchParams.append(column, `ilike(all).{${patterns.join(',')}}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` matches any of `patterns` case-insensitively.
+ *
+ * @param column - The column to filter on
+ * @param patterns - The patterns to match with
+ */
+ ilikeAnyOf(column, patterns) {
+ this.url.searchParams.append(column, `ilike(any).{${patterns.join(',')}}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` IS `value`.
+ *
+ * For non-boolean columns, this is only relevant for checking if the value of
+ * `column` is NULL by setting `value` to `null`.
+ *
+ * For boolean columns, you can also set `value` to `true` or `false` and it
+ * will behave the same way as `.eq()`.
+ *
+ * @param column - The column to filter on
+ * @param value - The value to filter with
+ */
+ is(column, value) {
+ this.url.searchParams.append(column, `is.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows where `column` is included in the `values` array.
+ *
+ * @param column - The column to filter on
+ * @param values - The values array to filter with
+ */
+ in(column, values) {
+ const cleanedValues = Array.from(new Set(values))
+ .map((s) => {
+ // handle postgrest reserved characters
+ // https://postgrest.org/en/v7.0.0/api.html#reserved-characters
+ if (typeof s === 'string' && new RegExp('[,()]').test(s))
+ return `"${s}"`;
+ else
+ return `${s}`;
+ })
+ .join(',');
+ this.url.searchParams.append(column, `in.(${cleanedValues})`);
+ return this;
+ }
+ /**
+ * Only relevant for jsonb, array, and range columns. Match only rows where
+ * `column` contains every element appearing in `value`.
+ *
+ * @param column - The jsonb, array, or range column to filter on
+ * @param value - The jsonb, array, or range value to filter with
+ */
+ contains(column, value) {
+ if (typeof value === 'string') {
+ // range types can be inclusive '[', ']' or exclusive '(', ')' so just
+ // keep it simple and accept a string
+ this.url.searchParams.append(column, `cs.${value}`);
+ }
+ else if (Array.isArray(value)) {
+ // array
+ this.url.searchParams.append(column, `cs.{${value.join(',')}}`);
+ }
+ else {
+ // json
+ this.url.searchParams.append(column, `cs.${JSON.stringify(value)}`);
+ }
+ return this;
+ }
+ /**
+ * Only relevant for jsonb, array, and range columns. Match only rows where
+ * every element appearing in `column` is contained by `value`.
+ *
+ * @param column - The jsonb, array, or range column to filter on
+ * @param value - The jsonb, array, or range value to filter with
+ */
+ containedBy(column, value) {
+ if (typeof value === 'string') {
+ // range
+ this.url.searchParams.append(column, `cd.${value}`);
+ }
+ else if (Array.isArray(value)) {
+ // array
+ this.url.searchParams.append(column, `cd.{${value.join(',')}}`);
+ }
+ else {
+ // json
+ this.url.searchParams.append(column, `cd.${JSON.stringify(value)}`);
+ }
+ return this;
+ }
+ /**
+ * Only relevant for range columns. Match only rows where every element in
+ * `column` is greater than any element in `range`.
+ *
+ * @param column - The range column to filter on
+ * @param range - The range to filter with
+ */
+ rangeGt(column, range) {
+ this.url.searchParams.append(column, `sr.${range}`);
+ return this;
+ }
+ /**
+ * Only relevant for range columns. Match only rows where every element in
+ * `column` is either contained in `range` or greater than any element in
+ * `range`.
+ *
+ * @param column - The range column to filter on
+ * @param range - The range to filter with
+ */
+ rangeGte(column, range) {
+ this.url.searchParams.append(column, `nxl.${range}`);
+ return this;
+ }
+ /**
+ * Only relevant for range columns. Match only rows where every element in
+ * `column` is less than any element in `range`.
+ *
+ * @param column - The range column to filter on
+ * @param range - The range to filter with
+ */
+ rangeLt(column, range) {
+ this.url.searchParams.append(column, `sl.${range}`);
+ return this;
+ }
+ /**
+ * Only relevant for range columns. Match only rows where every element in
+ * `column` is either contained in `range` or less than any element in
+ * `range`.
+ *
+ * @param column - The range column to filter on
+ * @param range - The range to filter with
+ */
+ rangeLte(column, range) {
+ this.url.searchParams.append(column, `nxr.${range}`);
+ return this;
+ }
+ /**
+ * Only relevant for range columns. Match only rows where `column` is
+ * mutually exclusive to `range` and there can be no element between the two
+ * ranges.
+ *
+ * @param column - The range column to filter on
+ * @param range - The range to filter with
+ */
+ rangeAdjacent(column, range) {
+ this.url.searchParams.append(column, `adj.${range}`);
+ return this;
+ }
+ /**
+ * Only relevant for array and range columns. Match only rows where
+ * `column` and `value` have an element in common.
+ *
+ * @param column - The array or range column to filter on
+ * @param value - The array or range value to filter with
+ */
+ overlaps(column, value) {
+ if (typeof value === 'string') {
+ // range
+ this.url.searchParams.append(column, `ov.${value}`);
+ }
+ else {
+ // array
+ this.url.searchParams.append(column, `ov.{${value.join(',')}}`);
+ }
+ return this;
+ }
+ /**
+ * Only relevant for text and tsvector columns. Match only rows where
+ * `column` matches the query string in `query`.
+ *
+ * @param column - The text or tsvector column to filter on
+ * @param query - The query text to match with
+ * @param options - Named parameters
+ * @param options.config - The text search configuration to use
+ * @param options.type - Change how the `query` text is interpreted
+ */
+ textSearch(column, query, { config, type } = {}) {
+ let typePart = '';
+ if (type === 'plain') {
+ typePart = 'pl';
+ }
+ else if (type === 'phrase') {
+ typePart = 'ph';
+ }
+ else if (type === 'websearch') {
+ typePart = 'w';
+ }
+ const configPart = config === undefined ? '' : `(${config})`;
+ this.url.searchParams.append(column, `${typePart}fts${configPart}.${query}`);
+ return this;
+ }
+ /**
+ * Match only rows where each column in `query` keys is equal to its
+ * associated value. Shorthand for multiple `.eq()`s.
+ *
+ * @param query - The object to filter with, with column names as keys mapped
+ * to their filter values
+ */
+ match(query) {
+ Object.entries(query).forEach(([column, value]) => {
+ this.url.searchParams.append(column, `eq.${value}`);
+ });
+ return this;
+ }
+ /**
+ * Match only rows which doesn't satisfy the filter.
+ *
+ * Unlike most filters, `opearator` and `value` are used as-is and need to
+ * follow [PostgREST
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
+ * to make sure they are properly sanitized.
+ *
+ * @param column - The column to filter on
+ * @param operator - The operator to be negated to filter with, following
+ * PostgREST syntax
+ * @param value - The value to filter with, following PostgREST syntax
+ */
+ not(column, operator, value) {
+ this.url.searchParams.append(column, `not.${operator}.${value}`);
+ return this;
+ }
+ /**
+ * Match only rows which satisfy at least one of the filters.
+ *
+ * Unlike most filters, `filters` is used as-is and needs to follow [PostgREST
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
+ * to make sure it's properly sanitized.
+ *
+ * It's currently not possible to do an `.or()` filter across multiple tables.
+ *
+ * @param filters - The filters to use, following PostgREST syntax
+ * @param options - Named parameters
+ * @param options.referencedTable - Set this to filter on referenced tables
+ * instead of the parent table
+ * @param options.foreignTable - Deprecated, use `referencedTable` instead
+ */
+ or(filters, { foreignTable, referencedTable = foreignTable, } = {}) {
+ const key = referencedTable ? `${referencedTable}.or` : 'or';
+ this.url.searchParams.append(key, `(${filters})`);
+ return this;
+ }
+ /**
+ * Match only rows which satisfy the filter. This is an escape hatch - you
+ * should use the specific filter methods wherever possible.
+ *
+ * Unlike most filters, `opearator` and `value` are used as-is and need to
+ * follow [PostgREST
+ * syntax](https://postgrest.org/en/stable/api.html#operators). You also need
+ * to make sure they are properly sanitized.
+ *
+ * @param column - The column to filter on
+ * @param operator - The operator to filter with, following PostgREST syntax
+ * @param value - The value to filter with, following PostgREST syntax
+ */
+ filter(column, operator, value) {
+ this.url.searchParams.append(column, `${operator}.${value}`);
+ return this;
+ }
+}
+exports.default = PostgrestFilterBuilder;
+//# sourceMappingURL=PostgrestFilterBuilder.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.js
new file mode 100644
index 0000000..e3add25
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.js
@@ -0,0 +1,271 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const PostgrestFilterBuilder_1 = __importDefault(require("./PostgrestFilterBuilder"));
+class PostgrestQueryBuilder {
+ constructor(url, { headers = {}, schema, fetch, }) {
+ this.url = url;
+ this.headers = headers;
+ this.schema = schema;
+ this.fetch = fetch;
+ }
+ /**
+ * Perform a SELECT query on the table or view.
+ *
+ * @param columns - The columns to retrieve, separated by commas. Columns can be renamed when returned with `customName:columnName`
+ *
+ * @param options - Named parameters
+ *
+ * @param options.head - When set to `true`, `data` will not be returned.
+ * Useful if you only need the count.
+ *
+ * @param options.count - Count algorithm to use to count rows in the table or view.
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ select(columns, { head = false, count, } = {}) {
+ const method = head ? 'HEAD' : 'GET';
+ // Remove whitespaces except when quoted
+ let quoted = false;
+ const cleanedColumns = (columns !== null && columns !== void 0 ? columns : '*')
+ .split('')
+ .map((c) => {
+ if (/\s/.test(c) && !quoted) {
+ return '';
+ }
+ if (c === '"') {
+ quoted = !quoted;
+ }
+ return c;
+ })
+ .join('');
+ this.url.searchParams.set('select', cleanedColumns);
+ if (count) {
+ this.headers['Prefer'] = `count=${count}`;
+ }
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url: this.url,
+ headers: this.headers,
+ schema: this.schema,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+ /**
+ * Perform an INSERT into the table or view.
+ *
+ * By default, inserted rows are not returned. To return it, chain the call
+ * with `.select()`.
+ *
+ * @param values - The values to insert. Pass an object to insert a single row
+ * or an array to insert multiple rows.
+ *
+ * @param options - Named parameters
+ *
+ * @param options.count - Count algorithm to use to count inserted rows.
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ *
+ * @param options.defaultToNull - Make missing fields default to `null`.
+ * Otherwise, use the default value for the column. Only applies for bulk
+ * inserts.
+ */
+ insert(values, { count, defaultToNull = true, } = {}) {
+ const method = 'POST';
+ const prefersHeaders = [];
+ if (this.headers['Prefer']) {
+ prefersHeaders.push(this.headers['Prefer']);
+ }
+ if (count) {
+ prefersHeaders.push(`count=${count}`);
+ }
+ if (!defaultToNull) {
+ prefersHeaders.push('missing=default');
+ }
+ this.headers['Prefer'] = prefersHeaders.join(',');
+ if (Array.isArray(values)) {
+ const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []);
+ if (columns.length > 0) {
+ const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`);
+ this.url.searchParams.set('columns', uniqueColumns.join(','));
+ }
+ }
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url: this.url,
+ headers: this.headers,
+ schema: this.schema,
+ body: values,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+ /**
+ * Perform an UPSERT on the table or view. Depending on the column(s) passed
+ * to `onConflict`, `.upsert()` allows you to perform the equivalent of
+ * `.insert()` if a row with the corresponding `onConflict` columns doesn't
+ * exist, or if it does exist, perform an alternative action depending on
+ * `ignoreDuplicates`.
+ *
+ * By default, upserted rows are not returned. To return it, chain the call
+ * with `.select()`.
+ *
+ * @param values - The values to upsert with. Pass an object to upsert a
+ * single row or an array to upsert multiple rows.
+ *
+ * @param options - Named parameters
+ *
+ * @param options.onConflict - Comma-separated UNIQUE column(s) to specify how
+ * duplicate rows are determined. Two rows are duplicates if all the
+ * `onConflict` columns are equal.
+ *
+ * @param options.ignoreDuplicates - If `true`, duplicate rows are ignored. If
+ * `false`, duplicate rows are merged with existing rows.
+ *
+ * @param options.count - Count algorithm to use to count upserted rows.
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ *
+ * @param options.defaultToNull - Make missing fields default to `null`.
+ * Otherwise, use the default value for the column. This only applies when
+ * inserting new rows, not when merging with existing rows under
+ * `ignoreDuplicates: false`. This also only applies when doing bulk upserts.
+ */
+ upsert(values, { onConflict, ignoreDuplicates = false, count, defaultToNull = true, } = {}) {
+ const method = 'POST';
+ const prefersHeaders = [`resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`];
+ if (onConflict !== undefined)
+ this.url.searchParams.set('on_conflict', onConflict);
+ if (this.headers['Prefer']) {
+ prefersHeaders.push(this.headers['Prefer']);
+ }
+ if (count) {
+ prefersHeaders.push(`count=${count}`);
+ }
+ if (!defaultToNull) {
+ prefersHeaders.push('missing=default');
+ }
+ this.headers['Prefer'] = prefersHeaders.join(',');
+ if (Array.isArray(values)) {
+ const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []);
+ if (columns.length > 0) {
+ const uniqueColumns = [...new Set(columns)].map((column) => `"${column}"`);
+ this.url.searchParams.set('columns', uniqueColumns.join(','));
+ }
+ }
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url: this.url,
+ headers: this.headers,
+ schema: this.schema,
+ body: values,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+ /**
+ * Perform an UPDATE on the table or view.
+ *
+ * By default, updated rows are not returned. To return it, chain the call
+ * with `.select()` after filters.
+ *
+ * @param values - The values to update with
+ *
+ * @param options - Named parameters
+ *
+ * @param options.count - Count algorithm to use to count updated rows.
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ update(values, { count, } = {}) {
+ const method = 'PATCH';
+ const prefersHeaders = [];
+ if (this.headers['Prefer']) {
+ prefersHeaders.push(this.headers['Prefer']);
+ }
+ if (count) {
+ prefersHeaders.push(`count=${count}`);
+ }
+ this.headers['Prefer'] = prefersHeaders.join(',');
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url: this.url,
+ headers: this.headers,
+ schema: this.schema,
+ body: values,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+ /**
+ * Perform a DELETE on the table or view.
+ *
+ * By default, deleted rows are not returned. To return it, chain the call
+ * with `.select()` after filters.
+ *
+ * @param options - Named parameters
+ *
+ * @param options.count - Count algorithm to use to count deleted rows.
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ delete({ count, } = {}) {
+ const method = 'DELETE';
+ const prefersHeaders = [];
+ if (count) {
+ prefersHeaders.push(`count=${count}`);
+ }
+ if (this.headers['Prefer']) {
+ prefersHeaders.unshift(this.headers['Prefer']);
+ }
+ this.headers['Prefer'] = prefersHeaders.join(',');
+ return new PostgrestFilterBuilder_1.default({
+ method,
+ url: this.url,
+ headers: this.headers,
+ schema: this.schema,
+ fetch: this.fetch,
+ allowEmpty: false,
+ });
+ }
+}
+exports.default = PostgrestQueryBuilder;
+//# sourceMappingURL=PostgrestQueryBuilder.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.js b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.js
new file mode 100644
index 0000000..2a88d74
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.js
@@ -0,0 +1,221 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const PostgrestBuilder_1 = __importDefault(require("./PostgrestBuilder"));
+class PostgrestTransformBuilder extends PostgrestBuilder_1.default {
+ /**
+ * Perform a SELECT on the query result.
+ *
+ * By default, `.insert()`, `.update()`, `.upsert()`, and `.delete()` do not
+ * return modified rows. By calling this method, modified rows are returned in
+ * `data`.
+ *
+ * @param columns - The columns to retrieve, separated by commas
+ */
+ select(columns) {
+ // Remove whitespaces except when quoted
+ let quoted = false;
+ const cleanedColumns = (columns !== null && columns !== void 0 ? columns : '*')
+ .split('')
+ .map((c) => {
+ if (/\s/.test(c) && !quoted) {
+ return '';
+ }
+ if (c === '"') {
+ quoted = !quoted;
+ }
+ return c;
+ })
+ .join('');
+ this.url.searchParams.set('select', cleanedColumns);
+ if (this.headers['Prefer']) {
+ this.headers['Prefer'] += ',';
+ }
+ this.headers['Prefer'] += 'return=representation';
+ return this;
+ }
+ /**
+ * Order the query result by `column`.
+ *
+ * You can call this method multiple times to order by multiple columns.
+ *
+ * You can order referenced tables, but it only affects the ordering of the
+ * parent table if you use `!inner` in the query.
+ *
+ * @param column - The column to order by
+ * @param options - Named parameters
+ * @param options.ascending - If `true`, the result will be in ascending order
+ * @param options.nullsFirst - If `true`, `null`s appear first. If `false`,
+ * `null`s appear last.
+ * @param options.referencedTable - Set this to order a referenced table by
+ * its columns
+ * @param options.foreignTable - Deprecated, use `options.referencedTable`
+ * instead
+ */
+ order(column, { ascending = true, nullsFirst, foreignTable, referencedTable = foreignTable, } = {}) {
+ const key = referencedTable ? `${referencedTable}.order` : 'order';
+ const existingOrder = this.url.searchParams.get(key);
+ this.url.searchParams.set(key, `${existingOrder ? `${existingOrder},` : ''}${column}.${ascending ? 'asc' : 'desc'}${nullsFirst === undefined ? '' : nullsFirst ? '.nullsfirst' : '.nullslast'}`);
+ return this;
+ }
+ /**
+ * Limit the query result by `count`.
+ *
+ * @param count - The maximum number of rows to return
+ * @param options - Named parameters
+ * @param options.referencedTable - Set this to limit rows of referenced
+ * tables instead of the parent table
+ * @param options.foreignTable - Deprecated, use `options.referencedTable`
+ * instead
+ */
+ limit(count, { foreignTable, referencedTable = foreignTable, } = {}) {
+ const key = typeof referencedTable === 'undefined' ? 'limit' : `${referencedTable}.limit`;
+ this.url.searchParams.set(key, `${count}`);
+ return this;
+ }
+ /**
+ * Limit the query result by starting at an offset `from` and ending at the offset `to`.
+ * Only records within this range are returned.
+ * This respects the query order and if there is no order clause the range could behave unexpectedly.
+ * The `from` and `to` values are 0-based and inclusive: `range(1, 3)` will include the second, third
+ * and fourth rows of the query.
+ *
+ * @param from - The starting index from which to limit the result
+ * @param to - The last index to which to limit the result
+ * @param options - Named parameters
+ * @param options.referencedTable - Set this to limit rows of referenced
+ * tables instead of the parent table
+ * @param options.foreignTable - Deprecated, use `options.referencedTable`
+ * instead
+ */
+ range(from, to, { foreignTable, referencedTable = foreignTable, } = {}) {
+ const keyOffset = typeof referencedTable === 'undefined' ? 'offset' : `${referencedTable}.offset`;
+ const keyLimit = typeof referencedTable === 'undefined' ? 'limit' : `${referencedTable}.limit`;
+ this.url.searchParams.set(keyOffset, `${from}`);
+ // Range is inclusive, so add 1
+ this.url.searchParams.set(keyLimit, `${to - from + 1}`);
+ return this;
+ }
+ /**
+ * Set the AbortSignal for the fetch request.
+ *
+ * @param signal - The AbortSignal to use for the fetch request
+ */
+ abortSignal(signal) {
+ this.signal = signal;
+ return this;
+ }
+ /**
+ * Return `data` as a single object instead of an array of objects.
+ *
+ * Query result must be one row (e.g. using `.limit(1)`), otherwise this
+ * returns an error.
+ */
+ single() {
+ this.headers['Accept'] = 'application/vnd.pgrst.object+json';
+ return this;
+ }
+ /**
+ * Return `data` as a single object instead of an array of objects.
+ *
+ * Query result must be zero or one row (e.g. using `.limit(1)`), otherwise
+ * this returns an error.
+ */
+ maybeSingle() {
+ // Temporary partial fix for https://github.com/supabase/postgrest-js/issues/361
+ // Issue persists e.g. for `.insert([...]).select().maybeSingle()`
+ if (this.method === 'GET') {
+ this.headers['Accept'] = 'application/json';
+ }
+ else {
+ this.headers['Accept'] = 'application/vnd.pgrst.object+json';
+ }
+ this.isMaybeSingle = true;
+ return this;
+ }
+ /**
+ * Return `data` as a string in CSV format.
+ */
+ csv() {
+ this.headers['Accept'] = 'text/csv';
+ return this;
+ }
+ /**
+ * Return `data` as an object in [GeoJSON](https://geojson.org) format.
+ */
+ geojson() {
+ this.headers['Accept'] = 'application/geo+json';
+ return this;
+ }
+ /**
+ * Return `data` as the EXPLAIN plan for the query.
+ *
+ * You need to enable the
+ * [db_plan_enabled](https://supabase.com/docs/guides/database/debugging-performance#enabling-explain)
+ * setting before using this method.
+ *
+ * @param options - Named parameters
+ *
+ * @param options.analyze - If `true`, the query will be executed and the
+ * actual run time will be returned
+ *
+ * @param options.verbose - If `true`, the query identifier will be returned
+ * and `data` will include the output columns of the query
+ *
+ * @param options.settings - If `true`, include information on configuration
+ * parameters that affect query planning
+ *
+ * @param options.buffers - If `true`, include information on buffer usage
+ *
+ * @param options.wal - If `true`, include information on WAL record generation
+ *
+ * @param options.format - The format of the output, can be `"text"` (default)
+ * or `"json"`
+ */
+ explain({ analyze = false, verbose = false, settings = false, buffers = false, wal = false, format = 'text', } = {}) {
+ var _a;
+ const options = [
+ analyze ? 'analyze' : null,
+ verbose ? 'verbose' : null,
+ settings ? 'settings' : null,
+ buffers ? 'buffers' : null,
+ wal ? 'wal' : null,
+ ]
+ .filter(Boolean)
+ .join('|');
+ // An Accept header can carry multiple media types but postgrest-js always sends one
+ const forMediatype = (_a = this.headers['Accept']) !== null && _a !== void 0 ? _a : 'application/json';
+ this.headers['Accept'] = `application/vnd.pgrst.plan+${format}; for="${forMediatype}"; options=${options};`;
+ if (format === 'json')
+ return this;
+ else
+ return this;
+ }
+ /**
+ * Rollback the query.
+ *
+ * `data` will still be returned, but the query is not committed.
+ */
+ rollback() {
+ var _a;
+ if (((_a = this.headers['Prefer']) !== null && _a !== void 0 ? _a : '').trim().length > 0) {
+ this.headers['Prefer'] += ',tx=rollback';
+ }
+ else {
+ this.headers['Prefer'] = 'tx=rollback';
+ }
+ return this;
+ }
+ /**
+ * Override the type of the returned `data`.
+ *
+ * @typeParam NewResult - The new result type to override with
+ */
+ returns() {
+ return this;
+ }
+}
+exports.default = PostgrestTransformBuilder;
+//# sourceMappingURL=PostgrestTransformBuilder.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/constants.js b/node_modules/@supabase/postgrest-js/dist/cjs/constants.js
new file mode 100644
index 0000000..c4ddfc0
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/constants.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DEFAULT_HEADERS = void 0;
+const version_1 = require("./version");
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `postgrest-js/${version_1.version}` };
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/index.js b/node_modules/@supabase/postgrest-js/dist/cjs/index.js
new file mode 100644
index 0000000..a619721
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/index.js
@@ -0,0 +1,28 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.PostgrestError = exports.PostgrestBuilder = exports.PostgrestTransformBuilder = exports.PostgrestFilterBuilder = exports.PostgrestQueryBuilder = exports.PostgrestClient = void 0;
+// Always update wrapper.mjs when updating this file.
+const PostgrestClient_1 = __importDefault(require("./PostgrestClient"));
+exports.PostgrestClient = PostgrestClient_1.default;
+const PostgrestQueryBuilder_1 = __importDefault(require("./PostgrestQueryBuilder"));
+exports.PostgrestQueryBuilder = PostgrestQueryBuilder_1.default;
+const PostgrestFilterBuilder_1 = __importDefault(require("./PostgrestFilterBuilder"));
+exports.PostgrestFilterBuilder = PostgrestFilterBuilder_1.default;
+const PostgrestTransformBuilder_1 = __importDefault(require("./PostgrestTransformBuilder"));
+exports.PostgrestTransformBuilder = PostgrestTransformBuilder_1.default;
+const PostgrestBuilder_1 = __importDefault(require("./PostgrestBuilder"));
+exports.PostgrestBuilder = PostgrestBuilder_1.default;
+const PostgrestError_1 = __importDefault(require("./PostgrestError"));
+exports.PostgrestError = PostgrestError_1.default;
+exports.default = {
+ PostgrestClient: PostgrestClient_1.default,
+ PostgrestQueryBuilder: PostgrestQueryBuilder_1.default,
+ PostgrestFilterBuilder: PostgrestFilterBuilder_1.default,
+ PostgrestTransformBuilder: PostgrestTransformBuilder_1.default,
+ PostgrestBuilder: PostgrestBuilder_1.default,
+ PostgrestError: PostgrestError_1.default,
+};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.js b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.js
new file mode 100644
index 0000000..7eb014e
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.js
@@ -0,0 +1,5 @@
+"use strict";
+// Credits to @bnjmnt4n (https://www.npmjs.com/package/postgrest-query)
+// See https://github.com/PostgREST/postgrest/blob/2f91853cb1de18944a4556df09e52450b881cfb3/src/PostgREST/ApiRequest/QueryParams.hs#L282-L284
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=parser.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.js b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.js
new file mode 100644
index 0000000..597898e
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=result.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.js b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.js b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.js
new file mode 100644
index 0000000..ee02fa6
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=utils.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/types.js b/node_modules/@supabase/postgrest-js/dist/cjs/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/cjs/version.js b/node_modules/@supabase/postgrest-js/dist/cjs/version.js
new file mode 100644
index 0000000..a994357
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/cjs/version.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+exports.version = '0.0.0-automated';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/postgrest-js/dist/esm/wrapper.mjs b/node_modules/@supabase/postgrest-js/dist/esm/wrapper.mjs
new file mode 100644
index 0000000..67b173b
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/dist/esm/wrapper.mjs
@@ -0,0 +1,28 @@
+import index from '../cjs/index.js'
+const {
+ PostgrestClient,
+ PostgrestQueryBuilder,
+ PostgrestFilterBuilder,
+ PostgrestTransformBuilder,
+ PostgrestBuilder,
+ PostgrestError,
+} = index
+
+export {
+ PostgrestBuilder,
+ PostgrestClient,
+ PostgrestFilterBuilder,
+ PostgrestQueryBuilder,
+ PostgrestTransformBuilder,
+ PostgrestError,
+}
+
+// compatibility with CJS output
+export default {
+ PostgrestClient,
+ PostgrestQueryBuilder,
+ PostgrestFilterBuilder,
+ PostgrestTransformBuilder,
+ PostgrestBuilder,
+ PostgrestError,
+}
diff --git a/node_modules/@supabase/postgrest-js/package.json b/node_modules/@supabase/postgrest-js/package.json
new file mode 100644
index 0000000..87f83bc
--- /dev/null
+++ b/node_modules/@supabase/postgrest-js/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "@supabase/postgrest-js",
+ "version": "1.18.1",
+ "description": "Isomorphic PostgREST client",
+ "keywords": [
+ "postgrest",
+ "supabase"
+ ],
+ "homepage": "https://github.com/supabase/postgrest-js",
+ "bugs": "https://github.com/supabase/postgrest-js/issues",
+ "license": "MIT",
+ "author": "Supabase",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "main": "dist/cjs/index.js",
+ "module": "dist/esm/wrapper.mjs",
+ "exports": {
+ "import": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/esm/wrapper.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/cjs/index.js"
+ }
+ },
+ "types": "./dist/cjs/index.d.ts",
+ "repository": "supabase/postgrest-js",
+ "scripts": {
+ "clean": "rimraf dist docs/v2",
+ "format": "prettier --write \"{src,test}/**/*.ts\" wrapper.mjs",
+ "format:check": "prettier --check \"{src,test}/**/*.ts\"",
+ "build": "run-s clean format build:*",
+ "build:cjs": "tsc -p tsconfig.json",
+ "build:esm": "cpy wrapper.mjs dist/esm/",
+ "docs": "typedoc src/index.ts --out docs/v2",
+ "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals src/index.ts",
+ "test": "run-s format:check test:types db:clean db:run test:run db:clean && node test/smoke.cjs && node test/smoke.mjs",
+ "test:run": "jest --runInBand --coverage",
+ "test:update": "run-s db:clean db:run && jest --runInBand --updateSnapshot && run-s db:clean",
+ "test:types": "run-s build && tsd --files 'test/**/*.test-d.ts'",
+ "db:clean": "cd test/db && docker compose down --volumes",
+ "db:run": "cd test/db && docker compose up --detach && wait-for-localhost 3000"
+ },
+ "dependencies": {
+ "@supabase/node-fetch": "^2.6.14"
+ },
+ "devDependencies": {
+ "@types/jest": "^27.5.1",
+ "cpy-cli": "^5.0.0",
+ "jest": "^28.1.0",
+ "node-abort-controller": "^3.0.1",
+ "npm-run-all": "^4.1.5",
+ "prettier": "^2.6.2",
+ "rimraf": "^3.0.2",
+ "semantic-release-plugin-update-version-in-files": "^1.1.0",
+ "ts-expect": "^1.3.0",
+ "ts-jest": "^28.0.3",
+ "tsd": "^0.31.2",
+ "type-fest": "^4.32.0",
+ "typedoc": "^0.22.16",
+ "typescript": "^4.5.5",
+ "wait-for-localhost-cli": "^3.0.0"
+ }
+}
diff --git a/node_modules/@supabase/realtime-js/LICENSE.md b/node_modules/@supabase/realtime-js/LICENSE.md
new file mode 100644
index 0000000..163f9b7
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/LICENSE.md
@@ -0,0 +1,22 @@
+# MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@supabase/realtime-js/README.md b/node_modules/@supabase/realtime-js/README.md
new file mode 100644
index 0000000..1a62c28
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/README.md
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
Supabase Realtime Client
+
+ Send ephemeral messages with Broadcast , track and synchronize state with Presence , and listen to database changes with Postgres Change Data Capture (CDC) .
+
+
+ Guides
+ ·
+ Reference Docs
+ ·
+ Multiplayer Demo
+
+
+
+# Overview
+
+This client enables you to use the following Supabase Realtime's features:
+
+- **Broadcast**: send ephemeral messages from client to clients with minimal latency. Use cases include sharing cursor positions between users.
+- **Presence**: track and synchronize shared state across clients with the help of CRDTs. Use cases include tracking which users are currently viewing a specific webpage.
+- **Postgres Change Data Capture (CDC)**: listen for changes in your PostgreSQL database and send them to clients.
+
+# Usage
+
+## Installing the Package
+
+```bash
+npm install @supabase/realtime-js
+```
+
+## Creating a Channel
+
+```js
+import { RealtimeClient } from '@supabase/realtime-js'
+
+const client = new RealtimeClient(REALTIME_URL, {
+ params: {
+ apikey: API_KEY
+ },
+})
+
+const channel = client.channel('test-channel', {})
+
+channel.subscribe((status, err) => {
+ if (status === 'SUBSCRIBED') {
+ console.log('Connected!')
+ }
+
+ if (status === 'CHANNEL_ERROR') {
+ console.log(`There was an error subscribing to channel: ${err.message}`)
+ }
+
+ if (status === 'TIMED_OUT') {
+ console.log('Realtime server did not respond in time.')
+ }
+
+ if (status === 'CLOSED') {
+ console.log('Realtime channel was unexpectedly closed.')
+ }
+})
+```
+
+### Notes:
+
+- `REALTIME_URL` is `'ws://localhost:4000/socket'` when developing locally and `'wss://.supabase.co/realtime/v1'` when connecting to your Supabase project.
+- `API_KEY` is a JWT whose claims must contain `exp` and `role` (existing database role).
+- Channel name can be any `string`.
+
+## Broadcast
+
+Your client can send and receive messages based on the `event`.
+
+```js
+// Setup...
+
+const channel = client.channel('broadcast-test', { broadcast: { ack: false, self: false } })
+
+channel.on('broadcast', { event: 'some-event' }, (payload) =>
+ console.log(payload)
+)
+
+channel.subscribe(async (status) => {
+ if (status === 'SUBSCRIBED') {
+ // Send message to other clients listening to 'broadcast-test' channel
+ await channel.send({
+ type: 'broadcast',
+ event: 'some-event',
+ payload: { hello: 'world' },
+ })
+ }
+})
+```
+
+### Notes:
+
+- Setting `ack` to `true` means that the `channel.send` promise will resolve once server replies with acknowledgement that it received the broadcast message request.
+- Setting `self` to `true` means that the client will receive the broadcast message it sent out.
+- Setting `private` to `true` means that the client will use RLS to determine if the user can connect or not to a given channel.
+
+## Presence
+
+Your client can track and sync state that's stored in the channel.
+
+```js
+// Setup...
+
+const channel = client.channel(
+ 'presence-test',
+ {
+ config: {
+ presence: {
+ key: ''
+ }
+ }
+ }
+)
+
+channel.on('presence', { event: 'sync' }, () => {
+ console.log('Online users: ', channel.presenceState())
+})
+
+channel.on('presence', { event: 'join' }, ({ newPresences }) => {
+ console.log('New users have joined: ', newPresences)
+})
+
+channel.on('presence', { event: 'leave' }, ({ leftPresences }) => {
+ console.log('Users have left: ', leftPresences)
+})
+
+channel.subscribe(async (status) => {
+ if (status === 'SUBSCRIBED') {
+ const status = await channel.track({ 'user_id': 1 })
+ console.log(status)
+ }
+})
+```
+
+## Postgres CDC
+
+Receive database changes on the client.
+
+```js
+// Setup...
+
+const channel = client.channel('db-changes')
+
+channel.on('postgres_changes', { event: '*', schema: 'public' }, (payload) => {
+ console.log('All changes in public schema: ', payload)
+})
+
+channel.on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'messages' }, (payload) => {
+ console.log('All inserts in messages table: ', payload)
+})
+
+channel.on('postgres_changes', { event: 'UPDATE', schema: 'public', table: 'users', filter: 'username=eq.Realtime' }, (payload) => {
+ console.log('All updates on users table when username is Realtime: ', payload)
+})
+
+channel.subscribe(async (status) => {
+ if (status === 'SUBSCRIBED') {
+ console.log('Ready to receive database changes!')
+ }
+})
+```
+
+## Get All Channels
+
+You can see all the channels that your client has instantiatied.
+
+```js
+// Setup...
+
+client.getChannels()
+```
+
+## Cleanup
+
+It is highly recommended that you clean up your channels after you're done with them.
+
+- Remove a single channel
+
+```js
+// Setup...
+
+const channel = client.channel('some-channel-to-remove')
+
+channel.subscribe()
+
+client.removeChannel(channel)
+```
+
+- Remove all channels
+
+```js
+// Setup...
+
+const channel1 = client.channel('a-channel-to-remove')
+const channel2 = client.channel('another-channel-to-remove')
+
+channel1.subscribe()
+channel2.subscribe()
+
+client.removeAllChannels()
+```
+
+## Credits
+
+This repo draws heavily from [phoenix-js](https://github.com/phoenixframework/phoenix/tree/master/assets/js/phoenix).
+
+## License
+
+MIT.
diff --git a/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js b/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js
new file mode 100644
index 0000000..3e1f71e
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js
@@ -0,0 +1,528 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_LISTEN_TYPES = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = void 0;
+const constants_1 = require("./lib/constants");
+const push_1 = __importDefault(require("./lib/push"));
+const timer_1 = __importDefault(require("./lib/timer"));
+const RealtimePresence_1 = __importDefault(require("./RealtimePresence"));
+const Transformers = __importStar(require("./lib/transformers"));
+const transformers_1 = require("./lib/transformers");
+var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
+(function (REALTIME_POSTGRES_CHANGES_LISTEN_EVENT) {
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["ALL"] = "*";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["INSERT"] = "INSERT";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["UPDATE"] = "UPDATE";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["DELETE"] = "DELETE";
+})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT || (exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = {}));
+var REALTIME_LISTEN_TYPES;
+(function (REALTIME_LISTEN_TYPES) {
+ REALTIME_LISTEN_TYPES["BROADCAST"] = "broadcast";
+ REALTIME_LISTEN_TYPES["PRESENCE"] = "presence";
+ REALTIME_LISTEN_TYPES["POSTGRES_CHANGES"] = "postgres_changes";
+ REALTIME_LISTEN_TYPES["SYSTEM"] = "system";
+})(REALTIME_LISTEN_TYPES = exports.REALTIME_LISTEN_TYPES || (exports.REALTIME_LISTEN_TYPES = {}));
+var REALTIME_SUBSCRIBE_STATES;
+(function (REALTIME_SUBSCRIBE_STATES) {
+ REALTIME_SUBSCRIBE_STATES["SUBSCRIBED"] = "SUBSCRIBED";
+ REALTIME_SUBSCRIBE_STATES["TIMED_OUT"] = "TIMED_OUT";
+ REALTIME_SUBSCRIBE_STATES["CLOSED"] = "CLOSED";
+ REALTIME_SUBSCRIBE_STATES["CHANNEL_ERROR"] = "CHANNEL_ERROR";
+})(REALTIME_SUBSCRIBE_STATES = exports.REALTIME_SUBSCRIBE_STATES || (exports.REALTIME_SUBSCRIBE_STATES = {}));
+exports.REALTIME_CHANNEL_STATES = constants_1.CHANNEL_STATES;
+/** A channel is the basic building block of Realtime
+ * and narrows the scope of data flow to subscribed clients.
+ * You can think of a channel as a chatroom where participants are able to see who's online
+ * and send and receive messages.
+ */
+class RealtimeChannel {
+ constructor(
+ /** Topic name can be any string. */
+ topic, params = { config: {} }, socket) {
+ this.topic = topic;
+ this.params = params;
+ this.socket = socket;
+ this.bindings = {};
+ this.state = constants_1.CHANNEL_STATES.closed;
+ this.joinedOnce = false;
+ this.pushBuffer = [];
+ this.subTopic = topic.replace(/^realtime:/i, '');
+ this.params.config = Object.assign({
+ broadcast: { ack: false, self: false },
+ presence: { key: '' },
+ private: false,
+ }, params.config);
+ this.timeout = this.socket.timeout;
+ this.joinPush = new push_1.default(this, constants_1.CHANNEL_EVENTS.join, this.params, this.timeout);
+ this.rejoinTimer = new timer_1.default(() => this._rejoinUntilConnected(), this.socket.reconnectAfterMs);
+ this.joinPush.receive('ok', () => {
+ this.state = constants_1.CHANNEL_STATES.joined;
+ this.rejoinTimer.reset();
+ this.pushBuffer.forEach((pushEvent) => pushEvent.send());
+ this.pushBuffer = [];
+ });
+ this._onClose(() => {
+ this.rejoinTimer.reset();
+ this.socket.log('channel', `close ${this.topic} ${this._joinRef()}`);
+ this.state = constants_1.CHANNEL_STATES.closed;
+ this.socket._remove(this);
+ });
+ this._onError((reason) => {
+ if (this._isLeaving() || this._isClosed()) {
+ return;
+ }
+ this.socket.log('channel', `error ${this.topic}`, reason);
+ this.state = constants_1.CHANNEL_STATES.errored;
+ this.rejoinTimer.scheduleTimeout();
+ });
+ this.joinPush.receive('timeout', () => {
+ if (!this._isJoining()) {
+ return;
+ }
+ this.socket.log('channel', `timeout ${this.topic}`, this.joinPush.timeout);
+ this.state = constants_1.CHANNEL_STATES.errored;
+ this.rejoinTimer.scheduleTimeout();
+ });
+ this._on(constants_1.CHANNEL_EVENTS.reply, {}, (payload, ref) => {
+ this._trigger(this._replyEventName(ref), payload);
+ });
+ this.presence = new RealtimePresence_1.default(this);
+ this.broadcastEndpointURL =
+ (0, transformers_1.httpEndpointURL)(this.socket.endPoint) + '/api/broadcast';
+ this.private = this.params.config.private || false;
+ }
+ /** Subscribe registers your client with the server */
+ subscribe(callback, timeout = this.timeout) {
+ var _a, _b;
+ if (!this.socket.isConnected()) {
+ this.socket.connect();
+ }
+ if (this.joinedOnce) {
+ throw `tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance`;
+ }
+ else {
+ const { config: { broadcast, presence, private: isPrivate }, } = this.params;
+ this._onError((e) => callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, e));
+ this._onClose(() => callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CLOSED));
+ const accessTokenPayload = {};
+ const config = {
+ broadcast,
+ presence,
+ postgres_changes: (_b = (_a = this.bindings.postgres_changes) === null || _a === void 0 ? void 0 : _a.map((r) => r.filter)) !== null && _b !== void 0 ? _b : [],
+ private: isPrivate,
+ };
+ if (this.socket.accessTokenValue) {
+ accessTokenPayload.access_token = this.socket.accessTokenValue;
+ }
+ this.updateJoinPayload(Object.assign({ config }, accessTokenPayload));
+ this.joinedOnce = true;
+ this._rejoin(timeout);
+ this.joinPush
+ .receive('ok', async ({ postgres_changes }) => {
+ var _a;
+ this.socket.setAuth();
+ if (postgres_changes === undefined) {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
+ return;
+ }
+ else {
+ const clientPostgresBindings = this.bindings.postgres_changes;
+ const bindingsLen = (_a = clientPostgresBindings === null || clientPostgresBindings === void 0 ? void 0 : clientPostgresBindings.length) !== null && _a !== void 0 ? _a : 0;
+ const newPostgresBindings = [];
+ for (let i = 0; i < bindingsLen; i++) {
+ const clientPostgresBinding = clientPostgresBindings[i];
+ const { filter: { event, schema, table, filter }, } = clientPostgresBinding;
+ const serverPostgresFilter = postgres_changes && postgres_changes[i];
+ if (serverPostgresFilter &&
+ serverPostgresFilter.event === event &&
+ serverPostgresFilter.schema === schema &&
+ serverPostgresFilter.table === table &&
+ serverPostgresFilter.filter === filter) {
+ newPostgresBindings.push(Object.assign(Object.assign({}, clientPostgresBinding), { id: serverPostgresFilter.id }));
+ }
+ else {
+ this.unsubscribe();
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error('mismatch between server and client bindings for postgres changes'));
+ return;
+ }
+ }
+ this.bindings.postgres_changes = newPostgresBindings;
+ callback && callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
+ return;
+ }
+ })
+ .receive('error', (error) => {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error(JSON.stringify(Object.values(error).join(', ') || 'error')));
+ return;
+ })
+ .receive('timeout', () => {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.TIMED_OUT);
+ return;
+ });
+ }
+ return this;
+ }
+ presenceState() {
+ return this.presence.state;
+ }
+ async track(payload, opts = {}) {
+ return await this.send({
+ type: 'presence',
+ event: 'track',
+ payload,
+ }, opts.timeout || this.timeout);
+ }
+ async untrack(opts = {}) {
+ return await this.send({
+ type: 'presence',
+ event: 'untrack',
+ }, opts);
+ }
+ on(type, filter, callback) {
+ return this._on(type, filter, callback);
+ }
+ /**
+ * Sends a message into the channel.
+ *
+ * @param args Arguments to send to channel
+ * @param args.type The type of event to send
+ * @param args.event The name of the event being sent
+ * @param args.payload Payload to be sent
+ * @param opts Options to be used during the send process
+ */
+ async send(args, opts = {}) {
+ var _a, _b;
+ if (!this._canPush() && args.type === 'broadcast') {
+ const { event, payload: endpoint_payload } = args;
+ const authorization = this.socket.accessTokenValue
+ ? `Bearer ${this.socket.accessTokenValue}`
+ : '';
+ const options = {
+ method: 'POST',
+ headers: {
+ Authorization: authorization,
+ apikey: this.socket.apiKey ? this.socket.apiKey : '',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ messages: [
+ {
+ topic: this.subTopic,
+ event,
+ payload: endpoint_payload,
+ private: this.private,
+ },
+ ],
+ }),
+ };
+ try {
+ const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
+ await ((_b = response.body) === null || _b === void 0 ? void 0 : _b.cancel());
+ return response.ok ? 'ok' : 'error';
+ }
+ catch (error) {
+ if (error.name === 'AbortError') {
+ return 'timed out';
+ }
+ else {
+ return 'error';
+ }
+ }
+ }
+ else {
+ return new Promise((resolve) => {
+ var _a, _b, _c;
+ const push = this._push(args.type, args, opts.timeout || this.timeout);
+ if (args.type === 'broadcast' && !((_c = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.broadcast) === null || _c === void 0 ? void 0 : _c.ack)) {
+ resolve('ok');
+ }
+ push.receive('ok', () => resolve('ok'));
+ push.receive('error', () => resolve('error'));
+ push.receive('timeout', () => resolve('timed out'));
+ });
+ }
+ }
+ updateJoinPayload(payload) {
+ this.joinPush.updatePayload(payload);
+ }
+ /**
+ * Leaves the channel.
+ *
+ * Unsubscribes from server events, and instructs channel to terminate on server.
+ * Triggers onClose() hooks.
+ *
+ * To receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:
+ * channel.unsubscribe().receive("ok", () => alert("left!") )
+ */
+ unsubscribe(timeout = this.timeout) {
+ this.state = constants_1.CHANNEL_STATES.leaving;
+ const onClose = () => {
+ this.socket.log('channel', `leave ${this.topic}`);
+ this._trigger(constants_1.CHANNEL_EVENTS.close, 'leave', this._joinRef());
+ };
+ this.rejoinTimer.reset();
+ // Destroy joinPush to avoid connection timeouts during unscription phase
+ this.joinPush.destroy();
+ return new Promise((resolve) => {
+ const leavePush = new push_1.default(this, constants_1.CHANNEL_EVENTS.leave, {}, timeout);
+ leavePush
+ .receive('ok', () => {
+ onClose();
+ resolve('ok');
+ })
+ .receive('timeout', () => {
+ onClose();
+ resolve('timed out');
+ })
+ .receive('error', () => {
+ resolve('error');
+ });
+ leavePush.send();
+ if (!this._canPush()) {
+ leavePush.trigger('ok', {});
+ }
+ });
+ }
+ /** @internal */
+ async _fetchWithTimeout(url, options, timeout) {
+ const controller = new AbortController();
+ const id = setTimeout(() => controller.abort(), timeout);
+ const response = await this.socket.fetch(url, Object.assign(Object.assign({}, options), { signal: controller.signal }));
+ clearTimeout(id);
+ return response;
+ }
+ /** @internal */
+ _push(event, payload, timeout = this.timeout) {
+ if (!this.joinedOnce) {
+ throw `tried to push '${event}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;
+ }
+ let pushEvent = new push_1.default(this, event, payload, timeout);
+ if (this._canPush()) {
+ pushEvent.send();
+ }
+ else {
+ pushEvent.startTimeout();
+ this.pushBuffer.push(pushEvent);
+ }
+ return pushEvent;
+ }
+ /**
+ * Overridable message hook
+ *
+ * Receives all events for specialized message handling before dispatching to the channel callbacks.
+ * Must return the payload, modified or unmodified.
+ *
+ * @internal
+ */
+ _onMessage(_event, payload, _ref) {
+ return payload;
+ }
+ /** @internal */
+ _isMember(topic) {
+ return this.topic === topic;
+ }
+ /** @internal */
+ _joinRef() {
+ return this.joinPush.ref;
+ }
+ /** @internal */
+ _trigger(type, payload, ref) {
+ var _a, _b;
+ const typeLower = type.toLocaleLowerCase();
+ const { close, error, leave, join } = constants_1.CHANNEL_EVENTS;
+ const events = [close, error, leave, join];
+ if (ref && events.indexOf(typeLower) >= 0 && ref !== this._joinRef()) {
+ return;
+ }
+ let handledPayload = this._onMessage(typeLower, payload, ref);
+ if (payload && !handledPayload) {
+ throw 'channel onMessage callbacks must return the payload, modified or unmodified';
+ }
+ if (['insert', 'update', 'delete'].includes(typeLower)) {
+ (_a = this.bindings.postgres_changes) === null || _a === void 0 ? void 0 : _a.filter((bind) => {
+ var _a, _b, _c;
+ return (((_a = bind.filter) === null || _a === void 0 ? void 0 : _a.event) === '*' ||
+ ((_c = (_b = bind.filter) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.toLocaleLowerCase()) === typeLower);
+ }).map((bind) => bind.callback(handledPayload, ref));
+ }
+ else {
+ (_b = this.bindings[typeLower]) === null || _b === void 0 ? void 0 : _b.filter((bind) => {
+ var _a, _b, _c, _d, _e, _f;
+ if (['broadcast', 'presence', 'postgres_changes'].includes(typeLower)) {
+ if ('id' in bind) {
+ const bindId = bind.id;
+ const bindEvent = (_a = bind.filter) === null || _a === void 0 ? void 0 : _a.event;
+ return (bindId &&
+ ((_b = payload.ids) === null || _b === void 0 ? void 0 : _b.includes(bindId)) &&
+ (bindEvent === '*' ||
+ (bindEvent === null || bindEvent === void 0 ? void 0 : bindEvent.toLocaleLowerCase()) ===
+ ((_c = payload.data) === null || _c === void 0 ? void 0 : _c.type.toLocaleLowerCase())));
+ }
+ else {
+ const bindEvent = (_e = (_d = bind === null || bind === void 0 ? void 0 : bind.filter) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.toLocaleLowerCase();
+ return (bindEvent === '*' ||
+ bindEvent === ((_f = payload === null || payload === void 0 ? void 0 : payload.event) === null || _f === void 0 ? void 0 : _f.toLocaleLowerCase()));
+ }
+ }
+ else {
+ return bind.type.toLocaleLowerCase() === typeLower;
+ }
+ }).map((bind) => {
+ if (typeof handledPayload === 'object' && 'ids' in handledPayload) {
+ const postgresChanges = handledPayload.data;
+ const { schema, table, commit_timestamp, type, errors } = postgresChanges;
+ const enrichedPayload = {
+ schema: schema,
+ table: table,
+ commit_timestamp: commit_timestamp,
+ eventType: type,
+ new: {},
+ old: {},
+ errors: errors,
+ };
+ handledPayload = Object.assign(Object.assign({}, enrichedPayload), this._getPayloadRecords(postgresChanges));
+ }
+ bind.callback(handledPayload, ref);
+ });
+ }
+ }
+ /** @internal */
+ _isClosed() {
+ return this.state === constants_1.CHANNEL_STATES.closed;
+ }
+ /** @internal */
+ _isJoined() {
+ return this.state === constants_1.CHANNEL_STATES.joined;
+ }
+ /** @internal */
+ _isJoining() {
+ return this.state === constants_1.CHANNEL_STATES.joining;
+ }
+ /** @internal */
+ _isLeaving() {
+ return this.state === constants_1.CHANNEL_STATES.leaving;
+ }
+ /** @internal */
+ _replyEventName(ref) {
+ return `chan_reply_${ref}`;
+ }
+ /** @internal */
+ _on(type, filter, callback) {
+ const typeLower = type.toLocaleLowerCase();
+ const binding = {
+ type: typeLower,
+ filter: filter,
+ callback: callback,
+ };
+ if (this.bindings[typeLower]) {
+ this.bindings[typeLower].push(binding);
+ }
+ else {
+ this.bindings[typeLower] = [binding];
+ }
+ return this;
+ }
+ /** @internal */
+ _off(type, filter) {
+ const typeLower = type.toLocaleLowerCase();
+ this.bindings[typeLower] = this.bindings[typeLower].filter((bind) => {
+ var _a;
+ return !(((_a = bind.type) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === typeLower &&
+ RealtimeChannel.isEqual(bind.filter, filter));
+ });
+ return this;
+ }
+ /** @internal */
+ static isEqual(obj1, obj2) {
+ if (Object.keys(obj1).length !== Object.keys(obj2).length) {
+ return false;
+ }
+ for (const k in obj1) {
+ if (obj1[k] !== obj2[k]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /** @internal */
+ _rejoinUntilConnected() {
+ this.rejoinTimer.scheduleTimeout();
+ if (this.socket.isConnected()) {
+ this._rejoin();
+ }
+ }
+ /**
+ * Registers a callback that will be executed when the channel closes.
+ *
+ * @internal
+ */
+ _onClose(callback) {
+ this._on(constants_1.CHANNEL_EVENTS.close, {}, callback);
+ }
+ /**
+ * Registers a callback that will be executed when the channel encounteres an error.
+ *
+ * @internal
+ */
+ _onError(callback) {
+ this._on(constants_1.CHANNEL_EVENTS.error, {}, (reason) => callback(reason));
+ }
+ /**
+ * Returns `true` if the socket is connected and the channel has been joined.
+ *
+ * @internal
+ */
+ _canPush() {
+ return this.socket.isConnected() && this._isJoined();
+ }
+ /** @internal */
+ _rejoin(timeout = this.timeout) {
+ if (this._isLeaving()) {
+ return;
+ }
+ this.socket._leaveOpenTopic(this.topic);
+ this.state = constants_1.CHANNEL_STATES.joining;
+ this.joinPush.resend(timeout);
+ }
+ /** @internal */
+ _getPayloadRecords(payload) {
+ const records = {
+ new: {},
+ old: {},
+ };
+ if (payload.type === 'INSERT' || payload.type === 'UPDATE') {
+ records.new = Transformers.convertChangeData(payload.columns, payload.record);
+ }
+ if (payload.type === 'UPDATE' || payload.type === 'DELETE') {
+ records.old = Transformers.convertChangeData(payload.columns, payload.old_record);
+ }
+ return records;
+ }
+}
+exports.default = RealtimeChannel;
+//# sourceMappingURL=RealtimeChannel.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js b/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js
new file mode 100644
index 0000000..e0c43db
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js
@@ -0,0 +1,514 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const constants_1 = require("./lib/constants");
+const serializer_1 = __importDefault(require("./lib/serializer"));
+const timer_1 = __importDefault(require("./lib/timer"));
+const transformers_1 = require("./lib/transformers");
+const RealtimeChannel_1 = __importDefault(require("./RealtimeChannel"));
+const noop = () => { };
+const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined';
+const WORKER_SCRIPT = `
+ addEventListener("message", (e) => {
+ if (e.data.event === "start") {
+ setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
+ }
+ });`;
+class RealtimeClient {
+ /**
+ * Initializes the Socket.
+ *
+ * @param endPoint The string WebSocket endpoint, ie, "ws://example.com/socket", "wss://example.com", "/socket" (inherited host & protocol)
+ * @param httpEndpoint The string HTTP endpoint, ie, "https://example.com", "/" (inherited host & protocol)
+ * @param options.transport The Websocket Transport, for example WebSocket.
+ * @param options.timeout The default timeout in milliseconds to trigger push timeouts.
+ * @param options.params The optional params to pass when connecting.
+ * @param options.headers The optional headers to pass when connecting.
+ * @param options.heartbeatIntervalMs The millisec interval to send a heartbeat message.
+ * @param options.logger The optional function for specialized logging, ie: logger: (kind, msg, data) => { console.log(`${kind}: ${msg}`, data) }
+ * @param options.encode The function to encode outgoing messages. Defaults to JSON: (payload, callback) => callback(JSON.stringify(payload))
+ * @param options.decode The function to decode incoming messages. Defaults to Serializer's decode.
+ * @param options.reconnectAfterMs he optional function that returns the millsec reconnect interval. Defaults to stepped backoff off.
+ * @param options.worker Use Web Worker to set a side flow. Defaults to false.
+ * @param options.workerUrl The URL of the worker script. Defaults to https://realtime.supabase.com/worker.js that includes a heartbeat event call to keep the connection alive.
+ */
+ constructor(endPoint, options) {
+ var _a;
+ this.accessTokenValue = null;
+ this.apiKey = null;
+ this.channels = [];
+ this.endPoint = '';
+ this.httpEndpoint = '';
+ this.headers = constants_1.DEFAULT_HEADERS;
+ this.params = {};
+ this.timeout = constants_1.DEFAULT_TIMEOUT;
+ this.heartbeatIntervalMs = 30000;
+ this.heartbeatTimer = undefined;
+ this.pendingHeartbeatRef = null;
+ this.ref = 0;
+ this.logger = noop;
+ this.conn = null;
+ this.sendBuffer = [];
+ this.serializer = new serializer_1.default();
+ this.stateChangeCallbacks = {
+ open: [],
+ close: [],
+ error: [],
+ message: [],
+ };
+ this.accessToken = null;
+ /**
+ * Use either custom fetch, if provided, or default fetch to make HTTP requests
+ *
+ * @internal
+ */
+ this._resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => Promise.resolve().then(() => __importStar(require('@supabase/node-fetch'))).then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+ };
+ this.endPoint = `${endPoint}/${constants_1.TRANSPORTS.websocket}`;
+ this.httpEndpoint = (0, transformers_1.httpEndpointURL)(endPoint);
+ if (options === null || options === void 0 ? void 0 : options.transport) {
+ this.transport = options.transport;
+ }
+ else {
+ this.transport = null;
+ }
+ if (options === null || options === void 0 ? void 0 : options.params)
+ this.params = options.params;
+ if (options === null || options === void 0 ? void 0 : options.headers)
+ this.headers = Object.assign(Object.assign({}, this.headers), options.headers);
+ if (options === null || options === void 0 ? void 0 : options.timeout)
+ this.timeout = options.timeout;
+ if (options === null || options === void 0 ? void 0 : options.logger)
+ this.logger = options.logger;
+ if (options === null || options === void 0 ? void 0 : options.heartbeatIntervalMs)
+ this.heartbeatIntervalMs = options.heartbeatIntervalMs;
+ const accessTokenValue = (_a = options === null || options === void 0 ? void 0 : options.params) === null || _a === void 0 ? void 0 : _a.apikey;
+ if (accessTokenValue) {
+ this.accessTokenValue = accessTokenValue;
+ this.apiKey = accessTokenValue;
+ }
+ this.reconnectAfterMs = (options === null || options === void 0 ? void 0 : options.reconnectAfterMs)
+ ? options.reconnectAfterMs
+ : (tries) => {
+ return [1000, 2000, 5000, 10000][tries - 1] || 10000;
+ };
+ this.encode = (options === null || options === void 0 ? void 0 : options.encode)
+ ? options.encode
+ : (payload, callback) => {
+ return callback(JSON.stringify(payload));
+ };
+ this.decode = (options === null || options === void 0 ? void 0 : options.decode)
+ ? options.decode
+ : this.serializer.decode.bind(this.serializer);
+ this.reconnectTimer = new timer_1.default(async () => {
+ this.disconnect();
+ this.connect();
+ }, this.reconnectAfterMs);
+ this.fetch = this._resolveFetch(options === null || options === void 0 ? void 0 : options.fetch);
+ if (options === null || options === void 0 ? void 0 : options.worker) {
+ if (typeof window !== 'undefined' && !window.Worker) {
+ throw new Error('Web Worker is not supported');
+ }
+ this.worker = (options === null || options === void 0 ? void 0 : options.worker) || false;
+ this.workerUrl = options === null || options === void 0 ? void 0 : options.workerUrl;
+ }
+ this.accessToken = (options === null || options === void 0 ? void 0 : options.accessToken) || null;
+ }
+ /**
+ * Connects the socket, unless already connected.
+ */
+ connect() {
+ if (this.conn) {
+ return;
+ }
+ if (this.transport) {
+ this.conn = new this.transport(this.endpointURL(), undefined, {
+ headers: this.headers,
+ });
+ return;
+ }
+ if (NATIVE_WEBSOCKET_AVAILABLE) {
+ this.conn = new WebSocket(this.endpointURL());
+ this.setupConnection();
+ return;
+ }
+ this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, {
+ close: () => {
+ this.conn = null;
+ },
+ });
+ Promise.resolve().then(() => __importStar(require('ws'))).then(({ default: WS }) => {
+ this.conn = new WS(this.endpointURL(), undefined, {
+ headers: this.headers,
+ });
+ this.setupConnection();
+ });
+ }
+ /**
+ * Returns the URL of the websocket.
+ * @returns string The URL of the websocket.
+ */
+ endpointURL() {
+ return this._appendParams(this.endPoint, Object.assign({}, this.params, { vsn: constants_1.VSN }));
+ }
+ /**
+ * Disconnects the socket.
+ *
+ * @param code A numeric status code to send on disconnect.
+ * @param reason A custom reason for the disconnect.
+ */
+ disconnect(code, reason) {
+ if (this.conn) {
+ this.conn.onclose = function () { }; // noop
+ if (code) {
+ this.conn.close(code, reason !== null && reason !== void 0 ? reason : '');
+ }
+ else {
+ this.conn.close();
+ }
+ this.conn = null;
+ // remove open handles
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.reconnectTimer.reset();
+ }
+ }
+ /**
+ * Returns all created channels
+ */
+ getChannels() {
+ return this.channels;
+ }
+ /**
+ * Unsubscribes and removes a single channel
+ * @param channel A RealtimeChannel instance
+ */
+ async removeChannel(channel) {
+ const status = await channel.unsubscribe();
+ if (this.channels.length === 0) {
+ this.disconnect();
+ }
+ return status;
+ }
+ /**
+ * Unsubscribes and removes all channels
+ */
+ async removeAllChannels() {
+ const values_1 = await Promise.all(this.channels.map((channel) => channel.unsubscribe()));
+ this.disconnect();
+ return values_1;
+ }
+ /**
+ * Logs the message.
+ *
+ * For customized logging, `this.logger` can be overridden.
+ */
+ log(kind, msg, data) {
+ this.logger(kind, msg, data);
+ }
+ /**
+ * Returns the current state of the socket.
+ */
+ connectionState() {
+ switch (this.conn && this.conn.readyState) {
+ case constants_1.SOCKET_STATES.connecting:
+ return constants_1.CONNECTION_STATE.Connecting;
+ case constants_1.SOCKET_STATES.open:
+ return constants_1.CONNECTION_STATE.Open;
+ case constants_1.SOCKET_STATES.closing:
+ return constants_1.CONNECTION_STATE.Closing;
+ default:
+ return constants_1.CONNECTION_STATE.Closed;
+ }
+ }
+ /**
+ * Returns `true` is the connection is open.
+ */
+ isConnected() {
+ return this.connectionState() === constants_1.CONNECTION_STATE.Open;
+ }
+ channel(topic, params = { config: {} }) {
+ const chan = new RealtimeChannel_1.default(`realtime:${topic}`, params, this);
+ this.channels.push(chan);
+ return chan;
+ }
+ /**
+ * Push out a message if the socket is connected.
+ *
+ * If the socket is not connected, the message gets enqueued within a local buffer, and sent out when a connection is next established.
+ */
+ push(data) {
+ const { topic, event, payload, ref } = data;
+ const callback = () => {
+ this.encode(data, (result) => {
+ var _a;
+ (_a = this.conn) === null || _a === void 0 ? void 0 : _a.send(result);
+ });
+ };
+ this.log('push', `${topic} ${event} (${ref})`, payload);
+ if (this.isConnected()) {
+ callback();
+ }
+ else {
+ this.sendBuffer.push(callback);
+ }
+ }
+ /**
+ * Sets the JWT access token used for channel subscription authorization and Realtime RLS.
+ *
+ * If param is null it will use the `accessToken` callback function or the token set on the client.
+ *
+ * On callback used, it will set the value of the token internal to the client.
+ *
+ * @param token A JWT string to override the token set on the client.
+ */
+ async setAuth(token = null) {
+ let tokenToSend = token ||
+ (this.accessToken && (await this.accessToken())) ||
+ this.accessTokenValue;
+ if (tokenToSend) {
+ let parsed = null;
+ try {
+ parsed = JSON.parse(atob(tokenToSend.split('.')[1]));
+ }
+ catch (_error) { }
+ if (parsed && parsed.exp) {
+ let now = Math.floor(Date.now() / 1000);
+ let valid = now - parsed.exp < 0;
+ if (!valid) {
+ this.log('auth', `InvalidJWTToken: Invalid value for JWT claim "exp" with value ${parsed.exp}`);
+ return Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${parsed.exp}`);
+ }
+ }
+ this.accessTokenValue = tokenToSend;
+ this.channels.forEach((channel) => {
+ tokenToSend && channel.updateJoinPayload({ access_token: tokenToSend });
+ if (channel.joinedOnce && channel._isJoined()) {
+ channel._push(constants_1.CHANNEL_EVENTS.access_token, {
+ access_token: tokenToSend,
+ });
+ }
+ });
+ }
+ }
+ /**
+ * Sends a heartbeat message if the socket is connected.
+ */
+ async sendHeartbeat() {
+ var _a;
+ if (!this.isConnected()) {
+ return;
+ }
+ if (this.pendingHeartbeatRef) {
+ this.pendingHeartbeatRef = null;
+ this.log('transport', 'heartbeat timeout. Attempting to re-establish connection');
+ (_a = this.conn) === null || _a === void 0 ? void 0 : _a.close(constants_1.WS_CLOSE_NORMAL, 'hearbeat timeout');
+ return;
+ }
+ this.pendingHeartbeatRef = this._makeRef();
+ this.push({
+ topic: 'phoenix',
+ event: 'heartbeat',
+ payload: {},
+ ref: this.pendingHeartbeatRef,
+ });
+ this.setAuth();
+ }
+ /**
+ * Flushes send buffer
+ */
+ flushSendBuffer() {
+ if (this.isConnected() && this.sendBuffer.length > 0) {
+ this.sendBuffer.forEach((callback) => callback());
+ this.sendBuffer = [];
+ }
+ }
+ /**
+ * Return the next message ref, accounting for overflows
+ *
+ * @internal
+ */
+ _makeRef() {
+ let newRef = this.ref + 1;
+ if (newRef === this.ref) {
+ this.ref = 0;
+ }
+ else {
+ this.ref = newRef;
+ }
+ return this.ref.toString();
+ }
+ /**
+ * Unsubscribe from channels with the specified topic.
+ *
+ * @internal
+ */
+ _leaveOpenTopic(topic) {
+ let dupChannel = this.channels.find((c) => c.topic === topic && (c._isJoined() || c._isJoining()));
+ if (dupChannel) {
+ this.log('transport', `leaving duplicate topic "${topic}"`);
+ dupChannel.unsubscribe();
+ }
+ }
+ /**
+ * Removes a subscription from the socket.
+ *
+ * @param channel An open subscription.
+ *
+ * @internal
+ */
+ _remove(channel) {
+ this.channels = this.channels.filter((c) => c._joinRef() !== channel._joinRef());
+ }
+ /**
+ * Sets up connection handlers.
+ *
+ * @internal
+ */
+ setupConnection() {
+ if (this.conn) {
+ this.conn.binaryType = 'arraybuffer';
+ this.conn.onopen = () => this._onConnOpen();
+ this.conn.onerror = (error) => this._onConnError(error);
+ this.conn.onmessage = (event) => this._onConnMessage(event);
+ this.conn.onclose = (event) => this._onConnClose(event);
+ }
+ }
+ /** @internal */
+ _onConnMessage(rawMessage) {
+ this.decode(rawMessage.data, (msg) => {
+ let { topic, event, payload, ref } = msg;
+ if (ref && ref === this.pendingHeartbeatRef) {
+ this.pendingHeartbeatRef = null;
+ }
+ this.log('receive', `${payload.status || ''} ${topic} ${event} ${(ref && '(' + ref + ')') || ''}`, payload);
+ this.channels
+ .filter((channel) => channel._isMember(topic))
+ .forEach((channel) => channel._trigger(event, payload, ref));
+ this.stateChangeCallbacks.message.forEach((callback) => callback(msg));
+ });
+ }
+ /** @internal */
+ async _onConnOpen() {
+ this.log('transport', `connected to ${this.endpointURL()}`);
+ this.flushSendBuffer();
+ this.reconnectTimer.reset();
+ if (!this.worker) {
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.heartbeatTimer = setInterval(() => this.sendHeartbeat(), this.heartbeatIntervalMs);
+ }
+ else {
+ if (this.workerUrl) {
+ this.log('worker', `starting worker for from ${this.workerUrl}`);
+ }
+ else {
+ this.log('worker', `starting default worker`);
+ }
+ const objectUrl = this._workerObjectUrl(this.workerUrl);
+ this.workerRef = new Worker(objectUrl);
+ this.workerRef.onerror = (error) => {
+ this.log('worker', 'worker error', error.message);
+ this.workerRef.terminate();
+ };
+ this.workerRef.onmessage = (event) => {
+ if (event.data.event === 'keepAlive') {
+ this.sendHeartbeat();
+ }
+ };
+ this.workerRef.postMessage({
+ event: 'start',
+ interval: this.heartbeatIntervalMs,
+ });
+ }
+ this.stateChangeCallbacks.open.forEach((callback) => callback());
+ }
+ /** @internal */
+ _onConnClose(event) {
+ this.log('transport', 'close', event);
+ this._triggerChanError();
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.reconnectTimer.scheduleTimeout();
+ this.stateChangeCallbacks.close.forEach((callback) => callback(event));
+ }
+ /** @internal */
+ _onConnError(error) {
+ this.log('transport', error.message);
+ this._triggerChanError();
+ this.stateChangeCallbacks.error.forEach((callback) => callback(error));
+ }
+ /** @internal */
+ _triggerChanError() {
+ this.channels.forEach((channel) => channel._trigger(constants_1.CHANNEL_EVENTS.error));
+ }
+ /** @internal */
+ _appendParams(url, params) {
+ if (Object.keys(params).length === 0) {
+ return url;
+ }
+ const prefix = url.match(/\?/) ? '&' : '?';
+ const query = new URLSearchParams(params);
+ return `${url}${prefix}${query}`;
+ }
+ _workerObjectUrl(url) {
+ let result_url;
+ if (url) {
+ result_url = url;
+ }
+ else {
+ const blob = new Blob([WORKER_SCRIPT], { type: 'application/javascript' });
+ result_url = URL.createObjectURL(blob);
+ }
+ return result_url;
+ }
+}
+exports.default = RealtimeClient;
+class WSWebSocketDummy {
+ constructor(address, _protocols, options) {
+ this.binaryType = 'arraybuffer';
+ this.onclose = () => { };
+ this.onerror = () => { };
+ this.onmessage = () => { };
+ this.onopen = () => { };
+ this.readyState = constants_1.SOCKET_STATES.connecting;
+ this.send = () => { };
+ this.url = null;
+ this.url = address;
+ this.close = options.close;
+ }
+}
+//# sourceMappingURL=RealtimeClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js b/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js
new file mode 100644
index 0000000..f9b1f8b
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js
@@ -0,0 +1,228 @@
+"use strict";
+/*
+ This file draws heavily from https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/assets/js/phoenix/presence.js
+ License: https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/LICENSE.md
+*/
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.REALTIME_PRESENCE_LISTEN_EVENTS = void 0;
+var REALTIME_PRESENCE_LISTEN_EVENTS;
+(function (REALTIME_PRESENCE_LISTEN_EVENTS) {
+ REALTIME_PRESENCE_LISTEN_EVENTS["SYNC"] = "sync";
+ REALTIME_PRESENCE_LISTEN_EVENTS["JOIN"] = "join";
+ REALTIME_PRESENCE_LISTEN_EVENTS["LEAVE"] = "leave";
+})(REALTIME_PRESENCE_LISTEN_EVENTS = exports.REALTIME_PRESENCE_LISTEN_EVENTS || (exports.REALTIME_PRESENCE_LISTEN_EVENTS = {}));
+class RealtimePresence {
+ /**
+ * Initializes the Presence.
+ *
+ * @param channel - The RealtimeChannel
+ * @param opts - The options,
+ * for example `{events: {state: 'state', diff: 'diff'}}`
+ */
+ constructor(channel, opts) {
+ this.channel = channel;
+ this.state = {};
+ this.pendingDiffs = [];
+ this.joinRef = null;
+ this.caller = {
+ onJoin: () => { },
+ onLeave: () => { },
+ onSync: () => { },
+ };
+ const events = (opts === null || opts === void 0 ? void 0 : opts.events) || {
+ state: 'presence_state',
+ diff: 'presence_diff',
+ };
+ this.channel._on(events.state, {}, (newState) => {
+ const { onJoin, onLeave, onSync } = this.caller;
+ this.joinRef = this.channel._joinRef();
+ this.state = RealtimePresence.syncState(this.state, newState, onJoin, onLeave);
+ this.pendingDiffs.forEach((diff) => {
+ this.state = RealtimePresence.syncDiff(this.state, diff, onJoin, onLeave);
+ });
+ this.pendingDiffs = [];
+ onSync();
+ });
+ this.channel._on(events.diff, {}, (diff) => {
+ const { onJoin, onLeave, onSync } = this.caller;
+ if (this.inPendingSyncState()) {
+ this.pendingDiffs.push(diff);
+ }
+ else {
+ this.state = RealtimePresence.syncDiff(this.state, diff, onJoin, onLeave);
+ onSync();
+ }
+ });
+ this.onJoin((key, currentPresences, newPresences) => {
+ this.channel._trigger('presence', {
+ event: 'join',
+ key,
+ currentPresences,
+ newPresences,
+ });
+ });
+ this.onLeave((key, currentPresences, leftPresences) => {
+ this.channel._trigger('presence', {
+ event: 'leave',
+ key,
+ currentPresences,
+ leftPresences,
+ });
+ });
+ this.onSync(() => {
+ this.channel._trigger('presence', { event: 'sync' });
+ });
+ }
+ /**
+ * Used to sync the list of presences on the server with the
+ * client's state.
+ *
+ * An optional `onJoin` and `onLeave` callback can be provided to
+ * react to changes in the client's local presences across
+ * disconnects and reconnects with the server.
+ *
+ * @internal
+ */
+ static syncState(currentState, newState, onJoin, onLeave) {
+ const state = this.cloneDeep(currentState);
+ const transformedState = this.transformState(newState);
+ const joins = {};
+ const leaves = {};
+ this.map(state, (key, presences) => {
+ if (!transformedState[key]) {
+ leaves[key] = presences;
+ }
+ });
+ this.map(transformedState, (key, newPresences) => {
+ const currentPresences = state[key];
+ if (currentPresences) {
+ const newPresenceRefs = newPresences.map((m) => m.presence_ref);
+ const curPresenceRefs = currentPresences.map((m) => m.presence_ref);
+ const joinedPresences = newPresences.filter((m) => curPresenceRefs.indexOf(m.presence_ref) < 0);
+ const leftPresences = currentPresences.filter((m) => newPresenceRefs.indexOf(m.presence_ref) < 0);
+ if (joinedPresences.length > 0) {
+ joins[key] = joinedPresences;
+ }
+ if (leftPresences.length > 0) {
+ leaves[key] = leftPresences;
+ }
+ }
+ else {
+ joins[key] = newPresences;
+ }
+ });
+ return this.syncDiff(state, { joins, leaves }, onJoin, onLeave);
+ }
+ /**
+ * Used to sync a diff of presence join and leave events from the
+ * server, as they happen.
+ *
+ * Like `syncState`, `syncDiff` accepts optional `onJoin` and
+ * `onLeave` callbacks to react to a user joining or leaving from a
+ * device.
+ *
+ * @internal
+ */
+ static syncDiff(state, diff, onJoin, onLeave) {
+ const { joins, leaves } = {
+ joins: this.transformState(diff.joins),
+ leaves: this.transformState(diff.leaves),
+ };
+ if (!onJoin) {
+ onJoin = () => { };
+ }
+ if (!onLeave) {
+ onLeave = () => { };
+ }
+ this.map(joins, (key, newPresences) => {
+ var _a;
+ const currentPresences = (_a = state[key]) !== null && _a !== void 0 ? _a : [];
+ state[key] = this.cloneDeep(newPresences);
+ if (currentPresences.length > 0) {
+ const joinedPresenceRefs = state[key].map((m) => m.presence_ref);
+ const curPresences = currentPresences.filter((m) => joinedPresenceRefs.indexOf(m.presence_ref) < 0);
+ state[key].unshift(...curPresences);
+ }
+ onJoin(key, currentPresences, newPresences);
+ });
+ this.map(leaves, (key, leftPresences) => {
+ let currentPresences = state[key];
+ if (!currentPresences)
+ return;
+ const presenceRefsToRemove = leftPresences.map((m) => m.presence_ref);
+ currentPresences = currentPresences.filter((m) => presenceRefsToRemove.indexOf(m.presence_ref) < 0);
+ state[key] = currentPresences;
+ onLeave(key, currentPresences, leftPresences);
+ if (currentPresences.length === 0)
+ delete state[key];
+ });
+ return state;
+ }
+ /** @internal */
+ static map(obj, func) {
+ return Object.getOwnPropertyNames(obj).map((key) => func(key, obj[key]));
+ }
+ /**
+ * Remove 'metas' key
+ * Change 'phx_ref' to 'presence_ref'
+ * Remove 'phx_ref' and 'phx_ref_prev'
+ *
+ * @example
+ * // returns {
+ * abc123: [
+ * { presence_ref: '2', user_id: 1 },
+ * { presence_ref: '3', user_id: 2 }
+ * ]
+ * }
+ * RealtimePresence.transformState({
+ * abc123: {
+ * metas: [
+ * { phx_ref: '2', phx_ref_prev: '1' user_id: 1 },
+ * { phx_ref: '3', user_id: 2 }
+ * ]
+ * }
+ * })
+ *
+ * @internal
+ */
+ static transformState(state) {
+ state = this.cloneDeep(state);
+ return Object.getOwnPropertyNames(state).reduce((newState, key) => {
+ const presences = state[key];
+ if ('metas' in presences) {
+ newState[key] = presences.metas.map((presence) => {
+ presence['presence_ref'] = presence['phx_ref'];
+ delete presence['phx_ref'];
+ delete presence['phx_ref_prev'];
+ return presence;
+ });
+ }
+ else {
+ newState[key] = presences;
+ }
+ return newState;
+ }, {});
+ }
+ /** @internal */
+ static cloneDeep(obj) {
+ return JSON.parse(JSON.stringify(obj));
+ }
+ /** @internal */
+ onJoin(callback) {
+ this.caller.onJoin = callback;
+ }
+ /** @internal */
+ onLeave(callback) {
+ this.caller.onLeave = callback;
+ }
+ /** @internal */
+ onSync(callback) {
+ this.caller.onSync = callback;
+ }
+ /** @internal */
+ inPendingSyncState() {
+ return !this.joinRef || this.joinRef !== this.channel._joinRef();
+ }
+}
+exports.default = RealtimePresence;
+//# sourceMappingURL=RealtimePresence.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/index.js b/node_modules/@supabase/realtime-js/dist/main/index.js
new file mode 100644
index 0000000..97f9f14
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/index.js
@@ -0,0 +1,41 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.REALTIME_CHANNEL_STATES = exports.REALTIME_SUBSCRIBE_STATES = exports.REALTIME_PRESENCE_LISTEN_EVENTS = exports.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = exports.REALTIME_LISTEN_TYPES = exports.RealtimeClient = exports.RealtimeChannel = exports.RealtimePresence = void 0;
+const RealtimeClient_1 = __importDefault(require("./RealtimeClient"));
+exports.RealtimeClient = RealtimeClient_1.default;
+const RealtimeChannel_1 = __importStar(require("./RealtimeChannel"));
+exports.RealtimeChannel = RealtimeChannel_1.default;
+Object.defineProperty(exports, "REALTIME_LISTEN_TYPES", { enumerable: true, get: function () { return RealtimeChannel_1.REALTIME_LISTEN_TYPES; } });
+Object.defineProperty(exports, "REALTIME_POSTGRES_CHANGES_LISTEN_EVENT", { enumerable: true, get: function () { return RealtimeChannel_1.REALTIME_POSTGRES_CHANGES_LISTEN_EVENT; } });
+Object.defineProperty(exports, "REALTIME_SUBSCRIBE_STATES", { enumerable: true, get: function () { return RealtimeChannel_1.REALTIME_SUBSCRIBE_STATES; } });
+Object.defineProperty(exports, "REALTIME_CHANNEL_STATES", { enumerable: true, get: function () { return RealtimeChannel_1.REALTIME_CHANNEL_STATES; } });
+const RealtimePresence_1 = __importStar(require("./RealtimePresence"));
+exports.RealtimePresence = RealtimePresence_1.default;
+Object.defineProperty(exports, "REALTIME_PRESENCE_LISTEN_EVENTS", { enumerable: true, get: function () { return RealtimePresence_1.REALTIME_PRESENCE_LISTEN_EVENTS; } });
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/constants.js b/node_modules/@supabase/realtime-js/dist/main/lib/constants.js
new file mode 100644
index 0000000..715affe
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/constants.js
@@ -0,0 +1,44 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.CONNECTION_STATE = exports.TRANSPORTS = exports.CHANNEL_EVENTS = exports.CHANNEL_STATES = exports.SOCKET_STATES = exports.WS_CLOSE_NORMAL = exports.DEFAULT_TIMEOUT = exports.VSN = exports.DEFAULT_HEADERS = void 0;
+const version_1 = require("./version");
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `realtime-js/${version_1.version}` };
+exports.VSN = '1.0.0';
+exports.DEFAULT_TIMEOUT = 10000;
+exports.WS_CLOSE_NORMAL = 1000;
+var SOCKET_STATES;
+(function (SOCKET_STATES) {
+ SOCKET_STATES[SOCKET_STATES["connecting"] = 0] = "connecting";
+ SOCKET_STATES[SOCKET_STATES["open"] = 1] = "open";
+ SOCKET_STATES[SOCKET_STATES["closing"] = 2] = "closing";
+ SOCKET_STATES[SOCKET_STATES["closed"] = 3] = "closed";
+})(SOCKET_STATES = exports.SOCKET_STATES || (exports.SOCKET_STATES = {}));
+var CHANNEL_STATES;
+(function (CHANNEL_STATES) {
+ CHANNEL_STATES["closed"] = "closed";
+ CHANNEL_STATES["errored"] = "errored";
+ CHANNEL_STATES["joined"] = "joined";
+ CHANNEL_STATES["joining"] = "joining";
+ CHANNEL_STATES["leaving"] = "leaving";
+})(CHANNEL_STATES = exports.CHANNEL_STATES || (exports.CHANNEL_STATES = {}));
+var CHANNEL_EVENTS;
+(function (CHANNEL_EVENTS) {
+ CHANNEL_EVENTS["close"] = "phx_close";
+ CHANNEL_EVENTS["error"] = "phx_error";
+ CHANNEL_EVENTS["join"] = "phx_join";
+ CHANNEL_EVENTS["reply"] = "phx_reply";
+ CHANNEL_EVENTS["leave"] = "phx_leave";
+ CHANNEL_EVENTS["access_token"] = "access_token";
+})(CHANNEL_EVENTS = exports.CHANNEL_EVENTS || (exports.CHANNEL_EVENTS = {}));
+var TRANSPORTS;
+(function (TRANSPORTS) {
+ TRANSPORTS["websocket"] = "websocket";
+})(TRANSPORTS = exports.TRANSPORTS || (exports.TRANSPORTS = {}));
+var CONNECTION_STATE;
+(function (CONNECTION_STATE) {
+ CONNECTION_STATE["Connecting"] = "connecting";
+ CONNECTION_STATE["Open"] = "open";
+ CONNECTION_STATE["Closing"] = "closing";
+ CONNECTION_STATE["Closed"] = "closed";
+})(CONNECTION_STATE = exports.CONNECTION_STATE || (exports.CONNECTION_STATE = {}));
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/push.js b/node_modules/@supabase/realtime-js/dist/main/lib/push.js
new file mode 100644
index 0000000..372db71
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/push.js
@@ -0,0 +1,104 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const constants_1 = require("../lib/constants");
+class Push {
+ /**
+ * Initializes the Push
+ *
+ * @param channel The Channel
+ * @param event The event, for example `"phx_join"`
+ * @param payload The payload, for example `{user_id: 123}`
+ * @param timeout The push timeout in milliseconds
+ */
+ constructor(channel, event, payload = {}, timeout = constants_1.DEFAULT_TIMEOUT) {
+ this.channel = channel;
+ this.event = event;
+ this.payload = payload;
+ this.timeout = timeout;
+ this.sent = false;
+ this.timeoutTimer = undefined;
+ this.ref = '';
+ this.receivedResp = null;
+ this.recHooks = [];
+ this.refEvent = null;
+ }
+ resend(timeout) {
+ this.timeout = timeout;
+ this._cancelRefEvent();
+ this.ref = '';
+ this.refEvent = null;
+ this.receivedResp = null;
+ this.sent = false;
+ this.send();
+ }
+ send() {
+ if (this._hasReceived('timeout')) {
+ return;
+ }
+ this.startTimeout();
+ this.sent = true;
+ this.channel.socket.push({
+ topic: this.channel.topic,
+ event: this.event,
+ payload: this.payload,
+ ref: this.ref,
+ join_ref: this.channel._joinRef(),
+ });
+ }
+ updatePayload(payload) {
+ this.payload = Object.assign(Object.assign({}, this.payload), payload);
+ }
+ receive(status, callback) {
+ var _a;
+ if (this._hasReceived(status)) {
+ callback((_a = this.receivedResp) === null || _a === void 0 ? void 0 : _a.response);
+ }
+ this.recHooks.push({ status, callback });
+ return this;
+ }
+ startTimeout() {
+ if (this.timeoutTimer) {
+ return;
+ }
+ this.ref = this.channel.socket._makeRef();
+ this.refEvent = this.channel._replyEventName(this.ref);
+ const callback = (payload) => {
+ this._cancelRefEvent();
+ this._cancelTimeout();
+ this.receivedResp = payload;
+ this._matchReceive(payload);
+ };
+ this.channel._on(this.refEvent, {}, callback);
+ this.timeoutTimer = setTimeout(() => {
+ this.trigger('timeout', {});
+ }, this.timeout);
+ }
+ trigger(status, response) {
+ if (this.refEvent)
+ this.channel._trigger(this.refEvent, { status, response });
+ }
+ destroy() {
+ this._cancelRefEvent();
+ this._cancelTimeout();
+ }
+ _cancelRefEvent() {
+ if (!this.refEvent) {
+ return;
+ }
+ this.channel._off(this.refEvent, {});
+ }
+ _cancelTimeout() {
+ clearTimeout(this.timeoutTimer);
+ this.timeoutTimer = undefined;
+ }
+ _matchReceive({ status, response, }) {
+ this.recHooks
+ .filter((h) => h.status === status)
+ .forEach((h) => h.callback(response));
+ }
+ _hasReceived(status) {
+ return this.receivedResp && this.receivedResp.status === status;
+ }
+}
+exports.default = Push;
+//# sourceMappingURL=push.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js b/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js
new file mode 100644
index 0000000..fc1f495
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js
@@ -0,0 +1,36 @@
+"use strict";
+// This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe
+// License: https://github.com/phoenixframework/phoenix/blob/master/LICENSE.md
+Object.defineProperty(exports, "__esModule", { value: true });
+class Serializer {
+ constructor() {
+ this.HEADER_LENGTH = 1;
+ }
+ decode(rawPayload, callback) {
+ if (rawPayload.constructor === ArrayBuffer) {
+ return callback(this._binaryDecode(rawPayload));
+ }
+ if (typeof rawPayload === 'string') {
+ return callback(JSON.parse(rawPayload));
+ }
+ return callback({});
+ }
+ _binaryDecode(buffer) {
+ const view = new DataView(buffer);
+ const decoder = new TextDecoder();
+ return this._decodeBroadcast(buffer, view, decoder);
+ }
+ _decodeBroadcast(buffer, view, decoder) {
+ const topicSize = view.getUint8(1);
+ const eventSize = view.getUint8(2);
+ let offset = this.HEADER_LENGTH + 2;
+ const topic = decoder.decode(buffer.slice(offset, offset + topicSize));
+ offset = offset + topicSize;
+ const event = decoder.decode(buffer.slice(offset, offset + eventSize));
+ offset = offset + eventSize;
+ const data = JSON.parse(decoder.decode(buffer.slice(offset, buffer.byteLength)));
+ return { ref: null, topic: topic, event: event, payload: data };
+ }
+}
+exports.default = Serializer;
+//# sourceMappingURL=serializer.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/timer.js b/node_modules/@supabase/realtime-js/dist/main/lib/timer.js
new file mode 100644
index 0000000..9f7b174
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/timer.js
@@ -0,0 +1,38 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff.
+ *
+ * @example
+ * let reconnectTimer = new Timer(() => this.connect(), function(tries){
+ * return [1000, 5000, 10000][tries - 1] || 10000
+ * })
+ * reconnectTimer.scheduleTimeout() // fires after 1000
+ * reconnectTimer.scheduleTimeout() // fires after 5000
+ * reconnectTimer.reset()
+ * reconnectTimer.scheduleTimeout() // fires after 1000
+ */
+class Timer {
+ constructor(callback, timerCalc) {
+ this.callback = callback;
+ this.timerCalc = timerCalc;
+ this.timer = undefined;
+ this.tries = 0;
+ this.callback = callback;
+ this.timerCalc = timerCalc;
+ }
+ reset() {
+ this.tries = 0;
+ clearTimeout(this.timer);
+ }
+ // Cancels any previous scheduleTimeout and schedules callback
+ scheduleTimeout() {
+ clearTimeout(this.timer);
+ this.timer = setTimeout(() => {
+ this.tries = this.tries + 1;
+ this.callback();
+ }, this.timerCalc(this.tries + 1));
+ }
+}
+exports.default = Timer;
+//# sourceMappingURL=timer.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js b/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js
new file mode 100644
index 0000000..2a3d841
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js
@@ -0,0 +1,229 @@
+"use strict";
+/**
+ * Helpers to convert the change Payload into native JS types.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.httpEndpointURL = exports.toTimestampString = exports.toArray = exports.toJson = exports.toNumber = exports.toBoolean = exports.convertCell = exports.convertColumn = exports.convertChangeData = exports.PostgresTypes = void 0;
+// Adapted from epgsql (src/epgsql_binary.erl), this module licensed under
+// 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE
+var PostgresTypes;
+(function (PostgresTypes) {
+ PostgresTypes["abstime"] = "abstime";
+ PostgresTypes["bool"] = "bool";
+ PostgresTypes["date"] = "date";
+ PostgresTypes["daterange"] = "daterange";
+ PostgresTypes["float4"] = "float4";
+ PostgresTypes["float8"] = "float8";
+ PostgresTypes["int2"] = "int2";
+ PostgresTypes["int4"] = "int4";
+ PostgresTypes["int4range"] = "int4range";
+ PostgresTypes["int8"] = "int8";
+ PostgresTypes["int8range"] = "int8range";
+ PostgresTypes["json"] = "json";
+ PostgresTypes["jsonb"] = "jsonb";
+ PostgresTypes["money"] = "money";
+ PostgresTypes["numeric"] = "numeric";
+ PostgresTypes["oid"] = "oid";
+ PostgresTypes["reltime"] = "reltime";
+ PostgresTypes["text"] = "text";
+ PostgresTypes["time"] = "time";
+ PostgresTypes["timestamp"] = "timestamp";
+ PostgresTypes["timestamptz"] = "timestamptz";
+ PostgresTypes["timetz"] = "timetz";
+ PostgresTypes["tsrange"] = "tsrange";
+ PostgresTypes["tstzrange"] = "tstzrange";
+})(PostgresTypes = exports.PostgresTypes || (exports.PostgresTypes = {}));
+/**
+ * Takes an array of columns and an object of string values then converts each string value
+ * to its mapped type.
+ *
+ * @param {{name: String, type: String}[]} columns
+ * @param {Object} record
+ * @param {Object} options The map of various options that can be applied to the mapper
+ * @param {Array} options.skipTypes The array of types that should not be converted
+ *
+ * @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})
+ * //=>{ first_name: 'Paul', age: 33 }
+ */
+const convertChangeData = (columns, record, options = {}) => {
+ var _a;
+ const skipTypes = (_a = options.skipTypes) !== null && _a !== void 0 ? _a : [];
+ return Object.keys(record).reduce((acc, rec_key) => {
+ acc[rec_key] = (0, exports.convertColumn)(rec_key, columns, record, skipTypes);
+ return acc;
+ }, {});
+};
+exports.convertChangeData = convertChangeData;
+/**
+ * Converts the value of an individual column.
+ *
+ * @param {String} columnName The column that you want to convert
+ * @param {{name: String, type: String}[]} columns All of the columns
+ * @param {Object} record The map of string values
+ * @param {Array} skipTypes An array of types that should not be converted
+ * @return {object} Useless information
+ *
+ * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])
+ * //=> 33
+ * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])
+ * //=> "33"
+ */
+const convertColumn = (columnName, columns, record, skipTypes) => {
+ const column = columns.find((x) => x.name === columnName);
+ const colType = column === null || column === void 0 ? void 0 : column.type;
+ const value = record[columnName];
+ if (colType && !skipTypes.includes(colType)) {
+ return (0, exports.convertCell)(colType, value);
+ }
+ return noop(value);
+};
+exports.convertColumn = convertColumn;
+/**
+ * If the value of the cell is `null`, returns null.
+ * Otherwise converts the string value to the correct type.
+ * @param {String} type A postgres column type
+ * @param {String} value The cell value
+ *
+ * @example convertCell('bool', 't')
+ * //=> true
+ * @example convertCell('int8', '10')
+ * //=> 10
+ * @example convertCell('_int4', '{1,2,3,4}')
+ * //=> [1,2,3,4]
+ */
+const convertCell = (type, value) => {
+ // if data type is an array
+ if (type.charAt(0) === '_') {
+ const dataType = type.slice(1, type.length);
+ return (0, exports.toArray)(value, dataType);
+ }
+ // If not null, convert to correct type.
+ switch (type) {
+ case PostgresTypes.bool:
+ return (0, exports.toBoolean)(value);
+ case PostgresTypes.float4:
+ case PostgresTypes.float8:
+ case PostgresTypes.int2:
+ case PostgresTypes.int4:
+ case PostgresTypes.int8:
+ case PostgresTypes.numeric:
+ case PostgresTypes.oid:
+ return (0, exports.toNumber)(value);
+ case PostgresTypes.json:
+ case PostgresTypes.jsonb:
+ return (0, exports.toJson)(value);
+ case PostgresTypes.timestamp:
+ return (0, exports.toTimestampString)(value); // Format to be consistent with PostgREST
+ case PostgresTypes.abstime: // To allow users to cast it based on Timezone
+ case PostgresTypes.date: // To allow users to cast it based on Timezone
+ case PostgresTypes.daterange:
+ case PostgresTypes.int4range:
+ case PostgresTypes.int8range:
+ case PostgresTypes.money:
+ case PostgresTypes.reltime: // To allow users to cast it based on Timezone
+ case PostgresTypes.text:
+ case PostgresTypes.time: // To allow users to cast it based on Timezone
+ case PostgresTypes.timestamptz: // To allow users to cast it based on Timezone
+ case PostgresTypes.timetz: // To allow users to cast it based on Timezone
+ case PostgresTypes.tsrange:
+ case PostgresTypes.tstzrange:
+ return noop(value);
+ default:
+ // Return the value for remaining types
+ return noop(value);
+ }
+};
+exports.convertCell = convertCell;
+const noop = (value) => {
+ return value;
+};
+const toBoolean = (value) => {
+ switch (value) {
+ case 't':
+ return true;
+ case 'f':
+ return false;
+ default:
+ return value;
+ }
+};
+exports.toBoolean = toBoolean;
+const toNumber = (value) => {
+ if (typeof value === 'string') {
+ const parsedValue = parseFloat(value);
+ if (!Number.isNaN(parsedValue)) {
+ return parsedValue;
+ }
+ }
+ return value;
+};
+exports.toNumber = toNumber;
+const toJson = (value) => {
+ if (typeof value === 'string') {
+ try {
+ return JSON.parse(value);
+ }
+ catch (error) {
+ console.log(`JSON parse error: ${error}`);
+ return value;
+ }
+ }
+ return value;
+};
+exports.toJson = toJson;
+/**
+ * Converts a Postgres Array into a native JS array
+ *
+ * @example toArray('{}', 'int4')
+ * //=> []
+ * @example toArray('{"[2021-01-01,2021-12-31)","(2021-01-01,2021-12-32]"}', 'daterange')
+ * //=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']
+ * @example toArray([1,2,3,4], 'int4')
+ * //=> [1,2,3,4]
+ */
+const toArray = (value, type) => {
+ if (typeof value !== 'string') {
+ return value;
+ }
+ const lastIdx = value.length - 1;
+ const closeBrace = value[lastIdx];
+ const openBrace = value[0];
+ // Confirm value is a Postgres array by checking curly brackets
+ if (openBrace === '{' && closeBrace === '}') {
+ let arr;
+ const valTrim = value.slice(1, lastIdx);
+ // TODO: find a better solution to separate Postgres array data
+ try {
+ arr = JSON.parse('[' + valTrim + ']');
+ }
+ catch (_) {
+ // WARNING: splitting on comma does not cover all edge cases
+ arr = valTrim ? valTrim.split(',') : [];
+ }
+ return arr.map((val) => (0, exports.convertCell)(type, val));
+ }
+ return value;
+};
+exports.toArray = toArray;
+/**
+ * Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'
+ * See https://github.com/supabase/supabase/issues/18
+ *
+ * @example toTimestampString('2019-09-10 00:00:00')
+ * //=> '2019-09-10T00:00:00'
+ */
+const toTimestampString = (value) => {
+ if (typeof value === 'string') {
+ return value.replace(' ', 'T');
+ }
+ return value;
+};
+exports.toTimestampString = toTimestampString;
+const httpEndpointURL = (socketUrl) => {
+ let url = socketUrl;
+ url = url.replace(/^ws/i, 'http');
+ url = url.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i, '');
+ return url.replace(/\/+$/, '');
+};
+exports.httpEndpointURL = httpEndpointURL;
+//# sourceMappingURL=transformers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/main/lib/version.js b/node_modules/@supabase/realtime-js/dist/main/lib/version.js
new file mode 100644
index 0000000..68b6662
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/main/lib/version.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+exports.version = '2.11.2';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js b/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js
new file mode 100644
index 0000000..5bef1b9
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js
@@ -0,0 +1,498 @@
+import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';
+import Push from './lib/push';
+import Timer from './lib/timer';
+import RealtimePresence from './RealtimePresence';
+import * as Transformers from './lib/transformers';
+import { httpEndpointURL } from './lib/transformers';
+export var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
+(function (REALTIME_POSTGRES_CHANGES_LISTEN_EVENT) {
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["ALL"] = "*";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["INSERT"] = "INSERT";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["UPDATE"] = "UPDATE";
+ REALTIME_POSTGRES_CHANGES_LISTEN_EVENT["DELETE"] = "DELETE";
+})(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT || (REALTIME_POSTGRES_CHANGES_LISTEN_EVENT = {}));
+export var REALTIME_LISTEN_TYPES;
+(function (REALTIME_LISTEN_TYPES) {
+ REALTIME_LISTEN_TYPES["BROADCAST"] = "broadcast";
+ REALTIME_LISTEN_TYPES["PRESENCE"] = "presence";
+ REALTIME_LISTEN_TYPES["POSTGRES_CHANGES"] = "postgres_changes";
+ REALTIME_LISTEN_TYPES["SYSTEM"] = "system";
+})(REALTIME_LISTEN_TYPES || (REALTIME_LISTEN_TYPES = {}));
+export var REALTIME_SUBSCRIBE_STATES;
+(function (REALTIME_SUBSCRIBE_STATES) {
+ REALTIME_SUBSCRIBE_STATES["SUBSCRIBED"] = "SUBSCRIBED";
+ REALTIME_SUBSCRIBE_STATES["TIMED_OUT"] = "TIMED_OUT";
+ REALTIME_SUBSCRIBE_STATES["CLOSED"] = "CLOSED";
+ REALTIME_SUBSCRIBE_STATES["CHANNEL_ERROR"] = "CHANNEL_ERROR";
+})(REALTIME_SUBSCRIBE_STATES || (REALTIME_SUBSCRIBE_STATES = {}));
+export const REALTIME_CHANNEL_STATES = CHANNEL_STATES;
+/** A channel is the basic building block of Realtime
+ * and narrows the scope of data flow to subscribed clients.
+ * You can think of a channel as a chatroom where participants are able to see who's online
+ * and send and receive messages.
+ */
+export default class RealtimeChannel {
+ constructor(
+ /** Topic name can be any string. */
+ topic, params = { config: {} }, socket) {
+ this.topic = topic;
+ this.params = params;
+ this.socket = socket;
+ this.bindings = {};
+ this.state = CHANNEL_STATES.closed;
+ this.joinedOnce = false;
+ this.pushBuffer = [];
+ this.subTopic = topic.replace(/^realtime:/i, '');
+ this.params.config = Object.assign({
+ broadcast: { ack: false, self: false },
+ presence: { key: '' },
+ private: false,
+ }, params.config);
+ this.timeout = this.socket.timeout;
+ this.joinPush = new Push(this, CHANNEL_EVENTS.join, this.params, this.timeout);
+ this.rejoinTimer = new Timer(() => this._rejoinUntilConnected(), this.socket.reconnectAfterMs);
+ this.joinPush.receive('ok', () => {
+ this.state = CHANNEL_STATES.joined;
+ this.rejoinTimer.reset();
+ this.pushBuffer.forEach((pushEvent) => pushEvent.send());
+ this.pushBuffer = [];
+ });
+ this._onClose(() => {
+ this.rejoinTimer.reset();
+ this.socket.log('channel', `close ${this.topic} ${this._joinRef()}`);
+ this.state = CHANNEL_STATES.closed;
+ this.socket._remove(this);
+ });
+ this._onError((reason) => {
+ if (this._isLeaving() || this._isClosed()) {
+ return;
+ }
+ this.socket.log('channel', `error ${this.topic}`, reason);
+ this.state = CHANNEL_STATES.errored;
+ this.rejoinTimer.scheduleTimeout();
+ });
+ this.joinPush.receive('timeout', () => {
+ if (!this._isJoining()) {
+ return;
+ }
+ this.socket.log('channel', `timeout ${this.topic}`, this.joinPush.timeout);
+ this.state = CHANNEL_STATES.errored;
+ this.rejoinTimer.scheduleTimeout();
+ });
+ this._on(CHANNEL_EVENTS.reply, {}, (payload, ref) => {
+ this._trigger(this._replyEventName(ref), payload);
+ });
+ this.presence = new RealtimePresence(this);
+ this.broadcastEndpointURL =
+ httpEndpointURL(this.socket.endPoint) + '/api/broadcast';
+ this.private = this.params.config.private || false;
+ }
+ /** Subscribe registers your client with the server */
+ subscribe(callback, timeout = this.timeout) {
+ var _a, _b;
+ if (!this.socket.isConnected()) {
+ this.socket.connect();
+ }
+ if (this.joinedOnce) {
+ throw `tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance`;
+ }
+ else {
+ const { config: { broadcast, presence, private: isPrivate }, } = this.params;
+ this._onError((e) => callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, e));
+ this._onClose(() => callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CLOSED));
+ const accessTokenPayload = {};
+ const config = {
+ broadcast,
+ presence,
+ postgres_changes: (_b = (_a = this.bindings.postgres_changes) === null || _a === void 0 ? void 0 : _a.map((r) => r.filter)) !== null && _b !== void 0 ? _b : [],
+ private: isPrivate,
+ };
+ if (this.socket.accessTokenValue) {
+ accessTokenPayload.access_token = this.socket.accessTokenValue;
+ }
+ this.updateJoinPayload(Object.assign({ config }, accessTokenPayload));
+ this.joinedOnce = true;
+ this._rejoin(timeout);
+ this.joinPush
+ .receive('ok', async ({ postgres_changes }) => {
+ var _a;
+ this.socket.setAuth();
+ if (postgres_changes === undefined) {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
+ return;
+ }
+ else {
+ const clientPostgresBindings = this.bindings.postgres_changes;
+ const bindingsLen = (_a = clientPostgresBindings === null || clientPostgresBindings === void 0 ? void 0 : clientPostgresBindings.length) !== null && _a !== void 0 ? _a : 0;
+ const newPostgresBindings = [];
+ for (let i = 0; i < bindingsLen; i++) {
+ const clientPostgresBinding = clientPostgresBindings[i];
+ const { filter: { event, schema, table, filter }, } = clientPostgresBinding;
+ const serverPostgresFilter = postgres_changes && postgres_changes[i];
+ if (serverPostgresFilter &&
+ serverPostgresFilter.event === event &&
+ serverPostgresFilter.schema === schema &&
+ serverPostgresFilter.table === table &&
+ serverPostgresFilter.filter === filter) {
+ newPostgresBindings.push(Object.assign(Object.assign({}, clientPostgresBinding), { id: serverPostgresFilter.id }));
+ }
+ else {
+ this.unsubscribe();
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error('mismatch between server and client bindings for postgres changes'));
+ return;
+ }
+ }
+ this.bindings.postgres_changes = newPostgresBindings;
+ callback && callback(REALTIME_SUBSCRIBE_STATES.SUBSCRIBED);
+ return;
+ }
+ })
+ .receive('error', (error) => {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error(JSON.stringify(Object.values(error).join(', ') || 'error')));
+ return;
+ })
+ .receive('timeout', () => {
+ callback === null || callback === void 0 ? void 0 : callback(REALTIME_SUBSCRIBE_STATES.TIMED_OUT);
+ return;
+ });
+ }
+ return this;
+ }
+ presenceState() {
+ return this.presence.state;
+ }
+ async track(payload, opts = {}) {
+ return await this.send({
+ type: 'presence',
+ event: 'track',
+ payload,
+ }, opts.timeout || this.timeout);
+ }
+ async untrack(opts = {}) {
+ return await this.send({
+ type: 'presence',
+ event: 'untrack',
+ }, opts);
+ }
+ on(type, filter, callback) {
+ return this._on(type, filter, callback);
+ }
+ /**
+ * Sends a message into the channel.
+ *
+ * @param args Arguments to send to channel
+ * @param args.type The type of event to send
+ * @param args.event The name of the event being sent
+ * @param args.payload Payload to be sent
+ * @param opts Options to be used during the send process
+ */
+ async send(args, opts = {}) {
+ var _a, _b;
+ if (!this._canPush() && args.type === 'broadcast') {
+ const { event, payload: endpoint_payload } = args;
+ const authorization = this.socket.accessTokenValue
+ ? `Bearer ${this.socket.accessTokenValue}`
+ : '';
+ const options = {
+ method: 'POST',
+ headers: {
+ Authorization: authorization,
+ apikey: this.socket.apiKey ? this.socket.apiKey : '',
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ messages: [
+ {
+ topic: this.subTopic,
+ event,
+ payload: endpoint_payload,
+ private: this.private,
+ },
+ ],
+ }),
+ };
+ try {
+ const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
+ await ((_b = response.body) === null || _b === void 0 ? void 0 : _b.cancel());
+ return response.ok ? 'ok' : 'error';
+ }
+ catch (error) {
+ if (error.name === 'AbortError') {
+ return 'timed out';
+ }
+ else {
+ return 'error';
+ }
+ }
+ }
+ else {
+ return new Promise((resolve) => {
+ var _a, _b, _c;
+ const push = this._push(args.type, args, opts.timeout || this.timeout);
+ if (args.type === 'broadcast' && !((_c = (_b = (_a = this.params) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.broadcast) === null || _c === void 0 ? void 0 : _c.ack)) {
+ resolve('ok');
+ }
+ push.receive('ok', () => resolve('ok'));
+ push.receive('error', () => resolve('error'));
+ push.receive('timeout', () => resolve('timed out'));
+ });
+ }
+ }
+ updateJoinPayload(payload) {
+ this.joinPush.updatePayload(payload);
+ }
+ /**
+ * Leaves the channel.
+ *
+ * Unsubscribes from server events, and instructs channel to terminate on server.
+ * Triggers onClose() hooks.
+ *
+ * To receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:
+ * channel.unsubscribe().receive("ok", () => alert("left!") )
+ */
+ unsubscribe(timeout = this.timeout) {
+ this.state = CHANNEL_STATES.leaving;
+ const onClose = () => {
+ this.socket.log('channel', `leave ${this.topic}`);
+ this._trigger(CHANNEL_EVENTS.close, 'leave', this._joinRef());
+ };
+ this.rejoinTimer.reset();
+ // Destroy joinPush to avoid connection timeouts during unscription phase
+ this.joinPush.destroy();
+ return new Promise((resolve) => {
+ const leavePush = new Push(this, CHANNEL_EVENTS.leave, {}, timeout);
+ leavePush
+ .receive('ok', () => {
+ onClose();
+ resolve('ok');
+ })
+ .receive('timeout', () => {
+ onClose();
+ resolve('timed out');
+ })
+ .receive('error', () => {
+ resolve('error');
+ });
+ leavePush.send();
+ if (!this._canPush()) {
+ leavePush.trigger('ok', {});
+ }
+ });
+ }
+ /** @internal */
+ async _fetchWithTimeout(url, options, timeout) {
+ const controller = new AbortController();
+ const id = setTimeout(() => controller.abort(), timeout);
+ const response = await this.socket.fetch(url, Object.assign(Object.assign({}, options), { signal: controller.signal }));
+ clearTimeout(id);
+ return response;
+ }
+ /** @internal */
+ _push(event, payload, timeout = this.timeout) {
+ if (!this.joinedOnce) {
+ throw `tried to push '${event}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;
+ }
+ let pushEvent = new Push(this, event, payload, timeout);
+ if (this._canPush()) {
+ pushEvent.send();
+ }
+ else {
+ pushEvent.startTimeout();
+ this.pushBuffer.push(pushEvent);
+ }
+ return pushEvent;
+ }
+ /**
+ * Overridable message hook
+ *
+ * Receives all events for specialized message handling before dispatching to the channel callbacks.
+ * Must return the payload, modified or unmodified.
+ *
+ * @internal
+ */
+ _onMessage(_event, payload, _ref) {
+ return payload;
+ }
+ /** @internal */
+ _isMember(topic) {
+ return this.topic === topic;
+ }
+ /** @internal */
+ _joinRef() {
+ return this.joinPush.ref;
+ }
+ /** @internal */
+ _trigger(type, payload, ref) {
+ var _a, _b;
+ const typeLower = type.toLocaleLowerCase();
+ const { close, error, leave, join } = CHANNEL_EVENTS;
+ const events = [close, error, leave, join];
+ if (ref && events.indexOf(typeLower) >= 0 && ref !== this._joinRef()) {
+ return;
+ }
+ let handledPayload = this._onMessage(typeLower, payload, ref);
+ if (payload && !handledPayload) {
+ throw 'channel onMessage callbacks must return the payload, modified or unmodified';
+ }
+ if (['insert', 'update', 'delete'].includes(typeLower)) {
+ (_a = this.bindings.postgres_changes) === null || _a === void 0 ? void 0 : _a.filter((bind) => {
+ var _a, _b, _c;
+ return (((_a = bind.filter) === null || _a === void 0 ? void 0 : _a.event) === '*' ||
+ ((_c = (_b = bind.filter) === null || _b === void 0 ? void 0 : _b.event) === null || _c === void 0 ? void 0 : _c.toLocaleLowerCase()) === typeLower);
+ }).map((bind) => bind.callback(handledPayload, ref));
+ }
+ else {
+ (_b = this.bindings[typeLower]) === null || _b === void 0 ? void 0 : _b.filter((bind) => {
+ var _a, _b, _c, _d, _e, _f;
+ if (['broadcast', 'presence', 'postgres_changes'].includes(typeLower)) {
+ if ('id' in bind) {
+ const bindId = bind.id;
+ const bindEvent = (_a = bind.filter) === null || _a === void 0 ? void 0 : _a.event;
+ return (bindId &&
+ ((_b = payload.ids) === null || _b === void 0 ? void 0 : _b.includes(bindId)) &&
+ (bindEvent === '*' ||
+ (bindEvent === null || bindEvent === void 0 ? void 0 : bindEvent.toLocaleLowerCase()) ===
+ ((_c = payload.data) === null || _c === void 0 ? void 0 : _c.type.toLocaleLowerCase())));
+ }
+ else {
+ const bindEvent = (_e = (_d = bind === null || bind === void 0 ? void 0 : bind.filter) === null || _d === void 0 ? void 0 : _d.event) === null || _e === void 0 ? void 0 : _e.toLocaleLowerCase();
+ return (bindEvent === '*' ||
+ bindEvent === ((_f = payload === null || payload === void 0 ? void 0 : payload.event) === null || _f === void 0 ? void 0 : _f.toLocaleLowerCase()));
+ }
+ }
+ else {
+ return bind.type.toLocaleLowerCase() === typeLower;
+ }
+ }).map((bind) => {
+ if (typeof handledPayload === 'object' && 'ids' in handledPayload) {
+ const postgresChanges = handledPayload.data;
+ const { schema, table, commit_timestamp, type, errors } = postgresChanges;
+ const enrichedPayload = {
+ schema: schema,
+ table: table,
+ commit_timestamp: commit_timestamp,
+ eventType: type,
+ new: {},
+ old: {},
+ errors: errors,
+ };
+ handledPayload = Object.assign(Object.assign({}, enrichedPayload), this._getPayloadRecords(postgresChanges));
+ }
+ bind.callback(handledPayload, ref);
+ });
+ }
+ }
+ /** @internal */
+ _isClosed() {
+ return this.state === CHANNEL_STATES.closed;
+ }
+ /** @internal */
+ _isJoined() {
+ return this.state === CHANNEL_STATES.joined;
+ }
+ /** @internal */
+ _isJoining() {
+ return this.state === CHANNEL_STATES.joining;
+ }
+ /** @internal */
+ _isLeaving() {
+ return this.state === CHANNEL_STATES.leaving;
+ }
+ /** @internal */
+ _replyEventName(ref) {
+ return `chan_reply_${ref}`;
+ }
+ /** @internal */
+ _on(type, filter, callback) {
+ const typeLower = type.toLocaleLowerCase();
+ const binding = {
+ type: typeLower,
+ filter: filter,
+ callback: callback,
+ };
+ if (this.bindings[typeLower]) {
+ this.bindings[typeLower].push(binding);
+ }
+ else {
+ this.bindings[typeLower] = [binding];
+ }
+ return this;
+ }
+ /** @internal */
+ _off(type, filter) {
+ const typeLower = type.toLocaleLowerCase();
+ this.bindings[typeLower] = this.bindings[typeLower].filter((bind) => {
+ var _a;
+ return !(((_a = bind.type) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) === typeLower &&
+ RealtimeChannel.isEqual(bind.filter, filter));
+ });
+ return this;
+ }
+ /** @internal */
+ static isEqual(obj1, obj2) {
+ if (Object.keys(obj1).length !== Object.keys(obj2).length) {
+ return false;
+ }
+ for (const k in obj1) {
+ if (obj1[k] !== obj2[k]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /** @internal */
+ _rejoinUntilConnected() {
+ this.rejoinTimer.scheduleTimeout();
+ if (this.socket.isConnected()) {
+ this._rejoin();
+ }
+ }
+ /**
+ * Registers a callback that will be executed when the channel closes.
+ *
+ * @internal
+ */
+ _onClose(callback) {
+ this._on(CHANNEL_EVENTS.close, {}, callback);
+ }
+ /**
+ * Registers a callback that will be executed when the channel encounteres an error.
+ *
+ * @internal
+ */
+ _onError(callback) {
+ this._on(CHANNEL_EVENTS.error, {}, (reason) => callback(reason));
+ }
+ /**
+ * Returns `true` if the socket is connected and the channel has been joined.
+ *
+ * @internal
+ */
+ _canPush() {
+ return this.socket.isConnected() && this._isJoined();
+ }
+ /** @internal */
+ _rejoin(timeout = this.timeout) {
+ if (this._isLeaving()) {
+ return;
+ }
+ this.socket._leaveOpenTopic(this.topic);
+ this.state = CHANNEL_STATES.joining;
+ this.joinPush.resend(timeout);
+ }
+ /** @internal */
+ _getPayloadRecords(payload) {
+ const records = {
+ new: {},
+ old: {},
+ };
+ if (payload.type === 'INSERT' || payload.type === 'UPDATE') {
+ records.new = Transformers.convertChangeData(payload.columns, payload.record);
+ }
+ if (payload.type === 'UPDATE' || payload.type === 'DELETE') {
+ records.old = Transformers.convertChangeData(payload.columns, payload.old_record);
+ }
+ return records;
+ }
+}
+//# sourceMappingURL=RealtimeChannel.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js b/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js
new file mode 100644
index 0000000..8d16488
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js
@@ -0,0 +1,485 @@
+import { CHANNEL_EVENTS, CONNECTION_STATE, DEFAULT_HEADERS, DEFAULT_TIMEOUT, SOCKET_STATES, TRANSPORTS, VSN, WS_CLOSE_NORMAL, } from './lib/constants';
+import Serializer from './lib/serializer';
+import Timer from './lib/timer';
+import { httpEndpointURL } from './lib/transformers';
+import RealtimeChannel from './RealtimeChannel';
+const noop = () => { };
+const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined';
+const WORKER_SCRIPT = `
+ addEventListener("message", (e) => {
+ if (e.data.event === "start") {
+ setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
+ }
+ });`;
+export default class RealtimeClient {
+ /**
+ * Initializes the Socket.
+ *
+ * @param endPoint The string WebSocket endpoint, ie, "ws://example.com/socket", "wss://example.com", "/socket" (inherited host & protocol)
+ * @param httpEndpoint The string HTTP endpoint, ie, "https://example.com", "/" (inherited host & protocol)
+ * @param options.transport The Websocket Transport, for example WebSocket.
+ * @param options.timeout The default timeout in milliseconds to trigger push timeouts.
+ * @param options.params The optional params to pass when connecting.
+ * @param options.headers The optional headers to pass when connecting.
+ * @param options.heartbeatIntervalMs The millisec interval to send a heartbeat message.
+ * @param options.logger The optional function for specialized logging, ie: logger: (kind, msg, data) => { console.log(`${kind}: ${msg}`, data) }
+ * @param options.encode The function to encode outgoing messages. Defaults to JSON: (payload, callback) => callback(JSON.stringify(payload))
+ * @param options.decode The function to decode incoming messages. Defaults to Serializer's decode.
+ * @param options.reconnectAfterMs he optional function that returns the millsec reconnect interval. Defaults to stepped backoff off.
+ * @param options.worker Use Web Worker to set a side flow. Defaults to false.
+ * @param options.workerUrl The URL of the worker script. Defaults to https://realtime.supabase.com/worker.js that includes a heartbeat event call to keep the connection alive.
+ */
+ constructor(endPoint, options) {
+ var _a;
+ this.accessTokenValue = null;
+ this.apiKey = null;
+ this.channels = [];
+ this.endPoint = '';
+ this.httpEndpoint = '';
+ this.headers = DEFAULT_HEADERS;
+ this.params = {};
+ this.timeout = DEFAULT_TIMEOUT;
+ this.heartbeatIntervalMs = 30000;
+ this.heartbeatTimer = undefined;
+ this.pendingHeartbeatRef = null;
+ this.ref = 0;
+ this.logger = noop;
+ this.conn = null;
+ this.sendBuffer = [];
+ this.serializer = new Serializer();
+ this.stateChangeCallbacks = {
+ open: [],
+ close: [],
+ error: [],
+ message: [],
+ };
+ this.accessToken = null;
+ /**
+ * Use either custom fetch, if provided, or default fetch to make HTTP requests
+ *
+ * @internal
+ */
+ this._resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => import('@supabase/node-fetch').then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+ };
+ this.endPoint = `${endPoint}/${TRANSPORTS.websocket}`;
+ this.httpEndpoint = httpEndpointURL(endPoint);
+ if (options === null || options === void 0 ? void 0 : options.transport) {
+ this.transport = options.transport;
+ }
+ else {
+ this.transport = null;
+ }
+ if (options === null || options === void 0 ? void 0 : options.params)
+ this.params = options.params;
+ if (options === null || options === void 0 ? void 0 : options.headers)
+ this.headers = Object.assign(Object.assign({}, this.headers), options.headers);
+ if (options === null || options === void 0 ? void 0 : options.timeout)
+ this.timeout = options.timeout;
+ if (options === null || options === void 0 ? void 0 : options.logger)
+ this.logger = options.logger;
+ if (options === null || options === void 0 ? void 0 : options.heartbeatIntervalMs)
+ this.heartbeatIntervalMs = options.heartbeatIntervalMs;
+ const accessTokenValue = (_a = options === null || options === void 0 ? void 0 : options.params) === null || _a === void 0 ? void 0 : _a.apikey;
+ if (accessTokenValue) {
+ this.accessTokenValue = accessTokenValue;
+ this.apiKey = accessTokenValue;
+ }
+ this.reconnectAfterMs = (options === null || options === void 0 ? void 0 : options.reconnectAfterMs)
+ ? options.reconnectAfterMs
+ : (tries) => {
+ return [1000, 2000, 5000, 10000][tries - 1] || 10000;
+ };
+ this.encode = (options === null || options === void 0 ? void 0 : options.encode)
+ ? options.encode
+ : (payload, callback) => {
+ return callback(JSON.stringify(payload));
+ };
+ this.decode = (options === null || options === void 0 ? void 0 : options.decode)
+ ? options.decode
+ : this.serializer.decode.bind(this.serializer);
+ this.reconnectTimer = new Timer(async () => {
+ this.disconnect();
+ this.connect();
+ }, this.reconnectAfterMs);
+ this.fetch = this._resolveFetch(options === null || options === void 0 ? void 0 : options.fetch);
+ if (options === null || options === void 0 ? void 0 : options.worker) {
+ if (typeof window !== 'undefined' && !window.Worker) {
+ throw new Error('Web Worker is not supported');
+ }
+ this.worker = (options === null || options === void 0 ? void 0 : options.worker) || false;
+ this.workerUrl = options === null || options === void 0 ? void 0 : options.workerUrl;
+ }
+ this.accessToken = (options === null || options === void 0 ? void 0 : options.accessToken) || null;
+ }
+ /**
+ * Connects the socket, unless already connected.
+ */
+ connect() {
+ if (this.conn) {
+ return;
+ }
+ if (this.transport) {
+ this.conn = new this.transport(this.endpointURL(), undefined, {
+ headers: this.headers,
+ });
+ return;
+ }
+ if (NATIVE_WEBSOCKET_AVAILABLE) {
+ this.conn = new WebSocket(this.endpointURL());
+ this.setupConnection();
+ return;
+ }
+ this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, {
+ close: () => {
+ this.conn = null;
+ },
+ });
+ import('ws').then(({ default: WS }) => {
+ this.conn = new WS(this.endpointURL(), undefined, {
+ headers: this.headers,
+ });
+ this.setupConnection();
+ });
+ }
+ /**
+ * Returns the URL of the websocket.
+ * @returns string The URL of the websocket.
+ */
+ endpointURL() {
+ return this._appendParams(this.endPoint, Object.assign({}, this.params, { vsn: VSN }));
+ }
+ /**
+ * Disconnects the socket.
+ *
+ * @param code A numeric status code to send on disconnect.
+ * @param reason A custom reason for the disconnect.
+ */
+ disconnect(code, reason) {
+ if (this.conn) {
+ this.conn.onclose = function () { }; // noop
+ if (code) {
+ this.conn.close(code, reason !== null && reason !== void 0 ? reason : '');
+ }
+ else {
+ this.conn.close();
+ }
+ this.conn = null;
+ // remove open handles
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.reconnectTimer.reset();
+ }
+ }
+ /**
+ * Returns all created channels
+ */
+ getChannels() {
+ return this.channels;
+ }
+ /**
+ * Unsubscribes and removes a single channel
+ * @param channel A RealtimeChannel instance
+ */
+ async removeChannel(channel) {
+ const status = await channel.unsubscribe();
+ if (this.channels.length === 0) {
+ this.disconnect();
+ }
+ return status;
+ }
+ /**
+ * Unsubscribes and removes all channels
+ */
+ async removeAllChannels() {
+ const values_1 = await Promise.all(this.channels.map((channel) => channel.unsubscribe()));
+ this.disconnect();
+ return values_1;
+ }
+ /**
+ * Logs the message.
+ *
+ * For customized logging, `this.logger` can be overridden.
+ */
+ log(kind, msg, data) {
+ this.logger(kind, msg, data);
+ }
+ /**
+ * Returns the current state of the socket.
+ */
+ connectionState() {
+ switch (this.conn && this.conn.readyState) {
+ case SOCKET_STATES.connecting:
+ return CONNECTION_STATE.Connecting;
+ case SOCKET_STATES.open:
+ return CONNECTION_STATE.Open;
+ case SOCKET_STATES.closing:
+ return CONNECTION_STATE.Closing;
+ default:
+ return CONNECTION_STATE.Closed;
+ }
+ }
+ /**
+ * Returns `true` is the connection is open.
+ */
+ isConnected() {
+ return this.connectionState() === CONNECTION_STATE.Open;
+ }
+ channel(topic, params = { config: {} }) {
+ const chan = new RealtimeChannel(`realtime:${topic}`, params, this);
+ this.channels.push(chan);
+ return chan;
+ }
+ /**
+ * Push out a message if the socket is connected.
+ *
+ * If the socket is not connected, the message gets enqueued within a local buffer, and sent out when a connection is next established.
+ */
+ push(data) {
+ const { topic, event, payload, ref } = data;
+ const callback = () => {
+ this.encode(data, (result) => {
+ var _a;
+ (_a = this.conn) === null || _a === void 0 ? void 0 : _a.send(result);
+ });
+ };
+ this.log('push', `${topic} ${event} (${ref})`, payload);
+ if (this.isConnected()) {
+ callback();
+ }
+ else {
+ this.sendBuffer.push(callback);
+ }
+ }
+ /**
+ * Sets the JWT access token used for channel subscription authorization and Realtime RLS.
+ *
+ * If param is null it will use the `accessToken` callback function or the token set on the client.
+ *
+ * On callback used, it will set the value of the token internal to the client.
+ *
+ * @param token A JWT string to override the token set on the client.
+ */
+ async setAuth(token = null) {
+ let tokenToSend = token ||
+ (this.accessToken && (await this.accessToken())) ||
+ this.accessTokenValue;
+ if (tokenToSend) {
+ let parsed = null;
+ try {
+ parsed = JSON.parse(atob(tokenToSend.split('.')[1]));
+ }
+ catch (_error) { }
+ if (parsed && parsed.exp) {
+ let now = Math.floor(Date.now() / 1000);
+ let valid = now - parsed.exp < 0;
+ if (!valid) {
+ this.log('auth', `InvalidJWTToken: Invalid value for JWT claim "exp" with value ${parsed.exp}`);
+ return Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${parsed.exp}`);
+ }
+ }
+ this.accessTokenValue = tokenToSend;
+ this.channels.forEach((channel) => {
+ tokenToSend && channel.updateJoinPayload({ access_token: tokenToSend });
+ if (channel.joinedOnce && channel._isJoined()) {
+ channel._push(CHANNEL_EVENTS.access_token, {
+ access_token: tokenToSend,
+ });
+ }
+ });
+ }
+ }
+ /**
+ * Sends a heartbeat message if the socket is connected.
+ */
+ async sendHeartbeat() {
+ var _a;
+ if (!this.isConnected()) {
+ return;
+ }
+ if (this.pendingHeartbeatRef) {
+ this.pendingHeartbeatRef = null;
+ this.log('transport', 'heartbeat timeout. Attempting to re-establish connection');
+ (_a = this.conn) === null || _a === void 0 ? void 0 : _a.close(WS_CLOSE_NORMAL, 'hearbeat timeout');
+ return;
+ }
+ this.pendingHeartbeatRef = this._makeRef();
+ this.push({
+ topic: 'phoenix',
+ event: 'heartbeat',
+ payload: {},
+ ref: this.pendingHeartbeatRef,
+ });
+ this.setAuth();
+ }
+ /**
+ * Flushes send buffer
+ */
+ flushSendBuffer() {
+ if (this.isConnected() && this.sendBuffer.length > 0) {
+ this.sendBuffer.forEach((callback) => callback());
+ this.sendBuffer = [];
+ }
+ }
+ /**
+ * Return the next message ref, accounting for overflows
+ *
+ * @internal
+ */
+ _makeRef() {
+ let newRef = this.ref + 1;
+ if (newRef === this.ref) {
+ this.ref = 0;
+ }
+ else {
+ this.ref = newRef;
+ }
+ return this.ref.toString();
+ }
+ /**
+ * Unsubscribe from channels with the specified topic.
+ *
+ * @internal
+ */
+ _leaveOpenTopic(topic) {
+ let dupChannel = this.channels.find((c) => c.topic === topic && (c._isJoined() || c._isJoining()));
+ if (dupChannel) {
+ this.log('transport', `leaving duplicate topic "${topic}"`);
+ dupChannel.unsubscribe();
+ }
+ }
+ /**
+ * Removes a subscription from the socket.
+ *
+ * @param channel An open subscription.
+ *
+ * @internal
+ */
+ _remove(channel) {
+ this.channels = this.channels.filter((c) => c._joinRef() !== channel._joinRef());
+ }
+ /**
+ * Sets up connection handlers.
+ *
+ * @internal
+ */
+ setupConnection() {
+ if (this.conn) {
+ this.conn.binaryType = 'arraybuffer';
+ this.conn.onopen = () => this._onConnOpen();
+ this.conn.onerror = (error) => this._onConnError(error);
+ this.conn.onmessage = (event) => this._onConnMessage(event);
+ this.conn.onclose = (event) => this._onConnClose(event);
+ }
+ }
+ /** @internal */
+ _onConnMessage(rawMessage) {
+ this.decode(rawMessage.data, (msg) => {
+ let { topic, event, payload, ref } = msg;
+ if (ref && ref === this.pendingHeartbeatRef) {
+ this.pendingHeartbeatRef = null;
+ }
+ this.log('receive', `${payload.status || ''} ${topic} ${event} ${(ref && '(' + ref + ')') || ''}`, payload);
+ this.channels
+ .filter((channel) => channel._isMember(topic))
+ .forEach((channel) => channel._trigger(event, payload, ref));
+ this.stateChangeCallbacks.message.forEach((callback) => callback(msg));
+ });
+ }
+ /** @internal */
+ async _onConnOpen() {
+ this.log('transport', `connected to ${this.endpointURL()}`);
+ this.flushSendBuffer();
+ this.reconnectTimer.reset();
+ if (!this.worker) {
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.heartbeatTimer = setInterval(() => this.sendHeartbeat(), this.heartbeatIntervalMs);
+ }
+ else {
+ if (this.workerUrl) {
+ this.log('worker', `starting worker for from ${this.workerUrl}`);
+ }
+ else {
+ this.log('worker', `starting default worker`);
+ }
+ const objectUrl = this._workerObjectUrl(this.workerUrl);
+ this.workerRef = new Worker(objectUrl);
+ this.workerRef.onerror = (error) => {
+ this.log('worker', 'worker error', error.message);
+ this.workerRef.terminate();
+ };
+ this.workerRef.onmessage = (event) => {
+ if (event.data.event === 'keepAlive') {
+ this.sendHeartbeat();
+ }
+ };
+ this.workerRef.postMessage({
+ event: 'start',
+ interval: this.heartbeatIntervalMs,
+ });
+ }
+ this.stateChangeCallbacks.open.forEach((callback) => callback());
+ }
+ /** @internal */
+ _onConnClose(event) {
+ this.log('transport', 'close', event);
+ this._triggerChanError();
+ this.heartbeatTimer && clearInterval(this.heartbeatTimer);
+ this.reconnectTimer.scheduleTimeout();
+ this.stateChangeCallbacks.close.forEach((callback) => callback(event));
+ }
+ /** @internal */
+ _onConnError(error) {
+ this.log('transport', error.message);
+ this._triggerChanError();
+ this.stateChangeCallbacks.error.forEach((callback) => callback(error));
+ }
+ /** @internal */
+ _triggerChanError() {
+ this.channels.forEach((channel) => channel._trigger(CHANNEL_EVENTS.error));
+ }
+ /** @internal */
+ _appendParams(url, params) {
+ if (Object.keys(params).length === 0) {
+ return url;
+ }
+ const prefix = url.match(/\?/) ? '&' : '?';
+ const query = new URLSearchParams(params);
+ return `${url}${prefix}${query}`;
+ }
+ _workerObjectUrl(url) {
+ let result_url;
+ if (url) {
+ result_url = url;
+ }
+ else {
+ const blob = new Blob([WORKER_SCRIPT], { type: 'application/javascript' });
+ result_url = URL.createObjectURL(blob);
+ }
+ return result_url;
+ }
+}
+class WSWebSocketDummy {
+ constructor(address, _protocols, options) {
+ this.binaryType = 'arraybuffer';
+ this.onclose = () => { };
+ this.onerror = () => { };
+ this.onmessage = () => { };
+ this.onopen = () => { };
+ this.readyState = SOCKET_STATES.connecting;
+ this.send = () => { };
+ this.url = null;
+ this.url = address;
+ this.close = options.close;
+ }
+}
+//# sourceMappingURL=RealtimeClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js b/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js
new file mode 100644
index 0000000..1fd672c
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js
@@ -0,0 +1,224 @@
+/*
+ This file draws heavily from https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/assets/js/phoenix/presence.js
+ License: https://github.com/phoenixframework/phoenix/blob/d344ec0a732ab4ee204215b31de69cf4be72e3bf/LICENSE.md
+*/
+export var REALTIME_PRESENCE_LISTEN_EVENTS;
+(function (REALTIME_PRESENCE_LISTEN_EVENTS) {
+ REALTIME_PRESENCE_LISTEN_EVENTS["SYNC"] = "sync";
+ REALTIME_PRESENCE_LISTEN_EVENTS["JOIN"] = "join";
+ REALTIME_PRESENCE_LISTEN_EVENTS["LEAVE"] = "leave";
+})(REALTIME_PRESENCE_LISTEN_EVENTS || (REALTIME_PRESENCE_LISTEN_EVENTS = {}));
+export default class RealtimePresence {
+ /**
+ * Initializes the Presence.
+ *
+ * @param channel - The RealtimeChannel
+ * @param opts - The options,
+ * for example `{events: {state: 'state', diff: 'diff'}}`
+ */
+ constructor(channel, opts) {
+ this.channel = channel;
+ this.state = {};
+ this.pendingDiffs = [];
+ this.joinRef = null;
+ this.caller = {
+ onJoin: () => { },
+ onLeave: () => { },
+ onSync: () => { },
+ };
+ const events = (opts === null || opts === void 0 ? void 0 : opts.events) || {
+ state: 'presence_state',
+ diff: 'presence_diff',
+ };
+ this.channel._on(events.state, {}, (newState) => {
+ const { onJoin, onLeave, onSync } = this.caller;
+ this.joinRef = this.channel._joinRef();
+ this.state = RealtimePresence.syncState(this.state, newState, onJoin, onLeave);
+ this.pendingDiffs.forEach((diff) => {
+ this.state = RealtimePresence.syncDiff(this.state, diff, onJoin, onLeave);
+ });
+ this.pendingDiffs = [];
+ onSync();
+ });
+ this.channel._on(events.diff, {}, (diff) => {
+ const { onJoin, onLeave, onSync } = this.caller;
+ if (this.inPendingSyncState()) {
+ this.pendingDiffs.push(diff);
+ }
+ else {
+ this.state = RealtimePresence.syncDiff(this.state, diff, onJoin, onLeave);
+ onSync();
+ }
+ });
+ this.onJoin((key, currentPresences, newPresences) => {
+ this.channel._trigger('presence', {
+ event: 'join',
+ key,
+ currentPresences,
+ newPresences,
+ });
+ });
+ this.onLeave((key, currentPresences, leftPresences) => {
+ this.channel._trigger('presence', {
+ event: 'leave',
+ key,
+ currentPresences,
+ leftPresences,
+ });
+ });
+ this.onSync(() => {
+ this.channel._trigger('presence', { event: 'sync' });
+ });
+ }
+ /**
+ * Used to sync the list of presences on the server with the
+ * client's state.
+ *
+ * An optional `onJoin` and `onLeave` callback can be provided to
+ * react to changes in the client's local presences across
+ * disconnects and reconnects with the server.
+ *
+ * @internal
+ */
+ static syncState(currentState, newState, onJoin, onLeave) {
+ const state = this.cloneDeep(currentState);
+ const transformedState = this.transformState(newState);
+ const joins = {};
+ const leaves = {};
+ this.map(state, (key, presences) => {
+ if (!transformedState[key]) {
+ leaves[key] = presences;
+ }
+ });
+ this.map(transformedState, (key, newPresences) => {
+ const currentPresences = state[key];
+ if (currentPresences) {
+ const newPresenceRefs = newPresences.map((m) => m.presence_ref);
+ const curPresenceRefs = currentPresences.map((m) => m.presence_ref);
+ const joinedPresences = newPresences.filter((m) => curPresenceRefs.indexOf(m.presence_ref) < 0);
+ const leftPresences = currentPresences.filter((m) => newPresenceRefs.indexOf(m.presence_ref) < 0);
+ if (joinedPresences.length > 0) {
+ joins[key] = joinedPresences;
+ }
+ if (leftPresences.length > 0) {
+ leaves[key] = leftPresences;
+ }
+ }
+ else {
+ joins[key] = newPresences;
+ }
+ });
+ return this.syncDiff(state, { joins, leaves }, onJoin, onLeave);
+ }
+ /**
+ * Used to sync a diff of presence join and leave events from the
+ * server, as they happen.
+ *
+ * Like `syncState`, `syncDiff` accepts optional `onJoin` and
+ * `onLeave` callbacks to react to a user joining or leaving from a
+ * device.
+ *
+ * @internal
+ */
+ static syncDiff(state, diff, onJoin, onLeave) {
+ const { joins, leaves } = {
+ joins: this.transformState(diff.joins),
+ leaves: this.transformState(diff.leaves),
+ };
+ if (!onJoin) {
+ onJoin = () => { };
+ }
+ if (!onLeave) {
+ onLeave = () => { };
+ }
+ this.map(joins, (key, newPresences) => {
+ var _a;
+ const currentPresences = (_a = state[key]) !== null && _a !== void 0 ? _a : [];
+ state[key] = this.cloneDeep(newPresences);
+ if (currentPresences.length > 0) {
+ const joinedPresenceRefs = state[key].map((m) => m.presence_ref);
+ const curPresences = currentPresences.filter((m) => joinedPresenceRefs.indexOf(m.presence_ref) < 0);
+ state[key].unshift(...curPresences);
+ }
+ onJoin(key, currentPresences, newPresences);
+ });
+ this.map(leaves, (key, leftPresences) => {
+ let currentPresences = state[key];
+ if (!currentPresences)
+ return;
+ const presenceRefsToRemove = leftPresences.map((m) => m.presence_ref);
+ currentPresences = currentPresences.filter((m) => presenceRefsToRemove.indexOf(m.presence_ref) < 0);
+ state[key] = currentPresences;
+ onLeave(key, currentPresences, leftPresences);
+ if (currentPresences.length === 0)
+ delete state[key];
+ });
+ return state;
+ }
+ /** @internal */
+ static map(obj, func) {
+ return Object.getOwnPropertyNames(obj).map((key) => func(key, obj[key]));
+ }
+ /**
+ * Remove 'metas' key
+ * Change 'phx_ref' to 'presence_ref'
+ * Remove 'phx_ref' and 'phx_ref_prev'
+ *
+ * @example
+ * // returns {
+ * abc123: [
+ * { presence_ref: '2', user_id: 1 },
+ * { presence_ref: '3', user_id: 2 }
+ * ]
+ * }
+ * RealtimePresence.transformState({
+ * abc123: {
+ * metas: [
+ * { phx_ref: '2', phx_ref_prev: '1' user_id: 1 },
+ * { phx_ref: '3', user_id: 2 }
+ * ]
+ * }
+ * })
+ *
+ * @internal
+ */
+ static transformState(state) {
+ state = this.cloneDeep(state);
+ return Object.getOwnPropertyNames(state).reduce((newState, key) => {
+ const presences = state[key];
+ if ('metas' in presences) {
+ newState[key] = presences.metas.map((presence) => {
+ presence['presence_ref'] = presence['phx_ref'];
+ delete presence['phx_ref'];
+ delete presence['phx_ref_prev'];
+ return presence;
+ });
+ }
+ else {
+ newState[key] = presences;
+ }
+ return newState;
+ }, {});
+ }
+ /** @internal */
+ static cloneDeep(obj) {
+ return JSON.parse(JSON.stringify(obj));
+ }
+ /** @internal */
+ onJoin(callback) {
+ this.caller.onJoin = callback;
+ }
+ /** @internal */
+ onLeave(callback) {
+ this.caller.onLeave = callback;
+ }
+ /** @internal */
+ onSync(callback) {
+ this.caller.onSync = callback;
+ }
+ /** @internal */
+ inPendingSyncState() {
+ return !this.joinRef || this.joinRef !== this.channel._joinRef();
+ }
+}
+//# sourceMappingURL=RealtimePresence.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/index.js b/node_modules/@supabase/realtime-js/dist/module/index.js
new file mode 100644
index 0000000..29f8f22
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/index.js
@@ -0,0 +1,5 @@
+import RealtimeClient from './RealtimeClient';
+import RealtimeChannel, { REALTIME_LISTEN_TYPES, REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, REALTIME_SUBSCRIBE_STATES, REALTIME_CHANNEL_STATES, } from './RealtimeChannel';
+import RealtimePresence, { REALTIME_PRESENCE_LISTEN_EVENTS, } from './RealtimePresence';
+export { RealtimePresence, RealtimeChannel, RealtimeClient, REALTIME_LISTEN_TYPES, REALTIME_POSTGRES_CHANGES_LISTEN_EVENT, REALTIME_PRESENCE_LISTEN_EVENTS, REALTIME_SUBSCRIBE_STATES, REALTIME_CHANNEL_STATES, };
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/constants.js b/node_modules/@supabase/realtime-js/dist/module/lib/constants.js
new file mode 100644
index 0000000..19a6c41
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/constants.js
@@ -0,0 +1,41 @@
+import { version } from './version';
+export const DEFAULT_HEADERS = { 'X-Client-Info': `realtime-js/${version}` };
+export const VSN = '1.0.0';
+export const DEFAULT_TIMEOUT = 10000;
+export const WS_CLOSE_NORMAL = 1000;
+export var SOCKET_STATES;
+(function (SOCKET_STATES) {
+ SOCKET_STATES[SOCKET_STATES["connecting"] = 0] = "connecting";
+ SOCKET_STATES[SOCKET_STATES["open"] = 1] = "open";
+ SOCKET_STATES[SOCKET_STATES["closing"] = 2] = "closing";
+ SOCKET_STATES[SOCKET_STATES["closed"] = 3] = "closed";
+})(SOCKET_STATES || (SOCKET_STATES = {}));
+export var CHANNEL_STATES;
+(function (CHANNEL_STATES) {
+ CHANNEL_STATES["closed"] = "closed";
+ CHANNEL_STATES["errored"] = "errored";
+ CHANNEL_STATES["joined"] = "joined";
+ CHANNEL_STATES["joining"] = "joining";
+ CHANNEL_STATES["leaving"] = "leaving";
+})(CHANNEL_STATES || (CHANNEL_STATES = {}));
+export var CHANNEL_EVENTS;
+(function (CHANNEL_EVENTS) {
+ CHANNEL_EVENTS["close"] = "phx_close";
+ CHANNEL_EVENTS["error"] = "phx_error";
+ CHANNEL_EVENTS["join"] = "phx_join";
+ CHANNEL_EVENTS["reply"] = "phx_reply";
+ CHANNEL_EVENTS["leave"] = "phx_leave";
+ CHANNEL_EVENTS["access_token"] = "access_token";
+})(CHANNEL_EVENTS || (CHANNEL_EVENTS = {}));
+export var TRANSPORTS;
+(function (TRANSPORTS) {
+ TRANSPORTS["websocket"] = "websocket";
+})(TRANSPORTS || (TRANSPORTS = {}));
+export var CONNECTION_STATE;
+(function (CONNECTION_STATE) {
+ CONNECTION_STATE["Connecting"] = "connecting";
+ CONNECTION_STATE["Open"] = "open";
+ CONNECTION_STATE["Closing"] = "closing";
+ CONNECTION_STATE["Closed"] = "closed";
+})(CONNECTION_STATE || (CONNECTION_STATE = {}));
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/push.js b/node_modules/@supabase/realtime-js/dist/module/lib/push.js
new file mode 100644
index 0000000..fbbe258
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/push.js
@@ -0,0 +1,101 @@
+import { DEFAULT_TIMEOUT } from '../lib/constants';
+export default class Push {
+ /**
+ * Initializes the Push
+ *
+ * @param channel The Channel
+ * @param event The event, for example `"phx_join"`
+ * @param payload The payload, for example `{user_id: 123}`
+ * @param timeout The push timeout in milliseconds
+ */
+ constructor(channel, event, payload = {}, timeout = DEFAULT_TIMEOUT) {
+ this.channel = channel;
+ this.event = event;
+ this.payload = payload;
+ this.timeout = timeout;
+ this.sent = false;
+ this.timeoutTimer = undefined;
+ this.ref = '';
+ this.receivedResp = null;
+ this.recHooks = [];
+ this.refEvent = null;
+ }
+ resend(timeout) {
+ this.timeout = timeout;
+ this._cancelRefEvent();
+ this.ref = '';
+ this.refEvent = null;
+ this.receivedResp = null;
+ this.sent = false;
+ this.send();
+ }
+ send() {
+ if (this._hasReceived('timeout')) {
+ return;
+ }
+ this.startTimeout();
+ this.sent = true;
+ this.channel.socket.push({
+ topic: this.channel.topic,
+ event: this.event,
+ payload: this.payload,
+ ref: this.ref,
+ join_ref: this.channel._joinRef(),
+ });
+ }
+ updatePayload(payload) {
+ this.payload = Object.assign(Object.assign({}, this.payload), payload);
+ }
+ receive(status, callback) {
+ var _a;
+ if (this._hasReceived(status)) {
+ callback((_a = this.receivedResp) === null || _a === void 0 ? void 0 : _a.response);
+ }
+ this.recHooks.push({ status, callback });
+ return this;
+ }
+ startTimeout() {
+ if (this.timeoutTimer) {
+ return;
+ }
+ this.ref = this.channel.socket._makeRef();
+ this.refEvent = this.channel._replyEventName(this.ref);
+ const callback = (payload) => {
+ this._cancelRefEvent();
+ this._cancelTimeout();
+ this.receivedResp = payload;
+ this._matchReceive(payload);
+ };
+ this.channel._on(this.refEvent, {}, callback);
+ this.timeoutTimer = setTimeout(() => {
+ this.trigger('timeout', {});
+ }, this.timeout);
+ }
+ trigger(status, response) {
+ if (this.refEvent)
+ this.channel._trigger(this.refEvent, { status, response });
+ }
+ destroy() {
+ this._cancelRefEvent();
+ this._cancelTimeout();
+ }
+ _cancelRefEvent() {
+ if (!this.refEvent) {
+ return;
+ }
+ this.channel._off(this.refEvent, {});
+ }
+ _cancelTimeout() {
+ clearTimeout(this.timeoutTimer);
+ this.timeoutTimer = undefined;
+ }
+ _matchReceive({ status, response, }) {
+ this.recHooks
+ .filter((h) => h.status === status)
+ .forEach((h) => h.callback(response));
+ }
+ _hasReceived(status) {
+ return this.receivedResp && this.receivedResp.status === status;
+ }
+}
+//# sourceMappingURL=push.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js b/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js
new file mode 100644
index 0000000..f816d40
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js
@@ -0,0 +1,33 @@
+// This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe
+// License: https://github.com/phoenixframework/phoenix/blob/master/LICENSE.md
+export default class Serializer {
+ constructor() {
+ this.HEADER_LENGTH = 1;
+ }
+ decode(rawPayload, callback) {
+ if (rawPayload.constructor === ArrayBuffer) {
+ return callback(this._binaryDecode(rawPayload));
+ }
+ if (typeof rawPayload === 'string') {
+ return callback(JSON.parse(rawPayload));
+ }
+ return callback({});
+ }
+ _binaryDecode(buffer) {
+ const view = new DataView(buffer);
+ const decoder = new TextDecoder();
+ return this._decodeBroadcast(buffer, view, decoder);
+ }
+ _decodeBroadcast(buffer, view, decoder) {
+ const topicSize = view.getUint8(1);
+ const eventSize = view.getUint8(2);
+ let offset = this.HEADER_LENGTH + 2;
+ const topic = decoder.decode(buffer.slice(offset, offset + topicSize));
+ offset = offset + topicSize;
+ const event = decoder.decode(buffer.slice(offset, offset + eventSize));
+ offset = offset + eventSize;
+ const data = JSON.parse(decoder.decode(buffer.slice(offset, buffer.byteLength)));
+ return { ref: null, topic: topic, event: event, payload: data };
+ }
+}
+//# sourceMappingURL=serializer.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/timer.js b/node_modules/@supabase/realtime-js/dist/module/lib/timer.js
new file mode 100644
index 0000000..e0921f0
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/timer.js
@@ -0,0 +1,35 @@
+/**
+ * Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff.
+ *
+ * @example
+ * let reconnectTimer = new Timer(() => this.connect(), function(tries){
+ * return [1000, 5000, 10000][tries - 1] || 10000
+ * })
+ * reconnectTimer.scheduleTimeout() // fires after 1000
+ * reconnectTimer.scheduleTimeout() // fires after 5000
+ * reconnectTimer.reset()
+ * reconnectTimer.scheduleTimeout() // fires after 1000
+ */
+export default class Timer {
+ constructor(callback, timerCalc) {
+ this.callback = callback;
+ this.timerCalc = timerCalc;
+ this.timer = undefined;
+ this.tries = 0;
+ this.callback = callback;
+ this.timerCalc = timerCalc;
+ }
+ reset() {
+ this.tries = 0;
+ clearTimeout(this.timer);
+ }
+ // Cancels any previous scheduleTimeout and schedules callback
+ scheduleTimeout() {
+ clearTimeout(this.timer);
+ this.timer = setTimeout(() => {
+ this.tries = this.tries + 1;
+ this.callback();
+ }, this.timerCalc(this.tries + 1));
+ }
+}
+//# sourceMappingURL=timer.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js b/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js
new file mode 100644
index 0000000..8f34bb8
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js
@@ -0,0 +1,217 @@
+/**
+ * Helpers to convert the change Payload into native JS types.
+ */
+// Adapted from epgsql (src/epgsql_binary.erl), this module licensed under
+// 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE
+export var PostgresTypes;
+(function (PostgresTypes) {
+ PostgresTypes["abstime"] = "abstime";
+ PostgresTypes["bool"] = "bool";
+ PostgresTypes["date"] = "date";
+ PostgresTypes["daterange"] = "daterange";
+ PostgresTypes["float4"] = "float4";
+ PostgresTypes["float8"] = "float8";
+ PostgresTypes["int2"] = "int2";
+ PostgresTypes["int4"] = "int4";
+ PostgresTypes["int4range"] = "int4range";
+ PostgresTypes["int8"] = "int8";
+ PostgresTypes["int8range"] = "int8range";
+ PostgresTypes["json"] = "json";
+ PostgresTypes["jsonb"] = "jsonb";
+ PostgresTypes["money"] = "money";
+ PostgresTypes["numeric"] = "numeric";
+ PostgresTypes["oid"] = "oid";
+ PostgresTypes["reltime"] = "reltime";
+ PostgresTypes["text"] = "text";
+ PostgresTypes["time"] = "time";
+ PostgresTypes["timestamp"] = "timestamp";
+ PostgresTypes["timestamptz"] = "timestamptz";
+ PostgresTypes["timetz"] = "timetz";
+ PostgresTypes["tsrange"] = "tsrange";
+ PostgresTypes["tstzrange"] = "tstzrange";
+})(PostgresTypes || (PostgresTypes = {}));
+/**
+ * Takes an array of columns and an object of string values then converts each string value
+ * to its mapped type.
+ *
+ * @param {{name: String, type: String}[]} columns
+ * @param {Object} record
+ * @param {Object} options The map of various options that can be applied to the mapper
+ * @param {Array} options.skipTypes The array of types that should not be converted
+ *
+ * @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})
+ * //=>{ first_name: 'Paul', age: 33 }
+ */
+export const convertChangeData = (columns, record, options = {}) => {
+ var _a;
+ const skipTypes = (_a = options.skipTypes) !== null && _a !== void 0 ? _a : [];
+ return Object.keys(record).reduce((acc, rec_key) => {
+ acc[rec_key] = convertColumn(rec_key, columns, record, skipTypes);
+ return acc;
+ }, {});
+};
+/**
+ * Converts the value of an individual column.
+ *
+ * @param {String} columnName The column that you want to convert
+ * @param {{name: String, type: String}[]} columns All of the columns
+ * @param {Object} record The map of string values
+ * @param {Array} skipTypes An array of types that should not be converted
+ * @return {object} Useless information
+ *
+ * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, [])
+ * //=> 33
+ * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age: '33'}, ['int4'])
+ * //=> "33"
+ */
+export const convertColumn = (columnName, columns, record, skipTypes) => {
+ const column = columns.find((x) => x.name === columnName);
+ const colType = column === null || column === void 0 ? void 0 : column.type;
+ const value = record[columnName];
+ if (colType && !skipTypes.includes(colType)) {
+ return convertCell(colType, value);
+ }
+ return noop(value);
+};
+/**
+ * If the value of the cell is `null`, returns null.
+ * Otherwise converts the string value to the correct type.
+ * @param {String} type A postgres column type
+ * @param {String} value The cell value
+ *
+ * @example convertCell('bool', 't')
+ * //=> true
+ * @example convertCell('int8', '10')
+ * //=> 10
+ * @example convertCell('_int4', '{1,2,3,4}')
+ * //=> [1,2,3,4]
+ */
+export const convertCell = (type, value) => {
+ // if data type is an array
+ if (type.charAt(0) === '_') {
+ const dataType = type.slice(1, type.length);
+ return toArray(value, dataType);
+ }
+ // If not null, convert to correct type.
+ switch (type) {
+ case PostgresTypes.bool:
+ return toBoolean(value);
+ case PostgresTypes.float4:
+ case PostgresTypes.float8:
+ case PostgresTypes.int2:
+ case PostgresTypes.int4:
+ case PostgresTypes.int8:
+ case PostgresTypes.numeric:
+ case PostgresTypes.oid:
+ return toNumber(value);
+ case PostgresTypes.json:
+ case PostgresTypes.jsonb:
+ return toJson(value);
+ case PostgresTypes.timestamp:
+ return toTimestampString(value); // Format to be consistent with PostgREST
+ case PostgresTypes.abstime: // To allow users to cast it based on Timezone
+ case PostgresTypes.date: // To allow users to cast it based on Timezone
+ case PostgresTypes.daterange:
+ case PostgresTypes.int4range:
+ case PostgresTypes.int8range:
+ case PostgresTypes.money:
+ case PostgresTypes.reltime: // To allow users to cast it based on Timezone
+ case PostgresTypes.text:
+ case PostgresTypes.time: // To allow users to cast it based on Timezone
+ case PostgresTypes.timestamptz: // To allow users to cast it based on Timezone
+ case PostgresTypes.timetz: // To allow users to cast it based on Timezone
+ case PostgresTypes.tsrange:
+ case PostgresTypes.tstzrange:
+ return noop(value);
+ default:
+ // Return the value for remaining types
+ return noop(value);
+ }
+};
+const noop = (value) => {
+ return value;
+};
+export const toBoolean = (value) => {
+ switch (value) {
+ case 't':
+ return true;
+ case 'f':
+ return false;
+ default:
+ return value;
+ }
+};
+export const toNumber = (value) => {
+ if (typeof value === 'string') {
+ const parsedValue = parseFloat(value);
+ if (!Number.isNaN(parsedValue)) {
+ return parsedValue;
+ }
+ }
+ return value;
+};
+export const toJson = (value) => {
+ if (typeof value === 'string') {
+ try {
+ return JSON.parse(value);
+ }
+ catch (error) {
+ console.log(`JSON parse error: ${error}`);
+ return value;
+ }
+ }
+ return value;
+};
+/**
+ * Converts a Postgres Array into a native JS array
+ *
+ * @example toArray('{}', 'int4')
+ * //=> []
+ * @example toArray('{"[2021-01-01,2021-12-31)","(2021-01-01,2021-12-32]"}', 'daterange')
+ * //=> ['[2021-01-01,2021-12-31)', '(2021-01-01,2021-12-32]']
+ * @example toArray([1,2,3,4], 'int4')
+ * //=> [1,2,3,4]
+ */
+export const toArray = (value, type) => {
+ if (typeof value !== 'string') {
+ return value;
+ }
+ const lastIdx = value.length - 1;
+ const closeBrace = value[lastIdx];
+ const openBrace = value[0];
+ // Confirm value is a Postgres array by checking curly brackets
+ if (openBrace === '{' && closeBrace === '}') {
+ let arr;
+ const valTrim = value.slice(1, lastIdx);
+ // TODO: find a better solution to separate Postgres array data
+ try {
+ arr = JSON.parse('[' + valTrim + ']');
+ }
+ catch (_) {
+ // WARNING: splitting on comma does not cover all edge cases
+ arr = valTrim ? valTrim.split(',') : [];
+ }
+ return arr.map((val) => convertCell(type, val));
+ }
+ return value;
+};
+/**
+ * Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'
+ * See https://github.com/supabase/supabase/issues/18
+ *
+ * @example toTimestampString('2019-09-10 00:00:00')
+ * //=> '2019-09-10T00:00:00'
+ */
+export const toTimestampString = (value) => {
+ if (typeof value === 'string') {
+ return value.replace(' ', 'T');
+ }
+ return value;
+};
+export const httpEndpointURL = (socketUrl) => {
+ let url = socketUrl;
+ url = url.replace(/^ws/i, 'http');
+ url = url.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i, '');
+ return url.replace(/\/+$/, '');
+};
+//# sourceMappingURL=transformers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/dist/module/lib/version.js b/node_modules/@supabase/realtime-js/dist/module/lib/version.js
new file mode 100644
index 0000000..5137ca2
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/dist/module/lib/version.js
@@ -0,0 +1,2 @@
+export const version = '2.11.2';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/realtime-js/package.json b/node_modules/@supabase/realtime-js/package.json
new file mode 100644
index 0000000..0855e6a
--- /dev/null
+++ b/node_modules/@supabase/realtime-js/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@supabase/realtime-js",
+ "version": "2.11.2",
+ "description": "Listen to realtime updates to your PostgreSQL database",
+ "keywords": [
+ "realtime",
+ "phoenix",
+ "elixir",
+ "javascript",
+ "typescript",
+ "firebase",
+ "supabase"
+ ],
+ "homepage": "https://github.com/supabase/realtime-js",
+ "bugs": "https://github.com/supabase/realtime-js/issues",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "main": "dist/main/index.js",
+ "module": "dist/module/index.js",
+ "types": "dist/module/index.d.ts",
+ "repository": "https://github.com/supabase/realtime-js",
+ "author": "Supabase",
+ "license": "MIT",
+ "scripts": {
+ "clean": "rimraf dist docs/v2",
+ "format": "prettier --write \"{src,test}/**/*.ts\"",
+ "build": "run-s clean format build:*",
+ "build:main": "tsc -p tsconfig.json",
+ "build:module": "tsc -p tsconfig.module.json",
+ "test": "vitest run",
+ "test:watch": "vitest",
+ "coverage": "vitest run --coverage",
+ "docs": "typedoc src/index.ts --out docs/v2",
+ "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals src/index.ts",
+ "check-exports": "attw --pack .",
+ "ci": "run-s test coverage"
+ },
+ "dependencies": {
+ "@supabase/node-fetch": "^2.6.14",
+ "@types/phoenix": "^1.5.4",
+ "@types/ws": "^8.5.10",
+ "ws": "^8.18.0"
+ },
+ "devDependencies": {
+ "@arethetypeswrong/cli": "^0.16.2",
+ "@types/sinon": "^17.0.3",
+ "@vitest/coverage-v8": "^2.0.5",
+ "eslint": "^7.0.0",
+ "esm": "^3.2.25",
+ "jsdom": "^16.7.0",
+ "jsdom-global": "3.0.0",
+ "jsonwebtoken": "^9.0.2",
+ "mock-socket": "^9.3.1",
+ "npm-run-all": "^4.1.5",
+ "nyc": "^15.1.0",
+ "prettier": "^2.1.2",
+ "semantic-release-plugin-update-version-in-files": "^1.1.0",
+ "sinon": "^18.0.0",
+ "typedoc": "^0.22.16",
+ "typescript": "^4.0.3",
+ "vitest": "^2.0.5",
+ "web-worker": "1.2.0"
+ }
+}
diff --git a/node_modules/@supabase/storage-js/LICENSE b/node_modules/@supabase/storage-js/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/node_modules/@supabase/storage-js/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@supabase/storage-js/README.md b/node_modules/@supabase/storage-js/README.md
new file mode 100644
index 0000000..d2188b5
--- /dev/null
+++ b/node_modules/@supabase/storage-js/README.md
@@ -0,0 +1,157 @@
+# `storage-js`
+
+JS Client library to interact with Supabase Storage.
+
+- Documentation: https://supabase.io/docs/reference/javascript/storage-createbucket
+
+## Quick Start Guide
+
+### Installing the module
+
+```bash
+npm install @supabase/storage-js
+```
+
+### Connecting to the storage backend
+
+```js
+import { StorageClient } from '@supabase/storage-js'
+
+const STORAGE_URL = 'https://.supabase.co/storage/v1'
+const SERVICE_KEY = '' //! service key, not anon key
+
+const storageClient = new StorageClient(STORAGE_URL, {
+ apikey: SERVICE_KEY,
+ Authorization: `Bearer ${SERVICE_KEY}`,
+})
+```
+
+### Handling resources
+
+#### Handling Storage Buckets
+
+- Create a new Storage bucket:
+
+ ```js
+ const { data, error } = await storageClient.createBucket(
+ 'test_bucket', // Bucket name (must be unique)
+ { public: false } // Bucket options
+ )
+ ```
+
+- Retrieve the details of an existing Storage bucket:
+
+ ```js
+ const { data, error } = await storageClient.getBucket('test_bucket')
+ ```
+
+- Update a new Storage bucket:
+
+ ```js
+ const { data, error } = await storageClient.updateBucket(
+ 'test_bucket', // Bucket name
+ { public: false } // Bucket options
+ )
+ ```
+
+- Remove all objects inside a single bucket:
+
+ ```js
+ const { data, error } = await storageClient.emptyBucket('test_bucket')
+ ```
+
+- Delete an existing bucket (a bucket can't be deleted with existing objects inside it):
+
+ ```js
+ const { data, error } = await storageClient.deleteBucket('test_bucket')
+ ```
+
+- Retrieve the details of all Storage buckets within an existing project:
+
+ ```js
+ const { data, error } = await storageClient.listBuckets()
+ ```
+
+#### Handling Files
+
+- Upload a file to an existing bucket:
+
+ ```js
+ const fileBody = ... // load your file here
+
+ const { data, error } = await storageClient.from('bucket').upload('path/to/file', fileBody)
+ ```
+
+ > Note:
+ > The path in `data.Key` is prefixed by the bucket ID and is not the value which should be passed to the `download` method in order to fetch the file.
+ > To fetch the file via the `download` method, use `data.path` and `data.bucketId` as follows:
+ >
+ > ```javascript
+ > const { data, error } = await storageClient.from('bucket').upload('/folder/file.txt', fileBody)
+ > // check for errors
+ > const { data2, error2 } = await storageClient.from(data.bucketId).download(data.path)
+ > ```
+
+ > Note: The `upload` method also accepts a map of optional parameters. For a complete list see the [Supabase API reference](https://supabase.com/docs/reference/javascript/storage-from-upload).
+
+- Download a file from an exisiting bucket:
+
+ ```js
+ const { data, error } = await storageClient.from('bucket').download('path/to/file')
+ ```
+
+- List all the files within a bucket:
+
+ ```js
+ const { data, error } = await storageClient.from('bucket').list('folder')
+ ```
+
+ > Note: The `list` method also accepts a map of optional parameters. For a complete list see the [Supabase API reference](https://supabase.com/docs/reference/javascript/storage-from-list).
+
+- Replace an existing file at the specified path with a new one:
+
+ ```js
+ const fileBody = ... // load your file here
+
+ const { data, error } = await storageClient
+ .from('bucket')
+ .update('path/to/file', fileBody)
+ ```
+
+ > Note: The `upload` method also accepts a map of optional parameters. For a complete list see the [Supabase API reference](https://supabase.com/docs/reference/javascript/storage-from-upload).
+
+- Move an existing file:
+
+ ```js
+ const { data, error } = await storageClient
+ .from('bucket')
+ .move('old/path/to/file', 'new/path/to/file')
+ ```
+
+- Delete files within the same bucket:
+
+ ```js
+ const { data, error } = await storageClient.from('bucket').remove(['path/to/file'])
+ ```
+
+- Create signed URL to download file without requiring permissions:
+
+ ```js
+ const expireIn = 60
+
+ const { data, error } = await storageClient
+ .from('bucket')
+ .createSignedUrl('path/to/file', expireIn)
+ ```
+
+- Retrieve URLs for assets in public buckets:
+
+ ```js
+ const { data, error } = await storageClient.from('public-bucket').getPublicUrl('path/to/file')
+ ```
+
+## Sponsors
+
+We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.
+
+[](https://github.com/sponsors/supabase)
diff --git a/node_modules/@supabase/storage-js/dist/main/StorageClient.js b/node_modules/@supabase/storage-js/dist/main/StorageClient.js
new file mode 100644
index 0000000..c5bcb4e
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/StorageClient.js
@@ -0,0 +1,23 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StorageClient = void 0;
+const StorageFileApi_1 = __importDefault(require("./packages/StorageFileApi"));
+const StorageBucketApi_1 = __importDefault(require("./packages/StorageBucketApi"));
+class StorageClient extends StorageBucketApi_1.default {
+ constructor(url, headers = {}, fetch) {
+ super(url, headers, fetch);
+ }
+ /**
+ * Perform file operation in a bucket.
+ *
+ * @param id The bucket id to operate on.
+ */
+ from(id) {
+ return new StorageFileApi_1.default(this.url, this.headers, id, this.fetch);
+ }
+}
+exports.StorageClient = StorageClient;
+//# sourceMappingURL=StorageClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/index.js b/node_modules/@supabase/storage-js/dist/main/index.js
new file mode 100644
index 0000000..5bab957
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/index.js
@@ -0,0 +1,22 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StorageClient = void 0;
+var StorageClient_1 = require("./StorageClient");
+Object.defineProperty(exports, "StorageClient", { enumerable: true, get: function () { return StorageClient_1.StorageClient; } });
+__exportStar(require("./lib/types"), exports);
+__exportStar(require("./lib/errors"), exports);
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/constants.js b/node_modules/@supabase/storage-js/dist/main/lib/constants.js
new file mode 100644
index 0000000..b6be886
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/constants.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DEFAULT_HEADERS = void 0;
+const version_1 = require("./version");
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `storage-js/${version_1.version}` };
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/errors.js b/node_modules/@supabase/storage-js/dist/main/lib/errors.js
new file mode 100644
index 0000000..6f48b35
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/errors.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.StorageUnknownError = exports.StorageApiError = exports.isStorageError = exports.StorageError = void 0;
+class StorageError extends Error {
+ constructor(message) {
+ super(message);
+ this.__isStorageError = true;
+ this.name = 'StorageError';
+ }
+}
+exports.StorageError = StorageError;
+function isStorageError(error) {
+ return typeof error === 'object' && error !== null && '__isStorageError' in error;
+}
+exports.isStorageError = isStorageError;
+class StorageApiError extends StorageError {
+ constructor(message, status) {
+ super(message);
+ this.name = 'StorageApiError';
+ this.status = status;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ };
+ }
+}
+exports.StorageApiError = StorageApiError;
+class StorageUnknownError extends StorageError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'StorageUnknownError';
+ this.originalError = originalError;
+ }
+}
+exports.StorageUnknownError = StorageUnknownError;
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/fetch.js b/node_modules/@supabase/storage-js/dist/main/lib/fetch.js
new file mode 100644
index 0000000..5d88397
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/fetch.js
@@ -0,0 +1,89 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.remove = exports.head = exports.put = exports.post = exports.get = void 0;
+const errors_1 = require("./errors");
+const helpers_1 = require("./helpers");
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const handleError = (error, reject, options) => __awaiter(void 0, void 0, void 0, function* () {
+ const Res = yield (0, helpers_1.resolveResponse)();
+ if (error instanceof Res && !(options === null || options === void 0 ? void 0 : options.noResolveJson)) {
+ error
+ .json()
+ .then((err) => {
+ reject(new errors_1.StorageApiError(_getErrorMessage(err), error.status || 500));
+ })
+ .catch((err) => {
+ reject(new errors_1.StorageUnknownError(_getErrorMessage(err), err));
+ });
+ }
+ else {
+ reject(new errors_1.StorageUnknownError(_getErrorMessage(error), error));
+ }
+});
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers);
+ if (body) {
+ params.body = JSON.stringify(body);
+ }
+ return Object.assign(Object.assign({}, params), parameters);
+};
+function _handleRequest(fetcher, method, url, options, parameters, body) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => {
+ fetcher(url, _getRequestParams(method, options, parameters, body))
+ .then((result) => {
+ if (!result.ok)
+ throw result;
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson)
+ return result;
+ return result.json();
+ })
+ .then((data) => resolve(data))
+ .catch((error) => handleError(error, reject, options));
+ });
+ });
+}
+function get(fetcher, url, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'GET', url, options, parameters);
+ });
+}
+exports.get = get;
+function post(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'POST', url, options, parameters, body);
+ });
+}
+exports.post = post;
+function put(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'PUT', url, options, parameters, body);
+ });
+}
+exports.put = put;
+function head(fetcher, url, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'HEAD', url, Object.assign(Object.assign({}, options), { noResolveJson: true }), parameters);
+ });
+}
+exports.head = head;
+function remove(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'DELETE', url, options, parameters, body);
+ });
+}
+exports.remove = remove;
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/helpers.js b/node_modules/@supabase/storage-js/dist/main/lib/helpers.js
new file mode 100644
index 0000000..c600b69
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/helpers.js
@@ -0,0 +1,73 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.recursiveToCamel = exports.resolveResponse = exports.resolveFetch = void 0;
+const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => Promise.resolve().then(() => __importStar(require('@supabase/node-fetch'))).then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+exports.resolveFetch = resolveFetch;
+const resolveResponse = () => __awaiter(void 0, void 0, void 0, function* () {
+ if (typeof Response === 'undefined') {
+ // @ts-ignore
+ return (yield Promise.resolve().then(() => __importStar(require('@supabase/node-fetch')))).Response;
+ }
+ return Response;
+});
+exports.resolveResponse = resolveResponse;
+const recursiveToCamel = (item) => {
+ if (Array.isArray(item)) {
+ return item.map((el) => (0, exports.recursiveToCamel)(el));
+ }
+ else if (typeof item === 'function' || item !== Object(item)) {
+ return item;
+ }
+ const result = {};
+ Object.entries(item).forEach(([key, value]) => {
+ const newKey = key.replace(/([-_][a-z])/gi, (c) => c.toUpperCase().replace(/[-_]/g, ''));
+ result[newKey] = (0, exports.recursiveToCamel)(value);
+ });
+ return result;
+};
+exports.recursiveToCamel = recursiveToCamel;
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/index.js b/node_modules/@supabase/storage-js/dist/main/lib/index.js
new file mode 100644
index 0000000..8317f62
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/index.js
@@ -0,0 +1,21 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+__exportStar(require("../packages/StorageBucketApi"), exports);
+__exportStar(require("../packages/StorageFileApi"), exports);
+__exportStar(require("./types"), exports);
+__exportStar(require("./constants"), exports);
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/types.js b/node_modules/@supabase/storage-js/dist/main/lib/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/lib/version.js b/node_modules/@supabase/storage-js/dist/main/lib/version.js
new file mode 100644
index 0000000..8d020a4
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/lib/version.js
@@ -0,0 +1,6 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+// generated by genversion
+exports.version = '2.7.1';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/packages/StorageBucketApi.js b/node_modules/@supabase/storage-js/dist/main/packages/StorageBucketApi.js
new file mode 100644
index 0000000..718675e
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/packages/StorageBucketApi.js
@@ -0,0 +1,166 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const constants_1 = require("../lib/constants");
+const errors_1 = require("../lib/errors");
+const fetch_1 = require("../lib/fetch");
+const helpers_1 = require("../lib/helpers");
+class StorageBucketApi {
+ constructor(url, headers = {}, fetch) {
+ this.url = url;
+ this.headers = Object.assign(Object.assign({}, constants_1.DEFAULT_HEADERS), headers);
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
+ }
+ /**
+ * Retrieves the details of all Storage buckets within an existing project.
+ */
+ listBuckets() {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.get)(this.fetch, `${this.url}/bucket`, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Retrieves the details of an existing Storage bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to retrieve.
+ */
+ getBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.get)(this.fetch, `${this.url}/bucket/${id}`, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a new Storage bucket
+ *
+ * @param id A unique identifier for the bucket you are creating.
+ * @param options.public The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private.
+ * @param options.fileSizeLimit specifies the max file size in bytes that can be uploaded to this bucket.
+ * The global file size limit takes precedence over this value.
+ * The default value is null, which doesn't set a per bucket file size limit.
+ * @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
+ * The default value is null, which allows files with all mime types to be uploaded.
+ * Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
+ * @returns newly created bucket id
+ */
+ createBucket(id, options = {
+ public: false,
+ }) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/bucket`, {
+ id,
+ name: id,
+ public: options.public,
+ file_size_limit: options.fileSizeLimit,
+ allowed_mime_types: options.allowedMimeTypes,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Updates a Storage bucket
+ *
+ * @param id A unique identifier for the bucket you are updating.
+ * @param options.public The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.
+ * @param options.fileSizeLimit specifies the max file size in bytes that can be uploaded to this bucket.
+ * The global file size limit takes precedence over this value.
+ * The default value is null, which doesn't set a per bucket file size limit.
+ * @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
+ * The default value is null, which allows files with all mime types to be uploaded.
+ * Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
+ */
+ updateBucket(id, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.put)(this.fetch, `${this.url}/bucket/${id}`, {
+ id,
+ name: id,
+ public: options.public,
+ file_size_limit: options.fileSizeLimit,
+ allowed_mime_types: options.allowedMimeTypes,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Removes all objects inside a single bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to empty.
+ */
+ emptyBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/bucket/${id}/empty`, {}, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.
+ * You must first `empty()` the bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to delete.
+ */
+ deleteBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.remove)(this.fetch, `${this.url}/bucket/${id}`, {}, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+}
+exports.default = StorageBucketApi;
+//# sourceMappingURL=StorageBucketApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/main/packages/StorageFileApi.js b/node_modules/@supabase/storage-js/dist/main/packages/StorageFileApi.js
new file mode 100644
index 0000000..6324180
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/main/packages/StorageFileApi.js
@@ -0,0 +1,553 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const errors_1 = require("../lib/errors");
+const fetch_1 = require("../lib/fetch");
+const helpers_1 = require("../lib/helpers");
+const DEFAULT_SEARCH_OPTIONS = {
+ limit: 100,
+ offset: 0,
+ sortBy: {
+ column: 'name',
+ order: 'asc',
+ },
+};
+const DEFAULT_FILE_OPTIONS = {
+ cacheControl: '3600',
+ contentType: 'text/plain;charset=UTF-8',
+ upsert: false,
+};
+class StorageFileApi {
+ constructor(url, headers = {}, bucketId, fetch) {
+ this.url = url;
+ this.headers = headers;
+ this.bucketId = bucketId;
+ this.fetch = (0, helpers_1.resolveFetch)(fetch);
+ }
+ /**
+ * Uploads a file to an existing bucket or replaces an existing file at the specified path with a new one.
+ *
+ * @param method HTTP method.
+ * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ uploadOrUpdate(method, path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let body;
+ const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions);
+ let headers = Object.assign(Object.assign({}, this.headers), (method === 'POST' && { 'x-upsert': String(options.upsert) }));
+ const metadata = options.metadata;
+ if (typeof Blob !== 'undefined' && fileBody instanceof Blob) {
+ body = new FormData();
+ body.append('cacheControl', options.cacheControl);
+ if (metadata) {
+ body.append('metadata', this.encodeMetadata(metadata));
+ }
+ body.append('', fileBody);
+ }
+ else if (typeof FormData !== 'undefined' && fileBody instanceof FormData) {
+ body = fileBody;
+ body.append('cacheControl', options.cacheControl);
+ if (metadata) {
+ body.append('metadata', this.encodeMetadata(metadata));
+ }
+ }
+ else {
+ body = fileBody;
+ headers['cache-control'] = `max-age=${options.cacheControl}`;
+ headers['content-type'] = options.contentType;
+ if (metadata) {
+ headers['x-metadata'] = this.toBase64(this.encodeMetadata(metadata));
+ }
+ }
+ if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) {
+ headers = Object.assign(Object.assign({}, headers), fileOptions.headers);
+ }
+ const cleanPath = this._removeEmptyFolders(path);
+ const _path = this._getFinalPath(cleanPath);
+ const res = yield this.fetch(`${this.url}/object/${_path}`, Object.assign({ method, body: body, headers }, ((options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {})));
+ const data = yield res.json();
+ if (res.ok) {
+ return {
+ data: { path: cleanPath, id: data.Id, fullPath: data.Key },
+ error: null,
+ };
+ }
+ else {
+ const error = data;
+ return { data: null, error };
+ }
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Uploads a file to an existing bucket.
+ *
+ * @param path The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ upload(path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.uploadOrUpdate('POST', path, fileBody, fileOptions);
+ });
+ }
+ /**
+ * Upload a file with a token generated from `createSignedUploadUrl`.
+ * @param path The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param token The token generated from `createSignedUploadUrl`
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ uploadToSignedUrl(path, token, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const cleanPath = this._removeEmptyFolders(path);
+ const _path = this._getFinalPath(cleanPath);
+ const url = new URL(this.url + `/object/upload/sign/${_path}`);
+ url.searchParams.set('token', token);
+ try {
+ let body;
+ const options = Object.assign({ upsert: DEFAULT_FILE_OPTIONS.upsert }, fileOptions);
+ const headers = Object.assign(Object.assign({}, this.headers), { 'x-upsert': String(options.upsert) });
+ if (typeof Blob !== 'undefined' && fileBody instanceof Blob) {
+ body = new FormData();
+ body.append('cacheControl', options.cacheControl);
+ body.append('', fileBody);
+ }
+ else if (typeof FormData !== 'undefined' && fileBody instanceof FormData) {
+ body = fileBody;
+ body.append('cacheControl', options.cacheControl);
+ }
+ else {
+ body = fileBody;
+ headers['cache-control'] = `max-age=${options.cacheControl}`;
+ headers['content-type'] = options.contentType;
+ }
+ const res = yield this.fetch(url.toString(), {
+ method: 'PUT',
+ body: body,
+ headers,
+ });
+ const data = yield res.json();
+ if (res.ok) {
+ return {
+ data: { path: cleanPath, fullPath: data.Key },
+ error: null,
+ };
+ }
+ else {
+ const error = data;
+ return { data: null, error };
+ }
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a signed upload URL.
+ * Signed upload URLs can be used to upload files to the bucket without further authentication.
+ * They are valid for 2 hours.
+ * @param path The file path, including the current file name. For example `folder/image.png`.
+ * @param options.upsert If set to true, allows the file to be overwritten if it already exists.
+ */
+ createSignedUploadUrl(path, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let _path = this._getFinalPath(path);
+ const headers = Object.assign({}, this.headers);
+ if (options === null || options === void 0 ? void 0 : options.upsert) {
+ headers['x-upsert'] = 'true';
+ }
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/upload/sign/${_path}`, {}, { headers });
+ const url = new URL(this.url + data.url);
+ const token = url.searchParams.get('token');
+ if (!token) {
+ throw new errors_1.StorageError('No token returned by API');
+ }
+ return { data: { signedUrl: url.toString(), path, token }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Replaces an existing file at the specified path with a new one.
+ *
+ * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to update.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ update(path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.uploadOrUpdate('PUT', path, fileBody, fileOptions);
+ });
+ }
+ /**
+ * Moves an existing file to a new path in the same bucket.
+ *
+ * @param fromPath The original file path, including the current file name. For example `folder/image.png`.
+ * @param toPath The new file path, including the new file name. For example `folder/image-new.png`.
+ * @param options The destination options.
+ */
+ move(fromPath, toPath, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/move`, {
+ bucketId: this.bucketId,
+ sourceKey: fromPath,
+ destinationKey: toPath,
+ destinationBucket: options === null || options === void 0 ? void 0 : options.destinationBucket,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Copies an existing file to a new path in the same bucket.
+ *
+ * @param fromPath The original file path, including the current file name. For example `folder/image.png`.
+ * @param toPath The new file path, including the new file name. For example `folder/image-copy.png`.
+ * @param options The destination options.
+ */
+ copy(fromPath, toPath, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/copy`, {
+ bucketId: this.bucketId,
+ sourceKey: fromPath,
+ destinationKey: toPath,
+ destinationBucket: options === null || options === void 0 ? void 0 : options.destinationBucket,
+ }, { headers: this.headers });
+ return { data: { path: data.Key }, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a signed URL. Use a signed URL to share a file for a fixed amount of time.
+ *
+ * @param path The file path, including the current file name. For example `folder/image.png`.
+ * @param expiresIn The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute.
+ * @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ createSignedUrl(path, expiresIn, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let _path = this._getFinalPath(path);
+ let data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/sign/${_path}`, Object.assign({ expiresIn }, ((options === null || options === void 0 ? void 0 : options.transform) ? { transform: options.transform } : {})), { headers: this.headers });
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `&download=${options.download === true ? '' : options.download}`
+ : '';
+ const signedUrl = encodeURI(`${this.url}${data.signedURL}${downloadQueryParam}`);
+ data = { signedUrl };
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates multiple signed URLs. Use a signed URL to share a file for a fixed amount of time.
+ *
+ * @param paths The file paths to be downloaded, including the current file names. For example `['folder/image.png', 'folder2/image2.png']`.
+ * @param expiresIn The number of seconds until the signed URLs expire. For example, `60` for URLs which are valid for one minute.
+ * @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ */
+ createSignedUrls(paths, expiresIn, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/sign/${this.bucketId}`, { expiresIn, paths }, { headers: this.headers });
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `&download=${options.download === true ? '' : options.download}`
+ : '';
+ return {
+ data: data.map((datum) => (Object.assign(Object.assign({}, datum), { signedUrl: datum.signedURL
+ ? encodeURI(`${this.url}${datum.signedURL}${downloadQueryParam}`)
+ : null }))),
+ error: null,
+ };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Downloads a file from a private bucket. For public buckets, make a request to the URL returned from `getPublicUrl` instead.
+ *
+ * @param path The full path and file name of the file to be downloaded. For example `folder/image.png`.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ download(path, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const wantsTransformation = typeof (options === null || options === void 0 ? void 0 : options.transform) !== 'undefined';
+ const renderPath = wantsTransformation ? 'render/image/authenticated' : 'object';
+ const transformationQuery = this.transformOptsToQueryString((options === null || options === void 0 ? void 0 : options.transform) || {});
+ const queryString = transformationQuery ? `?${transformationQuery}` : '';
+ try {
+ const _path = this._getFinalPath(path);
+ const res = yield (0, fetch_1.get)(this.fetch, `${this.url}/${renderPath}/${_path}${queryString}`, {
+ headers: this.headers,
+ noResolveJson: true,
+ });
+ const data = yield res.blob();
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Retrieves the details of an existing file.
+ * @param path
+ */
+ info(path) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const _path = this._getFinalPath(path);
+ try {
+ const data = yield (0, fetch_1.get)(this.fetch, `${this.url}/object/info/${_path}`, {
+ headers: this.headers,
+ });
+ return { data: (0, helpers_1.recursiveToCamel)(data), error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Checks the existence of a file.
+ * @param path
+ */
+ exists(path) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const _path = this._getFinalPath(path);
+ try {
+ yield (0, fetch_1.head)(this.fetch, `${this.url}/object/${_path}`, {
+ headers: this.headers,
+ });
+ return { data: true, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error) && error instanceof errors_1.StorageUnknownError) {
+ const originalError = error.originalError;
+ if ([400, 404].includes(originalError === null || originalError === void 0 ? void 0 : originalError.status)) {
+ return { data: false, error };
+ }
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * A simple convenience function to get the URL for an asset in a public bucket. If you do not want to use this function, you can construct the public URL by concatenating the bucket URL with the path to the asset.
+ * This function does not verify if the bucket is public. If a public URL is created for a bucket which is not public, you will not be able to download the asset.
+ *
+ * @param path The path and name of the file to generate the public URL for. For example `folder/image.png`.
+ * @param options.download Triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ getPublicUrl(path, options) {
+ const _path = this._getFinalPath(path);
+ const _queryString = [];
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `download=${options.download === true ? '' : options.download}`
+ : '';
+ if (downloadQueryParam !== '') {
+ _queryString.push(downloadQueryParam);
+ }
+ const wantsTransformation = typeof (options === null || options === void 0 ? void 0 : options.transform) !== 'undefined';
+ const renderPath = wantsTransformation ? 'render/image' : 'object';
+ const transformationQuery = this.transformOptsToQueryString((options === null || options === void 0 ? void 0 : options.transform) || {});
+ if (transformationQuery !== '') {
+ _queryString.push(transformationQuery);
+ }
+ let queryString = _queryString.join('&');
+ if (queryString !== '') {
+ queryString = `?${queryString}`;
+ }
+ return {
+ data: { publicUrl: encodeURI(`${this.url}/${renderPath}/public/${_path}${queryString}`) },
+ };
+ }
+ /**
+ * Deletes files within the same bucket
+ *
+ * @param paths An array of files to delete, including the path and file name. For example [`'folder/image.png'`].
+ */
+ remove(paths) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield (0, fetch_1.remove)(this.fetch, `${this.url}/object/${this.bucketId}`, { prefixes: paths }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Get file metadata
+ * @param id the file id to retrieve metadata
+ */
+ // async getMetadata(
+ // id: string
+ // ): Promise<
+ // | {
+ // data: Metadata
+ // error: null
+ // }
+ // | {
+ // data: null
+ // error: StorageError
+ // }
+ // > {
+ // try {
+ // const data = await get(this.fetch, `${this.url}/metadata/${id}`, { headers: this.headers })
+ // return { data, error: null }
+ // } catch (error) {
+ // if (isStorageError(error)) {
+ // return { data: null, error }
+ // }
+ // throw error
+ // }
+ // }
+ /**
+ * Update file metadata
+ * @param id the file id to update metadata
+ * @param meta the new file metadata
+ */
+ // async updateMetadata(
+ // id: string,
+ // meta: Metadata
+ // ): Promise<
+ // | {
+ // data: Metadata
+ // error: null
+ // }
+ // | {
+ // data: null
+ // error: StorageError
+ // }
+ // > {
+ // try {
+ // const data = await post(
+ // this.fetch,
+ // `${this.url}/metadata/${id}`,
+ // { ...meta },
+ // { headers: this.headers }
+ // )
+ // return { data, error: null }
+ // } catch (error) {
+ // if (isStorageError(error)) {
+ // return { data: null, error }
+ // }
+ // throw error
+ // }
+ // }
+ /**
+ * Lists all the files within a bucket.
+ * @param path The folder path.
+ */
+ list(path, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix: path || '' });
+ const data = yield (0, fetch_1.post)(this.fetch, `${this.url}/object/list/${this.bucketId}`, body, { headers: this.headers }, parameters);
+ return { data, error: null };
+ }
+ catch (error) {
+ if ((0, errors_1.isStorageError)(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ encodeMetadata(metadata) {
+ return JSON.stringify(metadata);
+ }
+ toBase64(data) {
+ if (typeof Buffer !== 'undefined') {
+ return Buffer.from(data).toString('base64');
+ }
+ return btoa(data);
+ }
+ _getFinalPath(path) {
+ return `${this.bucketId}/${path}`;
+ }
+ _removeEmptyFolders(path) {
+ return path.replace(/^\/|\/$/g, '').replace(/\/+/g, '/');
+ }
+ transformOptsToQueryString(transform) {
+ const params = [];
+ if (transform.width) {
+ params.push(`width=${transform.width}`);
+ }
+ if (transform.height) {
+ params.push(`height=${transform.height}`);
+ }
+ if (transform.resize) {
+ params.push(`resize=${transform.resize}`);
+ }
+ if (transform.format) {
+ params.push(`format=${transform.format}`);
+ }
+ if (transform.quality) {
+ params.push(`quality=${transform.quality}`);
+ }
+ return params.join('&');
+ }
+}
+exports.default = StorageFileApi;
+//# sourceMappingURL=StorageFileApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/StorageClient.js b/node_modules/@supabase/storage-js/dist/module/StorageClient.js
new file mode 100644
index 0000000..39e819f
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/StorageClient.js
@@ -0,0 +1,16 @@
+import StorageFileApi from './packages/StorageFileApi';
+import StorageBucketApi from './packages/StorageBucketApi';
+export class StorageClient extends StorageBucketApi {
+ constructor(url, headers = {}, fetch) {
+ super(url, headers, fetch);
+ }
+ /**
+ * Perform file operation in a bucket.
+ *
+ * @param id The bucket id to operate on.
+ */
+ from(id) {
+ return new StorageFileApi(this.url, this.headers, id, this.fetch);
+ }
+}
+//# sourceMappingURL=StorageClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/index.js b/node_modules/@supabase/storage-js/dist/module/index.js
new file mode 100644
index 0000000..4ca3452
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/index.js
@@ -0,0 +1,4 @@
+export { StorageClient as StorageClient } from './StorageClient';
+export * from './lib/types';
+export * from './lib/errors';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/constants.js b/node_modules/@supabase/storage-js/dist/module/lib/constants.js
new file mode 100644
index 0000000..0801769
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/constants.js
@@ -0,0 +1,3 @@
+import { version } from './version';
+export const DEFAULT_HEADERS = { 'X-Client-Info': `storage-js/${version}` };
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/errors.js b/node_modules/@supabase/storage-js/dist/module/lib/errors.js
new file mode 100644
index 0000000..0288fa3
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/errors.js
@@ -0,0 +1,32 @@
+export class StorageError extends Error {
+ constructor(message) {
+ super(message);
+ this.__isStorageError = true;
+ this.name = 'StorageError';
+ }
+}
+export function isStorageError(error) {
+ return typeof error === 'object' && error !== null && '__isStorageError' in error;
+}
+export class StorageApiError extends StorageError {
+ constructor(message, status) {
+ super(message);
+ this.name = 'StorageApiError';
+ this.status = status;
+ }
+ toJSON() {
+ return {
+ name: this.name,
+ message: this.message,
+ status: this.status,
+ };
+ }
+}
+export class StorageUnknownError extends StorageError {
+ constructor(message, originalError) {
+ super(message);
+ this.name = 'StorageUnknownError';
+ this.originalError = originalError;
+ }
+}
+//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/fetch.js b/node_modules/@supabase/storage-js/dist/module/lib/fetch.js
new file mode 100644
index 0000000..9b716be
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/fetch.js
@@ -0,0 +1,81 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { StorageApiError, StorageUnknownError } from './errors';
+import { resolveResponse } from './helpers';
+const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);
+const handleError = (error, reject, options) => __awaiter(void 0, void 0, void 0, function* () {
+ const Res = yield resolveResponse();
+ if (error instanceof Res && !(options === null || options === void 0 ? void 0 : options.noResolveJson)) {
+ error
+ .json()
+ .then((err) => {
+ reject(new StorageApiError(_getErrorMessage(err), error.status || 500));
+ })
+ .catch((err) => {
+ reject(new StorageUnknownError(_getErrorMessage(err), err));
+ });
+ }
+ else {
+ reject(new StorageUnknownError(_getErrorMessage(error), error));
+ }
+});
+const _getRequestParams = (method, options, parameters, body) => {
+ const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };
+ if (method === 'GET') {
+ return params;
+ }
+ params.headers = Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers);
+ if (body) {
+ params.body = JSON.stringify(body);
+ }
+ return Object.assign(Object.assign({}, params), parameters);
+};
+function _handleRequest(fetcher, method, url, options, parameters, body) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => {
+ fetcher(url, _getRequestParams(method, options, parameters, body))
+ .then((result) => {
+ if (!result.ok)
+ throw result;
+ if (options === null || options === void 0 ? void 0 : options.noResolveJson)
+ return result;
+ return result.json();
+ })
+ .then((data) => resolve(data))
+ .catch((error) => handleError(error, reject, options));
+ });
+ });
+}
+export function get(fetcher, url, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'GET', url, options, parameters);
+ });
+}
+export function post(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'POST', url, options, parameters, body);
+ });
+}
+export function put(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'PUT', url, options, parameters, body);
+ });
+}
+export function head(fetcher, url, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'HEAD', url, Object.assign(Object.assign({}, options), { noResolveJson: true }), parameters);
+ });
+}
+export function remove(fetcher, url, body, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return _handleRequest(fetcher, 'DELETE', url, options, parameters, body);
+ });
+}
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/helpers.js b/node_modules/@supabase/storage-js/dist/module/lib/helpers.js
new file mode 100644
index 0000000..8e439fb
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/helpers.js
@@ -0,0 +1,44 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+export const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = (...args) => import('@supabase/node-fetch').then(({ default: fetch }) => fetch(...args));
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+export const resolveResponse = () => __awaiter(void 0, void 0, void 0, function* () {
+ if (typeof Response === 'undefined') {
+ // @ts-ignore
+ return (yield import('@supabase/node-fetch')).Response;
+ }
+ return Response;
+});
+export const recursiveToCamel = (item) => {
+ if (Array.isArray(item)) {
+ return item.map((el) => recursiveToCamel(el));
+ }
+ else if (typeof item === 'function' || item !== Object(item)) {
+ return item;
+ }
+ const result = {};
+ Object.entries(item).forEach(([key, value]) => {
+ const newKey = key.replace(/([-_][a-z])/gi, (c) => c.toUpperCase().replace(/[-_]/g, ''));
+ result[newKey] = recursiveToCamel(value);
+ });
+ return result;
+};
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/index.js b/node_modules/@supabase/storage-js/dist/module/lib/index.js
new file mode 100644
index 0000000..51094d4
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/index.js
@@ -0,0 +1,5 @@
+export * from '../packages/StorageBucketApi';
+export * from '../packages/StorageFileApi';
+export * from './types';
+export * from './constants';
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/types.js b/node_modules/@supabase/storage-js/dist/module/lib/types.js
new file mode 100644
index 0000000..718fd38
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/lib/version.js b/node_modules/@supabase/storage-js/dist/module/lib/version.js
new file mode 100644
index 0000000..c12da30
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/lib/version.js
@@ -0,0 +1,3 @@
+// generated by genversion
+export const version = '2.7.1';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/packages/StorageBucketApi.js b/node_modules/@supabase/storage-js/dist/module/packages/StorageBucketApi.js
new file mode 100644
index 0000000..6c6e3b7
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/packages/StorageBucketApi.js
@@ -0,0 +1,163 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { DEFAULT_HEADERS } from '../lib/constants';
+import { isStorageError } from '../lib/errors';
+import { get, post, put, remove } from '../lib/fetch';
+import { resolveFetch } from '../lib/helpers';
+export default class StorageBucketApi {
+ constructor(url, headers = {}, fetch) {
+ this.url = url;
+ this.headers = Object.assign(Object.assign({}, DEFAULT_HEADERS), headers);
+ this.fetch = resolveFetch(fetch);
+ }
+ /**
+ * Retrieves the details of all Storage buckets within an existing project.
+ */
+ listBuckets() {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield get(this.fetch, `${this.url}/bucket`, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Retrieves the details of an existing Storage bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to retrieve.
+ */
+ getBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield get(this.fetch, `${this.url}/bucket/${id}`, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a new Storage bucket
+ *
+ * @param id A unique identifier for the bucket you are creating.
+ * @param options.public The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations. By default, buckets are private.
+ * @param options.fileSizeLimit specifies the max file size in bytes that can be uploaded to this bucket.
+ * The global file size limit takes precedence over this value.
+ * The default value is null, which doesn't set a per bucket file size limit.
+ * @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
+ * The default value is null, which allows files with all mime types to be uploaded.
+ * Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
+ * @returns newly created bucket id
+ */
+ createBucket(id, options = {
+ public: false,
+ }) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield post(this.fetch, `${this.url}/bucket`, {
+ id,
+ name: id,
+ public: options.public,
+ file_size_limit: options.fileSizeLimit,
+ allowed_mime_types: options.allowedMimeTypes,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Updates a Storage bucket
+ *
+ * @param id A unique identifier for the bucket you are updating.
+ * @param options.public The visibility of the bucket. Public buckets don't require an authorization token to download objects, but still require a valid token for all other operations.
+ * @param options.fileSizeLimit specifies the max file size in bytes that can be uploaded to this bucket.
+ * The global file size limit takes precedence over this value.
+ * The default value is null, which doesn't set a per bucket file size limit.
+ * @param options.allowedMimeTypes specifies the allowed mime types that this bucket can accept during upload.
+ * The default value is null, which allows files with all mime types to be uploaded.
+ * Each mime type specified can be a wildcard, e.g. image/*, or a specific mime type, e.g. image/png.
+ */
+ updateBucket(id, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield put(this.fetch, `${this.url}/bucket/${id}`, {
+ id,
+ name: id,
+ public: options.public,
+ file_size_limit: options.fileSizeLimit,
+ allowed_mime_types: options.allowedMimeTypes,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Removes all objects inside a single bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to empty.
+ */
+ emptyBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield post(this.fetch, `${this.url}/bucket/${id}/empty`, {}, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.
+ * You must first `empty()` the bucket.
+ *
+ * @param id The unique identifier of the bucket you would like to delete.
+ */
+ deleteBucket(id) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield remove(this.fetch, `${this.url}/bucket/${id}`, {}, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+}
+//# sourceMappingURL=StorageBucketApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/module/packages/StorageFileApi.js b/node_modules/@supabase/storage-js/dist/module/packages/StorageFileApi.js
new file mode 100644
index 0000000..7870c87
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/module/packages/StorageFileApi.js
@@ -0,0 +1,550 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { isStorageError, StorageError, StorageUnknownError } from '../lib/errors';
+import { get, head, post, remove } from '../lib/fetch';
+import { recursiveToCamel, resolveFetch } from '../lib/helpers';
+const DEFAULT_SEARCH_OPTIONS = {
+ limit: 100,
+ offset: 0,
+ sortBy: {
+ column: 'name',
+ order: 'asc',
+ },
+};
+const DEFAULT_FILE_OPTIONS = {
+ cacheControl: '3600',
+ contentType: 'text/plain;charset=UTF-8',
+ upsert: false,
+};
+export default class StorageFileApi {
+ constructor(url, headers = {}, bucketId, fetch) {
+ this.url = url;
+ this.headers = headers;
+ this.bucketId = bucketId;
+ this.fetch = resolveFetch(fetch);
+ }
+ /**
+ * Uploads a file to an existing bucket or replaces an existing file at the specified path with a new one.
+ *
+ * @param method HTTP method.
+ * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ uploadOrUpdate(method, path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let body;
+ const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions);
+ let headers = Object.assign(Object.assign({}, this.headers), (method === 'POST' && { 'x-upsert': String(options.upsert) }));
+ const metadata = options.metadata;
+ if (typeof Blob !== 'undefined' && fileBody instanceof Blob) {
+ body = new FormData();
+ body.append('cacheControl', options.cacheControl);
+ if (metadata) {
+ body.append('metadata', this.encodeMetadata(metadata));
+ }
+ body.append('', fileBody);
+ }
+ else if (typeof FormData !== 'undefined' && fileBody instanceof FormData) {
+ body = fileBody;
+ body.append('cacheControl', options.cacheControl);
+ if (metadata) {
+ body.append('metadata', this.encodeMetadata(metadata));
+ }
+ }
+ else {
+ body = fileBody;
+ headers['cache-control'] = `max-age=${options.cacheControl}`;
+ headers['content-type'] = options.contentType;
+ if (metadata) {
+ headers['x-metadata'] = this.toBase64(this.encodeMetadata(metadata));
+ }
+ }
+ if (fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.headers) {
+ headers = Object.assign(Object.assign({}, headers), fileOptions.headers);
+ }
+ const cleanPath = this._removeEmptyFolders(path);
+ const _path = this._getFinalPath(cleanPath);
+ const res = yield this.fetch(`${this.url}/object/${_path}`, Object.assign({ method, body: body, headers }, ((options === null || options === void 0 ? void 0 : options.duplex) ? { duplex: options.duplex } : {})));
+ const data = yield res.json();
+ if (res.ok) {
+ return {
+ data: { path: cleanPath, id: data.Id, fullPath: data.Key },
+ error: null,
+ };
+ }
+ else {
+ const error = data;
+ return { data: null, error };
+ }
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Uploads a file to an existing bucket.
+ *
+ * @param path The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ upload(path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.uploadOrUpdate('POST', path, fileBody, fileOptions);
+ });
+ }
+ /**
+ * Upload a file with a token generated from `createSignedUploadUrl`.
+ * @param path The file path, including the file name. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.
+ * @param token The token generated from `createSignedUploadUrl`
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ uploadToSignedUrl(path, token, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const cleanPath = this._removeEmptyFolders(path);
+ const _path = this._getFinalPath(cleanPath);
+ const url = new URL(this.url + `/object/upload/sign/${_path}`);
+ url.searchParams.set('token', token);
+ try {
+ let body;
+ const options = Object.assign({ upsert: DEFAULT_FILE_OPTIONS.upsert }, fileOptions);
+ const headers = Object.assign(Object.assign({}, this.headers), { 'x-upsert': String(options.upsert) });
+ if (typeof Blob !== 'undefined' && fileBody instanceof Blob) {
+ body = new FormData();
+ body.append('cacheControl', options.cacheControl);
+ body.append('', fileBody);
+ }
+ else if (typeof FormData !== 'undefined' && fileBody instanceof FormData) {
+ body = fileBody;
+ body.append('cacheControl', options.cacheControl);
+ }
+ else {
+ body = fileBody;
+ headers['cache-control'] = `max-age=${options.cacheControl}`;
+ headers['content-type'] = options.contentType;
+ }
+ const res = yield this.fetch(url.toString(), {
+ method: 'PUT',
+ body: body,
+ headers,
+ });
+ const data = yield res.json();
+ if (res.ok) {
+ return {
+ data: { path: cleanPath, fullPath: data.Key },
+ error: null,
+ };
+ }
+ else {
+ const error = data;
+ return { data: null, error };
+ }
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a signed upload URL.
+ * Signed upload URLs can be used to upload files to the bucket without further authentication.
+ * They are valid for 2 hours.
+ * @param path The file path, including the current file name. For example `folder/image.png`.
+ * @param options.upsert If set to true, allows the file to be overwritten if it already exists.
+ */
+ createSignedUploadUrl(path, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let _path = this._getFinalPath(path);
+ const headers = Object.assign({}, this.headers);
+ if (options === null || options === void 0 ? void 0 : options.upsert) {
+ headers['x-upsert'] = 'true';
+ }
+ const data = yield post(this.fetch, `${this.url}/object/upload/sign/${_path}`, {}, { headers });
+ const url = new URL(this.url + data.url);
+ const token = url.searchParams.get('token');
+ if (!token) {
+ throw new StorageError('No token returned by API');
+ }
+ return { data: { signedUrl: url.toString(), path, token }, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Replaces an existing file at the specified path with a new one.
+ *
+ * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to update.
+ * @param fileBody The body of the file to be stored in the bucket.
+ */
+ update(path, fileBody, fileOptions) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return this.uploadOrUpdate('PUT', path, fileBody, fileOptions);
+ });
+ }
+ /**
+ * Moves an existing file to a new path in the same bucket.
+ *
+ * @param fromPath The original file path, including the current file name. For example `folder/image.png`.
+ * @param toPath The new file path, including the new file name. For example `folder/image-new.png`.
+ * @param options The destination options.
+ */
+ move(fromPath, toPath, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield post(this.fetch, `${this.url}/object/move`, {
+ bucketId: this.bucketId,
+ sourceKey: fromPath,
+ destinationKey: toPath,
+ destinationBucket: options === null || options === void 0 ? void 0 : options.destinationBucket,
+ }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Copies an existing file to a new path in the same bucket.
+ *
+ * @param fromPath The original file path, including the current file name. For example `folder/image.png`.
+ * @param toPath The new file path, including the new file name. For example `folder/image-copy.png`.
+ * @param options The destination options.
+ */
+ copy(fromPath, toPath, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield post(this.fetch, `${this.url}/object/copy`, {
+ bucketId: this.bucketId,
+ sourceKey: fromPath,
+ destinationKey: toPath,
+ destinationBucket: options === null || options === void 0 ? void 0 : options.destinationBucket,
+ }, { headers: this.headers });
+ return { data: { path: data.Key }, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates a signed URL. Use a signed URL to share a file for a fixed amount of time.
+ *
+ * @param path The file path, including the current file name. For example `folder/image.png`.
+ * @param expiresIn The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute.
+ * @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ createSignedUrl(path, expiresIn, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ let _path = this._getFinalPath(path);
+ let data = yield post(this.fetch, `${this.url}/object/sign/${_path}`, Object.assign({ expiresIn }, ((options === null || options === void 0 ? void 0 : options.transform) ? { transform: options.transform } : {})), { headers: this.headers });
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `&download=${options.download === true ? '' : options.download}`
+ : '';
+ const signedUrl = encodeURI(`${this.url}${data.signedURL}${downloadQueryParam}`);
+ data = { signedUrl };
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Creates multiple signed URLs. Use a signed URL to share a file for a fixed amount of time.
+ *
+ * @param paths The file paths to be downloaded, including the current file names. For example `['folder/image.png', 'folder2/image2.png']`.
+ * @param expiresIn The number of seconds until the signed URLs expire. For example, `60` for URLs which are valid for one minute.
+ * @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ */
+ createSignedUrls(paths, expiresIn, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield post(this.fetch, `${this.url}/object/sign/${this.bucketId}`, { expiresIn, paths }, { headers: this.headers });
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `&download=${options.download === true ? '' : options.download}`
+ : '';
+ return {
+ data: data.map((datum) => (Object.assign(Object.assign({}, datum), { signedUrl: datum.signedURL
+ ? encodeURI(`${this.url}${datum.signedURL}${downloadQueryParam}`)
+ : null }))),
+ error: null,
+ };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Downloads a file from a private bucket. For public buckets, make a request to the URL returned from `getPublicUrl` instead.
+ *
+ * @param path The full path and file name of the file to be downloaded. For example `folder/image.png`.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ download(path, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const wantsTransformation = typeof (options === null || options === void 0 ? void 0 : options.transform) !== 'undefined';
+ const renderPath = wantsTransformation ? 'render/image/authenticated' : 'object';
+ const transformationQuery = this.transformOptsToQueryString((options === null || options === void 0 ? void 0 : options.transform) || {});
+ const queryString = transformationQuery ? `?${transformationQuery}` : '';
+ try {
+ const _path = this._getFinalPath(path);
+ const res = yield get(this.fetch, `${this.url}/${renderPath}/${_path}${queryString}`, {
+ headers: this.headers,
+ noResolveJson: true,
+ });
+ const data = yield res.blob();
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Retrieves the details of an existing file.
+ * @param path
+ */
+ info(path) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const _path = this._getFinalPath(path);
+ try {
+ const data = yield get(this.fetch, `${this.url}/object/info/${_path}`, {
+ headers: this.headers,
+ });
+ return { data: recursiveToCamel(data), error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Checks the existence of a file.
+ * @param path
+ */
+ exists(path) {
+ return __awaiter(this, void 0, void 0, function* () {
+ const _path = this._getFinalPath(path);
+ try {
+ yield head(this.fetch, `${this.url}/object/${_path}`, {
+ headers: this.headers,
+ });
+ return { data: true, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error) && error instanceof StorageUnknownError) {
+ const originalError = error.originalError;
+ if ([400, 404].includes(originalError === null || originalError === void 0 ? void 0 : originalError.status)) {
+ return { data: false, error };
+ }
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * A simple convenience function to get the URL for an asset in a public bucket. If you do not want to use this function, you can construct the public URL by concatenating the bucket URL with the path to the asset.
+ * This function does not verify if the bucket is public. If a public URL is created for a bucket which is not public, you will not be able to download the asset.
+ *
+ * @param path The path and name of the file to generate the public URL for. For example `folder/image.png`.
+ * @param options.download Triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
+ * @param options.transform Transform the asset before serving it to the client.
+ */
+ getPublicUrl(path, options) {
+ const _path = this._getFinalPath(path);
+ const _queryString = [];
+ const downloadQueryParam = (options === null || options === void 0 ? void 0 : options.download)
+ ? `download=${options.download === true ? '' : options.download}`
+ : '';
+ if (downloadQueryParam !== '') {
+ _queryString.push(downloadQueryParam);
+ }
+ const wantsTransformation = typeof (options === null || options === void 0 ? void 0 : options.transform) !== 'undefined';
+ const renderPath = wantsTransformation ? 'render/image' : 'object';
+ const transformationQuery = this.transformOptsToQueryString((options === null || options === void 0 ? void 0 : options.transform) || {});
+ if (transformationQuery !== '') {
+ _queryString.push(transformationQuery);
+ }
+ let queryString = _queryString.join('&');
+ if (queryString !== '') {
+ queryString = `?${queryString}`;
+ }
+ return {
+ data: { publicUrl: encodeURI(`${this.url}/${renderPath}/public/${_path}${queryString}`) },
+ };
+ }
+ /**
+ * Deletes files within the same bucket
+ *
+ * @param paths An array of files to delete, including the path and file name. For example [`'folder/image.png'`].
+ */
+ remove(paths) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const data = yield remove(this.fetch, `${this.url}/object/${this.bucketId}`, { prefixes: paths }, { headers: this.headers });
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ /**
+ * Get file metadata
+ * @param id the file id to retrieve metadata
+ */
+ // async getMetadata(
+ // id: string
+ // ): Promise<
+ // | {
+ // data: Metadata
+ // error: null
+ // }
+ // | {
+ // data: null
+ // error: StorageError
+ // }
+ // > {
+ // try {
+ // const data = await get(this.fetch, `${this.url}/metadata/${id}`, { headers: this.headers })
+ // return { data, error: null }
+ // } catch (error) {
+ // if (isStorageError(error)) {
+ // return { data: null, error }
+ // }
+ // throw error
+ // }
+ // }
+ /**
+ * Update file metadata
+ * @param id the file id to update metadata
+ * @param meta the new file metadata
+ */
+ // async updateMetadata(
+ // id: string,
+ // meta: Metadata
+ // ): Promise<
+ // | {
+ // data: Metadata
+ // error: null
+ // }
+ // | {
+ // data: null
+ // error: StorageError
+ // }
+ // > {
+ // try {
+ // const data = await post(
+ // this.fetch,
+ // `${this.url}/metadata/${id}`,
+ // { ...meta },
+ // { headers: this.headers }
+ // )
+ // return { data, error: null }
+ // } catch (error) {
+ // if (isStorageError(error)) {
+ // return { data: null, error }
+ // }
+ // throw error
+ // }
+ // }
+ /**
+ * Lists all the files within a bucket.
+ * @param path The folder path.
+ */
+ list(path, options, parameters) {
+ return __awaiter(this, void 0, void 0, function* () {
+ try {
+ const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix: path || '' });
+ const data = yield post(this.fetch, `${this.url}/object/list/${this.bucketId}`, body, { headers: this.headers }, parameters);
+ return { data, error: null };
+ }
+ catch (error) {
+ if (isStorageError(error)) {
+ return { data: null, error };
+ }
+ throw error;
+ }
+ });
+ }
+ encodeMetadata(metadata) {
+ return JSON.stringify(metadata);
+ }
+ toBase64(data) {
+ if (typeof Buffer !== 'undefined') {
+ return Buffer.from(data).toString('base64');
+ }
+ return btoa(data);
+ }
+ _getFinalPath(path) {
+ return `${this.bucketId}/${path}`;
+ }
+ _removeEmptyFolders(path) {
+ return path.replace(/^\/|\/$/g, '').replace(/\/+/g, '/');
+ }
+ transformOptsToQueryString(transform) {
+ const params = [];
+ if (transform.width) {
+ params.push(`width=${transform.width}`);
+ }
+ if (transform.height) {
+ params.push(`height=${transform.height}`);
+ }
+ if (transform.resize) {
+ params.push(`resize=${transform.resize}`);
+ }
+ if (transform.format) {
+ params.push(`format=${transform.format}`);
+ }
+ if (transform.quality) {
+ params.push(`quality=${transform.quality}`);
+ }
+ return params.join('&');
+ }
+}
+//# sourceMappingURL=StorageFileApi.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/dist/umd/supabase.js b/node_modules/@supabase/storage-js/dist/umd/supabase.js
new file mode 100644
index 0000000..0cf89a9
--- /dev/null
+++ b/node_modules/@supabase/storage-js/dist/umd/supabase.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.supabase=t():e.supabase=t()}(self,(()=>(()=>{"use strict";var e={743:(e,t,r)=>{var o=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();e.exports=t=o.fetch,o.fetch&&(t.default=o.fetch.bind(o)),t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response},274:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;const n=o(r(981)),i=o(r(436));class s extends i.default{constructor(e,t={},r){super(e,t,r)}from(e){return new n.default(this.url,this.headers,e,this.fetch)}}t.StorageClient=s},341:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StorageClient=void 0;var i=r(274);Object.defineProperty(t,"StorageClient",{enumerable:!0,get:function(){return i.StorageClient}}),n(r(717),t),n(r(752),t)},678:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;const o=r(506);t.DEFAULT_HEADERS={"X-Client-Info":`storage-js/${o.version}`}},752:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StorageUnknownError=t.StorageApiError=t.isStorageError=t.StorageError=void 0;class r extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}t.StorageError=r,t.isStorageError=function(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e},t.StorageApiError=class extends r{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}},t.StorageUnknownError=class extends r{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}},716:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.remove=t.head=t.put=t.post=t.get=void 0;const n=r(752),i=r(610),s=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e);function a(e,t,r,a,u,c){return o(this,void 0,void 0,(function*(){return new Promise(((d,l)=>{e(r,((e,t,r,o)=>{const n={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?n:(n.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),o&&(n.body=JSON.stringify(o)),Object.assign(Object.assign({},n),r))})(t,a,u,c)).then((e=>{if(!e.ok)throw e;return(null==a?void 0:a.noResolveJson)?e:e.json()})).then((e=>d(e))).catch((e=>((e,t,r)=>o(void 0,void 0,void 0,(function*(){const o=yield(0,i.resolveResponse)();e instanceof o&&!(null==r?void 0:r.noResolveJson)?e.json().then((r=>{t(new n.StorageApiError(s(r),e.status||500))})).catch((e=>{t(new n.StorageUnknownError(s(e),e))})):t(new n.StorageUnknownError(s(e),e))})))(e,l,a)))}))}))}t.get=function(e,t,r,n){return o(this,void 0,void 0,(function*(){return a(e,"GET",t,r,n)}))},t.post=function(e,t,r,n,i){return o(this,void 0,void 0,(function*(){return a(e,"POST",t,n,i,r)}))},t.put=function(e,t,r,n,i){return o(this,void 0,void 0,(function*(){return a(e,"PUT",t,n,i,r)}))},t.head=function(e,t,r,n){return o(this,void 0,void 0,(function*(){return a(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)}))},t.remove=function(e,t,r,n,i){return o(this,void 0,void 0,(function*(){return a(e,"DELETE",t,n,i,r)}))}},610:function(e,t,r){var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return n(t,e),t},s=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.recursiveToCamel=t.resolveResponse=t.resolveFetch=void 0,t.resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then((()=>i(r(743)))).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},t.resolveResponse=()=>s(void 0,void 0,void 0,(function*(){return"undefined"==typeof Response?(yield Promise.resolve().then((()=>i(r(743))))).Response:Response})),t.recursiveToCamel=e=>{if(Array.isArray(e))return e.map((e=>(0,t.recursiveToCamel)(e)));if("function"==typeof e||e!==Object(e))return e;const r={};return Object.entries(e).forEach((([e,o])=>{const n=e.replace(/([-_][a-z])/gi,(e=>e.toUpperCase().replace(/[-_]/g,"")));r[n]=(0,t.recursiveToCamel)(o)})),r}},717:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},506:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.0.0"},436:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=r(678),i=r(752),s=r(716),a=r(610);t.default=class{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},n.DEFAULT_HEADERS),t),this.fetch=(0,a.resolveFetch)(r)}listBuckets(){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}getBucket(e){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.get)(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}createBucket(e,t={public:!1}){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}updateBucket(e,t){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.put)(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}emptyBucket(e){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.post)(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}deleteBucket(e){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,s.remove)(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if((0,i.isStorageError)(e))return{data:null,error:e};throw e}}))}}},981:function(e,t,r){var o=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const n=r(752),i=r(716),s=r(610),a={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},u={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};t.default=class{constructor(e,t={},r,o){this.url=e,this.headers=t,this.bucketId=r,this.fetch=(0,s.resolveFetch)(o)}uploadOrUpdate(e,t,r,i){return o(this,void 0,void 0,(function*(){try{let o;const n=Object.assign(Object.assign({},u),i);let s=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(n.upsert)});const a=n.metadata;"undefined"!=typeof Blob&&r instanceof Blob?(o=new FormData,o.append("cacheControl",n.cacheControl),a&&o.append("metadata",this.encodeMetadata(a)),o.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(o=r,o.append("cacheControl",n.cacheControl),a&&o.append("metadata",this.encodeMetadata(a))):(o=r,s["cache-control"]=`max-age=${n.cacheControl}`,s["content-type"]=n.contentType,a&&(s["x-metadata"]=this.toBase64(this.encodeMetadata(a)))),(null==i?void 0:i.headers)&&(s=Object.assign(Object.assign({},s),i.headers));const c=this._removeEmptyFolders(t),d=this._getFinalPath(c),l=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:e,body:o,headers:s},(null==n?void 0:n.duplex)?{duplex:n.duplex}:{})),h=yield l.json();return l.ok?{data:{path:c,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}upload(e,t,r){return o(this,void 0,void 0,(function*(){return this.uploadOrUpdate("POST",e,t,r)}))}uploadToSignedUrl(e,t,r,i){return o(this,void 0,void 0,(function*(){const o=this._removeEmptyFolders(e),s=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:u.upsert},i),n=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&r instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(e=r,e.append("cacheControl",t.cacheControl)):(e=r,n["cache-control"]=`max-age=${t.cacheControl}`,n["content-type"]=t.contentType);const s=yield this.fetch(a.toString(),{method:"PUT",body:e,headers:n}),c=yield s.json();return s.ok?{data:{path:o,fullPath:c.Key},error:null}:{data:null,error:c}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}createSignedUploadUrl(e,t){return o(this,void 0,void 0,(function*(){try{let r=this._getFinalPath(e);const o=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(o["x-upsert"]="true");const s=yield(0,i.post)(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:o}),a=new URL(this.url+s.url),u=a.searchParams.get("token");if(!u)throw new n.StorageError("No token returned by API");return{data:{signedUrl:a.toString(),path:e,token:u},error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}update(e,t,r){return o(this,void 0,void 0,(function*(){return this.uploadOrUpdate("PUT",e,t,r)}))}move(e,t,r){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,i.post)(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}copy(e,t,r){return o(this,void 0,void 0,(function*(){try{return{data:{path:(yield(0,i.post)(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}createSignedUrl(e,t,r){return o(this,void 0,void 0,(function*(){try{let o=this._getFinalPath(e),n=yield(0,i.post)(this.fetch,`${this.url}/object/sign/${o}`,Object.assign({expiresIn:t},(null==r?void 0:r.transform)?{transform:r.transform}:{}),{headers:this.headers});const s=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return n={signedUrl:encodeURI(`${this.url}${n.signedURL}${s}`)},{data:n,error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}createSignedUrls(e,t,r){return o(this,void 0,void 0,(function*(){try{const o=yield(0,i.post)(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),n=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:o.map((e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${n}`):null}))),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}download(e,t){return o(this,void 0,void 0,(function*(){const r=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",o=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),s=o?`?${o}`:"";try{const t=this._getFinalPath(e),o=yield(0,i.get)(this.fetch,`${this.url}/${r}/${t}${s}`,{headers:this.headers,noResolveJson:!0});return{data:yield o.blob(),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}info(e){return o(this,void 0,void 0,(function*(){const t=this._getFinalPath(e);try{const e=yield(0,i.get)(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:(0,s.recursiveToCamel)(e),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}exists(e){return o(this,void 0,void 0,(function*(){const t=this._getFinalPath(e);try{return yield(0,i.head)(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(e){if((0,n.isStorageError)(e)&&e instanceof n.StorageUnknownError){const t=e.originalError;if([400,404].includes(null==t?void 0:t.status))return{data:!1,error:e}}throw e}}))}getPublicUrl(e,t){const r=this._getFinalPath(e),o=[],n=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==n&&o.push(n);const i=void 0!==(null==t?void 0:t.transform)?"render/image":"object",s=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==s&&o.push(s);let a=o.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}remove(e){return o(this,void 0,void 0,(function*(){try{return{data:yield(0,i.remove)(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}list(e,t,r){return o(this,void 0,void 0,(function*(){try{const o=Object.assign(Object.assign(Object.assign({},a),t),{prefix:e||""});return{data:yield(0,i.post)(this.fetch,`${this.url}/object/list/${this.bucketId}`,o,{headers:this.headers},r),error:null}}catch(e){if((0,n.isStorageError)(e))return{data:null,error:e};throw e}}))}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r(341)})()));
\ No newline at end of file
diff --git a/node_modules/@supabase/storage-js/package.json b/node_modules/@supabase/storage-js/package.json
new file mode 100644
index 0000000..2c24a60
--- /dev/null
+++ b/node_modules/@supabase/storage-js/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "@supabase/storage-js",
+ "version": "2.7.1",
+ "description": "Isomorphic storage client for Supabase.",
+ "keywords": [
+ "javascript",
+ "typescript",
+ "supabase"
+ ],
+ "homepage": "https://github.com/supabase/storage-js",
+ "bugs": "https://github.com/supabase/storage-js/issues",
+ "license": "MIT",
+ "author": "Supabase",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "main": "dist/main/index.js",
+ "module": "dist/module/index.js",
+ "types": "dist/module/index.d.ts",
+ "sideEffects": false,
+ "repository": "supabase/storage-js",
+ "scripts": {
+ "clean": "rimraf dist docs/v2",
+ "format": "prettier --write \"{src,test}/**/*.ts\"",
+ "build": "genversion src/lib/version.ts --es6 && run-s clean format build:*",
+ "build:main": "tsc -p tsconfig.json",
+ "build:module": "tsc -p tsconfig.module.json",
+ "build:umd": "webpack",
+ "types-generate": "dts-gen -m '@supabase/storage-js' -s",
+ "test": "run-s test:clean test:infra test:suite test:clean",
+ "test:suite": "jest --runInBand",
+ "test:infra": "cd infra && docker compose down && docker compose up -d --build && sleep 10",
+ "test:clean": "cd infra && docker compose down --remove-orphans",
+ "docs": "typedoc --entryPoints src/index.ts --out docs/v2 --entryPoints src/packages/* --excludePrivate --excludeProtected",
+ "docs:json": "typedoc --json docs/v2/spec.json --entryPoints src/index.ts --entryPoints src/packages/* --excludePrivate --excludeExternals --excludeProtected"
+ },
+ "dependencies": {
+ "@supabase/node-fetch": "^2.6.14"
+ },
+ "devDependencies": {
+ "@types/jest": "^26.0.13",
+ "form-data": "^4.0.0",
+ "genversion": "^3.0.1",
+ "husky": "^4.3.0",
+ "jest": "^29.0.0",
+ "jest-environment-jsdom": "^29.5.0",
+ "npm-run-all": "^4.1.5",
+ "prettier": "^2.1.2",
+ "pretty-quick": "^3.1.0",
+ "rimraf": "^3.0.2",
+ "semantic-release-plugin-update-version-in-files": "^1.1.0",
+ "ts-jest": "^29.0.0",
+ "ts-loader": "^9.4.2",
+ "typedoc": "^0.22.16",
+ "typescript": "^4.6.3",
+ "webpack": "^5.75.0",
+ "webpack-cli": "^5.0.1"
+ },
+ "husky": {
+ "hooks": {
+ "pre-commit": "pretty-quick --staged"
+ }
+ },
+ "jsdelivr": "dist/umd/supabase.js",
+ "unpkg": "dist/umd/supabase.js",
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/node_modules/@supabase/supabase-js/LICENSE b/node_modules/@supabase/supabase-js/LICENSE
new file mode 100644
index 0000000..ddeba6a
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 Supabase
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@supabase/supabase-js/README.md b/node_modules/@supabase/supabase-js/README.md
new file mode 100644
index 0000000..1163ef9
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/README.md
@@ -0,0 +1,94 @@
+# `supabase-js` - Isomorphic JavaScript Client for Supabase.
+
+- **Documentation:** https://supabase.com/docs/reference/javascript/start
+- TypeDoc: https://supabase.github.io/supabase-js/v2/
+
+## Usage
+
+First of all, you need to install the library:
+
+```sh
+npm install @supabase/supabase-js
+```
+
+Then you're able to import the library and establish the connection with the database:
+
+```js
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key')
+```
+
+### UMD
+
+You can use plain `
+```
+
+or even:
+
+```html
+
+```
+
+Then you can use it from a global `supabase` variable:
+
+```html
+
+```
+
+### ESM
+
+You can use `
+```
+
+### Deno
+
+You can use supabase-js in the Deno runtime via [JSR](https://jsr.io/@supabase/supabase-js):
+
+```js
+import { createClient } from 'jsr:@supabase/supabase-js@2'
+```
+
+### Custom `fetch` implementation
+
+`supabase-js` uses the [`cross-fetch`](https://www.npmjs.com/package/cross-fetch) library to make HTTP requests, but an alternative `fetch` implementation can be provided as an option. This is most useful in environments where `cross-fetch` is not compatible, for instance Cloudflare Workers:
+
+```js
+import { createClient } from '@supabase/supabase-js'
+
+// Provide a custom `fetch` implementation as an option
+const supabase = createClient('https://xyzcompany.supabase.co', 'public-anon-key', {
+ global: {
+ fetch: (...args) => fetch(...args),
+ },
+})
+```
+
+## Sponsors
+
+We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.
+
+[](https://github.com/sponsors/supabase)
+
+## Badges
+
+[](https://coveralls.io/github/supabase/supabase-js?branch=master)
diff --git a/node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js b/node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js
new file mode 100644
index 0000000..1fa3969
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/SupabaseClient.js
@@ -0,0 +1,231 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const functions_js_1 = require("@supabase/functions-js");
+const postgrest_js_1 = require("@supabase/postgrest-js");
+const realtime_js_1 = require("@supabase/realtime-js");
+const storage_js_1 = require("@supabase/storage-js");
+const constants_1 = require("./lib/constants");
+const fetch_1 = require("./lib/fetch");
+const helpers_1 = require("./lib/helpers");
+const SupabaseAuthClient_1 = require("./lib/SupabaseAuthClient");
+/**
+ * Supabase Client.
+ *
+ * An isomorphic Javascript client for interacting with Postgres.
+ */
+class SupabaseClient {
+ /**
+ * Create a new client for use in the browser.
+ * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.
+ * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.
+ * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
+ * @param options.auth.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
+ * @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
+ * @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
+ * @param options.realtime Options passed along to realtime-js constructor.
+ * @param options.global.fetch A custom fetch implementation.
+ * @param options.global.headers Any additional headers to send with each network request.
+ */
+ constructor(supabaseUrl, supabaseKey, options) {
+ var _a, _b, _c;
+ this.supabaseUrl = supabaseUrl;
+ this.supabaseKey = supabaseKey;
+ if (!supabaseUrl)
+ throw new Error('supabaseUrl is required.');
+ if (!supabaseKey)
+ throw new Error('supabaseKey is required.');
+ const _supabaseUrl = (0, helpers_1.stripTrailingSlash)(supabaseUrl);
+ this.realtimeUrl = `${_supabaseUrl}/realtime/v1`.replace(/^http/i, 'ws');
+ this.authUrl = `${_supabaseUrl}/auth/v1`;
+ this.storageUrl = `${_supabaseUrl}/storage/v1`;
+ this.functionsUrl = `${_supabaseUrl}/functions/v1`;
+ // default storage key uses the supabase project ref as a namespace
+ const defaultStorageKey = `sb-${new URL(this.authUrl).hostname.split('.')[0]}-auth-token`;
+ const DEFAULTS = {
+ db: constants_1.DEFAULT_DB_OPTIONS,
+ realtime: constants_1.DEFAULT_REALTIME_OPTIONS,
+ auth: Object.assign(Object.assign({}, constants_1.DEFAULT_AUTH_OPTIONS), { storageKey: defaultStorageKey }),
+ global: constants_1.DEFAULT_GLOBAL_OPTIONS,
+ };
+ const settings = (0, helpers_1.applySettingDefaults)(options !== null && options !== void 0 ? options : {}, DEFAULTS);
+ this.storageKey = (_a = settings.auth.storageKey) !== null && _a !== void 0 ? _a : '';
+ this.headers = (_b = settings.global.headers) !== null && _b !== void 0 ? _b : {};
+ if (!settings.accessToken) {
+ this.auth = this._initSupabaseAuthClient((_c = settings.auth) !== null && _c !== void 0 ? _c : {}, this.headers, settings.global.fetch);
+ }
+ else {
+ this.accessToken = settings.accessToken;
+ this.auth = new Proxy({}, {
+ get: (_, prop) => {
+ throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(prop)} is not possible`);
+ },
+ });
+ }
+ this.fetch = (0, fetch_1.fetchWithAuth)(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch);
+ this.realtime = this._initRealtimeClient(Object.assign({ headers: this.headers, accessToken: this._getAccessToken.bind(this) }, settings.realtime));
+ this.rest = new postgrest_js_1.PostgrestClient(`${_supabaseUrl}/rest/v1`, {
+ headers: this.headers,
+ schema: settings.db.schema,
+ fetch: this.fetch,
+ });
+ if (!settings.accessToken) {
+ this._listenForAuthEvents();
+ }
+ }
+ /**
+ * Supabase Functions allows you to deploy and invoke edge functions.
+ */
+ get functions() {
+ return new functions_js_1.FunctionsClient(this.functionsUrl, {
+ headers: this.headers,
+ customFetch: this.fetch,
+ });
+ }
+ /**
+ * Supabase Storage allows you to manage user-generated content, such as photos or videos.
+ */
+ get storage() {
+ return new storage_js_1.StorageClient(this.storageUrl, this.headers, this.fetch);
+ }
+ /**
+ * Perform a query on a table or a view.
+ *
+ * @param relation - The table or view name to query
+ */
+ from(relation) {
+ return this.rest.from(relation);
+ }
+ // NOTE: signatures must be kept in sync with PostgrestClient.schema
+ /**
+ * Select a schema to query or perform an function (rpc) call.
+ *
+ * The schema needs to be on the list of exposed schemas inside Supabase.
+ *
+ * @param schema - The schema to query
+ */
+ schema(schema) {
+ return this.rest.schema(schema);
+ }
+ // NOTE: signatures must be kept in sync with PostgrestClient.rpc
+ /**
+ * Perform a function call.
+ *
+ * @param fn - The function name to call
+ * @param args - The arguments to pass to the function call
+ * @param options - Named parameters
+ * @param options.head - When set to `true`, `data` will not be returned.
+ * Useful if you only need the count.
+ * @param options.get - When set to `true`, the function will be called with
+ * read-only access mode.
+ * @param options.count - Count algorithm to use to count rows returned by the
+ * function. Only applicable for [set-returning
+ * functions](https://www.postgresql.org/docs/current/functions-srf.html).
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ rpc(fn, args = {}, options = {}) {
+ return this.rest.rpc(fn, args, options);
+ }
+ /**
+ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
+ *
+ * @param {string} name - The name of the Realtime channel.
+ * @param {Object} opts - The options to pass to the Realtime channel.
+ *
+ */
+ channel(name, opts = { config: {} }) {
+ return this.realtime.channel(name, opts);
+ }
+ /**
+ * Returns all Realtime channels.
+ */
+ getChannels() {
+ return this.realtime.getChannels();
+ }
+ /**
+ * Unsubscribes and removes Realtime channel from Realtime client.
+ *
+ * @param {RealtimeChannel} channel - The name of the Realtime channel.
+ *
+ */
+ removeChannel(channel) {
+ return this.realtime.removeChannel(channel);
+ }
+ /**
+ * Unsubscribes and removes all Realtime channels from Realtime client.
+ */
+ removeAllChannels() {
+ return this.realtime.removeAllChannels();
+ }
+ _getAccessToken() {
+ var _a, _b;
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.accessToken) {
+ return yield this.accessToken();
+ }
+ const { data } = yield this.auth.getSession();
+ return (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : null;
+ });
+ }
+ _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, storageKey, flowType, lock, debug, }, headers, fetch) {
+ const authHeaders = {
+ Authorization: `Bearer ${this.supabaseKey}`,
+ apikey: `${this.supabaseKey}`,
+ };
+ return new SupabaseAuthClient_1.SupabaseAuthClient({
+ url: this.authUrl,
+ headers: Object.assign(Object.assign({}, authHeaders), headers),
+ storageKey: storageKey,
+ autoRefreshToken,
+ persistSession,
+ detectSessionInUrl,
+ storage,
+ flowType,
+ lock,
+ debug,
+ fetch,
+ // auth checks if there is a custom authorizaiton header using this flag
+ // so it knows whether to return an error when getUser is called with no session
+ hasCustomAuthorizationHeader: 'Authorization' in this.headers,
+ });
+ }
+ _initRealtimeClient(options) {
+ return new realtime_js_1.RealtimeClient(this.realtimeUrl, Object.assign(Object.assign({}, options), { params: Object.assign({ apikey: this.supabaseKey }, options === null || options === void 0 ? void 0 : options.params) }));
+ }
+ _listenForAuthEvents() {
+ let data = this.auth.onAuthStateChange((event, session) => {
+ this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token);
+ });
+ return data;
+ }
+ _handleTokenChanged(event, source, token) {
+ if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&
+ this.changedAccessToken !== token) {
+ this.changedAccessToken = token;
+ }
+ else if (event === 'SIGNED_OUT') {
+ this.realtime.setAuth();
+ if (source == 'STORAGE')
+ this.auth.signOut();
+ this.changedAccessToken = undefined;
+ }
+ }
+}
+exports.default = SupabaseClient;
+//# sourceMappingURL=SupabaseClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/index.js b/node_modules/@supabase/supabase-js/dist/main/index.js
new file mode 100644
index 0000000..cacae92
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/index.js
@@ -0,0 +1,41 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createClient = exports.SupabaseClient = exports.FunctionRegion = exports.FunctionsError = exports.FunctionsRelayError = exports.FunctionsFetchError = exports.FunctionsHttpError = exports.PostgrestError = void 0;
+const SupabaseClient_1 = __importDefault(require("./SupabaseClient"));
+__exportStar(require("@supabase/auth-js"), exports);
+var postgrest_js_1 = require("@supabase/postgrest-js");
+Object.defineProperty(exports, "PostgrestError", { enumerable: true, get: function () { return postgrest_js_1.PostgrestError; } });
+var functions_js_1 = require("@supabase/functions-js");
+Object.defineProperty(exports, "FunctionsHttpError", { enumerable: true, get: function () { return functions_js_1.FunctionsHttpError; } });
+Object.defineProperty(exports, "FunctionsFetchError", { enumerable: true, get: function () { return functions_js_1.FunctionsFetchError; } });
+Object.defineProperty(exports, "FunctionsRelayError", { enumerable: true, get: function () { return functions_js_1.FunctionsRelayError; } });
+Object.defineProperty(exports, "FunctionsError", { enumerable: true, get: function () { return functions_js_1.FunctionsError; } });
+Object.defineProperty(exports, "FunctionRegion", { enumerable: true, get: function () { return functions_js_1.FunctionRegion; } });
+__exportStar(require("@supabase/realtime-js"), exports);
+var SupabaseClient_2 = require("./SupabaseClient");
+Object.defineProperty(exports, "SupabaseClient", { enumerable: true, get: function () { return __importDefault(SupabaseClient_2).default; } });
+/**
+ * Creates a new Supabase Client.
+ */
+const createClient = (supabaseUrl, supabaseKey, options) => {
+ return new SupabaseClient_1.default(supabaseUrl, supabaseKey, options);
+};
+exports.createClient = createClient;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/SupabaseAuthClient.js b/node_modules/@supabase/supabase-js/dist/main/lib/SupabaseAuthClient.js
new file mode 100644
index 0000000..9f8a94e
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/SupabaseAuthClient.js
@@ -0,0 +1,11 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.SupabaseAuthClient = void 0;
+const auth_js_1 = require("@supabase/auth-js");
+class SupabaseAuthClient extends auth_js_1.AuthClient {
+ constructor(options) {
+ super(options);
+ }
+}
+exports.SupabaseAuthClient = SupabaseAuthClient;
+//# sourceMappingURL=SupabaseAuthClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/constants.js b/node_modules/@supabase/supabase-js/dist/main/lib/constants.js
new file mode 100644
index 0000000..d3c4328
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/constants.js
@@ -0,0 +1,33 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DEFAULT_REALTIME_OPTIONS = exports.DEFAULT_AUTH_OPTIONS = exports.DEFAULT_DB_OPTIONS = exports.DEFAULT_GLOBAL_OPTIONS = exports.DEFAULT_HEADERS = void 0;
+const version_1 = require("./version");
+let JS_ENV = '';
+// @ts-ignore
+if (typeof Deno !== 'undefined') {
+ JS_ENV = 'deno';
+}
+else if (typeof document !== 'undefined') {
+ JS_ENV = 'web';
+}
+else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
+ JS_ENV = 'react-native';
+}
+else {
+ JS_ENV = 'node';
+}
+exports.DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version_1.version}` };
+exports.DEFAULT_GLOBAL_OPTIONS = {
+ headers: exports.DEFAULT_HEADERS,
+};
+exports.DEFAULT_DB_OPTIONS = {
+ schema: 'public',
+};
+exports.DEFAULT_AUTH_OPTIONS = {
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ flowType: 'implicit',
+};
+exports.DEFAULT_REALTIME_OPTIONS = {};
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/fetch.js b/node_modules/@supabase/supabase-js/dist/main/lib/fetch.js
new file mode 100644
index 0000000..ad8bda8
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/fetch.js
@@ -0,0 +1,76 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ var desc = Object.getOwnPropertyDescriptor(m, k);
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
+ desc = { enumerable: true, get: function() { return m[k]; } };
+ }
+ Object.defineProperty(o, k2, desc);
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fetchWithAuth = exports.resolveHeadersConstructor = exports.resolveFetch = void 0;
+// @ts-ignore
+const node_fetch_1 = __importStar(require("@supabase/node-fetch"));
+const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = node_fetch_1.default;
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+exports.resolveFetch = resolveFetch;
+const resolveHeadersConstructor = () => {
+ if (typeof Headers === 'undefined') {
+ return node_fetch_1.Headers;
+ }
+ return Headers;
+};
+exports.resolveHeadersConstructor = resolveHeadersConstructor;
+const fetchWithAuth = (supabaseKey, getAccessToken, customFetch) => {
+ const fetch = (0, exports.resolveFetch)(customFetch);
+ const HeadersConstructor = (0, exports.resolveHeadersConstructor)();
+ return (input, init) => __awaiter(void 0, void 0, void 0, function* () {
+ var _a;
+ const accessToken = (_a = (yield getAccessToken())) !== null && _a !== void 0 ? _a : supabaseKey;
+ let headers = new HeadersConstructor(init === null || init === void 0 ? void 0 : init.headers);
+ if (!headers.has('apikey')) {
+ headers.set('apikey', supabaseKey);
+ }
+ if (!headers.has('Authorization')) {
+ headers.set('Authorization', `Bearer ${accessToken}`);
+ }
+ return fetch(input, Object.assign(Object.assign({}, init), { headers }));
+ });
+};
+exports.fetchWithAuth = fetchWithAuth;
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/helpers.js b/node_modules/@supabase/supabase-js/dist/main/lib/helpers.js
new file mode 100644
index 0000000..02817ba
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/helpers.js
@@ -0,0 +1,46 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.applySettingDefaults = exports.isBrowser = exports.stripTrailingSlash = exports.uuid = void 0;
+function uuid() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
+ return v.toString(16);
+ });
+}
+exports.uuid = uuid;
+function stripTrailingSlash(url) {
+ return url.replace(/\/$/, '');
+}
+exports.stripTrailingSlash = stripTrailingSlash;
+const isBrowser = () => typeof window !== 'undefined';
+exports.isBrowser = isBrowser;
+function applySettingDefaults(options, defaults) {
+ const { db: dbOptions, auth: authOptions, realtime: realtimeOptions, global: globalOptions, } = options;
+ const { db: DEFAULT_DB_OPTIONS, auth: DEFAULT_AUTH_OPTIONS, realtime: DEFAULT_REALTIME_OPTIONS, global: DEFAULT_GLOBAL_OPTIONS, } = defaults;
+ const result = {
+ db: Object.assign(Object.assign({}, DEFAULT_DB_OPTIONS), dbOptions),
+ auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), authOptions),
+ realtime: Object.assign(Object.assign({}, DEFAULT_REALTIME_OPTIONS), realtimeOptions),
+ global: Object.assign(Object.assign({}, DEFAULT_GLOBAL_OPTIONS), globalOptions),
+ accessToken: () => __awaiter(this, void 0, void 0, function* () { return ''; }),
+ };
+ if (options.accessToken) {
+ result.accessToken = options.accessToken;
+ }
+ else {
+ // hack around Required<>
+ delete result.accessToken;
+ }
+ return result;
+}
+exports.applySettingDefaults = applySettingDefaults;
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/types.js b/node_modules/@supabase/supabase-js/dist/main/lib/types.js
new file mode 100644
index 0000000..11e638d
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/types.js
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/main/lib/version.js b/node_modules/@supabase/supabase-js/dist/main/lib/version.js
new file mode 100644
index 0000000..5624dd3
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/main/lib/version.js
@@ -0,0 +1,5 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.version = void 0;
+exports.version = '2.48.1';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/SupabaseClient.js b/node_modules/@supabase/supabase-js/dist/module/SupabaseClient.js
new file mode 100644
index 0000000..c5b1fd0
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/SupabaseClient.js
@@ -0,0 +1,228 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+import { FunctionsClient } from '@supabase/functions-js';
+import { PostgrestClient, } from '@supabase/postgrest-js';
+import { RealtimeClient, } from '@supabase/realtime-js';
+import { StorageClient as SupabaseStorageClient } from '@supabase/storage-js';
+import { DEFAULT_GLOBAL_OPTIONS, DEFAULT_DB_OPTIONS, DEFAULT_AUTH_OPTIONS, DEFAULT_REALTIME_OPTIONS, } from './lib/constants';
+import { fetchWithAuth } from './lib/fetch';
+import { stripTrailingSlash, applySettingDefaults } from './lib/helpers';
+import { SupabaseAuthClient } from './lib/SupabaseAuthClient';
+/**
+ * Supabase Client.
+ *
+ * An isomorphic Javascript client for interacting with Postgres.
+ */
+export default class SupabaseClient {
+ /**
+ * Create a new client for use in the browser.
+ * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.
+ * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.
+ * @param options.db.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.
+ * @param options.auth.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring.
+ * @param options.auth.persistSession Set to "true" if you want to automatically save the user session into local storage.
+ * @param options.auth.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
+ * @param options.realtime Options passed along to realtime-js constructor.
+ * @param options.global.fetch A custom fetch implementation.
+ * @param options.global.headers Any additional headers to send with each network request.
+ */
+ constructor(supabaseUrl, supabaseKey, options) {
+ var _a, _b, _c;
+ this.supabaseUrl = supabaseUrl;
+ this.supabaseKey = supabaseKey;
+ if (!supabaseUrl)
+ throw new Error('supabaseUrl is required.');
+ if (!supabaseKey)
+ throw new Error('supabaseKey is required.');
+ const _supabaseUrl = stripTrailingSlash(supabaseUrl);
+ this.realtimeUrl = `${_supabaseUrl}/realtime/v1`.replace(/^http/i, 'ws');
+ this.authUrl = `${_supabaseUrl}/auth/v1`;
+ this.storageUrl = `${_supabaseUrl}/storage/v1`;
+ this.functionsUrl = `${_supabaseUrl}/functions/v1`;
+ // default storage key uses the supabase project ref as a namespace
+ const defaultStorageKey = `sb-${new URL(this.authUrl).hostname.split('.')[0]}-auth-token`;
+ const DEFAULTS = {
+ db: DEFAULT_DB_OPTIONS,
+ realtime: DEFAULT_REALTIME_OPTIONS,
+ auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), { storageKey: defaultStorageKey }),
+ global: DEFAULT_GLOBAL_OPTIONS,
+ };
+ const settings = applySettingDefaults(options !== null && options !== void 0 ? options : {}, DEFAULTS);
+ this.storageKey = (_a = settings.auth.storageKey) !== null && _a !== void 0 ? _a : '';
+ this.headers = (_b = settings.global.headers) !== null && _b !== void 0 ? _b : {};
+ if (!settings.accessToken) {
+ this.auth = this._initSupabaseAuthClient((_c = settings.auth) !== null && _c !== void 0 ? _c : {}, this.headers, settings.global.fetch);
+ }
+ else {
+ this.accessToken = settings.accessToken;
+ this.auth = new Proxy({}, {
+ get: (_, prop) => {
+ throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(prop)} is not possible`);
+ },
+ });
+ }
+ this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.global.fetch);
+ this.realtime = this._initRealtimeClient(Object.assign({ headers: this.headers, accessToken: this._getAccessToken.bind(this) }, settings.realtime));
+ this.rest = new PostgrestClient(`${_supabaseUrl}/rest/v1`, {
+ headers: this.headers,
+ schema: settings.db.schema,
+ fetch: this.fetch,
+ });
+ if (!settings.accessToken) {
+ this._listenForAuthEvents();
+ }
+ }
+ /**
+ * Supabase Functions allows you to deploy and invoke edge functions.
+ */
+ get functions() {
+ return new FunctionsClient(this.functionsUrl, {
+ headers: this.headers,
+ customFetch: this.fetch,
+ });
+ }
+ /**
+ * Supabase Storage allows you to manage user-generated content, such as photos or videos.
+ */
+ get storage() {
+ return new SupabaseStorageClient(this.storageUrl, this.headers, this.fetch);
+ }
+ /**
+ * Perform a query on a table or a view.
+ *
+ * @param relation - The table or view name to query
+ */
+ from(relation) {
+ return this.rest.from(relation);
+ }
+ // NOTE: signatures must be kept in sync with PostgrestClient.schema
+ /**
+ * Select a schema to query or perform an function (rpc) call.
+ *
+ * The schema needs to be on the list of exposed schemas inside Supabase.
+ *
+ * @param schema - The schema to query
+ */
+ schema(schema) {
+ return this.rest.schema(schema);
+ }
+ // NOTE: signatures must be kept in sync with PostgrestClient.rpc
+ /**
+ * Perform a function call.
+ *
+ * @param fn - The function name to call
+ * @param args - The arguments to pass to the function call
+ * @param options - Named parameters
+ * @param options.head - When set to `true`, `data` will not be returned.
+ * Useful if you only need the count.
+ * @param options.get - When set to `true`, the function will be called with
+ * read-only access mode.
+ * @param options.count - Count algorithm to use to count rows returned by the
+ * function. Only applicable for [set-returning
+ * functions](https://www.postgresql.org/docs/current/functions-srf.html).
+ *
+ * `"exact"`: Exact but slow count algorithm. Performs a `COUNT(*)` under the
+ * hood.
+ *
+ * `"planned"`: Approximated but fast count algorithm. Uses the Postgres
+ * statistics under the hood.
+ *
+ * `"estimated"`: Uses exact count for low numbers and planned count for high
+ * numbers.
+ */
+ rpc(fn, args = {}, options = {}) {
+ return this.rest.rpc(fn, args, options);
+ }
+ /**
+ * Creates a Realtime channel with Broadcast, Presence, and Postgres Changes.
+ *
+ * @param {string} name - The name of the Realtime channel.
+ * @param {Object} opts - The options to pass to the Realtime channel.
+ *
+ */
+ channel(name, opts = { config: {} }) {
+ return this.realtime.channel(name, opts);
+ }
+ /**
+ * Returns all Realtime channels.
+ */
+ getChannels() {
+ return this.realtime.getChannels();
+ }
+ /**
+ * Unsubscribes and removes Realtime channel from Realtime client.
+ *
+ * @param {RealtimeChannel} channel - The name of the Realtime channel.
+ *
+ */
+ removeChannel(channel) {
+ return this.realtime.removeChannel(channel);
+ }
+ /**
+ * Unsubscribes and removes all Realtime channels from Realtime client.
+ */
+ removeAllChannels() {
+ return this.realtime.removeAllChannels();
+ }
+ _getAccessToken() {
+ var _a, _b;
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this.accessToken) {
+ return yield this.accessToken();
+ }
+ const { data } = yield this.auth.getSession();
+ return (_b = (_a = data.session) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : null;
+ });
+ }
+ _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, storageKey, flowType, lock, debug, }, headers, fetch) {
+ const authHeaders = {
+ Authorization: `Bearer ${this.supabaseKey}`,
+ apikey: `${this.supabaseKey}`,
+ };
+ return new SupabaseAuthClient({
+ url: this.authUrl,
+ headers: Object.assign(Object.assign({}, authHeaders), headers),
+ storageKey: storageKey,
+ autoRefreshToken,
+ persistSession,
+ detectSessionInUrl,
+ storage,
+ flowType,
+ lock,
+ debug,
+ fetch,
+ // auth checks if there is a custom authorizaiton header using this flag
+ // so it knows whether to return an error when getUser is called with no session
+ hasCustomAuthorizationHeader: 'Authorization' in this.headers,
+ });
+ }
+ _initRealtimeClient(options) {
+ return new RealtimeClient(this.realtimeUrl, Object.assign(Object.assign({}, options), { params: Object.assign({ apikey: this.supabaseKey }, options === null || options === void 0 ? void 0 : options.params) }));
+ }
+ _listenForAuthEvents() {
+ let data = this.auth.onAuthStateChange((event, session) => {
+ this._handleTokenChanged(event, 'CLIENT', session === null || session === void 0 ? void 0 : session.access_token);
+ });
+ return data;
+ }
+ _handleTokenChanged(event, source, token) {
+ if ((event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&
+ this.changedAccessToken !== token) {
+ this.changedAccessToken = token;
+ }
+ else if (event === 'SIGNED_OUT') {
+ this.realtime.setAuth();
+ if (source == 'STORAGE')
+ this.auth.signOut();
+ this.changedAccessToken = undefined;
+ }
+ }
+}
+//# sourceMappingURL=SupabaseClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/index.js b/node_modules/@supabase/supabase-js/dist/module/index.js
new file mode 100644
index 0000000..2ce6464
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/index.js
@@ -0,0 +1,13 @@
+import SupabaseClient from './SupabaseClient';
+export * from '@supabase/auth-js';
+export { PostgrestError, } from '@supabase/postgrest-js';
+export { FunctionsHttpError, FunctionsFetchError, FunctionsRelayError, FunctionsError, FunctionRegion, } from '@supabase/functions-js';
+export * from '@supabase/realtime-js';
+export { default as SupabaseClient } from './SupabaseClient';
+/**
+ * Creates a new Supabase Client.
+ */
+export const createClient = (supabaseUrl, supabaseKey, options) => {
+ return new SupabaseClient(supabaseUrl, supabaseKey, options);
+};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/SupabaseAuthClient.js b/node_modules/@supabase/supabase-js/dist/module/lib/SupabaseAuthClient.js
new file mode 100644
index 0000000..16fc8c1
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/SupabaseAuthClient.js
@@ -0,0 +1,7 @@
+import { AuthClient } from '@supabase/auth-js';
+export class SupabaseAuthClient extends AuthClient {
+ constructor(options) {
+ super(options);
+ }
+}
+//# sourceMappingURL=SupabaseAuthClient.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/constants.js b/node_modules/@supabase/supabase-js/dist/module/lib/constants.js
new file mode 100644
index 0000000..13953f8
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/constants.js
@@ -0,0 +1,30 @@
+import { version } from './version';
+let JS_ENV = '';
+// @ts-ignore
+if (typeof Deno !== 'undefined') {
+ JS_ENV = 'deno';
+}
+else if (typeof document !== 'undefined') {
+ JS_ENV = 'web';
+}
+else if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
+ JS_ENV = 'react-native';
+}
+else {
+ JS_ENV = 'node';
+}
+export const DEFAULT_HEADERS = { 'X-Client-Info': `supabase-js-${JS_ENV}/${version}` };
+export const DEFAULT_GLOBAL_OPTIONS = {
+ headers: DEFAULT_HEADERS,
+};
+export const DEFAULT_DB_OPTIONS = {
+ schema: 'public',
+};
+export const DEFAULT_AUTH_OPTIONS = {
+ autoRefreshToken: true,
+ persistSession: true,
+ detectSessionInUrl: true,
+ flowType: 'implicit',
+};
+export const DEFAULT_REALTIME_OPTIONS = {};
+//# sourceMappingURL=constants.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/fetch.js b/node_modules/@supabase/supabase-js/dist/module/lib/fetch.js
new file mode 100644
index 0000000..bacac32
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/fetch.js
@@ -0,0 +1,47 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+// @ts-ignore
+import nodeFetch, { Headers as NodeFetchHeaders } from '@supabase/node-fetch';
+export const resolveFetch = (customFetch) => {
+ let _fetch;
+ if (customFetch) {
+ _fetch = customFetch;
+ }
+ else if (typeof fetch === 'undefined') {
+ _fetch = nodeFetch;
+ }
+ else {
+ _fetch = fetch;
+ }
+ return (...args) => _fetch(...args);
+};
+export const resolveHeadersConstructor = () => {
+ if (typeof Headers === 'undefined') {
+ return NodeFetchHeaders;
+ }
+ return Headers;
+};
+export const fetchWithAuth = (supabaseKey, getAccessToken, customFetch) => {
+ const fetch = resolveFetch(customFetch);
+ const HeadersConstructor = resolveHeadersConstructor();
+ return (input, init) => __awaiter(void 0, void 0, void 0, function* () {
+ var _a;
+ const accessToken = (_a = (yield getAccessToken())) !== null && _a !== void 0 ? _a : supabaseKey;
+ let headers = new HeadersConstructor(init === null || init === void 0 ? void 0 : init.headers);
+ if (!headers.has('apikey')) {
+ headers.set('apikey', supabaseKey);
+ }
+ if (!headers.has('Authorization')) {
+ headers.set('Authorization', `Bearer ${accessToken}`);
+ }
+ return fetch(input, Object.assign(Object.assign({}, init), { headers }));
+ });
+};
+//# sourceMappingURL=fetch.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/helpers.js b/node_modules/@supabase/supabase-js/dist/module/lib/helpers.js
new file mode 100644
index 0000000..37768bb
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/helpers.js
@@ -0,0 +1,39 @@
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+export function uuid() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
+ var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
+ return v.toString(16);
+ });
+}
+export function stripTrailingSlash(url) {
+ return url.replace(/\/$/, '');
+}
+export const isBrowser = () => typeof window !== 'undefined';
+export function applySettingDefaults(options, defaults) {
+ const { db: dbOptions, auth: authOptions, realtime: realtimeOptions, global: globalOptions, } = options;
+ const { db: DEFAULT_DB_OPTIONS, auth: DEFAULT_AUTH_OPTIONS, realtime: DEFAULT_REALTIME_OPTIONS, global: DEFAULT_GLOBAL_OPTIONS, } = defaults;
+ const result = {
+ db: Object.assign(Object.assign({}, DEFAULT_DB_OPTIONS), dbOptions),
+ auth: Object.assign(Object.assign({}, DEFAULT_AUTH_OPTIONS), authOptions),
+ realtime: Object.assign(Object.assign({}, DEFAULT_REALTIME_OPTIONS), realtimeOptions),
+ global: Object.assign(Object.assign({}, DEFAULT_GLOBAL_OPTIONS), globalOptions),
+ accessToken: () => __awaiter(this, void 0, void 0, function* () { return ''; }),
+ };
+ if (options.accessToken) {
+ result.accessToken = options.accessToken;
+ }
+ else {
+ // hack around Required<>
+ delete result.accessToken;
+ }
+ return result;
+}
+//# sourceMappingURL=helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/types.js b/node_modules/@supabase/supabase-js/dist/module/lib/types.js
new file mode 100644
index 0000000..718fd38
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/types.js
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/module/lib/version.js b/node_modules/@supabase/supabase-js/dist/module/lib/version.js
new file mode 100644
index 0000000..4e4bdc2
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/module/lib/version.js
@@ -0,0 +1,2 @@
+export const version = '2.48.1';
+//# sourceMappingURL=version.js.map
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/umd/591.supabase.js b/node_modules/@supabase/supabase-js/dist/umd/591.supabase.js
new file mode 100644
index 0000000..e245770
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/umd/591.supabase.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunksupabase=self.webpackChunksupabase||[]).push([[591],{591:e=>{e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}}]);
\ No newline at end of file
diff --git a/node_modules/@supabase/supabase-js/dist/umd/supabase.js b/node_modules/@supabase/supabase-js/dist/umd/supabase.js
new file mode 100644
index 0000000..c4da1d2
--- /dev/null
+++ b/node_modules/@supabase/supabase-js/dist/umd/supabase.js
@@ -0,0 +1 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.supabase=t():e.supabase=t()}(self,(()=>(()=>{"use strict";var e,t,s,r,i={235:(e,t,s)=>{s.r(t),s.d(t,{AuthAdminApi:()=>ie,AuthApiError:()=>k,AuthClient:()=>ne,AuthError:()=>b,AuthImplicitGrantRedirectError:()=>$,AuthInvalidCredentialsError:()=>A,AuthInvalidTokenResponseError:()=>P,AuthPKCEGrantCodeExchangeError:()=>C,AuthRetryableFetchError:()=>R,AuthSessionMissingError:()=>O,AuthUnknownError:()=>S,AuthWeakPasswordError:()=>L,CustomAuthError:()=>E,GoTrueAdminApi:()=>K,GoTrueClient:()=>re,NavigatorLockAcquireTimeoutError:()=>X,isAuthApiError:()=>T,isAuthError:()=>w,isAuthImplicitGrantRedirectError:()=>x,isAuthRetryableFetchError:()=>I,isAuthSessionMissingError:()=>j,isAuthWeakPasswordError:()=>U,lockInternals:()=>Y,navigatorLock:()=>Z});const r="2.67.3",i={"X-Client-Info":`gotrue-js/${r}`},n="X-Supabase-Api-Version",o={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},a=()=>"undefined"!=typeof window&&"undefined"!=typeof document,c={tested:!1,writable:!1},l=()=>{if(!a())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(c.tested)return c.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),c.tested=!0,c.writable=!0}catch(e){c.tested=!0,c.writable=!1}return c.writable},h=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},u=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,d=async(e,t,s)=>{await e.setItem(t,JSON.stringify(s))},f=async(e,t)=>{const s=await e.getItem(t);if(!s)return null;try{return JSON.parse(s)}catch(e){return s}},p=async(e,t)=>{await e.removeItem(t)};class g{constructor(){this.promise=new g.promiseConstructor(((e,t)=>{this.resolve=e,this.reject=t}))}}function v(e){const t=e.split(".");if(3!==t.length)throw new Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const s=t[1];return JSON.parse(function(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let s,r,i,n,o,a,c,l="",h=0;for(e=e.replace("-","+").replace("_","/");h>4,r=(15&o)<<4|a>>2,i=(3&a)<<6|c,l+=String.fromCharCode(s),64!=a&&0!=r&&(l+=String.fromCharCode(r)),64!=c&&0!=i&&(l+=String.fromCharCode(i));return l}(s))}function y(e){return("0"+e.toString(16)).substr(-2)}async function m(e,t,s=!1){const r=function(){const e=new Uint32Array(56);if("undefined"==typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let s="";for(let r=0;r<56;r++)s+=e.charAt(Math.floor(Math.random()*t));return s}return crypto.getRandomValues(e),Array.from(e,y).join("")}();let i=r;s&&(i+="/PASSWORD_RECOVERY"),await d(e,`${t}-code-verifier`,i);const n=await async function(e){if("undefined"==typeof crypto||void 0===crypto.subtle||"undefined"==typeof TextEncoder)return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const t=await async function(e){const t=(new TextEncoder).encode(e),s=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(s);return Array.from(r).map((e=>String.fromCharCode(e))).join("")}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(r);return[n,r===n?"plain":"s256"]}g.promiseConstructor=Promise;const _=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class b extends Error{constructor(e,t,s){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=s}}function w(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class k extends b{constructor(e,t,s){super(e,t,s),this.name="AuthApiError",this.status=t,this.code=s}}function T(e){return w(e)&&"AuthApiError"===e.name}class S extends b{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class E extends b{constructor(e,t,s,r){super(e,s,r),this.name=t,this.status=s}}class O extends E{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function j(e){return w(e)&&"AuthSessionMissingError"===e.name}class P extends E{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class A extends E{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class $ extends E{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function x(e){return w(e)&&"AuthImplicitGrantRedirectError"===e.name}class C extends E{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class R extends E{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function I(e){return w(e)&&"AuthRetryableFetchError"===e.name}class L extends E{constructor(e,t,s){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=s}}function U(e){return w(e)&&"AuthWeakPasswordError"===e.name}const D=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),N=[502,503,504];async function F(e){var t;if(!u(e))throw new R(D(e),0);if(N.includes(e.status))throw new R(D(e),e.status);let s,r;try{s=await e.json()}catch(e){throw new S(D(e),e)}const i=function(e){const t=e.headers.get(n);if(!t)return null;if(!t.match(_))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=o["2024-01-01"].timestamp&&"object"==typeof s&&s&&"string"==typeof s.code?r=s.code:"object"==typeof s&&s&&"string"==typeof s.error_code&&(r=s.error_code),r){if("weak_password"===r)throw new L(D(s),e.status,(null===(t=s.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===r)throw new O}else if("object"==typeof s&&s&&"object"==typeof s.weak_password&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0))throw new L(D(s),e.status,s.weak_password.reasons);throw new k(D(s),e.status||500,r)}async function M(e,t,s,r){var i;const a=Object.assign({},null==r?void 0:r.headers);a[n]||(a[n]=o["2024-01-01"].name),(null==r?void 0:r.jwt)&&(a.Authorization=`Bearer ${r.jwt}`);const c=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(c.redirect_to=r.redirectTo);const l=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",h=await async function(e,t,s,r,i,n){const o=((e,t,s,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),s))})(t,r,{},n);let a;try{a=await e(s,Object.assign({},o))}catch(e){throw console.error(e),new R(D(e),0)}if(a.ok||await F(a),null==r?void 0:r.noResolveJson)return a;try{return await a.json()}catch(e){await F(e)}}(e,t,s+l,{headers:a,noResolveJson:null==r?void 0:r.noResolveJson},0,null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(h):{data:Object.assign({},h),error:null}}function B(e){var t;let s=null;var r;return function(e){return e.access_token&&e.refresh_token&&e.expires_in}(e)&&(s=Object.assign({},e),e.expires_at||(s.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r))),{data:{session:s,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function q(e){const t=B(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0)&&(t.data.weak_password=e.weak_password),t}function J(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function z(e){return{data:e,error:null}}function H(e){const{action_link:t,email_otp:s,hashed_token:r,redirect_to:i,verification_type:n}=e,o=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&(d.forEach((e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),s=JSON.parse(e.split(";")[1].split("=")[1]);c[`${s}Page`]=t})),c.total=parseInt(u)),{data:Object.assign(Object.assign({},h),c),error:null}}catch(e){if(w(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){try{return await M(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:J})}catch(e){if(w(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){try{return await M(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:J})}catch(e){if(w(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){try{return await M(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:J})}catch(e){if(w(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){try{const{data:t,error:s}=await M(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:s}}catch(e){if(w(e))return{data:null,error:e};throw e}}async _deleteFactor(e){try{return{data:await M(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(w(e))return{data:null,error:e};throw e}}}const W={getItem:e=>l()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{l()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{l()&&globalThis.localStorage.removeItem(e)}};function V(e={}){return{getItem:t=>e[t]||null,setItem:(t,s)=>{e[t]=s},removeItem:t=>{delete e[t]}}}const Y={debug:!!(globalThis&&l()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class Q extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class X extends Q{}async function Z(e,t,s){Y.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout((()=>{r.abort(),Y.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)}),t),await Promise.resolve().then((()=>globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},(async r=>{if(!r){if(0===t)throw Y.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new X(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Y.debug)try{const e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null," "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await s()}Y.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await s()}finally{Y.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}))))}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();const ee={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:i,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},te=3e4;async function se(e,t,s){return await s()}class re{constructor(e){var t,s;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=re.nextInstanceID,re.nextInstanceID+=1,this.instanceID>0&&a()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},ee),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new K({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=h(r.fetch),this.lock=r.lock||se,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:a()&&(null===(t=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=Z:this.lock=se,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:l()?this.storage=W:(this.memoryStorage={},this.storage=V(this.memoryStorage)):(this.memoryStorage={},this.storage=V(this.memoryStorage)),a()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(s=this.broadcastChannel)||void 0===s||s.addEventListener("message",(async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${r}) ${(new Date).toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,(async()=>await this._initialize())))()),await this.initializePromise}async _initialize(){var e;try{const t=function(e){const t={},s=new URL(e);if(s.hash&&"#"===s.hash[0])try{new URLSearchParams(s.hash.substring(1)).forEach(((e,s)=>{t[s]=e}))}catch(e){}return s.searchParams.forEach(((e,s)=>{t[s]=e})),t}(window.location.href);let s="none";if(this._isImplicitGrantCallback(t)?s="implicit":await this._isPKCECallback(t)&&(s="pkce"),a()&&this.detectSessionInUrl&&"none"!==s){const{data:r,error:i}=await this._getSessionFromURL(t,s);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),x(i)){const t=null===(e=i.details)||void 0===e?void 0:e.code;if("identity_already_exists"===t||"identity_not_found"===t||"single_identity_not_deletable"===t)return{error:i}}return await this._removeSession(),{error:i}}const{session:n,redirectType:o}=r;return this._debug("#_initialize()","detected session in URL",n,"redirect type",o),await this._saveSession(n),setTimeout((async()=>{"recovery"===o?await this._notifyAllSubscribers("PASSWORD_RECOVERY",n):await this._notifyAllSubscribers("SIGNED_IN",n)}),0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return w(e)?{error:e}:{error:new S("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,s,r;try{const i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(s=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==s?s:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:B}),{data:n,error:o}=i;if(o||!n)return{data:{user:null,session:null},error:o};const a=n.session,c=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:c,session:a},error:null}}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,s,r;try{let i;if("email"in e){const{email:s,password:r,options:n}=e;let o=null,a=null;"pkce"===this.flowType&&([o,a]=await m(this.storage,this.storageKey)),i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==n?void 0:n.emailRedirectTo,body:{email:s,password:r,data:null!==(t=null==n?void 0:n.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==n?void 0:n.captchaToken},code_challenge:o,code_challenge_method:a},xform:B})}else{if(!("phone"in e))throw new A("You must provide either an email or phone number and a password");{const{phone:t,password:n,options:o}=e;i=await M(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:n,data:null!==(s=null==o?void 0:o.data)&&void 0!==s?s:{},channel:null!==(r=null==o?void 0:o.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:B})}}const{data:n,error:o}=i;if(o||!n)return{data:{user:null,session:null},error:o};const a=n.session,c=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:c,session:a},error:null}}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if("email"in e){const{email:s,password:r,options:i}=e;t=await M(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:q})}else{if(!("phone"in e))throw new A("You must provide either an email or phone number and a password");{const{phone:s,password:r,options:i}=e;t=await M(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:q})}}const{data:s,error:r}=t;return r?{data:{user:null,session:null},error:r}:s&&s.session&&s.user?(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign({user:s.user,session:s.session},s.weak_password?{weakPassword:s.weak_password}:null),error:r}):{data:{user:null,session:null},error:new P}}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,s,r,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(s=e.options)||void 0===s?void 0:s.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,(async()=>this._exchangeCodeForSession(e)))}async _exchangeCodeForSession(e){const t=await f(this.storage,`${this.storageKey}-code-verifier`),[s,r]=(null!=t?t:"").split("/");try{const{data:t,error:i}=await M(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:s},xform:B});if(await p(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return t&&t.session&&t.user?(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign(Object.assign({},t),{redirectType:null!=r?r:null}),error:i}):{data:{user:null,session:null,redirectType:null},error:new P}}catch(e){if(w(e))return{data:{user:null,session:null,redirectType:null},error:e};throw e}}async signInWithIdToken(e){try{const{options:t,provider:s,token:r,access_token:i,nonce:n}=e,o=await M(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:s,id_token:r,access_token:i,nonce:n,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:B}),{data:a,error:c}=o;return c?{data:{user:null,session:null},error:c}:a&&a.session&&a.user?(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:a,error:c}):{data:{user:null,session:null},error:new P}}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,s,r,i,n;try{if("email"in e){const{email:r,options:i}=e;let n=null,o=null;"pkce"===this.flowType&&([n,o]=await m(this.storage,this.storageKey));const{error:a}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{},create_user:null===(s=null==i?void 0:i.shouldCreateUser)||void 0===s||s,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:n,code_challenge_method:o},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){const{phone:t,options:s}=e,{data:o,error:a}=await M(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null==s?void 0:s.data)&&void 0!==r?r:{},create_user:null===(i=null==s?void 0:s.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},channel:null!==(n=null==s?void 0:s.channel)&&void 0!==n?n:"sms"}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:a}}throw new A("You must provide either an email or phone number.")}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,s;try{let r,i;"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(s=e.options)||void 0===s?void 0:s.captchaToken);const{data:n,error:o}=await M(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:B});if(o)throw o;if(!n)throw new Error("An error occurred on token verification.");const a=n.session,c=n.user;return(null==a?void 0:a.access_token)&&(await this._saveSession(a),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:c,session:a},error:null}}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,s,r;try{let i=null,n=null;return"pkce"===this.flowType&&([i,n]=await m(this.storage,this.storageKey)),await M(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(s=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==s?s:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:n}),headers:this.headers,xform:z})}catch(e){if(w(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._reauthenticate()))}async _reauthenticate(){try{return await this._useSession((async e=>{const{data:{session:t},error:s}=e;if(s)throw s;if(!t)throw new O;const{error:r}=await M(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}}))}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const t=`${this.url}/resend`;if("email"in e){const{email:s,type:r,options:i}=e,{error:n}=await M(this.fetch,"POST",t,{headers:this.headers,body:{email:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:n}}if("phone"in e){const{phone:s,type:r,options:i}=e,{data:n,error:o}=await M(this.fetch,"POST",t,{headers:this.headers,body:{phone:s,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==n?void 0:n.message_id},error:o}}throw new A("You must provide either an email or phone number and a type")}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,(async()=>this._useSession((async e=>e))))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await s}catch(e){}})()),s}return await this.lock(`lock:${this.storageKey}`,e,(async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){const e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=await f(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const s=!!e.expires_at&&e.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${s?"":" not"} expired`,"expires_at",e.expires_at),!s){if(this.storage.isServer){let t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,s,r)=>(t||"user"!==s||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,s,r))})}return{data:{session:e},error:null}}const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,(async()=>await this._getUser())))}async _getUser(e){try{return e?await M(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:J}):await this._useSession((async e=>{var t,s,r;const{data:i,error:n}=e;if(n)throw n;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await M(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(s=i.session)||void 0===s?void 0:s.access_token)&&void 0!==r?r:void 0,xform:J}):{data:{user:null},error:new O}}))}catch(e){if(w(e))return j(e)&&(await this._removeSession(),await p(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._updateUser(e,t)))}async _updateUser(e,t={}){try{return await this._useSession((async s=>{const{data:r,error:i}=s;if(i)throw i;if(!r.session)throw new O;const n=r.session;let o=null,a=null;"pkce"===this.flowType&&null!=e.email&&([o,a]=await m(this.storage,this.storageKey));const{data:c,error:l}=await M(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:a}),jwt:n.access_token,xform:J});if(l)throw l;return n.user=c.user,await this._saveSession(n),await this._notifyAllSubscribers("USER_UPDATED",n),{data:{user:n.user},error:null}}))}catch(e){if(w(e))return{data:{user:null},error:e};throw e}}_decodeJWT(e){return v(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._setSession(e)))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new O;const t=Date.now()/1e3;let s=t,r=!0,i=null;const n=v(e.access_token);if(n.exp&&(s=n.exp,r=s<=t),r){const{session:t,error:s}=await this._callRefreshToken(e.refresh_token);if(s)return{data:{user:null,session:null},error:s};if(!t)return{data:{user:null,session:null},error:null};i=t}else{const{data:r,error:n}=await this._getUser(e.access_token);if(n)throw n;i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:s-t,expires_at:s},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(e){if(w(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._refreshSession(e)))}async _refreshSession(e){try{return await this._useSession((async t=>{var s;if(!e){const{data:r,error:i}=t;if(i)throw i;e=null!==(s=r.session)&&void 0!==s?s:void 0}if(!(null==e?void 0:e.refresh_token))throw new O;const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}}))}catch(e){if(w(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e,t){try{if(!a())throw new $("No browser detected.");if(e.error||e.error_description||e.error_code)throw new $(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new C("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new $("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new C("No code detected.");const{data:t,error:s}=await this._exchangeCodeForSession(e.code);if(s)throw s;const r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:t.session,redirectType:null},error:null}}const{provider_token:s,provider_refresh_token:r,access_token:i,refresh_token:n,expires_in:o,expires_at:c,token_type:l}=e;if(!(i&&o&&n&&l))throw new $("No session defined in URL");const h=Math.round(Date.now()/1e3),u=parseInt(o);let d=h+u;c&&(d=parseInt(c));const f=d-h;1e3*f<=te&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);const p=d-u;h-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,d,h):h-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,d,h);const{data:g,error:v}=await this._getUser(i);if(v)throw v;const y={provider_token:s,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:n,token_type:l,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:e.type},error:null}}catch(e){if(w(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantCallback(e){return Boolean(e.access_token||e.error_description)}async _isPKCECallback(e){const t=await f(this.storage,`${this.storageKey}-code-verifier`);return!(!e.code||!t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._signOut(e)))}async _signOut({scope:e}={scope:"global"}){return await this._useSession((async t=>{var s;const{data:r,error:i}=t;if(i)return{error:i};const n=null===(s=r.session)||void 0===s?void 0:s.access_token;if(n){const{error:t}=await this.admin.signOut(n,e);if(t&&(!T(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(await this._removeSession(),await p(this.storage,`${this.storageKey}-code-verifier`)),{error:null}}))}onAuthStateChange(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),s={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,s),(async()=>{await this.initializePromise,await this._acquireLock(-1,(async()=>{this._emitInitialSession(t)}))})(),{data:{subscription:s}}}async _emitInitialSession(e){return await this._useSession((async t=>{var s,r;try{const{data:{session:r},error:i}=t;if(i)throw i;await(null===(s=this.stateChangeEmitters.get(e))||void 0===s?void 0:s.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await(null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}}))}async resetPasswordForEmail(e,t={}){let s=null,r=null;"pkce"===this.flowType&&([s,r]=await m(this.storage,this.storageKey,!0));try{return await M(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:s,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(w(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{const{data:t,error:s}=await this.getUser();if(s)throw s;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(w(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{const{data:s,error:r}=await this._useSession((async t=>{var s,r,i,n,o;const{data:a,error:c}=t;if(c)throw c;const l=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(s=e.options)||void 0===s?void 0:s.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await M(this.fetch,"GET",l,{headers:this.headers,jwt:null!==(o=null===(n=a.session)||void 0===n?void 0:n.access_token)&&void 0!==o?o:void 0})}));if(r)throw r;return a()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null==s?void 0:s.url),{data:{provider:e.provider,url:null==s?void 0:s.url},error:null}}catch(t){if(w(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession((async t=>{var s,r;const{data:i,error:n}=t;if(n)throw n;return await M(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(s=i.session)||void 0===s?void 0:s.access_token)&&void 0!==r?r:void 0})}))}catch(e){if(w(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const i=Date.now();return await(s=async s=>(s>0&&await async function(e){return await new Promise((t=>{setTimeout((()=>t(null)),e)}))}(200*Math.pow(2,s-1)),this._debug(t,"refreshing attempt",s),await M(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:B})),r=(e,t)=>{const s=200*Math.pow(2,e);return t&&I(t)&&Date.now()+s-i{(async()=>{for(let i=0;i<1/0;i++)try{const t=await s(i);if(!r(i,null))return void e(t)}catch(e){if(!r(i,e))return void t(e)}})()})))}catch(e){if(this._debug(t,"error",e),w(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}var s,r}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const s=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",s),a()&&!t.skipBrowserRedirect&&window.location.assign(s),{data:{provider:e,url:s},error:null}}async _recoverAndRefresh(){var e;const t="#_recoverAndRefresh()";this._debug(t,"begin");try{const s=await f(this.storage,this.storageKey);if(this._debug(t,"session from storage",s),!this._isValidSession(s))return this._debug(t,"session is not valid"),void(null!==s&&await this._removeSession());const r=Math.round(Date.now()/1e3),i=(null!==(e=s.expires_at)&&void 0!==e?e:1/0){try{await s.callback(e,t)}catch(e){r.push(e)}}));if(await Promise.all(i),r.length>0){for(let e=0;ethis._autoRefreshTokenTick()),te);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout((async()=>{await this.initializePromise,await this._autoRefreshTokenTick()}),0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,(async()=>{try{const e=Date.now();try{return await this._useSession((async t=>{const{data:{session:s}}=t;if(!s||!s.refresh_token||!s.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const r=Math.floor((1e3*s.expires_at-e)/te);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(s.refresh_token)}))}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(!(e.isAcquireTimeout||e instanceof Q))throw e;this._debug("auto refresh token tick lock not available")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!a()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,(async()=>{"visible"===document.visibilityState?await this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")})))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,s){const r=[`provider=${encodeURIComponent(t)}`];if((null==s?void 0:s.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(s.redirectTo)}`),(null==s?void 0:s.scopes)&&r.push(`scopes=${encodeURIComponent(s.scopes)}`),"pkce"===this.flowType){const[e,t]=await m(this.storage,this.storageKey),s=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(s.toString())}if(null==s?void 0:s.queryParams){const e=new URLSearchParams(s.queryParams);r.push(e.toString())}return(null==s?void 0:s.skipBrowserRedirect)&&r.push(`skip_http_redirect=${s.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession((async t=>{var s;const{data:r,error:i}=t;return i?{data:null,error:i}:await M(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token})}))}catch(e){if(w(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession((async t=>{var s,r;const{data:i,error:n}=t;if(n)return{data:null,error:n};const o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:{issuer:e.issuer}),{data:a,error:c}=await M(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:null===(s=null==i?void 0:i.session)||void 0===s?void 0:s.access_token});return c?{data:null,error:c}:("totp"===e.factorType&&(null===(r=null==a?void 0:a.totp)||void 0===r?void 0:r.qr_code)&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})}))}catch(e){if(w(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var s;const{data:r,error:i}=t;if(i)return{data:null,error:i};const{data:n,error:o}=await M(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+n.expires_in},n)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",n),{data:n,error:o})}))}catch(e){if(w(e))return{data:null,error:e};throw e}}))}async _challenge(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var s;const{data:r,error:i}=t;return i?{data:null,error:i}:await M(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:null===(s=null==r?void 0:r.session)||void 0===s?void 0:s.access_token})}))}catch(e){if(w(e))return{data:null,error:e};throw e}}))}async _challengeAndVerify(e){const{data:t,error:s}=await this._challenge({factorId:e.factorId});return s?{data:null,error:s}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const s=(null==e?void 0:e.factors)||[],r=s.filter((e=>"totp"===e.factor_type&&"verified"===e.status)),i=s.filter((e=>"phone"===e.factor_type&&"verified"===e.status));return{data:{all:s,totp:r,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,(async()=>await this._useSession((async e=>{var t,s;const{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const n=this._decodeJWT(r.access_token);let o=null;n.aal&&(o=n.aal);let a=o;return(null!==(s=null===(t=r.user.factors)||void 0===t?void 0:t.filter((e=>"verified"===e.status)))&&void 0!==s?s:[]).length>0&&(a="aal2"),{data:{currentLevel:o,nextLevel:a,currentAuthenticationMethods:n.amr||[]},error:null}}))))}}re.nextInstanceID=0;const ie=K,ne=re},227:(e,t,s)=>{s.r(t),s.d(t,{FunctionRegion:()=>a,FunctionsClient:()=>c,FunctionsError:()=>r,FunctionsFetchError:()=>i,FunctionsHttpError:()=>o,FunctionsRelayError:()=>n});class r extends Error{constructor(e,t="FunctionsError",s){super(e),this.name=t,this.context=s}}class i extends r{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class n extends r{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class o extends r{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var a;!function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"}(a||(a={}));class c{constructor(e,{headers:t={},customFetch:r,region:i=a.Any}={}){this.url=e,this.headers=t,this.region=i,this.fetch=(e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)})(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var s,r,a,c,l;return r=this,a=void 0,l=function*(){try{const{headers:r,method:a,body:c}=t;let l,h={},{region:u}=t;u||(u=this.region),u&&"any"!==u&&(h["x-region"]=u),c&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&("undefined"!=typeof Blob&&c instanceof Blob||c instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",l=c):"string"==typeof c?(h["Content-Type"]="text/plain",l=c):"undefined"!=typeof FormData&&c instanceof FormData?l=c:(h["Content-Type"]="application/json",l=JSON.stringify(c)));const d=yield this.fetch(`${this.url}/${e}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),r),body:l}).catch((e=>{throw new i(e)})),f=d.headers.get("x-relay-error");if(f&&"true"===f)throw new n(d);if(!d.ok)throw new o(d);let p,g=(null!==(s=d.headers.get("Content-Type"))&&void 0!==s?s:"text/plain").split(";")[0].trim();return p="application/json"===g?yield d.json():"application/octet-stream"===g?yield d.blob():"text/event-stream"===g?d:"multipart/form-data"===g?yield d.formData():yield d.text(),{data:p,error:null}}catch(e){return{data:null,error:e}}},new((c=void 0)||(c=Promise))((function(e,t){function s(e){try{n(l.next(e))}catch(e){t(e)}}function i(e){try{n(l.throw(e))}catch(e){t(e)}}function n(t){var r;t.done?e(t.value):(r=t.value,r instanceof c?r:new c((function(e){e(r)}))).then(s,i)}n((l=l.apply(r,a||[])).next())}))}}},907:(e,t,s)=>{s.r(t),s.d(t,{Headers:()=>o,Request:()=>a,Response:()=>c,default:()=>n,fetch:()=>i});var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s.g)return s.g;throw new Error("unable to locate global object")}();const i=r.fetch,n=r.fetch.bind(r),o=r.Headers,a=r.Request,c=r.Response},660:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(s(907)),n=r(s(818));t.default=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=i.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let s=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((async e=>{var t,s,r;let i=null,o=null,a=null,c=e.status,l=e.statusText;if(e.ok){if("HEAD"!==this.method){const t=await e.text();""===t||(o="text/csv"===this.headers.Accept||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}const r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),n=null===(s=e.headers.get("content-range"))||void 0===s?void 0:s.split("/");r&&n&&n.length>1&&(a=parseInt(n[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(i={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,a=null,c=406,l="Not Acceptable"):o=1===o.length?o[0]:null)}else{const t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(o=[],i=null,c=200,l="OK")}catch(s){404===e.status&&""===t?(c=204,l="No Content"):i={message:t}}if(i&&this.isMaybeSingle&&(null===(r=null==i?void 0:i.details)||void 0===r?void 0:r.includes("0 rows"))&&(i=null,c=200,l="OK"),i&&this.shouldThrowOnError)throw new n.default(i)}return{error:i,data:o,count:a,status:c,statusText:l}}));return this.shouldThrowOnError||(s=s.catch((e=>{var t,s,r;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(s=null==e?void 0:e.stack)&&void 0!==s?s:""}`,hint:"",code:`${null!==(r=null==e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}}))),s.then(e,t)}}},961:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(s(45)),n=r(s(825)),o=s(530);class a{constructor(e,{headers:t={},schema:s,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},o.DEFAULT_HEADERS),t),this.schemaName=s,this.fetch=r}from(e){const t=new URL(`${this.url}/${e}`);return new i.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new a(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:s=!1,get:r=!1,count:i}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let c;s||r?(o=s?"HEAD":"GET",Object.entries(t).filter((([e,t])=>void 0!==t)).map((([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`])).forEach((([e,t])=>{a.searchParams.append(e,t)}))):(o="POST",c=t);const l=Object.assign({},this.headers);return i&&(l.Prefer=`count=${i}`),new n.default({method:o,url:a,headers:l,schema:this.schemaName,body:c,fetch:this.fetch,allowEmpty:!1})}}t.default=a},818:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});class s extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}t.default=s},825:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(s(261));class n extends i.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const s=Array.from(new Set(t)).map((e=>"string"==typeof e&&new RegExp("[,()]").test(e)?`"${e}"`:`${e}`)).join(",");return this.url.searchParams.append(e,`in.(${s})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:s,type:r}={}){let i="";"plain"===r?i="pl":"phrase"===r?i="ph":"websearch"===r&&(i="w");const n=void 0===s?"":`(${s})`;return this.url.searchParams.append(e,`${i}fts${n}.${t}`),this}match(e){return Object.entries(e).forEach((([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)})),this}not(e,t,s){return this.url.searchParams.append(e,`not.${t}.${s}`),this}or(e,{foreignTable:t,referencedTable:s=t}={}){const r=s?`${s}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,s){return this.url.searchParams.append(e,`${t}.${s}`),this}}t.default=n},45:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(s(825));t.default=class{constructor(e,{headers:t={},schema:s,fetch:r}){this.url=e,this.headers=t,this.schema=s,this.fetch=r}select(e,{head:t=!1,count:s}={}){const r=t?"HEAD":"GET";let n=!1;const o=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!n?"":('"'===e&&(n=!n),e))).join("");return this.url.searchParams.set("select",o),s&&(this.headers.Prefer=`count=${s}`),new i.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:s=!0}={}){const r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),s||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:s=!1,count:r,defaultToNull:n=!0}={}){const o=[`resolution=${s?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),n||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),t&&s.push(`count=${t}`),this.headers.Prefer=s.join(","),new i.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new i.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}},261:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(s(660));class n extends i.default{select(e){let t=!1;const s=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e))).join("");return this.url.searchParams.set("select",s),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:s,foreignTable:r,referencedTable:i=r}={}){const n=i?`${i}.order`:"order",o=this.url.searchParams.get(n);return this.url.searchParams.set(n,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${void 0===s?"":s?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:s=t}={}){const r=void 0===s?"limit":`${s}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:s,referencedTable:r=s}={}){const i=void 0===r?"offset":`${r}.offset`,n=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(n,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:s=!1,buffers:r=!1,wal:i=!1,format:n="text"}={}){var o;const a=[e?"analyze":null,t?"verbose":null,s?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=null!==(o=this.headers.Accept)&&void 0!==o?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${n}; for="${c}"; options=${a};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}t.default=n},530:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;const r=s(519);t.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${r.version}`}},279:function(e,t,s){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PostgrestError=t.PostgrestBuilder=t.PostgrestTransformBuilder=t.PostgrestFilterBuilder=t.PostgrestQueryBuilder=t.PostgrestClient=void 0;const i=r(s(961));t.PostgrestClient=i.default;const n=r(s(45));t.PostgrestQueryBuilder=n.default;const o=r(s(825));t.PostgrestFilterBuilder=o.default;const a=r(s(261));t.PostgrestTransformBuilder=a.default;const c=r(s(660));t.PostgrestBuilder=c.default;const l=r(s(818));t.PostgrestError=l.default,t.default={PostgrestClient:i.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:o.default,PostgrestTransformBuilder:a.default,PostgrestBuilder:c.default,PostgrestError:l.default}},519:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="2.48.1"},932:(e,t,s)=>{s.r(t),s.d(t,{REALTIME_CHANNEL_STATES:()=>P,REALTIME_LISTEN_TYPES:()=>E,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:()=>S,REALTIME_PRESENCE_LISTEN_EVENTS:()=>T,REALTIME_SUBSCRIBE_STATES:()=>O,RealtimeChannel:()=>A,RealtimeClient:()=>C,RealtimePresence:()=>j});const r={"X-Client-Info":"realtime-js/2.11.2"};var i,n,o,a,c,l;!function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(i||(i={})),function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"}(n||(n={})),function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"}(o||(o={})),function(e){e.websocket="websocket"}(a||(a={})),function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"}(c||(c={}));class h{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t("string"==typeof e?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),s=new TextDecoder;return this._decodeBroadcast(e,t,s)}_decodeBroadcast(e,t,s){const r=t.getUint8(1),i=t.getUint8(2);let n=this.HEADER_LENGTH+2;const o=s.decode(e.slice(n,n+r));n+=r;const a=s.decode(e.slice(n,n+i));return n+=i,{ref:null,topic:o,event:a,payload:JSON.parse(s.decode(e.slice(n,e.byteLength)))}}}class u{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}}!function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"}(l||(l={}));const d=(e,t,s={})=>{var r;const i=null!==(r=s.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce(((s,r)=>(s[r]=f(r,e,t,i),s)),{})},f=(e,t,s,r)=>{const i=t.find((t=>t.name===e)),n=null==i?void 0:i.type,o=s[e];return n&&!r.includes(n)?p(n,o):g(o)},p=(e,t)=>{if("_"===e.charAt(0)){const s=e.slice(1,e.length);return _(t,s)}switch(e){case l.bool:return v(t);case l.float4:case l.float8:case l.int2:case l.int4:case l.int8:case l.numeric:case l.oid:return y(t);case l.json:case l.jsonb:return m(t);case l.timestamp:return b(t);case l.abstime:case l.date:case l.daterange:case l.int4range:case l.int8range:case l.money:case l.reltime:case l.text:case l.time:case l.timestamptz:case l.timetz:case l.tsrange:case l.tstzrange:default:return g(t)}},g=e=>e,v=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},y=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},m=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},_=(e,t)=>{if("string"!=typeof e)return e;const s=e.length-1,r=e[s];if("{"===e[0]&&"}"===r){let r;const i=e.slice(1,s);try{r=JSON.parse("["+i+"]")}catch(e){r=i?i.split(","):[]}return r.map((e=>p(t,e)))}return e},b=e=>"string"==typeof e?e.replace(" ","T"):e,w=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class k{constructor(e,t,s={},r=1e4){this.channel=e,this.event=t,this.payload=s,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var s;return this._hasReceived(e)&&t(null===(s=this.receivedResp)||void 0===s?void 0:s.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},(e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var T,S,E,O;!function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"}(T||(T={}));class j{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const s=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(s.state,{},(e=>{const{onJoin:t,onLeave:s,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=j.syncState(this.state,e,t,s),this.pendingDiffs.forEach((e=>{this.state=j.syncDiff(this.state,e,t,s)})),this.pendingDiffs=[],r()})),this.channel._on(s.diff,{},(e=>{const{onJoin:t,onLeave:s,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=j.syncDiff(this.state,e,t,s),r())})),this.onJoin(((e,t,s)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:s})})),this.onLeave(((e,t,s)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:s})})),this.onSync((()=>{this.channel._trigger("presence",{event:"sync"})}))}static syncState(e,t,s,r){const i=this.cloneDeep(e),n=this.transformState(t),o={},a={};return this.map(i,((e,t)=>{n[e]||(a[e]=t)})),this.map(n,((e,t)=>{const s=i[e];if(s){const r=t.map((e=>e.presence_ref)),i=s.map((e=>e.presence_ref)),n=t.filter((e=>i.indexOf(e.presence_ref)<0)),c=s.filter((e=>r.indexOf(e.presence_ref)<0));n.length>0&&(o[e]=n),c.length>0&&(a[e]=c)}else o[e]=t})),this.syncDiff(i,{joins:o,leaves:a},s,r)}static syncDiff(e,t,s,r){const{joins:i,leaves:n}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return s||(s=()=>{}),r||(r=()=>{}),this.map(i,((t,r)=>{var i;const n=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(r),n.length>0){const s=e[t].map((e=>e.presence_ref)),r=n.filter((e=>s.indexOf(e.presence_ref)<0));e[t].unshift(...r)}s(t,n,r)})),this.map(n,((t,s)=>{let i=e[t];if(!i)return;const n=s.map((e=>e.presence_ref));i=i.filter((e=>n.indexOf(e.presence_ref)<0)),e[t]=i,r(t,i,s),0===i.length&&delete e[t]})),e}static map(e,t){return Object.getOwnPropertyNames(e).map((s=>t(s,e[s])))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce(((t,s)=>{const r=e[s];return t[s]="metas"in r?r.metas.map((e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))):r,t}),{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}!function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(S||(S={})),function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"}(E||(E={})),function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"}(O||(O={}));const P=n;class A{constructor(e,t={config:{}},s){this.topic=e,this.params=t,this.socket=s,this.bindings={},this.state=n.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new k(this,o.join,this.params,this.timeout),this.rejoinTimer=new u((()=>this._rejoinUntilConnected()),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(()=>{this.state=n.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this._onClose((()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=n.closed,this.socket._remove(this)})),this._onError((e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=n.errored,this.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=n.errored,this.rejoinTimer.scheduleTimeout())})),this._on(o.reply,{},((e,t)=>{this._trigger(this._replyEventName(t),e)})),this.presence=new j(this),this.broadcastEndpointURL=w(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,t=this.timeout){var s,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:n,private:o}}=this.params;this._onError((t=>null==e?void 0:e(O.CHANNEL_ERROR,t))),this._onClose((()=>null==e?void 0:e(O.CLOSED)));const a={},c={broadcast:i,presence:n,postgres_changes:null!==(r=null===(s=this.bindings.postgres_changes)||void 0===s?void 0:s.map((e=>e.filter)))&&void 0!==r?r:[],private:o};this.socket.accessTokenValue&&(a.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:c},a)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",(async({postgres_changes:t})=>{var s;if(this.socket.setAuth(),void 0!==t){const r=this.bindings.postgres_changes,i=null!==(s=null==r?void 0:r.length)&&void 0!==s?s:0,n=[];for(let s=0;s{null==e||e(O.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(t).join(", ")||"error")))})).receive("timeout",(()=>{null==e||e(O.TIMED_OUT)}))}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,s){return this._on(e,t,s)}async send(e,t={}){var s,r;if(this._canPush()||"broadcast"!==e.type)return new Promise((s=>{var r,i,n;const o=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(n=null===(i=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===i?void 0:i.broadcast)||void 0===n?void 0:n.ack)||s("ok"),o.receive("ok",(()=>s("ok"))),o.receive("error",(()=>s("error"))),o.receive("timeout",(()=>s("timed out")))}));{const{event:i,payload:n}=e,o={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:n,private:this.private}]})};try{const e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,null!==(s=t.timeout)&&void 0!==s?s:this.timeout);return await(null===(r=e.body)||void 0===r?void 0:r.cancel()),e.ok?"ok":"error"}catch(e){return"AbortError"===e.name?"timed out":"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=n.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(o.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise((s=>{const r=new k(this,o.leave,{},e);r.receive("ok",(()=>{t(),s("ok")})).receive("timeout",(()=>{t(),s("timed out")})).receive("error",(()=>{s("error")})),r.send(),this._canPush()||r.trigger("ok",{})}))}async _fetchWithTimeout(e,t,s){const r=new AbortController,i=setTimeout((()=>r.abort()),s),n=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),n}_push(e,t,s=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new k(this,e,t,s);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,s){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,s){var r,i;const n=e.toLocaleLowerCase(),{close:a,error:c,leave:l,join:h}=o;if(s&&[a,c,l,h].indexOf(n)>=0&&s!==this._joinRef())return;let u=this._onMessage(n,t,s);if(t&&!u)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(n)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter((e=>{var t,s,r;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(r=null===(s=e.filter)||void 0===s?void 0:s.event)||void 0===r?void 0:r.toLocaleLowerCase())===n})).map((e=>e.callback(u,s))):null===(i=this.bindings[n])||void 0===i||i.filter((e=>{var s,r,i,o,a,c;if(["broadcast","presence","postgres_changes"].includes(n)){if("id"in e){const n=e.id,o=null===(s=e.filter)||void 0===s?void 0:s.event;return n&&(null===(r=t.ids)||void 0===r?void 0:r.includes(n))&&("*"===o||(null==o?void 0:o.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const s=null===(a=null===(o=null==e?void 0:e.filter)||void 0===o?void 0:o.event)||void 0===a?void 0:a.toLocaleLowerCase();return"*"===s||s===(null===(c=null==t?void 0:t.event)||void 0===c?void 0:c.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===n})).map((e=>{if("object"==typeof u&&"ids"in u){const e=u.data,{schema:t,table:s,commit_timestamp:r,type:i,errors:n}=e,o={schema:t,table:s,commit_timestamp:r,eventType:i,new:{},old:{},errors:n};u=Object.assign(Object.assign({},o),this._getPayloadRecords(e))}e.callback(u,s)}))}_isClosed(){return this.state===n.closed}_isJoined(){return this.state===n.joined}_isJoining(){return this.state===n.joining}_isLeaving(){return this.state===n.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,s){const r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:s};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){const s=e.toLocaleLowerCase();return this.bindings[s]=this.bindings[s].filter((e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===s&&A.isEqual(e.filter,t))})),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(o.close,{},e)}_onError(e){this._on(o.error,{},(t=>e(t)))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=n.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=d(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=d(e.columns,e.old_record)),t}}const $=()=>{},x="undefined"!=typeof WebSocket;class C{constructor(e,t){var i;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=r,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=$,this.conn=null,this.sendBuffer=[],this.serializer=new h,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},this.endPoint=`${e}/${a.websocket}`,this.httpEndpoint=w(e),(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const n=null===(i=null==t?void 0:t.params)||void 0===i?void 0:i.apikey;if(n&&(this.accessTokenValue=n,this.apiKey=n),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new u((async()=>{this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch),null==t?void 0:t.worker){if("undefined"!=typeof window&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(null==t?void 0:t.worker)||!1,this.workerUrl=null==t?void 0:t.workerUrl}this.accessToken=(null==t?void 0:t.accessToken)||null}connect(){if(!this.conn)if(this.transport)this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers});else{if(x)return this.conn=new WebSocket(this.endpointURL()),void this.setupConnection();this.conn=new R(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),s.e(591).then(s.t.bind(s,591,23)).then((({default:e})=>{this.conn=new e(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()}))}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map((e=>e.unsubscribe())));return this.disconnect(),e}log(e,t,s){this.logger(e,t,s)}connectionState(){switch(this.conn&&this.conn.readyState){case i.connecting:return c.Connecting;case i.open:return c.Open;case i.closing:return c.Closing;default:return c.Closed}}isConnected(){return this.connectionState()===c.Open}channel(e,t={config:{}}){const s=new A(`realtime:${e}`,t,this);return this.channels.push(s),s}push(e){const{topic:t,event:s,payload:r,ref:i}=e,n=()=>{this.encode(e,(e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)}))};this.log("push",`${t} ${s} (${i})`,r),this.isConnected()?n():this.sendBuffer.push(n)}async setAuth(e=null){let t=e||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(t){let e=null;try{e=JSON.parse(atob(t.split(".")[1]))}catch(e){}if(e&&e.exp&&!(Math.floor(Date.now()/1e3)-e.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${e.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${e.exp}`);this.accessTokenValue=t,this.channels.forEach((e=>{t&&e.updateJoinPayload({access_token:t}),e.joinedOnce&&e._isJoined()&&e._push(o.access_token,{access_token:t})}))}}async sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void(null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout"));this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t._isJoined()||t._isJoining())));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter((t=>t._joinRef()!==e._joinRef()))}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:s,payload:r,ref:i}=e;i&&i===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${s} ${i&&"("+i+")"||""}`,r),this.channels.filter((e=>e._isMember(t))).forEach((e=>e._trigger(s,r,i))),this.stateChangeCallbacks.message.forEach((t=>t(e)))}))}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),this.worker){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}else this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((()=>this.sendHeartbeat()),this.heartbeatIntervalMs);this.stateChangeCallbacks.open.forEach((e=>e()))}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((t=>t(e)))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach((t=>t(e)))}_triggerChanError(){this.channels.forEach((e=>e._trigger(o.error)))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const s=e.match(/\?/)?"&":"?";return`${e}${s}${new URLSearchParams(t)}`}_workerObjectUrl(e){let t;if(e)t=e;else{const e=new Blob(['\n addEventListener("message", (e) => {\n if (e.data.event === "start") {\n setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);\n }\n });'],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}}class R{constructor(e,t,s){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=i.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=s.close}}},623:(e,t,s)=>{s.r(t),s.d(t,{StorageApiError:()=>n,StorageClient:()=>S,StorageError:()=>r,StorageUnknownError:()=>o,isStorageError:()=>i});class r extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function i(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class n extends r{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class o extends r{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}const a=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(s.bind(s,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},c=e=>{if(Array.isArray(e))return e.map((e=>c(e)));if("function"==typeof e||e!==Object(e))return e;const t={};return Object.entries(e).forEach((([e,s])=>{const r=e.replace(/([-_][a-z])/gi,(e=>e.toUpperCase().replace(/[-_]/g,"")));t[r]=c(s)})),t};var l=function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const h=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),u=(e,t,r)=>l(void 0,void 0,void 0,(function*(){const i=yield(a=void 0,c=void 0,l=void 0,u=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(s.bind(s,907))).Response:Response},new(l||(l=Promise))((function(e,t){function s(e){try{i(u.next(e))}catch(e){t(e)}}function r(e){try{i(u.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(s,r)}i((u=u.apply(a,c||[])).next())})));var a,c,l,u;e instanceof i&&!(null==r?void 0:r.noResolveJson)?e.json().then((s=>{t(new n(h(s),e.status||500))})).catch((e=>{t(new o(h(e),e))})):t(new o(h(e),e))})),d=(e,t,s,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),r&&(i.body=JSON.stringify(r)),Object.assign(Object.assign({},i),s))};function f(e,t,s,r,i,n){return l(this,void 0,void 0,(function*(){return new Promise(((o,a)=>{e(s,d(t,r,i,n)).then((e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()})).then((e=>o(e))).catch((e=>u(e,a,r)))}))}))}function p(e,t,s,r){return l(this,void 0,void 0,(function*(){return f(e,"GET",t,s,r)}))}function g(e,t,s,r,i){return l(this,void 0,void 0,(function*(){return f(e,"POST",t,r,i,s)}))}function v(e,t,s,r,i){return l(this,void 0,void 0,(function*(){return f(e,"DELETE",t,r,i,s)}))}var y=function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};const m={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class b{constructor(e,t={},s,r){this.url=e,this.headers=t,this.bucketId=s,this.fetch=a(r)}uploadOrUpdate(e,t,s,r){return y(this,void 0,void 0,(function*(){try{let i;const n=Object.assign(Object.assign({},_),r);let o=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(n.upsert)});const a=n.metadata;"undefined"!=typeof Blob&&s instanceof Blob?(i=new FormData,i.append("cacheControl",n.cacheControl),a&&i.append("metadata",this.encodeMetadata(a)),i.append("",s)):"undefined"!=typeof FormData&&s instanceof FormData?(i=s,i.append("cacheControl",n.cacheControl),a&&i.append("metadata",this.encodeMetadata(a))):(i=s,o["cache-control"]=`max-age=${n.cacheControl}`,o["content-type"]=n.contentType,a&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(a)))),(null==r?void 0:r.headers)&&(o=Object.assign(Object.assign({},o),r.headers));const c=this._removeEmptyFolders(t),l=this._getFinalPath(c),h=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:i,headers:o},(null==n?void 0:n.duplex)?{duplex:n.duplex}:{})),u=yield h.json();return h.ok?{data:{path:c,id:u.Id,fullPath:u.Key},error:null}:{data:null,error:u}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}upload(e,t,s){return y(this,void 0,void 0,(function*(){return this.uploadOrUpdate("POST",e,t,s)}))}uploadToSignedUrl(e,t,s,r){return y(this,void 0,void 0,(function*(){const n=this._removeEmptyFolders(e),o=this._getFinalPath(n),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:_.upsert},r),i=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&s instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",s)):"undefined"!=typeof FormData&&s instanceof FormData?(e=s,e.append("cacheControl",t.cacheControl)):(e=s,i["cache-control"]=`max-age=${t.cacheControl}`,i["content-type"]=t.contentType);const o=yield this.fetch(a.toString(),{method:"PUT",body:e,headers:i}),c=yield o.json();return o.ok?{data:{path:n,fullPath:c.Key},error:null}:{data:null,error:c}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}createSignedUploadUrl(e,t){return y(this,void 0,void 0,(function*(){try{let s=this._getFinalPath(e);const i=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(i["x-upsert"]="true");const n=yield g(this.fetch,`${this.url}/object/upload/sign/${s}`,{},{headers:i}),o=new URL(this.url+n.url),a=o.searchParams.get("token");if(!a)throw new r("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:a},error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}update(e,t,s){return y(this,void 0,void 0,(function*(){return this.uploadOrUpdate("PUT",e,t,s)}))}move(e,t,s){return y(this,void 0,void 0,(function*(){try{return{data:yield g(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==s?void 0:s.destinationBucket},{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}copy(e,t,s){return y(this,void 0,void 0,(function*(){try{return{data:{path:(yield g(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==s?void 0:s.destinationBucket},{headers:this.headers})).Key},error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}createSignedUrl(e,t,s){return y(this,void 0,void 0,(function*(){try{let r=this._getFinalPath(e),i=yield g(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null==s?void 0:s.transform)?{transform:s.transform}:{}),{headers:this.headers});const n=(null==s?void 0:s.download)?`&download=${!0===s.download?"":s.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${n}`)},{data:i,error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}createSignedUrls(e,t,s){return y(this,void 0,void 0,(function*(){try{const r=yield g(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==s?void 0:s.download)?`&download=${!0===s.download?"":s.download}`:"";return{data:r.map((e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null}))),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}download(e,t){return y(this,void 0,void 0,(function*(){const s=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),n=r?`?${r}`:"";try{const t=this._getFinalPath(e),r=yield p(this.fetch,`${this.url}/${s}/${t}${n}`,{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}info(e){return y(this,void 0,void 0,(function*(){const t=this._getFinalPath(e);try{const e=yield p(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:c(e),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}exists(e){return y(this,void 0,void 0,(function*(){const t=this._getFinalPath(e);try{return yield function(e,t,s){return l(this,void 0,void 0,(function*(){return f(e,"HEAD",t,Object.assign(Object.assign({},s),{noResolveJson:!0}),undefined)}))}(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(e){if(i(e)&&e instanceof o){const t=e.originalError;if([400,404].includes(null==t?void 0:t.status))return{data:!1,error:e}}throw e}}))}getPublicUrl(e,t){const s=this._getFinalPath(e),r=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&r.push(i);const n=void 0!==(null==t?void 0:t.transform)?"render/image":"object",o=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==o&&r.push(o);let a=r.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${n}/public/${s}${a}`)}}}remove(e){return y(this,void 0,void 0,(function*(){try{return{data:yield v(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}list(e,t,s){return y(this,void 0,void 0,(function*(){try{const r=Object.assign(Object.assign(Object.assign({},m),t),{prefix:e||""});return{data:yield g(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},s),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const w={"X-Client-Info":"storage-js/2.7.1"};var k=function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};class T{constructor(e,t={},s){this.url=e,this.headers=Object.assign(Object.assign({},w),t),this.fetch=a(s)}listBuckets(){return k(this,void 0,void 0,(function*(){try{return{data:yield p(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}getBucket(e){return k(this,void 0,void 0,(function*(){try{return{data:yield p(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}createBucket(e,t={public:!1}){return k(this,void 0,void 0,(function*(){try{return{data:yield g(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}updateBucket(e,t){return k(this,void 0,void 0,(function*(){try{const s=yield function(e,t,s,r){return l(this,void 0,void 0,(function*(){return f(e,"PUT",t,r,undefined,s)}))}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers});return{data:s,error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}emptyBucket(e){return k(this,void 0,void 0,(function*(){try{return{data:yield g(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}deleteBucket(e){return k(this,void 0,void 0,(function*(){try{return{data:yield v(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if(i(e))return{data:null,error:e};throw e}}))}}class S extends T{constructor(e,t={},s){super(e,t,s)}from(e){return new b(this.url,this.headers,e,this.fetch)}}},787:function(e,t,s){var r=this&&this.__awaiter||function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=s(227),n=s(279),o=s(932),a=s(623),c=s(985),l=s(720),h=s(793),u=s(689);t.default=class{constructor(e,t,s){var r,i,o;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const a=(0,h.stripTrailingSlash)(e);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const u=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,d={db:c.DEFAULT_DB_OPTIONS,realtime:c.DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},c.DEFAULT_AUTH_OPTIONS),{storageKey:u}),global:c.DEFAULT_GLOBAL_OPTIONS},f=(0,h.applySettingDefaults)(null!=s?s:{},d);this.storageKey=null!==(r=f.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(i=f.global.headers)&&void 0!==i?i:{},f.accessToken?(this.accessToken=f.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(o=f.auth)&&void 0!==o?o:{},this.headers,f.global.fetch),this.fetch=(0,l.fetchWithAuth)(t,this._getAccessToken.bind(this),f.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},f.realtime)),this.rest=new n.PostgrestClient(`${a}/rest/v1`,{headers:this.headers,schema:f.db.schema,fetch:this.fetch}),f.accessToken||this._listenForAuthEvents()}get functions(){return new i.FunctionsClient(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new a.StorageClient(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},s={}){return this.rest.rpc(e,t,s)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return r(this,void 0,void 0,(function*(){if(this.accessToken)return yield this.accessToken();const{data:s}=yield this.auth.getSession();return null!==(t=null===(e=s.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null}))}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,storageKey:i,flowType:n,lock:o,debug:a},c,l){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new u.SupabaseAuthClient({url:this.authUrl,headers:Object.assign(Object.assign({},h),c),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:s,storage:r,flowType:n,lock:o,debug:a,fetch:l,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new o.RealtimeClient(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange(((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)}))}_handleTokenChanged(e,t,s){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===s?"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):this.changedAccessToken=s}}},440:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var i=Object.getOwnPropertyDescriptor(t,s);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,i)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),i=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||r(t,e,s)},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=t.SupabaseClient=t.FunctionRegion=t.FunctionsError=t.FunctionsRelayError=t.FunctionsFetchError=t.FunctionsHttpError=t.PostgrestError=void 0;const o=n(s(787));i(s(235),t);var a=s(279);Object.defineProperty(t,"PostgrestError",{enumerable:!0,get:function(){return a.PostgrestError}});var c=s(227);Object.defineProperty(t,"FunctionsHttpError",{enumerable:!0,get:function(){return c.FunctionsHttpError}}),Object.defineProperty(t,"FunctionsFetchError",{enumerable:!0,get:function(){return c.FunctionsFetchError}}),Object.defineProperty(t,"FunctionsRelayError",{enumerable:!0,get:function(){return c.FunctionsRelayError}}),Object.defineProperty(t,"FunctionsError",{enumerable:!0,get:function(){return c.FunctionsError}}),Object.defineProperty(t,"FunctionRegion",{enumerable:!0,get:function(){return c.FunctionRegion}}),i(s(932),t);var l=s(787);Object.defineProperty(t,"SupabaseClient",{enumerable:!0,get:function(){return n(l).default}}),t.createClient=(e,t,s)=>new o.default(e,t,s)},689:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SupabaseAuthClient=void 0;const r=s(235);class i extends r.AuthClient{constructor(e){super(e)}}t.SupabaseAuthClient=i},985:(e,t,s)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_REALTIME_OPTIONS=t.DEFAULT_AUTH_OPTIONS=t.DEFAULT_DB_OPTIONS=t.DEFAULT_GLOBAL_OPTIONS=t.DEFAULT_HEADERS=void 0;const r=s(560);let i="";i="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node",t.DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${i}/${r.version}`},t.DEFAULT_GLOBAL_OPTIONS={headers:t.DEFAULT_HEADERS},t.DEFAULT_DB_OPTIONS={schema:"public"},t.DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},t.DEFAULT_REALTIME_OPTIONS={}},720:function(e,t,s){var r=this&&this.__createBinding||(Object.create?function(e,t,s,r){void 0===r&&(r=s);var i=Object.getOwnPropertyDescriptor(t,s);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,r,i)}:function(e,t,s,r){void 0===r&&(r=s),e[r]=t[s]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.prototype.hasOwnProperty.call(e,s)&&r(t,e,s);return i(t,e),t},o=this&&this.__awaiter||function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchWithAuth=t.resolveHeadersConstructor=t.resolveFetch=void 0;const a=n(s(907));t.resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?a.default:fetch),(...e)=>t(...e)},t.resolveHeadersConstructor=()=>"undefined"==typeof Headers?a.Headers:Headers,t.fetchWithAuth=(e,s,r)=>{const i=(0,t.resolveFetch)(r),n=(0,t.resolveHeadersConstructor)();return(t,r)=>o(void 0,void 0,void 0,(function*(){var o;const a=null!==(o=yield s())&&void 0!==o?o:e;let c=new n(null==r?void 0:r.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${a}`),i(t,Object.assign(Object.assign({},r),{headers:c}))}))}},793:function(e,t){var s=this&&this.__awaiter||function(e,t,s,r){return new(s||(s=Promise))((function(i,n){function o(e){try{c(r.next(e))}catch(e){n(e)}}function a(e){try{c(r.throw(e))}catch(e){n(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.applySettingDefaults=t.isBrowser=t.stripTrailingSlash=t.uuid=void 0,t.uuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.stripTrailingSlash=function(e){return e.replace(/\/$/,"")},t.isBrowser=()=>"undefined"!=typeof window,t.applySettingDefaults=function(e,t){const{db:r,auth:i,realtime:n,global:o}=e,{db:a,auth:c,realtime:l,global:h}=t,u={db:Object.assign(Object.assign({},a),r),auth:Object.assign(Object.assign({},c),i),realtime:Object.assign(Object.assign({},l),n),global:Object.assign(Object.assign({},h),o),accessToken:()=>s(this,void 0,void 0,(function*(){return""}))};return e.accessToken?u.accessToken=e.accessToken:delete u.accessToken,u}},560:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="2.48.1"}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return i[e].call(s.exports,s,s.exports,o),s.exports}return o.m=i,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(s,r){if(1&r&&(s=this(s)),8&r)return s;if("object"==typeof s&&s){if(4&r&&s.__esModule)return s;if(16&r&&"function"==typeof s.then)return s}var i=Object.create(null);o.r(i);var n={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&s;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>n[e]=()=>s[e]));return n.default=()=>s,o.d(i,n),i},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,s)=>(o.f[s](e,t),t)),[])),o.u=e=>e+".supabase.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},r="supabase:",o.l=(e,t,i,n)=>{if(s[e])s[e].push(t);else{var a,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),h=0;h{a.onerror=a.onload=null,clearTimeout(f);var i=s[e];if(delete s[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(r))),t)return t(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),c&&document.head.appendChild(a)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var s=t.getElementsByTagName("script");if(s.length)for(var r=s.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=s[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={792:0};o.f.j=(t,s)=>{var r=o.o(e,t)?e[t]:void 0;if(0!==r)if(r)s.push(r[2]);else{var i=new Promise(((s,i)=>r=e[t]=[s,i]));s.push(r[2]=i);var n=o.p+o.u(t),a=new Error;o.l(n,(s=>{if(o.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+n+")",a.name="ChunkLoadError",a.type=i,a.request=n,r[1](a)}}),"chunk-"+t,t)}};var t=(t,s)=>{var r,i,[n,a,c]=s,l=0;if(n.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);c&&c(o)}for(t&&t(s);l `npm install --save @types/lodash`
+
+# Summary
+This package contains type definitions for lodash (https://lodash.com).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash.
+
+### Additional Details
+ * Last updated: Tue, 28 Jan 2025 07:32:22 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Brian Zengel](https://github.com/bczengel), [Ilya Mochalov](https://github.com/chrootsu), [AJ Richardson](https://github.com/aj-r), [e-cloud](https://github.com/e-cloud), [Jack Moore](https://github.com/jtmthf), [Dominique Rau](https://github.com/DomiR), and [William Chelman](https://github.com/WilliamChelman).
diff --git a/node_modules/@types/lodash/package.json b/node_modules/@types/lodash/package.json
new file mode 100644
index 0000000..3bcc04e
--- /dev/null
+++ b/node_modules/@types/lodash/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "@types/lodash",
+ "version": "4.17.15",
+ "description": "TypeScript definitions for lodash",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Brian Zengel",
+ "githubUsername": "bczengel",
+ "url": "https://github.com/bczengel"
+ },
+ {
+ "name": "Ilya Mochalov",
+ "githubUsername": "chrootsu",
+ "url": "https://github.com/chrootsu"
+ },
+ {
+ "name": "AJ Richardson",
+ "githubUsername": "aj-r",
+ "url": "https://github.com/aj-r"
+ },
+ {
+ "name": "e-cloud",
+ "githubUsername": "e-cloud",
+ "url": "https://github.com/e-cloud"
+ },
+ {
+ "name": "Jack Moore",
+ "githubUsername": "jtmthf",
+ "url": "https://github.com/jtmthf"
+ },
+ {
+ "name": "Dominique Rau",
+ "githubUsername": "DomiR",
+ "url": "https://github.com/DomiR"
+ },
+ {
+ "name": "William Chelman",
+ "githubUsername": "WilliamChelman",
+ "url": "https://github.com/WilliamChelman"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/lodash"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "peerDependencies": {},
+ "typesPublisherContentHash": "98d091ff5f27c3fdf2b63183998e60be0949bfb7a3007a14f4d386d0918c1c3d",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/node/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md
new file mode 100644
index 0000000..504e1a4
--- /dev/null
+++ b/node_modules/@types/node/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/node`
+
+# Summary
+This package contains type definitions for node (https://nodejs.org/).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
+
+### Additional Details
+ * Last updated: Wed, 01 Jan 2025 01:30:02 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Seth Westphal](https://github.com/westy92), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), and [wafuwafu13](https://github.com/wafuwafu13).
diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json
new file mode 100644
index 0000000..fcae5d0
--- /dev/null
+++ b/node_modules/@types/node/package.json
@@ -0,0 +1,218 @@
+{
+ "name": "@types/node",
+ "version": "16.18.123",
+ "description": "TypeScript definitions for node",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Microsoft TypeScript",
+ "githubUsername": "Microsoft",
+ "url": "https://github.com/Microsoft"
+ },
+ {
+ "name": "Alberto Schiabel",
+ "githubUsername": "jkomyno",
+ "url": "https://github.com/jkomyno"
+ },
+ {
+ "name": "Alvis HT Tang",
+ "githubUsername": "alvis",
+ "url": "https://github.com/alvis"
+ },
+ {
+ "name": "Andrew Makarov",
+ "githubUsername": "r3nya",
+ "url": "https://github.com/r3nya"
+ },
+ {
+ "name": "Benjamin Toueg",
+ "githubUsername": "btoueg",
+ "url": "https://github.com/btoueg"
+ },
+ {
+ "name": "Chigozirim C.",
+ "githubUsername": "smac89",
+ "url": "https://github.com/smac89"
+ },
+ {
+ "name": "David Junger",
+ "githubUsername": "touffy",
+ "url": "https://github.com/touffy"
+ },
+ {
+ "name": "Deividas Bakanas",
+ "githubUsername": "DeividasBakanas",
+ "url": "https://github.com/DeividasBakanas"
+ },
+ {
+ "name": "Eugene Y. Q. Shen",
+ "githubUsername": "eyqs",
+ "url": "https://github.com/eyqs"
+ },
+ {
+ "name": "Hannes Magnusson",
+ "githubUsername": "Hannes-Magnusson-CK",
+ "url": "https://github.com/Hannes-Magnusson-CK"
+ },
+ {
+ "name": "Huw",
+ "githubUsername": "hoo29",
+ "url": "https://github.com/hoo29"
+ },
+ {
+ "name": "Kelvin Jin",
+ "githubUsername": "kjin",
+ "url": "https://github.com/kjin"
+ },
+ {
+ "name": "Klaus Meinhardt",
+ "githubUsername": "ajafff",
+ "url": "https://github.com/ajafff"
+ },
+ {
+ "name": "Lishude",
+ "githubUsername": "islishude",
+ "url": "https://github.com/islishude"
+ },
+ {
+ "name": "Mariusz Wiktorczyk",
+ "githubUsername": "mwiktorczyk",
+ "url": "https://github.com/mwiktorczyk"
+ },
+ {
+ "name": "Mohsen Azimi",
+ "githubUsername": "mohsen1",
+ "url": "https://github.com/mohsen1"
+ },
+ {
+ "name": "Nikita Galkin",
+ "githubUsername": "galkin",
+ "url": "https://github.com/galkin"
+ },
+ {
+ "name": "Parambir Singh",
+ "githubUsername": "parambirs",
+ "url": "https://github.com/parambirs"
+ },
+ {
+ "name": "Sebastian Silbermann",
+ "githubUsername": "eps1lon",
+ "url": "https://github.com/eps1lon"
+ },
+ {
+ "name": "Seth Westphal",
+ "githubUsername": "westy92",
+ "url": "https://github.com/westy92"
+ },
+ {
+ "name": "Simon Schick",
+ "githubUsername": "SimonSchick",
+ "url": "https://github.com/SimonSchick"
+ },
+ {
+ "name": "Thomas den Hollander",
+ "githubUsername": "ThomasdenH",
+ "url": "https://github.com/ThomasdenH"
+ },
+ {
+ "name": "Wilco Bakker",
+ "githubUsername": "WilcoBakker",
+ "url": "https://github.com/WilcoBakker"
+ },
+ {
+ "name": "wwwy3y3",
+ "githubUsername": "wwwy3y3",
+ "url": "https://github.com/wwwy3y3"
+ },
+ {
+ "name": "Samuel Ainsworth",
+ "githubUsername": "samuela",
+ "url": "https://github.com/samuela"
+ },
+ {
+ "name": "Kyle Uehlein",
+ "githubUsername": "kuehlein",
+ "url": "https://github.com/kuehlein"
+ },
+ {
+ "name": "Thanik Bhongbhibhat",
+ "githubUsername": "bhongy",
+ "url": "https://github.com/bhongy"
+ },
+ {
+ "name": "Marcin Kopacz",
+ "githubUsername": "chyzwar",
+ "url": "https://github.com/chyzwar"
+ },
+ {
+ "name": "Trivikram Kamat",
+ "githubUsername": "trivikr",
+ "url": "https://github.com/trivikr"
+ },
+ {
+ "name": "Junxiao Shi",
+ "githubUsername": "yoursunny",
+ "url": "https://github.com/yoursunny"
+ },
+ {
+ "name": "Ilia Baryshnikov",
+ "githubUsername": "qwelias",
+ "url": "https://github.com/qwelias"
+ },
+ {
+ "name": "ExE Boss",
+ "githubUsername": "ExE-Boss",
+ "url": "https://github.com/ExE-Boss"
+ },
+ {
+ "name": "Piotr Błażejewicz",
+ "githubUsername": "peterblazejewicz",
+ "url": "https://github.com/peterblazejewicz"
+ },
+ {
+ "name": "Anna Henningsen",
+ "githubUsername": "addaleax",
+ "url": "https://github.com/addaleax"
+ },
+ {
+ "name": "Victor Perin",
+ "githubUsername": "victorperin",
+ "url": "https://github.com/victorperin"
+ },
+ {
+ "name": "NodeJS Contributors",
+ "githubUsername": "NodeJS",
+ "url": "https://github.com/NodeJS"
+ },
+ {
+ "name": "Linus Unnebäck",
+ "githubUsername": "LinusU",
+ "url": "https://github.com/LinusU"
+ },
+ {
+ "name": "wafuwafu13",
+ "githubUsername": "wafuwafu13",
+ "url": "https://github.com/wafuwafu13"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "typesVersions": {
+ "<=5.6": {
+ "*": [
+ "ts5.6/*"
+ ]
+ }
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/node"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "peerDependencies": {},
+ "typesPublisherContentHash": "0a9fc0d15f5d36c3976156d5a997a2b648b37ab58acb6d82cab2187773434457",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/@types/phoenix/LICENSE b/node_modules/@types/phoenix/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/phoenix/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/phoenix/README.md b/node_modules/@types/phoenix/README.md
new file mode 100644
index 0000000..7a79cb7
--- /dev/null
+++ b/node_modules/@types/phoenix/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/phoenix`
+
+# Summary
+This package contains type definitions for phoenix (https://github.com/phoenixframework/phoenix).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phoenix.
+
+### Additional Details
+ * Last updated: Mon, 25 Nov 2024 04:36:43 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Mirosław Ciastek](https://github.com/mciastek), [John Goff](https://github.com/John-Goff), and [Po Chen](https://github.com/princemaple).
diff --git a/node_modules/@types/phoenix/package.json b/node_modules/@types/phoenix/package.json
new file mode 100644
index 0000000..a983ff5
--- /dev/null
+++ b/node_modules/@types/phoenix/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@types/phoenix",
+ "version": "1.6.6",
+ "description": "TypeScript definitions for phoenix",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phoenix",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Mirosław Ciastek",
+ "githubUsername": "mciastek",
+ "url": "https://github.com/mciastek"
+ },
+ {
+ "name": "John Goff",
+ "githubUsername": "John-Goff",
+ "url": "https://github.com/John-Goff"
+ },
+ {
+ "name": "Po Chen",
+ "githubUsername": "princemaple",
+ "url": "https://github.com/princemaple"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/phoenix"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "peerDependencies": {},
+ "typesPublisherContentHash": "c0340fc0989da60624b43c27686516f3e119dc24a80cb489652461a07a3d43ab",
+ "typeScriptVersion": "4.9"
+}
\ No newline at end of file
diff --git a/node_modules/@types/sinon/LICENSE b/node_modules/@types/sinon/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/sinon/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/sinon/README.md b/node_modules/@types/sinon/README.md
new file mode 100644
index 0000000..38f25bf
--- /dev/null
+++ b/node_modules/@types/sinon/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/sinon`
+
+# Summary
+This package contains type definitions for sinon (https://sinonjs.org).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon.
+
+### Additional Details
+ * Last updated: Wed, 10 Jan 2024 09:07:08 GMT
+ * Dependencies: [@types/sinonjs__fake-timers](https://npmjs.com/package/@types/sinonjs__fake-timers)
+
+# Credits
+These definitions were written by [William Sears](https://github.com/mrbigdog2u), [Nico Jansen](https://github.com/nicojs), [James Garbutt](https://github.com/43081j), [Greg Jednaszewski](https://github.com/gjednaszewski), [John Wood](https://github.com/johnjesse), [Alec Flett](https://github.com/alecf), [Simon Schick](https://github.com/SimonSchick), and [Mathias Schreck](https://github.com/lo1tuma).
diff --git a/node_modules/@types/sinon/package.json b/node_modules/@types/sinon/package.json
new file mode 100644
index 0000000..3b34236
--- /dev/null
+++ b/node_modules/@types/sinon/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "@types/sinon",
+ "version": "17.0.3",
+ "description": "TypeScript definitions for sinon",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "William Sears",
+ "githubUsername": "mrbigdog2u",
+ "url": "https://github.com/mrbigdog2u"
+ },
+ {
+ "name": "Nico Jansen",
+ "githubUsername": "nicojs",
+ "url": "https://github.com/nicojs"
+ },
+ {
+ "name": "James Garbutt",
+ "githubUsername": "43081j",
+ "url": "https://github.com/43081j"
+ },
+ {
+ "name": "Greg Jednaszewski",
+ "githubUsername": "gjednaszewski",
+ "url": "https://github.com/gjednaszewski"
+ },
+ {
+ "name": "John Wood",
+ "githubUsername": "johnjesse",
+ "url": "https://github.com/johnjesse"
+ },
+ {
+ "name": "Alec Flett",
+ "githubUsername": "alecf",
+ "url": "https://github.com/alecf"
+ },
+ {
+ "name": "Simon Schick",
+ "githubUsername": "SimonSchick",
+ "url": "https://github.com/SimonSchick"
+ },
+ {
+ "name": "Mathias Schreck",
+ "githubUsername": "lo1tuma",
+ "url": "https://github.com/lo1tuma"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/sinon"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/sinonjs__fake-timers": "*"
+ },
+ "typesPublisherContentHash": "cc1350cc55f70530a7cbb4c2a4cadd237011448aa601750d7ea7eac59e83bf53",
+ "typeScriptVersion": "4.6"
+}
\ No newline at end of file
diff --git a/node_modules/@types/sinonjs__fake-timers/LICENSE b/node_modules/@types/sinonjs__fake-timers/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/sinonjs__fake-timers/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/sinonjs__fake-timers/README.md b/node_modules/@types/sinonjs__fake-timers/README.md
new file mode 100644
index 0000000..25a2cf7
--- /dev/null
+++ b/node_modules/@types/sinonjs__fake-timers/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/sinonjs__fake-timers`
+
+# Summary
+This package contains type definitions for @sinonjs/fake-timers (https://github.com/sinonjs/fake-timers).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinonjs__fake-timers.
+
+### Additional Details
+ * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
+ * Dependencies: none
+
+# Credits
+These definitions were written by [Wim Looman](https://github.com/Nemo157), [Rogier Schouten](https://github.com/rogierschouten), [Yishai Zehavi](https://github.com/zyishai), [Remco Haszing](https://github.com/remcohaszing), and [Jaden Simon](https://github.com/JadenSimon).
diff --git a/node_modules/@types/sinonjs__fake-timers/package.json b/node_modules/@types/sinonjs__fake-timers/package.json
new file mode 100644
index 0000000..16090b8
--- /dev/null
+++ b/node_modules/@types/sinonjs__fake-timers/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "@types/sinonjs__fake-timers",
+ "version": "8.1.5",
+ "description": "TypeScript definitions for @sinonjs/fake-timers",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinonjs__fake-timers",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Wim Looman",
+ "githubUsername": "Nemo157",
+ "url": "https://github.com/Nemo157"
+ },
+ {
+ "name": "Rogier Schouten",
+ "githubUsername": "rogierschouten",
+ "url": "https://github.com/rogierschouten"
+ },
+ {
+ "name": "Yishai Zehavi",
+ "githubUsername": "zyishai",
+ "url": "https://github.com/zyishai"
+ },
+ {
+ "name": "Remco Haszing",
+ "githubUsername": "remcohaszing",
+ "url": "https://github.com/remcohaszing"
+ },
+ {
+ "name": "Jaden Simon",
+ "githubUsername": "JadenSimon",
+ "url": "https://github.com/JadenSimon"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/sinonjs__fake-timers"
+ },
+ "scripts": {},
+ "dependencies": {},
+ "typesPublisherContentHash": "ac02b09bd69bca309a0c11d5747e87b33dce4bc3dad14158ef12fcfb775225d3",
+ "typeScriptVersion": "4.5"
+}
\ No newline at end of file
diff --git a/node_modules/@types/ws/LICENSE b/node_modules/@types/ws/LICENSE
new file mode 100644
index 0000000..9e841e7
--- /dev/null
+++ b/node_modules/@types/ws/LICENSE
@@ -0,0 +1,21 @@
+ MIT License
+
+ Copyright (c) Microsoft Corporation.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE
diff --git a/node_modules/@types/ws/README.md b/node_modules/@types/ws/README.md
new file mode 100644
index 0000000..f1af11f
--- /dev/null
+++ b/node_modules/@types/ws/README.md
@@ -0,0 +1,15 @@
+# Installation
+> `npm install --save @types/ws`
+
+# Summary
+This package contains type definitions for ws (https://github.com/websockets/ws).
+
+# Details
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws.
+
+### Additional Details
+ * Last updated: Thu, 23 Jan 2025 16:36:36 GMT
+ * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
+
+# Credits
+These definitions were written by [Paul Loyd](https://github.com/loyd), [Margus Lamp](https://github.com/mlamp), [Philippe D'Alva](https://github.com/TitaneBoy), [reduckted](https://github.com/reduckted), [teidesu](https://github.com/teidesu), [Bartosz Wojtkowiak](https://github.com/wojtkowiak), [Kyle Hensel](https://github.com/k-yle), and [Samuel Skeen](https://github.com/cwadrupldijjit).
diff --git a/node_modules/@types/ws/index.d.mts b/node_modules/@types/ws/index.d.mts
new file mode 100644
index 0000000..23bce7f
--- /dev/null
+++ b/node_modules/@types/ws/index.d.mts
@@ -0,0 +1,418 @@
+///
+
+import { EventEmitter } from "events";
+import {
+ Agent,
+ ClientRequest,
+ ClientRequestArgs,
+ IncomingMessage,
+ OutgoingHttpHeaders,
+ Server as HTTPServer,
+} from "http";
+import { Server as HTTPSServer } from "https";
+import { Duplex, DuplexOptions } from "stream";
+import { SecureContextOptions } from "tls";
+import { URL } from "url";
+import { ZlibOptions } from "zlib";
+
+// can not get all overload of BufferConstructor['from'], need to copy all it's first arguments here
+// https://github.com/microsoft/TypeScript/issues/32164
+type BufferLike =
+ | string
+ | Buffer
+ | DataView
+ | number
+ | ArrayBufferView
+ | Uint8Array
+ | ArrayBuffer
+ | SharedArrayBuffer
+ | readonly any[]
+ | readonly number[]
+ | { valueOf(): ArrayBuffer }
+ | { valueOf(): SharedArrayBuffer }
+ | { valueOf(): Uint8Array }
+ | { valueOf(): readonly number[] }
+ | { valueOf(): string }
+ | { [Symbol.toPrimitive](hint: string): string };
+
+// WebSocket socket.
+declare class WebSocket extends EventEmitter {
+ /** The connection is not yet open. */
+ static readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ static readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ static readonly CLOSING: 2;
+ /** The connection is closed. */
+ static readonly CLOSED: 3;
+
+ binaryType: "nodebuffer" | "arraybuffer" | "fragments";
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ /** Indicates whether the websocket is paused */
+ readonly isPaused: boolean;
+ readonly protocol: string;
+ /** The current state of the connection */
+ readonly readyState:
+ | typeof WebSocket.CONNECTING
+ | typeof WebSocket.OPEN
+ | typeof WebSocket.CLOSING
+ | typeof WebSocket.CLOSED;
+ readonly url: string;
+
+ /** The connection is not yet open. */
+ readonly CONNECTING: 0;
+ /** The connection is open and ready to communicate. */
+ readonly OPEN: 1;
+ /** The connection is in the process of closing. */
+ readonly CLOSING: 2;
+ /** The connection is closed. */
+ readonly CLOSED: 3;
+
+ onopen: ((event: WebSocket.Event) => void) | null;
+ onerror: ((event: WebSocket.ErrorEvent) => void) | null;
+ onclose: ((event: WebSocket.CloseEvent) => void) | null;
+ onmessage: ((event: WebSocket.MessageEvent) => void) | null;
+
+ constructor(address: null);
+ constructor(address: string | URL, options?: WebSocket.ClientOptions | ClientRequestArgs);
+ constructor(
+ address: string | URL,
+ protocols?: string | string[],
+ options?: WebSocket.ClientOptions | ClientRequestArgs,
+ );
+
+ close(code?: number, data?: string | Buffer): void;
+ ping(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ pong(data?: any, mask?: boolean, cb?: (err: Error) => void): void;
+ // https://github.com/websockets/ws/issues/2076#issuecomment-1250354722
+ send(data: BufferLike, cb?: (err?: Error) => void): void;
+ send(
+ data: BufferLike,
+ options: {
+ mask?: boolean | undefined;
+ binary?: boolean | undefined;
+ compress?: boolean | undefined;
+ fin?: boolean | undefined;
+ },
+ cb?: (err?: Error) => void,
+ ): void;
+ terminate(): void;
+
+ /**
+ * Pause the websocket causing it to stop emitting events. Some events can still be
+ * emitted after this is called, until all buffered data is consumed. This method
+ * is a noop if the ready state is `CONNECTING` or `CLOSED`.
+ */
+ pause(): void;
+ /**
+ * Make a paused socket resume emitting events. This method is a noop if the ready
+ * state is `CONNECTING` or `CLOSED`.
+ */
+ resume(): void;
+
+ // HTML5 WebSocket events
+ addEventListener(
+ type: K,
+ listener: (event: WebSocket.WebSocketEventMap[K]) => void,
+ options?: WebSocket.EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: K,
+ listener: (event: WebSocket.WebSocketEventMap[K]) => void,
+ ): void;
+
+ // Events
+ on(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ on(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ on(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ on(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ on(event: "open", listener: (this: WebSocket) => void): this;
+ on(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ on(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ on(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ once(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ once(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ once(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ once(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ once(event: "open", listener: (this: WebSocket) => void): this;
+ once(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ once(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ once(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ off(event: "close", listener: (this: WebSocket, code: number, reason: Buffer) => void): this;
+ off(event: "error", listener: (this: WebSocket, err: Error) => void): this;
+ off(event: "upgrade", listener: (this: WebSocket, request: IncomingMessage) => void): this;
+ off(event: "message", listener: (this: WebSocket, data: WebSocket.RawData, isBinary: boolean) => void): this;
+ off(event: "open", listener: (this: WebSocket) => void): this;
+ off(event: "ping" | "pong", listener: (this: WebSocket, data: Buffer) => void): this;
+ off(
+ event: "unexpected-response",
+ listener: (this: WebSocket, request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ off(event: string | symbol, listener: (this: WebSocket, ...args: any[]) => void): this;
+
+ addListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ addListener(event: "error", listener: (err: Error) => void): this;
+ addListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ addListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ addListener(event: "open", listener: () => void): this;
+ addListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ addListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "close", listener: (code: number, reason: Buffer) => void): this;
+ removeListener(event: "error", listener: (err: Error) => void): this;
+ removeListener(event: "upgrade", listener: (request: IncomingMessage) => void): this;
+ removeListener(event: "message", listener: (data: WebSocket.RawData, isBinary: boolean) => void): this;
+ removeListener(event: "open", listener: () => void): this;
+ removeListener(event: "ping" | "pong", listener: (data: Buffer) => void): this;
+ removeListener(
+ event: "unexpected-response",
+ listener: (request: ClientRequest, response: IncomingMessage) => void,
+ ): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+
+declare namespace WebSocket {
+ /**
+ * Data represents the raw message payload received over the WebSocket.
+ */
+ type RawData = Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * Data represents the message payload received over the WebSocket.
+ */
+ type Data = string | Buffer | ArrayBuffer | Buffer[];
+
+ /**
+ * CertMeta represents the accepted types for certificate & key data.
+ */
+ type CertMeta = string | string[] | Buffer | Buffer[];
+
+ /**
+ * VerifyClientCallbackSync is a synchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackSync = (info: {
+ origin: string;
+ secure: boolean;
+ req: Request;
+ }) => boolean;
+
+ /**
+ * VerifyClientCallbackAsync is an asynchronous callback used to inspect the
+ * incoming message. The return value (boolean) of the function determines
+ * whether or not to accept the handshake.
+ */
+ type VerifyClientCallbackAsync = (
+ info: { origin: string; secure: boolean; req: Request },
+ callback: (res: boolean, code?: number, message?: string, headers?: OutgoingHttpHeaders) => void,
+ ) => void;
+
+ /**
+ * FinishRequestCallback is a callback for last minute customization of the
+ * headers. If finishRequest is set, then it has the responsibility to call
+ * request.end() once it is done setting request headers.
+ */
+ type FinishRequestCallback = (request: IncomingMessage, websocket: WebSocket) => void;
+
+ interface ClientOptions extends SecureContextOptions {
+ protocol?: string | undefined;
+ followRedirects?: boolean | undefined;
+ generateMask?(mask: Buffer): void;
+ handshakeTimeout?: number | undefined;
+ maxRedirects?: number | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ localAddress?: string | undefined;
+ protocolVersion?: number | undefined;
+ headers?: { [key: string]: string } | undefined;
+ origin?: string | undefined;
+ agent?: Agent | undefined;
+ host?: string | undefined;
+ family?: number | undefined;
+ checkServerIdentity?(servername: string, cert: CertMeta): boolean;
+ rejectUnauthorized?: boolean | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ finishRequest?: FinishRequestCallback | undefined;
+ }
+
+ interface PerMessageDeflateOptions {
+ serverNoContextTakeover?: boolean | undefined;
+ clientNoContextTakeover?: boolean | undefined;
+ serverMaxWindowBits?: number | undefined;
+ clientMaxWindowBits?: number | undefined;
+ zlibDeflateOptions?:
+ | {
+ flush?: number | undefined;
+ finishFlush?: number | undefined;
+ chunkSize?: number | undefined;
+ windowBits?: number | undefined;
+ level?: number | undefined;
+ memLevel?: number | undefined;
+ strategy?: number | undefined;
+ dictionary?: Buffer | Buffer[] | DataView | undefined;
+ info?: boolean | undefined;
+ }
+ | undefined;
+ zlibInflateOptions?: ZlibOptions | undefined;
+ threshold?: number | undefined;
+ concurrencyLimit?: number | undefined;
+ }
+
+ interface Event {
+ type: string;
+ target: WebSocket;
+ }
+
+ interface ErrorEvent {
+ error: any;
+ message: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface CloseEvent {
+ wasClean: boolean;
+ code: number;
+ reason: string;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface MessageEvent {
+ data: Data;
+ type: string;
+ target: WebSocket;
+ }
+
+ interface WebSocketEventMap {
+ open: Event;
+ error: ErrorEvent;
+ close: CloseEvent;
+ message: MessageEvent;
+ }
+
+ interface EventListenerOptions {
+ once?: boolean | undefined;
+ }
+
+ interface ServerOptions<
+ U extends typeof WebSocket = typeof WebSocket,
+ V extends typeof IncomingMessage = typeof IncomingMessage,
+ > {
+ host?: string | undefined;
+ port?: number | undefined;
+ backlog?: number | undefined;
+ server?: HTTPServer | HTTPSServer | undefined;
+ verifyClient?:
+ | VerifyClientCallbackAsync>
+ | VerifyClientCallbackSync>
+ | undefined;
+ handleProtocols?: (protocols: Set, request: InstanceType) => string | false;
+ path?: string | undefined;
+ noServer?: boolean | undefined;
+ clientTracking?: boolean | undefined;
+ perMessageDeflate?: boolean | PerMessageDeflateOptions | undefined;
+ maxPayload?: number | undefined;
+ skipUTF8Validation?: boolean | undefined;
+ WebSocket?: U | undefined;
+ }
+
+ interface AddressInfo {
+ address: string;
+ family: string;
+ port: number;
+ }
+}
+
+export import AddressInfo = WebSocket.AddressInfo;
+export import CertMeta = WebSocket.CertMeta;
+export import ClientOptions = WebSocket.ClientOptions;
+export import CloseEvent = WebSocket.CloseEvent;
+export import Data = WebSocket.Data;
+export import ErrorEvent = WebSocket.ErrorEvent;
+export import Event = WebSocket.Event;
+export import EventListenerOptions = WebSocket.EventListenerOptions;
+export import FinishRequestCallback = WebSocket.FinishRequestCallback;
+export import MessageEvent = WebSocket.MessageEvent;
+export import PerMessageDeflateOptions = WebSocket.PerMessageDeflateOptions;
+export import RawData = WebSocket.RawData;
+export import ServerOptions = WebSocket.ServerOptions;
+export import VerifyClientCallbackAsync = WebSocket.VerifyClientCallbackAsync;
+export import VerifyClientCallbackSync = WebSocket.VerifyClientCallbackSync;
+
+// WebSocket Server
+declare class Server<
+ T extends typeof WebSocket = typeof WebSocket,
+ U extends typeof IncomingMessage = typeof IncomingMessage,
+> extends EventEmitter {
+ options: WebSocket.ServerOptions;
+ path: string;
+ clients: Set>;
+
+ constructor(options?: WebSocket.ServerOptions, callback?: () => void);
+
+ address(): WebSocket.AddressInfo | string | null;
+ close(cb?: (err?: Error) => void): void;
+ handleUpgrade(
+ request: InstanceType,
+ socket: Duplex,
+ upgradeHead: Buffer,
+ callback: (client: InstanceType, request: InstanceType) => void,
+ ): void;
+ shouldHandle(request: InstanceType): boolean | Promise;
+
+ // Events
+ on(event: "connection", cb: (this: Server, socket: InstanceType, request: InstanceType) => void): this;
+ on(event: "error", cb: (this: Server, error: Error) => void): this;
+ on(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ on(event: "close" | "listening", cb: (this: Server) => void): this;
+ on(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ once(event: "connection", cb: (this: Server, socket: InstanceType, request: InstanceType) => void): this;
+ once(event: "error", cb: (this: Server, error: Error) => void): this;
+ once(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ once(event: "close" | "listening", cb: (this: Server) => void): this;
+ once(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ off(event: "connection", cb: (this: Server, socket: InstanceType, request: InstanceType) => void): this;
+ off(event: "error", cb: (this: Server, error: Error) => void): this;
+ off(event: "headers", cb: (this: Server, headers: string[], request: InstanceType) => void): this;
+ off(event: "close" | "listening", cb: (this: Server) => void): this;
+ off(event: string | symbol, listener: (this: Server, ...args: any[]) => void): this;
+
+ addListener(event: "connection", cb: (client: InstanceType, request: InstanceType) => void): this;
+ addListener(event: "error", cb: (err: Error) => void): this;
+ addListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ addListener(event: "close" | "listening", cb: () => void): this;
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
+
+ removeListener(event: "connection", cb: (client: InstanceType, request: InstanceType) => void): this;
+ removeListener(event: "error", cb: (err: Error) => void): this;
+ removeListener(event: "headers", cb: (headers: string[], request: InstanceType) => void): this;
+ removeListener(event: "close" | "listening", cb: () => void): this;
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
+}
+export { type Server };
+
+export const WebSocketServer: typeof Server;
+export interface WebSocketServer extends Server {} // eslint-disable-line @typescript-eslint/no-empty-interface
+
+// WebSocket stream
+export function createWebSocketStream(websocket: WebSocket, options?: DuplexOptions): Duplex;
+
+export default WebSocket;
+export { WebSocket };
diff --git a/node_modules/@types/ws/package.json b/node_modules/@types/ws/package.json
new file mode 100644
index 0000000..0494af3
--- /dev/null
+++ b/node_modules/@types/ws/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "@types/ws",
+ "version": "8.5.14",
+ "description": "TypeScript definitions for ws",
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ws",
+ "license": "MIT",
+ "contributors": [
+ {
+ "name": "Paul Loyd",
+ "githubUsername": "loyd",
+ "url": "https://github.com/loyd"
+ },
+ {
+ "name": "Margus Lamp",
+ "githubUsername": "mlamp",
+ "url": "https://github.com/mlamp"
+ },
+ {
+ "name": "Philippe D'Alva",
+ "githubUsername": "TitaneBoy",
+ "url": "https://github.com/TitaneBoy"
+ },
+ {
+ "name": "reduckted",
+ "githubUsername": "reduckted",
+ "url": "https://github.com/reduckted"
+ },
+ {
+ "name": "teidesu",
+ "githubUsername": "teidesu",
+ "url": "https://github.com/teidesu"
+ },
+ {
+ "name": "Bartosz Wojtkowiak",
+ "githubUsername": "wojtkowiak",
+ "url": "https://github.com/wojtkowiak"
+ },
+ {
+ "name": "Kyle Hensel",
+ "githubUsername": "k-yle",
+ "url": "https://github.com/k-yle"
+ },
+ {
+ "name": "Samuel Skeen",
+ "githubUsername": "cwadrupldijjit",
+ "url": "https://github.com/cwadrupldijjit"
+ }
+ ],
+ "main": "",
+ "types": "index.d.ts",
+ "exports": {
+ ".": {
+ "types": {
+ "import": "./index.d.mts",
+ "default": "./index.d.ts"
+ }
+ },
+ "./package.json": "./package.json"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
+ "directory": "types/ws"
+ },
+ "scripts": {},
+ "dependencies": {
+ "@types/node": "*"
+ },
+ "peerDependencies": {},
+ "typesPublisherContentHash": "4f28320da3aae9bcd0905e47ff3eb3a16b1882e182a1b60100f36e518359b5a7",
+ "typeScriptVersion": "5.0"
+}
\ No newline at end of file
diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE
new file mode 100644
index 0000000..c9eca5d
--- /dev/null
+++ b/node_modules/asynckit/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016 Alex Indigo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md
new file mode 100644
index 0000000..ddcc7e6
--- /dev/null
+++ b/node_modules/asynckit/README.md
@@ -0,0 +1,233 @@
+# asynckit [](https://www.npmjs.com/package/asynckit)
+
+Minimal async jobs utility library, with streams support.
+
+[](https://travis-ci.org/alexindigo/asynckit)
+[](https://travis-ci.org/alexindigo/asynckit)
+[](https://ci.appveyor.com/project/alexindigo/asynckit)
+
+[](https://coveralls.io/github/alexindigo/asynckit?branch=master)
+[](https://david-dm.org/alexindigo/asynckit)
+[](https://www.bithound.io/github/alexindigo/asynckit)
+
+
+
+AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
+Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
+
+It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
+
+| compression | size |
+| :----------------- | -------: |
+| asynckit.js | 12.34 kB |
+| asynckit.min.js | 4.11 kB |
+| asynckit.min.js.gz | 1.47 kB |
+
+
+## Install
+
+```sh
+$ npm install --save asynckit
+```
+
+## Examples
+
+### Parallel Jobs
+
+Runs iterator over provided array in parallel. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will terminate rest of the active jobs (if abort function is provided)
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var parallel = require('asynckit').parallel
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , target = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// async job accepts one element from the array
+// and a callback function
+function asyncJob(item, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var parallel = require('asynckit/parallel')
+ , assert = require('assert')
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
+ , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
+ , target = []
+ , keys = []
+ ;
+
+parallel(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+ assert.deepEqual(keys, expectedKeys);
+});
+
+// supports full value, key, callback (shortcut) interface
+function asyncJob(item, key, cb)
+{
+ // different delays (in ms) per item
+ var delay = item * 25;
+
+ // pretend different jobs take different time to finish
+ // and not in consequential order
+ var timeoutId = setTimeout(function() {
+ keys.push(key);
+ target.push(item);
+ cb(null, item * 2);
+ }, delay);
+
+ // allow to cancel "leftover" jobs upon error
+ // return function, invoking of which will abort this job
+ return clearTimeout.bind(null, timeoutId);
+}
+```
+
+More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
+
+### Serial Jobs
+
+Runs iterator over provided array sequentially. Stores output in the `result` array,
+on the matching positions. In unlikely event of an error from one of the jobs,
+will not proceed to the rest of the items in the list
+and return error along with salvaged data to the main callback function.
+
+#### Input Array
+
+```javascript
+var serial = require('asynckit/serial')
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// extended interface (item, key, callback)
+// also supported for arrays
+function asyncJob(item, key, cb)
+{
+ target.push(key);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
+
+#### Input Object
+
+Also it supports named jobs, listed via object.
+
+```javascript
+var serial = require('asynckit').serial
+ , assert = require('assert')
+ ;
+
+var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
+ , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
+ , target = []
+ ;
+
+var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
+ , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
+ , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
+ , target = []
+ ;
+
+
+serial(source, asyncJob, function(err, result)
+{
+ assert.deepEqual(result, expectedResult);
+ assert.deepEqual(target, expectedTarget);
+});
+
+// shortcut interface (item, callback)
+// works for object as well as for the arrays
+function asyncJob(item, cb)
+{
+ target.push(item);
+
+ // it will be automatically made async
+ // even it iterator "returns" in the same event loop
+ cb(null, item * 2);
+}
+```
+
+More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
+
+_Note: Since _object_ is an _unordered_ collection of properties,
+it may produce unexpected results with sequential iterations.
+Whenever order of the jobs' execution is important please use `serialOrdered` method._
+
+### Ordered Serial Iterations
+
+TBD
+
+For example [compare-property](compare-property) package.
+
+### Streaming interface
+
+TBD
+
+## Want to Know More?
+
+More examples can be found in [test folder](test/).
+
+Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
+
+## License
+
+AsyncKit is licensed under the MIT license.
diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js
new file mode 100644
index 0000000..c612f1a
--- /dev/null
+++ b/node_modules/asynckit/bench.js
@@ -0,0 +1,76 @@
+/* eslint no-console: "off" */
+
+var asynckit = require('./')
+ , async = require('async')
+ , assert = require('assert')
+ , expected = 0
+ ;
+
+var Benchmark = require('benchmark');
+var suite = new Benchmark.Suite;
+
+var source = [];
+for (var z = 1; z < 100; z++)
+{
+ source.push(z);
+ expected += z;
+}
+
+suite
+// add tests
+
+.add('async.map', function(deferred)
+{
+ var total = 0;
+
+ async.map(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+.add('asynckit.parallel', function(deferred)
+{
+ var total = 0;
+
+ asynckit.parallel(source,
+ function(i, cb)
+ {
+ setImmediate(function()
+ {
+ total += i;
+ cb(null, total);
+ });
+ },
+ function(err, result)
+ {
+ assert.ifError(err);
+ assert.equal(result[result.length - 1], expected);
+ deferred.resolve();
+ });
+}, {'defer': true})
+
+
+// add listeners
+.on('cycle', function(ev)
+{
+ console.log(String(ev.target));
+})
+.on('complete', function()
+{
+ console.log('Fastest is ' + this.filter('fastest').map('name'));
+})
+// run async
+.run({ 'async': true });
diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js
new file mode 100644
index 0000000..455f945
--- /dev/null
+++ b/node_modules/asynckit/index.js
@@ -0,0 +1,6 @@
+module.exports =
+{
+ parallel : require('./parallel.js'),
+ serial : require('./serial.js'),
+ serialOrdered : require('./serialOrdered.js')
+};
diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js
new file mode 100644
index 0000000..114367e
--- /dev/null
+++ b/node_modules/asynckit/lib/abort.js
@@ -0,0 +1,29 @@
+// API
+module.exports = abort;
+
+/**
+ * Aborts leftover active jobs
+ *
+ * @param {object} state - current state object
+ */
+function abort(state)
+{
+ Object.keys(state.jobs).forEach(clean.bind(state));
+
+ // reset leftover jobs
+ state.jobs = {};
+}
+
+/**
+ * Cleans up leftover job by invoking abort function for the provided job id
+ *
+ * @this state
+ * @param {string|number} key - job id to abort
+ */
+function clean(key)
+{
+ if (typeof this.jobs[key] == 'function')
+ {
+ this.jobs[key]();
+ }
+}
diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js
new file mode 100644
index 0000000..7f1288a
--- /dev/null
+++ b/node_modules/asynckit/lib/async.js
@@ -0,0 +1,34 @@
+var defer = require('./defer.js');
+
+// API
+module.exports = async;
+
+/**
+ * Runs provided callback asynchronously
+ * even if callback itself is not
+ *
+ * @param {function} callback - callback to invoke
+ * @returns {function} - augmented callback
+ */
+function async(callback)
+{
+ var isAsync = false;
+
+ // check if async happened
+ defer(function() { isAsync = true; });
+
+ return function async_callback(err, result)
+ {
+ if (isAsync)
+ {
+ callback(err, result);
+ }
+ else
+ {
+ defer(function nextTick_callback()
+ {
+ callback(err, result);
+ });
+ }
+ };
+}
diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js
new file mode 100644
index 0000000..b67110c
--- /dev/null
+++ b/node_modules/asynckit/lib/defer.js
@@ -0,0 +1,26 @@
+module.exports = defer;
+
+/**
+ * Runs provided function on next iteration of the event loop
+ *
+ * @param {function} fn - function to run
+ */
+function defer(fn)
+{
+ var nextTick = typeof setImmediate == 'function'
+ ? setImmediate
+ : (
+ typeof process == 'object' && typeof process.nextTick == 'function'
+ ? process.nextTick
+ : null
+ );
+
+ if (nextTick)
+ {
+ nextTick(fn);
+ }
+ else
+ {
+ setTimeout(fn, 0);
+ }
+}
diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js
new file mode 100644
index 0000000..5d2839a
--- /dev/null
+++ b/node_modules/asynckit/lib/iterate.js
@@ -0,0 +1,75 @@
+var async = require('./async.js')
+ , abort = require('./abort.js')
+ ;
+
+// API
+module.exports = iterate;
+
+/**
+ * Iterates over each job object
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {object} state - current job status
+ * @param {function} callback - invoked when all elements processed
+ */
+function iterate(list, iterator, state, callback)
+{
+ // store current index
+ var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;
+
+ state.jobs[key] = runJob(iterator, key, list[key], function(error, output)
+ {
+ // don't repeat yourself
+ // skip secondary callbacks
+ if (!(key in state.jobs))
+ {
+ return;
+ }
+
+ // clean up jobs
+ delete state.jobs[key];
+
+ if (error)
+ {
+ // don't process rest of the results
+ // stop still active jobs
+ // and reset the list
+ abort(state);
+ }
+ else
+ {
+ state.results[key] = output;
+ }
+
+ // return salvaged results
+ callback(error, state.results);
+ });
+}
+
+/**
+ * Runs iterator over provided job element
+ *
+ * @param {function} iterator - iterator to invoke
+ * @param {string|number} key - key/index of the element in the list of jobs
+ * @param {mixed} item - job description
+ * @param {function} callback - invoked after iterator is done with the job
+ * @returns {function|mixed} - job abort function or something else
+ */
+function runJob(iterator, key, item, callback)
+{
+ var aborter;
+
+ // allow shortcut if iterator expects only two arguments
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, async(callback));
+ }
+ // otherwise go with full three arguments
+ else
+ {
+ aborter = iterator(item, key, async(callback));
+ }
+
+ return aborter;
+}
diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js
new file mode 100644
index 0000000..78ad240
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_asynckit.js
@@ -0,0 +1,91 @@
+var streamify = require('./streamify.js')
+ , defer = require('./defer.js')
+ ;
+
+// API
+module.exports = ReadableAsyncKit;
+
+/**
+ * Base constructor for all streams
+ * used to hold properties/methods
+ */
+function ReadableAsyncKit()
+{
+ ReadableAsyncKit.super_.apply(this, arguments);
+
+ // list of active jobs
+ this.jobs = {};
+
+ // add stream methods
+ this.destroy = destroy;
+ this._start = _start;
+ this._read = _read;
+}
+
+/**
+ * Destroys readable stream,
+ * by aborting outstanding jobs
+ *
+ * @returns {void}
+ */
+function destroy()
+{
+ if (this.destroyed)
+ {
+ return;
+ }
+
+ this.destroyed = true;
+
+ if (typeof this.terminator == 'function')
+ {
+ this.terminator();
+ }
+}
+
+/**
+ * Starts provided jobs in async manner
+ *
+ * @private
+ */
+function _start()
+{
+ // first argument – runner function
+ var runner = arguments[0]
+ // take away first argument
+ , args = Array.prototype.slice.call(arguments, 1)
+ // second argument - input data
+ , input = args[0]
+ // last argument - result callback
+ , endCb = streamify.callback.call(this, args[args.length - 1])
+ ;
+
+ args[args.length - 1] = endCb;
+ // third argument - iterator
+ args[1] = streamify.iterator.call(this, args[1]);
+
+ // allow time for proper setup
+ defer(function()
+ {
+ if (!this.destroyed)
+ {
+ this.terminator = runner.apply(null, args);
+ }
+ else
+ {
+ endCb(null, Array.isArray(input) ? [] : {});
+ }
+ }.bind(this));
+}
+
+
+/**
+ * Implement _read to comply with Readable streams
+ * Doesn't really make sense for flowing object mode
+ *
+ * @private
+ */
+function _read()
+{
+
+}
diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js
new file mode 100644
index 0000000..5d2929f
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_parallel.js
@@ -0,0 +1,25 @@
+var parallel = require('../parallel.js');
+
+// API
+module.exports = ReadableParallel;
+
+/**
+ * Streaming wrapper to `asynckit.parallel`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableParallel(list, iterator, callback)
+{
+ if (!(this instanceof ReadableParallel))
+ {
+ return new ReadableParallel(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableParallel.super_.call(this, {objectMode: true});
+
+ this._start(parallel, list, iterator, callback);
+}
diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js
new file mode 100644
index 0000000..7822698
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_serial.js
@@ -0,0 +1,25 @@
+var serial = require('../serial.js');
+
+// API
+module.exports = ReadableSerial;
+
+/**
+ * Streaming wrapper to `asynckit.serial`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerial(list, iterator, callback)
+{
+ if (!(this instanceof ReadableSerial))
+ {
+ return new ReadableSerial(list, iterator, callback);
+ }
+
+ // turn on object mode
+ ReadableSerial.super_.call(this, {objectMode: true});
+
+ this._start(serial, list, iterator, callback);
+}
diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js
new file mode 100644
index 0000000..3de89c4
--- /dev/null
+++ b/node_modules/asynckit/lib/readable_serial_ordered.js
@@ -0,0 +1,29 @@
+var serialOrdered = require('../serialOrdered.js');
+
+// API
+module.exports = ReadableSerialOrdered;
+// expose sort helpers
+module.exports.ascending = serialOrdered.ascending;
+module.exports.descending = serialOrdered.descending;
+
+/**
+ * Streaming wrapper to `asynckit.serialOrdered`
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {stream.Readable#}
+ */
+function ReadableSerialOrdered(list, iterator, sortMethod, callback)
+{
+ if (!(this instanceof ReadableSerialOrdered))
+ {
+ return new ReadableSerialOrdered(list, iterator, sortMethod, callback);
+ }
+
+ // turn on object mode
+ ReadableSerialOrdered.super_.call(this, {objectMode: true});
+
+ this._start(serialOrdered, list, iterator, sortMethod, callback);
+}
diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js
new file mode 100644
index 0000000..cbea7ad
--- /dev/null
+++ b/node_modules/asynckit/lib/state.js
@@ -0,0 +1,37 @@
+// API
+module.exports = state;
+
+/**
+ * Creates initial state object
+ * for iteration over list
+ *
+ * @param {array|object} list - list to iterate over
+ * @param {function|null} sortMethod - function to use for keys sort,
+ * or `null` to keep them as is
+ * @returns {object} - initial state object
+ */
+function state(list, sortMethod)
+{
+ var isNamedList = !Array.isArray(list)
+ , initState =
+ {
+ index : 0,
+ keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
+ jobs : {},
+ results : isNamedList ? {} : [],
+ size : isNamedList ? Object.keys(list).length : list.length
+ }
+ ;
+
+ if (sortMethod)
+ {
+ // sort array keys based on it's values
+ // sort object's keys just on own merit
+ initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
+ {
+ return sortMethod(list[a], list[b]);
+ });
+ }
+
+ return initState;
+}
diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js
new file mode 100644
index 0000000..f56a1c9
--- /dev/null
+++ b/node_modules/asynckit/lib/streamify.js
@@ -0,0 +1,141 @@
+var async = require('./async.js');
+
+// API
+module.exports = {
+ iterator: wrapIterator,
+ callback: wrapCallback
+};
+
+/**
+ * Wraps iterators with long signature
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} iterator - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapIterator(iterator)
+{
+ var stream = this;
+
+ return function(item, key, cb)
+ {
+ var aborter
+ , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key))
+ ;
+
+ stream.jobs[key] = wrappedCb;
+
+ // it's either shortcut (item, cb)
+ if (iterator.length == 2)
+ {
+ aborter = iterator(item, wrappedCb);
+ }
+ // or long format (item, key, cb)
+ else
+ {
+ aborter = iterator(item, key, wrappedCb);
+ }
+
+ return aborter;
+ };
+}
+
+/**
+ * Wraps provided callback function
+ * allowing to execute snitch function before
+ * real callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - function to wrap
+ * @returns {function} - wrapped function
+ */
+function wrapCallback(callback)
+{
+ var stream = this;
+
+ var wrapped = function(error, result)
+ {
+ return finisher.call(stream, error, result, callback);
+ };
+
+ return wrapped;
+}
+
+/**
+ * Wraps provided iterator callback function
+ * makes sure snitch only called once,
+ * but passes secondary calls to the original callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {function} callback - callback to wrap
+ * @param {number|string} key - iteration key
+ * @returns {function} wrapped callback
+ */
+function wrapIteratorCallback(callback, key)
+{
+ var stream = this;
+
+ return function(error, output)
+ {
+ // don't repeat yourself
+ if (!(key in stream.jobs))
+ {
+ callback(error, output);
+ return;
+ }
+
+ // clean up jobs
+ delete stream.jobs[key];
+
+ return streamer.call(stream, error, {key: key, value: output}, callback);
+ };
+}
+
+/**
+ * Stream wrapper for iterator callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects iterator results
+ */
+function streamer(error, output, callback)
+{
+ if (error && !this.error)
+ {
+ this.error = error;
+ this.pause();
+ this.emit('error', error);
+ // send back value only, as expected
+ callback(error, output && output.value);
+ return;
+ }
+
+ // stream stuff
+ this.push(output);
+
+ // back to original track
+ // send back value only, as expected
+ callback(error, output && output.value);
+}
+
+/**
+ * Stream wrapper for finishing callback
+ *
+ * @this ReadableAsyncKit#
+ * @param {mixed} error - error response
+ * @param {mixed} output - iterator output
+ * @param {function} callback - callback that expects final results
+ */
+function finisher(error, output, callback)
+{
+ // signal end of the stream
+ // only for successfully finished streams
+ if (!error)
+ {
+ this.push(null);
+ }
+
+ // back to original track
+ callback(error, output);
+}
diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js
new file mode 100644
index 0000000..d6eb992
--- /dev/null
+++ b/node_modules/asynckit/lib/terminator.js
@@ -0,0 +1,29 @@
+var abort = require('./abort.js')
+ , async = require('./async.js')
+ ;
+
+// API
+module.exports = terminator;
+
+/**
+ * Terminates jobs in the attached state context
+ *
+ * @this AsyncKitState#
+ * @param {function} callback - final callback to invoke after termination
+ */
+function terminator(callback)
+{
+ if (!Object.keys(this.jobs).length)
+ {
+ return;
+ }
+
+ // fast forward iteration index
+ this.index = this.size;
+
+ // abort jobs
+ abort(this);
+
+ // send back results we have so far
+ async(callback)(null, this.results);
+}
diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json
new file mode 100644
index 0000000..51147d6
--- /dev/null
+++ b/node_modules/asynckit/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "asynckit",
+ "version": "0.4.0",
+ "description": "Minimal async jobs utility library, with streams support",
+ "main": "index.js",
+ "scripts": {
+ "clean": "rimraf coverage",
+ "lint": "eslint *.js lib/*.js test/*.js",
+ "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
+ "win-test": "tape test/test-*.js",
+ "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
+ "report": "istanbul report",
+ "size": "browserify index.js | size-table asynckit",
+ "debug": "tape test/test-*.js"
+ },
+ "pre-commit": [
+ "clean",
+ "lint",
+ "test",
+ "browser",
+ "report",
+ "size"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/alexindigo/asynckit.git"
+ },
+ "keywords": [
+ "async",
+ "jobs",
+ "parallel",
+ "serial",
+ "iterator",
+ "array",
+ "object",
+ "stream",
+ "destroy",
+ "terminate",
+ "abort"
+ ],
+ "author": "Alex Indigo ",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/alexindigo/asynckit/issues"
+ },
+ "homepage": "https://github.com/alexindigo/asynckit#readme",
+ "devDependencies": {
+ "browserify": "^13.0.0",
+ "browserify-istanbul": "^2.0.0",
+ "coveralls": "^2.11.9",
+ "eslint": "^2.9.0",
+ "istanbul": "^0.4.3",
+ "obake": "^0.1.2",
+ "phantomjs-prebuilt": "^2.1.7",
+ "pre-commit": "^1.1.3",
+ "reamde": "^1.1.0",
+ "rimraf": "^2.5.2",
+ "size-table": "^0.2.0",
+ "tap-spec": "^4.1.1",
+ "tape": "^4.5.1"
+ },
+ "dependencies": {}
+}
diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js
new file mode 100644
index 0000000..3c50344
--- /dev/null
+++ b/node_modules/asynckit/parallel.js
@@ -0,0 +1,43 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = parallel;
+
+/**
+ * Runs iterator over provided array elements in parallel
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function parallel(list, iterator, callback)
+{
+ var state = initState(list);
+
+ while (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, function(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ // looks like it's the last one
+ if (Object.keys(state.jobs).length === 0)
+ {
+ callback(null, state.results);
+ return;
+ }
+ });
+
+ state.index++;
+ }
+
+ return terminator.bind(state, callback);
+}
diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js
new file mode 100644
index 0000000..6cd949a
--- /dev/null
+++ b/node_modules/asynckit/serial.js
@@ -0,0 +1,17 @@
+var serialOrdered = require('./serialOrdered.js');
+
+// Public API
+module.exports = serial;
+
+/**
+ * Runs iterator over provided array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serial(list, iterator, callback)
+{
+ return serialOrdered(list, iterator, null, callback);
+}
diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js
new file mode 100644
index 0000000..607eafe
--- /dev/null
+++ b/node_modules/asynckit/serialOrdered.js
@@ -0,0 +1,75 @@
+var iterate = require('./lib/iterate.js')
+ , initState = require('./lib/state.js')
+ , terminator = require('./lib/terminator.js')
+ ;
+
+// Public API
+module.exports = serialOrdered;
+// sorting helpers
+module.exports.ascending = ascending;
+module.exports.descending = descending;
+
+/**
+ * Runs iterator over provided sorted array elements in series
+ *
+ * @param {array|object} list - array or object (named list) to iterate over
+ * @param {function} iterator - iterator to run
+ * @param {function} sortMethod - custom sort function
+ * @param {function} callback - invoked when all elements processed
+ * @returns {function} - jobs terminator
+ */
+function serialOrdered(list, iterator, sortMethod, callback)
+{
+ var state = initState(list, sortMethod);
+
+ iterate(list, iterator, state, function iteratorHandler(error, result)
+ {
+ if (error)
+ {
+ callback(error, result);
+ return;
+ }
+
+ state.index++;
+
+ // are we there yet?
+ if (state.index < (state['keyedList'] || list).length)
+ {
+ iterate(list, iterator, state, iteratorHandler);
+ return;
+ }
+
+ // done here
+ callback(null, state.results);
+ });
+
+ return terminator.bind(state, callback);
+}
+
+/*
+ * -- Sort methods
+ */
+
+/**
+ * sort helper to sort array elements in ascending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function ascending(a, b)
+{
+ return a < b ? -1 : a > b ? 1 : 0;
+}
+
+/**
+ * sort helper to sort array elements in descending order
+ *
+ * @param {mixed} a - an item to compare
+ * @param {mixed} b - an item to compare
+ * @returns {number} - comparison result
+ */
+function descending(a, b)
+{
+ return -1 * ascending(a, b);
+}
diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js
new file mode 100644
index 0000000..d43465f
--- /dev/null
+++ b/node_modules/asynckit/stream.js
@@ -0,0 +1,21 @@
+var inherits = require('util').inherits
+ , Readable = require('stream').Readable
+ , ReadableAsyncKit = require('./lib/readable_asynckit.js')
+ , ReadableParallel = require('./lib/readable_parallel.js')
+ , ReadableSerial = require('./lib/readable_serial.js')
+ , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
+ ;
+
+// API
+module.exports =
+{
+ parallel : ReadableParallel,
+ serial : ReadableSerial,
+ serialOrdered : ReadableSerialOrdered,
+};
+
+inherits(ReadableAsyncKit, Readable);
+
+inherits(ReadableParallel, ReadableAsyncKit);
+inherits(ReadableSerial, ReadableAsyncKit);
+inherits(ReadableSerialOrdered, ReadableAsyncKit);
diff --git a/node_modules/axios/CHANGELOG.md b/node_modules/axios/CHANGELOG.md
new file mode 100644
index 0000000..4301d62
--- /dev/null
+++ b/node_modules/axios/CHANGELOG.md
@@ -0,0 +1,1072 @@
+# Changelog
+
+## [1.7.9](https://github.com/axios/axios/compare/v1.7.8...v1.7.9) (2024-12-04)
+
+
+### Reverts
+
+* Revert "fix(types): export CJS types from ESM (#6218)" (#6729) ([c44d2f2](https://github.com/axios/axios/commit/c44d2f2316ad289b38997657248ba10de11deb6c)), closes [#6218](https://github.com/axios/axios/issues/6218) [#6729](https://github.com/axios/axios/issues/6729)
+
+### Contributors to this release
+
+- [Jay](https://github.com/jasonsaayman "+596/-108 (#6729 )")
+
+## [1.7.8](https://github.com/axios/axios/compare/v1.7.7...v1.7.8) (2024-11-25)
+
+
+### Bug Fixes
+
+* allow passing a callback as paramsSerializer to buildURL ([#6680](https://github.com/axios/axios/issues/6680)) ([eac4619](https://github.com/axios/axios/commit/eac4619fe2e0926e876cd260ee21e3690381dbb5))
+* **core:** fixed config merging bug ([#6668](https://github.com/axios/axios/issues/6668)) ([5d99fe4](https://github.com/axios/axios/commit/5d99fe4491202a6268c71e5dcc09192359d73cea))
+* fixed width form to not shrink after 'Send Request' button is clicked ([#6644](https://github.com/axios/axios/issues/6644)) ([7ccd5fd](https://github.com/axios/axios/commit/7ccd5fd42402102d38712c32707bf055be72ab54))
+* **http:** add support for File objects as payload in http adapter ([#6588](https://github.com/axios/axios/issues/6588)) ([#6605](https://github.com/axios/axios/issues/6605)) ([6841d8d](https://github.com/axios/axios/commit/6841d8d18ddc71cc1bd202ffcfddb3f95622eef3))
+* **http:** fixed proxy-from-env module import ([#5222](https://github.com/axios/axios/issues/5222)) ([12b3295](https://github.com/axios/axios/commit/12b32957f1258aee94ef859809ed39f8f88f9dfa))
+* **http:** use `globalThis.TextEncoder` when available ([#6634](https://github.com/axios/axios/issues/6634)) ([df956d1](https://github.com/axios/axios/commit/df956d18febc9100a563298dfdf0f102c3d15410))
+* ios11 breaks when build ([#6608](https://github.com/axios/axios/issues/6608)) ([7638952](https://github.com/axios/axios/commit/763895270f7b50c7c780c3c9807ae8635de952cd))
+* **types:** add missing types for mergeConfig function ([#6590](https://github.com/axios/axios/issues/6590)) ([00de614](https://github.com/axios/axios/commit/00de614cd07b7149af335e202aef0e076c254f49))
+* **types:** export CJS types from ESM ([#6218](https://github.com/axios/axios/issues/6218)) ([c71811b](https://github.com/axios/axios/commit/c71811b00f2fcff558e4382ba913bdac4ad7200e))
+* updated stream aborted error message to be more clear ([#6615](https://github.com/axios/axios/issues/6615)) ([cc3217a](https://github.com/axios/axios/commit/cc3217a612024d83a663722a56d7a98d8759c6d5))
+* use URL API instead of DOM to fix a potential vulnerability warning; ([#6714](https://github.com/axios/axios/issues/6714)) ([0a8d6e1](https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db))
+
+### Contributors to this release
+
+- [Remco Haszing](https://github.com/remcohaszing "+108/-596 (#6218 )")
+- [Jay](https://github.com/jasonsaayman "+281/-19 (#6640 #6619 )")
+- [Aayush Yadav](https://github.com/aayushyadav020 "+124/-111 (#6617 )")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+12/-65 (#6714 )")
+- [Ell Bradshaw](https://github.com/cincodenada "+29/-0 (#6489 )")
+- [Amit Saini](https://github.com/amitsainii "+13/-3 (#5237 )")
+- [Tommaso Paulon](https://github.com/guuido "+14/-1 (#6680 )")
+- [Akki](https://github.com/Aakash-Rana "+5/-5 (#6668 )")
+- [Sampo Silvennoinen](https://github.com/stscoundrel "+3/-3 (#6633 )")
+- [Kasper Isager Dalsgarð](https://github.com/kasperisager "+2/-2 (#6634 )")
+- [Christian Clauss](https://github.com/cclauss "+4/-0 (#6683 )")
+- [Pavan Welihinda](https://github.com/pavan168 "+2/-2 (#5222 )")
+- [Taylor Flatt](https://github.com/taylorflatt "+2/-2 (#6615 )")
+- [Kenzo Wada](https://github.com/Kenzo-Wada "+2/-2 (#6608 )")
+- [Ngole Lawson](https://github.com/echelonnought "+3/-0 (#6644 )")
+- [Haven](https://github.com/Baoyx007 "+3/-0 (#6590 )")
+- [Shrivali Dutt](https://github.com/shrivalidutt "+1/-1 (#6637 )")
+- [Henco Appel](https://github.com/hencoappel "+1/-1 (#6605 )")
+
+## [1.7.7](https://github.com/axios/axios/compare/v1.7.6...v1.7.7) (2024-08-31)
+
+
+### Bug Fixes
+
+* **fetch:** fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; ([#6584](https://github.com/axios/axios/issues/6584)) ([d198085](https://github.com/axios/axios/commit/d1980854fee1765cd02fa0787adf5d6e34dd9dcf))
+* **http:** fixed support for IPv6 literal strings in url ([#5731](https://github.com/axios/axios/issues/5731)) ([364993f](https://github.com/axios/axios/commit/364993f0d8bc6e0e06f76b8a35d2d0a35cab054c))
+
+### Contributors to this release
+
+- [Rishi556](https://github.com/Rishi556 "+39/-1 (#5731 )")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+27/-7 (#6584 )")
+
+## [1.7.6](https://github.com/axios/axios/compare/v1.7.5...v1.7.6) (2024-08-30)
+
+
+### Bug Fixes
+
+* **fetch:** fix content length calculation for FormData payload; ([#6524](https://github.com/axios/axios/issues/6524)) ([085f568](https://github.com/axios/axios/commit/085f56861a83e9ac02c140ad9d68dac540dfeeaa))
+* **fetch:** optimize signals composing logic; ([#6582](https://github.com/axios/axios/issues/6582)) ([df9889b](https://github.com/axios/axios/commit/df9889b83c2cc37e9e6189675a73ab70c60f031f))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+98/-46 (#6582 )")
+- [Jacques Germishuys](https://github.com/jacquesg "+5/-1 (#6524 )")
+- [kuroino721](https://github.com/kuroino721 "+3/-1 (#6575 )")
+
+## [1.7.5](https://github.com/axios/axios/compare/v1.7.4...v1.7.5) (2024-08-23)
+
+
+### Bug Fixes
+
+* **adapter:** fix undefined reference to hasBrowserEnv ([#6572](https://github.com/axios/axios/issues/6572)) ([7004707](https://github.com/axios/axios/commit/7004707c4180b416341863bd86913fe4fc2f1df1))
+* **core:** add the missed implementation of AxiosError#status property; ([#6573](https://github.com/axios/axios/issues/6573)) ([6700a8a](https://github.com/axios/axios/commit/6700a8adac06942205f6a7a21421ecb36c4e0852))
+* **core:** fix `ReferenceError: navigator is not defined` for custom environments; ([#6567](https://github.com/axios/axios/issues/6567)) ([fed1a4b](https://github.com/axios/axios/commit/fed1a4b2d78ed4a588c84e09d32749ed01dc2794))
+* **fetch:** fix credentials handling in Cloudflare workers ([#6533](https://github.com/axios/axios/issues/6533)) ([550d885](https://github.com/axios/axios/commit/550d885eb90fd156add7b93bbdc54d30d2f9a98d))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+187/-83 (#6573 #6567 #6566 #6564 #6563 #6557 #6556 #6555 #6554 #6552 )")
+- [Antonin Bas](https://github.com/antoninbas "+6/-6 (#6572 )")
+- [Hans Otto Wirtz](https://github.com/hansottowirtz "+4/-1 (#6533 )")
+
+## [1.7.4](https://github.com/axios/axios/compare/v1.7.3...v1.7.4) (2024-08-13)
+
+
+### Bug Fixes
+
+* **sec:** CVE-2024-39338 ([#6539](https://github.com/axios/axios/issues/6539)) ([#6543](https://github.com/axios/axios/issues/6543)) ([6b6b605](https://github.com/axios/axios/commit/6b6b605eaf73852fb2dae033f1e786155959de3a))
+* **sec:** disregard protocol-relative URL to remediate SSRF ([#6539](https://github.com/axios/axios/issues/6539)) ([07a661a](https://github.com/axios/axios/commit/07a661a2a6b9092c4aa640dcc7f724ec5e65bdda))
+
+### Contributors to this release
+
+- [Lev Pachmanov](https://github.com/levpachmanov "+47/-11 (#6543 )")
+- [Đỗ Trọng Hải](https://github.com/hainenber "+49/-4 (#6539 )")
+
+## [1.7.3](https://github.com/axios/axios/compare/v1.7.2...v1.7.3) (2024-08-01)
+
+
+### Bug Fixes
+
+* **adapter:** fix progress event emitting; ([#6518](https://github.com/axios/axios/issues/6518)) ([e3c76fc](https://github.com/axios/axios/commit/e3c76fc9bdd03aa4d98afaf211df943e2031453f))
+* **fetch:** fix withCredentials request config ([#6505](https://github.com/axios/axios/issues/6505)) ([85d4d0e](https://github.com/axios/axios/commit/85d4d0ea0aae91082f04e303dec46510d1b4e787))
+* **xhr:** return original config on errors from XHR adapter ([#6515](https://github.com/axios/axios/issues/6515)) ([8966ee7](https://github.com/axios/axios/commit/8966ee7ea62ecbd6cfb39a905939bcdab5cf6388))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+211/-159 (#6518 #6519 )")
+- [Valerii Sidorenko](https://github.com/ValeraS "+3/-3 (#6515 )")
+- [prianYu](https://github.com/prianyu "+2/-2 (#6505 )")
+
+## [1.7.2](https://github.com/axios/axios/compare/v1.7.1...v1.7.2) (2024-05-21)
+
+
+### Bug Fixes
+
+* **fetch:** enhance fetch API detection; ([#6413](https://github.com/axios/axios/issues/6413)) ([4f79aef](https://github.com/axios/axios/commit/4f79aef81b7c4644328365bfc33acf0a9ef595bc))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+3/-3 (#6413 )")
+
+## [1.7.1](https://github.com/axios/axios/compare/v1.7.0...v1.7.1) (2024-05-20)
+
+
+### Bug Fixes
+
+* **fetch:** fixed ReferenceError issue when TextEncoder is not available in the environment; ([#6410](https://github.com/axios/axios/issues/6410)) ([733f15f](https://github.com/axios/axios/commit/733f15fe5bd2d67e1fadaee82e7913b70d45dc5e))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+14/-9 (#6410 )")
+
+# [1.7.0](https://github.com/axios/axios/compare/v1.7.0-beta.2...v1.7.0) (2024-05-19)
+
+
+### Features
+
+* **adapter:** add fetch adapter; ([#6371](https://github.com/axios/axios/issues/6371)) ([a3ff99b](https://github.com/axios/axios/commit/a3ff99b59d8ec2ab5dd049e68c043617a4072e42))
+
+### Bug Fixes
+
+* **core/axios:** handle un-writable error stack ([#6362](https://github.com/axios/axios/issues/6362)) ([81e0455](https://github.com/axios/axios/commit/81e0455b7b57fbaf2be16a73ebe0e6591cc6d8f9))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+1015/-127 (#6371 )")
+- [Jay](https://github.com/jasonsaayman "+30/-14 ()")
+- [Alexandre ABRIOUX](https://github.com/alexandre-abrioux "+56/-6 (#6362 )")
+
+# [1.7.0-beta.2](https://github.com/axios/axios/compare/v1.7.0-beta.1...v1.7.0-beta.2) (2024-05-19)
+
+
+### Bug Fixes
+
+* **fetch:** capitalize HTTP method names; ([#6395](https://github.com/axios/axios/issues/6395)) ([ad3174a](https://github.com/axios/axios/commit/ad3174a3515c3c2573f4bcb94818d582826f3914))
+* **fetch:** fix & optimize progress capturing for cases when the request data has a nullish value or zero data length ([#6400](https://github.com/axios/axios/issues/6400)) ([95a3e8e](https://github.com/axios/axios/commit/95a3e8e346cfd6a5548e171f2341df3235d0e26b))
+* **fetch:** fix headers getting from a stream response; ([#6401](https://github.com/axios/axios/issues/6401)) ([870e0a7](https://github.com/axios/axios/commit/870e0a76f60d0094774a6a63fa606eec52a381af))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+99/-46 (#6405 #6404 #6401 #6400 #6395 )")
+
+# [1.7.0-beta.1](https://github.com/axios/axios/compare/v1.7.0-beta.0...v1.7.0-beta.1) (2024-05-07)
+
+
+### Bug Fixes
+
+* **core/axios:** handle un-writable error stack ([#6362](https://github.com/axios/axios/issues/6362)) ([81e0455](https://github.com/axios/axios/commit/81e0455b7b57fbaf2be16a73ebe0e6591cc6d8f9))
+* **fetch:** fix cases when ReadableStream or Response.body are not available; ([#6377](https://github.com/axios/axios/issues/6377)) ([d1d359d](https://github.com/axios/axios/commit/d1d359da347704e8b28d768e61515a3e96c5b072))
+* **fetch:** treat fetch-related TypeError as an AxiosError.ERR_NETWORK error; ([#6380](https://github.com/axios/axios/issues/6380)) ([bb5f9a5](https://github.com/axios/axios/commit/bb5f9a5ab768452de9e166dc28d0ffc234245ef1))
+
+### Contributors to this release
+
+- [Alexandre ABRIOUX](https://github.com/alexandre-abrioux "+56/-6 (#6362 )")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+42/-17 (#6380 #6377 )")
+
+# [1.7.0-beta.0](https://github.com/axios/axios/compare/v1.6.8...v1.7.0-beta.0) (2024-04-28)
+
+
+### Features
+
+* **adapter:** add fetch adapter; ([#6371](https://github.com/axios/axios/issues/6371)) ([a3ff99b](https://github.com/axios/axios/commit/a3ff99b59d8ec2ab5dd049e68c043617a4072e42))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+1015/-127 (#6371 )")
+- [Jay](https://github.com/jasonsaayman "+30/-14 ()")
+
+## [1.6.8](https://github.com/axios/axios/compare/v1.6.7...v1.6.8) (2024-03-15)
+
+
+### Bug Fixes
+
+* **AxiosHeaders:** fix AxiosHeaders conversion to an object during config merging ([#6243](https://github.com/axios/axios/issues/6243)) ([2656612](https://github.com/axios/axios/commit/2656612bc10fe2757e9832b708ed773ab340b5cb))
+* **import:** use named export for EventEmitter; ([7320430](https://github.com/axios/axios/commit/7320430aef2e1ba2b89488a0eaf42681165498b1))
+* **vulnerability:** update follow-redirects to 1.15.6 ([#6300](https://github.com/axios/axios/issues/6300)) ([8786e0f](https://github.com/axios/axios/commit/8786e0ff55a8c68d4ca989801ad26df924042e27))
+
+### Contributors to this release
+
+- [Jay](https://github.com/jasonsaayman "+4572/-3446 (#6238 )")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-0 (#6231 )")
+- [Mitchell](https://github.com/Creaous "+9/-9 (#6300 )")
+- [Emmanuel](https://github.com/mannoeu "+2/-2 (#6196 )")
+- [Lucas Keller](https://github.com/ljkeller "+3/-0 (#6194 )")
+- [Aditya Mogili](https://github.com/ADITYA-176 "+1/-1 ()")
+- [Miroslav Petrov](https://github.com/petrovmiroslav "+1/-1 (#6243 )")
+
+## [1.6.7](https://github.com/axios/axios/compare/v1.6.6...v1.6.7) (2024-01-25)
+
+
+### Bug Fixes
+
+* capture async stack only for rejections with native error objects; ([#6203](https://github.com/axios/axios/issues/6203)) ([1a08f90](https://github.com/axios/axios/commit/1a08f90f402336e4d00e9ee82f211c6adb1640b0))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-26 (#6203 )")
+- [zhoulixiang](https://github.com/zh-lx "+0/-3 (#6186 )")
+
+## [1.6.6](https://github.com/axios/axios/compare/v1.6.5...v1.6.6) (2024-01-24)
+
+
+### Bug Fixes
+
+* fixed missed dispatchBeforeRedirect argument ([#5778](https://github.com/axios/axios/issues/5778)) ([a1938ff](https://github.com/axios/axios/commit/a1938ff073fcb0f89011f001dfbc1fa1dc995e39))
+* wrap errors to improve async stack trace ([#5987](https://github.com/axios/axios/issues/5987)) ([123f354](https://github.com/axios/axios/commit/123f354b920f154a209ea99f76b7b2ef3d9ebbab))
+
+### Contributors to this release
+
+- [Ilya Priven](https://github.com/ikonst "+91/-8 (#5987 )")
+- [Zao Soula](https://github.com/zaosoula "+6/-6 (#5778 )")
+
+## [1.6.5](https://github.com/axios/axios/compare/v1.6.4...v1.6.5) (2024-01-05)
+
+
+### Bug Fixes
+
+* **ci:** refactor notify action as a job of publish action; ([#6176](https://github.com/axios/axios/issues/6176)) ([0736f95](https://github.com/axios/axios/commit/0736f95ce8776366dc9ca569f49ba505feb6373c))
+* **dns:** fixed lookup error handling; ([#6175](https://github.com/axios/axios/issues/6175)) ([f4f2b03](https://github.com/axios/axios/commit/f4f2b039dd38eb4829e8583caede4ed6d2dd59be))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+41/-6 (#6176 #6175 )")
+- [Jay](https://github.com/jasonsaayman "+6/-1 ()")
+
+## [1.6.4](https://github.com/axios/axios/compare/v1.6.3...v1.6.4) (2024-01-03)
+
+
+### Bug Fixes
+
+* **security:** fixed formToJSON prototype pollution vulnerability; ([#6167](https://github.com/axios/axios/issues/6167)) ([3c0c11c](https://github.com/axios/axios/commit/3c0c11cade045c4412c242b5727308cff9897a0e))
+* **security:** fixed security vulnerability in follow-redirects ([#6163](https://github.com/axios/axios/issues/6163)) ([75af1cd](https://github.com/axios/axios/commit/75af1cdff5b3a6ca3766d3d3afbc3115bb0811b8))
+
+### Contributors to this release
+
+- [Jay](https://github.com/jasonsaayman "+34/-6 ()")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+34/-3 (#6172 #6167 )")
+- [Guy Nesher](https://github.com/gnesher "+10/-10 (#6163 )")
+
+## [1.6.3](https://github.com/axios/axios/compare/v1.6.2...v1.6.3) (2023-12-26)
+
+
+### Bug Fixes
+
+* Regular Expression Denial of Service (ReDoS) ([#6132](https://github.com/axios/axios/issues/6132)) ([5e7ad38](https://github.com/axios/axios/commit/5e7ad38fb0f819fceb19fb2ee5d5d38f56aa837d))
+
+### Contributors to this release
+
+- [Jay](https://github.com/jasonsaayman "+15/-6 (#6145 )")
+- [Willian Agostini](https://github.com/WillianAgostini "+17/-2 (#6132 )")
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+3/-0 (#6084 )")
+
+## [1.6.2](https://github.com/axios/axios/compare/v1.6.1...v1.6.2) (2023-11-14)
+
+
+### Features
+
+* **withXSRFToken:** added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ([#6046](https://github.com/axios/axios/issues/6046)) ([cff9967](https://github.com/axios/axios/commit/cff996779b272a5e94c2b52f5503ccf668bc42dc))
+
+### PRs
+- feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) )
+```
+
+📢 This PR added 'withXSRFToken' option as a replacement for old withCredentials behaviour.
+You should now use withXSRFToken along with withCredential to get the old behavior.
+This functionality is considered as a fix.
+```
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+271/-146 (#6081 #6080 #6079 #6078 #6046 #6064 #6063 )")
+- [Ng Choon Khon (CK)](https://github.com/ckng0221 "+4/-4 (#6073 )")
+- [Muhammad Noman](https://github.com/mnomanmemon "+2/-2 (#6048 )")
+
+## [1.6.1](https://github.com/axios/axios/compare/v1.6.0...v1.6.1) (2023-11-08)
+
+
+### Bug Fixes
+
+* **formdata:** fixed content-type header normalization for non-standard browser environments; ([#6056](https://github.com/axios/axios/issues/6056)) ([dd465ab](https://github.com/axios/axios/commit/dd465ab22bbfa262c6567be6574bf46a057d5288))
+* **platform:** fixed emulated browser detection in node.js environment; ([#6055](https://github.com/axios/axios/issues/6055)) ([3dc8369](https://github.com/axios/axios/commit/3dc8369e505e32a4e12c22f154c55fd63ac67fbb))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+432/-65 (#6059 #6056 #6055 )")
+- [Fabian Meyer](https://github.com/meyfa "+5/-2 (#5835 )")
+
+### PRs
+- feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) )
+```
+
+📢 This PR added 'withXSRFToken' option as a replacement for old withCredentials behaviour.
+You should now use withXSRFToken along with withCredential to get the old behavior.
+This functionality is considered as a fix.
+```
+
+# [1.6.0](https://github.com/axios/axios/compare/v1.5.1...v1.6.0) (2023-10-26)
+
+
+### Bug Fixes
+
+* **CSRF:** fixed CSRF vulnerability CVE-2023-45857 ([#6028](https://github.com/axios/axios/issues/6028)) ([96ee232](https://github.com/axios/axios/commit/96ee232bd3ee4de2e657333d4d2191cd389e14d0))
+* **dns:** fixed lookup function decorator to work properly in node v20; ([#6011](https://github.com/axios/axios/issues/6011)) ([5aaff53](https://github.com/axios/axios/commit/5aaff532a6b820bb9ab6a8cd0f77131b47e2adb8))
+* **types:** fix AxiosHeaders types; ([#5931](https://github.com/axios/axios/issues/5931)) ([a1c8ad0](https://github.com/axios/axios/commit/a1c8ad008b3c13d53e135bbd0862587fb9d3fc09))
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+449/-114 (#6032 #6021 #6011 #5932 #5931 )")
+- [Valentin Panov](https://github.com/valentin-panov "+4/-4 (#6028 )")
+- [Rinku Chaudhari](https://github.com/therealrinku "+1/-1 (#5889 )")
+
+## [1.5.1](https://github.com/axios/axios/compare/v1.5.0...v1.5.1) (2023-09-26)
+
+
+### Bug Fixes
+
+* **adapters:** improved adapters loading logic to have clear error messages; ([#5919](https://github.com/axios/axios/issues/5919)) ([e410779](https://github.com/axios/axios/commit/e4107797a7a1376f6209fbecfbbce73d3faa7859))
+* **formdata:** fixed automatic addition of the `Content-Type` header for FormData in non-browser environments; ([#5917](https://github.com/axios/axios/issues/5917)) ([bc9af51](https://github.com/axios/axios/commit/bc9af51b1886d1b3529617702f2a21a6c0ed5d92))
+* **headers:** allow `content-encoding` header to handle case-insensitive values ([#5890](https://github.com/axios/axios/issues/5890)) ([#5892](https://github.com/axios/axios/issues/5892)) ([4c89f25](https://github.com/axios/axios/commit/4c89f25196525e90a6e75eda9cb31ae0a2e18acd))
+* **types:** removed duplicated code ([9e62056](https://github.com/axios/axios/commit/9e6205630e1c9cf863adf141c0edb9e6d8d4b149))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+89/-18 (#5919 #5917 )")
+- [David Dallas](https://github.com/DavidJDallas "+11/-5 ()")
+- [Sean Sattler](https://github.com/fb-sean "+2/-8 ()")
+- [Mustafa Ateş Uzun](https://github.com/0o001 "+4/-4 ()")
+- [Przemyslaw Motacki](https://github.com/sfc-gh-pmotacki "+2/-1 (#5892 )")
+- [Michael Di Prisco](https://github.com/Cadienvan "+1/-1 ()")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+# [1.5.0](https://github.com/axios/axios/compare/v1.4.0...v1.5.0) (2023-08-26)
+
+
+### Bug Fixes
+
+* **adapter:** make adapter loading error more clear by using platform-specific adapters explicitly ([#5837](https://github.com/axios/axios/issues/5837)) ([9a414bb](https://github.com/axios/axios/commit/9a414bb6c81796a95c6c7fe668637825458e8b6d))
+* **dns:** fixed `cacheable-lookup` integration; ([#5836](https://github.com/axios/axios/issues/5836)) ([b3e327d](https://github.com/axios/axios/commit/b3e327dcc9277bdce34c7ef57beedf644b00d628))
+* **headers:** added support for setting header names that overlap with class methods; ([#5831](https://github.com/axios/axios/issues/5831)) ([d8b4ca0](https://github.com/axios/axios/commit/d8b4ca0ea5f2f05efa4edfe1e7684593f9f68273))
+* **headers:** fixed common Content-Type header merging; ([#5832](https://github.com/axios/axios/issues/5832)) ([8fda276](https://github.com/axios/axios/commit/8fda2766b1e6bcb72c3fabc146223083ef13ce17))
+
+
+### Features
+
+* export getAdapter function ([#5324](https://github.com/axios/axios/issues/5324)) ([ca73eb8](https://github.com/axios/axios/commit/ca73eb878df0ae2dace81fe3a7f1fb5986231bf1))
+* **export:** export adapters without `unsafe` prefix ([#5839](https://github.com/axios/axios/issues/5839)) ([1601f4a](https://github.com/axios/axios/commit/1601f4a27a81ab47fea228f1e244b2c4e3ce28bf))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+66/-29 (#5839 #5837 #5836 #5832 #5831 )")
+- [夜葬](https://github.com/geekact "+42/-0 (#5324 )")
+- [Jonathan Budiman](https://github.com/JBudiman00 "+30/-0 (#5788 )")
+- [Michael Di Prisco](https://github.com/Cadienvan "+3/-5 (#5791 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+# [1.4.0](https://github.com/axios/axios/compare/v1.3.6...v1.4.0) (2023-04-27)
+
+
+### Bug Fixes
+
+* **formdata:** add `multipart/form-data` content type for FormData payload on custom client environments; ([#5678](https://github.com/axios/axios/issues/5678)) ([bbb61e7](https://github.com/axios/axios/commit/bbb61e70cb1185adfb1cbbb86eaf6652c48d89d1))
+* **package:** export package internals with unsafe path prefix; ([#5677](https://github.com/axios/axios/issues/5677)) ([df38c94](https://github.com/axios/axios/commit/df38c949f26414d88ba29ec1e353c4d4f97eaf09))
+
+
+### Features
+
+* **dns:** added support for a custom lookup function; ([#5339](https://github.com/axios/axios/issues/5339)) ([2701911](https://github.com/axios/axios/commit/2701911260a1faa5cc5e1afe437121b330a3b7bb))
+* **types:** export `AxiosHeaderValue` type. ([#5525](https://github.com/axios/axios/issues/5525)) ([726f1c8](https://github.com/axios/axios/commit/726f1c8e00cffa0461a8813a9bdcb8f8b9d762cf))
+
+
+### Performance Improvements
+
+* **merge-config:** optimize mergeConfig performance by avoiding duplicate key visits; ([#5679](https://github.com/axios/axios/issues/5679)) ([e6f7053](https://github.com/axios/axios/commit/e6f7053bf1a3e87cf1f9da8677e12e3fe829d68e))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+151/-16 (#5684 #5339 #5679 #5678 #5677 )")
+- [Arthur Fiorette](https://github.com/arthurfiorette "+19/-19 (#5525 )")
+- [PIYUSH NEGI](https://github.com/npiyush97 "+2/-18 (#5670 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.6](https://github.com/axios/axios/compare/v1.3.5...v1.3.6) (2023-04-19)
+
+
+### Bug Fixes
+
+* **types:** added transport to RawAxiosRequestConfig ([#5445](https://github.com/axios/axios/issues/5445)) ([6f360a2](https://github.com/axios/axios/commit/6f360a2531d8d70363fd9becef6a45a323f170e2))
+* **utils:** make isFormData detection logic stricter to avoid unnecessary calling of the `toString` method on the target; ([#5661](https://github.com/axios/axios/issues/5661)) ([aa372f7](https://github.com/axios/axios/commit/aa372f7306295dfd1100c1c2c77ce95c95808e76))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+48/-10 (#5665 #5661 #5663 )")
+- [Michael Di Prisco](https://github.com/Cadienvan "+2/-0 (#5445 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.5](https://github.com/axios/axios/compare/v1.3.4...v1.3.5) (2023-04-05)
+
+
+### Bug Fixes
+
+* **headers:** fixed isValidHeaderName to support full list of allowed characters; ([#5584](https://github.com/axios/axios/issues/5584)) ([e7decef](https://github.com/axios/axios/commit/e7decef6a99f4627e27ed9ea5b00ce8e201c3841))
+* **params:** re-added the ability to set the function as `paramsSerializer` config; ([#5633](https://github.com/axios/axios/issues/5633)) ([a56c866](https://github.com/axios/axios/commit/a56c8661209d5ce5a645a05f294a0e08a6c1f6b3))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+28/-10 (#5633 #5584 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.4](https://github.com/axios/axios/compare/v1.3.3...v1.3.4) (2023-02-22)
+
+
+### Bug Fixes
+
+* **blob:** added a check to make sure the Blob class is available in the browser's global scope; ([#5548](https://github.com/axios/axios/issues/5548)) ([3772c8f](https://github.com/axios/axios/commit/3772c8fe74112a56e3e9551f894d899bc3a9443a))
+* **http:** fixed regression bug when handling synchronous errors inside the adapter; ([#5564](https://github.com/axios/axios/issues/5564)) ([a3b246c](https://github.com/axios/axios/commit/a3b246c9de5c3bc4b5a742e15add55b375479451))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+38/-26 (#5564 )")
+- [lcysgsg](https://github.com/lcysgsg "+4/-0 (#5548 )")
+- [Michael Di Prisco](https://github.com/Cadienvan "+3/-0 (#5444 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13)
+
+
+### Bug Fixes
+
+* **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d))
+* **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1))
+* **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+11/-7 (#5545 #5535 #5542 )")
+- [陈若枫](https://github.com/ruofee "+2/-2 (#5467 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03)
+
+
+### Bug Fixes
+
+* **http:** treat http://localhost as base URL for relative paths to avoid `ERR_INVALID_URL` error; ([#5528](https://github.com/axios/axios/issues/5528)) ([128d56f](https://github.com/axios/axios/commit/128d56f4a0fb8f5f2ed6e0dd80bc9225fee9538c))
+* **http:** use explicit import instead of TextEncoder global; ([#5530](https://github.com/axios/axios/issues/5530)) ([6b3c305](https://github.com/axios/axios/commit/6b3c305fc40c56428e0afabedc6f4d29c2830f6f))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+2/-1 (#5530 #5528 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.3.1](https://github.com/axios/axios/compare/v1.3.0...v1.3.1) (2023-02-01)
+
+
+### Bug Fixes
+
+* **formdata:** add hotfix to use the asynchronous API to compute the content-length header value; ([#5521](https://github.com/axios/axios/issues/5521)) ([96d336f](https://github.com/axios/axios/commit/96d336f527619f21da012fe1f117eeb53e5a2120))
+* **serializer:** fixed serialization of array-like objects; ([#5518](https://github.com/axios/axios/issues/5518)) ([08104c0](https://github.com/axios/axios/commit/08104c028c0f9353897b1b6691d74c440fd0c32d))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+27/-8 (#5521 #5518 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+# [1.3.0](https://github.com/axios/axios/compare/v1.2.6...v1.3.0) (2023-01-31)
+
+
+### Bug Fixes
+
+* **headers:** fixed & optimized clear method; ([#5507](https://github.com/axios/axios/issues/5507)) ([9915635](https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959))
+* **http:** add zlib headers if missing ([#5497](https://github.com/axios/axios/issues/5497)) ([65e8d1e](https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c))
+
+
+### Features
+
+* **fomdata:** added support for spec-compliant FormData & Blob types; ([#5316](https://github.com/axios/axios/issues/5316)) ([6ac574e](https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953))
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+352/-67 (#5514 #5512 #5510 #5509 #5508 #5316 #5507 )")
+- [ItsNotGoodName](https://github.com/ItsNotGoodName "+43/-2 (#5497 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.6](https://github.com/axios/axios/compare/v1.2.5...v1.2.6) (2023-01-28)
+
+
+### Bug Fixes
+
+* **headers:** added missed Authorization accessor; ([#5502](https://github.com/axios/axios/issues/5502)) ([342c0ba](https://github.com/axios/axios/commit/342c0ba9a16ea50f5ed7d2366c5c1a2c877e3f26))
+* **types:** fixed `CommonRequestHeadersList` & `CommonResponseHeadersList` types to be private in commonJS; ([#5503](https://github.com/axios/axios/issues/5503)) ([5a3d0a3](https://github.com/axios/axios/commit/5a3d0a3234d77361a1bc7cedee2da1e11df08e2c))
+
+### Contributors to this release
+
+-  [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+24/-9 (#5503 #5502 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.5](https://github.com/axios/axios/compare/v1.2.4...v1.2.5) (2023-01-26)
+
+
+### Bug Fixes
+
+* **types:** fixed AxiosHeaders to handle spread syntax by making all methods non-enumerable; ([#5499](https://github.com/axios/axios/issues/5499)) ([580f1e8](https://github.com/axios/axios/commit/580f1e8033a61baa38149d59fd16019de3932c22))
+
+### Contributors to this release
+
+-  [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+82/-54 (#5499 )")
+-  [Elliot Ford](https://github.com/EFord36 "+1/-1 (#5462 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.4](https://github.com/axios/axios/compare/v1.2.3...v1.2.4) (2023-01-22)
+
+
+### Bug Fixes
+
+* **types:** renamed `RawAxiosRequestConfig` back to `AxiosRequestConfig`; ([#5486](https://github.com/axios/axios/issues/5486)) ([2a71f49](https://github.com/axios/axios/commit/2a71f49bc6c68495fa419003a3107ed8bd703ad0))
+* **types:** fix `AxiosRequestConfig` generic; ([#5478](https://github.com/axios/axios/issues/5478)) ([9bce81b](https://github.com/axios/axios/commit/186ea062da8b7d578ae78b1a5c220986b9bce81b))
+
+### Contributors to this release
+
+-  [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+242/-108 (#5486 #5482 )")
+-  [Daniel Hillmann](https://github.com/hilleer "+1/-1 (#5478 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.3](https://github.com/axios/axios/compare/1.2.2...1.2.3) (2023-01-10)
+
+
+### Bug Fixes
+
+* **types:** fixed AxiosRequestConfig header interface by refactoring it to RawAxiosRequestConfig; ([#5420](https://github.com/axios/axios/issues/5420)) ([0811963](https://github.com/axios/axios/commit/08119634a22f1d5b19f5c9ea0adccb6d3eebc3bc))
+
+### Contributors to this release
+
+-  [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+938/-442 (#5456 #5455 #5453 #5451 #5449 #5447 #5446 #5443 #5442 #5439 #5420 )")
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.2] - 2022-12-29
+
+### Fixed
+- fix(ci): fix release script inputs [#5392](https://github.com/axios/axios/pull/5392)
+- fix(ci): prerelease scipts [#5377](https://github.com/axios/axios/pull/5377)
+- fix(ci): release scripts [#5376](https://github.com/axios/axios/pull/5376)
+- fix(ci): typescript tests [#5375](https://github.com/axios/axios/pull/5375)
+- fix: Brotli decompression [#5353](https://github.com/axios/axios/pull/5353)
+- fix: add missing HttpStatusCode [#5345](https://github.com/axios/axios/pull/5345)
+
+### Chores
+- chore(ci): set conventional-changelog header config [#5406](https://github.com/axios/axios/pull/5406)
+- chore(ci): fix automatic contributors resolving [#5403](https://github.com/axios/axios/pull/5403)
+- chore(ci): improved logging for the contributors list generator [#5398](https://github.com/axios/axios/pull/5398)
+- chore(ci): fix release action [#5397](https://github.com/axios/axios/pull/5397)
+- chore(ci): fix version bump script by adding bump argument for target version [#5393](https://github.com/axios/axios/pull/5393)
+- chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 [#5342](https://github.com/axios/axios/pull/5342)
+- chore(ci): GitHub Actions Release script [#5384](https://github.com/axios/axios/pull/5384)
+- chore(ci): release scripts [#5364](https://github.com/axios/axios/pull/5364)
+
+### Contributors to this release
+-  [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+-  [Winnie](https://github.com/winniehell)
+
+## [1.2.1] - 2022-12-05
+
+### Changed
+- feat(exports): export mergeConfig [#5151](https://github.com/axios/axios/pull/5151)
+
+### Fixed
+- fix(CancelledError): include config [#4922](https://github.com/axios/axios/pull/4922)
+- fix(general): removing multiple/trailing/leading whitespace [#5022](https://github.com/axios/axios/pull/5022)
+- fix(headers): decompression for responses without Content-Length header [#5306](https://github.com/axios/axios/pull/5306)
+- fix(webWorker): exception to sending form data in web worker [#5139](https://github.com/axios/axios/pull/5139)
+
+### Refactors
+- refactor(types): AxiosProgressEvent.event type to any [#5308](https://github.com/axios/axios/pull/5308)
+- refactor(types): add missing types for static AxiosError.from method [#4956](https://github.com/axios/axios/pull/4956)
+
+### Chores
+- chore(docs): remove README link to non-existent upgrade guide [#5307](https://github.com/axios/axios/pull/5307)
+- chore(docs): typo in issue template name [#5159](https://github.com/axios/axios/pull/5159)
+
+### Contributors to this release
+
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+- [Zachary Lysobey](https://github.com/zachlysobey)
+- [Kevin Ennis](https://github.com/kevincennis)
+- [Philipp Loose](https://github.com/phloose)
+- [secondl1ght](https://github.com/secondl1ght)
+- [wenzheng](https://github.com/0x30)
+- [Ivan Barsukov](https://github.com/ovarn)
+- [Arthur Fiorette](https://github.com/arthurfiorette)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.2.0] - 2022-11-10
+
+### Changed
+
+- changed: refactored module exports [#5162](https://github.com/axios/axios/pull/5162)
+- change: re-added support for loading Axios with require('axios').default [#5225](https://github.com/axios/axios/pull/5225)
+
+### Fixed
+
+- fix: improve AxiosHeaders class [#5224](https://github.com/axios/axios/pull/5224)
+- fix: TypeScript type definitions for commonjs [#5196](https://github.com/axios/axios/pull/5196)
+- fix: type definition of use method on AxiosInterceptorManager to match the the README [#5071](https://github.com/axios/axios/pull/5071)
+- fix: __dirname is not defined in the sandbox [#5269](https://github.com/axios/axios/pull/5269)
+- fix: AxiosError.toJSON method to avoid circular references [#5247](https://github.com/axios/axios/pull/5247)
+- fix: Z_BUF_ERROR when content-encoding is set but the response body is empty [#5250](https://github.com/axios/axios/pull/5250)
+
+### Refactors
+- refactor: allowing adapters to be loaded by name [#5277](https://github.com/axios/axios/pull/5277)
+
+### Chores
+
+- chore: force CI restart [#5243](https://github.com/axios/axios/pull/5243)
+- chore: update ECOSYSTEM.md [#5077](https://github.com/axios/axios/pull/5077)
+- chore: update get/index.html [#5116](https://github.com/axios/axios/pull/5116)
+- chore: update Sandbox UI/UX [#5205](https://github.com/axios/axios/pull/5205)
+- chore:(actions): remove git credentials after checkout [#5235](https://github.com/axios/axios/pull/5235)
+- chore(actions): bump actions/dependency-review-action from 2 to 3 [#5266](https://github.com/axios/axios/pull/5266)
+- chore(packages): bump loader-utils from 1.4.1 to 1.4.2 [#5295](https://github.com/axios/axios/pull/5295)
+- chore(packages): bump engine.io from 6.2.0 to 6.2.1 [#5294](https://github.com/axios/axios/pull/5294)
+- chore(packages): bump socket.io-parser from 4.0.4 to 4.0.5 [#5241](https://github.com/axios/axios/pull/5241)
+- chore(packages): bump loader-utils from 1.4.0 to 1.4.1 [#5245](https://github.com/axios/axios/pull/5245)
+- chore(docs): update Resources links in README [#5119](https://github.com/axios/axios/pull/5119)
+- chore(docs): update the link for JSON url [#5265](https://github.com/axios/axios/pull/5265)
+- chore(docs): fix broken links [#5218](https://github.com/axios/axios/pull/5218)
+- chore(docs): update and rename UPGRADE_GUIDE.md to MIGRATION_GUIDE.md [#5170](https://github.com/axios/axios/pull/5170)
+- chore(docs): typo fix line #856 and #920 [#5194](https://github.com/axios/axios/pull/5194)
+- chore(docs): typo fix #800 [#5193](https://github.com/axios/axios/pull/5193)
+- chore(docs): fix typos [#5184](https://github.com/axios/axios/pull/5184)
+- chore(docs): fix punctuation in README.md [#5197](https://github.com/axios/axios/pull/5197)
+- chore(docs): update readme in the Handling Errors section - issue reference #5260 [#5261](https://github.com/axios/axios/pull/5261)
+- chore: remove \b from filename [#5207](https://github.com/axios/axios/pull/5207)
+- chore(docs): update CHANGELOG.md [#5137](https://github.com/axios/axios/pull/5137)
+- chore: add sideEffects false to package.json [#5025](https://github.com/axios/axios/pull/5025)
+
+### Contributors to this release
+
+- [Maddy Miller](https://github.com/me4502)
+- [Amit Saini](https://github.com/amitsainii)
+- [ecyrbe](https://github.com/ecyrbe)
+- [Ikko Ashimine](https://github.com/eltociear)
+- [Geeth Gunnampalli](https://github.com/thetechie7)
+- [Shreem Asati](https://github.com/shreem-123)
+- [Frieder Bluemle](https://github.com/friederbluemle)
+- [윤세영](https://github.com/yunseyeong)
+- [Claudio Busatto](https://github.com/cjcbusatto)
+- [Remco Haszing](https://github.com/remcohaszing)
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+- [Csaba Maulis](https://github.com/om4csaba)
+- [MoPaMo](https://github.com/MoPaMo)
+- [Daniel Fjeldstad](https://github.com/w3bdesign)
+- [Adrien Brunet](https://github.com/adrien-may)
+- [Frazer Smith](https://github.com/Fdawgs)
+- [HaiTao](https://github.com/836334258)
+- [AZM](https://github.com/aziyatali)
+- [relbns](https://github.com/relbns)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.1.3] - 2022-10-15
+
+### Added
+
+- Added custom params serializer support [#5113](https://github.com/axios/axios/pull/5113)
+
+### Fixed
+
+- Fixed top-level export to keep them in-line with static properties [#5109](https://github.com/axios/axios/pull/5109)
+- Stopped including null values to query string. [#5108](https://github.com/axios/axios/pull/5108)
+- Restored proxy config backwards compatibility with 0.x [#5097](https://github.com/axios/axios/pull/5097)
+- Added back AxiosHeaders in AxiosHeaderValue [#5103](https://github.com/axios/axios/pull/5103)
+- Pin CDN install instructions to a specific version [#5060](https://github.com/axios/axios/pull/5060)
+- Handling of array values fixed for AxiosHeaders [#5085](https://github.com/axios/axios/pull/5085)
+
+### Chores
+
+- docs: match badge style, add link to them [#5046](https://github.com/axios/axios/pull/5046)
+- chore: fixing comments typo [#5054](https://github.com/axios/axios/pull/5054)
+- chore: update issue template [#5061](https://github.com/axios/axios/pull/5061)
+- chore: added progress capturing section to the docs; [#5084](https://github.com/axios/axios/pull/5084)
+
+### Contributors to this release
+
+- [Jason Saayman](https://github.com/jasonsaayman)
+- [scarf](https://github.com/scarf005)
+- [Lenz Weber-Tronic](https://github.com/phryneas)
+- [Arvindh](https://github.com/itsarvindh)
+- [Félix Legrelle](https://github.com/FelixLgr)
+- [Patrick Petrovic](https://github.com/ppati000)
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+- [littledian](https://github.com/littledian)
+- [ChronosMasterOfAllTime](https://github.com/ChronosMasterOfAllTime)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.1.2] - 2022-10-07
+
+### Fixed
+
+- Fixed broken exports for UMD builds.
+
+### Contributors to this release
+
+- [Jason Saayman](https://github.com/jasonsaayman)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.1.1] - 2022-10-07
+
+### Fixed
+
+- Fixed broken exports for common js. This fix breaks a prior fix, I will fix both issues ASAP but the commonJS use is more impactful.
+
+### Contributors to this release
+
+- [Jason Saayman](https://github.com/jasonsaayman)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.1.0] - 2022-10-06
+
+### Fixed
+
+- Fixed missing exports in type definition index.d.ts [#5003](https://github.com/axios/axios/pull/5003)
+- Fixed query params composing [#5018](https://github.com/axios/axios/pull/5018)
+- Fixed GenericAbortSignal interface by making it more generic [#5021](https://github.com/axios/axios/pull/5021)
+- Fixed adding "clear" to AxiosInterceptorManager [#5010](https://github.com/axios/axios/pull/5010)
+- Fixed commonjs & umd exports [#5030](https://github.com/axios/axios/pull/5030)
+- Fixed inability to access response headers when using axios 1.x with Jest [#5036](https://github.com/axios/axios/pull/5036)
+
+### Contributors to this release
+
+- [Trim21](https://github.com/trim21)
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+- [shingo.sasaki](https://github.com/s-sasaki-0529)
+- [Ivan Pepelko](https://github.com/ivanpepelko)
+- [Richard Kořínek](https://github.com/risa)
+
+### PRs
+- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) )
+```
+
+⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459
+```
+
+## [1.0.0] - 2022-10-04
+
+### Added
+
+- Added stack trace to AxiosError [#4624](https://github.com/axios/axios/pull/4624)
+- Add AxiosError to AxiosStatic [#4654](https://github.com/axios/axios/pull/4654)
+- Replaced Rollup as our build runner [#4596](https://github.com/axios/axios/pull/4596)
+- Added generic TS types for the exposed toFormData helper [#4668](https://github.com/axios/axios/pull/4668)
+- Added listen callback function [#4096](https://github.com/axios/axios/pull/4096)
+- Added instructions for installing using PNPM [#4207](https://github.com/axios/axios/pull/4207)
+- Added generic AxiosAbortSignal TS interface to avoid importing AbortController polyfill [#4229](https://github.com/axios/axios/pull/4229)
+- Added axios-url-template in ECOSYSTEM.md [#4238](https://github.com/axios/axios/pull/4238)
+- Added a clear() function to the request and response interceptors object so a user can ensure that all interceptors have been removed from an axios instance [#4248](https://github.com/axios/axios/pull/4248)
+- Added react hook plugin [#4319](https://github.com/axios/axios/pull/4319)
+- Adding HTTP status code for transformResponse [#4580](https://github.com/axios/axios/pull/4580)
+- Added blob to the list of protocols supported by the browser [#4678](https://github.com/axios/axios/pull/4678)
+- Resolving proxy from env on redirect [#4436](https://github.com/axios/axios/pull/4436)
+- Added enhanced toFormData implementation with additional options [4704](https://github.com/axios/axios/pull/4704)
+- Adding Canceler parameters config and request [#4711](https://github.com/axios/axios/pull/4711)
+- Added automatic payload serialization to application/x-www-form-urlencoded [#4714](https://github.com/axios/axios/pull/4714)
+- Added the ability for webpack users to overwrite built-ins [#4715](https://github.com/axios/axios/pull/4715)
+- Added string[] to AxiosRequestHeaders type [#4322](https://github.com/axios/axios/pull/4322)
+- Added the ability for the url-encoded-form serializer to respect the formSerializer config [#4721](https://github.com/axios/axios/pull/4721)
+- Added isCancel type assert [#4293](https://github.com/axios/axios/pull/4293)
+- Added data URL support for node.js [#4725](https://github.com/axios/axios/pull/4725)
+- Adding types for progress event callbacks [#4675](https://github.com/axios/axios/pull/4675)
+- URL params serializer [#4734](https://github.com/axios/axios/pull/4734)
+- Added axios.formToJSON method [#4735](https://github.com/axios/axios/pull/4735)
+- Bower platform add data protocol [#4804](https://github.com/axios/axios/pull/4804)
+- Use WHATWG URL API instead of url.parse() [#4852](https://github.com/axios/axios/pull/4852)
+- Add ENUM containing Http Status Codes to typings [#4903](https://github.com/axios/axios/pull/4903)
+- Improve typing of timeout in index.d.ts [#4934](https://github.com/axios/axios/pull/4934)
+
+### Changed
+
+- Updated AxiosError.config to be optional in the type definition [#4665](https://github.com/axios/axios/pull/4665)
+- Updated README emphasizing the URLSearchParam built-in interface over other solutions [#4590](https://github.com/axios/axios/pull/4590)
+- Include request and config when creating a CanceledError instance [#4659](https://github.com/axios/axios/pull/4659)
+- Changed func-names eslint rule to as-needed [#4492](https://github.com/axios/axios/pull/4492)
+- Replacing deprecated substr() with slice() as substr() is deprecated [#4468](https://github.com/axios/axios/pull/4468)
+- Updating HTTP links in README.md to use HTTPS [#4387](https://github.com/axios/axios/pull/4387)
+- Updated to a better trim() polyfill [#4072](https://github.com/axios/axios/pull/4072)
+- Updated types to allow specifying partial default headers on instance create [#4185](https://github.com/axios/axios/pull/4185)
+- Expanded isAxiosError types [#4344](https://github.com/axios/axios/pull/4344)
+- Updated type definition for axios instance methods [#4224](https://github.com/axios/axios/pull/4224)
+- Updated eslint config [#4722](https://github.com/axios/axios/pull/4722)
+- Updated Docs [#4742](https://github.com/axios/axios/pull/4742)
+- Refactored Axios to use ES2017 [#4787](https://github.com/axios/axios/pull/4787)
+
+
+### Deprecated
+- There are multiple deprecations, refactors and fixes provided in this release. Please read through the full release notes to see how this may impact your project and use case.
+
+### Removed
+
+- Removed incorrect argument for NetworkError constructor [#4656](https://github.com/axios/axios/pull/4656)
+- Removed Webpack [#4596](https://github.com/axios/axios/pull/4596)
+- Removed function that transform arguments to array [#4544](https://github.com/axios/axios/pull/4544)
+
+### Fixed
+
+- Fixed grammar in README [#4649](https://github.com/axios/axios/pull/4649)
+- Fixed code error in README [#4599](https://github.com/axios/axios/pull/4599)
+- Optimized the code that checks cancellation [#4587](https://github.com/axios/axios/pull/4587)
+- Fix url pointing to defaults.js in README [#4532](https://github.com/axios/axios/pull/4532)
+- Use type alias instead of interface for AxiosPromise [#4505](https://github.com/axios/axios/pull/4505)
+- Fix some word spelling and lint style in code comments [#4500](https://github.com/axios/axios/pull/4500)
+- Edited readme with 3 updated browser icons of Chrome, FireFox and Safari [#4414](https://github.com/axios/axios/pull/4414)
+- Bump follow-redirects from 1.14.9 to 1.15.0 [#4673](https://github.com/axios/axios/pull/4673)
+- Fixing http tests to avoid hanging when assertions fail [#4435](https://github.com/axios/axios/pull/4435)
+- Fix TS definition for AxiosRequestTransformer [#4201](https://github.com/axios/axios/pull/4201)
+- Fix grammatical issues in README [#4232](https://github.com/axios/axios/pull/4232)
+- Fixing instance.defaults.headers type [#4557](https://github.com/axios/axios/pull/4557)
+- Fixed race condition on immediate requests cancellation [#4261](https://github.com/axios/axios/pull/4261)
+- Fixing Z_BUF_ERROR when no content [#4701](https://github.com/axios/axios/pull/4701)
+- Fixing proxy beforeRedirect regression [#4708](https://github.com/axios/axios/pull/4708)
+- Fixed AxiosError status code type [#4717](https://github.com/axios/axios/pull/4717)
+- Fixed AxiosError stack capturing [#4718](https://github.com/axios/axios/pull/4718)
+- Fixing AxiosRequestHeaders typings [#4334](https://github.com/axios/axios/pull/4334)
+- Fixed max body length defaults [#4731](https://github.com/axios/axios/pull/4731)
+- Fixed toFormData Blob issue on node>v17 [#4728](https://github.com/axios/axios/pull/4728)
+- Bump grunt from 1.5.2 to 1.5.3 [#4743](https://github.com/axios/axios/pull/4743)
+- Fixing content-type header repeated [#4745](https://github.com/axios/axios/pull/4745)
+- Fixed timeout error message for http [4738](https://github.com/axios/axios/pull/4738)
+- Request ignores false, 0 and empty string as body values [#4785](https://github.com/axios/axios/pull/4785)
+- Added back missing minified builds [#4805](https://github.com/axios/axios/pull/4805)
+- Fixed a type error [#4815](https://github.com/axios/axios/pull/4815)
+- Fixed a regression bug with unsubscribing from cancel token; [#4819](https://github.com/axios/axios/pull/4819)
+- Remove repeated compression algorithm [#4820](https://github.com/axios/axios/pull/4820)
+- The error of calling extend to pass parameters [#4857](https://github.com/axios/axios/pull/4857)
+- SerializerOptions.indexes allows boolean | null | undefined [#4862](https://github.com/axios/axios/pull/4862)
+- Require interceptors to return values [#4874](https://github.com/axios/axios/pull/4874)
+- Removed unused imports [#4949](https://github.com/axios/axios/pull/4949)
+- Allow null indexes on formSerializer and paramsSerializer [#4960](https://github.com/axios/axios/pull/4960)
+
+### Chores
+- Set permissions for GitHub actions [#4765](https://github.com/axios/axios/pull/4765)
+- Included githubactions in the dependabot config [#4770](https://github.com/axios/axios/pull/4770)
+- Included dependency review [#4771](https://github.com/axios/axios/pull/4771)
+- Update security.md [#4784](https://github.com/axios/axios/pull/4784)
+- Remove unnecessary spaces [#4854](https://github.com/axios/axios/pull/4854)
+- Simplify the import path of AxiosError [#4875](https://github.com/axios/axios/pull/4875)
+- Fix Gitpod dead link [#4941](https://github.com/axios/axios/pull/4941)
+- Enable syntax highlighting for a code block [#4970](https://github.com/axios/axios/pull/4970)
+- Using Logo Axios in Readme.md [#4993](https://github.com/axios/axios/pull/4993)
+- Fix markup for note in README [#4825](https://github.com/axios/axios/pull/4825)
+- Fix typo and formatting, add colons [#4853](https://github.com/axios/axios/pull/4853)
+- Fix typo in readme [#4942](https://github.com/axios/axios/pull/4942)
+
+### Security
+
+- Update SECURITY.md [#4687](https://github.com/axios/axios/pull/4687)
+
+### Contributors to this release
+
+- [Bertrand Marron](https://github.com/tusbar)
+- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS)
+- [Dan Mooney](https://github.com/danmooney)
+- [Michael Li](https://github.com/xiaoyu-tamu)
+- [aong](https://github.com/yxwzaxns)
+- [Des Preston](https://github.com/despreston)
+- [Ted Robertson](https://github.com/tredondo)
+- [zhoulixiang](https://github.com/zh-lx)
+- [Arthur Fiorette](https://github.com/arthurfiorette)
+- [Kumar Shanu](https://github.com/Kr-Shanu)
+- [JALAL](https://github.com/JLL32)
+- [Jingyi Lin](https://github.com/MageeLin)
+- [Philipp Loose](https://github.com/phloose)
+- [Alexander Shchukin](https://github.com/sashsvamir)
+- [Dave Cardwell](https://github.com/davecardwell)
+- [Cat Scarlet](https://github.com/catscarlet)
+- [Luca Pizzini](https://github.com/lpizzinidev)
+- [Kai](https://github.com/Schweinepriester)
+- [Maxime Bargiel](https://github.com/mbargiel)
+- [Brian Helba](https://github.com/brianhelba)
+- [reslear](https://github.com/reslear)
+- [Jamie Slome](https://github.com/JamieSlome)
+- [Landro3](https://github.com/Landro3)
+- [rafw87](https://github.com/rafw87)
+- [Afzal Sayed](https://github.com/afzalsayed96)
+- [Koki Oyatsu](https://github.com/kaishuu0123)
+- [Dave](https://github.com/wangcch)
+- [暴走老七](https://github.com/baozouai)
+- [Spencer](https://github.com/spalger)
+- [Adrian Wieprzkowicz](https://github.com/Argeento)
+- [Jamie Telin](https://github.com/lejahmie)
+- [毛呆](https://github.com/aweikalee)
+- [Kirill Shakirov](https://github.com/turisap)
+- [Rraji Abdelbari](https://github.com/estarossa0)
+- [Jelle Schutter](https://github.com/jelleschutter)
+- [Tom Ceuppens](https://github.com/KyorCode)
+- [Johann Cooper](https://github.com/JohannCooper)
+- [Dimitris Halatsis](https://github.com/mitsos1os)
+- [chenjigeng](https://github.com/chenjigeng)
+- [João Gabriel Quaresma](https://github.com/joaoGabriel55)
+- [Victor Augusto](https://github.com/VictorAugDB)
+- [neilnaveen](https://github.com/neilnaveen)
+- [Pavlos](https://github.com/psmoros)
+- [Kiryl Valkovich](https://github.com/visortelle)
+- [Naveen](https://github.com/naveensrinivasan)
+- [wenzheng](https://github.com/0x30)
+- [hcwhan](https://github.com/hcwhan)
+- [Bassel Rachid](https://github.com/basselworkforce)
+- [Grégoire Pineau](https://github.com/lyrixx)
+- [felipedamin](https://github.com/felipedamin)
+- [Karl Horky](https://github.com/karlhorky)
+- [Yue JIN](https://github.com/kingyue737)
+- [Usman Ali Siddiqui](https://github.com/usman250994)
+- [WD](https://github.com/techbirds)
+- [Günther Foidl](https://github.com/gfoidl)
+- [Stephen Jennings](https://github.com/jennings)
+- [C.T.Lin](https://github.com/chentsulin)
+- [mia-z](https://github.com/mia-z)
+- [Parth Banathia](https://github.com/Parth0105)
+- [parth0105pluang](https://github.com/parth0105pluang)
+- [Marco Weber](https://github.com/mrcwbr)
+- [Luca Pizzini](https://github.com/lpizzinidev)
+- [Willian Agostini](https://github.com/WillianAgostini)
+- [Huyen Nguyen](https://github.com/huyenltnguyen)
\ No newline at end of file
diff --git a/node_modules/axios/LICENSE b/node_modules/axios/LICENSE
new file mode 100644
index 0000000..05006a5
--- /dev/null
+++ b/node_modules/axios/LICENSE
@@ -0,0 +1,7 @@
+# Copyright (c) 2014-present Matt Zabriskie & Collaborators
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/axios/MIGRATION_GUIDE.md b/node_modules/axios/MIGRATION_GUIDE.md
new file mode 100644
index 0000000..ec3ae0d
--- /dev/null
+++ b/node_modules/axios/MIGRATION_GUIDE.md
@@ -0,0 +1,3 @@
+# Migration Guide
+
+## 0.x.x -> 1.1.0
diff --git a/node_modules/axios/README.md b/node_modules/axios/README.md
new file mode 100644
index 0000000..f92b3b8
--- /dev/null
+++ b/node_modules/axios/README.md
@@ -0,0 +1,1657 @@
+
+ 🥇 Gold sponsors API-first authentication, authorization, and fraud prevention
Website | Documentation | Node.js
+ We’re bound by one common purpose: to give you the financial tools, resources and information you ne...
www.principal.com
+ Hi, we're Descope! We are building something in the authentication space for app developers and...
Website | Documentation | Community
+ At Buzzoid, you can buy Instagram followers quickly, safely, and easily with just a few clicks. Rate...
buzzoid.com
+ At Famety, you can grow your social media following quickly, safely, and easily with just a few clic...
www.famety.com
+ Buy Instagram Likes
poprey.com
+ 💜 Become a sponsor
+ 💜 Become a sponsor
+ 💜 Become a sponsor
+
+
+
+
+
+
+
+
+Promise based HTTP client for the browser and node.js
+
+
+ Website •
+ Documentation
+
+
+
+
+[](https://www.npmjs.org/package/axios)
+[](https://cdnjs.com/libraries/axios)
+[](https://github.com/axios/axios/actions/workflows/ci.yml)
+[](https://gitpod.io/#https://github.com/axios/axios)
+[](https://coveralls.io/r/mzabriskie/axios)
+[](https://packagephobia.now.sh/result?p=axios)
+[](https://bundlephobia.com/package/axios@latest)
+[](https://npm-stat.com/charts.html?package=axios)
+[](https://gitter.im/mzabriskie/axios)
+[](https://www.codetriage.com/axios/axios)
+[](https://snyk.io/test/npm/axios)
+
+
+
+
+
+
+## Table of Contents
+
+ - [Features](#features)
+ - [Browser Support](#browser-support)
+ - [Installing](#installing)
+ - [Package manager](#package-manager)
+ - [CDN](#cdn)
+ - [Example](#example)
+ - [Axios API](#axios-api)
+ - [Request method aliases](#request-method-aliases)
+ - [Concurrency 👎](#concurrency-deprecated)
+ - [Creating an instance](#creating-an-instance)
+ - [Instance methods](#instance-methods)
+ - [Request Config](#request-config)
+ - [Response Schema](#response-schema)
+ - [Config Defaults](#config-defaults)
+ - [Global axios defaults](#global-axios-defaults)
+ - [Custom instance defaults](#custom-instance-defaults)
+ - [Config order of precedence](#config-order-of-precedence)
+ - [Interceptors](#interceptors)
+ - [Multiple Interceptors](#multiple-interceptors)
+ - [Handling Errors](#handling-errors)
+ - [Cancellation](#cancellation)
+ - [AbortController](#abortcontroller)
+ - [CancelToken 👎](#canceltoken-deprecated)
+ - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format)
+ - [URLSearchParams](#urlsearchparams)
+ - [Query string](#query-string-older-browsers)
+ - [🆕 Automatic serialization](#-automatic-serialization-to-urlsearchparams)
+ - [Using multipart/form-data format](#using-multipartform-data-format)
+ - [FormData](#formdata)
+ - [🆕 Automatic serialization](#-automatic-serialization-to-formdata)
+ - [Files Posting](#files-posting)
+ - [HTML Form Posting](#-html-form-posting-browser)
+ - [🆕 Progress capturing](#-progress-capturing)
+ - [🆕 Rate limiting](#-progress-capturing)
+ - [🆕 AxiosHeaders](#-axiosheaders)
+ - [🔥 Fetch adapter](#-fetch-adapter)
+ - [Semver](#semver)
+ - [Promises](#promises)
+ - [TypeScript](#typescript)
+ - [Resources](#resources)
+ - [Credits](#credits)
+ - [License](#license)
+
+## Features
+
+- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
+- Make [http](https://nodejs.org/api/http.html) requests from node.js
+- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
+- Intercept request and response
+- Transform request and response data
+- Cancel requests
+- Automatic transforms for [JSON](https://www.json.org/json-en.html) data
+- 🆕 Automatic data object serialization to `multipart/form-data` and `x-www-form-urlencoded` body encodings
+- Client side support for protecting against [XSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery)
+
+## Browser Support
+
+ |  |  |  |  |
+--- | --- | --- | --- | --- |
+Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
+
+[](https://saucelabs.com/u/axios)
+
+## Installing
+
+### Package manager
+
+Using npm:
+
+```bash
+$ npm install axios
+```
+
+Using bower:
+
+```bash
+$ bower install axios
+```
+
+Using yarn:
+
+```bash
+$ yarn add axios
+```
+
+Using pnpm:
+
+```bash
+$ pnpm add axios
+```
+
+Once the package is installed, you can import the library using `import` or `require` approach:
+
+```js
+import axios, {isCancel, AxiosError} from 'axios';
+```
+
+You can also use the default export, since the named export is just a re-export from the Axios factory:
+
+```js
+import axios from 'axios';
+
+console.log(axios.isCancel('something'));
+````
+
+If you use `require` for importing, **only default export is available**:
+
+```js
+const axios = require('axios');
+
+console.log(axios.isCancel('something'));
+```
+
+For some bundlers and some ES6 linter's you may need to do the following:
+
+```js
+import { default as axios } from 'axios';
+```
+
+For cases where something went wrong when trying to import a module into a custom or legacy environment,
+you can try importing the module package directly:
+
+```js
+const axios = require('axios/dist/browser/axios.cjs'); // browser commonJS bundle (ES2017)
+// const axios = require('axios/dist/node/axios.cjs'); // node commonJS bundle (ES2017)
+```
+
+### CDN
+
+Using jsDelivr CDN (ES5 UMD browser module):
+
+```html
+
+```
+
+Using unpkg CDN:
+
+```html
+
+```
+
+## Example
+
+> **Note**: CommonJS usage
+> In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()`, use the following approach:
+
+```js
+import axios from 'axios';
+//const axios = require('axios'); // legacy way
+
+// Make a request for a user with a given ID
+axios.get('/user?ID=12345')
+ .then(function (response) {
+ // handle success
+ console.log(response);
+ })
+ .catch(function (error) {
+ // handle error
+ console.log(error);
+ })
+ .finally(function () {
+ // always executed
+ });
+
+// Optionally the request above could also be done as
+axios.get('/user', {
+ params: {
+ ID: 12345
+ }
+ })
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ })
+ .finally(function () {
+ // always executed
+ });
+
+// Want to use async/await? Add the `async` keyword to your outer function/method.
+async function getUser() {
+ try {
+ const response = await axios.get('/user?ID=12345');
+ console.log(response);
+ } catch (error) {
+ console.error(error);
+ }
+}
+```
+
+> **Note**: `async/await` is part of ECMAScript 2017 and is not supported in Internet
+> Explorer and older browsers, so use with caution.
+
+Performing a `POST` request
+
+```js
+axios.post('/user', {
+ firstName: 'Fred',
+ lastName: 'Flintstone'
+ })
+ .then(function (response) {
+ console.log(response);
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+```
+
+Performing multiple concurrent requests
+
+```js
+function getUserAccount() {
+ return axios.get('/user/12345');
+}
+
+function getUserPermissions() {
+ return axios.get('/user/12345/permissions');
+}
+
+Promise.all([getUserAccount(), getUserPermissions()])
+ .then(function (results) {
+ const acct = results[0];
+ const perm = results[1];
+ });
+```
+
+## axios API
+
+Requests can be made by passing the relevant config to `axios`.
+
+##### axios(config)
+
+```js
+// Send a POST request
+axios({
+ method: 'post',
+ url: '/user/12345',
+ data: {
+ firstName: 'Fred',
+ lastName: 'Flintstone'
+ }
+});
+```
+
+```js
+// GET request for remote image in node.js
+axios({
+ method: 'get',
+ url: 'https://bit.ly/2mTM3nY',
+ responseType: 'stream'
+})
+ .then(function (response) {
+ response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
+ });
+```
+
+##### axios(url[, config])
+
+```js
+// Send a GET request (default method)
+axios('/user/12345');
+```
+
+### Request method aliases
+
+For convenience, aliases have been provided for all common request methods.
+
+##### axios.request(config)
+##### axios.get(url[, config])
+##### axios.delete(url[, config])
+##### axios.head(url[, config])
+##### axios.options(url[, config])
+##### axios.post(url[, data[, config]])
+##### axios.put(url[, data[, config]])
+##### axios.patch(url[, data[, config]])
+
+###### NOTE
+When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
+
+### Concurrency (Deprecated)
+Please use `Promise.all` to replace the below functions.
+
+Helper functions for dealing with concurrent requests.
+
+axios.all(iterable)
+axios.spread(callback)
+
+### Creating an instance
+
+You can create a new instance of axios with a custom config.
+
+##### axios.create([config])
+
+```js
+const instance = axios.create({
+ baseURL: 'https://some-domain.com/api/',
+ timeout: 1000,
+ headers: {'X-Custom-Header': 'foobar'}
+});
+```
+
+### Instance methods
+
+The available instance methods are listed below. The specified config will be merged with the instance config.
+
+##### axios#request(config)
+##### axios#get(url[, config])
+##### axios#delete(url[, config])
+##### axios#head(url[, config])
+##### axios#options(url[, config])
+##### axios#post(url[, data[, config]])
+##### axios#put(url[, data[, config]])
+##### axios#patch(url[, data[, config]])
+##### axios#getUri([config])
+
+## Request Config
+
+These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
+
+```js
+{
+ // `url` is the server URL that will be used for the request
+ url: '/user',
+
+ // `method` is the request method to be used when making the request
+ method: 'get', // default
+
+ // `baseURL` will be prepended to `url` unless `url` is absolute.
+ // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
+ // to methods of that instance.
+ baseURL: 'https://some-domain.com/api/',
+
+ // `transformRequest` allows changes to the request data before it is sent to the server
+ // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
+ // The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
+ // FormData or Stream
+ // You may modify the headers object.
+ transformRequest: [function (data, headers) {
+ // Do whatever you want to transform the data
+
+ return data;
+ }],
+
+ // `transformResponse` allows changes to the response data to be made before
+ // it is passed to then/catch
+ transformResponse: [function (data) {
+ // Do whatever you want to transform the data
+
+ return data;
+ }],
+
+ // `headers` are custom headers to be sent
+ headers: {'X-Requested-With': 'XMLHttpRequest'},
+
+ // `params` are the URL parameters to be sent with the request
+ // Must be a plain object or a URLSearchParams object
+ params: {
+ ID: 12345
+ },
+
+ // `paramsSerializer` is an optional config that allows you to customize serializing `params`.
+ paramsSerializer: {
+
+ //Custom encoder function which sends key/value pairs in an iterative fashion.
+ encode?: (param: string): string => { /* Do custom operations here and return transformed string */ },
+
+ // Custom serializer function for the entire parameter. Allows user to mimic pre 1.x behaviour.
+ serialize?: (params: Record, options?: ParamsSerializerOptions ),
+
+ //Configuration for formatting array indexes in the params.
+ indexes: false // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes).
+ },
+
+ // `data` is the data to be sent as the request body
+ // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH'
+ // When no `transformRequest` is set, must be of one of the following types:
+ // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
+ // - Browser only: FormData, File, Blob
+ // - Node only: Stream, Buffer, FormData (form-data package)
+ data: {
+ firstName: 'Fred'
+ },
+
+ // syntax alternative to send data into the body
+ // method post
+ // only the value is sent, not the key
+ data: 'Country=Brasil&City=Belo Horizonte',
+
+ // `timeout` specifies the number of milliseconds before the request times out.
+ // If the request takes longer than `timeout`, the request will be aborted.
+ timeout: 1000, // default is `0` (no timeout)
+
+ // `withCredentials` indicates whether or not cross-site Access-Control requests
+ // should be made using credentials
+ withCredentials: false, // default
+
+ // `adapter` allows custom handling of requests which makes testing easier.
+ // Return a promise and supply a valid response (see lib/adapters/README.md)
+ adapter: function (config) {
+ /* ... */
+ },
+ // Also, you can set the name of the built-in adapter, or provide an array with their names
+ // to choose the first available in the environment
+ adapter: 'xhr' // 'fetch' | 'http' | ['xhr', 'http', 'fetch']
+
+ // `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
+ // This will set an `Authorization` header, overwriting any existing
+ // `Authorization` custom headers you have set using `headers`.
+ // Please note that only HTTP Basic auth is configurable through this parameter.
+ // For Bearer tokens and such, use `Authorization` custom headers instead.
+ auth: {
+ username: 'janedoe',
+ password: 's00pers3cret'
+ },
+
+ // `responseType` indicates the type of data that the server will respond with
+ // options are: 'arraybuffer', 'document', 'json', 'text', 'stream'
+ // browser only: 'blob'
+ responseType: 'json', // default
+
+ // `responseEncoding` indicates encoding to use for decoding responses (Node.js only)
+ // Note: Ignored for `responseType` of 'stream' or client-side requests
+ // options are: 'ascii', 'ASCII', 'ansi', 'ANSI', 'binary', 'BINARY', 'base64', 'BASE64', 'base64url',
+ // 'BASE64URL', 'hex', 'HEX', 'latin1', 'LATIN1', 'ucs-2', 'UCS-2', 'ucs2', 'UCS2', 'utf-8', 'UTF-8',
+ // 'utf8', 'UTF8', 'utf16le', 'UTF16LE'
+ responseEncoding: 'utf8', // default
+
+ // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
+ xsrfCookieName: 'XSRF-TOKEN', // default
+
+ // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
+ xsrfHeaderName: 'X-XSRF-TOKEN', // default
+
+ // `undefined` (default) - set XSRF header only for the same origin requests
+ withXSRFToken: boolean | undefined | ((config: InternalAxiosRequestConfig) => boolean | undefined),
+
+ // `onUploadProgress` allows handling of progress events for uploads
+ // browser & node.js
+ onUploadProgress: function ({loaded, total, progress, bytes, estimated, rate, upload = true}) {
+ // Do whatever you want with the Axios progress event
+ },
+
+ // `onDownloadProgress` allows handling of progress events for downloads
+ // browser & node.js
+ onDownloadProgress: function ({loaded, total, progress, bytes, estimated, rate, download = true}) {
+ // Do whatever you want with the Axios progress event
+ },
+
+ // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js
+ maxContentLength: 2000,
+
+ // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed
+ maxBodyLength: 2000,
+
+ // `validateStatus` defines whether to resolve or reject the promise for a given
+ // HTTP response status code. If `validateStatus` returns `true` (or is set to `null`
+ // or `undefined`), the promise will be resolved; otherwise, the promise will be
+ // rejected.
+ validateStatus: function (status) {
+ return status >= 200 && status < 300; // default
+ },
+
+ // `maxRedirects` defines the maximum number of redirects to follow in node.js.
+ // If set to 0, no redirects will be followed.
+ maxRedirects: 21, // default
+
+ // `beforeRedirect` defines a function that will be called before redirect.
+ // Use this to adjust the request options upon redirecting,
+ // to inspect the latest response headers,
+ // or to cancel the request by throwing an error
+ // If maxRedirects is set to 0, `beforeRedirect` is not used.
+ beforeRedirect: (options, { headers }) => {
+ if (options.hostname === "example.com") {
+ options.auth = "user:password";
+ }
+ },
+
+ // `socketPath` defines a UNIX Socket to be used in node.js.
+ // e.g. '/var/run/docker.sock' to send requests to the docker daemon.
+ // Only either `socketPath` or `proxy` can be specified.
+ // If both are specified, `socketPath` is used.
+ socketPath: null, // default
+
+ // `transport` determines the transport method that will be used to make the request. If defined, it will be used. Otherwise, if `maxRedirects` is 0, the default `http` or `https` library will be used, depending on the protocol specified in `protocol`. Otherwise, the `httpFollow` or `httpsFollow` library will be used, again depending on the protocol, which can handle redirects.
+ transport: undefined, // default
+
+ // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
+ // and https requests, respectively, in node.js. This allows options to be added like
+ // `keepAlive` that are not enabled by default.
+ httpAgent: new http.Agent({ keepAlive: true }),
+ httpsAgent: new https.Agent({ keepAlive: true }),
+
+ // `proxy` defines the hostname, port, and protocol of the proxy server.
+ // You can also define your proxy using the conventional `http_proxy` and
+ // `https_proxy` environment variables. If you are using environment variables
+ // for your proxy configuration, you can also define a `no_proxy` environment
+ // variable as a comma-separated list of domains that should not be proxied.
+ // Use `false` to disable proxies, ignoring environment variables.
+ // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
+ // supplies credentials.
+ // This will set an `Proxy-Authorization` header, overwriting any existing
+ // `Proxy-Authorization` custom headers you have set using `headers`.
+ // If the proxy server uses HTTPS, then you must set the protocol to `https`.
+ proxy: {
+ protocol: 'https',
+ host: '127.0.0.1',
+ // hostname: '127.0.0.1' // Takes precedence over 'host' if both are defined
+ port: 9000,
+ auth: {
+ username: 'mikeymike',
+ password: 'rapunz3l'
+ }
+ },
+
+ // `cancelToken` specifies a cancel token that can be used to cancel the request
+ // (see Cancellation section below for details)
+ cancelToken: new CancelToken(function (cancel) {
+ }),
+
+ // an alternative way to cancel Axios requests using AbortController
+ signal: new AbortController().signal,
+
+ // `decompress` indicates whether or not the response body should be decompressed
+ // automatically. If set to `true` will also remove the 'content-encoding' header
+ // from the responses objects of all decompressed responses
+ // - Node only (XHR cannot turn off decompression)
+ decompress: true, // default
+
+ // `insecureHTTPParser` boolean.
+ // Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers.
+ // This may allow interoperability with non-conformant HTTP implementations.
+ // Using the insecure parser should be avoided.
+ // see options https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_request_url_options_callback
+ // see also https://nodejs.org/en/blog/vulnerability/february-2020-security-releases/#strict-http-header-parsing-none
+ insecureHTTPParser: undefined, // default
+
+ // transitional options for backward compatibility that may be removed in the newer versions
+ transitional: {
+ // silent JSON parsing mode
+ // `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour)
+ // `false` - throw SyntaxError if JSON parsing failed (Note: responseType must be set to 'json')
+ silentJSONParsing: true, // default value for the current Axios version
+
+ // try to parse the response string as JSON even if `responseType` is not 'json'
+ forcedJSONParsing: true,
+
+ // throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts
+ clarifyTimeoutError: false,
+ },
+
+ env: {
+ // The FormData class to be used to automatically serialize the payload into a FormData object
+ FormData: window?.FormData || global?.FormData
+ },
+
+ formSerializer: {
+ visitor: (value, key, path, helpers) => {}; // custom visitor function to serialize form values
+ dots: boolean; // use dots instead of brackets format
+ metaTokens: boolean; // keep special endings like {} in parameter key
+ indexes: boolean; // array indexes format null - no brackets, false - empty brackets, true - brackets with indexes
+ },
+
+ // http adapter only (node.js)
+ maxRate: [
+ 100 * 1024, // 100KB/s upload limit,
+ 100 * 1024 // 100KB/s download limit
+ ]
+}
+```
+
+## Response Schema
+
+The response for a request contains the following information.
+
+```js
+{
+ // `data` is the response that was provided by the server
+ data: {},
+
+ // `status` is the HTTP status code from the server response
+ status: 200,
+
+ // `statusText` is the HTTP status message from the server response
+ statusText: 'OK',
+
+ // `headers` the HTTP headers that the server responded with
+ // All header names are lowercase and can be accessed using the bracket notation.
+ // Example: `response.headers['content-type']`
+ headers: {},
+
+ // `config` is the config that was provided to `axios` for the request
+ config: {},
+
+ // `request` is the request that generated this response
+ // It is the last ClientRequest instance in node.js (in redirects)
+ // and an XMLHttpRequest instance in the browser
+ request: {}
+}
+```
+
+When using `then`, you will receive the response as follows:
+
+```js
+axios.get('/user/12345')
+ .then(function (response) {
+ console.log(response.data);
+ console.log(response.status);
+ console.log(response.statusText);
+ console.log(response.headers);
+ console.log(response.config);
+ });
+```
+
+When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section.
+
+## Config Defaults
+
+You can specify config defaults that will be applied to every request.
+
+### Global axios defaults
+
+```js
+axios.defaults.baseURL = 'https://api.example.com';
+
+// Important: If axios is used with multiple domains, the AUTH_TOKEN will be sent to all of them.
+// See below for an example using Custom instance defaults instead.
+axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
+
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
+```
+
+### Custom instance defaults
+
+```js
+// Set config defaults when creating the instance
+const instance = axios.create({
+ baseURL: 'https://api.example.com'
+});
+
+// Alter defaults after instance has been created
+instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
+```
+
+### Config order of precedence
+
+Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults/index.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
+
+```js
+// Create an instance using the config defaults provided by the library
+// At this point the timeout config value is `0` as is the default for the library
+const instance = axios.create();
+
+// Override timeout default for the library
+// Now all requests using this instance will wait 2.5 seconds before timing out
+instance.defaults.timeout = 2500;
+
+// Override timeout for this request as it's known to take a long time
+instance.get('/longRequest', {
+ timeout: 5000
+});
+```
+
+## Interceptors
+
+You can intercept requests or responses before they are handled by `then` or `catch`.
+
+```js
+// Add a request interceptor
+axios.interceptors.request.use(function (config) {
+ // Do something before request is sent
+ return config;
+ }, function (error) {
+ // Do something with request error
+ return Promise.reject(error);
+ });
+
+// Add a response interceptor
+axios.interceptors.response.use(function (response) {
+ // Any status code that lie within the range of 2xx cause this function to trigger
+ // Do something with response data
+ return response;
+ }, function (error) {
+ // Any status codes that falls outside the range of 2xx cause this function to trigger
+ // Do something with response error
+ return Promise.reject(error);
+ });
+```
+
+If you need to remove an interceptor later you can.
+
+```js
+const myInterceptor = axios.interceptors.request.use(function () {/*...*/});
+axios.interceptors.request.eject(myInterceptor);
+```
+
+You can also clear all interceptors for requests or responses.
+```js
+const instance = axios.create();
+instance.interceptors.request.use(function () {/*...*/});
+instance.interceptors.request.clear(); // Removes interceptors from requests
+instance.interceptors.response.use(function () {/*...*/});
+instance.interceptors.response.clear(); // Removes interceptors from responses
+```
+
+You can add interceptors to a custom instance of axios.
+
+```js
+const instance = axios.create();
+instance.interceptors.request.use(function () {/*...*/});
+```
+
+When you add request interceptors, they are presumed to be asynchronous by default. This can cause a delay
+in the execution of your axios request when the main thread is blocked (a promise is created under the hood for
+the interceptor and your request gets put on the bottom of the call stack). If your request interceptors are synchronous you can add a flag
+to the options object that will tell axios to run the code synchronously and avoid any delays in request execution.
+
+```js
+axios.interceptors.request.use(function (config) {
+ config.headers.test = 'I am only a header!';
+ return config;
+}, null, { synchronous: true });
+```
+
+If you want to execute a particular interceptor based on a runtime check,
+you can add a `runWhen` function to the options object. The request interceptor will not be executed **if and only if** the return
+of `runWhen` is `false`. The function will be called with the config
+object (don't forget that you can bind your own arguments to it as well.) This can be handy when you have an
+asynchronous request interceptor that only needs to run at certain times.
+
+```js
+function onGetCall(config) {
+ return config.method === 'get';
+}
+axios.interceptors.request.use(function (config) {
+ config.headers.test = 'special get headers';
+ return config;
+}, null, { runWhen: onGetCall });
+```
+
+> **Note:** options parameter(having `synchronous` and `runWhen` properties) is only supported for request interceptors at the moment.
+
+### Multiple Interceptors
+
+Given you add multiple response interceptors
+and when the response was fulfilled
+- then each interceptor is executed
+- then they are executed in the order they were added
+- then only the last interceptor's result is returned
+- then every interceptor receives the result of its predecessor
+- and when the fulfillment-interceptor throws
+ - then the following fulfillment-interceptor is not called
+ - then the following rejection-interceptor is called
+ - once caught, another following fulfill-interceptor is called again (just like in a promise chain).
+
+Read [the interceptor tests](./test/specs/interceptors.spec.js) for seeing all this in code.
+
+## Error Types
+
+There are many different axios error messages that can appear that can provide basic information about the specifics of the error and where opportunities may lie in debugging.
+
+The general structure of axios errors is as follows:
+| Property | Definition |
+| -------- | ---------- |
+| message | A quick summary of the error message and the status it failed with. |
+| name | This defines where the error originated from. For axios, it will always be an 'AxiosError'. |
+| stack | Provides the stack trace of the error. |
+| config | An axios config object with specific instance configurations defined by the user from when the request was made |
+| code | Represents an axios identified error. The table below lists out specific definitions for internal axios error. |
+| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings.
+
+Below is a list of potential axios identified error
+| Code | Definition |
+| -------- | ---------- |
+| ERR_BAD_OPTION_VALUE | Invalid or unsupported value provided in axios configuration. |
+| ERR_BAD_OPTION | Invalid option provided in axios configuration. |
+| ECONNABORTED | Request timed out due to exceeding timeout specified in axios configuration. |
+| ETIMEDOUT | Request timed out due to exceeding default axios timelimit. |
+| ERR_NETWORK | Network-related issue.
+| ERR_FR_TOO_MANY_REDIRECTS | Request is redirected too many times; exceeds max redirects specified in axios configuration.
+| ERR_DEPRECATED | Deprecated feature or method used in axios.
+| ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format.
+| ERR_BAD_REQUEST | Requested has unexpected format or missing required parameters. |
+| ERR_CANCELED | Feature or method is canceled explicitly by the user.
+| ERR_NOT_SUPPORT | Feature or method not supported in the current axios environment.
+| ERR_INVALID_URL | Invalid URL provided for axios request.
+
+## Handling Errors
+
+the default behavior is to reject every response that returns with a status code that falls out of the range of 2xx and treat it as an error.
+
+```js
+axios.get('/user/12345')
+ .catch(function (error) {
+ if (error.response) {
+ // The request was made and the server responded with a status code
+ // that falls out of the range of 2xx
+ console.log(error.response.data);
+ console.log(error.response.status);
+ console.log(error.response.headers);
+ } else if (error.request) {
+ // The request was made but no response was received
+ // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
+ // http.ClientRequest in node.js
+ console.log(error.request);
+ } else {
+ // Something happened in setting up the request that triggered an Error
+ console.log('Error', error.message);
+ }
+ console.log(error.config);
+ });
+```
+
+Using the `validateStatus` config option, you can override the default condition (status >= 200 && status < 300) and define HTTP code(s) that should throw an error.
+
+```js
+axios.get('/user/12345', {
+ validateStatus: function (status) {
+ return status < 500; // Resolve only if the status code is less than 500
+ }
+})
+```
+
+Using `toJSON` you get an object with more information about the HTTP error.
+
+```js
+axios.get('/user/12345')
+ .catch(function (error) {
+ console.log(error.toJSON());
+ });
+```
+
+## Cancellation
+
+### AbortController
+
+Starting from `v0.22.0` Axios supports AbortController to cancel requests in fetch API way:
+
+```js
+const controller = new AbortController();
+
+axios.get('/foo/bar', {
+ signal: controller.signal
+}).then(function(response) {
+ //...
+});
+// cancel the request
+controller.abort()
+```
+
+### CancelToken `👎deprecated`
+
+You can also cancel a request using a *CancelToken*.
+
+> The axios cancel token API is based on the withdrawn [cancellable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
+
+> This API is deprecated since v0.22.0 and shouldn't be used in new projects
+
+You can create a cancel token using the `CancelToken.source` factory as shown below:
+
+```js
+const CancelToken = axios.CancelToken;
+const source = CancelToken.source();
+
+axios.get('/user/12345', {
+ cancelToken: source.token
+}).catch(function (thrown) {
+ if (axios.isCancel(thrown)) {
+ console.log('Request canceled', thrown.message);
+ } else {
+ // handle error
+ }
+});
+
+axios.post('/user/12345', {
+ name: 'new name'
+}, {
+ cancelToken: source.token
+})
+
+// cancel the request (the message parameter is optional)
+source.cancel('Operation canceled by the user.');
+```
+
+You can also create a cancel token by passing an executor function to the `CancelToken` constructor:
+
+```js
+const CancelToken = axios.CancelToken;
+let cancel;
+
+axios.get('/user/12345', {
+ cancelToken: new CancelToken(function executor(c) {
+ // An executor function receives a cancel function as a parameter
+ cancel = c;
+ })
+});
+
+// cancel the request
+cancel();
+```
+
+> **Note:** you can cancel several requests with the same cancel token/abort controller.
+> If a cancellation token is already cancelled at the moment of starting an Axios request, then the request is cancelled immediately, without any attempts to make a real request.
+
+> During the transition period, you can use both cancellation APIs, even for the same request:
+
+## Using `application/x-www-form-urlencoded` format
+
+### URLSearchParams
+
+By default, axios serializes JavaScript objects to `JSON`. To send data in the [`application/x-www-form-urlencoded` format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) instead, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API, which is [supported](http://www.caniuse.com/#feat=urlsearchparams) in the vast majority of browsers,and [ Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) starting with v10 (released in 2018).
+
+```js
+const params = new URLSearchParams({ foo: 'bar' });
+params.append('extraparam', 'value');
+axios.post('/foo', params);
+```
+
+### Query string (Older browsers)
+
+For compatibility with very old browsers, there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment).
+
+Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
+
+```js
+const qs = require('qs');
+axios.post('/foo', qs.stringify({ 'bar': 123 }));
+```
+
+Or in another way (ES6),
+
+```js
+import qs from 'qs';
+const data = { 'bar': 123 };
+const options = {
+ method: 'POST',
+ headers: { 'content-type': 'application/x-www-form-urlencoded' },
+ data: qs.stringify(data),
+ url,
+};
+axios(options);
+```
+
+### Older Node.js versions
+
+For older Node.js engines, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:
+
+```js
+const querystring = require('querystring');
+axios.post('https://something.com/', querystring.stringify({ foo: 'bar' }));
+```
+
+You can also use the [`qs`](https://github.com/ljharb/qs) library.
+
+> **Note**: The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case.
+
+### 🆕 Automatic serialization to URLSearchParams
+
+Axios will automatically serialize the data object to urlencoded format if the content-type header is set to "application/x-www-form-urlencoded".
+
+```js
+const data = {
+ x: 1,
+ arr: [1, 2, 3],
+ arr2: [1, [2], 3],
+ users: [{name: 'Peter', surname: 'Griffin'}, {name: 'Thomas', surname: 'Anderson'}],
+};
+
+await axios.postForm('https://postman-echo.com/post', data,
+ {headers: {'content-type': 'application/x-www-form-urlencoded'}}
+);
+```
+
+The server will handle it as:
+
+```js
+ {
+ x: '1',
+ 'arr[]': [ '1', '2', '3' ],
+ 'arr2[0]': '1',
+ 'arr2[1][0]': '2',
+ 'arr2[2]': '3',
+ 'arr3[]': [ '1', '2', '3' ],
+ 'users[0][name]': 'Peter',
+ 'users[0][surname]': 'griffin',
+ 'users[1][name]': 'Thomas',
+ 'users[1][surname]': 'Anderson'
+ }
+````
+
+If your backend body-parser (like `body-parser` of `express.js`) supports nested objects decoding, you will get the same object on the server-side automatically
+
+```js
+ var app = express();
+
+ app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies
+
+ app.post('/', function (req, res, next) {
+ // echo body as JSON
+ res.send(JSON.stringify(req.body));
+ });
+
+ server = app.listen(3000);
+```
+
+## Using `multipart/form-data` format
+
+### FormData
+
+To send the data as a `multipart/formdata` you need to pass a formData instance as a payload.
+Setting the `Content-Type` header is not required as Axios guesses it based on the payload type.
+
+```js
+const formData = new FormData();
+formData.append('foo', 'bar');
+
+axios.post('https://httpbin.org/post', formData);
+```
+
+In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows:
+
+```js
+const FormData = require('form-data');
+
+const form = new FormData();
+form.append('my_field', 'my value');
+form.append('my_buffer', new Buffer(10));
+form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
+
+axios.post('https://example.com', form)
+```
+
+### 🆕 Automatic serialization to FormData
+
+Starting from `v0.27.0`, Axios supports automatic object serialization to a FormData object if the request `Content-Type`
+header is set to `multipart/form-data`.
+
+The following request will submit the data in a FormData format (Browser & Node.js):
+
+```js
+import axios from 'axios';
+
+axios.post('https://httpbin.org/post', {x: 1}, {
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ }
+}).then(({data}) => console.log(data));
+```
+
+In the `node.js` build, the ([`form-data`](https://github.com/form-data/form-data)) polyfill is used by default.
+
+You can overload the FormData class by setting the `env.FormData` config variable,
+but you probably won't need it in most cases:
+
+```js
+const axios = require('axios');
+var FormData = require('form-data');
+
+axios.post('https://httpbin.org/post', {x: 1, buf: new Buffer(10)}, {
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ }
+}).then(({data}) => console.log(data));
+```
+
+Axios FormData serializer supports some special endings to perform the following operations:
+
+- `{}` - serialize the value with JSON.stringify
+- `[]` - unwrap the array-like object as separate fields with the same key
+
+> **Note**: unwrap/expand operation will be used by default on arrays and FileList objects
+
+FormData serializer supports additional options via `config.formSerializer: object` property to handle rare cases:
+
+- `visitor: Function` - user-defined visitor function that will be called recursively to serialize the data object
+to a `FormData` object by following custom rules.
+
+- `dots: boolean = false` - use dot notation instead of brackets to serialize arrays and objects;
+
+- `metaTokens: boolean = true` - add the special ending (e.g `user{}: '{"name": "John"}'`) in the FormData key.
+The back-end body-parser could potentially use this meta-information to automatically parse the value as JSON.
+
+- `indexes: null|false|true = false` - controls how indexes will be added to unwrapped keys of `flat` array-like objects
+
+ - `null` - don't add brackets (`arr: 1`, `arr: 2`, `arr: 3`)
+ - `false`(default) - add empty brackets (`arr[]: 1`, `arr[]: 2`, `arr[]: 3`)
+ - `true` - add brackets with indexes (`arr[0]: 1`, `arr[1]: 2`, `arr[2]: 3`)
+
+Let's say we have an object like this one:
+
+```js
+const obj = {
+ x: 1,
+ arr: [1, 2, 3],
+ arr2: [1, [2], 3],
+ users: [{name: 'Peter', surname: 'Griffin'}, {name: 'Thomas', surname: 'Anderson'}],
+ 'obj2{}': [{x:1}]
+};
+```
+
+The following steps will be executed by the Axios serializer internally:
+
+```js
+const formData = new FormData();
+formData.append('x', '1');
+formData.append('arr[]', '1');
+formData.append('arr[]', '2');
+formData.append('arr[]', '3');
+formData.append('arr2[0]', '1');
+formData.append('arr2[1][0]', '2');
+formData.append('arr2[2]', '3');
+formData.append('users[0][name]', 'Peter');
+formData.append('users[0][surname]', 'Griffin');
+formData.append('users[1][name]', 'Thomas');
+formData.append('users[1][surname]', 'Anderson');
+formData.append('obj2{}', '[{"x":1}]');
+```
+
+Axios supports the following shortcut methods: `postForm`, `putForm`, `patchForm`
+which are just the corresponding http methods with the `Content-Type` header preset to `multipart/form-data`.
+
+## Files Posting
+
+You can easily submit a single file:
+
+```js
+await axios.postForm('https://httpbin.org/post', {
+ 'myVar' : 'foo',
+ 'file': document.querySelector('#fileInput').files[0]
+});
+```
+
+or multiple files as `multipart/form-data`:
+
+```js
+await axios.postForm('https://httpbin.org/post', {
+ 'files[]': document.querySelector('#fileInput').files
+});
+```
+
+`FileList` object can be passed directly:
+
+```js
+await axios.postForm('https://httpbin.org/post', document.querySelector('#fileInput').files)
+```
+
+All files will be sent with the same field names: `files[]`.
+
+## 🆕 HTML Form Posting (browser)
+
+Pass HTML Form element as a payload to submit it as `multipart/form-data` content.
+
+```js
+await axios.postForm('https://httpbin.org/post', document.querySelector('#htmlForm'));
+```
+
+`FormData` and `HTMLForm` objects can also be posted as `JSON` by explicitly setting the `Content-Type` header to `application/json`:
+
+```js
+await axios.post('https://httpbin.org/post', document.querySelector('#htmlForm'), {
+ headers: {
+ 'Content-Type': 'application/json'
+ }
+})
+```
+
+For example, the Form
+
+```html
+
+```
+
+will be submitted as the following JSON object:
+
+```js
+{
+ "foo": "1",
+ "deep": {
+ "prop": {
+ "spaced": "3"
+ }
+ },
+ "baz": [
+ "4",
+ "5"
+ ],
+ "user": {
+ "age": "value2"
+ }
+}
+````
+
+Sending `Blobs`/`Files` as JSON (`base64`) is not currently supported.
+
+## 🆕 Progress capturing
+
+Axios supports both browser and node environments to capture request upload/download progress.
+The frequency of progress events is forced to be limited to `3` times per second.
+
+```js
+await axios.post(url, data, {
+ onUploadProgress: function (axiosProgressEvent) {
+ /*{
+ loaded: number;
+ total?: number;
+ progress?: number; // in range [0..1]
+ bytes: number; // how many bytes have been transferred since the last trigger (delta)
+ estimated?: number; // estimated time in seconds
+ rate?: number; // upload speed in bytes
+ upload: true; // upload sign
+ }*/
+ },
+
+ onDownloadProgress: function (axiosProgressEvent) {
+ /*{
+ loaded: number;
+ total?: number;
+ progress?: number;
+ bytes: number;
+ estimated?: number;
+ rate?: number; // download speed in bytes
+ download: true; // download sign
+ }*/
+ }
+});
+```
+
+You can also track stream upload/download progress in node.js:
+
+```js
+const {data} = await axios.post(SERVER_URL, readableStream, {
+ onUploadProgress: ({progress}) => {
+ console.log((progress * 100).toFixed(2));
+ },
+
+ headers: {
+ 'Content-Length': contentLength
+ },
+
+ maxRedirects: 0 // avoid buffering the entire stream
+});
+````
+
+> **Note:**
+> Capturing FormData upload progress is not currently supported in node.js environments.
+
+> **⚠️ Warning**
+> It is recommended to disable redirects by setting maxRedirects: 0 to upload the stream in the **node.js** environment,
+> as follow-redirects package will buffer the entire stream in RAM without following the "backpressure" algorithm.
+
+
+## 🆕 Rate limiting
+
+Download and upload rate limits can only be set for the http adapter (node.js):
+
+```js
+const {data} = await axios.post(LOCAL_SERVER_URL, myBuffer, {
+ onUploadProgress: ({progress, rate}) => {
+ console.log(`Upload [${(progress*100).toFixed(2)}%]: ${(rate / 1024).toFixed(2)}KB/s`)
+ },
+
+ maxRate: [100 * 1024], // 100KB/s limit
+});
+```
+
+## 🆕 AxiosHeaders
+
+Axios has its own `AxiosHeaders` class to manipulate headers using a Map-like API that guarantees caseless work.
+Although HTTP is case-insensitive in headers, Axios will retain the case of the original header for stylistic reasons
+and for a workaround when servers mistakenly consider the header's case.
+The old approach of directly manipulating headers object is still available, but deprecated and not recommended for future usage.
+
+### Working with headers
+
+An AxiosHeaders object instance can contain different types of internal values. that control setting and merging logic.
+The final headers object with string values is obtained by Axios by calling the `toJSON` method.
+
+> Note: By JSON here we mean an object consisting only of string values intended to be sent over the network.
+
+The header value can be one of the following types:
+- `string` - normal string value that will be sent to the server
+- `null` - skip header when rendering to JSON
+- `false` - skip header when rendering to JSON, additionally indicates that `set` method must be called with `rewrite` option set to `true`
+ to overwrite this value (Axios uses this internally to allow users to opt out of installing certain headers like `User-Agent` or `Content-Type`)
+- `undefined` - value is not set
+
+> Note: The header value is considered set if it is not equal to undefined.
+
+The headers object is always initialized inside interceptors and transformers:
+
+```ts
+ axios.interceptors.request.use((request: InternalAxiosRequestConfig) => {
+ request.headers.set('My-header', 'value');
+
+ request.headers.set({
+ "My-set-header1": "my-set-value1",
+ "My-set-header2": "my-set-value2"
+ });
+
+ request.headers.set('User-Agent', false); // disable subsequent setting the header by Axios
+
+ request.headers.setContentType('text/plain');
+
+ request.headers['My-set-header2'] = 'newValue' // direct access is deprecated
+
+ return request;
+ }
+ );
+````
+
+You can iterate over an `AxiosHeaders` instance using a `for...of` statement:
+
+````js
+const headers = new AxiosHeaders({
+ foo: '1',
+ bar: '2',
+ baz: '3'
+});
+
+for(const [header, value] of headers) {
+ console.log(header, value);
+}
+
+// foo 1
+// bar 2
+// baz 3
+````
+
+### new AxiosHeaders(headers?)
+
+Constructs a new `AxiosHeaders` instance.
+
+```
+constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
+```
+
+If the headers object is a string, it will be parsed as RAW HTTP headers.
+
+````js
+const headers = new AxiosHeaders(`
+Host: www.bing.com
+User-Agent: curl/7.54.0
+Accept: */*`);
+
+console.log(headers);
+
+// Object [AxiosHeaders] {
+// host: 'www.bing.com',
+// 'user-agent': 'curl/7.54.0',
+// accept: '*/*'
+// }
+````
+
+### AxiosHeaders#set
+
+```ts
+set(headerName, value: Axios, rewrite?: boolean);
+set(headerName, value, rewrite?: (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean);
+set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean);
+```
+
+The `rewrite` argument controls the overwriting behavior:
+- `false` - do not overwrite if header's value is set (is not `undefined`)
+- `undefined` (default) - overwrite the header unless its value is set to `false`
+- `true` - rewrite anyway
+
+The option can also accept a user-defined function that determines whether the value should be overwritten or not.
+
+Returns `this`.
+
+### AxiosHeaders#get(header)
+
+```
+ get(headerName: string, matcher?: true | AxiosHeaderMatcher): AxiosHeaderValue;
+ get(headerName: string, parser: RegExp): RegExpExecArray | null;
+````
+
+Returns the internal value of the header. It can take an extra argument to parse the header's value with `RegExp.exec`,
+matcher function or internal key-value parser.
+
+```ts
+const headers = new AxiosHeaders({
+ 'Content-Type': 'multipart/form-data; boundary=Asrf456BGe4h'
+});
+
+console.log(headers.get('Content-Type'));
+// multipart/form-data; boundary=Asrf456BGe4h
+
+console.log(headers.get('Content-Type', true)); // parse key-value pairs from a string separated with \s,;= delimiters:
+// [Object: null prototype] {
+// 'multipart/form-data': undefined,
+// boundary: 'Asrf456BGe4h'
+// }
+
+
+console.log(headers.get('Content-Type', (value, name, headers) => {
+ return String(value).replace(/a/g, 'ZZZ');
+}));
+// multipZZZrt/form-dZZZtZZZ; boundZZZry=Asrf456BGe4h
+
+console.log(headers.get('Content-Type', /boundary=(\w+)/)?.[0]);
+// boundary=Asrf456BGe4h
+
+```
+
+Returns the value of the header.
+
+### AxiosHeaders#has(header, matcher?)
+
+```
+has(header: string, matcher?: AxiosHeaderMatcher): boolean;
+```
+
+Returns `true` if the header is set (has no `undefined` value).
+
+### AxiosHeaders#delete(header, matcher?)
+
+```
+delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
+```
+
+Returns `true` if at least one header has been removed.
+
+### AxiosHeaders#clear(matcher?)
+
+```
+clear(matcher?: AxiosHeaderMatcher): boolean;
+```
+
+Removes all headers.
+Unlike the `delete` method matcher, this optional matcher will be used to match against the header name rather than the value.
+
+```ts
+const headers = new AxiosHeaders({
+ 'foo': '1',
+ 'x-foo': '2',
+ 'x-bar': '3',
+});
+
+console.log(headers.clear(/^x-/)); // true
+
+console.log(headers.toJSON()); // [Object: null prototype] { foo: '1' }
+```
+
+Returns `true` if at least one header has been cleared.
+
+### AxiosHeaders#normalize(format);
+
+If the headers object was changed directly, it can have duplicates with the same name but in different cases.
+This method normalizes the headers object by combining duplicate keys into one.
+Axios uses this method internally after calling each interceptor.
+Set `format` to true for converting headers name to lowercase and capitalize the initial letters (`cOntEnt-type` => `Content-Type`)
+
+```js
+const headers = new AxiosHeaders({
+ 'foo': '1',
+});
+
+headers.Foo = '2';
+headers.FOO = '3';
+
+console.log(headers.toJSON()); // [Object: null prototype] { foo: '1', Foo: '2', FOO: '3' }
+console.log(headers.normalize().toJSON()); // [Object: null prototype] { foo: '3' }
+console.log(headers.normalize(true).toJSON()); // [Object: null prototype] { Foo: '3' }
+```
+
+Returns `this`.
+
+### AxiosHeaders#concat(...targets)
+
+```
+concat(...targets: Array): AxiosHeaders;
+```
+
+Merges the instance with targets into a new `AxiosHeaders` instance. If the target is a string, it will be parsed as RAW HTTP headers.
+
+Returns a new `AxiosHeaders` instance.
+
+### AxiosHeaders#toJSON(asStrings?)
+
+````
+toJSON(asStrings?: boolean): RawAxiosHeaders;
+````
+
+Resolve all internal headers values into a new null prototype object.
+Set `asStrings` to true to resolve arrays as a string containing all elements, separated by commas.
+
+### AxiosHeaders.from(thing?)
+
+````
+from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
+````
+
+Returns a new `AxiosHeaders` instance created from the raw headers passed in,
+or simply returns the given headers object if it's an `AxiosHeaders` instance.
+
+### AxiosHeaders.concat(...targets)
+
+````
+concat(...targets: Array): AxiosHeaders;
+````
+
+Returns a new `AxiosHeaders` instance created by merging the target objects.
+
+### Shortcuts
+
+The following shortcuts are available:
+
+- `setContentType`, `getContentType`, `hasContentType`
+
+- `setContentLength`, `getContentLength`, `hasContentLength`
+
+- `setAccept`, `getAccept`, `hasAccept`
+
+- `setUserAgent`, `getUserAgent`, `hasUserAgent`
+
+- `setContentEncoding`, `getContentEncoding`, `hasContentEncoding`
+
+## 🔥 Fetch adapter
+
+Fetch adapter was introduced in `v1.7.0`. By default, it will be used if `xhr` and `http` adapters are not available in the build,
+or not supported by the environment.
+To use it by default, it must be selected explicitly:
+
+```js
+const {data} = axios.get(url, {
+ adapter: 'fetch' // by default ['xhr', 'http', 'fetch']
+})
+```
+
+You can create a separate instance for this:
+
+```js
+const fetchAxios = axios.create({
+ adapter: 'fetch'
+});
+
+const {data} = fetchAxios.get(url);
+```
+
+The adapter supports the same functionality as `xhr` adapter, **including upload and download progress capturing**.
+Also, it supports additional response types such as `stream` and `formdata` (if supported by the environment).
+
+## Semver
+
+Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes.
+
+## Promises
+
+axios depends on a native ES6 Promise implementation to be [supported](https://caniuse.com/promises).
+If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).
+
+## TypeScript
+
+axios includes [TypeScript](https://typescriptlang.org) definitions and a type guard for axios errors.
+
+```typescript
+let user: User = null;
+try {
+ const { data } = await axios.get('/user?ID=12345');
+ user = data.userDetails;
+} catch (error) {
+ if (axios.isAxiosError(error)) {
+ handleAxiosError(error);
+ } else {
+ handleUnexpectedError(error);
+ }
+}
+```
+
+Because axios dual publishes with an ESM default export and a CJS `module.exports`, there are some caveats.
+The recommended setting is to use `"moduleResolution": "node16"` (this is implied by `"module": "node16"`). Note that this requires TypeScript 4.7 or greater.
+If use ESM, your settings should be fine.
+If you compile TypeScript to CJS and you can’t use `"moduleResolution": "node 16"`, you have to enable `esModuleInterop`.
+If you use TypeScript to type check CJS JavaScript code, your only option is to use `"moduleResolution": "node16"`.
+
+## Online one-click setup
+
+You can use Gitpod, an online IDE(which is free for Open Source) for contributing or running the examples online.
+
+[](https://gitpod.io/#https://github.com/axios/axios/blob/main/examples/server.js)
+
+
+## Resources
+
+* [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
+* [Ecosystem](https://github.com/axios/axios/blob/v1.x/ECOSYSTEM.md)
+* [Contributing Guide](https://github.com/axios/axios/blob/v1.x/CONTRIBUTING.md)
+* [Code of Conduct](https://github.com/axios/axios/blob/v1.x/CODE_OF_CONDUCT.md)
+
+## Credits
+
+axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [AngularJS](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of AngularJS.
+
+## License
+
+[MIT](LICENSE)
diff --git a/node_modules/axios/SECURITY.md b/node_modules/axios/SECURITY.md
new file mode 100644
index 0000000..a5a2b7d
--- /dev/null
+++ b/node_modules/axios/SECURITY.md
@@ -0,0 +1,6 @@
+# Reporting a Vulnerability
+
+If you discover a security vulnerability in axios please disclose it via [our huntr page](https://huntr.dev/repos/axios/axios/). Bounty eligibility, CVE assignment, response times and past reports are all there.
+
+
+Thank you for improving the security of axios.
diff --git a/node_modules/axios/dist/axios.js b/node_modules/axios/dist/axios.js
new file mode 100644
index 0000000..1fe9c64
--- /dev/null
+++ b/node_modules/axios/dist/axios.js
@@ -0,0 +1,4288 @@
+// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
+})(this, (function () { 'use strict';
+
+ function _AsyncGenerator(e) {
+ var r, t;
+ function resume(r, t) {
+ try {
+ var n = e[r](t),
+ o = n.value,
+ u = o instanceof _OverloadYield;
+ Promise.resolve(u ? o.v : o).then(function (t) {
+ if (u) {
+ var i = "return" === r ? "return" : "next";
+ if (!o.k || t.done) return resume(i, t);
+ t = e[i](t).value;
+ }
+ settle(n.done ? "return" : "normal", t);
+ }, function (e) {
+ resume("throw", e);
+ });
+ } catch (e) {
+ settle("throw", e);
+ }
+ }
+ function settle(e, n) {
+ switch (e) {
+ case "return":
+ r.resolve({
+ value: n,
+ done: !0
+ });
+ break;
+ case "throw":
+ r.reject(n);
+ break;
+ default:
+ r.resolve({
+ value: n,
+ done: !1
+ });
+ }
+ (r = r.next) ? resume(r.key, r.arg) : t = null;
+ }
+ this._invoke = function (e, n) {
+ return new Promise(function (o, u) {
+ var i = {
+ key: e,
+ arg: n,
+ resolve: o,
+ reject: u,
+ next: null
+ };
+ t ? t = t.next = i : (r = t = i, resume(e, n));
+ });
+ }, "function" != typeof e.return && (this.return = void 0);
+ }
+ _AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
+ return this;
+ }, _AsyncGenerator.prototype.next = function (e) {
+ return this._invoke("next", e);
+ }, _AsyncGenerator.prototype.throw = function (e) {
+ return this._invoke("throw", e);
+ }, _AsyncGenerator.prototype.return = function (e) {
+ return this._invoke("return", e);
+ };
+ function _OverloadYield(t, e) {
+ this.v = t, this.k = e;
+ }
+ function _asyncGeneratorDelegate(t) {
+ var e = {},
+ n = !1;
+ function pump(e, r) {
+ return n = !0, r = new Promise(function (n) {
+ n(t[e](r));
+ }), {
+ done: !1,
+ value: new _OverloadYield(r, 1)
+ };
+ }
+ return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
+ return this;
+ }, e.next = function (t) {
+ return n ? (n = !1, t) : pump("next", t);
+ }, "function" == typeof t.throw && (e.throw = function (t) {
+ if (n) throw n = !1, t;
+ return pump("throw", t);
+ }), "function" == typeof t.return && (e.return = function (t) {
+ return n ? (n = !1, t) : pump("return", t);
+ }), e;
+ }
+ function _asyncIterator(r) {
+ var n,
+ t,
+ o,
+ e = 2;
+ for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
+ if (t && null != (n = r[t])) return n.call(r);
+ if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
+ t = "@@asyncIterator", o = "@@iterator";
+ }
+ throw new TypeError("Object is not async iterable");
+ }
+ function AsyncFromSyncIterator(r) {
+ function AsyncFromSyncIteratorContinuation(r) {
+ if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
+ var n = r.done;
+ return Promise.resolve(r.value).then(function (r) {
+ return {
+ value: r,
+ done: n
+ };
+ });
+ }
+ return AsyncFromSyncIterator = function (r) {
+ this.s = r, this.n = r.next;
+ }, AsyncFromSyncIterator.prototype = {
+ s: null,
+ n: null,
+ next: function () {
+ return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
+ },
+ return: function (r) {
+ var n = this.s.return;
+ return void 0 === n ? Promise.resolve({
+ value: r,
+ done: !0
+ }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
+ },
+ throw: function (r) {
+ var n = this.s.return;
+ return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
+ }
+ }, new AsyncFromSyncIterator(r);
+ }
+ function _awaitAsyncGenerator(e) {
+ return new _OverloadYield(e, 0);
+ }
+ function _iterableToArrayLimit(r, l) {
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
+ if (null != t) {
+ var e,
+ n,
+ i,
+ u,
+ a = [],
+ f = !0,
+ o = !1;
+ try {
+ if (i = (t = t.call(r)).next, 0 === l) {
+ if (Object(t) !== t) return;
+ f = !1;
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
+ } catch (r) {
+ o = !0, n = r;
+ } finally {
+ try {
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
+ } finally {
+ if (o) throw n;
+ }
+ }
+ return a;
+ }
+ }
+ function ownKeys(e, r) {
+ var t = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var o = Object.getOwnPropertySymbols(e);
+ r && (o = o.filter(function (r) {
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
+ })), t.push.apply(t, o);
+ }
+ return t;
+ }
+ function _objectSpread2(e) {
+ for (var r = 1; r < arguments.length; r++) {
+ var t = null != arguments[r] ? arguments[r] : {};
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
+ _defineProperty(e, r, t[r]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
+ });
+ }
+ return e;
+ }
+ function _regeneratorRuntime() {
+ _regeneratorRuntime = function () {
+ return e;
+ };
+ var t,
+ e = {},
+ r = Object.prototype,
+ n = r.hasOwnProperty,
+ o = Object.defineProperty || function (t, e, r) {
+ t[e] = r.value;
+ },
+ i = "function" == typeof Symbol ? Symbol : {},
+ a = i.iterator || "@@iterator",
+ c = i.asyncIterator || "@@asyncIterator",
+ u = i.toStringTag || "@@toStringTag";
+ function define(t, e, r) {
+ return Object.defineProperty(t, e, {
+ value: r,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0
+ }), t[e];
+ }
+ try {
+ define({}, "");
+ } catch (t) {
+ define = function (t, e, r) {
+ return t[e] = r;
+ };
+ }
+ function wrap(t, e, r, n) {
+ var i = e && e.prototype instanceof Generator ? e : Generator,
+ a = Object.create(i.prototype),
+ c = new Context(n || []);
+ return o(a, "_invoke", {
+ value: makeInvokeMethod(t, r, c)
+ }), a;
+ }
+ function tryCatch(t, e, r) {
+ try {
+ return {
+ type: "normal",
+ arg: t.call(e, r)
+ };
+ } catch (t) {
+ return {
+ type: "throw",
+ arg: t
+ };
+ }
+ }
+ e.wrap = wrap;
+ var h = "suspendedStart",
+ l = "suspendedYield",
+ f = "executing",
+ s = "completed",
+ y = {};
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+ var p = {};
+ define(p, a, function () {
+ return this;
+ });
+ var d = Object.getPrototypeOf,
+ v = d && d(d(values([])));
+ v && v !== r && n.call(v, a) && (p = v);
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
+ function defineIteratorMethods(t) {
+ ["next", "throw", "return"].forEach(function (e) {
+ define(t, e, function (t) {
+ return this._invoke(e, t);
+ });
+ });
+ }
+ function AsyncIterator(t, e) {
+ function invoke(r, o, i, a) {
+ var c = tryCatch(t[r], t, o);
+ if ("throw" !== c.type) {
+ var u = c.arg,
+ h = u.value;
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
+ invoke("next", t, i, a);
+ }, function (t) {
+ invoke("throw", t, i, a);
+ }) : e.resolve(h).then(function (t) {
+ u.value = t, i(u);
+ }, function (t) {
+ return invoke("throw", t, i, a);
+ });
+ }
+ a(c.arg);
+ }
+ var r;
+ o(this, "_invoke", {
+ value: function (t, n) {
+ function callInvokeWithMethodAndArg() {
+ return new e(function (e, r) {
+ invoke(t, n, e, r);
+ });
+ }
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
+ }
+ });
+ }
+ function makeInvokeMethod(e, r, n) {
+ var o = h;
+ return function (i, a) {
+ if (o === f) throw new Error("Generator is already running");
+ if (o === s) {
+ if ("throw" === i) throw a;
+ return {
+ value: t,
+ done: !0
+ };
+ }
+ for (n.method = i, n.arg = a;;) {
+ var c = n.delegate;
+ if (c) {
+ var u = maybeInvokeDelegate(c, n);
+ if (u) {
+ if (u === y) continue;
+ return u;
+ }
+ }
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
+ if (o === h) throw o = s, n.arg;
+ n.dispatchException(n.arg);
+ } else "return" === n.method && n.abrupt("return", n.arg);
+ o = f;
+ var p = tryCatch(e, r, n);
+ if ("normal" === p.type) {
+ if (o = n.done ? s : l, p.arg === y) continue;
+ return {
+ value: p.arg,
+ done: n.done
+ };
+ }
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
+ }
+ };
+ }
+ function maybeInvokeDelegate(e, r) {
+ var n = r.method,
+ o = e.iterator[n];
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
+ var i = tryCatch(o, e.iterator, r.arg);
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
+ var a = i.arg;
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
+ }
+ function pushTryEntry(t) {
+ var e = {
+ tryLoc: t[0]
+ };
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
+ }
+ function resetTryEntry(t) {
+ var e = t.completion || {};
+ e.type = "normal", delete e.arg, t.completion = e;
+ }
+ function Context(t) {
+ this.tryEntries = [{
+ tryLoc: "root"
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
+ }
+ function values(e) {
+ if (e || "" === e) {
+ var r = e[a];
+ if (r) return r.call(e);
+ if ("function" == typeof e.next) return e;
+ if (!isNaN(e.length)) {
+ var o = -1,
+ i = function next() {
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
+ return next.value = t, next.done = !0, next;
+ };
+ return i.next = i;
+ }
+ }
+ throw new TypeError(typeof e + " is not iterable");
+ }
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
+ value: GeneratorFunctionPrototype,
+ configurable: !0
+ }), o(GeneratorFunctionPrototype, "constructor", {
+ value: GeneratorFunction,
+ configurable: !0
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
+ var e = "function" == typeof t && t.constructor;
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
+ }, e.mark = function (t) {
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
+ }, e.awrap = function (t) {
+ return {
+ __await: t
+ };
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
+ return this;
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
+ void 0 === i && (i = Promise);
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
+ return t.done ? t.value : a.next();
+ });
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
+ return this;
+ }), define(g, "toString", function () {
+ return "[object Generator]";
+ }), e.keys = function (t) {
+ var e = Object(t),
+ r = [];
+ for (var n in e) r.push(n);
+ return r.reverse(), function next() {
+ for (; r.length;) {
+ var t = r.pop();
+ if (t in e) return next.value = t, next.done = !1, next;
+ }
+ return next.done = !0, next;
+ };
+ }, e.values = values, Context.prototype = {
+ constructor: Context,
+ reset: function (e) {
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
+ },
+ stop: function () {
+ this.done = !0;
+ var t = this.tryEntries[0].completion;
+ if ("throw" === t.type) throw t.arg;
+ return this.rval;
+ },
+ dispatchException: function (e) {
+ if (this.done) throw e;
+ var r = this;
+ function handle(n, o) {
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
+ }
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
+ var i = this.tryEntries[o],
+ a = i.completion;
+ if ("root" === i.tryLoc) return handle("end");
+ if (i.tryLoc <= this.prev) {
+ var c = n.call(i, "catchLoc"),
+ u = n.call(i, "finallyLoc");
+ if (c && u) {
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
+ } else if (c) {
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
+ } else {
+ if (!u) throw new Error("try statement without catch or finally");
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
+ }
+ }
+ }
+ },
+ abrupt: function (t, e) {
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
+ var o = this.tryEntries[r];
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+ var i = o;
+ break;
+ }
+ }
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
+ var a = i ? i.completion : {};
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
+ },
+ complete: function (t, e) {
+ if ("throw" === t.type) throw t.arg;
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
+ },
+ finish: function (t) {
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+ var r = this.tryEntries[e];
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
+ }
+ },
+ catch: function (t) {
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+ var r = this.tryEntries[e];
+ if (r.tryLoc === t) {
+ var n = r.completion;
+ if ("throw" === n.type) {
+ var o = n.arg;
+ resetTryEntry(r);
+ }
+ return o;
+ }
+ }
+ throw new Error("illegal catch attempt");
+ },
+ delegateYield: function (e, r, n) {
+ return this.delegate = {
+ iterator: values(e),
+ resultName: r,
+ nextLoc: n
+ }, "next" === this.method && (this.arg = t), y;
+ }
+ }, e;
+ }
+ function _toPrimitive(t, r) {
+ if ("object" != typeof t || !t) return t;
+ var e = t[Symbol.toPrimitive];
+ if (void 0 !== e) {
+ var i = e.call(t, r || "default");
+ if ("object" != typeof i) return i;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return ("string" === r ? String : Number)(t);
+ }
+ function _toPropertyKey(t) {
+ var i = _toPrimitive(t, "string");
+ return "symbol" == typeof i ? i : String(i);
+ }
+ function _typeof(o) {
+ "@babel/helpers - typeof";
+
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
+ return typeof o;
+ } : function (o) {
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
+ }, _typeof(o);
+ }
+ function _wrapAsyncGenerator(fn) {
+ return function () {
+ return new _AsyncGenerator(fn.apply(this, arguments));
+ };
+ }
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+ }
+ function _asyncToGenerator(fn) {
+ return function () {
+ var self = this,
+ args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+ _next(undefined);
+ });
+ };
+ }
+ function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+ }
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
+ }
+ }
+ function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ Object.defineProperty(Constructor, "prototype", {
+ writable: false
+ });
+ return Constructor;
+ }
+ function _defineProperty(obj, key, value) {
+ key = _toPropertyKey(key);
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+ return obj;
+ }
+ function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+ }
+ function _toArray(arr) {
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
+ }
+ function _toConsumableArray(arr) {
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
+ }
+ function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
+ }
+ function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+ }
+ function _iterableToArray(iter) {
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
+ }
+ function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+ }
+ function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+ return arr2;
+ }
+ function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+ function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+ function _createForOfIteratorHelper(o, allowArrayLike) {
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
+ if (!it) {
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
+ if (it) o = it;
+ var i = 0;
+ var F = function () {};
+ return {
+ s: F,
+ n: function () {
+ if (i >= o.length) return {
+ done: true
+ };
+ return {
+ done: false,
+ value: o[i++]
+ };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: F
+ };
+ }
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+ var normalCompletion = true,
+ didErr = false,
+ err;
+ return {
+ s: function () {
+ it = it.call(o);
+ },
+ n: function () {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function (e) {
+ didErr = true;
+ err = e;
+ },
+ f: function () {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+ }
+
+ function bind(fn, thisArg) {
+ return function wrap() {
+ return fn.apply(thisArg, arguments);
+ };
+ }
+
+ // utils is a library of generic helper functions non-specific to axios
+
+ var toString = Object.prototype.toString;
+ var getPrototypeOf = Object.getPrototypeOf;
+ var kindOf = function (cache) {
+ return function (thing) {
+ var str = toString.call(thing);
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+ };
+ }(Object.create(null));
+ var kindOfTest = function kindOfTest(type) {
+ type = type.toLowerCase();
+ return function (thing) {
+ return kindOf(thing) === type;
+ };
+ };
+ var typeOfTest = function typeOfTest(type) {
+ return function (thing) {
+ return _typeof(thing) === type;
+ };
+ };
+
+ /**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ *
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+ var isArray = Array.isArray;
+
+ /**
+ * Determine if a value is undefined
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+ var isUndefined = typeOfTest('undefined');
+
+ /**
+ * Determine if a value is a Buffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Buffer, otherwise false
+ */
+ function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+ }
+
+ /**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
+
+ /**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+ function isArrayBufferView(val) {
+ var result;
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = val && val.buffer && isArrayBuffer(val.buffer);
+ }
+ return result;
+ }
+
+ /**
+ * Determine if a value is a String
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+ var isString = typeOfTest('string');
+
+ /**
+ * Determine if a value is a Function
+ *
+ * @param {*} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+ var isFunction = typeOfTest('function');
+
+ /**
+ * Determine if a value is a Number
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+ var isNumber = typeOfTest('number');
+
+ /**
+ * Determine if a value is an Object
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+ var isObject = function isObject(thing) {
+ return thing !== null && _typeof(thing) === 'object';
+ };
+
+ /**
+ * Determine if a value is a Boolean
+ *
+ * @param {*} thing The value to test
+ * @returns {boolean} True if value is a Boolean, otherwise false
+ */
+ var isBoolean = function isBoolean(thing) {
+ return thing === true || thing === false;
+ };
+
+ /**
+ * Determine if a value is a plain Object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a plain Object, otherwise false
+ */
+ var isPlainObject = function isPlainObject(val) {
+ if (kindOf(val) !== 'object') {
+ return false;
+ }
+ var prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
+ };
+
+ /**
+ * Determine if a value is a Date
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+ var isDate = kindOfTest('Date');
+
+ /**
+ * Determine if a value is a File
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+ var isFile = kindOfTest('File');
+
+ /**
+ * Determine if a value is a Blob
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+ var isBlob = kindOfTest('Blob');
+
+ /**
+ * Determine if a value is a FileList
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+ var isFileList = kindOfTest('FileList');
+
+ /**
+ * Determine if a value is a Stream
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+ var isStream = function isStream(val) {
+ return isObject(val) && isFunction(val.pipe);
+ };
+
+ /**
+ * Determine if a value is a FormData
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+ var isFormData = function isFormData(thing) {
+ var kind;
+ return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
+ // detect form-data instance
+ kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'));
+ };
+
+ /**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+ var isURLSearchParams = kindOfTest('URLSearchParams');
+ var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
+ _map2 = _slicedToArray(_map, 4),
+ isReadableStream = _map2[0],
+ isRequest = _map2[1],
+ isResponse = _map2[2],
+ isHeaders = _map2[3];
+
+ /**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ *
+ * @returns {String} The String freed of excess whitespace
+ */
+ var trim = function trim(str) {
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+ };
+
+ /**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ *
+ * @param {Boolean} [allOwnKeys = false]
+ * @returns {any}
+ */
+ function forEach(obj, fn) {
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
+ _ref$allOwnKeys = _ref.allOwnKeys,
+ allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+ var i;
+ var l;
+
+ // Force an array if not already something iterable
+ if (_typeof(obj) !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+ var len = keys.length;
+ var key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+ }
+ function findKey(obj, key) {
+ key = key.toLowerCase();
+ var keys = Object.keys(obj);
+ var i = keys.length;
+ var _key;
+ while (i-- > 0) {
+ _key = keys[i];
+ if (key === _key.toLowerCase()) {
+ return _key;
+ }
+ }
+ return null;
+ }
+ var _global = function () {
+ /*eslint no-undef:0*/
+ if (typeof globalThis !== "undefined") return globalThis;
+ return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global;
+ }();
+ var isContextDefined = function isContextDefined(context) {
+ return !isUndefined(context) && context !== _global;
+ };
+
+ /**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ *
+ * @returns {Object} Result of all merge properties
+ */
+ function merge( /* obj1, obj2, obj3, ... */
+ ) {
+ var _ref2 = isContextDefined(this) && this || {},
+ caseless = _ref2.caseless;
+ var result = {};
+ var assignValue = function assignValue(val, key) {
+ var targetKey = caseless && findKey(result, key) || key;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else {
+ result[targetKey] = val;
+ }
+ };
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ arguments[i] && forEach(arguments[i], assignValue);
+ }
+ return result;
+ }
+
+ /**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ *
+ * @param {Boolean} [allOwnKeys]
+ * @returns {Object} The resulting value of object a
+ */
+ var extend = function extend(a, b, thisArg) {
+ var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
+ allOwnKeys = _ref3.allOwnKeys;
+ forEach(b, function (val, key) {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ }, {
+ allOwnKeys: allOwnKeys
+ });
+ return a;
+ };
+
+ /**
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ *
+ * @param {string} content with BOM
+ *
+ * @returns {string} content value without BOM
+ */
+ var stripBOM = function stripBOM(content) {
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+ };
+
+ /**
+ * Inherit the prototype methods from one constructor into another
+ * @param {function} constructor
+ * @param {function} superConstructor
+ * @param {object} [props]
+ * @param {object} [descriptors]
+ *
+ * @returns {void}
+ */
+ var inherits = function inherits(constructor, superConstructor, props, descriptors) {
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+ constructor.prototype.constructor = constructor;
+ Object.defineProperty(constructor, 'super', {
+ value: superConstructor.prototype
+ });
+ props && Object.assign(constructor.prototype, props);
+ };
+
+ /**
+ * Resolve object with deep prototype chain to a flat object
+ * @param {Object} sourceObj source object
+ * @param {Object} [destObj]
+ * @param {Function|Boolean} [filter]
+ * @param {Function} [propFilter]
+ *
+ * @returns {Object}
+ */
+ var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) {
+ var props;
+ var i;
+ var prop;
+ var merged = {};
+ destObj = destObj || {};
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ if (sourceObj == null) return destObj;
+ do {
+ props = Object.getOwnPropertyNames(sourceObj);
+ i = props.length;
+ while (i-- > 0) {
+ prop = props[i];
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+ destObj[prop] = sourceObj[prop];
+ merged[prop] = true;
+ }
+ }
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+ return destObj;
+ };
+
+ /**
+ * Determines whether a string ends with the characters of a specified string
+ *
+ * @param {String} str
+ * @param {String} searchString
+ * @param {Number} [position= 0]
+ *
+ * @returns {boolean}
+ */
+ var endsWith = function endsWith(str, searchString, position) {
+ str = String(str);
+ if (position === undefined || position > str.length) {
+ position = str.length;
+ }
+ position -= searchString.length;
+ var lastIndex = str.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+ };
+
+ /**
+ * Returns new array from array like object or null if failed
+ *
+ * @param {*} [thing]
+ *
+ * @returns {?Array}
+ */
+ var toArray = function toArray(thing) {
+ if (!thing) return null;
+ if (isArray(thing)) return thing;
+ var i = thing.length;
+ if (!isNumber(i)) return null;
+ var arr = new Array(i);
+ while (i-- > 0) {
+ arr[i] = thing[i];
+ }
+ return arr;
+ };
+
+ /**
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+ * thing passed in is an instance of Uint8Array
+ *
+ * @param {TypedArray}
+ *
+ * @returns {Array}
+ */
+ // eslint-disable-next-line func-names
+ var isTypedArray = function (TypedArray) {
+ // eslint-disable-next-line func-names
+ return function (thing) {
+ return TypedArray && thing instanceof TypedArray;
+ };
+ }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+ /**
+ * For each entry in the object, call the function with the key and value.
+ *
+ * @param {Object} obj - The object to iterate over.
+ * @param {Function} fn - The function to call for each entry.
+ *
+ * @returns {void}
+ */
+ var forEachEntry = function forEachEntry(obj, fn) {
+ var generator = obj && obj[Symbol.iterator];
+ var iterator = generator.call(obj);
+ var result;
+ while ((result = iterator.next()) && !result.done) {
+ var pair = result.value;
+ fn.call(obj, pair[0], pair[1]);
+ }
+ };
+
+ /**
+ * It takes a regular expression and a string, and returns an array of all the matches
+ *
+ * @param {string} regExp - The regular expression to match against.
+ * @param {string} str - The string to search.
+ *
+ * @returns {Array}
+ */
+ var matchAll = function matchAll(regExp, str) {
+ var matches;
+ var arr = [];
+ while ((matches = regExp.exec(str)) !== null) {
+ arr.push(matches);
+ }
+ return arr;
+ };
+
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+ var isHTMLForm = kindOfTest('HTMLFormElement');
+ var toCamelCase = function toCamelCase(str) {
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
+ return p1.toUpperCase() + p2;
+ });
+ };
+
+ /* Creating a function that will check if an object has a property. */
+ var hasOwnProperty = function (_ref4) {
+ var hasOwnProperty = _ref4.hasOwnProperty;
+ return function (obj, prop) {
+ return hasOwnProperty.call(obj, prop);
+ };
+ }(Object.prototype);
+
+ /**
+ * Determine if a value is a RegExp object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a RegExp object, otherwise false
+ */
+ var isRegExp = kindOfTest('RegExp');
+ var reduceDescriptors = function reduceDescriptors(obj, reducer) {
+ var descriptors = Object.getOwnPropertyDescriptors(obj);
+ var reducedDescriptors = {};
+ forEach(descriptors, function (descriptor, name) {
+ var ret;
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
+ reducedDescriptors[name] = ret || descriptor;
+ }
+ });
+ Object.defineProperties(obj, reducedDescriptors);
+ };
+
+ /**
+ * Makes all methods read-only
+ * @param {Object} obj
+ */
+
+ var freezeMethods = function freezeMethods(obj) {
+ reduceDescriptors(obj, function (descriptor, name) {
+ // skip restricted props in strict mode
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+ return false;
+ }
+ var value = obj[name];
+ if (!isFunction(value)) return;
+ descriptor.enumerable = false;
+ if ('writable' in descriptor) {
+ descriptor.writable = false;
+ return;
+ }
+ if (!descriptor.set) {
+ descriptor.set = function () {
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
+ };
+ }
+ });
+ };
+ var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
+ var obj = {};
+ var define = function define(arr) {
+ arr.forEach(function (value) {
+ obj[value] = true;
+ });
+ };
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+ return obj;
+ };
+ var noop = function noop() {};
+ var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+ };
+ var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
+ var DIGIT = '0123456789';
+ var ALPHABET = {
+ DIGIT: DIGIT,
+ ALPHA: ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+ };
+ var generateString = function generateString() {
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
+ var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
+ var str = '';
+ var length = alphabet.length;
+ while (size--) {
+ str += alphabet[Math.random() * length | 0];
+ }
+ return str;
+ };
+
+ /**
+ * If the thing is a FormData object, return true, otherwise return false.
+ *
+ * @param {unknown} thing - The thing to check.
+ *
+ * @returns {boolean}
+ */
+ function isSpecCompliantForm(thing) {
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
+ }
+ var toJSONObject = function toJSONObject(obj) {
+ var stack = new Array(10);
+ var visit = function visit(source, i) {
+ if (isObject(source)) {
+ if (stack.indexOf(source) >= 0) {
+ return;
+ }
+ if (!('toJSON' in source)) {
+ stack[i] = source;
+ var target = isArray(source) ? [] : {};
+ forEach(source, function (value, key) {
+ var reducedValue = visit(value, i + 1);
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
+ });
+ stack[i] = undefined;
+ return target;
+ }
+ }
+ return source;
+ };
+ return visit(obj, 0);
+ };
+ var isAsyncFn = kindOfTest('AsyncFunction');
+ var isThenable = function isThenable(thing) {
+ return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]);
+ };
+
+ // original code
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+ var _setImmediate = function (setImmediateSupported, postMessageSupported) {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+ return postMessageSupported ? function (token, callbacks) {
+ _global.addEventListener("message", function (_ref5) {
+ var source = _ref5.source,
+ data = _ref5.data;
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+ return function (cb) {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ };
+ }("axios@".concat(Math.random()), []) : function (cb) {
+ return setTimeout(cb);
+ };
+ }(typeof setImmediate === 'function', isFunction(_global.postMessage));
+ var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
+
+ // *********************
+
+ var utils$1 = {
+ isArray: isArray,
+ isArrayBuffer: isArrayBuffer,
+ isBuffer: isBuffer,
+ isFormData: isFormData,
+ isArrayBufferView: isArrayBufferView,
+ isString: isString,
+ isNumber: isNumber,
+ isBoolean: isBoolean,
+ isObject: isObject,
+ isPlainObject: isPlainObject,
+ isReadableStream: isReadableStream,
+ isRequest: isRequest,
+ isResponse: isResponse,
+ isHeaders: isHeaders,
+ isUndefined: isUndefined,
+ isDate: isDate,
+ isFile: isFile,
+ isBlob: isBlob,
+ isRegExp: isRegExp,
+ isFunction: isFunction,
+ isStream: isStream,
+ isURLSearchParams: isURLSearchParams,
+ isTypedArray: isTypedArray,
+ isFileList: isFileList,
+ forEach: forEach,
+ merge: merge,
+ extend: extend,
+ trim: trim,
+ stripBOM: stripBOM,
+ inherits: inherits,
+ toFlatObject: toFlatObject,
+ kindOf: kindOf,
+ kindOfTest: kindOfTest,
+ endsWith: endsWith,
+ toArray: toArray,
+ forEachEntry: forEachEntry,
+ matchAll: matchAll,
+ isHTMLForm: isHTMLForm,
+ hasOwnProperty: hasOwnProperty,
+ hasOwnProp: hasOwnProperty,
+ // an alias to avoid ESLint no-prototype-builtins detection
+ reduceDescriptors: reduceDescriptors,
+ freezeMethods: freezeMethods,
+ toObjectSet: toObjectSet,
+ toCamelCase: toCamelCase,
+ noop: noop,
+ toFiniteNumber: toFiniteNumber,
+ findKey: findKey,
+ global: _global,
+ isContextDefined: isContextDefined,
+ ALPHABET: ALPHABET,
+ generateString: generateString,
+ isSpecCompliantForm: isSpecCompliantForm,
+ toJSONObject: toJSONObject,
+ isAsyncFn: isAsyncFn,
+ isThenable: isThenable,
+ setImmediate: _setImmediate,
+ asap: asap
+ };
+
+ /**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [config] The config.
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ *
+ * @returns {Error} The created error.
+ */
+ function AxiosError(message, code, config, request, response) {
+ Error.call(this);
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error().stack;
+ }
+ this.message = message;
+ this.name = 'AxiosError';
+ code && (this.code = code);
+ config && (this.config = config);
+ request && (this.request = request);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
+ }
+ utils$1.inherits(AxiosError, Error, {
+ toJSON: function toJSON() {
+ return {
+ // Standard
+ message: this.message,
+ name: this.name,
+ // Microsoft
+ description: this.description,
+ number: this.number,
+ // Mozilla
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ // Axios
+ config: utils$1.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+ }
+ });
+ var prototype$1 = AxiosError.prototype;
+ var descriptors = {};
+ ['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL'
+ // eslint-disable-next-line func-names
+ ].forEach(function (code) {
+ descriptors[code] = {
+ value: code
+ };
+ });
+ Object.defineProperties(AxiosError, descriptors);
+ Object.defineProperty(prototype$1, 'isAxiosError', {
+ value: true
+ });
+
+ // eslint-disable-next-line func-names
+ AxiosError.from = function (error, code, config, request, response, customProps) {
+ var axiosError = Object.create(prototype$1);
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
+ return obj !== Error.prototype;
+ }, function (prop) {
+ return prop !== 'isAxiosError';
+ });
+ AxiosError.call(axiosError, error.message, code, config, request, response);
+ axiosError.cause = error;
+ axiosError.name = error.name;
+ customProps && Object.assign(axiosError, customProps);
+ return axiosError;
+ };
+
+ // eslint-disable-next-line strict
+ var httpAdapter = null;
+
+ /**
+ * Determines if the given thing is a array or js object.
+ *
+ * @param {string} thing - The object or array to be visited.
+ *
+ * @returns {boolean}
+ */
+ function isVisitable(thing) {
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
+ }
+
+ /**
+ * It removes the brackets from the end of a string
+ *
+ * @param {string} key - The key of the parameter.
+ *
+ * @returns {string} the key without the brackets.
+ */
+ function removeBrackets(key) {
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
+ }
+
+ /**
+ * It takes a path, a key, and a boolean, and returns a string
+ *
+ * @param {string} path - The path to the current key.
+ * @param {string} key - The key of the current object being iterated over.
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+ *
+ * @returns {string} The path to the current key.
+ */
+ function renderKey(path, key, dots) {
+ if (!path) return key;
+ return path.concat(key).map(function each(token, i) {
+ // eslint-disable-next-line no-param-reassign
+ token = removeBrackets(token);
+ return !dots && i ? '[' + token + ']' : token;
+ }).join(dots ? '.' : '');
+ }
+
+ /**
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
+ *
+ * @param {Array} arr - The array to check
+ *
+ * @returns {boolean}
+ */
+ function isFlatArray(arr) {
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
+ }
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
+ return /^is[A-Z]/.test(prop);
+ });
+
+ /**
+ * Convert a data object to FormData
+ *
+ * @param {Object} obj
+ * @param {?Object} [formData]
+ * @param {?Object} [options]
+ * @param {Function} [options.visitor]
+ * @param {Boolean} [options.metaTokens = true]
+ * @param {Boolean} [options.dots = false]
+ * @param {?Boolean} [options.indexes = false]
+ *
+ * @returns {Object}
+ **/
+
+ /**
+ * It converts an object into a FormData object
+ *
+ * @param {Object} obj - The object to convert to form data.
+ * @param {string} formData - The FormData object to append to.
+ * @param {Object} options
+ *
+ * @returns
+ */
+ function toFormData(obj, formData, options) {
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('target must be an object');
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ formData = formData || new (FormData)();
+
+ // eslint-disable-next-line no-param-reassign
+ options = utils$1.toFlatObject(options, {
+ metaTokens: true,
+ dots: false,
+ indexes: false
+ }, false, function defined(option, source) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ return !utils$1.isUndefined(source[option]);
+ });
+ var metaTokens = options.metaTokens;
+ // eslint-disable-next-line no-use-before-define
+ var visitor = options.visitor || defaultVisitor;
+ var dots = options.dots;
+ var indexes = options.indexes;
+ var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+ var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
+ if (!utils$1.isFunction(visitor)) {
+ throw new TypeError('visitor must be a function');
+ }
+ function convertValue(value) {
+ if (value === null) return '';
+ if (utils$1.isDate(value)) {
+ return value.toISOString();
+ }
+ if (!useBlob && utils$1.isBlob(value)) {
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
+ }
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+ }
+ return value;
+ }
+
+ /**
+ * Default visitor.
+ *
+ * @param {*} value
+ * @param {String|Number} key
+ * @param {Array} path
+ * @this {FormData}
+ *
+ * @returns {boolean} return true to visit the each prop of the value recursively
+ */
+ function defaultVisitor(value, key, path) {
+ var arr = value;
+ if (value && !path && _typeof(value) === 'object') {
+ if (utils$1.endsWith(key, '{}')) {
+ // eslint-disable-next-line no-param-reassign
+ key = metaTokens ? key : key.slice(0, -2);
+ // eslint-disable-next-line no-param-reassign
+ value = JSON.stringify(value);
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
+ // eslint-disable-next-line no-param-reassign
+ key = removeBrackets(key);
+ arr.forEach(function each(el, index) {
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
+ // eslint-disable-next-line no-nested-ternary
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
+ });
+ return false;
+ }
+ }
+ if (isVisitable(value)) {
+ return true;
+ }
+ formData.append(renderKey(path, key, dots), convertValue(value));
+ return false;
+ }
+ var stack = [];
+ var exposedHelpers = Object.assign(predicates, {
+ defaultVisitor: defaultVisitor,
+ convertValue: convertValue,
+ isVisitable: isVisitable
+ });
+ function build(value, path) {
+ if (utils$1.isUndefined(value)) return;
+ if (stack.indexOf(value) !== -1) {
+ throw Error('Circular reference detected in ' + path.join('.'));
+ }
+ stack.push(value);
+ utils$1.forEach(value, function each(el, key) {
+ var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
+ if (result === true) {
+ build(el, path ? path.concat(key) : [key]);
+ }
+ });
+ stack.pop();
+ }
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('data must be an object');
+ }
+ build(obj);
+ return formData;
+ }
+
+ /**
+ * It encodes a string by replacing all characters that are not in the unreserved set with
+ * their percent-encoded equivalents
+ *
+ * @param {string} str - The string to encode.
+ *
+ * @returns {string} The encoded string.
+ */
+ function encode$1(str) {
+ var charMap = {
+ '!': '%21',
+ "'": '%27',
+ '(': '%28',
+ ')': '%29',
+ '~': '%7E',
+ '%20': '+',
+ '%00': '\x00'
+ };
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+ return charMap[match];
+ });
+ }
+
+ /**
+ * It takes a params object and converts it to a FormData object
+ *
+ * @param {Object} params - The parameters to be converted to a FormData object.
+ * @param {Object} options - The options object passed to the Axios constructor.
+ *
+ * @returns {void}
+ */
+ function AxiosURLSearchParams(params, options) {
+ this._pairs = [];
+ params && toFormData(params, this, options);
+ }
+ var prototype = AxiosURLSearchParams.prototype;
+ prototype.append = function append(name, value) {
+ this._pairs.push([name, value]);
+ };
+ prototype.toString = function toString(encoder) {
+ var _encode = encoder ? function (value) {
+ return encoder.call(this, value, encode$1);
+ } : encode$1;
+ return this._pairs.map(function each(pair) {
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
+ }, '').join('&');
+ };
+
+ /**
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+ * URI encoded counterparts
+ *
+ * @param {string} val The value to be encoded.
+ *
+ * @returns {string} The encoded value.
+ */
+ function encode(val) {
+ return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
+ }
+
+ /**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @param {?(object|Function)} options
+ *
+ * @returns {string} The formatted url
+ */
+ function buildURL(url, params, options) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+ var _encode = options && options.encode || encode;
+ if (utils$1.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
+ var serializeFn = options && options.serialize;
+ var serializedParams;
+ if (serializeFn) {
+ serializedParams = serializeFn(params, options);
+ } else {
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
+ }
+ if (serializedParams) {
+ var hashmarkIndex = url.indexOf("#");
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+ return url;
+ }
+
+ var InterceptorManager = /*#__PURE__*/function () {
+ function InterceptorManager() {
+ _classCallCheck(this, InterceptorManager);
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ _createClass(InterceptorManager, [{
+ key: "use",
+ value: function use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled: fulfilled,
+ rejected: rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ }
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ *
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
+ */
+ }, {
+ key: "eject",
+ value: function eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ }
+
+ /**
+ * Clear all interceptors from the stack
+ *
+ * @returns {void}
+ */
+ }, {
+ key: "clear",
+ value: function clear() {
+ if (this.handlers) {
+ this.handlers = [];
+ }
+ }
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ *
+ * @returns {void}
+ */
+ }, {
+ key: "forEach",
+ value: function forEach(fn) {
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ }
+ }]);
+ return InterceptorManager;
+ }();
+ var InterceptorManager$1 = InterceptorManager;
+
+ var transitionalDefaults = {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+ };
+
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
+
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
+
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
+
+ var platform$1 = {
+ isBrowser: true,
+ classes: {
+ URLSearchParams: URLSearchParams$1,
+ FormData: FormData$1,
+ Blob: Blob$1
+ },
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
+ };
+
+ var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+ var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined;
+
+ /**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ * nativescript
+ * navigator.product -> 'NativeScript' or 'NS'
+ *
+ * @returns {boolean}
+ */
+ var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+ /**
+ * Determine if we're running in a standard browser webWorker environment
+ *
+ * Although the `isStandardBrowserEnv` method indicates that
+ * `allows axios to run in a web worker`, the WebWorker will still be
+ * filtered out due to its judgment standard
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+ * This leads to a problem when axios post `FormData` in webWorker
+ */
+ var hasStandardBrowserWebWorkerEnv = function () {
+ return typeof WorkerGlobalScope !== 'undefined' &&
+ // eslint-disable-next-line no-undef
+ self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
+ }();
+ var origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+ var utils = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ hasBrowserEnv: hasBrowserEnv,
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
+ navigator: _navigator,
+ origin: origin
+ });
+
+ var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
+
+ function toURLEncodedForm(data, options) {
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
+ visitor: function visitor(value, key, path, helpers) {
+ if (platform.isNode && utils$1.isBuffer(value)) {
+ this.append(key, value.toString('base64'));
+ return false;
+ }
+ return helpers.defaultVisitor.apply(this, arguments);
+ }
+ }, options));
+ }
+
+ /**
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+ *
+ * @param {string} name - The name of the property to get.
+ *
+ * @returns An array of strings.
+ */
+ function parsePropPath(name) {
+ // foo[x][y][z]
+ // foo.x.y.z
+ // foo-x-y-z
+ // foo x y z
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
+ return match[0] === '[]' ? '' : match[1] || match[0];
+ });
+ }
+
+ /**
+ * Convert an array to an object.
+ *
+ * @param {Array} arr - The array to convert to an object.
+ *
+ * @returns An object with the same keys and values as the array.
+ */
+ function arrayToObject(arr) {
+ var obj = {};
+ var keys = Object.keys(arr);
+ var i;
+ var len = keys.length;
+ var key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ obj[key] = arr[key];
+ }
+ return obj;
+ }
+
+ /**
+ * It takes a FormData object and returns a JavaScript object
+ *
+ * @param {string} formData The FormData object to convert to JSON.
+ *
+ * @returns {Object | null} The converted object.
+ */
+ function formDataToJSON(formData) {
+ function buildPath(path, value, target, index) {
+ var name = path[index++];
+ if (name === '__proto__') return true;
+ var isNumericKey = Number.isFinite(+name);
+ var isLast = index >= path.length;
+ name = !name && utils$1.isArray(target) ? target.length : name;
+ if (isLast) {
+ if (utils$1.hasOwnProp(target, name)) {
+ target[name] = [target[name], value];
+ } else {
+ target[name] = value;
+ }
+ return !isNumericKey;
+ }
+ if (!target[name] || !utils$1.isObject(target[name])) {
+ target[name] = [];
+ }
+ var result = buildPath(path, value, target[name], index);
+ if (result && utils$1.isArray(target[name])) {
+ target[name] = arrayToObject(target[name]);
+ }
+ return !isNumericKey;
+ }
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
+ var obj = {};
+ utils$1.forEachEntry(formData, function (name, value) {
+ buildPath(parsePropPath(name), value, obj, 0);
+ });
+ return obj;
+ }
+ return null;
+ }
+
+ /**
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+ * of the input
+ *
+ * @param {any} rawValue - The value to be stringified.
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
+ * @param {Function} encoder - A function that takes a value and returns a string.
+ *
+ * @returns {string} A stringified version of the rawValue.
+ */
+ function stringifySafely(rawValue, parser, encoder) {
+ if (utils$1.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils$1.trim(rawValue);
+ } catch (e) {
+ if (e.name !== 'SyntaxError') {
+ throw e;
+ }
+ }
+ }
+ return (encoder || JSON.stringify)(rawValue);
+ }
+ var defaults = {
+ transitional: transitionalDefaults,
+ adapter: ['xhr', 'http', 'fetch'],
+ transformRequest: [function transformRequest(data, headers) {
+ var contentType = headers.getContentType() || '';
+ var hasJSONContentType = contentType.indexOf('application/json') > -1;
+ var isObjectPayload = utils$1.isObject(data);
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
+ data = new FormData(data);
+ }
+ var isFormData = utils$1.isFormData(data);
+ if (isFormData) {
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ }
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
+ return data;
+ }
+ if (utils$1.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils$1.isURLSearchParams(data)) {
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+ return data.toString();
+ }
+ var isFileList;
+ if (isObjectPayload) {
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+ return toURLEncodedForm(data, this.formSerializer).toString();
+ }
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+ var _FormData = this.env && this.env.FormData;
+ return toFormData(isFileList ? {
+ 'files[]': data
+ } : data, _FormData && new _FormData(), this.formSerializer);
+ }
+ }
+ if (isObjectPayload || hasJSONContentType) {
+ headers.setContentType('application/json', false);
+ return stringifySafely(data);
+ }
+ return data;
+ }],
+ transformResponse: [function transformResponse(data) {
+ var transitional = this.transitional || defaults.transitional;
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ var JSONRequested = this.responseType === 'json';
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
+ return data;
+ }
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
+ var strictJSONParsing = !silentJSONParsing && JSONRequested;
+ try {
+ return JSON.parse(data);
+ } catch (e) {
+ if (strictJSONParsing) {
+ if (e.name === 'SyntaxError') {
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
+ }
+ throw e;
+ }
+ }
+ }
+ return data;
+ }],
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+ maxContentLength: -1,
+ maxBodyLength: -1,
+ env: {
+ FormData: platform.classes.FormData,
+ Blob: platform.classes.Blob
+ },
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ },
+ headers: {
+ common: {
+ 'Accept': 'application/json, text/plain, */*',
+ 'Content-Type': undefined
+ }
+ }
+ };
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
+ defaults.headers[method] = {};
+ });
+ var defaults$1 = defaults;
+
+ // RawAxiosHeaders whose duplicates are ignored by node
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
+ var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
+
+ /**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} rawHeaders Headers needing to be parsed
+ *
+ * @returns {Object} Headers parsed into an object
+ */
+ var parseHeaders = (function (rawHeaders) {
+ var parsed = {};
+ var key;
+ var val;
+ var i;
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+ i = line.indexOf(':');
+ key = line.substring(0, i).trim().toLowerCase();
+ val = line.substring(i + 1).trim();
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
+ return;
+ }
+ if (key === 'set-cookie') {
+ if (parsed[key]) {
+ parsed[key].push(val);
+ } else {
+ parsed[key] = [val];
+ }
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ });
+ return parsed;
+ });
+
+ var $internals = Symbol('internals');
+ function normalizeHeader(header) {
+ return header && String(header).trim().toLowerCase();
+ }
+ function normalizeValue(value) {
+ if (value === false || value == null) {
+ return value;
+ }
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
+ }
+ function parseTokens(str) {
+ var tokens = Object.create(null);
+ var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+ var match;
+ while (match = tokensRE.exec(str)) {
+ tokens[match[1]] = match[2];
+ }
+ return tokens;
+ }
+ var isValidHeaderName = function isValidHeaderName(str) {
+ return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+ };
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+ if (utils$1.isFunction(filter)) {
+ return filter.call(this, value, header);
+ }
+ if (isHeaderNameFilter) {
+ value = header;
+ }
+ if (!utils$1.isString(value)) return;
+ if (utils$1.isString(filter)) {
+ return value.indexOf(filter) !== -1;
+ }
+ if (utils$1.isRegExp(filter)) {
+ return filter.test(value);
+ }
+ }
+ function formatHeader(header) {
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) {
+ return _char.toUpperCase() + str;
+ });
+ }
+ function buildAccessors(obj, header) {
+ var accessorName = utils$1.toCamelCase(' ' + header);
+ ['get', 'set', 'has'].forEach(function (methodName) {
+ Object.defineProperty(obj, methodName + accessorName, {
+ value: function value(arg1, arg2, arg3) {
+ return this[methodName].call(this, header, arg1, arg2, arg3);
+ },
+ configurable: true
+ });
+ });
+ }
+ var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) {
+ function AxiosHeaders(headers) {
+ _classCallCheck(this, AxiosHeaders);
+ headers && this.set(headers);
+ }
+ _createClass(AxiosHeaders, [{
+ key: "set",
+ value: function set(header, valueOrRewrite, rewrite) {
+ var self = this;
+ function setHeader(_value, _header, _rewrite) {
+ var lHeader = normalizeHeader(_header);
+ if (!lHeader) {
+ throw new Error('header name must be a non-empty string');
+ }
+ var key = utils$1.findKey(self, lHeader);
+ if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
+ self[key || _header] = normalizeValue(_value);
+ }
+ }
+ var setHeaders = function setHeaders(headers, _rewrite) {
+ return utils$1.forEach(headers, function (_value, _header) {
+ return setHeader(_value, _header, _rewrite);
+ });
+ };
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
+ setHeaders(header, valueOrRewrite);
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+ setHeaders(parseHeaders(header), valueOrRewrite);
+ } else if (utils$1.isHeaders(header)) {
+ var _iterator = _createForOfIteratorHelper(header.entries()),
+ _step;
+ try {
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
+ var _step$value = _slicedToArray(_step.value, 2),
+ key = _step$value[0],
+ value = _step$value[1];
+ setHeader(value, key, rewrite);
+ }
+ } catch (err) {
+ _iterator.e(err);
+ } finally {
+ _iterator.f();
+ }
+ } else {
+ header != null && setHeader(valueOrRewrite, header, rewrite);
+ }
+ return this;
+ }
+ }, {
+ key: "get",
+ value: function get(header, parser) {
+ header = normalizeHeader(header);
+ if (header) {
+ var key = utils$1.findKey(this, header);
+ if (key) {
+ var value = this[key];
+ if (!parser) {
+ return value;
+ }
+ if (parser === true) {
+ return parseTokens(value);
+ }
+ if (utils$1.isFunction(parser)) {
+ return parser.call(this, value, key);
+ }
+ if (utils$1.isRegExp(parser)) {
+ return parser.exec(value);
+ }
+ throw new TypeError('parser must be boolean|regexp|function');
+ }
+ }
+ }
+ }, {
+ key: "has",
+ value: function has(header, matcher) {
+ header = normalizeHeader(header);
+ if (header) {
+ var key = utils$1.findKey(this, header);
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ }
+ return false;
+ }
+ }, {
+ key: "delete",
+ value: function _delete(header, matcher) {
+ var self = this;
+ var deleted = false;
+ function deleteHeader(_header) {
+ _header = normalizeHeader(_header);
+ if (_header) {
+ var key = utils$1.findKey(self, _header);
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+ delete self[key];
+ deleted = true;
+ }
+ }
+ }
+ if (utils$1.isArray(header)) {
+ header.forEach(deleteHeader);
+ } else {
+ deleteHeader(header);
+ }
+ return deleted;
+ }
+ }, {
+ key: "clear",
+ value: function clear(matcher) {
+ var keys = Object.keys(this);
+ var i = keys.length;
+ var deleted = false;
+ while (i--) {
+ var key = keys[i];
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+ delete this[key];
+ deleted = true;
+ }
+ }
+ return deleted;
+ }
+ }, {
+ key: "normalize",
+ value: function normalize(format) {
+ var self = this;
+ var headers = {};
+ utils$1.forEach(this, function (value, header) {
+ var key = utils$1.findKey(headers, header);
+ if (key) {
+ self[key] = normalizeValue(value);
+ delete self[header];
+ return;
+ }
+ var normalized = format ? formatHeader(header) : String(header).trim();
+ if (normalized !== header) {
+ delete self[header];
+ }
+ self[normalized] = normalizeValue(value);
+ headers[normalized] = true;
+ });
+ return this;
+ }
+ }, {
+ key: "concat",
+ value: function concat() {
+ var _this$constructor;
+ for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
+ targets[_key] = arguments[_key];
+ }
+ return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
+ }
+ }, {
+ key: "toJSON",
+ value: function toJSON(asStrings) {
+ var obj = Object.create(null);
+ utils$1.forEach(this, function (value, header) {
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
+ });
+ return obj;
+ }
+ }, {
+ key: _Symbol$iterator,
+ value: function value() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+ }, {
+ key: "toString",
+ value: function toString() {
+ return Object.entries(this.toJSON()).map(function (_ref) {
+ var _ref2 = _slicedToArray(_ref, 2),
+ header = _ref2[0],
+ value = _ref2[1];
+ return header + ': ' + value;
+ }).join('\n');
+ }
+ }, {
+ key: _Symbol$toStringTag,
+ get: function get() {
+ return 'AxiosHeaders';
+ }
+ }], [{
+ key: "from",
+ value: function from(thing) {
+ return thing instanceof this ? thing : new this(thing);
+ }
+ }, {
+ key: "concat",
+ value: function concat(first) {
+ var computed = new this(first);
+ for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+ targets[_key2 - 1] = arguments[_key2];
+ }
+ targets.forEach(function (target) {
+ return computed.set(target);
+ });
+ return computed;
+ }
+ }, {
+ key: "accessor",
+ value: function accessor(header) {
+ var internals = this[$internals] = this[$internals] = {
+ accessors: {}
+ };
+ var accessors = internals.accessors;
+ var prototype = this.prototype;
+ function defineAccessor(_header) {
+ var lHeader = normalizeHeader(_header);
+ if (!accessors[lHeader]) {
+ buildAccessors(prototype, _header);
+ accessors[lHeader] = true;
+ }
+ }
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+ return this;
+ }
+ }]);
+ return AxiosHeaders;
+ }(Symbol.iterator, Symbol.toStringTag);
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+ // reserved names hotfix
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
+ var value = _ref3.value;
+ var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+ return {
+ get: function get() {
+ return value;
+ },
+ set: function set(headerValue) {
+ this[mapped] = headerValue;
+ }
+ };
+ });
+ utils$1.freezeMethods(AxiosHeaders);
+ var AxiosHeaders$1 = AxiosHeaders;
+
+ /**
+ * Transform the data for a request or a response
+ *
+ * @param {Array|Function} fns A single function or Array of functions
+ * @param {?Object} response The response object
+ *
+ * @returns {*} The resulting transformed data
+ */
+ function transformData(fns, response) {
+ var config = this || defaults$1;
+ var context = response || config;
+ var headers = AxiosHeaders$1.from(context.headers);
+ var data = context.data;
+ utils$1.forEach(fns, function transform(fn) {
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ });
+ headers.normalize();
+ return data;
+ }
+
+ function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+ }
+
+ /**
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
+ *
+ * @param {string=} message The message.
+ * @param {Object=} config The config.
+ * @param {Object=} request The request.
+ *
+ * @returns {CanceledError} The created error.
+ */
+ function CanceledError(message, config, request) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
+ this.name = 'CanceledError';
+ }
+ utils$1.inherits(CanceledError, AxiosError, {
+ __CANCEL__: true
+ });
+
+ /**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ *
+ * @returns {object} The response.
+ */
+ function settle(resolve, reject, response) {
+ var validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(new AxiosError('Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
+ }
+ }
+
+ function parseProtocol(url) {
+ var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+ }
+
+ /**
+ * Calculate data maxRate
+ * @param {Number} [samplesCount= 10]
+ * @param {Number} [min= 1000]
+ * @returns {Function}
+ */
+ function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ var bytes = new Array(samplesCount);
+ var timestamps = new Array(samplesCount);
+ var head = 0;
+ var tail = 0;
+ var firstSampleTS;
+ min = min !== undefined ? min : 1000;
+ return function push(chunkLength) {
+ var now = Date.now();
+ var startedAt = timestamps[tail];
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+ var i = tail;
+ var bytesCount = 0;
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+ head = (head + 1) % samplesCount;
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+ if (now - firstSampleTS < min) {
+ return;
+ }
+ var passed = startedAt && now - startedAt;
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+ }
+
+ /**
+ * Throttle decorator
+ * @param {Function} fn
+ * @param {Number} freq
+ * @return {Function}
+ */
+ function throttle(fn, freq) {
+ var timestamp = 0;
+ var threshold = 1000 / freq;
+ var lastArgs;
+ var timer;
+ var invoke = function invoke(args) {
+ var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn.apply(null, args);
+ };
+ var throttled = function throttled() {
+ var now = Date.now();
+ var passed = now - timestamp;
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+ if (passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(function () {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ }
+ };
+ var flush = function flush() {
+ return lastArgs && invoke(lastArgs);
+ };
+ return [throttled, flush];
+ }
+
+ var progressEventReducer = function progressEventReducer(listener, isDownloadStream) {
+ var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
+ var bytesNotified = 0;
+ var _speedometer = speedometer(50, 250);
+ return throttle(function (e) {
+ var loaded = e.loaded;
+ var total = e.lengthComputable ? e.total : undefined;
+ var progressBytes = loaded - bytesNotified;
+ var rate = _speedometer(progressBytes);
+ var inRange = loaded <= total;
+ bytesNotified = loaded;
+ var data = _defineProperty({
+ loaded: loaded,
+ total: total,
+ progress: total ? loaded / total : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null
+ }, isDownloadStream ? 'download' : 'upload', true);
+ listener(data);
+ }, freq);
+ };
+ var progressEventDecorator = function progressEventDecorator(total, throttled) {
+ var lengthComputable = total != null;
+ return [function (loaded) {
+ return throttled[0]({
+ lengthComputable: lengthComputable,
+ total: total,
+ loaded: loaded
+ });
+ }, throttled[1]];
+ };
+ var asyncDecorator = function asyncDecorator(fn) {
+ return function () {
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+ return utils$1.asap(function () {
+ return fn.apply(void 0, args);
+ });
+ };
+ };
+
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? function (origin, isMSIE) {
+ return function (url) {
+ url = new URL(url, platform.origin);
+ return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
+ };
+ }(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : function () {
+ return true;
+ };
+
+ var cookies = platform.hasStandardBrowserEnv ?
+ // Standard browser envs support document.cookie
+ {
+ write: function write(name, value, expires, path, domain, secure) {
+ var cookie = [name + '=' + encodeURIComponent(value)];
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
+ utils$1.isString(path) && cookie.push('path=' + path);
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
+ secure === true && cookie.push('secure');
+ document.cookie = cookie.join('; ');
+ },
+ read: function read(name) {
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return match ? decodeURIComponent(match[3]) : null;
+ },
+ remove: function remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ } :
+ // Non-standard browser env (web workers, react-native) lack needed support.
+ {
+ write: function write() {},
+ read: function read() {
+ return null;
+ },
+ remove: function remove() {}
+ };
+
+ /**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ *
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+ function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+ }
+
+ /**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ *
+ * @returns {string} The combined URL
+ */
+ function combineURLs(baseURL, relativeURL) {
+ return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
+ }
+
+ /**
+ * Creates a new URL by combining the baseURL with the requestedURL,
+ * only when the requestedURL is not already an absolute URL.
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} requestedURL Absolute or relative URL to combine
+ *
+ * @returns {string} The combined full path
+ */
+ function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+ }
+
+ var headersToObject = function headersToObject(thing) {
+ return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
+ };
+
+ /**
+ * Config-specific merge-function which creates a new config-object
+ * by merging two configuration objects together.
+ *
+ * @param {Object} config1
+ * @param {Object} config2
+ *
+ * @returns {Object} New object resulting from merging config2 to config1
+ */
+ function mergeConfig(config1, config2) {
+ // eslint-disable-next-line no-param-reassign
+ config2 = config2 || {};
+ var config = {};
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
+ return utils$1.merge.call({
+ caseless: caseless
+ }, target, source);
+ } else if (utils$1.isPlainObject(source)) {
+ return utils$1.merge({}, source);
+ } else if (utils$1.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDeepProperties(a, b, prop, caseless) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(a, b, prop, caseless);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a, prop, caseless);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function valueFromConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function defaultToConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) {
+ return getMergedValue(a, b);
+ } else if (prop in config1) {
+ return getMergedValue(undefined, a);
+ }
+ }
+ var mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: function headers(a, b, prop) {
+ return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
+ }
+ };
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ var merge = mergeMap[prop] || mergeDeepProperties;
+ var configValue = merge(config1[prop], config2[prop], prop);
+ utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
+ });
+ return config;
+ }
+
+ var resolveConfig = (function (config) {
+ var newConfig = mergeConfig({}, config);
+ var data = newConfig.data,
+ withXSRFToken = newConfig.withXSRFToken,
+ xsrfHeaderName = newConfig.xsrfHeaderName,
+ xsrfCookieName = newConfig.xsrfCookieName,
+ headers = newConfig.headers,
+ auth = newConfig.auth;
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+
+ // HTTP basic authentication
+ if (auth) {
+ headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
+ }
+ var contentType;
+ if (utils$1.isFormData(data)) {
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+ headers.setContentType(undefined); // Let the browser set it
+ } else if ((contentType = headers.getContentType()) !== false) {
+ // fix semicolon duplication issue for ReactNative FormData implementation
+ var _ref = contentType ? contentType.split(';').map(function (token) {
+ return token.trim();
+ }).filter(Boolean) : [],
+ _ref2 = _toArray(_ref),
+ type = _ref2[0],
+ tokens = _ref2.slice(1);
+ headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
+ }
+ }
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+
+ if (platform.hasStandardBrowserEnv) {
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
+ // Add xsrf header
+ var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+ if (xsrfValue) {
+ headers.set(xsrfHeaderName, xsrfValue);
+ }
+ }
+ }
+ return newConfig;
+ });
+
+ var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+ var xhrAdapter = isXHRAdapterSupported && function (config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ var _config = resolveConfig(config);
+ var requestData = _config.data;
+ var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
+ var responseType = _config.responseType,
+ onUploadProgress = _config.onUploadProgress,
+ onDownloadProgress = _config.onDownloadProgress;
+ var onCanceled;
+ var uploadThrottled, downloadThrottled;
+ var flushUpload, flushDownload;
+ function done() {
+ flushUpload && flushUpload(); // flush events
+ flushDownload && flushDownload(); // flush events
+
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+ }
+ var request = new XMLHttpRequest();
+ request.open(_config.method.toUpperCase(), _config.url, true);
+
+ // Set the request timeout in MS
+ request.timeout = _config.timeout;
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ // Prepare the response
+ var responseHeaders = AxiosHeaders$1.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, response);
+
+ // Clean up request
+ request = null;
+ }
+ if ('onloadend' in request) {
+ // Use onloadend if available
+ request.onloadend = onloadend;
+ } else {
+ // Listen for ready state to emulate onloadend
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+ // readystate handler is calling before onerror or ontimeout handlers,
+ // so we should call onloadend on the next 'tick'
+ setTimeout(onloadend);
+ };
+ }
+
+ // Handle browser request cancellation (as opposed to a manual cancellation)
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+ var transitional = _config.transitional || transitionalDefaults;
+ if (_config.timeoutErrorMessage) {
+ timeoutErrorMessage = _config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Remove Content-Type if data is undefined
+ requestData === undefined && requestHeaders.setContentType(null);
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (!utils$1.isUndefined(_config.withCredentials)) {
+ request.withCredentials = !!_config.withCredentials;
+ }
+
+ // Add responseType to request if needed
+ if (responseType && responseType !== 'json') {
+ request.responseType = _config.responseType;
+ }
+
+ // Handle progress if needed
+ if (onDownloadProgress) {
+ var _progressEventReducer = progressEventReducer(onDownloadProgress, true);
+ var _progressEventReducer2 = _slicedToArray(_progressEventReducer, 2);
+ downloadThrottled = _progressEventReducer2[0];
+ flushDownload = _progressEventReducer2[1];
+ request.addEventListener('progress', downloadThrottled);
+ }
+
+ // Not all browsers support upload events
+ if (onUploadProgress && request.upload) {
+ var _progressEventReducer3 = progressEventReducer(onUploadProgress);
+ var _progressEventReducer4 = _slicedToArray(_progressEventReducer3, 2);
+ uploadThrottled = _progressEventReducer4[0];
+ flushUpload = _progressEventReducer4[1];
+ request.upload.addEventListener('progress', uploadThrottled);
+ request.upload.addEventListener('loadend', flushUpload);
+ }
+ if (_config.cancelToken || _config.signal) {
+ // Handle cancellation
+ // eslint-disable-next-line func-names
+ onCanceled = function onCanceled(cancel) {
+ if (!request) {
+ return;
+ }
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) {
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
+ }
+ }
+ var protocol = parseProtocol(_config.url);
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
+ return;
+ }
+
+ // Send the request
+ request.send(requestData || null);
+ });
+ };
+
+ var composeSignals = function composeSignals(signals, timeout) {
+ var _signals = signals = signals ? signals.filter(Boolean) : [],
+ length = _signals.length;
+ if (timeout || length) {
+ var controller = new AbortController();
+ var aborted;
+ var onabort = function onabort(reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ var err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
+ }
+ };
+ var timer = timeout && setTimeout(function () {
+ timer = null;
+ onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT));
+ }, timeout);
+ var unsubscribe = function unsubscribe() {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach(function (signal) {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+ });
+ signals = null;
+ }
+ };
+ signals.forEach(function (signal) {
+ return signal.addEventListener('abort', onabort);
+ });
+ var signal = controller.signal;
+ signal.unsubscribe = function () {
+ return utils$1.asap(unsubscribe);
+ };
+ return signal;
+ }
+ };
+ var composeSignals$1 = composeSignals;
+
+ var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) {
+ var len, pos, end;
+ return _regeneratorRuntime().wrap(function streamChunk$(_context) {
+ while (1) switch (_context.prev = _context.next) {
+ case 0:
+ len = chunk.byteLength;
+ if (!(!chunkSize || len < chunkSize)) {
+ _context.next = 5;
+ break;
+ }
+ _context.next = 4;
+ return chunk;
+ case 4:
+ return _context.abrupt("return");
+ case 5:
+ pos = 0;
+ case 6:
+ if (!(pos < len)) {
+ _context.next = 13;
+ break;
+ }
+ end = pos + chunkSize;
+ _context.next = 10;
+ return chunk.slice(pos, end);
+ case 10:
+ pos = end;
+ _context.next = 6;
+ break;
+ case 13:
+ case "end":
+ return _context.stop();
+ }
+ }, streamChunk);
+ });
+ var readBytes = /*#__PURE__*/function () {
+ var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize) {
+ var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
+ while (1) switch (_context2.prev = _context2.next) {
+ case 0:
+ _iteratorAbruptCompletion = false;
+ _didIteratorError = false;
+ _context2.prev = 2;
+ _iterator = _asyncIterator(readStream(iterable));
+ case 4:
+ _context2.next = 6;
+ return _awaitAsyncGenerator(_iterator.next());
+ case 6:
+ if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
+ _context2.next = 12;
+ break;
+ }
+ chunk = _step.value;
+ return _context2.delegateYield(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize))), "t0", 9);
+ case 9:
+ _iteratorAbruptCompletion = false;
+ _context2.next = 4;
+ break;
+ case 12:
+ _context2.next = 18;
+ break;
+ case 14:
+ _context2.prev = 14;
+ _context2.t1 = _context2["catch"](2);
+ _didIteratorError = true;
+ _iteratorError = _context2.t1;
+ case 18:
+ _context2.prev = 18;
+ _context2.prev = 19;
+ if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
+ _context2.next = 23;
+ break;
+ }
+ _context2.next = 23;
+ return _awaitAsyncGenerator(_iterator["return"]());
+ case 23:
+ _context2.prev = 23;
+ if (!_didIteratorError) {
+ _context2.next = 26;
+ break;
+ }
+ throw _iteratorError;
+ case 26:
+ return _context2.finish(23);
+ case 27:
+ return _context2.finish(18);
+ case 28:
+ case "end":
+ return _context2.stop();
+ }
+ }, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]);
+ }));
+ return function readBytes(_x, _x2) {
+ return _ref.apply(this, arguments);
+ };
+ }();
+ var readStream = /*#__PURE__*/function () {
+ var _ref2 = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
+ var reader, _yield$_awaitAsyncGen, done, value;
+ return _regeneratorRuntime().wrap(function _callee2$(_context3) {
+ while (1) switch (_context3.prev = _context3.next) {
+ case 0:
+ if (!stream[Symbol.asyncIterator]) {
+ _context3.next = 3;
+ break;
+ }
+ return _context3.delegateYield(_asyncGeneratorDelegate(_asyncIterator(stream)), "t0", 2);
+ case 2:
+ return _context3.abrupt("return");
+ case 3:
+ reader = stream.getReader();
+ _context3.prev = 4;
+ case 5:
+ _context3.next = 7;
+ return _awaitAsyncGenerator(reader.read());
+ case 7:
+ _yield$_awaitAsyncGen = _context3.sent;
+ done = _yield$_awaitAsyncGen.done;
+ value = _yield$_awaitAsyncGen.value;
+ if (!done) {
+ _context3.next = 12;
+ break;
+ }
+ return _context3.abrupt("break", 16);
+ case 12:
+ _context3.next = 14;
+ return value;
+ case 14:
+ _context3.next = 5;
+ break;
+ case 16:
+ _context3.prev = 16;
+ _context3.next = 19;
+ return _awaitAsyncGenerator(reader.cancel());
+ case 19:
+ return _context3.finish(16);
+ case 20:
+ case "end":
+ return _context3.stop();
+ }
+ }, _callee2, null, [[4,, 16, 20]]);
+ }));
+ return function readStream(_x3) {
+ return _ref2.apply(this, arguments);
+ };
+ }();
+ var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) {
+ var iterator = readBytes(stream, chunkSize);
+ var bytes = 0;
+ var done;
+ var _onFinish = function _onFinish(e) {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ };
+ return new ReadableStream({
+ pull: function pull(controller) {
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
+ var _yield$iterator$next, _done, value, len, loadedBytes;
+ return _regeneratorRuntime().wrap(function _callee3$(_context4) {
+ while (1) switch (_context4.prev = _context4.next) {
+ case 0:
+ _context4.prev = 0;
+ _context4.next = 3;
+ return iterator.next();
+ case 3:
+ _yield$iterator$next = _context4.sent;
+ _done = _yield$iterator$next.done;
+ value = _yield$iterator$next.value;
+ if (!_done) {
+ _context4.next = 10;
+ break;
+ }
+ _onFinish();
+ controller.close();
+ return _context4.abrupt("return");
+ case 10:
+ len = value.byteLength;
+ if (onProgress) {
+ loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ _context4.next = 19;
+ break;
+ case 15:
+ _context4.prev = 15;
+ _context4.t0 = _context4["catch"](0);
+ _onFinish(_context4.t0);
+ throw _context4.t0;
+ case 19:
+ case "end":
+ return _context4.stop();
+ }
+ }, _callee3, null, [[0, 15]]);
+ }))();
+ },
+ cancel: function cancel(reason) {
+ _onFinish(reason);
+ return iterator["return"]();
+ }
+ }, {
+ highWaterMark: 2
+ });
+ };
+
+ var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
+
+ // used only inside the fetch adapter
+ var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
+ return function (str) {
+ return encoder.encode(str);
+ };
+ }(new TextEncoder()) : ( /*#__PURE__*/function () {
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) {
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
+ while (1) switch (_context.prev = _context.next) {
+ case 0:
+ _context.t0 = Uint8Array;
+ _context.next = 3;
+ return new Response(str).arrayBuffer();
+ case 3:
+ _context.t1 = _context.sent;
+ return _context.abrupt("return", new _context.t0(_context.t1));
+ case 5:
+ case "end":
+ return _context.stop();
+ }
+ }, _callee);
+ }));
+ return function (_x) {
+ return _ref.apply(this, arguments);
+ };
+ }()));
+ var test = function test(fn) {
+ try {
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+ return !!fn.apply(void 0, args);
+ } catch (e) {
+ return false;
+ }
+ };
+ var supportsRequestStream = isReadableStreamSupported && test(function () {
+ var duplexAccessed = false;
+ var hasContentType = new Request(platform.origin, {
+ body: new ReadableStream(),
+ method: 'POST',
+ get duplex() {
+ duplexAccessed = true;
+ return 'half';
+ }
+ }).headers.has('Content-Type');
+ return duplexAccessed && !hasContentType;
+ });
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
+ var supportsResponseStream = isReadableStreamSupported && test(function () {
+ return utils$1.isReadableStream(new Response('').body);
+ });
+ var resolvers = {
+ stream: supportsResponseStream && function (res) {
+ return res.body;
+ }
+ };
+ isFetchSupported && function (res) {
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? function (res) {
+ return res[type]();
+ } : function (_, config) {
+ throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
+ });
+ });
+ }(new Response());
+ var getBodyLength = /*#__PURE__*/function () {
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
+ var _request;
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
+ while (1) switch (_context2.prev = _context2.next) {
+ case 0:
+ if (!(body == null)) {
+ _context2.next = 2;
+ break;
+ }
+ return _context2.abrupt("return", 0);
+ case 2:
+ if (!utils$1.isBlob(body)) {
+ _context2.next = 4;
+ break;
+ }
+ return _context2.abrupt("return", body.size);
+ case 4:
+ if (!utils$1.isSpecCompliantForm(body)) {
+ _context2.next = 9;
+ break;
+ }
+ _request = new Request(platform.origin, {
+ method: 'POST',
+ body: body
+ });
+ _context2.next = 8;
+ return _request.arrayBuffer();
+ case 8:
+ return _context2.abrupt("return", _context2.sent.byteLength);
+ case 9:
+ if (!(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body))) {
+ _context2.next = 11;
+ break;
+ }
+ return _context2.abrupt("return", body.byteLength);
+ case 11:
+ if (utils$1.isURLSearchParams(body)) {
+ body = body + '';
+ }
+ if (!utils$1.isString(body)) {
+ _context2.next = 16;
+ break;
+ }
+ _context2.next = 15;
+ return encodeText(body);
+ case 15:
+ return _context2.abrupt("return", _context2.sent.byteLength);
+ case 16:
+ case "end":
+ return _context2.stop();
+ }
+ }, _callee2);
+ }));
+ return function getBodyLength(_x2) {
+ return _ref2.apply(this, arguments);
+ };
+ }();
+ var resolveBodyLength = /*#__PURE__*/function () {
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) {
+ var length;
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
+ while (1) switch (_context3.prev = _context3.next) {
+ case 0:
+ length = utils$1.toFiniteNumber(headers.getContentLength());
+ return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
+ case 2:
+ case "end":
+ return _context3.stop();
+ }
+ }, _callee3);
+ }));
+ return function resolveBodyLength(_x3, _x4) {
+ return _ref3.apply(this, arguments);
+ };
+ }();
+ var fetchAdapter = isFetchSupported && ( /*#__PURE__*/function () {
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
+ var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, response, isStreamResponse, options, responseContentLength, _ref5, _ref6, _onProgress, _flush, responseData;
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
+ while (1) switch (_context4.prev = _context4.next) {
+ case 0:
+ _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+ composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+ unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
+ composedSignal.unsubscribe();
+ };
+ _context4.prev = 4;
+ _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
+ if (!_context4.t0) {
+ _context4.next = 11;
+ break;
+ }
+ _context4.next = 9;
+ return resolveBodyLength(headers, data);
+ case 9:
+ _context4.t1 = requestContentLength = _context4.sent;
+ _context4.t0 = _context4.t1 !== 0;
+ case 11:
+ if (!_context4.t0) {
+ _context4.next = 15;
+ break;
+ }
+ _request = new Request(url, {
+ method: 'POST',
+ body: data,
+ duplex: "half"
+ });
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+ headers.setContentType(contentTypeHeader);
+ }
+ if (_request.body) {
+ _progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ case 15:
+ if (!utils$1.isString(withCredentials)) {
+ withCredentials = withCredentials ? 'include' : 'omit';
+ }
+
+ // Cloudflare Workers throws when credentials are defined
+ // see https://github.com/cloudflare/workerd/issues/902
+ isCredentialsSupported = "credentials" in Request.prototype;
+ request = new Request(url, _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ }));
+ _context4.next = 20;
+ return fetch(request);
+ case 20:
+ response = _context4.sent;
+ isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
+ options = {};
+ ['status', 'statusText', 'headers'].forEach(function (prop) {
+ options[prop] = response[prop];
+ });
+ responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
+ _ref5 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref6 = _slicedToArray(_ref5, 2), _onProgress = _ref6[0], _flush = _ref6[1];
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
+ _flush && _flush();
+ unsubscribe && unsubscribe();
+ }), options);
+ }
+ responseType = responseType || 'text';
+ _context4.next = 26;
+ return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
+ case 26:
+ responseData = _context4.sent;
+ !isStreamResponse && unsubscribe && unsubscribe();
+ _context4.next = 30;
+ return new Promise(function (resolve, reject) {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders$1.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config: config,
+ request: request
+ });
+ });
+ case 30:
+ return _context4.abrupt("return", _context4.sent);
+ case 33:
+ _context4.prev = 33;
+ _context4.t2 = _context4["catch"](4);
+ unsubscribe && unsubscribe();
+ if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
+ _context4.next = 38;
+ break;
+ }
+ throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
+ cause: _context4.t2.cause || _context4.t2
+ });
+ case 38:
+ throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
+ case 39:
+ case "end":
+ return _context4.stop();
+ }
+ }, _callee4, null, [[4, 33]]);
+ }));
+ return function (_x5) {
+ return _ref4.apply(this, arguments);
+ };
+ }());
+
+ var knownAdapters = {
+ http: httpAdapter,
+ xhr: xhrAdapter,
+ fetch: fetchAdapter
+ };
+ utils$1.forEach(knownAdapters, function (fn, value) {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, 'name', {
+ value: value
+ });
+ } catch (e) {
+ // eslint-disable-next-line no-empty
+ }
+ Object.defineProperty(fn, 'adapterName', {
+ value: value
+ });
+ }
+ });
+ var renderReason = function renderReason(reason) {
+ return "- ".concat(reason);
+ };
+ var isResolvedHandle = function isResolvedHandle(adapter) {
+ return utils$1.isFunction(adapter) || adapter === null || adapter === false;
+ };
+ var adapters = {
+ getAdapter: function getAdapter(adapters) {
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
+ var _adapters = adapters,
+ length = _adapters.length;
+ var nameOrAdapter;
+ var adapter;
+ var rejectedReasons = {};
+ for (var i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ var id = void 0;
+ adapter = nameOrAdapter;
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+ if (adapter === undefined) {
+ throw new AxiosError("Unknown adapter '".concat(id, "'"));
+ }
+ }
+ if (adapter) {
+ break;
+ }
+ rejectedReasons[id || '#' + i] = adapter;
+ }
+ if (!adapter) {
+ var reasons = Object.entries(rejectedReasons).map(function (_ref) {
+ var _ref2 = _slicedToArray(_ref, 2),
+ id = _ref2[0],
+ state = _ref2[1];
+ return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
+ });
+ var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
+ throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
+ }
+ return adapter;
+ },
+ adapters: knownAdapters
+ };
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ *
+ * @param {Object} config The config that is to be used for the request
+ *
+ * @returns {void}
+ */
+ function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+ if (config.signal && config.signal.aborted) {
+ throw new CanceledError(null, config);
+ }
+ }
+
+ /**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+ config.headers = AxiosHeaders$1.from(config.headers);
+
+ // Transform request data
+ config.data = transformData.call(config, config.transformRequest);
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
+ }
+ var adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData.call(config, config.transformResponse, response);
+ response.headers = AxiosHeaders$1.from(response.headers);
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
+ }
+ }
+ return Promise.reject(reason);
+ });
+ }
+
+ var VERSION = "1.7.9";
+
+ var validators$1 = {};
+
+ // eslint-disable-next-line func-names
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) {
+ validators$1[type] = function validator(thing) {
+ return _typeof(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+ };
+ });
+ var deprecatedWarnings = {};
+
+ /**
+ * Transitional option validator
+ *
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
+ * @param {string?} version - deprecated version / removed since version
+ * @param {string?} message - some message with additional info
+ *
+ * @returns {function}
+ */
+ validators$1.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+ }
+
+ // eslint-disable-next-line func-names
+ return function (value, opt, opts) {
+ if (validator === false) {
+ throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
+ }
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ // eslint-disable-next-line no-console
+ console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'));
+ }
+ return validator ? validator(value, opt, opts) : true;
+ };
+ };
+ validators$1.spelling = function spelling(correctSpelling) {
+ return function (value, opt) {
+ // eslint-disable-next-line no-console
+ console.warn("".concat(opt, " is likely a misspelling of ").concat(correctSpelling));
+ return true;
+ };
+ };
+
+ /**
+ * Assert object's properties type
+ *
+ * @param {object} options
+ * @param {object} schema
+ * @param {boolean?} allowUnknown
+ *
+ * @returns {object}
+ */
+
+ function assertOptions(options, schema, allowUnknown) {
+ if (_typeof(options) !== 'object') {
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ var keys = Object.keys(options);
+ var i = keys.length;
+ while (i-- > 0) {
+ var opt = keys[i];
+ var validator = schema[opt];
+ if (validator) {
+ var value = options[opt];
+ var result = value === undefined || validator(value, opt, options);
+ if (result !== true) {
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
+ }
+ }
+ }
+ var validator = {
+ assertOptions: assertOptions,
+ validators: validators$1
+ };
+
+ var validators = validator.validators;
+
+ /**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ *
+ * @return {Axios} A new instance of Axios
+ */
+ var Axios = /*#__PURE__*/function () {
+ function Axios(instanceConfig) {
+ _classCallCheck(this, Axios);
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager$1(),
+ response: new InterceptorManager$1()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ _createClass(Axios, [{
+ key: "request",
+ value: (function () {
+ var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
+ var dummy, stack;
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
+ while (1) switch (_context.prev = _context.next) {
+ case 0:
+ _context.prev = 0;
+ _context.next = 3;
+ return this._request(configOrUrl, config);
+ case 3:
+ return _context.abrupt("return", _context.sent);
+ case 6:
+ _context.prev = 6;
+ _context.t0 = _context["catch"](0);
+ if (_context.t0 instanceof Error) {
+ dummy = {};
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
+
+ // slice off the Error: ... line
+ stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+ try {
+ if (!_context.t0.stack) {
+ _context.t0.stack = stack;
+ // match without the 2 top stack lines
+ } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+ _context.t0.stack += '\n' + stack;
+ }
+ } catch (e) {
+ // ignore the case where "stack" is an un-writable property
+ }
+ }
+ throw _context.t0;
+ case 10:
+ case "end":
+ return _context.stop();
+ }
+ }, _callee, this, [[0, 6]]);
+ }));
+ function request(_x, _x2) {
+ return _request2.apply(this, arguments);
+ }
+ return request;
+ }())
+ }, {
+ key: "_request",
+ value: function _request(configOrUrl, config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof configOrUrl === 'string') {
+ config = config || {};
+ config.url = configOrUrl;
+ } else {
+ config = configOrUrl || {};
+ }
+ config = mergeConfig(this.defaults, config);
+ var _config = config,
+ transitional = _config.transitional,
+ paramsSerializer = _config.paramsSerializer,
+ headers = _config.headers;
+ if (transitional !== undefined) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators["boolean"]),
+ forcedJSONParsing: validators.transitional(validators["boolean"]),
+ clarifyTimeoutError: validators.transitional(validators["boolean"])
+ }, false);
+ }
+ if (paramsSerializer != null) {
+ if (utils$1.isFunction(paramsSerializer)) {
+ config.paramsSerializer = {
+ serialize: paramsSerializer
+ };
+ } else {
+ validator.assertOptions(paramsSerializer, {
+ encode: validators["function"],
+ serialize: validators["function"]
+ }, true);
+ }
+ }
+ validator.assertOptions(config, {
+ baseUrl: validators.spelling('baseURL'),
+ withXsrfToken: validators.spelling('withXSRFToken')
+ }, true);
+
+ // Set config.method
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+ // Flatten headers
+ var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
+ headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
+ delete headers[method];
+ });
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
+
+ // filter out skipped interceptors
+ var requestInterceptorChain = [];
+ var synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
+ return;
+ }
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+ var responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+ var promise;
+ var i = 0;
+ var len;
+ if (!synchronousRequestInterceptors) {
+ var chain = [dispatchRequest.bind(this), undefined];
+ chain.unshift.apply(chain, requestInterceptorChain);
+ chain.push.apply(chain, responseInterceptorChain);
+ len = chain.length;
+ promise = Promise.resolve(config);
+ while (i < len) {
+ promise = promise.then(chain[i++], chain[i++]);
+ }
+ return promise;
+ }
+ len = requestInterceptorChain.length;
+ var newConfig = config;
+ i = 0;
+ while (i < len) {
+ var onFulfilled = requestInterceptorChain[i++];
+ var onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
+ }
+ }
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+ i = 0;
+ len = responseInterceptorChain.length;
+ while (i < len) {
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ }
+ return promise;
+ }
+ }, {
+ key: "getUri",
+ value: function getUri(config) {
+ config = mergeConfig(this.defaults, config);
+ var fullPath = buildFullPath(config.baseURL, config.url);
+ return buildURL(fullPath, config.params, config.paramsSerializer);
+ }
+ }]);
+ return Axios;
+ }(); // Provide aliases for supported request methods
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function (url, config) {
+ return this.request(mergeConfig(config || {}, {
+ method: method,
+ url: url,
+ data: (config || {}).data
+ }));
+ };
+ });
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig(config || {}, {
+ method: method,
+ headers: isForm ? {
+ 'Content-Type': 'multipart/form-data'
+ } : {},
+ url: url,
+ data: data
+ }));
+ };
+ }
+ Axios.prototype[method] = generateHTTPMethod();
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
+ });
+ var Axios$1 = Axios;
+
+ /**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @param {Function} executor The executor function.
+ *
+ * @returns {CancelToken}
+ */
+ var CancelToken = /*#__PURE__*/function () {
+ function CancelToken(executor) {
+ _classCallCheck(this, CancelToken);
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+ var resolvePromise;
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+ var token = this;
+
+ // eslint-disable-next-line func-names
+ this.promise.then(function (cancel) {
+ if (!token._listeners) return;
+ var i = token._listeners.length;
+ while (i-- > 0) {
+ token._listeners[i](cancel);
+ }
+ token._listeners = null;
+ });
+
+ // eslint-disable-next-line func-names
+ this.promise.then = function (onfulfilled) {
+ var _resolve;
+ // eslint-disable-next-line func-names
+ var promise = new Promise(function (resolve) {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+ return promise;
+ };
+ executor(function cancel(message, config, request) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+ token.reason = new CanceledError(message, config, request);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ */
+ _createClass(CancelToken, [{
+ key: "throwIfRequested",
+ value: function throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ }
+
+ /**
+ * Subscribe to the cancel signal
+ */
+ }, {
+ key: "subscribe",
+ value: function subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
+ }
+ if (this._listeners) {
+ this._listeners.push(listener);
+ } else {
+ this._listeners = [listener];
+ }
+ }
+
+ /**
+ * Unsubscribe from the cancel signal
+ */
+ }, {
+ key: "unsubscribe",
+ value: function unsubscribe(listener) {
+ if (!this._listeners) {
+ return;
+ }
+ var index = this._listeners.indexOf(listener);
+ if (index !== -1) {
+ this._listeners.splice(index, 1);
+ }
+ }
+ }, {
+ key: "toAbortSignal",
+ value: function toAbortSignal() {
+ var _this = this;
+ var controller = new AbortController();
+ var abort = function abort(err) {
+ controller.abort(err);
+ };
+ this.subscribe(abort);
+ controller.signal.unsubscribe = function () {
+ return _this.unsubscribe(abort);
+ };
+ return controller.signal;
+ }
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ }], [{
+ key: "source",
+ value: function source() {
+ var cancel;
+ var token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token: token,
+ cancel: cancel
+ };
+ }
+ }]);
+ return CancelToken;
+ }();
+ var CancelToken$1 = CancelToken;
+
+ /**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ *
+ * @returns {Function}
+ */
+ function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+ }
+
+ /**
+ * Determines whether the payload is an error thrown by Axios
+ *
+ * @param {*} payload The value to test
+ *
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
+ */
+ function isAxiosError(payload) {
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
+ }
+
+ var HttpStatusCode = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511
+ };
+ Object.entries(HttpStatusCode).forEach(function (_ref) {
+ var _ref2 = _slicedToArray(_ref, 2),
+ key = _ref2[0],
+ value = _ref2[1];
+ HttpStatusCode[value] = key;
+ });
+ var HttpStatusCode$1 = HttpStatusCode;
+
+ /**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ *
+ * @returns {Axios} A new instance of Axios
+ */
+ function createInstance(defaultConfig) {
+ var context = new Axios$1(defaultConfig);
+ var instance = bind(Axios$1.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils$1.extend(instance, Axios$1.prototype, context, {
+ allOwnKeys: true
+ });
+
+ // Copy context to instance
+ utils$1.extend(instance, context, null, {
+ allOwnKeys: true
+ });
+
+ // Factory for creating new instances
+ instance.create = function create(instanceConfig) {
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
+ };
+ return instance;
+ }
+
+ // Create the default instance to be exported
+ var axios = createInstance(defaults$1);
+
+ // Expose Axios class to allow class inheritance
+ axios.Axios = Axios$1;
+
+ // Expose Cancel & CancelToken
+ axios.CanceledError = CanceledError;
+ axios.CancelToken = CancelToken$1;
+ axios.isCancel = isCancel;
+ axios.VERSION = VERSION;
+ axios.toFormData = toFormData;
+
+ // Expose AxiosError class
+ axios.AxiosError = AxiosError;
+
+ // alias for CanceledError for backward compatibility
+ axios.Cancel = axios.CanceledError;
+
+ // Expose all/spread
+ axios.all = function all(promises) {
+ return Promise.all(promises);
+ };
+ axios.spread = spread;
+
+ // Expose isAxiosError
+ axios.isAxiosError = isAxiosError;
+
+ // Expose mergeConfig
+ axios.mergeConfig = mergeConfig;
+ axios.AxiosHeaders = AxiosHeaders$1;
+ axios.formToJSON = function (thing) {
+ return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
+ };
+ axios.getAdapter = adapters.getAdapter;
+ axios.HttpStatusCode = HttpStatusCode$1;
+ axios["default"] = axios;
+
+ return axios;
+
+}));
+//# sourceMappingURL=axios.js.map
diff --git a/node_modules/axios/dist/axios.min.js b/node_modules/axios/dist/axios.min.js
new file mode 100644
index 0000000..0ac6c50
--- /dev/null
+++ b/node_modules/axios/dist/axios.min.js
@@ -0,0 +1,2 @@
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";function e(e){var r,n;function o(r,n){try{var a=e[r](n),u=a.value,s=u instanceof t;Promise.resolve(s?u.v:u).then((function(t){if(s){var n="return"===r?"return":"next";if(!u.k||t.done)return o(n,t);t=e[n](t).value}i(a.done?"return":"normal",t)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?o(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise((function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};n?n=n.next=u:(r=n=u,o(e,t))}))},"function"!=typeof e.return&&(this.return=void 0)}function t(e,t){this.v=e,this.k=t}function r(e){var r={},n=!1;function o(r,o){return n=!0,o=new Promise((function(t){t(e[r](o))})),{done:!1,value:new t(o,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):o("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return o("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):o("return",e)}),r}function n(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return o=function(e){this.s=e,this.n=e.next},o.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function i(e){return new t(e,0)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function l(t){return function(){return new e(t.apply(this,arguments))}}function p(e,t,r,n,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){p(i,n,o,a,u,"next",e)}function u(e){p(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{},i=o.allOwnKeys,a=void 0!==i&&i;if(null!=e)if("object"!==f(e)&&(e=[e]),N(e))for(r=0,n=e.length;r0;)if(t===(r=n[o]).toLowerCase())return r;return null}var Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Z=function(e){return!_(e)&&e!==Q};var ee,te=(ee="undefined"!=typeof Uint8Array&&j(Uint8Array),function(e){return ee&&e instanceof ee}),re=P("HTMLFormElement"),ne=function(e){var t=Object.prototype.hasOwnProperty;return function(e,r){return t.call(e,r)}}(),oe=P("RegExp"),ie=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};$(r,(function(r,o){var i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},ae="abcdefghijklmnopqrstuvwxyz",ue="0123456789",se={DIGIT:ue,ALPHA:ae,ALPHA_DIGIT:ae+ae.toUpperCase()+ue};var ce,fe,le,pe,he=P("AsyncFunction"),de=(ce="function"==typeof setImmediate,fe=U(Q.postMessage),ce?setImmediate:fe?(le="axios@".concat(Math.random()),pe=[],Q.addEventListener("message",(function(e){var t=e.source,r=e.data;t===Q&&r===le&&pe.length&&pe.shift()()}),!1),function(e){pe.push(e),Q.postMessage(le,"*")}):function(e){return setTimeout(e)}),ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Q):"undefined"!=typeof process&&process.nextTick||de,ye={isArray:N,isArrayBuffer:C,isBuffer:function(e){return null!==e&&!_(e)&&null!==e.constructor&&!_(e.constructor)&&U(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||U(e.append)&&("formdata"===(t=A(e))||"object"===t&&U(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&C(e.buffer)},isString:F,isNumber:B,isBoolean:function(e){return!0===e||!1===e},isObject:D,isPlainObject:I,isReadableStream:G,isRequest:K,isResponse:V,isHeaders:X,isUndefined:_,isDate:q,isFile:M,isBlob:z,isRegExp:oe,isFunction:U,isStream:function(e){return D(e)&&U(e.pipe)},isURLSearchParams:J,isTypedArray:te,isFileList:H,forEach:$,merge:function e(){for(var t=Z(this)&&this||{},r=t.caseless,n={},o=function(t,o){var i=r&&Y(n,o)||o;I(n[i])&&I(t)?n[i]=e(n[i],t):I(t)?n[i]=e({},t):N(t)?n[i]=t.slice():n[i]=t},i=0,a=arguments.length;i3&&void 0!==arguments[3]?arguments[3]:{},o=n.allOwnKeys;return $(t,(function(t,n){r&&U(t)?e[n]=R(t,r):e[n]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],n&&!n(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==r&&j(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:A,kindOfTest:P,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(N(e))return e;var t=e.length;if(!B(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:re,hasOwnProperty:ne,hasOwnProp:ne,reduceDescriptors:ie,freezeMethods:function(e){ie(e,(function(t,r){if(U(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];U(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:function(e,t){var r={},n=function(e){e.forEach((function(e){r[e]=!0}))};return N(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:Y,global:Q,isContextDefined:Z,ALPHABET:se,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:se.ALPHA_DIGIT,r="",n=t.length;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&U(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(r,n){if(D(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[n]=r;var o=N(r)?[]:{};return $(r,(function(t,r){var i=e(t,n+1);!_(i)&&(o[r]=i)})),t[n]=void 0,o}}return r}(e,0)},isAsyncFn:he,isThenable:function(e){return e&&(D(e)||U(e))&&U(e.then)&&U(e.catch)},setImmediate:de,asap:ve};function me(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ye.inherits(me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});var be=me.prototype,ge={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){ge[e]={value:e}})),Object.defineProperties(me,ge),Object.defineProperty(be,"isAxiosError",{value:!0}),me.from=function(e,t,r,n,o,i){var a=Object.create(be);return ye.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),me.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function we(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function Oe(e,t,r){return e?e.concat(t).map((function(e,t){return e=Ee(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var Se=ye.toFlatObject(ye,{},null,(function(e){return/^is[A-Z]/.test(e)}));function xe(e,t,r){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ye.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,i=r.dots,a=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(o))throw new TypeError("visitor must be a function");function s(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(!u&&ye.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){var u=e;if(e&&!o&&"object"===f(e))if(ye.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(we)}(e)||(ye.isFileList(e)||ye.endsWith(r,"[]"))&&(u=ye.toArray(e)))return r=Ee(r),u.forEach((function(e,n){!ye.isUndefined(e)&&null!==e&&t.append(!0===a?Oe([r],n,i):null===a?r:r+"[]",s(e))})),!1;return!!we(e)||(t.append(Oe(o,r,i),s(e)),!1)}var l=[],p=Object.assign(Se,{defaultVisitor:c,convertValue:s,isVisitable:we});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ye.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ye.forEach(r,(function(r,i){!0===(!(ye.isUndefined(r)||null===r)&&o.call(t,r,ye.isString(i)?i.trim():i,n,p))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function Re(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Te(e,t){this._pairs=[],e&&xe(e,this,t)}var ke=Te.prototype;function je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ae(e,t,r){if(!t)return e;var n=r&&r.encode||je;ye.isFunction(r)&&(r={serialize:r});var o,i=r&&r.serialize;if(o=i?i(t,r):ye.isURLSearchParams(t)?t.toString():new Te(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}ke.append=function(e,t){this._pairs.push([e,t])},ke.toString=function(e){var t=e?function(t){return e.call(this,t,Re)}:Re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Pe=function(){function e(){d(this,e),this.handlers=[]}return y(e,[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ne={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},_e="undefined"!=typeof window&&"undefined"!=typeof document,Ce="object"===("undefined"==typeof navigator?"undefined":f(navigator))&&navigator||void 0,Fe=_e&&(!Ce||["ReactNative","NativeScript","NS"].indexOf(Ce.product)<0),Ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=_e&&window.location.href||"http://localhost",De=u(u({},Object.freeze({__proto__:null,hasBrowserEnv:_e,hasStandardBrowserWebWorkerEnv:Ue,hasStandardBrowserEnv:Fe,navigator:Ce,origin:Be})),Ne);function Ie(e){function t(e,r,n,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),u=o>=e.length;return i=!i&&ye.isArray(n)?n.length:i,u?(ye.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a):(n[i]&&ye.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&ye.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t-1,i=ye.isObject(e);if(i&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return o?JSON.stringify(Ie(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return xe(e,new De.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return De.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return xe(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||qe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],(function(e){qe.headers[e]={}}));var Me=qe,ze=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function Je(e){return e&&String(e).trim().toLowerCase()}function We(e){return!1===e||null==e?e:ye.isArray(e)?e.map(We):String(e)}function Ge(e,t,r,n,o){return ye.isFunction(n)?n.call(this,t,r):(o&&(t=r),ye.isString(t)?ye.isString(n)?-1!==t.indexOf(n):ye.isRegExp(n)?n.test(t):void 0:void 0)}var Ke=function(e,t){function r(e){d(this,r),e&&this.set(e)}return y(r,[{key:"set",value:function(e,t,r){var n=this;function o(e,t,r){var o=Je(t);if(!o)throw new Error("header name must be a non-empty string");var i=ye.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=We(e))}var i=function(e,t){return ye.forEach(e,(function(e,r){return o(e,r,t)}))};if(ye.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,r,n,o={};return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||o[t]&&ze[t]||("set-cookie"===t?o[t]?o[t].push(r):o[t]=[r]:o[t]=o[t]?o[t]+", "+r:r)})),o}(e),t);else if(ye.isHeaders(e)){var a,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.entries());try{for(u.s();!(a=u.n()).done;){var s=b(a.value,2),c=s[0];o(s[1],c,r)}}catch(e){u.e(e)}finally{u.f()}}else null!=e&&o(t,e,r);return this}},{key:"get",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ye.isFunction(t))return t.call(this,n,r);if(ye.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Je(e)){var r=ye.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ge(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function o(e){if(e=Je(e)){var o=ye.findKey(r,e);!o||t&&!Ge(0,r[o],o,t)||(delete r[o],n=!0)}}return ye.isArray(e)?e.forEach(o):o(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var o=t[r];e&&!Ge(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ye.forEach(this,(function(n,o){var i=ye.findKey(r,o);if(i)return t[i]=We(n),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=We(n),r[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(r=s,n||(n=setTimeout((function(){n=null,a(r)}),i-t)))},function(){return r&&a(r)}]}ye.inherits(Ye,me,{__CANCEL__:!0});var tt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,o=Ze(50,250);return et((function(r){var i=r.loaded,a=r.lengthComputable?r.total:void 0,u=i-n,s=o(u);n=i;var c=m({loaded:i,total:a,progress:a?i/a:void 0,bytes:u,rate:s||void 0,estimated:s&&a&&i<=a?(a-i)/s:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)}),r)},rt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},nt=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n1?t-1:0),n=1;n1?"since :\n"+u.map(At).join("\n"):" "+At(u[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ye(null,e)}function _t(e){return Nt(e),e.headers=Ve.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Lt(e.adapter||Me.adapter)(e).then((function(t){return Nt(e),t.data=Xe.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t}),(function(t){return $e(t)||(Nt(e),t&&t.response&&(t.response.data=Xe.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)}))}var Ct="1.7.9",Ft={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ft[e]=function(r){return f(r)===e||"a"+(t<1?"n ":" ")+e}}));var Ut={};Ft.transitional=function(e,t,r){function n(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new me(n(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!Ut[o]&&(Ut[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Ft.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Bt={assertOptions:function(e,t,r){if("object"!==f(e))throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new me("option "+i+" must be "+s,me.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}},validators:Ft},Dt=Bt.validators,It=function(){function e(t){d(this,e),this.defaults=t,this.interceptors={request:new Pe,response:new Pe}}var t;return y(e,[{key:"request",value:(t=h(s().mark((function e(t,r){var n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._request(t,r);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),e.t0 instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,o=n.stack?n.stack.replace(/^.+\n/,""):"";try{e.t0.stack?o&&!String(e.t0.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(e.t0.stack+="\n"+o):e.t0.stack=o}catch(e){}}throw e.t0;case 10:case"end":return e.stop()}}),e,this,[[0,6]])}))),function(e,r){return t.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=st(this.defaults,t),n=r.transitional,o=r.paramsSerializer,i=r.headers;void 0!==n&&Bt.assertOptions(n,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),null!=o&&(ye.isFunction(o)?t.paramsSerializer={serialize:o}:Bt.assertOptions(o,{encode:Dt.function,serialize:Dt.function},!0)),Bt.assertOptions(t,{baseUrl:Dt.spelling("baseURL"),withXsrfToken:Dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&ye.merge(i.common,i[t.method]);i&&ye.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ve.concat(a,i);var u=[],s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,u.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,p=0;if(!s){var h=[_t.bind(this),void 0];for(h.unshift.apply(h,u),h.push.apply(h,f),l=h.length,c=Promise.resolve(t);p0;)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t((function(e,t,o){n.reason||(n.reason=new Ye(e,t,o),r(n.reason))}))}return y(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}(),zt=Mt;var Ht={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ht).forEach((function(e){var t=b(e,2),r=t[0],n=t[1];Ht[n]=r}));var Jt=Ht;var Wt=function e(t){var r=new qt(t),n=R(qt.prototype.request,r);return ye.extend(n,qt.prototype,r,{allOwnKeys:!0}),ye.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(st(t,r))},n}(Me);return Wt.Axios=qt,Wt.CanceledError=Ye,Wt.CancelToken=zt,Wt.isCancel=$e,Wt.VERSION=Ct,Wt.toFormData=xe,Wt.AxiosError=me,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=st,Wt.AxiosHeaders=Ve,Wt.formToJSON=function(e){return Ie(ye.isHTMLForm(e)?new FormData(e):e)},Wt.getAdapter=Lt,Wt.HttpStatusCode=Jt,Wt.default=Wt,Wt}));
+//# sourceMappingURL=axios.min.js.map
diff --git a/node_modules/axios/dist/browser/axios.cjs b/node_modules/axios/dist/browser/axios.cjs
new file mode 100644
index 0000000..3305d66
--- /dev/null
+++ b/node_modules/axios/dist/browser/axios.cjs
@@ -0,0 +1,3722 @@
+// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
+'use strict';
+
+function bind(fn, thisArg) {
+ return function wrap() {
+ return fn.apply(thisArg, arguments);
+ };
+}
+
+// utils is a library of generic helper functions non-specific to axios
+
+const {toString} = Object.prototype;
+const {getPrototypeOf} = Object;
+
+const kindOf = (cache => thing => {
+ const str = toString.call(thing);
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+})(Object.create(null));
+
+const kindOfTest = (type) => {
+ type = type.toLowerCase();
+ return (thing) => kindOf(thing) === type
+};
+
+const typeOfTest = type => thing => typeof thing === type;
+
+/**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ *
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+const {isArray} = Array;
+
+/**
+ * Determine if a value is undefined
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+const isUndefined = typeOfTest('undefined');
+
+/**
+ * Determine if a value is a Buffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Buffer, otherwise false
+ */
+function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+}
+
+/**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+const isArrayBuffer = kindOfTest('ArrayBuffer');
+
+
+/**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+function isArrayBufferView(val) {
+ let result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
+ }
+ return result;
+}
+
+/**
+ * Determine if a value is a String
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+const isString = typeOfTest('string');
+
+/**
+ * Determine if a value is a Function
+ *
+ * @param {*} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+const isFunction = typeOfTest('function');
+
+/**
+ * Determine if a value is a Number
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+const isNumber = typeOfTest('number');
+
+/**
+ * Determine if a value is an Object
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+const isObject = (thing) => thing !== null && typeof thing === 'object';
+
+/**
+ * Determine if a value is a Boolean
+ *
+ * @param {*} thing The value to test
+ * @returns {boolean} True if value is a Boolean, otherwise false
+ */
+const isBoolean = thing => thing === true || thing === false;
+
+/**
+ * Determine if a value is a plain Object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a plain Object, otherwise false
+ */
+const isPlainObject = (val) => {
+ if (kindOf(val) !== 'object') {
+ return false;
+ }
+
+ const prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
+};
+
+/**
+ * Determine if a value is a Date
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+const isDate = kindOfTest('Date');
+
+/**
+ * Determine if a value is a File
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFile = kindOfTest('File');
+
+/**
+ * Determine if a value is a Blob
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+const isBlob = kindOfTest('Blob');
+
+/**
+ * Determine if a value is a FileList
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFileList = kindOfTest('FileList');
+
+/**
+ * Determine if a value is a Stream
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+const isStream = (val) => isObject(val) && isFunction(val.pipe);
+
+/**
+ * Determine if a value is a FormData
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+const isFormData = (thing) => {
+ let kind;
+ return thing && (
+ (typeof FormData === 'function' && thing instanceof FormData) || (
+ isFunction(thing.append) && (
+ (kind = kindOf(thing)) === 'formdata' ||
+ // detect form-data instance
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
+ )
+ )
+ )
+};
+
+/**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+const isURLSearchParams = kindOfTest('URLSearchParams');
+
+const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
+
+/**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ *
+ * @returns {String} The String freed of excess whitespace
+ */
+const trim = (str) => str.trim ?
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+
+/**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ *
+ * @param {Boolean} [allOwnKeys = false]
+ * @returns {any}
+ */
+function forEach(obj, fn, {allOwnKeys = false} = {}) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ let i;
+ let l;
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+ const len = keys.length;
+ let key;
+
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+}
+
+function findKey(obj, key) {
+ key = key.toLowerCase();
+ const keys = Object.keys(obj);
+ let i = keys.length;
+ let _key;
+ while (i-- > 0) {
+ _key = keys[i];
+ if (key === _key.toLowerCase()) {
+ return _key;
+ }
+ }
+ return null;
+}
+
+const _global = (() => {
+ /*eslint no-undef:0*/
+ if (typeof globalThis !== "undefined") return globalThis;
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
+})();
+
+const isContextDefined = (context) => !isUndefined(context) && context !== _global;
+
+/**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ *
+ * @returns {Object} Result of all merge properties
+ */
+function merge(/* obj1, obj2, obj3, ... */) {
+ const {caseless} = isContextDefined(this) && this || {};
+ const result = {};
+ const assignValue = (val, key) => {
+ const targetKey = caseless && findKey(result, key) || key;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else {
+ result[targetKey] = val;
+ }
+ };
+
+ for (let i = 0, l = arguments.length; i < l; i++) {
+ arguments[i] && forEach(arguments[i], assignValue);
+ }
+ return result;
+}
+
+/**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ *
+ * @param {Boolean} [allOwnKeys]
+ * @returns {Object} The resulting value of object a
+ */
+const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
+ forEach(b, (val, key) => {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ }, {allOwnKeys});
+ return a;
+};
+
+/**
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ *
+ * @param {string} content with BOM
+ *
+ * @returns {string} content value without BOM
+ */
+const stripBOM = (content) => {
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+};
+
+/**
+ * Inherit the prototype methods from one constructor into another
+ * @param {function} constructor
+ * @param {function} superConstructor
+ * @param {object} [props]
+ * @param {object} [descriptors]
+ *
+ * @returns {void}
+ */
+const inherits = (constructor, superConstructor, props, descriptors) => {
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+ constructor.prototype.constructor = constructor;
+ Object.defineProperty(constructor, 'super', {
+ value: superConstructor.prototype
+ });
+ props && Object.assign(constructor.prototype, props);
+};
+
+/**
+ * Resolve object with deep prototype chain to a flat object
+ * @param {Object} sourceObj source object
+ * @param {Object} [destObj]
+ * @param {Function|Boolean} [filter]
+ * @param {Function} [propFilter]
+ *
+ * @returns {Object}
+ */
+const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
+ let props;
+ let i;
+ let prop;
+ const merged = {};
+
+ destObj = destObj || {};
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ if (sourceObj == null) return destObj;
+
+ do {
+ props = Object.getOwnPropertyNames(sourceObj);
+ i = props.length;
+ while (i-- > 0) {
+ prop = props[i];
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+ destObj[prop] = sourceObj[prop];
+ merged[prop] = true;
+ }
+ }
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+
+ return destObj;
+};
+
+/**
+ * Determines whether a string ends with the characters of a specified string
+ *
+ * @param {String} str
+ * @param {String} searchString
+ * @param {Number} [position= 0]
+ *
+ * @returns {boolean}
+ */
+const endsWith = (str, searchString, position) => {
+ str = String(str);
+ if (position === undefined || position > str.length) {
+ position = str.length;
+ }
+ position -= searchString.length;
+ const lastIndex = str.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+};
+
+
+/**
+ * Returns new array from array like object or null if failed
+ *
+ * @param {*} [thing]
+ *
+ * @returns {?Array}
+ */
+const toArray = (thing) => {
+ if (!thing) return null;
+ if (isArray(thing)) return thing;
+ let i = thing.length;
+ if (!isNumber(i)) return null;
+ const arr = new Array(i);
+ while (i-- > 0) {
+ arr[i] = thing[i];
+ }
+ return arr;
+};
+
+/**
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+ * thing passed in is an instance of Uint8Array
+ *
+ * @param {TypedArray}
+ *
+ * @returns {Array}
+ */
+// eslint-disable-next-line func-names
+const isTypedArray = (TypedArray => {
+ // eslint-disable-next-line func-names
+ return thing => {
+ return TypedArray && thing instanceof TypedArray;
+ };
+})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+/**
+ * For each entry in the object, call the function with the key and value.
+ *
+ * @param {Object} obj - The object to iterate over.
+ * @param {Function} fn - The function to call for each entry.
+ *
+ * @returns {void}
+ */
+const forEachEntry = (obj, fn) => {
+ const generator = obj && obj[Symbol.iterator];
+
+ const iterator = generator.call(obj);
+
+ let result;
+
+ while ((result = iterator.next()) && !result.done) {
+ const pair = result.value;
+ fn.call(obj, pair[0], pair[1]);
+ }
+};
+
+/**
+ * It takes a regular expression and a string, and returns an array of all the matches
+ *
+ * @param {string} regExp - The regular expression to match against.
+ * @param {string} str - The string to search.
+ *
+ * @returns {Array}
+ */
+const matchAll = (regExp, str) => {
+ let matches;
+ const arr = [];
+
+ while ((matches = regExp.exec(str)) !== null) {
+ arr.push(matches);
+ }
+
+ return arr;
+};
+
+/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+const isHTMLForm = kindOfTest('HTMLFormElement');
+
+const toCamelCase = str => {
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
+ function replacer(m, p1, p2) {
+ return p1.toUpperCase() + p2;
+ }
+ );
+};
+
+/* Creating a function that will check if an object has a property. */
+const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
+
+/**
+ * Determine if a value is a RegExp object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a RegExp object, otherwise false
+ */
+const isRegExp = kindOfTest('RegExp');
+
+const reduceDescriptors = (obj, reducer) => {
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
+ const reducedDescriptors = {};
+
+ forEach(descriptors, (descriptor, name) => {
+ let ret;
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
+ reducedDescriptors[name] = ret || descriptor;
+ }
+ });
+
+ Object.defineProperties(obj, reducedDescriptors);
+};
+
+/**
+ * Makes all methods read-only
+ * @param {Object} obj
+ */
+
+const freezeMethods = (obj) => {
+ reduceDescriptors(obj, (descriptor, name) => {
+ // skip restricted props in strict mode
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+ return false;
+ }
+
+ const value = obj[name];
+
+ if (!isFunction(value)) return;
+
+ descriptor.enumerable = false;
+
+ if ('writable' in descriptor) {
+ descriptor.writable = false;
+ return;
+ }
+
+ if (!descriptor.set) {
+ descriptor.set = () => {
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
+ };
+ }
+ });
+};
+
+const toObjectSet = (arrayOrString, delimiter) => {
+ const obj = {};
+
+ const define = (arr) => {
+ arr.forEach(value => {
+ obj[value] = true;
+ });
+ };
+
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+
+ return obj;
+};
+
+const noop = () => {};
+
+const toFiniteNumber = (value, defaultValue) => {
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+};
+
+const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
+
+const DIGIT = '0123456789';
+
+const ALPHABET = {
+ DIGIT,
+ ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+};
+
+const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
+ let str = '';
+ const {length} = alphabet;
+ while (size--) {
+ str += alphabet[Math.random() * length|0];
+ }
+
+ return str;
+};
+
+/**
+ * If the thing is a FormData object, return true, otherwise return false.
+ *
+ * @param {unknown} thing - The thing to check.
+ *
+ * @returns {boolean}
+ */
+function isSpecCompliantForm(thing) {
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
+}
+
+const toJSONObject = (obj) => {
+ const stack = new Array(10);
+
+ const visit = (source, i) => {
+
+ if (isObject(source)) {
+ if (stack.indexOf(source) >= 0) {
+ return;
+ }
+
+ if(!('toJSON' in source)) {
+ stack[i] = source;
+ const target = isArray(source) ? [] : {};
+
+ forEach(source, (value, key) => {
+ const reducedValue = visit(value, i + 1);
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
+ });
+
+ stack[i] = undefined;
+
+ return target;
+ }
+ }
+
+ return source;
+ };
+
+ return visit(obj, 0);
+};
+
+const isAsyncFn = kindOfTest('AsyncFunction');
+
+const isThenable = (thing) =>
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
+
+// original code
+// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+
+ return postMessageSupported ? ((token, callbacks) => {
+ _global.addEventListener("message", ({source, data}) => {
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+
+ return (cb) => {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ }
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
+})(
+ typeof setImmediate === 'function',
+ isFunction(_global.postMessage)
+);
+
+const asap = typeof queueMicrotask !== 'undefined' ?
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
+
+// *********************
+
+var utils$1 = {
+ isArray,
+ isArrayBuffer,
+ isBuffer,
+ isFormData,
+ isArrayBufferView,
+ isString,
+ isNumber,
+ isBoolean,
+ isObject,
+ isPlainObject,
+ isReadableStream,
+ isRequest,
+ isResponse,
+ isHeaders,
+ isUndefined,
+ isDate,
+ isFile,
+ isBlob,
+ isRegExp,
+ isFunction,
+ isStream,
+ isURLSearchParams,
+ isTypedArray,
+ isFileList,
+ forEach,
+ merge,
+ extend,
+ trim,
+ stripBOM,
+ inherits,
+ toFlatObject,
+ kindOf,
+ kindOfTest,
+ endsWith,
+ toArray,
+ forEachEntry,
+ matchAll,
+ isHTMLForm,
+ hasOwnProperty,
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
+ reduceDescriptors,
+ freezeMethods,
+ toObjectSet,
+ toCamelCase,
+ noop,
+ toFiniteNumber,
+ findKey,
+ global: _global,
+ isContextDefined,
+ ALPHABET,
+ generateString,
+ isSpecCompliantForm,
+ toJSONObject,
+ isAsyncFn,
+ isThenable,
+ setImmediate: _setImmediate,
+ asap
+};
+
+/**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [config] The config.
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ *
+ * @returns {Error} The created error.
+ */
+function AxiosError(message, code, config, request, response) {
+ Error.call(this);
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = (new Error()).stack;
+ }
+
+ this.message = message;
+ this.name = 'AxiosError';
+ code && (this.code = code);
+ config && (this.config = config);
+ request && (this.request = request);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
+}
+
+utils$1.inherits(AxiosError, Error, {
+ toJSON: function toJSON() {
+ return {
+ // Standard
+ message: this.message,
+ name: this.name,
+ // Microsoft
+ description: this.description,
+ number: this.number,
+ // Mozilla
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ // Axios
+ config: utils$1.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+ }
+});
+
+const prototype$1 = AxiosError.prototype;
+const descriptors = {};
+
+[
+ 'ERR_BAD_OPTION_VALUE',
+ 'ERR_BAD_OPTION',
+ 'ECONNABORTED',
+ 'ETIMEDOUT',
+ 'ERR_NETWORK',
+ 'ERR_FR_TOO_MANY_REDIRECTS',
+ 'ERR_DEPRECATED',
+ 'ERR_BAD_RESPONSE',
+ 'ERR_BAD_REQUEST',
+ 'ERR_CANCELED',
+ 'ERR_NOT_SUPPORT',
+ 'ERR_INVALID_URL'
+// eslint-disable-next-line func-names
+].forEach(code => {
+ descriptors[code] = {value: code};
+});
+
+Object.defineProperties(AxiosError, descriptors);
+Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
+
+// eslint-disable-next-line func-names
+AxiosError.from = (error, code, config, request, response, customProps) => {
+ const axiosError = Object.create(prototype$1);
+
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
+ return obj !== Error.prototype;
+ }, prop => {
+ return prop !== 'isAxiosError';
+ });
+
+ AxiosError.call(axiosError, error.message, code, config, request, response);
+
+ axiosError.cause = error;
+
+ axiosError.name = error.name;
+
+ customProps && Object.assign(axiosError, customProps);
+
+ return axiosError;
+};
+
+// eslint-disable-next-line strict
+var httpAdapter = null;
+
+/**
+ * Determines if the given thing is a array or js object.
+ *
+ * @param {string} thing - The object or array to be visited.
+ *
+ * @returns {boolean}
+ */
+function isVisitable(thing) {
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
+}
+
+/**
+ * It removes the brackets from the end of a string
+ *
+ * @param {string} key - The key of the parameter.
+ *
+ * @returns {string} the key without the brackets.
+ */
+function removeBrackets(key) {
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
+}
+
+/**
+ * It takes a path, a key, and a boolean, and returns a string
+ *
+ * @param {string} path - The path to the current key.
+ * @param {string} key - The key of the current object being iterated over.
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+ *
+ * @returns {string} The path to the current key.
+ */
+function renderKey(path, key, dots) {
+ if (!path) return key;
+ return path.concat(key).map(function each(token, i) {
+ // eslint-disable-next-line no-param-reassign
+ token = removeBrackets(token);
+ return !dots && i ? '[' + token + ']' : token;
+ }).join(dots ? '.' : '');
+}
+
+/**
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
+ *
+ * @param {Array} arr - The array to check
+ *
+ * @returns {boolean}
+ */
+function isFlatArray(arr) {
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
+}
+
+const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
+ return /^is[A-Z]/.test(prop);
+});
+
+/**
+ * Convert a data object to FormData
+ *
+ * @param {Object} obj
+ * @param {?Object} [formData]
+ * @param {?Object} [options]
+ * @param {Function} [options.visitor]
+ * @param {Boolean} [options.metaTokens = true]
+ * @param {Boolean} [options.dots = false]
+ * @param {?Boolean} [options.indexes = false]
+ *
+ * @returns {Object}
+ **/
+
+/**
+ * It converts an object into a FormData object
+ *
+ * @param {Object} obj - The object to convert to form data.
+ * @param {string} formData - The FormData object to append to.
+ * @param {Object} options
+ *
+ * @returns
+ */
+function toFormData(obj, formData, options) {
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('target must be an object');
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ formData = formData || new (FormData)();
+
+ // eslint-disable-next-line no-param-reassign
+ options = utils$1.toFlatObject(options, {
+ metaTokens: true,
+ dots: false,
+ indexes: false
+ }, false, function defined(option, source) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ return !utils$1.isUndefined(source[option]);
+ });
+
+ const metaTokens = options.metaTokens;
+ // eslint-disable-next-line no-use-before-define
+ const visitor = options.visitor || defaultVisitor;
+ const dots = options.dots;
+ const indexes = options.indexes;
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
+
+ if (!utils$1.isFunction(visitor)) {
+ throw new TypeError('visitor must be a function');
+ }
+
+ function convertValue(value) {
+ if (value === null) return '';
+
+ if (utils$1.isDate(value)) {
+ return value.toISOString();
+ }
+
+ if (!useBlob && utils$1.isBlob(value)) {
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
+ }
+
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Default visitor.
+ *
+ * @param {*} value
+ * @param {String|Number} key
+ * @param {Array} path
+ * @this {FormData}
+ *
+ * @returns {boolean} return true to visit the each prop of the value recursively
+ */
+ function defaultVisitor(value, key, path) {
+ let arr = value;
+
+ if (value && !path && typeof value === 'object') {
+ if (utils$1.endsWith(key, '{}')) {
+ // eslint-disable-next-line no-param-reassign
+ key = metaTokens ? key : key.slice(0, -2);
+ // eslint-disable-next-line no-param-reassign
+ value = JSON.stringify(value);
+ } else if (
+ (utils$1.isArray(value) && isFlatArray(value)) ||
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
+ )) {
+ // eslint-disable-next-line no-param-reassign
+ key = removeBrackets(key);
+
+ arr.forEach(function each(el, index) {
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
+ // eslint-disable-next-line no-nested-ternary
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
+ convertValue(el)
+ );
+ });
+ return false;
+ }
+ }
+
+ if (isVisitable(value)) {
+ return true;
+ }
+
+ formData.append(renderKey(path, key, dots), convertValue(value));
+
+ return false;
+ }
+
+ const stack = [];
+
+ const exposedHelpers = Object.assign(predicates, {
+ defaultVisitor,
+ convertValue,
+ isVisitable
+ });
+
+ function build(value, path) {
+ if (utils$1.isUndefined(value)) return;
+
+ if (stack.indexOf(value) !== -1) {
+ throw Error('Circular reference detected in ' + path.join('.'));
+ }
+
+ stack.push(value);
+
+ utils$1.forEach(value, function each(el, key) {
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
+ );
+
+ if (result === true) {
+ build(el, path ? path.concat(key) : [key]);
+ }
+ });
+
+ stack.pop();
+ }
+
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('data must be an object');
+ }
+
+ build(obj);
+
+ return formData;
+}
+
+/**
+ * It encodes a string by replacing all characters that are not in the unreserved set with
+ * their percent-encoded equivalents
+ *
+ * @param {string} str - The string to encode.
+ *
+ * @returns {string} The encoded string.
+ */
+function encode$1(str) {
+ const charMap = {
+ '!': '%21',
+ "'": '%27',
+ '(': '%28',
+ ')': '%29',
+ '~': '%7E',
+ '%20': '+',
+ '%00': '\x00'
+ };
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+ return charMap[match];
+ });
+}
+
+/**
+ * It takes a params object and converts it to a FormData object
+ *
+ * @param {Object} params - The parameters to be converted to a FormData object.
+ * @param {Object} options - The options object passed to the Axios constructor.
+ *
+ * @returns {void}
+ */
+function AxiosURLSearchParams(params, options) {
+ this._pairs = [];
+
+ params && toFormData(params, this, options);
+}
+
+const prototype = AxiosURLSearchParams.prototype;
+
+prototype.append = function append(name, value) {
+ this._pairs.push([name, value]);
+};
+
+prototype.toString = function toString(encoder) {
+ const _encode = encoder ? function(value) {
+ return encoder.call(this, value, encode$1);
+ } : encode$1;
+
+ return this._pairs.map(function each(pair) {
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
+ }, '').join('&');
+};
+
+/**
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+ * URI encoded counterparts
+ *
+ * @param {string} val The value to be encoded.
+ *
+ * @returns {string} The encoded value.
+ */
+function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+}
+
+/**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @param {?(object|Function)} options
+ *
+ * @returns {string} The formatted url
+ */
+function buildURL(url, params, options) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ const _encode = options && options.encode || encode;
+
+ if (utils$1.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
+
+ const serializeFn = options && options.serialize;
+
+ let serializedParams;
+
+ if (serializeFn) {
+ serializedParams = serializeFn(params, options);
+ } else {
+ serializedParams = utils$1.isURLSearchParams(params) ?
+ params.toString() :
+ new AxiosURLSearchParams(params, options).toString(_encode);
+ }
+
+ if (serializedParams) {
+ const hashmarkIndex = url.indexOf("#");
+
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+}
+
+class InterceptorManager {
+ constructor() {
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled,
+ rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ }
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ *
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
+ */
+ eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ }
+
+ /**
+ * Clear all interceptors from the stack
+ *
+ * @returns {void}
+ */
+ clear() {
+ if (this.handlers) {
+ this.handlers = [];
+ }
+ }
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ *
+ * @returns {void}
+ */
+ forEach(fn) {
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ }
+}
+
+var InterceptorManager$1 = InterceptorManager;
+
+var transitionalDefaults = {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+};
+
+var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
+
+var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
+
+var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
+
+var platform$1 = {
+ isBrowser: true,
+ classes: {
+ URLSearchParams: URLSearchParams$1,
+ FormData: FormData$1,
+ Blob: Blob$1
+ },
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
+};
+
+const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+
+const _navigator = typeof navigator === 'object' && navigator || undefined;
+
+/**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ * nativescript
+ * navigator.product -> 'NativeScript' or 'NS'
+ *
+ * @returns {boolean}
+ */
+const hasStandardBrowserEnv = hasBrowserEnv &&
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+/**
+ * Determine if we're running in a standard browser webWorker environment
+ *
+ * Although the `isStandardBrowserEnv` method indicates that
+ * `allows axios to run in a web worker`, the WebWorker will still be
+ * filtered out due to its judgment standard
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+ * This leads to a problem when axios post `FormData` in webWorker
+ */
+const hasStandardBrowserWebWorkerEnv = (() => {
+ return (
+ typeof WorkerGlobalScope !== 'undefined' &&
+ // eslint-disable-next-line no-undef
+ self instanceof WorkerGlobalScope &&
+ typeof self.importScripts === 'function'
+ );
+})();
+
+const origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+var utils = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ hasBrowserEnv: hasBrowserEnv,
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
+ navigator: _navigator,
+ origin: origin
+});
+
+var platform = {
+ ...utils,
+ ...platform$1
+};
+
+function toURLEncodedForm(data, options) {
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
+ visitor: function(value, key, path, helpers) {
+ if (platform.isNode && utils$1.isBuffer(value)) {
+ this.append(key, value.toString('base64'));
+ return false;
+ }
+
+ return helpers.defaultVisitor.apply(this, arguments);
+ }
+ }, options));
+}
+
+/**
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+ *
+ * @param {string} name - The name of the property to get.
+ *
+ * @returns An array of strings.
+ */
+function parsePropPath(name) {
+ // foo[x][y][z]
+ // foo.x.y.z
+ // foo-x-y-z
+ // foo x y z
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
+ return match[0] === '[]' ? '' : match[1] || match[0];
+ });
+}
+
+/**
+ * Convert an array to an object.
+ *
+ * @param {Array} arr - The array to convert to an object.
+ *
+ * @returns An object with the same keys and values as the array.
+ */
+function arrayToObject(arr) {
+ const obj = {};
+ const keys = Object.keys(arr);
+ let i;
+ const len = keys.length;
+ let key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ obj[key] = arr[key];
+ }
+ return obj;
+}
+
+/**
+ * It takes a FormData object and returns a JavaScript object
+ *
+ * @param {string} formData The FormData object to convert to JSON.
+ *
+ * @returns {Object | null} The converted object.
+ */
+function formDataToJSON(formData) {
+ function buildPath(path, value, target, index) {
+ let name = path[index++];
+
+ if (name === '__proto__') return true;
+
+ const isNumericKey = Number.isFinite(+name);
+ const isLast = index >= path.length;
+ name = !name && utils$1.isArray(target) ? target.length : name;
+
+ if (isLast) {
+ if (utils$1.hasOwnProp(target, name)) {
+ target[name] = [target[name], value];
+ } else {
+ target[name] = value;
+ }
+
+ return !isNumericKey;
+ }
+
+ if (!target[name] || !utils$1.isObject(target[name])) {
+ target[name] = [];
+ }
+
+ const result = buildPath(path, value, target[name], index);
+
+ if (result && utils$1.isArray(target[name])) {
+ target[name] = arrayToObject(target[name]);
+ }
+
+ return !isNumericKey;
+ }
+
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
+ const obj = {};
+
+ utils$1.forEachEntry(formData, (name, value) => {
+ buildPath(parsePropPath(name), value, obj, 0);
+ });
+
+ return obj;
+ }
+
+ return null;
+}
+
+/**
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+ * of the input
+ *
+ * @param {any} rawValue - The value to be stringified.
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
+ * @param {Function} encoder - A function that takes a value and returns a string.
+ *
+ * @returns {string} A stringified version of the rawValue.
+ */
+function stringifySafely(rawValue, parser, encoder) {
+ if (utils$1.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils$1.trim(rawValue);
+ } catch (e) {
+ if (e.name !== 'SyntaxError') {
+ throw e;
+ }
+ }
+ }
+
+ return (encoder || JSON.stringify)(rawValue);
+}
+
+const defaults = {
+
+ transitional: transitionalDefaults,
+
+ adapter: ['xhr', 'http', 'fetch'],
+
+ transformRequest: [function transformRequest(data, headers) {
+ const contentType = headers.getContentType() || '';
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
+ const isObjectPayload = utils$1.isObject(data);
+
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
+ data = new FormData(data);
+ }
+
+ const isFormData = utils$1.isFormData(data);
+
+ if (isFormData) {
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ }
+
+ if (utils$1.isArrayBuffer(data) ||
+ utils$1.isBuffer(data) ||
+ utils$1.isStream(data) ||
+ utils$1.isFile(data) ||
+ utils$1.isBlob(data) ||
+ utils$1.isReadableStream(data)
+ ) {
+ return data;
+ }
+ if (utils$1.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils$1.isURLSearchParams(data)) {
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+ return data.toString();
+ }
+
+ let isFileList;
+
+ if (isObjectPayload) {
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+ return toURLEncodedForm(data, this.formSerializer).toString();
+ }
+
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+ const _FormData = this.env && this.env.FormData;
+
+ return toFormData(
+ isFileList ? {'files[]': data} : data,
+ _FormData && new _FormData(),
+ this.formSerializer
+ );
+ }
+ }
+
+ if (isObjectPayload || hasJSONContentType ) {
+ headers.setContentType('application/json', false);
+ return stringifySafely(data);
+ }
+
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ const transitional = this.transitional || defaults.transitional;
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ const JSONRequested = this.responseType === 'json';
+
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
+ return data;
+ }
+
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
+
+ try {
+ return JSON.parse(data);
+ } catch (e) {
+ if (strictJSONParsing) {
+ if (e.name === 'SyntaxError') {
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
+ }
+ throw e;
+ }
+ }
+ }
+
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+ maxBodyLength: -1,
+
+ env: {
+ FormData: platform.classes.FormData,
+ Blob: platform.classes.Blob
+ },
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ },
+
+ headers: {
+ common: {
+ 'Accept': 'application/json, text/plain, */*',
+ 'Content-Type': undefined
+ }
+ }
+};
+
+utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
+ defaults.headers[method] = {};
+});
+
+var defaults$1 = defaults;
+
+// RawAxiosHeaders whose duplicates are ignored by node
+// c.f. https://nodejs.org/api/http.html#http_message_headers
+const ignoreDuplicateOf = utils$1.toObjectSet([
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+]);
+
+/**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} rawHeaders Headers needing to be parsed
+ *
+ * @returns {Object} Headers parsed into an object
+ */
+var parseHeaders = rawHeaders => {
+ const parsed = {};
+ let key;
+ let val;
+ let i;
+
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+ i = line.indexOf(':');
+ key = line.substring(0, i).trim().toLowerCase();
+ val = line.substring(i + 1).trim();
+
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
+ return;
+ }
+
+ if (key === 'set-cookie') {
+ if (parsed[key]) {
+ parsed[key].push(val);
+ } else {
+ parsed[key] = [val];
+ }
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ });
+
+ return parsed;
+};
+
+const $internals = Symbol('internals');
+
+function normalizeHeader(header) {
+ return header && String(header).trim().toLowerCase();
+}
+
+function normalizeValue(value) {
+ if (value === false || value == null) {
+ return value;
+ }
+
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
+}
+
+function parseTokens(str) {
+ const tokens = Object.create(null);
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+ let match;
+
+ while ((match = tokensRE.exec(str))) {
+ tokens[match[1]] = match[2];
+ }
+
+ return tokens;
+}
+
+const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+
+function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+ if (utils$1.isFunction(filter)) {
+ return filter.call(this, value, header);
+ }
+
+ if (isHeaderNameFilter) {
+ value = header;
+ }
+
+ if (!utils$1.isString(value)) return;
+
+ if (utils$1.isString(filter)) {
+ return value.indexOf(filter) !== -1;
+ }
+
+ if (utils$1.isRegExp(filter)) {
+ return filter.test(value);
+ }
+}
+
+function formatHeader(header) {
+ return header.trim()
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
+ return char.toUpperCase() + str;
+ });
+}
+
+function buildAccessors(obj, header) {
+ const accessorName = utils$1.toCamelCase(' ' + header);
+
+ ['get', 'set', 'has'].forEach(methodName => {
+ Object.defineProperty(obj, methodName + accessorName, {
+ value: function(arg1, arg2, arg3) {
+ return this[methodName].call(this, header, arg1, arg2, arg3);
+ },
+ configurable: true
+ });
+ });
+}
+
+class AxiosHeaders {
+ constructor(headers) {
+ headers && this.set(headers);
+ }
+
+ set(header, valueOrRewrite, rewrite) {
+ const self = this;
+
+ function setHeader(_value, _header, _rewrite) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!lHeader) {
+ throw new Error('header name must be a non-empty string');
+ }
+
+ const key = utils$1.findKey(self, lHeader);
+
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
+ self[key || _header] = normalizeValue(_value);
+ }
+ }
+
+ const setHeaders = (headers, _rewrite) =>
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
+
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
+ setHeaders(header, valueOrRewrite);
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+ setHeaders(parseHeaders(header), valueOrRewrite);
+ } else if (utils$1.isHeaders(header)) {
+ for (const [key, value] of header.entries()) {
+ setHeader(value, key, rewrite);
+ }
+ } else {
+ header != null && setHeader(valueOrRewrite, header, rewrite);
+ }
+
+ return this;
+ }
+
+ get(header, parser) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ if (key) {
+ const value = this[key];
+
+ if (!parser) {
+ return value;
+ }
+
+ if (parser === true) {
+ return parseTokens(value);
+ }
+
+ if (utils$1.isFunction(parser)) {
+ return parser.call(this, value, key);
+ }
+
+ if (utils$1.isRegExp(parser)) {
+ return parser.exec(value);
+ }
+
+ throw new TypeError('parser must be boolean|regexp|function');
+ }
+ }
+ }
+
+ has(header, matcher) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ }
+
+ return false;
+ }
+
+ delete(header, matcher) {
+ const self = this;
+ let deleted = false;
+
+ function deleteHeader(_header) {
+ _header = normalizeHeader(_header);
+
+ if (_header) {
+ const key = utils$1.findKey(self, _header);
+
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+ delete self[key];
+
+ deleted = true;
+ }
+ }
+ }
+
+ if (utils$1.isArray(header)) {
+ header.forEach(deleteHeader);
+ } else {
+ deleteHeader(header);
+ }
+
+ return deleted;
+ }
+
+ clear(matcher) {
+ const keys = Object.keys(this);
+ let i = keys.length;
+ let deleted = false;
+
+ while (i--) {
+ const key = keys[i];
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+ delete this[key];
+ deleted = true;
+ }
+ }
+
+ return deleted;
+ }
+
+ normalize(format) {
+ const self = this;
+ const headers = {};
+
+ utils$1.forEach(this, (value, header) => {
+ const key = utils$1.findKey(headers, header);
+
+ if (key) {
+ self[key] = normalizeValue(value);
+ delete self[header];
+ return;
+ }
+
+ const normalized = format ? formatHeader(header) : String(header).trim();
+
+ if (normalized !== header) {
+ delete self[header];
+ }
+
+ self[normalized] = normalizeValue(value);
+
+ headers[normalized] = true;
+ });
+
+ return this;
+ }
+
+ concat(...targets) {
+ return this.constructor.concat(this, ...targets);
+ }
+
+ toJSON(asStrings) {
+ const obj = Object.create(null);
+
+ utils$1.forEach(this, (value, header) => {
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
+ });
+
+ return obj;
+ }
+
+ [Symbol.iterator]() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+
+ toString() {
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'AxiosHeaders';
+ }
+
+ static from(thing) {
+ return thing instanceof this ? thing : new this(thing);
+ }
+
+ static concat(first, ...targets) {
+ const computed = new this(first);
+
+ targets.forEach((target) => computed.set(target));
+
+ return computed;
+ }
+
+ static accessor(header) {
+ const internals = this[$internals] = (this[$internals] = {
+ accessors: {}
+ });
+
+ const accessors = internals.accessors;
+ const prototype = this.prototype;
+
+ function defineAccessor(_header) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!accessors[lHeader]) {
+ buildAccessors(prototype, _header);
+ accessors[lHeader] = true;
+ }
+ }
+
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+
+ return this;
+ }
+}
+
+AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+// reserved names hotfix
+utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+ return {
+ get: () => value,
+ set(headerValue) {
+ this[mapped] = headerValue;
+ }
+ }
+});
+
+utils$1.freezeMethods(AxiosHeaders);
+
+var AxiosHeaders$1 = AxiosHeaders;
+
+/**
+ * Transform the data for a request or a response
+ *
+ * @param {Array|Function} fns A single function or Array of functions
+ * @param {?Object} response The response object
+ *
+ * @returns {*} The resulting transformed data
+ */
+function transformData(fns, response) {
+ const config = this || defaults$1;
+ const context = response || config;
+ const headers = AxiosHeaders$1.from(context.headers);
+ let data = context.data;
+
+ utils$1.forEach(fns, function transform(fn) {
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ });
+
+ headers.normalize();
+
+ return data;
+}
+
+function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+}
+
+/**
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
+ *
+ * @param {string=} message The message.
+ * @param {Object=} config The config.
+ * @param {Object=} request The request.
+ *
+ * @returns {CanceledError} The created error.
+ */
+function CanceledError(message, config, request) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
+ this.name = 'CanceledError';
+}
+
+utils$1.inherits(CanceledError, AxiosError, {
+ __CANCEL__: true
+});
+
+/**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ *
+ * @returns {object} The response.
+ */
+function settle(resolve, reject, response) {
+ const validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(new AxiosError(
+ 'Request failed with status code ' + response.status,
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
+ response.config,
+ response.request,
+ response
+ ));
+ }
+}
+
+function parseProtocol(url) {
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+}
+
+/**
+ * Calculate data maxRate
+ * @param {Number} [samplesCount= 10]
+ * @param {Number} [min= 1000]
+ * @returns {Function}
+ */
+function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+
+ min = min !== undefined ? min : 1000;
+
+ return function push(chunkLength) {
+ const now = Date.now();
+
+ const startedAt = timestamps[tail];
+
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+
+ let i = tail;
+ let bytesCount = 0;
+
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+
+ head = (head + 1) % samplesCount;
+
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+
+ if (now - firstSampleTS < min) {
+ return;
+ }
+
+ const passed = startedAt && now - startedAt;
+
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+}
+
+/**
+ * Throttle decorator
+ * @param {Function} fn
+ * @param {Number} freq
+ * @return {Function}
+ */
+function throttle(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1000 / freq;
+ let lastArgs;
+ let timer;
+
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn.apply(null, args);
+ };
+
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if ( passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ }
+ };
+
+ const flush = () => lastArgs && invoke(lastArgs);
+
+ return [throttled, flush];
+}
+
+const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer(50, 250);
+
+ return throttle(e => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : undefined;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+
+ bytesNotified = loaded;
+
+ const data = {
+ loaded,
+ total,
+ progress: total ? (loaded / total) : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? 'download' : 'upload']: true
+ };
+
+ listener(data);
+ }, freq);
+};
+
+const progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+};
+
+const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
+
+var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
+ url = new URL(url, platform.origin);
+
+ return (
+ origin.protocol === url.protocol &&
+ origin.host === url.host &&
+ (isMSIE || origin.port === url.port)
+ );
+})(
+ new URL(platform.origin),
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
+) : () => true;
+
+var cookies = platform.hasStandardBrowserEnv ?
+
+ // Standard browser envs support document.cookie
+ {
+ write(name, value, expires, path, domain, secure) {
+ const cookie = [name + '=' + encodeURIComponent(value)];
+
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
+
+ utils$1.isString(path) && cookie.push('path=' + path);
+
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
+
+ secure === true && cookie.push('secure');
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read(name) {
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ }
+
+ :
+
+ // Non-standard browser env (web workers, react-native) lack needed support.
+ {
+ write() {},
+ read() {
+ return null;
+ },
+ remove() {}
+ };
+
+/**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ *
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+}
+
+/**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ *
+ * @returns {string} The combined URL
+ */
+function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+}
+
+/**
+ * Creates a new URL by combining the baseURL with the requestedURL,
+ * only when the requestedURL is not already an absolute URL.
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} requestedURL Absolute or relative URL to combine
+ *
+ * @returns {string} The combined full path
+ */
+function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+}
+
+const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
+
+/**
+ * Config-specific merge-function which creates a new config-object
+ * by merging two configuration objects together.
+ *
+ * @param {Object} config1
+ * @param {Object} config2
+ *
+ * @returns {Object} New object resulting from merging config2 to config1
+ */
+function mergeConfig(config1, config2) {
+ // eslint-disable-next-line no-param-reassign
+ config2 = config2 || {};
+ const config = {};
+
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
+ return utils$1.merge.call({caseless}, target, source);
+ } else if (utils$1.isPlainObject(source)) {
+ return utils$1.merge({}, source);
+ } else if (utils$1.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDeepProperties(a, b, prop , caseless) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(a, b, prop , caseless);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a, prop , caseless);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function valueFromConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function defaultToConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) {
+ return getMergedValue(a, b);
+ } else if (prop in config1) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ const mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
+ };
+
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ const merge = mergeMap[prop] || mergeDeepProperties;
+ const configValue = merge(config1[prop], config2[prop], prop);
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
+ });
+
+ return config;
+}
+
+var resolveConfig = (config) => {
+ const newConfig = mergeConfig({}, config);
+
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
+
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
+
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+
+ // HTTP basic authentication
+ if (auth) {
+ headers.set('Authorization', 'Basic ' +
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
+ );
+ }
+
+ let contentType;
+
+ if (utils$1.isFormData(data)) {
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+ headers.setContentType(undefined); // Let the browser set it
+ } else if ((contentType = headers.getContentType()) !== false) {
+ // fix semicolon duplication issue for ReactNative FormData implementation
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
+ }
+ }
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+
+ if (platform.hasStandardBrowserEnv) {
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
+ // Add xsrf header
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+
+ if (xsrfValue) {
+ headers.set(xsrfHeaderName, xsrfValue);
+ }
+ }
+ }
+
+ return newConfig;
+};
+
+const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+
+var xhrAdapter = isXHRAdapterSupported && function (config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ const _config = resolveConfig(config);
+ let requestData = _config.data;
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
+ let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
+
+ function done() {
+ flushUpload && flushUpload(); // flush events
+ flushDownload && flushDownload(); // flush events
+
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+ }
+
+ let request = new XMLHttpRequest();
+
+ request.open(_config.method.toUpperCase(), _config.url, true);
+
+ // Set the request timeout in MS
+ request.timeout = _config.timeout;
+
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ // Prepare the response
+ const responseHeaders = AxiosHeaders$1.from(
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
+ );
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
+ request.responseText : request.response;
+ const response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ };
+
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, response);
+
+ // Clean up request
+ request = null;
+ }
+
+ if ('onloadend' in request) {
+ // Use onloadend if available
+ request.onloadend = onloadend;
+ } else {
+ // Listen for ready state to emulate onloadend
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+ // readystate handler is calling before onerror or ontimeout handlers,
+ // so we should call onloadend on the next 'tick'
+ setTimeout(onloadend);
+ };
+ }
+
+ // Handle browser request cancellation (as opposed to a manual cancellation)
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = _config.transitional || transitionalDefaults;
+ if (_config.timeoutErrorMessage) {
+ timeoutErrorMessage = _config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
+ config,
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Remove Content-Type if data is undefined
+ requestData === undefined && requestHeaders.setContentType(null);
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (!utils$1.isUndefined(_config.withCredentials)) {
+ request.withCredentials = !!_config.withCredentials;
+ }
+
+ // Add responseType to request if needed
+ if (responseType && responseType !== 'json') {
+ request.responseType = _config.responseType;
+ }
+
+ // Handle progress if needed
+ if (onDownloadProgress) {
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
+ request.addEventListener('progress', downloadThrottled);
+ }
+
+ // Not all browsers support upload events
+ if (onUploadProgress && request.upload) {
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
+
+ request.upload.addEventListener('progress', uploadThrottled);
+
+ request.upload.addEventListener('loadend', flushUpload);
+ }
+
+ if (_config.cancelToken || _config.signal) {
+ // Handle cancellation
+ // eslint-disable-next-line func-names
+ onCanceled = cancel => {
+ if (!request) {
+ return;
+ }
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) {
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
+ }
+ }
+
+ const protocol = parseProtocol(_config.url);
+
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
+ return;
+ }
+
+
+ // Send the request
+ request.send(requestData || null);
+ });
+};
+
+const composeSignals = (signals, timeout) => {
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
+
+ if (timeout || length) {
+ let controller = new AbortController();
+
+ let aborted;
+
+ const onabort = function (reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
+ }
+ };
+
+ let timer = timeout && setTimeout(() => {
+ timer = null;
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
+ }, timeout);
+
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach(signal => {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+ });
+ signals = null;
+ }
+ };
+
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
+
+ const {signal} = controller;
+
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
+
+ return signal;
+ }
+};
+
+var composeSignals$1 = composeSignals;
+
+const streamChunk = function* (chunk, chunkSize) {
+ let len = chunk.byteLength;
+
+ if (!chunkSize || len < chunkSize) {
+ yield chunk;
+ return;
+ }
+
+ let pos = 0;
+ let end;
+
+ while (pos < len) {
+ end = pos + chunkSize;
+ yield chunk.slice(pos, end);
+ pos = end;
+ }
+};
+
+const readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) {
+ yield* streamChunk(chunk, chunkSize);
+ }
+};
+
+const readStream = async function* (stream) {
+ if (stream[Symbol.asyncIterator]) {
+ yield* stream;
+ return;
+ }
+
+ const reader = stream.getReader();
+ try {
+ for (;;) {
+ const {done, value} = await reader.read();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ } finally {
+ await reader.cancel();
+ }
+};
+
+const trackStream = (stream, chunkSize, onProgress, onFinish) => {
+ const iterator = readBytes(stream, chunkSize);
+
+ let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ };
+
+ return new ReadableStream({
+ async pull(controller) {
+ try {
+ const {done, value} = await iterator.next();
+
+ if (done) {
+ _onFinish();
+ controller.close();
+ return;
+ }
+
+ let len = value.byteLength;
+ if (onProgress) {
+ let loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
+ }
+ },
+ cancel(reason) {
+ _onFinish(reason);
+ return iterator.return();
+ }
+ }, {
+ highWaterMark: 2
+ })
+};
+
+const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
+const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
+
+// used only inside the fetch adapter
+const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
+);
+
+const test = (fn, ...args) => {
+ try {
+ return !!fn(...args);
+ } catch (e) {
+ return false
+ }
+};
+
+const supportsRequestStream = isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+
+ const hasContentType = new Request(platform.origin, {
+ body: new ReadableStream(),
+ method: 'POST',
+ get duplex() {
+ duplexAccessed = true;
+ return 'half';
+ },
+ }).headers.has('Content-Type');
+
+ return duplexAccessed && !hasContentType;
+});
+
+const DEFAULT_CHUNK_SIZE = 64 * 1024;
+
+const supportsResponseStream = isReadableStreamSupported &&
+ test(() => utils$1.isReadableStream(new Response('').body));
+
+
+const resolvers = {
+ stream: supportsResponseStream && ((res) => res.body)
+};
+
+isFetchSupported && (((res) => {
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
+ (_, config) => {
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
+ });
+ });
+})(new Response));
+
+const getBodyLength = async (body) => {
+ if (body == null) {
+ return 0;
+ }
+
+ if(utils$1.isBlob(body)) {
+ return body.size;
+ }
+
+ if(utils$1.isSpecCompliantForm(body)) {
+ const _request = new Request(platform.origin, {
+ method: 'POST',
+ body,
+ });
+ return (await _request.arrayBuffer()).byteLength;
+ }
+
+ if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
+ return body.byteLength;
+ }
+
+ if(utils$1.isURLSearchParams(body)) {
+ body = body + '';
+ }
+
+ if(utils$1.isString(body)) {
+ return (await encodeText(body)).byteLength;
+ }
+};
+
+const resolveBodyLength = async (headers, body) => {
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
+
+ return length == null ? getBodyLength(body) : length;
+};
+
+var fetchAdapter = isFetchSupported && (async (config) => {
+ let {
+ url,
+ method,
+ data,
+ signal,
+ cancelToken,
+ timeout,
+ onDownloadProgress,
+ onUploadProgress,
+ responseType,
+ headers,
+ withCredentials = 'same-origin',
+ fetchOptions
+ } = resolveConfig(config);
+
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+
+ let request;
+
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+
+ let requestContentLength;
+
+ try {
+ if (
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
+ ) {
+ let _request = new Request(url, {
+ method: 'POST',
+ body: data,
+ duplex: "half"
+ });
+
+ let contentTypeHeader;
+
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+ headers.setContentType(contentTypeHeader);
+ }
+
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(
+ requestContentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress))
+ );
+
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ }
+
+ if (!utils$1.isString(withCredentials)) {
+ withCredentials = withCredentials ? 'include' : 'omit';
+ }
+
+ // Cloudflare Workers throws when credentials are defined
+ // see https://github.com/cloudflare/workerd/issues/902
+ const isCredentialsSupported = "credentials" in Request.prototype;
+ request = new Request(url, {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ });
+
+ let response = await fetch(request);
+
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
+ const options = {};
+
+ ['status', 'statusText', 'headers'].forEach(prop => {
+ options[prop] = response[prop];
+ });
+
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
+
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
+ responseContentLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
+ ) || [];
+
+ response = new Response(
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }),
+ options
+ );
+ }
+
+ responseType = responseType || 'text';
+
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
+
+ !isStreamResponse && unsubscribe && unsubscribe();
+
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders$1.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ });
+ })
+ } catch (err) {
+ unsubscribe && unsubscribe();
+
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
+ throw Object.assign(
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
+ {
+ cause: err.cause || err
+ }
+ )
+ }
+
+ throw AxiosError.from(err, err && err.code, config, request);
+ }
+});
+
+const knownAdapters = {
+ http: httpAdapter,
+ xhr: xhrAdapter,
+ fetch: fetchAdapter
+};
+
+utils$1.forEach(knownAdapters, (fn, value) => {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, 'name', {value});
+ } catch (e) {
+ // eslint-disable-next-line no-empty
+ }
+ Object.defineProperty(fn, 'adapterName', {value});
+ }
+});
+
+const renderReason = (reason) => `- ${reason}`;
+
+const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
+
+var adapters = {
+ getAdapter: (adapters) => {
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
+
+ const {length} = adapters;
+ let nameOrAdapter;
+ let adapter;
+
+ const rejectedReasons = {};
+
+ for (let i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ let id;
+
+ adapter = nameOrAdapter;
+
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+
+ if (adapter === undefined) {
+ throw new AxiosError(`Unknown adapter '${id}'`);
+ }
+ }
+
+ if (adapter) {
+ break;
+ }
+
+ rejectedReasons[id || '#' + i] = adapter;
+ }
+
+ if (!adapter) {
+
+ const reasons = Object.entries(rejectedReasons)
+ .map(([id, state]) => `adapter ${id} ` +
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
+ );
+
+ let s = length ?
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
+ 'as no adapter specified';
+
+ throw new AxiosError(
+ `There is no suitable adapter to dispatch the request ` + s,
+ 'ERR_NOT_SUPPORT'
+ );
+ }
+
+ return adapter;
+ },
+ adapters: knownAdapters
+};
+
+/**
+ * Throws a `CanceledError` if cancellation has been requested.
+ *
+ * @param {Object} config The config that is to be used for the request
+ *
+ * @returns {void}
+ */
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+
+ if (config.signal && config.signal.aborted) {
+ throw new CanceledError(null, config);
+ }
+}
+
+/**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ config.headers = AxiosHeaders$1.from(config.headers);
+
+ // Transform request data
+ config.data = transformData.call(
+ config,
+ config.transformRequest
+ );
+
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
+ }
+
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData.call(
+ config,
+ config.transformResponse,
+ response
+ );
+
+ response.headers = AxiosHeaders$1.from(response.headers);
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(
+ config,
+ config.transformResponse,
+ reason.response
+ );
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+}
+
+const VERSION = "1.7.9";
+
+const validators$1 = {};
+
+// eslint-disable-next-line func-names
+['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
+ validators$1[type] = function validator(thing) {
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+ };
+});
+
+const deprecatedWarnings = {};
+
+/**
+ * Transitional option validator
+ *
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
+ * @param {string?} version - deprecated version / removed since version
+ * @param {string?} message - some message with additional info
+ *
+ * @returns {function}
+ */
+validators$1.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+ }
+
+ // eslint-disable-next-line func-names
+ return (value, opt, opts) => {
+ if (validator === false) {
+ throw new AxiosError(
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
+ AxiosError.ERR_DEPRECATED
+ );
+ }
+
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ // eslint-disable-next-line no-console
+ console.warn(
+ formatMessage(
+ opt,
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
+ )
+ );
+ }
+
+ return validator ? validator(value, opt, opts) : true;
+ };
+};
+
+validators$1.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ // eslint-disable-next-line no-console
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ }
+};
+
+/**
+ * Assert object's properties type
+ *
+ * @param {object} options
+ * @param {object} schema
+ * @param {boolean?} allowUnknown
+ *
+ * @returns {object}
+ */
+
+function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== 'object') {
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ const keys = Object.keys(options);
+ let i = keys.length;
+ while (i-- > 0) {
+ const opt = keys[i];
+ const validator = schema[opt];
+ if (validator) {
+ const value = options[opt];
+ const result = value === undefined || validator(value, opt, options);
+ if (result !== true) {
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
+ }
+ }
+}
+
+var validator = {
+ assertOptions,
+ validators: validators$1
+};
+
+const validators = validator.validators;
+
+/**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ *
+ * @return {Axios} A new instance of Axios
+ */
+class Axios {
+ constructor(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager$1(),
+ response: new InterceptorManager$1()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ async request(configOrUrl, config) {
+ try {
+ return await this._request(configOrUrl, config);
+ } catch (err) {
+ if (err instanceof Error) {
+ let dummy = {};
+
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
+
+ // slice off the Error: ... line
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+ try {
+ if (!err.stack) {
+ err.stack = stack;
+ // match without the 2 top stack lines
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+ err.stack += '\n' + stack;
+ }
+ } catch (e) {
+ // ignore the case where "stack" is an un-writable property
+ }
+ }
+
+ throw err;
+ }
+ }
+
+ _request(configOrUrl, config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof configOrUrl === 'string') {
+ config = config || {};
+ config.url = configOrUrl;
+ } else {
+ config = configOrUrl || {};
+ }
+
+ config = mergeConfig(this.defaults, config);
+
+ const {transitional, paramsSerializer, headers} = config;
+
+ if (transitional !== undefined) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean),
+ forcedJSONParsing: validators.transitional(validators.boolean),
+ clarifyTimeoutError: validators.transitional(validators.boolean)
+ }, false);
+ }
+
+ if (paramsSerializer != null) {
+ if (utils$1.isFunction(paramsSerializer)) {
+ config.paramsSerializer = {
+ serialize: paramsSerializer
+ };
+ } else {
+ validator.assertOptions(paramsSerializer, {
+ encode: validators.function,
+ serialize: validators.function
+ }, true);
+ }
+ }
+
+ validator.assertOptions(config, {
+ baseUrl: validators.spelling('baseURL'),
+ withXsrfToken: validators.spelling('withXSRFToken')
+ }, true);
+
+ // Set config.method
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+ // Flatten headers
+ let contextHeaders = headers && utils$1.merge(
+ headers.common,
+ headers[config.method]
+ );
+
+ headers && utils$1.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ (method) => {
+ delete headers[method];
+ }
+ );
+
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
+
+ // filter out skipped interceptors
+ const requestInterceptorChain = [];
+ let synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
+ return;
+ }
+
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ const responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ let promise;
+ let i = 0;
+ let len;
+
+ if (!synchronousRequestInterceptors) {
+ const chain = [dispatchRequest.bind(this), undefined];
+ chain.unshift.apply(chain, requestInterceptorChain);
+ chain.push.apply(chain, responseInterceptorChain);
+ len = chain.length;
+
+ promise = Promise.resolve(config);
+
+ while (i < len) {
+ promise = promise.then(chain[i++], chain[i++]);
+ }
+
+ return promise;
+ }
+
+ len = requestInterceptorChain.length;
+
+ let newConfig = config;
+
+ i = 0;
+
+ while (i < len) {
+ const onFulfilled = requestInterceptorChain[i++];
+ const onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
+ }
+ }
+
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+
+ i = 0;
+ len = responseInterceptorChain.length;
+
+ while (i < len) {
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ }
+
+ return promise;
+ }
+
+ getUri(config) {
+ config = mergeConfig(this.defaults, config);
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ return buildURL(fullPath, config.params, config.paramsSerializer);
+ }
+}
+
+// Provide aliases for supported request methods
+utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+});
+
+utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ headers: isForm ? {
+ 'Content-Type': 'multipart/form-data'
+ } : {},
+ url,
+ data
+ }));
+ };
+ }
+
+ Axios.prototype[method] = generateHTTPMethod();
+
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
+});
+
+var Axios$1 = Axios;
+
+/**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @param {Function} executor The executor function.
+ *
+ * @returns {CancelToken}
+ */
+class CancelToken {
+ constructor(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ let resolvePromise;
+
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ const token = this;
+
+ // eslint-disable-next-line func-names
+ this.promise.then(cancel => {
+ if (!token._listeners) return;
+
+ let i = token._listeners.length;
+
+ while (i-- > 0) {
+ token._listeners[i](cancel);
+ }
+ token._listeners = null;
+ });
+
+ // eslint-disable-next-line func-names
+ this.promise.then = onfulfilled => {
+ let _resolve;
+ // eslint-disable-next-line func-names
+ const promise = new Promise(resolve => {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+
+ return promise;
+ };
+
+ executor(function cancel(message, config, request) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new CanceledError(message, config, request);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ */
+ throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ }
+
+ /**
+ * Subscribe to the cancel signal
+ */
+
+ subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
+ }
+
+ if (this._listeners) {
+ this._listeners.push(listener);
+ } else {
+ this._listeners = [listener];
+ }
+ }
+
+ /**
+ * Unsubscribe from the cancel signal
+ */
+
+ unsubscribe(listener) {
+ if (!this._listeners) {
+ return;
+ }
+ const index = this._listeners.indexOf(listener);
+ if (index !== -1) {
+ this._listeners.splice(index, 1);
+ }
+ }
+
+ toAbortSignal() {
+ const controller = new AbortController();
+
+ const abort = (err) => {
+ controller.abort(err);
+ };
+
+ this.subscribe(abort);
+
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+
+ return controller.signal;
+ }
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ static source() {
+ let cancel;
+ const token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token,
+ cancel
+ };
+ }
+}
+
+var CancelToken$1 = CancelToken;
+
+/**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ *
+ * @returns {Function}
+ */
+function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+}
+
+/**
+ * Determines whether the payload is an error thrown by Axios
+ *
+ * @param {*} payload The value to test
+ *
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
+ */
+function isAxiosError(payload) {
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
+}
+
+const HttpStatusCode = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511,
+};
+
+Object.entries(HttpStatusCode).forEach(([key, value]) => {
+ HttpStatusCode[value] = key;
+});
+
+var HttpStatusCode$1 = HttpStatusCode;
+
+/**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ *
+ * @returns {Axios} A new instance of Axios
+ */
+function createInstance(defaultConfig) {
+ const context = new Axios$1(defaultConfig);
+ const instance = bind(Axios$1.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
+
+ // Copy context to instance
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
+
+ // Factory for creating new instances
+ instance.create = function create(instanceConfig) {
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
+ };
+
+ return instance;
+}
+
+// Create the default instance to be exported
+const axios = createInstance(defaults$1);
+
+// Expose Axios class to allow class inheritance
+axios.Axios = Axios$1;
+
+// Expose Cancel & CancelToken
+axios.CanceledError = CanceledError;
+axios.CancelToken = CancelToken$1;
+axios.isCancel = isCancel;
+axios.VERSION = VERSION;
+axios.toFormData = toFormData;
+
+// Expose AxiosError class
+axios.AxiosError = AxiosError;
+
+// alias for CanceledError for backward compatibility
+axios.Cancel = axios.CanceledError;
+
+// Expose all/spread
+axios.all = function all(promises) {
+ return Promise.all(promises);
+};
+
+axios.spread = spread;
+
+// Expose isAxiosError
+axios.isAxiosError = isAxiosError;
+
+// Expose mergeConfig
+axios.mergeConfig = mergeConfig;
+
+axios.AxiosHeaders = AxiosHeaders$1;
+
+axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
+
+axios.getAdapter = adapters.getAdapter;
+
+axios.HttpStatusCode = HttpStatusCode$1;
+
+axios.default = axios;
+
+module.exports = axios;
+//# sourceMappingURL=axios.cjs.map
diff --git a/node_modules/axios/dist/esm/axios.js b/node_modules/axios/dist/esm/axios.js
new file mode 100644
index 0000000..1bc318d
--- /dev/null
+++ b/node_modules/axios/dist/esm/axios.js
@@ -0,0 +1,3745 @@
+// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
+function bind(fn, thisArg) {
+ return function wrap() {
+ return fn.apply(thisArg, arguments);
+ };
+}
+
+// utils is a library of generic helper functions non-specific to axios
+
+const {toString} = Object.prototype;
+const {getPrototypeOf} = Object;
+
+const kindOf = (cache => thing => {
+ const str = toString.call(thing);
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+})(Object.create(null));
+
+const kindOfTest = (type) => {
+ type = type.toLowerCase();
+ return (thing) => kindOf(thing) === type
+};
+
+const typeOfTest = type => thing => typeof thing === type;
+
+/**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ *
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+const {isArray} = Array;
+
+/**
+ * Determine if a value is undefined
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+const isUndefined = typeOfTest('undefined');
+
+/**
+ * Determine if a value is a Buffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Buffer, otherwise false
+ */
+function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+}
+
+/**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+const isArrayBuffer = kindOfTest('ArrayBuffer');
+
+
+/**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+function isArrayBufferView(val) {
+ let result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
+ }
+ return result;
+}
+
+/**
+ * Determine if a value is a String
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+const isString = typeOfTest('string');
+
+/**
+ * Determine if a value is a Function
+ *
+ * @param {*} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+const isFunction = typeOfTest('function');
+
+/**
+ * Determine if a value is a Number
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+const isNumber = typeOfTest('number');
+
+/**
+ * Determine if a value is an Object
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+const isObject = (thing) => thing !== null && typeof thing === 'object';
+
+/**
+ * Determine if a value is a Boolean
+ *
+ * @param {*} thing The value to test
+ * @returns {boolean} True if value is a Boolean, otherwise false
+ */
+const isBoolean = thing => thing === true || thing === false;
+
+/**
+ * Determine if a value is a plain Object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a plain Object, otherwise false
+ */
+const isPlainObject = (val) => {
+ if (kindOf(val) !== 'object') {
+ return false;
+ }
+
+ const prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
+};
+
+/**
+ * Determine if a value is a Date
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+const isDate = kindOfTest('Date');
+
+/**
+ * Determine if a value is a File
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFile = kindOfTest('File');
+
+/**
+ * Determine if a value is a Blob
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+const isBlob = kindOfTest('Blob');
+
+/**
+ * Determine if a value is a FileList
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFileList = kindOfTest('FileList');
+
+/**
+ * Determine if a value is a Stream
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+const isStream = (val) => isObject(val) && isFunction(val.pipe);
+
+/**
+ * Determine if a value is a FormData
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+const isFormData = (thing) => {
+ let kind;
+ return thing && (
+ (typeof FormData === 'function' && thing instanceof FormData) || (
+ isFunction(thing.append) && (
+ (kind = kindOf(thing)) === 'formdata' ||
+ // detect form-data instance
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
+ )
+ )
+ )
+};
+
+/**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+const isURLSearchParams = kindOfTest('URLSearchParams');
+
+const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
+
+/**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ *
+ * @returns {String} The String freed of excess whitespace
+ */
+const trim = (str) => str.trim ?
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+
+/**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ *
+ * @param {Boolean} [allOwnKeys = false]
+ * @returns {any}
+ */
+function forEach(obj, fn, {allOwnKeys = false} = {}) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ let i;
+ let l;
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+ const len = keys.length;
+ let key;
+
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+}
+
+function findKey(obj, key) {
+ key = key.toLowerCase();
+ const keys = Object.keys(obj);
+ let i = keys.length;
+ let _key;
+ while (i-- > 0) {
+ _key = keys[i];
+ if (key === _key.toLowerCase()) {
+ return _key;
+ }
+ }
+ return null;
+}
+
+const _global = (() => {
+ /*eslint no-undef:0*/
+ if (typeof globalThis !== "undefined") return globalThis;
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
+})();
+
+const isContextDefined = (context) => !isUndefined(context) && context !== _global;
+
+/**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ *
+ * @returns {Object} Result of all merge properties
+ */
+function merge(/* obj1, obj2, obj3, ... */) {
+ const {caseless} = isContextDefined(this) && this || {};
+ const result = {};
+ const assignValue = (val, key) => {
+ const targetKey = caseless && findKey(result, key) || key;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else {
+ result[targetKey] = val;
+ }
+ };
+
+ for (let i = 0, l = arguments.length; i < l; i++) {
+ arguments[i] && forEach(arguments[i], assignValue);
+ }
+ return result;
+}
+
+/**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ *
+ * @param {Boolean} [allOwnKeys]
+ * @returns {Object} The resulting value of object a
+ */
+const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
+ forEach(b, (val, key) => {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ }, {allOwnKeys});
+ return a;
+};
+
+/**
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ *
+ * @param {string} content with BOM
+ *
+ * @returns {string} content value without BOM
+ */
+const stripBOM = (content) => {
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+};
+
+/**
+ * Inherit the prototype methods from one constructor into another
+ * @param {function} constructor
+ * @param {function} superConstructor
+ * @param {object} [props]
+ * @param {object} [descriptors]
+ *
+ * @returns {void}
+ */
+const inherits = (constructor, superConstructor, props, descriptors) => {
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+ constructor.prototype.constructor = constructor;
+ Object.defineProperty(constructor, 'super', {
+ value: superConstructor.prototype
+ });
+ props && Object.assign(constructor.prototype, props);
+};
+
+/**
+ * Resolve object with deep prototype chain to a flat object
+ * @param {Object} sourceObj source object
+ * @param {Object} [destObj]
+ * @param {Function|Boolean} [filter]
+ * @param {Function} [propFilter]
+ *
+ * @returns {Object}
+ */
+const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
+ let props;
+ let i;
+ let prop;
+ const merged = {};
+
+ destObj = destObj || {};
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ if (sourceObj == null) return destObj;
+
+ do {
+ props = Object.getOwnPropertyNames(sourceObj);
+ i = props.length;
+ while (i-- > 0) {
+ prop = props[i];
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+ destObj[prop] = sourceObj[prop];
+ merged[prop] = true;
+ }
+ }
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+
+ return destObj;
+};
+
+/**
+ * Determines whether a string ends with the characters of a specified string
+ *
+ * @param {String} str
+ * @param {String} searchString
+ * @param {Number} [position= 0]
+ *
+ * @returns {boolean}
+ */
+const endsWith = (str, searchString, position) => {
+ str = String(str);
+ if (position === undefined || position > str.length) {
+ position = str.length;
+ }
+ position -= searchString.length;
+ const lastIndex = str.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+};
+
+
+/**
+ * Returns new array from array like object or null if failed
+ *
+ * @param {*} [thing]
+ *
+ * @returns {?Array}
+ */
+const toArray = (thing) => {
+ if (!thing) return null;
+ if (isArray(thing)) return thing;
+ let i = thing.length;
+ if (!isNumber(i)) return null;
+ const arr = new Array(i);
+ while (i-- > 0) {
+ arr[i] = thing[i];
+ }
+ return arr;
+};
+
+/**
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+ * thing passed in is an instance of Uint8Array
+ *
+ * @param {TypedArray}
+ *
+ * @returns {Array}
+ */
+// eslint-disable-next-line func-names
+const isTypedArray = (TypedArray => {
+ // eslint-disable-next-line func-names
+ return thing => {
+ return TypedArray && thing instanceof TypedArray;
+ };
+})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+/**
+ * For each entry in the object, call the function with the key and value.
+ *
+ * @param {Object} obj - The object to iterate over.
+ * @param {Function} fn - The function to call for each entry.
+ *
+ * @returns {void}
+ */
+const forEachEntry = (obj, fn) => {
+ const generator = obj && obj[Symbol.iterator];
+
+ const iterator = generator.call(obj);
+
+ let result;
+
+ while ((result = iterator.next()) && !result.done) {
+ const pair = result.value;
+ fn.call(obj, pair[0], pair[1]);
+ }
+};
+
+/**
+ * It takes a regular expression and a string, and returns an array of all the matches
+ *
+ * @param {string} regExp - The regular expression to match against.
+ * @param {string} str - The string to search.
+ *
+ * @returns {Array}
+ */
+const matchAll = (regExp, str) => {
+ let matches;
+ const arr = [];
+
+ while ((matches = regExp.exec(str)) !== null) {
+ arr.push(matches);
+ }
+
+ return arr;
+};
+
+/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+const isHTMLForm = kindOfTest('HTMLFormElement');
+
+const toCamelCase = str => {
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
+ function replacer(m, p1, p2) {
+ return p1.toUpperCase() + p2;
+ }
+ );
+};
+
+/* Creating a function that will check if an object has a property. */
+const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
+
+/**
+ * Determine if a value is a RegExp object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a RegExp object, otherwise false
+ */
+const isRegExp = kindOfTest('RegExp');
+
+const reduceDescriptors = (obj, reducer) => {
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
+ const reducedDescriptors = {};
+
+ forEach(descriptors, (descriptor, name) => {
+ let ret;
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
+ reducedDescriptors[name] = ret || descriptor;
+ }
+ });
+
+ Object.defineProperties(obj, reducedDescriptors);
+};
+
+/**
+ * Makes all methods read-only
+ * @param {Object} obj
+ */
+
+const freezeMethods = (obj) => {
+ reduceDescriptors(obj, (descriptor, name) => {
+ // skip restricted props in strict mode
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+ return false;
+ }
+
+ const value = obj[name];
+
+ if (!isFunction(value)) return;
+
+ descriptor.enumerable = false;
+
+ if ('writable' in descriptor) {
+ descriptor.writable = false;
+ return;
+ }
+
+ if (!descriptor.set) {
+ descriptor.set = () => {
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
+ };
+ }
+ });
+};
+
+const toObjectSet = (arrayOrString, delimiter) => {
+ const obj = {};
+
+ const define = (arr) => {
+ arr.forEach(value => {
+ obj[value] = true;
+ });
+ };
+
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+
+ return obj;
+};
+
+const noop = () => {};
+
+const toFiniteNumber = (value, defaultValue) => {
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+};
+
+const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
+
+const DIGIT = '0123456789';
+
+const ALPHABET = {
+ DIGIT,
+ ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+};
+
+const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
+ let str = '';
+ const {length} = alphabet;
+ while (size--) {
+ str += alphabet[Math.random() * length|0];
+ }
+
+ return str;
+};
+
+/**
+ * If the thing is a FormData object, return true, otherwise return false.
+ *
+ * @param {unknown} thing - The thing to check.
+ *
+ * @returns {boolean}
+ */
+function isSpecCompliantForm(thing) {
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
+}
+
+const toJSONObject = (obj) => {
+ const stack = new Array(10);
+
+ const visit = (source, i) => {
+
+ if (isObject(source)) {
+ if (stack.indexOf(source) >= 0) {
+ return;
+ }
+
+ if(!('toJSON' in source)) {
+ stack[i] = source;
+ const target = isArray(source) ? [] : {};
+
+ forEach(source, (value, key) => {
+ const reducedValue = visit(value, i + 1);
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
+ });
+
+ stack[i] = undefined;
+
+ return target;
+ }
+ }
+
+ return source;
+ };
+
+ return visit(obj, 0);
+};
+
+const isAsyncFn = kindOfTest('AsyncFunction');
+
+const isThenable = (thing) =>
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
+
+// original code
+// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+
+ return postMessageSupported ? ((token, callbacks) => {
+ _global.addEventListener("message", ({source, data}) => {
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+
+ return (cb) => {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ }
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
+})(
+ typeof setImmediate === 'function',
+ isFunction(_global.postMessage)
+);
+
+const asap = typeof queueMicrotask !== 'undefined' ?
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
+
+// *********************
+
+const utils$1 = {
+ isArray,
+ isArrayBuffer,
+ isBuffer,
+ isFormData,
+ isArrayBufferView,
+ isString,
+ isNumber,
+ isBoolean,
+ isObject,
+ isPlainObject,
+ isReadableStream,
+ isRequest,
+ isResponse,
+ isHeaders,
+ isUndefined,
+ isDate,
+ isFile,
+ isBlob,
+ isRegExp,
+ isFunction,
+ isStream,
+ isURLSearchParams,
+ isTypedArray,
+ isFileList,
+ forEach,
+ merge,
+ extend,
+ trim,
+ stripBOM,
+ inherits,
+ toFlatObject,
+ kindOf,
+ kindOfTest,
+ endsWith,
+ toArray,
+ forEachEntry,
+ matchAll,
+ isHTMLForm,
+ hasOwnProperty,
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
+ reduceDescriptors,
+ freezeMethods,
+ toObjectSet,
+ toCamelCase,
+ noop,
+ toFiniteNumber,
+ findKey,
+ global: _global,
+ isContextDefined,
+ ALPHABET,
+ generateString,
+ isSpecCompliantForm,
+ toJSONObject,
+ isAsyncFn,
+ isThenable,
+ setImmediate: _setImmediate,
+ asap
+};
+
+/**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [config] The config.
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ *
+ * @returns {Error} The created error.
+ */
+function AxiosError$1(message, code, config, request, response) {
+ Error.call(this);
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = (new Error()).stack;
+ }
+
+ this.message = message;
+ this.name = 'AxiosError';
+ code && (this.code = code);
+ config && (this.config = config);
+ request && (this.request = request);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
+}
+
+utils$1.inherits(AxiosError$1, Error, {
+ toJSON: function toJSON() {
+ return {
+ // Standard
+ message: this.message,
+ name: this.name,
+ // Microsoft
+ description: this.description,
+ number: this.number,
+ // Mozilla
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ // Axios
+ config: utils$1.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+ }
+});
+
+const prototype$1 = AxiosError$1.prototype;
+const descriptors = {};
+
+[
+ 'ERR_BAD_OPTION_VALUE',
+ 'ERR_BAD_OPTION',
+ 'ECONNABORTED',
+ 'ETIMEDOUT',
+ 'ERR_NETWORK',
+ 'ERR_FR_TOO_MANY_REDIRECTS',
+ 'ERR_DEPRECATED',
+ 'ERR_BAD_RESPONSE',
+ 'ERR_BAD_REQUEST',
+ 'ERR_CANCELED',
+ 'ERR_NOT_SUPPORT',
+ 'ERR_INVALID_URL'
+// eslint-disable-next-line func-names
+].forEach(code => {
+ descriptors[code] = {value: code};
+});
+
+Object.defineProperties(AxiosError$1, descriptors);
+Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
+
+// eslint-disable-next-line func-names
+AxiosError$1.from = (error, code, config, request, response, customProps) => {
+ const axiosError = Object.create(prototype$1);
+
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
+ return obj !== Error.prototype;
+ }, prop => {
+ return prop !== 'isAxiosError';
+ });
+
+ AxiosError$1.call(axiosError, error.message, code, config, request, response);
+
+ axiosError.cause = error;
+
+ axiosError.name = error.name;
+
+ customProps && Object.assign(axiosError, customProps);
+
+ return axiosError;
+};
+
+// eslint-disable-next-line strict
+const httpAdapter = null;
+
+/**
+ * Determines if the given thing is a array or js object.
+ *
+ * @param {string} thing - The object or array to be visited.
+ *
+ * @returns {boolean}
+ */
+function isVisitable(thing) {
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
+}
+
+/**
+ * It removes the brackets from the end of a string
+ *
+ * @param {string} key - The key of the parameter.
+ *
+ * @returns {string} the key without the brackets.
+ */
+function removeBrackets(key) {
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
+}
+
+/**
+ * It takes a path, a key, and a boolean, and returns a string
+ *
+ * @param {string} path - The path to the current key.
+ * @param {string} key - The key of the current object being iterated over.
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+ *
+ * @returns {string} The path to the current key.
+ */
+function renderKey(path, key, dots) {
+ if (!path) return key;
+ return path.concat(key).map(function each(token, i) {
+ // eslint-disable-next-line no-param-reassign
+ token = removeBrackets(token);
+ return !dots && i ? '[' + token + ']' : token;
+ }).join(dots ? '.' : '');
+}
+
+/**
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
+ *
+ * @param {Array} arr - The array to check
+ *
+ * @returns {boolean}
+ */
+function isFlatArray(arr) {
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
+}
+
+const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
+ return /^is[A-Z]/.test(prop);
+});
+
+/**
+ * Convert a data object to FormData
+ *
+ * @param {Object} obj
+ * @param {?Object} [formData]
+ * @param {?Object} [options]
+ * @param {Function} [options.visitor]
+ * @param {Boolean} [options.metaTokens = true]
+ * @param {Boolean} [options.dots = false]
+ * @param {?Boolean} [options.indexes = false]
+ *
+ * @returns {Object}
+ **/
+
+/**
+ * It converts an object into a FormData object
+ *
+ * @param {Object} obj - The object to convert to form data.
+ * @param {string} formData - The FormData object to append to.
+ * @param {Object} options
+ *
+ * @returns
+ */
+function toFormData$1(obj, formData, options) {
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('target must be an object');
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ formData = formData || new (FormData)();
+
+ // eslint-disable-next-line no-param-reassign
+ options = utils$1.toFlatObject(options, {
+ metaTokens: true,
+ dots: false,
+ indexes: false
+ }, false, function defined(option, source) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ return !utils$1.isUndefined(source[option]);
+ });
+
+ const metaTokens = options.metaTokens;
+ // eslint-disable-next-line no-use-before-define
+ const visitor = options.visitor || defaultVisitor;
+ const dots = options.dots;
+ const indexes = options.indexes;
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
+
+ if (!utils$1.isFunction(visitor)) {
+ throw new TypeError('visitor must be a function');
+ }
+
+ function convertValue(value) {
+ if (value === null) return '';
+
+ if (utils$1.isDate(value)) {
+ return value.toISOString();
+ }
+
+ if (!useBlob && utils$1.isBlob(value)) {
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
+ }
+
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Default visitor.
+ *
+ * @param {*} value
+ * @param {String|Number} key
+ * @param {Array} path
+ * @this {FormData}
+ *
+ * @returns {boolean} return true to visit the each prop of the value recursively
+ */
+ function defaultVisitor(value, key, path) {
+ let arr = value;
+
+ if (value && !path && typeof value === 'object') {
+ if (utils$1.endsWith(key, '{}')) {
+ // eslint-disable-next-line no-param-reassign
+ key = metaTokens ? key : key.slice(0, -2);
+ // eslint-disable-next-line no-param-reassign
+ value = JSON.stringify(value);
+ } else if (
+ (utils$1.isArray(value) && isFlatArray(value)) ||
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
+ )) {
+ // eslint-disable-next-line no-param-reassign
+ key = removeBrackets(key);
+
+ arr.forEach(function each(el, index) {
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
+ // eslint-disable-next-line no-nested-ternary
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
+ convertValue(el)
+ );
+ });
+ return false;
+ }
+ }
+
+ if (isVisitable(value)) {
+ return true;
+ }
+
+ formData.append(renderKey(path, key, dots), convertValue(value));
+
+ return false;
+ }
+
+ const stack = [];
+
+ const exposedHelpers = Object.assign(predicates, {
+ defaultVisitor,
+ convertValue,
+ isVisitable
+ });
+
+ function build(value, path) {
+ if (utils$1.isUndefined(value)) return;
+
+ if (stack.indexOf(value) !== -1) {
+ throw Error('Circular reference detected in ' + path.join('.'));
+ }
+
+ stack.push(value);
+
+ utils$1.forEach(value, function each(el, key) {
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
+ );
+
+ if (result === true) {
+ build(el, path ? path.concat(key) : [key]);
+ }
+ });
+
+ stack.pop();
+ }
+
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('data must be an object');
+ }
+
+ build(obj);
+
+ return formData;
+}
+
+/**
+ * It encodes a string by replacing all characters that are not in the unreserved set with
+ * their percent-encoded equivalents
+ *
+ * @param {string} str - The string to encode.
+ *
+ * @returns {string} The encoded string.
+ */
+function encode$1(str) {
+ const charMap = {
+ '!': '%21',
+ "'": '%27',
+ '(': '%28',
+ ')': '%29',
+ '~': '%7E',
+ '%20': '+',
+ '%00': '\x00'
+ };
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+ return charMap[match];
+ });
+}
+
+/**
+ * It takes a params object and converts it to a FormData object
+ *
+ * @param {Object} params - The parameters to be converted to a FormData object.
+ * @param {Object} options - The options object passed to the Axios constructor.
+ *
+ * @returns {void}
+ */
+function AxiosURLSearchParams(params, options) {
+ this._pairs = [];
+
+ params && toFormData$1(params, this, options);
+}
+
+const prototype = AxiosURLSearchParams.prototype;
+
+prototype.append = function append(name, value) {
+ this._pairs.push([name, value]);
+};
+
+prototype.toString = function toString(encoder) {
+ const _encode = encoder ? function(value) {
+ return encoder.call(this, value, encode$1);
+ } : encode$1;
+
+ return this._pairs.map(function each(pair) {
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
+ }, '').join('&');
+};
+
+/**
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+ * URI encoded counterparts
+ *
+ * @param {string} val The value to be encoded.
+ *
+ * @returns {string} The encoded value.
+ */
+function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+}
+
+/**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @param {?(object|Function)} options
+ *
+ * @returns {string} The formatted url
+ */
+function buildURL(url, params, options) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ const _encode = options && options.encode || encode;
+
+ if (utils$1.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
+
+ const serializeFn = options && options.serialize;
+
+ let serializedParams;
+
+ if (serializeFn) {
+ serializedParams = serializeFn(params, options);
+ } else {
+ serializedParams = utils$1.isURLSearchParams(params) ?
+ params.toString() :
+ new AxiosURLSearchParams(params, options).toString(_encode);
+ }
+
+ if (serializedParams) {
+ const hashmarkIndex = url.indexOf("#");
+
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+}
+
+class InterceptorManager {
+ constructor() {
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled,
+ rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ }
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ *
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
+ */
+ eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ }
+
+ /**
+ * Clear all interceptors from the stack
+ *
+ * @returns {void}
+ */
+ clear() {
+ if (this.handlers) {
+ this.handlers = [];
+ }
+ }
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ *
+ * @returns {void}
+ */
+ forEach(fn) {
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ }
+}
+
+const InterceptorManager$1 = InterceptorManager;
+
+const transitionalDefaults = {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+};
+
+const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
+
+const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
+
+const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
+
+const platform$1 = {
+ isBrowser: true,
+ classes: {
+ URLSearchParams: URLSearchParams$1,
+ FormData: FormData$1,
+ Blob: Blob$1
+ },
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
+};
+
+const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+
+const _navigator = typeof navigator === 'object' && navigator || undefined;
+
+/**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ * nativescript
+ * navigator.product -> 'NativeScript' or 'NS'
+ *
+ * @returns {boolean}
+ */
+const hasStandardBrowserEnv = hasBrowserEnv &&
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+/**
+ * Determine if we're running in a standard browser webWorker environment
+ *
+ * Although the `isStandardBrowserEnv` method indicates that
+ * `allows axios to run in a web worker`, the WebWorker will still be
+ * filtered out due to its judgment standard
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+ * This leads to a problem when axios post `FormData` in webWorker
+ */
+const hasStandardBrowserWebWorkerEnv = (() => {
+ return (
+ typeof WorkerGlobalScope !== 'undefined' &&
+ // eslint-disable-next-line no-undef
+ self instanceof WorkerGlobalScope &&
+ typeof self.importScripts === 'function'
+ );
+})();
+
+const origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+const utils = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ hasBrowserEnv: hasBrowserEnv,
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
+ navigator: _navigator,
+ origin: origin
+});
+
+const platform = {
+ ...utils,
+ ...platform$1
+};
+
+function toURLEncodedForm(data, options) {
+ return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
+ visitor: function(value, key, path, helpers) {
+ if (platform.isNode && utils$1.isBuffer(value)) {
+ this.append(key, value.toString('base64'));
+ return false;
+ }
+
+ return helpers.defaultVisitor.apply(this, arguments);
+ }
+ }, options));
+}
+
+/**
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+ *
+ * @param {string} name - The name of the property to get.
+ *
+ * @returns An array of strings.
+ */
+function parsePropPath(name) {
+ // foo[x][y][z]
+ // foo.x.y.z
+ // foo-x-y-z
+ // foo x y z
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
+ return match[0] === '[]' ? '' : match[1] || match[0];
+ });
+}
+
+/**
+ * Convert an array to an object.
+ *
+ * @param {Array} arr - The array to convert to an object.
+ *
+ * @returns An object with the same keys and values as the array.
+ */
+function arrayToObject(arr) {
+ const obj = {};
+ const keys = Object.keys(arr);
+ let i;
+ const len = keys.length;
+ let key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ obj[key] = arr[key];
+ }
+ return obj;
+}
+
+/**
+ * It takes a FormData object and returns a JavaScript object
+ *
+ * @param {string} formData The FormData object to convert to JSON.
+ *
+ * @returns {Object | null} The converted object.
+ */
+function formDataToJSON(formData) {
+ function buildPath(path, value, target, index) {
+ let name = path[index++];
+
+ if (name === '__proto__') return true;
+
+ const isNumericKey = Number.isFinite(+name);
+ const isLast = index >= path.length;
+ name = !name && utils$1.isArray(target) ? target.length : name;
+
+ if (isLast) {
+ if (utils$1.hasOwnProp(target, name)) {
+ target[name] = [target[name], value];
+ } else {
+ target[name] = value;
+ }
+
+ return !isNumericKey;
+ }
+
+ if (!target[name] || !utils$1.isObject(target[name])) {
+ target[name] = [];
+ }
+
+ const result = buildPath(path, value, target[name], index);
+
+ if (result && utils$1.isArray(target[name])) {
+ target[name] = arrayToObject(target[name]);
+ }
+
+ return !isNumericKey;
+ }
+
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
+ const obj = {};
+
+ utils$1.forEachEntry(formData, (name, value) => {
+ buildPath(parsePropPath(name), value, obj, 0);
+ });
+
+ return obj;
+ }
+
+ return null;
+}
+
+/**
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+ * of the input
+ *
+ * @param {any} rawValue - The value to be stringified.
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
+ * @param {Function} encoder - A function that takes a value and returns a string.
+ *
+ * @returns {string} A stringified version of the rawValue.
+ */
+function stringifySafely(rawValue, parser, encoder) {
+ if (utils$1.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils$1.trim(rawValue);
+ } catch (e) {
+ if (e.name !== 'SyntaxError') {
+ throw e;
+ }
+ }
+ }
+
+ return (encoder || JSON.stringify)(rawValue);
+}
+
+const defaults = {
+
+ transitional: transitionalDefaults,
+
+ adapter: ['xhr', 'http', 'fetch'],
+
+ transformRequest: [function transformRequest(data, headers) {
+ const contentType = headers.getContentType() || '';
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
+ const isObjectPayload = utils$1.isObject(data);
+
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
+ data = new FormData(data);
+ }
+
+ const isFormData = utils$1.isFormData(data);
+
+ if (isFormData) {
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ }
+
+ if (utils$1.isArrayBuffer(data) ||
+ utils$1.isBuffer(data) ||
+ utils$1.isStream(data) ||
+ utils$1.isFile(data) ||
+ utils$1.isBlob(data) ||
+ utils$1.isReadableStream(data)
+ ) {
+ return data;
+ }
+ if (utils$1.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils$1.isURLSearchParams(data)) {
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+ return data.toString();
+ }
+
+ let isFileList;
+
+ if (isObjectPayload) {
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+ return toURLEncodedForm(data, this.formSerializer).toString();
+ }
+
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+ const _FormData = this.env && this.env.FormData;
+
+ return toFormData$1(
+ isFileList ? {'files[]': data} : data,
+ _FormData && new _FormData(),
+ this.formSerializer
+ );
+ }
+ }
+
+ if (isObjectPayload || hasJSONContentType ) {
+ headers.setContentType('application/json', false);
+ return stringifySafely(data);
+ }
+
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ const transitional = this.transitional || defaults.transitional;
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ const JSONRequested = this.responseType === 'json';
+
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
+ return data;
+ }
+
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
+
+ try {
+ return JSON.parse(data);
+ } catch (e) {
+ if (strictJSONParsing) {
+ if (e.name === 'SyntaxError') {
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
+ }
+ throw e;
+ }
+ }
+ }
+
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+ maxBodyLength: -1,
+
+ env: {
+ FormData: platform.classes.FormData,
+ Blob: platform.classes.Blob
+ },
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ },
+
+ headers: {
+ common: {
+ 'Accept': 'application/json, text/plain, */*',
+ 'Content-Type': undefined
+ }
+ }
+};
+
+utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
+ defaults.headers[method] = {};
+});
+
+const defaults$1 = defaults;
+
+// RawAxiosHeaders whose duplicates are ignored by node
+// c.f. https://nodejs.org/api/http.html#http_message_headers
+const ignoreDuplicateOf = utils$1.toObjectSet([
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+]);
+
+/**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} rawHeaders Headers needing to be parsed
+ *
+ * @returns {Object} Headers parsed into an object
+ */
+const parseHeaders = rawHeaders => {
+ const parsed = {};
+ let key;
+ let val;
+ let i;
+
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+ i = line.indexOf(':');
+ key = line.substring(0, i).trim().toLowerCase();
+ val = line.substring(i + 1).trim();
+
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
+ return;
+ }
+
+ if (key === 'set-cookie') {
+ if (parsed[key]) {
+ parsed[key].push(val);
+ } else {
+ parsed[key] = [val];
+ }
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ });
+
+ return parsed;
+};
+
+const $internals = Symbol('internals');
+
+function normalizeHeader(header) {
+ return header && String(header).trim().toLowerCase();
+}
+
+function normalizeValue(value) {
+ if (value === false || value == null) {
+ return value;
+ }
+
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
+}
+
+function parseTokens(str) {
+ const tokens = Object.create(null);
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+ let match;
+
+ while ((match = tokensRE.exec(str))) {
+ tokens[match[1]] = match[2];
+ }
+
+ return tokens;
+}
+
+const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+
+function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+ if (utils$1.isFunction(filter)) {
+ return filter.call(this, value, header);
+ }
+
+ if (isHeaderNameFilter) {
+ value = header;
+ }
+
+ if (!utils$1.isString(value)) return;
+
+ if (utils$1.isString(filter)) {
+ return value.indexOf(filter) !== -1;
+ }
+
+ if (utils$1.isRegExp(filter)) {
+ return filter.test(value);
+ }
+}
+
+function formatHeader(header) {
+ return header.trim()
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
+ return char.toUpperCase() + str;
+ });
+}
+
+function buildAccessors(obj, header) {
+ const accessorName = utils$1.toCamelCase(' ' + header);
+
+ ['get', 'set', 'has'].forEach(methodName => {
+ Object.defineProperty(obj, methodName + accessorName, {
+ value: function(arg1, arg2, arg3) {
+ return this[methodName].call(this, header, arg1, arg2, arg3);
+ },
+ configurable: true
+ });
+ });
+}
+
+class AxiosHeaders$1 {
+ constructor(headers) {
+ headers && this.set(headers);
+ }
+
+ set(header, valueOrRewrite, rewrite) {
+ const self = this;
+
+ function setHeader(_value, _header, _rewrite) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!lHeader) {
+ throw new Error('header name must be a non-empty string');
+ }
+
+ const key = utils$1.findKey(self, lHeader);
+
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
+ self[key || _header] = normalizeValue(_value);
+ }
+ }
+
+ const setHeaders = (headers, _rewrite) =>
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
+
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
+ setHeaders(header, valueOrRewrite);
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+ setHeaders(parseHeaders(header), valueOrRewrite);
+ } else if (utils$1.isHeaders(header)) {
+ for (const [key, value] of header.entries()) {
+ setHeader(value, key, rewrite);
+ }
+ } else {
+ header != null && setHeader(valueOrRewrite, header, rewrite);
+ }
+
+ return this;
+ }
+
+ get(header, parser) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ if (key) {
+ const value = this[key];
+
+ if (!parser) {
+ return value;
+ }
+
+ if (parser === true) {
+ return parseTokens(value);
+ }
+
+ if (utils$1.isFunction(parser)) {
+ return parser.call(this, value, key);
+ }
+
+ if (utils$1.isRegExp(parser)) {
+ return parser.exec(value);
+ }
+
+ throw new TypeError('parser must be boolean|regexp|function');
+ }
+ }
+ }
+
+ has(header, matcher) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ }
+
+ return false;
+ }
+
+ delete(header, matcher) {
+ const self = this;
+ let deleted = false;
+
+ function deleteHeader(_header) {
+ _header = normalizeHeader(_header);
+
+ if (_header) {
+ const key = utils$1.findKey(self, _header);
+
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+ delete self[key];
+
+ deleted = true;
+ }
+ }
+ }
+
+ if (utils$1.isArray(header)) {
+ header.forEach(deleteHeader);
+ } else {
+ deleteHeader(header);
+ }
+
+ return deleted;
+ }
+
+ clear(matcher) {
+ const keys = Object.keys(this);
+ let i = keys.length;
+ let deleted = false;
+
+ while (i--) {
+ const key = keys[i];
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+ delete this[key];
+ deleted = true;
+ }
+ }
+
+ return deleted;
+ }
+
+ normalize(format) {
+ const self = this;
+ const headers = {};
+
+ utils$1.forEach(this, (value, header) => {
+ const key = utils$1.findKey(headers, header);
+
+ if (key) {
+ self[key] = normalizeValue(value);
+ delete self[header];
+ return;
+ }
+
+ const normalized = format ? formatHeader(header) : String(header).trim();
+
+ if (normalized !== header) {
+ delete self[header];
+ }
+
+ self[normalized] = normalizeValue(value);
+
+ headers[normalized] = true;
+ });
+
+ return this;
+ }
+
+ concat(...targets) {
+ return this.constructor.concat(this, ...targets);
+ }
+
+ toJSON(asStrings) {
+ const obj = Object.create(null);
+
+ utils$1.forEach(this, (value, header) => {
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
+ });
+
+ return obj;
+ }
+
+ [Symbol.iterator]() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+
+ toString() {
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'AxiosHeaders';
+ }
+
+ static from(thing) {
+ return thing instanceof this ? thing : new this(thing);
+ }
+
+ static concat(first, ...targets) {
+ const computed = new this(first);
+
+ targets.forEach((target) => computed.set(target));
+
+ return computed;
+ }
+
+ static accessor(header) {
+ const internals = this[$internals] = (this[$internals] = {
+ accessors: {}
+ });
+
+ const accessors = internals.accessors;
+ const prototype = this.prototype;
+
+ function defineAccessor(_header) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!accessors[lHeader]) {
+ buildAccessors(prototype, _header);
+ accessors[lHeader] = true;
+ }
+ }
+
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+
+ return this;
+ }
+}
+
+AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+// reserved names hotfix
+utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({value}, key) => {
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+ return {
+ get: () => value,
+ set(headerValue) {
+ this[mapped] = headerValue;
+ }
+ }
+});
+
+utils$1.freezeMethods(AxiosHeaders$1);
+
+const AxiosHeaders$2 = AxiosHeaders$1;
+
+/**
+ * Transform the data for a request or a response
+ *
+ * @param {Array|Function} fns A single function or Array of functions
+ * @param {?Object} response The response object
+ *
+ * @returns {*} The resulting transformed data
+ */
+function transformData(fns, response) {
+ const config = this || defaults$1;
+ const context = response || config;
+ const headers = AxiosHeaders$2.from(context.headers);
+ let data = context.data;
+
+ utils$1.forEach(fns, function transform(fn) {
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ });
+
+ headers.normalize();
+
+ return data;
+}
+
+function isCancel$1(value) {
+ return !!(value && value.__CANCEL__);
+}
+
+/**
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
+ *
+ * @param {string=} message The message.
+ * @param {Object=} config The config.
+ * @param {Object=} request The request.
+ *
+ * @returns {CanceledError} The created error.
+ */
+function CanceledError$1(message, config, request) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
+ this.name = 'CanceledError';
+}
+
+utils$1.inherits(CanceledError$1, AxiosError$1, {
+ __CANCEL__: true
+});
+
+/**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ *
+ * @returns {object} The response.
+ */
+function settle(resolve, reject, response) {
+ const validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(new AxiosError$1(
+ 'Request failed with status code ' + response.status,
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
+ response.config,
+ response.request,
+ response
+ ));
+ }
+}
+
+function parseProtocol(url) {
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+}
+
+/**
+ * Calculate data maxRate
+ * @param {Number} [samplesCount= 10]
+ * @param {Number} [min= 1000]
+ * @returns {Function}
+ */
+function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+
+ min = min !== undefined ? min : 1000;
+
+ return function push(chunkLength) {
+ const now = Date.now();
+
+ const startedAt = timestamps[tail];
+
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+
+ let i = tail;
+ let bytesCount = 0;
+
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+
+ head = (head + 1) % samplesCount;
+
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+
+ if (now - firstSampleTS < min) {
+ return;
+ }
+
+ const passed = startedAt && now - startedAt;
+
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+}
+
+/**
+ * Throttle decorator
+ * @param {Function} fn
+ * @param {Number} freq
+ * @return {Function}
+ */
+function throttle(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1000 / freq;
+ let lastArgs;
+ let timer;
+
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn.apply(null, args);
+ };
+
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if ( passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ }
+ };
+
+ const flush = () => lastArgs && invoke(lastArgs);
+
+ return [throttled, flush];
+}
+
+const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer(50, 250);
+
+ return throttle(e => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : undefined;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+
+ bytesNotified = loaded;
+
+ const data = {
+ loaded,
+ total,
+ progress: total ? (loaded / total) : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? 'download' : 'upload']: true
+ };
+
+ listener(data);
+ }, freq);
+};
+
+const progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+};
+
+const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
+
+const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
+ url = new URL(url, platform.origin);
+
+ return (
+ origin.protocol === url.protocol &&
+ origin.host === url.host &&
+ (isMSIE || origin.port === url.port)
+ );
+})(
+ new URL(platform.origin),
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
+) : () => true;
+
+const cookies = platform.hasStandardBrowserEnv ?
+
+ // Standard browser envs support document.cookie
+ {
+ write(name, value, expires, path, domain, secure) {
+ const cookie = [name + '=' + encodeURIComponent(value)];
+
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
+
+ utils$1.isString(path) && cookie.push('path=' + path);
+
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
+
+ secure === true && cookie.push('secure');
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read(name) {
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ }
+
+ :
+
+ // Non-standard browser env (web workers, react-native) lack needed support.
+ {
+ write() {},
+ read() {
+ return null;
+ },
+ remove() {}
+ };
+
+/**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ *
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+}
+
+/**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ *
+ * @returns {string} The combined URL
+ */
+function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+}
+
+/**
+ * Creates a new URL by combining the baseURL with the requestedURL,
+ * only when the requestedURL is not already an absolute URL.
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} requestedURL Absolute or relative URL to combine
+ *
+ * @returns {string} The combined full path
+ */
+function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+}
+
+const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
+
+/**
+ * Config-specific merge-function which creates a new config-object
+ * by merging two configuration objects together.
+ *
+ * @param {Object} config1
+ * @param {Object} config2
+ *
+ * @returns {Object} New object resulting from merging config2 to config1
+ */
+function mergeConfig$1(config1, config2) {
+ // eslint-disable-next-line no-param-reassign
+ config2 = config2 || {};
+ const config = {};
+
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
+ return utils$1.merge.call({caseless}, target, source);
+ } else if (utils$1.isPlainObject(source)) {
+ return utils$1.merge({}, source);
+ } else if (utils$1.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDeepProperties(a, b, prop , caseless) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(a, b, prop , caseless);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a, prop , caseless);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function valueFromConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function defaultToConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) {
+ return getMergedValue(a, b);
+ } else if (prop in config1) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ const mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
+ };
+
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ const merge = mergeMap[prop] || mergeDeepProperties;
+ const configValue = merge(config1[prop], config2[prop], prop);
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
+ });
+
+ return config;
+}
+
+const resolveConfig = (config) => {
+ const newConfig = mergeConfig$1({}, config);
+
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
+
+ newConfig.headers = headers = AxiosHeaders$2.from(headers);
+
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+
+ // HTTP basic authentication
+ if (auth) {
+ headers.set('Authorization', 'Basic ' +
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
+ );
+ }
+
+ let contentType;
+
+ if (utils$1.isFormData(data)) {
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+ headers.setContentType(undefined); // Let the browser set it
+ } else if ((contentType = headers.getContentType()) !== false) {
+ // fix semicolon duplication issue for ReactNative FormData implementation
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
+ }
+ }
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+
+ if (platform.hasStandardBrowserEnv) {
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
+ // Add xsrf header
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+
+ if (xsrfValue) {
+ headers.set(xsrfHeaderName, xsrfValue);
+ }
+ }
+ }
+
+ return newConfig;
+};
+
+const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+
+const xhrAdapter = isXHRAdapterSupported && function (config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ const _config = resolveConfig(config);
+ let requestData = _config.data;
+ const requestHeaders = AxiosHeaders$2.from(_config.headers).normalize();
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
+ let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
+
+ function done() {
+ flushUpload && flushUpload(); // flush events
+ flushDownload && flushDownload(); // flush events
+
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+ }
+
+ let request = new XMLHttpRequest();
+
+ request.open(_config.method.toUpperCase(), _config.url, true);
+
+ // Set the request timeout in MS
+ request.timeout = _config.timeout;
+
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ // Prepare the response
+ const responseHeaders = AxiosHeaders$2.from(
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
+ );
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
+ request.responseText : request.response;
+ const response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ };
+
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, response);
+
+ // Clean up request
+ request = null;
+ }
+
+ if ('onloadend' in request) {
+ // Use onloadend if available
+ request.onloadend = onloadend;
+ } else {
+ // Listen for ready state to emulate onloadend
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+ // readystate handler is calling before onerror or ontimeout handlers,
+ // so we should call onloadend on the next 'tick'
+ setTimeout(onloadend);
+ };
+ }
+
+ // Handle browser request cancellation (as opposed to a manual cancellation)
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = _config.transitional || transitionalDefaults;
+ if (_config.timeoutErrorMessage) {
+ timeoutErrorMessage = _config.timeoutErrorMessage;
+ }
+ reject(new AxiosError$1(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
+ config,
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Remove Content-Type if data is undefined
+ requestData === undefined && requestHeaders.setContentType(null);
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (!utils$1.isUndefined(_config.withCredentials)) {
+ request.withCredentials = !!_config.withCredentials;
+ }
+
+ // Add responseType to request if needed
+ if (responseType && responseType !== 'json') {
+ request.responseType = _config.responseType;
+ }
+
+ // Handle progress if needed
+ if (onDownloadProgress) {
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
+ request.addEventListener('progress', downloadThrottled);
+ }
+
+ // Not all browsers support upload events
+ if (onUploadProgress && request.upload) {
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
+
+ request.upload.addEventListener('progress', uploadThrottled);
+
+ request.upload.addEventListener('loadend', flushUpload);
+ }
+
+ if (_config.cancelToken || _config.signal) {
+ // Handle cancellation
+ // eslint-disable-next-line func-names
+ onCanceled = cancel => {
+ if (!request) {
+ return;
+ }
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) {
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
+ }
+ }
+
+ const protocol = parseProtocol(_config.url);
+
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
+ return;
+ }
+
+
+ // Send the request
+ request.send(requestData || null);
+ });
+};
+
+const composeSignals = (signals, timeout) => {
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
+
+ if (timeout || length) {
+ let controller = new AbortController();
+
+ let aborted;
+
+ const onabort = function (reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
+ }
+ };
+
+ let timer = timeout && setTimeout(() => {
+ timer = null;
+ onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
+ }, timeout);
+
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach(signal => {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+ });
+ signals = null;
+ }
+ };
+
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
+
+ const {signal} = controller;
+
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
+
+ return signal;
+ }
+};
+
+const composeSignals$1 = composeSignals;
+
+const streamChunk = function* (chunk, chunkSize) {
+ let len = chunk.byteLength;
+
+ if (!chunkSize || len < chunkSize) {
+ yield chunk;
+ return;
+ }
+
+ let pos = 0;
+ let end;
+
+ while (pos < len) {
+ end = pos + chunkSize;
+ yield chunk.slice(pos, end);
+ pos = end;
+ }
+};
+
+const readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) {
+ yield* streamChunk(chunk, chunkSize);
+ }
+};
+
+const readStream = async function* (stream) {
+ if (stream[Symbol.asyncIterator]) {
+ yield* stream;
+ return;
+ }
+
+ const reader = stream.getReader();
+ try {
+ for (;;) {
+ const {done, value} = await reader.read();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ } finally {
+ await reader.cancel();
+ }
+};
+
+const trackStream = (stream, chunkSize, onProgress, onFinish) => {
+ const iterator = readBytes(stream, chunkSize);
+
+ let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ };
+
+ return new ReadableStream({
+ async pull(controller) {
+ try {
+ const {done, value} = await iterator.next();
+
+ if (done) {
+ _onFinish();
+ controller.close();
+ return;
+ }
+
+ let len = value.byteLength;
+ if (onProgress) {
+ let loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
+ }
+ },
+ cancel(reason) {
+ _onFinish(reason);
+ return iterator.return();
+ }
+ }, {
+ highWaterMark: 2
+ })
+};
+
+const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
+const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
+
+// used only inside the fetch adapter
+const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
+);
+
+const test = (fn, ...args) => {
+ try {
+ return !!fn(...args);
+ } catch (e) {
+ return false
+ }
+};
+
+const supportsRequestStream = isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+
+ const hasContentType = new Request(platform.origin, {
+ body: new ReadableStream(),
+ method: 'POST',
+ get duplex() {
+ duplexAccessed = true;
+ return 'half';
+ },
+ }).headers.has('Content-Type');
+
+ return duplexAccessed && !hasContentType;
+});
+
+const DEFAULT_CHUNK_SIZE = 64 * 1024;
+
+const supportsResponseStream = isReadableStreamSupported &&
+ test(() => utils$1.isReadableStream(new Response('').body));
+
+
+const resolvers = {
+ stream: supportsResponseStream && ((res) => res.body)
+};
+
+isFetchSupported && (((res) => {
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
+ (_, config) => {
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
+ });
+ });
+})(new Response));
+
+const getBodyLength = async (body) => {
+ if (body == null) {
+ return 0;
+ }
+
+ if(utils$1.isBlob(body)) {
+ return body.size;
+ }
+
+ if(utils$1.isSpecCompliantForm(body)) {
+ const _request = new Request(platform.origin, {
+ method: 'POST',
+ body,
+ });
+ return (await _request.arrayBuffer()).byteLength;
+ }
+
+ if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
+ return body.byteLength;
+ }
+
+ if(utils$1.isURLSearchParams(body)) {
+ body = body + '';
+ }
+
+ if(utils$1.isString(body)) {
+ return (await encodeText(body)).byteLength;
+ }
+};
+
+const resolveBodyLength = async (headers, body) => {
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
+
+ return length == null ? getBodyLength(body) : length;
+};
+
+const fetchAdapter = isFetchSupported && (async (config) => {
+ let {
+ url,
+ method,
+ data,
+ signal,
+ cancelToken,
+ timeout,
+ onDownloadProgress,
+ onUploadProgress,
+ responseType,
+ headers,
+ withCredentials = 'same-origin',
+ fetchOptions
+ } = resolveConfig(config);
+
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+
+ let request;
+
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+
+ let requestContentLength;
+
+ try {
+ if (
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
+ ) {
+ let _request = new Request(url, {
+ method: 'POST',
+ body: data,
+ duplex: "half"
+ });
+
+ let contentTypeHeader;
+
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+ headers.setContentType(contentTypeHeader);
+ }
+
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(
+ requestContentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress))
+ );
+
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ }
+
+ if (!utils$1.isString(withCredentials)) {
+ withCredentials = withCredentials ? 'include' : 'omit';
+ }
+
+ // Cloudflare Workers throws when credentials are defined
+ // see https://github.com/cloudflare/workerd/issues/902
+ const isCredentialsSupported = "credentials" in Request.prototype;
+ request = new Request(url, {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ });
+
+ let response = await fetch(request);
+
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
+ const options = {};
+
+ ['status', 'statusText', 'headers'].forEach(prop => {
+ options[prop] = response[prop];
+ });
+
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
+
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
+ responseContentLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
+ ) || [];
+
+ response = new Response(
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }),
+ options
+ );
+ }
+
+ responseType = responseType || 'text';
+
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
+
+ !isStreamResponse && unsubscribe && unsubscribe();
+
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders$2.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ });
+ })
+ } catch (err) {
+ unsubscribe && unsubscribe();
+
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
+ throw Object.assign(
+ new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
+ {
+ cause: err.cause || err
+ }
+ )
+ }
+
+ throw AxiosError$1.from(err, err && err.code, config, request);
+ }
+});
+
+const knownAdapters = {
+ http: httpAdapter,
+ xhr: xhrAdapter,
+ fetch: fetchAdapter
+};
+
+utils$1.forEach(knownAdapters, (fn, value) => {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, 'name', {value});
+ } catch (e) {
+ // eslint-disable-next-line no-empty
+ }
+ Object.defineProperty(fn, 'adapterName', {value});
+ }
+});
+
+const renderReason = (reason) => `- ${reason}`;
+
+const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
+
+const adapters = {
+ getAdapter: (adapters) => {
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
+
+ const {length} = adapters;
+ let nameOrAdapter;
+ let adapter;
+
+ const rejectedReasons = {};
+
+ for (let i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ let id;
+
+ adapter = nameOrAdapter;
+
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+
+ if (adapter === undefined) {
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
+ }
+ }
+
+ if (adapter) {
+ break;
+ }
+
+ rejectedReasons[id || '#' + i] = adapter;
+ }
+
+ if (!adapter) {
+
+ const reasons = Object.entries(rejectedReasons)
+ .map(([id, state]) => `adapter ${id} ` +
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
+ );
+
+ let s = length ?
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
+ 'as no adapter specified';
+
+ throw new AxiosError$1(
+ `There is no suitable adapter to dispatch the request ` + s,
+ 'ERR_NOT_SUPPORT'
+ );
+ }
+
+ return adapter;
+ },
+ adapters: knownAdapters
+};
+
+/**
+ * Throws a `CanceledError` if cancellation has been requested.
+ *
+ * @param {Object} config The config that is to be used for the request
+ *
+ * @returns {void}
+ */
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+
+ if (config.signal && config.signal.aborted) {
+ throw new CanceledError$1(null, config);
+ }
+}
+
+/**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ config.headers = AxiosHeaders$2.from(config.headers);
+
+ // Transform request data
+ config.data = transformData.call(
+ config,
+ config.transformRequest
+ );
+
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
+ }
+
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData.call(
+ config,
+ config.transformResponse,
+ response
+ );
+
+ response.headers = AxiosHeaders$2.from(response.headers);
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel$1(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(
+ config,
+ config.transformResponse,
+ reason.response
+ );
+ reason.response.headers = AxiosHeaders$2.from(reason.response.headers);
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+}
+
+const VERSION$1 = "1.7.9";
+
+const validators$1 = {};
+
+// eslint-disable-next-line func-names
+['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
+ validators$1[type] = function validator(thing) {
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+ };
+});
+
+const deprecatedWarnings = {};
+
+/**
+ * Transitional option validator
+ *
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
+ * @param {string?} version - deprecated version / removed since version
+ * @param {string?} message - some message with additional info
+ *
+ * @returns {function}
+ */
+validators$1.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+ }
+
+ // eslint-disable-next-line func-names
+ return (value, opt, opts) => {
+ if (validator === false) {
+ throw new AxiosError$1(
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
+ AxiosError$1.ERR_DEPRECATED
+ );
+ }
+
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ // eslint-disable-next-line no-console
+ console.warn(
+ formatMessage(
+ opt,
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
+ )
+ );
+ }
+
+ return validator ? validator(value, opt, opts) : true;
+ };
+};
+
+validators$1.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ // eslint-disable-next-line no-console
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ }
+};
+
+/**
+ * Assert object's properties type
+ *
+ * @param {object} options
+ * @param {object} schema
+ * @param {boolean?} allowUnknown
+ *
+ * @returns {object}
+ */
+
+function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== 'object') {
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
+ }
+ const keys = Object.keys(options);
+ let i = keys.length;
+ while (i-- > 0) {
+ const opt = keys[i];
+ const validator = schema[opt];
+ if (validator) {
+ const value = options[opt];
+ const result = value === undefined || validator(value, opt, options);
+ if (result !== true) {
+ throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
+ }
+ }
+}
+
+const validator = {
+ assertOptions,
+ validators: validators$1
+};
+
+const validators = validator.validators;
+
+/**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ *
+ * @return {Axios} A new instance of Axios
+ */
+class Axios$1 {
+ constructor(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager$1(),
+ response: new InterceptorManager$1()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ async request(configOrUrl, config) {
+ try {
+ return await this._request(configOrUrl, config);
+ } catch (err) {
+ if (err instanceof Error) {
+ let dummy = {};
+
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
+
+ // slice off the Error: ... line
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+ try {
+ if (!err.stack) {
+ err.stack = stack;
+ // match without the 2 top stack lines
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+ err.stack += '\n' + stack;
+ }
+ } catch (e) {
+ // ignore the case where "stack" is an un-writable property
+ }
+ }
+
+ throw err;
+ }
+ }
+
+ _request(configOrUrl, config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof configOrUrl === 'string') {
+ config = config || {};
+ config.url = configOrUrl;
+ } else {
+ config = configOrUrl || {};
+ }
+
+ config = mergeConfig$1(this.defaults, config);
+
+ const {transitional, paramsSerializer, headers} = config;
+
+ if (transitional !== undefined) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean),
+ forcedJSONParsing: validators.transitional(validators.boolean),
+ clarifyTimeoutError: validators.transitional(validators.boolean)
+ }, false);
+ }
+
+ if (paramsSerializer != null) {
+ if (utils$1.isFunction(paramsSerializer)) {
+ config.paramsSerializer = {
+ serialize: paramsSerializer
+ };
+ } else {
+ validator.assertOptions(paramsSerializer, {
+ encode: validators.function,
+ serialize: validators.function
+ }, true);
+ }
+ }
+
+ validator.assertOptions(config, {
+ baseUrl: validators.spelling('baseURL'),
+ withXsrfToken: validators.spelling('withXSRFToken')
+ }, true);
+
+ // Set config.method
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+ // Flatten headers
+ let contextHeaders = headers && utils$1.merge(
+ headers.common,
+ headers[config.method]
+ );
+
+ headers && utils$1.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ (method) => {
+ delete headers[method];
+ }
+ );
+
+ config.headers = AxiosHeaders$2.concat(contextHeaders, headers);
+
+ // filter out skipped interceptors
+ const requestInterceptorChain = [];
+ let synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
+ return;
+ }
+
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ const responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ let promise;
+ let i = 0;
+ let len;
+
+ if (!synchronousRequestInterceptors) {
+ const chain = [dispatchRequest.bind(this), undefined];
+ chain.unshift.apply(chain, requestInterceptorChain);
+ chain.push.apply(chain, responseInterceptorChain);
+ len = chain.length;
+
+ promise = Promise.resolve(config);
+
+ while (i < len) {
+ promise = promise.then(chain[i++], chain[i++]);
+ }
+
+ return promise;
+ }
+
+ len = requestInterceptorChain.length;
+
+ let newConfig = config;
+
+ i = 0;
+
+ while (i < len) {
+ const onFulfilled = requestInterceptorChain[i++];
+ const onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
+ }
+ }
+
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+
+ i = 0;
+ len = responseInterceptorChain.length;
+
+ while (i < len) {
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ }
+
+ return promise;
+ }
+
+ getUri(config) {
+ config = mergeConfig$1(this.defaults, config);
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ return buildURL(fullPath, config.params, config.paramsSerializer);
+ }
+}
+
+// Provide aliases for supported request methods
+utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios$1.prototype[method] = function(url, config) {
+ return this.request(mergeConfig$1(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+});
+
+utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig$1(config || {}, {
+ method,
+ headers: isForm ? {
+ 'Content-Type': 'multipart/form-data'
+ } : {},
+ url,
+ data
+ }));
+ };
+ }
+
+ Axios$1.prototype[method] = generateHTTPMethod();
+
+ Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
+});
+
+const Axios$2 = Axios$1;
+
+/**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @param {Function} executor The executor function.
+ *
+ * @returns {CancelToken}
+ */
+class CancelToken$1 {
+ constructor(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ let resolvePromise;
+
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ const token = this;
+
+ // eslint-disable-next-line func-names
+ this.promise.then(cancel => {
+ if (!token._listeners) return;
+
+ let i = token._listeners.length;
+
+ while (i-- > 0) {
+ token._listeners[i](cancel);
+ }
+ token._listeners = null;
+ });
+
+ // eslint-disable-next-line func-names
+ this.promise.then = onfulfilled => {
+ let _resolve;
+ // eslint-disable-next-line func-names
+ const promise = new Promise(resolve => {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+
+ return promise;
+ };
+
+ executor(function cancel(message, config, request) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new CanceledError$1(message, config, request);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ */
+ throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ }
+
+ /**
+ * Subscribe to the cancel signal
+ */
+
+ subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
+ }
+
+ if (this._listeners) {
+ this._listeners.push(listener);
+ } else {
+ this._listeners = [listener];
+ }
+ }
+
+ /**
+ * Unsubscribe from the cancel signal
+ */
+
+ unsubscribe(listener) {
+ if (!this._listeners) {
+ return;
+ }
+ const index = this._listeners.indexOf(listener);
+ if (index !== -1) {
+ this._listeners.splice(index, 1);
+ }
+ }
+
+ toAbortSignal() {
+ const controller = new AbortController();
+
+ const abort = (err) => {
+ controller.abort(err);
+ };
+
+ this.subscribe(abort);
+
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+
+ return controller.signal;
+ }
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ static source() {
+ let cancel;
+ const token = new CancelToken$1(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token,
+ cancel
+ };
+ }
+}
+
+const CancelToken$2 = CancelToken$1;
+
+/**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ *
+ * @returns {Function}
+ */
+function spread$1(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+}
+
+/**
+ * Determines whether the payload is an error thrown by Axios
+ *
+ * @param {*} payload The value to test
+ *
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
+ */
+function isAxiosError$1(payload) {
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
+}
+
+const HttpStatusCode$1 = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511,
+};
+
+Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
+ HttpStatusCode$1[value] = key;
+});
+
+const HttpStatusCode$2 = HttpStatusCode$1;
+
+/**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ *
+ * @returns {Axios} A new instance of Axios
+ */
+function createInstance(defaultConfig) {
+ const context = new Axios$2(defaultConfig);
+ const instance = bind(Axios$2.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils$1.extend(instance, Axios$2.prototype, context, {allOwnKeys: true});
+
+ // Copy context to instance
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
+
+ // Factory for creating new instances
+ instance.create = function create(instanceConfig) {
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
+ };
+
+ return instance;
+}
+
+// Create the default instance to be exported
+const axios = createInstance(defaults$1);
+
+// Expose Axios class to allow class inheritance
+axios.Axios = Axios$2;
+
+// Expose Cancel & CancelToken
+axios.CanceledError = CanceledError$1;
+axios.CancelToken = CancelToken$2;
+axios.isCancel = isCancel$1;
+axios.VERSION = VERSION$1;
+axios.toFormData = toFormData$1;
+
+// Expose AxiosError class
+axios.AxiosError = AxiosError$1;
+
+// alias for CanceledError for backward compatibility
+axios.Cancel = axios.CanceledError;
+
+// Expose all/spread
+axios.all = function all(promises) {
+ return Promise.all(promises);
+};
+
+axios.spread = spread$1;
+
+// Expose isAxiosError
+axios.isAxiosError = isAxiosError$1;
+
+// Expose mergeConfig
+axios.mergeConfig = mergeConfig$1;
+
+axios.AxiosHeaders = AxiosHeaders$2;
+
+axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
+
+axios.getAdapter = adapters.getAdapter;
+
+axios.HttpStatusCode = HttpStatusCode$2;
+
+axios.default = axios;
+
+// this module should only have a default export
+const axios$1 = axios;
+
+// This module is intended to unwrap Axios default export as named.
+// Keep top-level export same with static properties
+// so that it can keep same with es module or cjs
+const {
+ Axios,
+ AxiosError,
+ CanceledError,
+ isCancel,
+ CancelToken,
+ VERSION,
+ all,
+ Cancel,
+ isAxiosError,
+ spread,
+ toFormData,
+ AxiosHeaders,
+ HttpStatusCode,
+ formToJSON,
+ getAdapter,
+ mergeConfig
+} = axios$1;
+
+export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData };
+//# sourceMappingURL=axios.js.map
diff --git a/node_modules/axios/dist/esm/axios.min.js b/node_modules/axios/dist/esm/axios.min.js
new file mode 100644
index 0000000..ed844d0
--- /dev/null
+++ b/node_modules/axios/dist/esm/axios.min.js
@@ -0,0 +1,2 @@
+function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,r=(o=Object.create(null),e=>{const n=t.call(e);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())});var o;const s=e=>(e=e.toLowerCase(),t=>r(t)===e),i=e=>t=>typeof t===e,{isArray:a}=Array,c=i("undefined");const u=s("ArrayBuffer");const l=i("string"),f=i("function"),d=i("number"),p=e=>null!==e&&"object"==typeof e,h=e=>{if("object"!==r(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=s("Date"),y=s("File"),b=s("Blob"),g=s("FileList"),w=s("URLSearchParams"),[E,R,O,S]=["ReadableStream","Request","Response","Headers"].map(s);function T(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),a(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=e=>!c(e)&&e!==v;const C=(N="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>N&&e instanceof N);var N;const j=s("HTMLFormElement"),P=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_=s("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};T(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",F={DIGIT:"0123456789",ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+"0123456789"};const B=s("AsyncFunction"),k=(D="function"==typeof setImmediate,q=f(v.postMessage),D?setImmediate:q?(I=`axios@${Math.random()}`,M=[],v.addEventListener("message",(({source:e,data:t})=>{e===v&&t===I&&M.length&&M.shift()()}),!1),e=>{M.push(e),v.postMessage(I,"*")}):e=>setTimeout(e));var D,q,I,M;const z="undefined"!=typeof queueMicrotask?queueMicrotask.bind(v):"undefined"!=typeof process&&process.nextTick||k,H={isArray:a,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:p,isPlainObject:h,isReadableStream:E,isRequest:R,isResponse:O,isHeaders:S,isUndefined:c,isDate:m,isFile:y,isBlob:b,isRegExp:_,isFunction:f,isStream:e=>p(e)&&f(e.pipe),isURLSearchParams:w,isTypedArray:C,isFileList:g,forEach:T,merge:function e(){const{caseless:t}=x(this)&&this||{},n={},r=(r,o)=>{const s=t&&A(n,o)||o;h(n[s])&&h(r)?n[s]=e(n[s],r):h(r)?n[s]=e({},r):a(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e(T(n,((n,o)=>{r&&f(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:r,kindOfTest:s,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];f(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return a(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:A,global:v,isContextDefined:x,ALPHABET:F,generateString:(e=16,t=F.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(p(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=a(e)?[]:{};return T(e,((e,t)=>{const s=n(e,r+1);!c(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:B,isThenable:e=>e&&(p(e)||f(e))&&f(e.then)&&f(e.catch),setImmediate:k,asap:z};function J(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}H.inherits(J,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const W=J.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(J,K),Object.defineProperty(W,"isAxiosError",{value:!0}),J.from=(e,t,n,r,o,s)=>{const i=Object.create(W);return H.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),J.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function V(e){return H.isPlainObject(e)||H.isArray(e)}function $(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function G(e,t,n){return e?e.concat(t).map((function(e,t){return e=$(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const X=H.toFlatObject(H,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Q(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!H.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(!a&&H.isBlob(e))throw new J("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(H.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(V)}(e)||(H.isFileList(e)||H.endsWith(n,"[]"))&&(a=H.toArray(e)))return n=$(n),a.forEach((function(e,r){!H.isUndefined(e)&&null!==e&&t.append(!0===i?G([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!V(e)||(t.append(G(o,n,s),c(e)),!1)}const l=[],f=Object.assign(X,{defaultVisitor:u,convertValue:c,isVisitable:V});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!H.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),H.forEach(n,(function(n,s){!0===(!(H.isUndefined(n)||null===n)&&o.call(t,n,H.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function Z(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Y(e,t){this._pairs=[],e&&Q(e,this,t)}const ee=Y.prototype;function te(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ne(e,t,n){if(!t)return e;const r=n&&n.encode||te;H.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):H.isURLSearchParams(t)?t.toString():new Y(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,Z)}:Z;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const re=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},se={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Y,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ie="undefined"!=typeof window&&"undefined"!=typeof document,ae="object"==typeof navigator&&navigator||void 0,ce=ie&&(!ae||["ReactNative","NativeScript","NS"].indexOf(ae.product)<0),ue="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,le=ie&&window.location.href||"http://localhost",fe={...Object.freeze({__proto__:null,hasBrowserEnv:ie,hasStandardBrowserWebWorkerEnv:ue,hasStandardBrowserEnv:ce,navigator:ae,origin:le}),...se};function de(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&H.isArray(r)?r.length:s,a)return H.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&H.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&H.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const pe={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=H.isObject(e);o&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return r?JSON.stringify(de(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Q(e,new fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return fe.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=H.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Q(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||pe.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw J.from(e,J.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],(e=>{pe.headers[e]={}}));const he=pe,me=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ye=Symbol("internals");function be(e){return e&&String(e).trim().toLowerCase()}function ge(e){return!1===e||null==e?e:H.isArray(e)?e.map(ge):String(e)}function we(e,t,n,r,o){return H.isFunction(r)?r.call(this,t,n):(o&&(t=n),H.isString(t)?H.isString(r)?-1!==t.indexOf(r):H.isRegExp(r)?r.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=be(t);if(!o)throw new Error("header name must be a non-empty string");const s=H.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ge(e))}const s=(e,t)=>H.forEach(e,((e,n)=>o(e,n,t)));if(H.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(H.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=be(e)){const n=H.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=be(e)){const n=H.findKey(this,e);return!(!n||void 0===this[n]||t&&!we(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=be(e)){const o=H.findKey(n,e);!o||t&&!we(0,n[o],o,t)||(delete n[o],r=!0)}}return H.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!we(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return H.forEach(this,((r,o)=>{const s=H.findKey(n,o);if(s)return t[s]=ge(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ge(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return H.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&H.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ye]=this[ye]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=be(e);t[r]||(!function(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),H.freezeMethods(Ee);const Re=Ee;function Oe(e,t){const n=this||he,r=t||n,o=Re.from(r.headers);let s=r.data;return H.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Se(e){return!(!e||!e.__CANCEL__)}function Te(e,t,n){J.call(this,null==e?"canceled":e,J.ERR_CANCELED,t,n),this.name="CanceledError"}function Ae(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}H.inherits(Te,J,{__CANCEL__:!0});const ve=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{o=s,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout((()=>{r=null,i(n)}),s-a)))},()=>n&&i(n)]}((n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s;e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),n)},xe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ce=e=>(...t)=>H.asap((()=>e(...t))),Ne=fe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,fe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,je=fe.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];H.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),H.isString(r)&&i.push("path="+r),H.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Pe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const _e=e=>e instanceof Re?{...e}:e;function Le(e,t){t=t||{};const n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function o(e,t,n,o){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!H.isUndefined(t))return r(void 0,t)}function i(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(_e(e),_e(t),0,!0)};return H.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);H.isUndefined(i)&&s!==a||(n[r]=i)})),n}const Ue=e=>{const t=Le({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=Re.from(a),t.url=ne(Pe(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),H.isFormData(r))if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(fe.hasStandardBrowserEnv&&(o&&H.isFunction(o)&&(o=o(t)),o||!1!==o&&Ne(t.url))){const e=s&&i&&je.read(i);e&&a.set(s,e)}return t},Fe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ue(e);let o=r.data;const s=Re.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=Re.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ae((function(e){t(e),h()}),(function(e){n(e),h()}),{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new J("Request aborted",J.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new J("Network Error",J.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||oe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new J(t,o.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&H.forEach(s.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),H.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,l]=ve(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=ve(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Te(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===fe.protocols.indexOf(b)?n(new J("Unsupported protocol "+b+":",J.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Be=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof J?t:new Te(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>H.asap(i),a}},ke=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of De(e))yield*ke(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Ie="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Me=Ie&&"function"==typeof ReadableStream,ze=Ie&&("function"==typeof TextEncoder?(He=new TextEncoder,e=>He.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var He;const Je=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},We=Me&&Je((()=>{let e=!1;const t=new Request(fe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Ke=Me&&Je((()=>H.isReadableStream(new Response("").body))),Ve={stream:Ke&&(e=>e.body)};var $e;Ie&&($e=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ve[e]&&(Ve[e]=H.isFunction($e[e])?t=>t[e]():(t,n)=>{throw new J(`Response type '${e}' is not supported`,J.ERR_NOT_SUPPORT,n)})})));const Ge=async(e,t)=>{const n=H.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new Request(fe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await ze(e)).byteLength:void 0)})(t):n},Xe={http:null,xhr:Fe,fetch:Ie&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=Ue(e);u=u?(u+"").toLowerCase():"text";let p,h=Be([o,s&&s.toAbortSignal()],i);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(c&&We&&"get"!==n&&"head"!==n&&0!==(y=await Ge(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(H.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=xe(y,ve(Ce(c)));r=qe(n.body,65536,e,t)}}H.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let s=await fetch(p);const i=Ke&&("stream"===u||"response"===u);if(Ke&&(a||i&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=H.toFiniteNumber(s.headers.get("content-length")),[n,r]=a&&xe(t,ve(Ce(a),!0))||[];s=new Response(qe(s.body,65536,n,(()=>{r&&r(),m&&m()})),e)}u=u||"text";let b=await Ve[H.findKey(Ve,u)||"text"](s,e);return!i&&m&&m(),await new Promise(((t,n)=>{Ae(t,n,{data:b,headers:Re.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new J("Network Error",J.ERR_NETWORK,e,p),{cause:t.cause||t});throw J.from(t,t&&t.code,e,p)}})};H.forEach(Xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Qe=e=>`- ${e}`,Ze=e=>H.isFunction(e)||null===e||!1===e,Ye=e=>{e=H.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new J("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Qe).join("\n"):" "+Qe(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function et(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function tt(e){et(e),e.headers=Re.from(e.headers),e.data=Oe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ye(e.adapter||he.adapter)(e).then((function(t){return et(e),t.data=Oe.call(e,e.transformResponse,t),t.headers=Re.from(t.headers),t}),(function(t){return Se(t)||(et(e),t&&t.response&&(t.response.data=Oe.call(e,e.transformResponse,t.response),t.response.headers=Re.from(t.response.headers))),Promise.reject(t)}))}const nt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{nt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const rt={};nt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new J(r(o," has been removed"+(t?" in "+t:"")),J.ERR_DEPRECATED);return t&&!rt[o]&&(rt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},nt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ot={assertOptions:function(e,t,n){if("object"!=typeof e)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new J("option "+s+" must be "+n,J.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}},validators:nt},st=ot.validators;class it{constructor(e){this.defaults=e,this.interceptors={request:new re,response:new re}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Le(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ot.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),null!=r&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:ot.assertOptions(r,{encode:st.function,serialize:st.function},!0)),ot.assertOptions(t,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[t.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Re.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[tt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Te(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ct((function(t){e=t})),cancel:e}}}const ut=ct;const lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lt).forEach((([e,t])=>{lt[t]=e}));const ft=lt;const dt=function t(n){const r=new at(n),o=e(at.prototype.request,r);return H.extend(o,at.prototype,r,{allOwnKeys:!0}),H.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Le(n,e))},o}(he);dt.Axios=at,dt.CanceledError=Te,dt.CancelToken=ut,dt.isCancel=Se,dt.VERSION="1.7.9",dt.toFormData=Q,dt.AxiosError=J,dt.Cancel=dt.CanceledError,dt.all=function(e){return Promise.all(e)},dt.spread=function(e){return function(t){return e.apply(null,t)}},dt.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},dt.mergeConfig=Le,dt.AxiosHeaders=Re,dt.formToJSON=e=>de(H.isHTMLForm(e)?new FormData(e):e),dt.getAdapter=Ye,dt.HttpStatusCode=ft,dt.default=dt;const pt=dt,{Axios:ht,AxiosError:mt,CanceledError:yt,isCancel:bt,CancelToken:gt,VERSION:wt,all:Et,Cancel:Rt,isAxiosError:Ot,spread:St,toFormData:Tt,AxiosHeaders:At,HttpStatusCode:vt,formToJSON:xt,getAdapter:Ct,mergeConfig:Nt}=pt;export{ht as Axios,mt as AxiosError,At as AxiosHeaders,Rt as Cancel,gt as CancelToken,yt as CanceledError,vt as HttpStatusCode,wt as VERSION,Et as all,pt as default,xt as formToJSON,Ct as getAdapter,Ot as isAxiosError,bt as isCancel,Nt as mergeConfig,St as spread,Tt as toFormData};
+//# sourceMappingURL=axios.min.js.map
diff --git a/node_modules/axios/dist/node/axios.cjs b/node_modules/axios/dist/node/axios.cjs
new file mode 100644
index 0000000..30c6c09
--- /dev/null
+++ b/node_modules/axios/dist/node/axios.cjs
@@ -0,0 +1,4752 @@
+// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
+'use strict';
+
+const FormData$1 = require('form-data');
+const url = require('url');
+const proxyFromEnv = require('proxy-from-env');
+const http = require('http');
+const https = require('https');
+const util = require('util');
+const followRedirects = require('follow-redirects');
+const zlib = require('zlib');
+const stream = require('stream');
+const events = require('events');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
+const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
+const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
+const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
+const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
+const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
+const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
+const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
+const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
+
+function bind(fn, thisArg) {
+ return function wrap() {
+ return fn.apply(thisArg, arguments);
+ };
+}
+
+// utils is a library of generic helper functions non-specific to axios
+
+const {toString} = Object.prototype;
+const {getPrototypeOf} = Object;
+
+const kindOf = (cache => thing => {
+ const str = toString.call(thing);
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+})(Object.create(null));
+
+const kindOfTest = (type) => {
+ type = type.toLowerCase();
+ return (thing) => kindOf(thing) === type
+};
+
+const typeOfTest = type => thing => typeof thing === type;
+
+/**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ *
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+const {isArray} = Array;
+
+/**
+ * Determine if a value is undefined
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+const isUndefined = typeOfTest('undefined');
+
+/**
+ * Determine if a value is a Buffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Buffer, otherwise false
+ */
+function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+}
+
+/**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+const isArrayBuffer = kindOfTest('ArrayBuffer');
+
+
+/**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+function isArrayBufferView(val) {
+ let result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
+ }
+ return result;
+}
+
+/**
+ * Determine if a value is a String
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+const isString = typeOfTest('string');
+
+/**
+ * Determine if a value is a Function
+ *
+ * @param {*} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+const isFunction = typeOfTest('function');
+
+/**
+ * Determine if a value is a Number
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+const isNumber = typeOfTest('number');
+
+/**
+ * Determine if a value is an Object
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+const isObject = (thing) => thing !== null && typeof thing === 'object';
+
+/**
+ * Determine if a value is a Boolean
+ *
+ * @param {*} thing The value to test
+ * @returns {boolean} True if value is a Boolean, otherwise false
+ */
+const isBoolean = thing => thing === true || thing === false;
+
+/**
+ * Determine if a value is a plain Object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a plain Object, otherwise false
+ */
+const isPlainObject = (val) => {
+ if (kindOf(val) !== 'object') {
+ return false;
+ }
+
+ const prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
+};
+
+/**
+ * Determine if a value is a Date
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+const isDate = kindOfTest('Date');
+
+/**
+ * Determine if a value is a File
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFile = kindOfTest('File');
+
+/**
+ * Determine if a value is a Blob
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+const isBlob = kindOfTest('Blob');
+
+/**
+ * Determine if a value is a FileList
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFileList = kindOfTest('FileList');
+
+/**
+ * Determine if a value is a Stream
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+const isStream = (val) => isObject(val) && isFunction(val.pipe);
+
+/**
+ * Determine if a value is a FormData
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+const isFormData = (thing) => {
+ let kind;
+ return thing && (
+ (typeof FormData === 'function' && thing instanceof FormData) || (
+ isFunction(thing.append) && (
+ (kind = kindOf(thing)) === 'formdata' ||
+ // detect form-data instance
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
+ )
+ )
+ )
+};
+
+/**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+const isURLSearchParams = kindOfTest('URLSearchParams');
+
+const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
+
+/**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ *
+ * @returns {String} The String freed of excess whitespace
+ */
+const trim = (str) => str.trim ?
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+
+/**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ *
+ * @param {Boolean} [allOwnKeys = false]
+ * @returns {any}
+ */
+function forEach(obj, fn, {allOwnKeys = false} = {}) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ let i;
+ let l;
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+ const len = keys.length;
+ let key;
+
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+}
+
+function findKey(obj, key) {
+ key = key.toLowerCase();
+ const keys = Object.keys(obj);
+ let i = keys.length;
+ let _key;
+ while (i-- > 0) {
+ _key = keys[i];
+ if (key === _key.toLowerCase()) {
+ return _key;
+ }
+ }
+ return null;
+}
+
+const _global = (() => {
+ /*eslint no-undef:0*/
+ if (typeof globalThis !== "undefined") return globalThis;
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
+})();
+
+const isContextDefined = (context) => !isUndefined(context) && context !== _global;
+
+/**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ *
+ * @returns {Object} Result of all merge properties
+ */
+function merge(/* obj1, obj2, obj3, ... */) {
+ const {caseless} = isContextDefined(this) && this || {};
+ const result = {};
+ const assignValue = (val, key) => {
+ const targetKey = caseless && findKey(result, key) || key;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else {
+ result[targetKey] = val;
+ }
+ };
+
+ for (let i = 0, l = arguments.length; i < l; i++) {
+ arguments[i] && forEach(arguments[i], assignValue);
+ }
+ return result;
+}
+
+/**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ *
+ * @param {Boolean} [allOwnKeys]
+ * @returns {Object} The resulting value of object a
+ */
+const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
+ forEach(b, (val, key) => {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ }, {allOwnKeys});
+ return a;
+};
+
+/**
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ *
+ * @param {string} content with BOM
+ *
+ * @returns {string} content value without BOM
+ */
+const stripBOM = (content) => {
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+};
+
+/**
+ * Inherit the prototype methods from one constructor into another
+ * @param {function} constructor
+ * @param {function} superConstructor
+ * @param {object} [props]
+ * @param {object} [descriptors]
+ *
+ * @returns {void}
+ */
+const inherits = (constructor, superConstructor, props, descriptors) => {
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+ constructor.prototype.constructor = constructor;
+ Object.defineProperty(constructor, 'super', {
+ value: superConstructor.prototype
+ });
+ props && Object.assign(constructor.prototype, props);
+};
+
+/**
+ * Resolve object with deep prototype chain to a flat object
+ * @param {Object} sourceObj source object
+ * @param {Object} [destObj]
+ * @param {Function|Boolean} [filter]
+ * @param {Function} [propFilter]
+ *
+ * @returns {Object}
+ */
+const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
+ let props;
+ let i;
+ let prop;
+ const merged = {};
+
+ destObj = destObj || {};
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ if (sourceObj == null) return destObj;
+
+ do {
+ props = Object.getOwnPropertyNames(sourceObj);
+ i = props.length;
+ while (i-- > 0) {
+ prop = props[i];
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+ destObj[prop] = sourceObj[prop];
+ merged[prop] = true;
+ }
+ }
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+
+ return destObj;
+};
+
+/**
+ * Determines whether a string ends with the characters of a specified string
+ *
+ * @param {String} str
+ * @param {String} searchString
+ * @param {Number} [position= 0]
+ *
+ * @returns {boolean}
+ */
+const endsWith = (str, searchString, position) => {
+ str = String(str);
+ if (position === undefined || position > str.length) {
+ position = str.length;
+ }
+ position -= searchString.length;
+ const lastIndex = str.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+};
+
+
+/**
+ * Returns new array from array like object or null if failed
+ *
+ * @param {*} [thing]
+ *
+ * @returns {?Array}
+ */
+const toArray = (thing) => {
+ if (!thing) return null;
+ if (isArray(thing)) return thing;
+ let i = thing.length;
+ if (!isNumber(i)) return null;
+ const arr = new Array(i);
+ while (i-- > 0) {
+ arr[i] = thing[i];
+ }
+ return arr;
+};
+
+/**
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+ * thing passed in is an instance of Uint8Array
+ *
+ * @param {TypedArray}
+ *
+ * @returns {Array}
+ */
+// eslint-disable-next-line func-names
+const isTypedArray = (TypedArray => {
+ // eslint-disable-next-line func-names
+ return thing => {
+ return TypedArray && thing instanceof TypedArray;
+ };
+})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+/**
+ * For each entry in the object, call the function with the key and value.
+ *
+ * @param {Object} obj - The object to iterate over.
+ * @param {Function} fn - The function to call for each entry.
+ *
+ * @returns {void}
+ */
+const forEachEntry = (obj, fn) => {
+ const generator = obj && obj[Symbol.iterator];
+
+ const iterator = generator.call(obj);
+
+ let result;
+
+ while ((result = iterator.next()) && !result.done) {
+ const pair = result.value;
+ fn.call(obj, pair[0], pair[1]);
+ }
+};
+
+/**
+ * It takes a regular expression and a string, and returns an array of all the matches
+ *
+ * @param {string} regExp - The regular expression to match against.
+ * @param {string} str - The string to search.
+ *
+ * @returns {Array}
+ */
+const matchAll = (regExp, str) => {
+ let matches;
+ const arr = [];
+
+ while ((matches = regExp.exec(str)) !== null) {
+ arr.push(matches);
+ }
+
+ return arr;
+};
+
+/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+const isHTMLForm = kindOfTest('HTMLFormElement');
+
+const toCamelCase = str => {
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
+ function replacer(m, p1, p2) {
+ return p1.toUpperCase() + p2;
+ }
+ );
+};
+
+/* Creating a function that will check if an object has a property. */
+const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
+
+/**
+ * Determine if a value is a RegExp object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a RegExp object, otherwise false
+ */
+const isRegExp = kindOfTest('RegExp');
+
+const reduceDescriptors = (obj, reducer) => {
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
+ const reducedDescriptors = {};
+
+ forEach(descriptors, (descriptor, name) => {
+ let ret;
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
+ reducedDescriptors[name] = ret || descriptor;
+ }
+ });
+
+ Object.defineProperties(obj, reducedDescriptors);
+};
+
+/**
+ * Makes all methods read-only
+ * @param {Object} obj
+ */
+
+const freezeMethods = (obj) => {
+ reduceDescriptors(obj, (descriptor, name) => {
+ // skip restricted props in strict mode
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+ return false;
+ }
+
+ const value = obj[name];
+
+ if (!isFunction(value)) return;
+
+ descriptor.enumerable = false;
+
+ if ('writable' in descriptor) {
+ descriptor.writable = false;
+ return;
+ }
+
+ if (!descriptor.set) {
+ descriptor.set = () => {
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
+ };
+ }
+ });
+};
+
+const toObjectSet = (arrayOrString, delimiter) => {
+ const obj = {};
+
+ const define = (arr) => {
+ arr.forEach(value => {
+ obj[value] = true;
+ });
+ };
+
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+
+ return obj;
+};
+
+const noop = () => {};
+
+const toFiniteNumber = (value, defaultValue) => {
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+};
+
+const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
+
+const DIGIT = '0123456789';
+
+const ALPHABET = {
+ DIGIT,
+ ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+};
+
+const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
+ let str = '';
+ const {length} = alphabet;
+ while (size--) {
+ str += alphabet[Math.random() * length|0];
+ }
+
+ return str;
+};
+
+/**
+ * If the thing is a FormData object, return true, otherwise return false.
+ *
+ * @param {unknown} thing - The thing to check.
+ *
+ * @returns {boolean}
+ */
+function isSpecCompliantForm(thing) {
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
+}
+
+const toJSONObject = (obj) => {
+ const stack = new Array(10);
+
+ const visit = (source, i) => {
+
+ if (isObject(source)) {
+ if (stack.indexOf(source) >= 0) {
+ return;
+ }
+
+ if(!('toJSON' in source)) {
+ stack[i] = source;
+ const target = isArray(source) ? [] : {};
+
+ forEach(source, (value, key) => {
+ const reducedValue = visit(value, i + 1);
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
+ });
+
+ stack[i] = undefined;
+
+ return target;
+ }
+ }
+
+ return source;
+ };
+
+ return visit(obj, 0);
+};
+
+const isAsyncFn = kindOfTest('AsyncFunction');
+
+const isThenable = (thing) =>
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
+
+// original code
+// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+
+ return postMessageSupported ? ((token, callbacks) => {
+ _global.addEventListener("message", ({source, data}) => {
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+
+ return (cb) => {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ }
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
+})(
+ typeof setImmediate === 'function',
+ isFunction(_global.postMessage)
+);
+
+const asap = typeof queueMicrotask !== 'undefined' ?
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
+
+// *********************
+
+const utils$1 = {
+ isArray,
+ isArrayBuffer,
+ isBuffer,
+ isFormData,
+ isArrayBufferView,
+ isString,
+ isNumber,
+ isBoolean,
+ isObject,
+ isPlainObject,
+ isReadableStream,
+ isRequest,
+ isResponse,
+ isHeaders,
+ isUndefined,
+ isDate,
+ isFile,
+ isBlob,
+ isRegExp,
+ isFunction,
+ isStream,
+ isURLSearchParams,
+ isTypedArray,
+ isFileList,
+ forEach,
+ merge,
+ extend,
+ trim,
+ stripBOM,
+ inherits,
+ toFlatObject,
+ kindOf,
+ kindOfTest,
+ endsWith,
+ toArray,
+ forEachEntry,
+ matchAll,
+ isHTMLForm,
+ hasOwnProperty,
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
+ reduceDescriptors,
+ freezeMethods,
+ toObjectSet,
+ toCamelCase,
+ noop,
+ toFiniteNumber,
+ findKey,
+ global: _global,
+ isContextDefined,
+ ALPHABET,
+ generateString,
+ isSpecCompliantForm,
+ toJSONObject,
+ isAsyncFn,
+ isThenable,
+ setImmediate: _setImmediate,
+ asap
+};
+
+/**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [config] The config.
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ *
+ * @returns {Error} The created error.
+ */
+function AxiosError(message, code, config, request, response) {
+ Error.call(this);
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = (new Error()).stack;
+ }
+
+ this.message = message;
+ this.name = 'AxiosError';
+ code && (this.code = code);
+ config && (this.config = config);
+ request && (this.request = request);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
+}
+
+utils$1.inherits(AxiosError, Error, {
+ toJSON: function toJSON() {
+ return {
+ // Standard
+ message: this.message,
+ name: this.name,
+ // Microsoft
+ description: this.description,
+ number: this.number,
+ // Mozilla
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ // Axios
+ config: utils$1.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+ }
+});
+
+const prototype$1 = AxiosError.prototype;
+const descriptors = {};
+
+[
+ 'ERR_BAD_OPTION_VALUE',
+ 'ERR_BAD_OPTION',
+ 'ECONNABORTED',
+ 'ETIMEDOUT',
+ 'ERR_NETWORK',
+ 'ERR_FR_TOO_MANY_REDIRECTS',
+ 'ERR_DEPRECATED',
+ 'ERR_BAD_RESPONSE',
+ 'ERR_BAD_REQUEST',
+ 'ERR_CANCELED',
+ 'ERR_NOT_SUPPORT',
+ 'ERR_INVALID_URL'
+// eslint-disable-next-line func-names
+].forEach(code => {
+ descriptors[code] = {value: code};
+});
+
+Object.defineProperties(AxiosError, descriptors);
+Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
+
+// eslint-disable-next-line func-names
+AxiosError.from = (error, code, config, request, response, customProps) => {
+ const axiosError = Object.create(prototype$1);
+
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
+ return obj !== Error.prototype;
+ }, prop => {
+ return prop !== 'isAxiosError';
+ });
+
+ AxiosError.call(axiosError, error.message, code, config, request, response);
+
+ axiosError.cause = error;
+
+ axiosError.name = error.name;
+
+ customProps && Object.assign(axiosError, customProps);
+
+ return axiosError;
+};
+
+/**
+ * Determines if the given thing is a array or js object.
+ *
+ * @param {string} thing - The object or array to be visited.
+ *
+ * @returns {boolean}
+ */
+function isVisitable(thing) {
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
+}
+
+/**
+ * It removes the brackets from the end of a string
+ *
+ * @param {string} key - The key of the parameter.
+ *
+ * @returns {string} the key without the brackets.
+ */
+function removeBrackets(key) {
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
+}
+
+/**
+ * It takes a path, a key, and a boolean, and returns a string
+ *
+ * @param {string} path - The path to the current key.
+ * @param {string} key - The key of the current object being iterated over.
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+ *
+ * @returns {string} The path to the current key.
+ */
+function renderKey(path, key, dots) {
+ if (!path) return key;
+ return path.concat(key).map(function each(token, i) {
+ // eslint-disable-next-line no-param-reassign
+ token = removeBrackets(token);
+ return !dots && i ? '[' + token + ']' : token;
+ }).join(dots ? '.' : '');
+}
+
+/**
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
+ *
+ * @param {Array} arr - The array to check
+ *
+ * @returns {boolean}
+ */
+function isFlatArray(arr) {
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
+}
+
+const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
+ return /^is[A-Z]/.test(prop);
+});
+
+/**
+ * Convert a data object to FormData
+ *
+ * @param {Object} obj
+ * @param {?Object} [formData]
+ * @param {?Object} [options]
+ * @param {Function} [options.visitor]
+ * @param {Boolean} [options.metaTokens = true]
+ * @param {Boolean} [options.dots = false]
+ * @param {?Boolean} [options.indexes = false]
+ *
+ * @returns {Object}
+ **/
+
+/**
+ * It converts an object into a FormData object
+ *
+ * @param {Object} obj - The object to convert to form data.
+ * @param {string} formData - The FormData object to append to.
+ * @param {Object} options
+ *
+ * @returns
+ */
+function toFormData(obj, formData, options) {
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('target must be an object');
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ formData = formData || new (FormData__default["default"] || FormData)();
+
+ // eslint-disable-next-line no-param-reassign
+ options = utils$1.toFlatObject(options, {
+ metaTokens: true,
+ dots: false,
+ indexes: false
+ }, false, function defined(option, source) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ return !utils$1.isUndefined(source[option]);
+ });
+
+ const metaTokens = options.metaTokens;
+ // eslint-disable-next-line no-use-before-define
+ const visitor = options.visitor || defaultVisitor;
+ const dots = options.dots;
+ const indexes = options.indexes;
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
+
+ if (!utils$1.isFunction(visitor)) {
+ throw new TypeError('visitor must be a function');
+ }
+
+ function convertValue(value) {
+ if (value === null) return '';
+
+ if (utils$1.isDate(value)) {
+ return value.toISOString();
+ }
+
+ if (!useBlob && utils$1.isBlob(value)) {
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
+ }
+
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Default visitor.
+ *
+ * @param {*} value
+ * @param {String|Number} key
+ * @param {Array} path
+ * @this {FormData}
+ *
+ * @returns {boolean} return true to visit the each prop of the value recursively
+ */
+ function defaultVisitor(value, key, path) {
+ let arr = value;
+
+ if (value && !path && typeof value === 'object') {
+ if (utils$1.endsWith(key, '{}')) {
+ // eslint-disable-next-line no-param-reassign
+ key = metaTokens ? key : key.slice(0, -2);
+ // eslint-disable-next-line no-param-reassign
+ value = JSON.stringify(value);
+ } else if (
+ (utils$1.isArray(value) && isFlatArray(value)) ||
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
+ )) {
+ // eslint-disable-next-line no-param-reassign
+ key = removeBrackets(key);
+
+ arr.forEach(function each(el, index) {
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
+ // eslint-disable-next-line no-nested-ternary
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
+ convertValue(el)
+ );
+ });
+ return false;
+ }
+ }
+
+ if (isVisitable(value)) {
+ return true;
+ }
+
+ formData.append(renderKey(path, key, dots), convertValue(value));
+
+ return false;
+ }
+
+ const stack = [];
+
+ const exposedHelpers = Object.assign(predicates, {
+ defaultVisitor,
+ convertValue,
+ isVisitable
+ });
+
+ function build(value, path) {
+ if (utils$1.isUndefined(value)) return;
+
+ if (stack.indexOf(value) !== -1) {
+ throw Error('Circular reference detected in ' + path.join('.'));
+ }
+
+ stack.push(value);
+
+ utils$1.forEach(value, function each(el, key) {
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
+ );
+
+ if (result === true) {
+ build(el, path ? path.concat(key) : [key]);
+ }
+ });
+
+ stack.pop();
+ }
+
+ if (!utils$1.isObject(obj)) {
+ throw new TypeError('data must be an object');
+ }
+
+ build(obj);
+
+ return formData;
+}
+
+/**
+ * It encodes a string by replacing all characters that are not in the unreserved set with
+ * their percent-encoded equivalents
+ *
+ * @param {string} str - The string to encode.
+ *
+ * @returns {string} The encoded string.
+ */
+function encode$1(str) {
+ const charMap = {
+ '!': '%21',
+ "'": '%27',
+ '(': '%28',
+ ')': '%29',
+ '~': '%7E',
+ '%20': '+',
+ '%00': '\x00'
+ };
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+ return charMap[match];
+ });
+}
+
+/**
+ * It takes a params object and converts it to a FormData object
+ *
+ * @param {Object} params - The parameters to be converted to a FormData object.
+ * @param {Object} options - The options object passed to the Axios constructor.
+ *
+ * @returns {void}
+ */
+function AxiosURLSearchParams(params, options) {
+ this._pairs = [];
+
+ params && toFormData(params, this, options);
+}
+
+const prototype = AxiosURLSearchParams.prototype;
+
+prototype.append = function append(name, value) {
+ this._pairs.push([name, value]);
+};
+
+prototype.toString = function toString(encoder) {
+ const _encode = encoder ? function(value) {
+ return encoder.call(this, value, encode$1);
+ } : encode$1;
+
+ return this._pairs.map(function each(pair) {
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
+ }, '').join('&');
+};
+
+/**
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+ * URI encoded counterparts
+ *
+ * @param {string} val The value to be encoded.
+ *
+ * @returns {string} The encoded value.
+ */
+function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+}
+
+/**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @param {?(object|Function)} options
+ *
+ * @returns {string} The formatted url
+ */
+function buildURL(url, params, options) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ const _encode = options && options.encode || encode;
+
+ if (utils$1.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
+
+ const serializeFn = options && options.serialize;
+
+ let serializedParams;
+
+ if (serializeFn) {
+ serializedParams = serializeFn(params, options);
+ } else {
+ serializedParams = utils$1.isURLSearchParams(params) ?
+ params.toString() :
+ new AxiosURLSearchParams(params, options).toString(_encode);
+ }
+
+ if (serializedParams) {
+ const hashmarkIndex = url.indexOf("#");
+
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+}
+
+class InterceptorManager {
+ constructor() {
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled,
+ rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ }
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ *
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
+ */
+ eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ }
+
+ /**
+ * Clear all interceptors from the stack
+ *
+ * @returns {void}
+ */
+ clear() {
+ if (this.handlers) {
+ this.handlers = [];
+ }
+ }
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ *
+ * @returns {void}
+ */
+ forEach(fn) {
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ }
+}
+
+const InterceptorManager$1 = InterceptorManager;
+
+const transitionalDefaults = {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+};
+
+const URLSearchParams = url__default["default"].URLSearchParams;
+
+const platform$1 = {
+ isNode: true,
+ classes: {
+ URLSearchParams,
+ FormData: FormData__default["default"],
+ Blob: typeof Blob !== 'undefined' && Blob || null
+ },
+ protocols: [ 'http', 'https', 'file', 'data' ]
+};
+
+const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+
+const _navigator = typeof navigator === 'object' && navigator || undefined;
+
+/**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ * nativescript
+ * navigator.product -> 'NativeScript' or 'NS'
+ *
+ * @returns {boolean}
+ */
+const hasStandardBrowserEnv = hasBrowserEnv &&
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+/**
+ * Determine if we're running in a standard browser webWorker environment
+ *
+ * Although the `isStandardBrowserEnv` method indicates that
+ * `allows axios to run in a web worker`, the WebWorker will still be
+ * filtered out due to its judgment standard
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+ * This leads to a problem when axios post `FormData` in webWorker
+ */
+const hasStandardBrowserWebWorkerEnv = (() => {
+ return (
+ typeof WorkerGlobalScope !== 'undefined' &&
+ // eslint-disable-next-line no-undef
+ self instanceof WorkerGlobalScope &&
+ typeof self.importScripts === 'function'
+ );
+})();
+
+const origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+const utils = /*#__PURE__*/Object.freeze({
+ __proto__: null,
+ hasBrowserEnv: hasBrowserEnv,
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
+ navigator: _navigator,
+ origin: origin
+});
+
+const platform = {
+ ...utils,
+ ...platform$1
+};
+
+function toURLEncodedForm(data, options) {
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
+ visitor: function(value, key, path, helpers) {
+ if (platform.isNode && utils$1.isBuffer(value)) {
+ this.append(key, value.toString('base64'));
+ return false;
+ }
+
+ return helpers.defaultVisitor.apply(this, arguments);
+ }
+ }, options));
+}
+
+/**
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+ *
+ * @param {string} name - The name of the property to get.
+ *
+ * @returns An array of strings.
+ */
+function parsePropPath(name) {
+ // foo[x][y][z]
+ // foo.x.y.z
+ // foo-x-y-z
+ // foo x y z
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
+ return match[0] === '[]' ? '' : match[1] || match[0];
+ });
+}
+
+/**
+ * Convert an array to an object.
+ *
+ * @param {Array} arr - The array to convert to an object.
+ *
+ * @returns An object with the same keys and values as the array.
+ */
+function arrayToObject(arr) {
+ const obj = {};
+ const keys = Object.keys(arr);
+ let i;
+ const len = keys.length;
+ let key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ obj[key] = arr[key];
+ }
+ return obj;
+}
+
+/**
+ * It takes a FormData object and returns a JavaScript object
+ *
+ * @param {string} formData The FormData object to convert to JSON.
+ *
+ * @returns {Object | null} The converted object.
+ */
+function formDataToJSON(formData) {
+ function buildPath(path, value, target, index) {
+ let name = path[index++];
+
+ if (name === '__proto__') return true;
+
+ const isNumericKey = Number.isFinite(+name);
+ const isLast = index >= path.length;
+ name = !name && utils$1.isArray(target) ? target.length : name;
+
+ if (isLast) {
+ if (utils$1.hasOwnProp(target, name)) {
+ target[name] = [target[name], value];
+ } else {
+ target[name] = value;
+ }
+
+ return !isNumericKey;
+ }
+
+ if (!target[name] || !utils$1.isObject(target[name])) {
+ target[name] = [];
+ }
+
+ const result = buildPath(path, value, target[name], index);
+
+ if (result && utils$1.isArray(target[name])) {
+ target[name] = arrayToObject(target[name]);
+ }
+
+ return !isNumericKey;
+ }
+
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
+ const obj = {};
+
+ utils$1.forEachEntry(formData, (name, value) => {
+ buildPath(parsePropPath(name), value, obj, 0);
+ });
+
+ return obj;
+ }
+
+ return null;
+}
+
+/**
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+ * of the input
+ *
+ * @param {any} rawValue - The value to be stringified.
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
+ * @param {Function} encoder - A function that takes a value and returns a string.
+ *
+ * @returns {string} A stringified version of the rawValue.
+ */
+function stringifySafely(rawValue, parser, encoder) {
+ if (utils$1.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils$1.trim(rawValue);
+ } catch (e) {
+ if (e.name !== 'SyntaxError') {
+ throw e;
+ }
+ }
+ }
+
+ return (encoder || JSON.stringify)(rawValue);
+}
+
+const defaults = {
+
+ transitional: transitionalDefaults,
+
+ adapter: ['xhr', 'http', 'fetch'],
+
+ transformRequest: [function transformRequest(data, headers) {
+ const contentType = headers.getContentType() || '';
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
+ const isObjectPayload = utils$1.isObject(data);
+
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
+ data = new FormData(data);
+ }
+
+ const isFormData = utils$1.isFormData(data);
+
+ if (isFormData) {
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ }
+
+ if (utils$1.isArrayBuffer(data) ||
+ utils$1.isBuffer(data) ||
+ utils$1.isStream(data) ||
+ utils$1.isFile(data) ||
+ utils$1.isBlob(data) ||
+ utils$1.isReadableStream(data)
+ ) {
+ return data;
+ }
+ if (utils$1.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils$1.isURLSearchParams(data)) {
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+ return data.toString();
+ }
+
+ let isFileList;
+
+ if (isObjectPayload) {
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+ return toURLEncodedForm(data, this.formSerializer).toString();
+ }
+
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+ const _FormData = this.env && this.env.FormData;
+
+ return toFormData(
+ isFileList ? {'files[]': data} : data,
+ _FormData && new _FormData(),
+ this.formSerializer
+ );
+ }
+ }
+
+ if (isObjectPayload || hasJSONContentType ) {
+ headers.setContentType('application/json', false);
+ return stringifySafely(data);
+ }
+
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ const transitional = this.transitional || defaults.transitional;
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ const JSONRequested = this.responseType === 'json';
+
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
+ return data;
+ }
+
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
+
+ try {
+ return JSON.parse(data);
+ } catch (e) {
+ if (strictJSONParsing) {
+ if (e.name === 'SyntaxError') {
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
+ }
+ throw e;
+ }
+ }
+ }
+
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+ maxBodyLength: -1,
+
+ env: {
+ FormData: platform.classes.FormData,
+ Blob: platform.classes.Blob
+ },
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ },
+
+ headers: {
+ common: {
+ 'Accept': 'application/json, text/plain, */*',
+ 'Content-Type': undefined
+ }
+ }
+};
+
+utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
+ defaults.headers[method] = {};
+});
+
+const defaults$1 = defaults;
+
+// RawAxiosHeaders whose duplicates are ignored by node
+// c.f. https://nodejs.org/api/http.html#http_message_headers
+const ignoreDuplicateOf = utils$1.toObjectSet([
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+]);
+
+/**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} rawHeaders Headers needing to be parsed
+ *
+ * @returns {Object} Headers parsed into an object
+ */
+const parseHeaders = rawHeaders => {
+ const parsed = {};
+ let key;
+ let val;
+ let i;
+
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+ i = line.indexOf(':');
+ key = line.substring(0, i).trim().toLowerCase();
+ val = line.substring(i + 1).trim();
+
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
+ return;
+ }
+
+ if (key === 'set-cookie') {
+ if (parsed[key]) {
+ parsed[key].push(val);
+ } else {
+ parsed[key] = [val];
+ }
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ });
+
+ return parsed;
+};
+
+const $internals = Symbol('internals');
+
+function normalizeHeader(header) {
+ return header && String(header).trim().toLowerCase();
+}
+
+function normalizeValue(value) {
+ if (value === false || value == null) {
+ return value;
+ }
+
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
+}
+
+function parseTokens(str) {
+ const tokens = Object.create(null);
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+ let match;
+
+ while ((match = tokensRE.exec(str))) {
+ tokens[match[1]] = match[2];
+ }
+
+ return tokens;
+}
+
+const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+
+function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+ if (utils$1.isFunction(filter)) {
+ return filter.call(this, value, header);
+ }
+
+ if (isHeaderNameFilter) {
+ value = header;
+ }
+
+ if (!utils$1.isString(value)) return;
+
+ if (utils$1.isString(filter)) {
+ return value.indexOf(filter) !== -1;
+ }
+
+ if (utils$1.isRegExp(filter)) {
+ return filter.test(value);
+ }
+}
+
+function formatHeader(header) {
+ return header.trim()
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
+ return char.toUpperCase() + str;
+ });
+}
+
+function buildAccessors(obj, header) {
+ const accessorName = utils$1.toCamelCase(' ' + header);
+
+ ['get', 'set', 'has'].forEach(methodName => {
+ Object.defineProperty(obj, methodName + accessorName, {
+ value: function(arg1, arg2, arg3) {
+ return this[methodName].call(this, header, arg1, arg2, arg3);
+ },
+ configurable: true
+ });
+ });
+}
+
+class AxiosHeaders {
+ constructor(headers) {
+ headers && this.set(headers);
+ }
+
+ set(header, valueOrRewrite, rewrite) {
+ const self = this;
+
+ function setHeader(_value, _header, _rewrite) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!lHeader) {
+ throw new Error('header name must be a non-empty string');
+ }
+
+ const key = utils$1.findKey(self, lHeader);
+
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
+ self[key || _header] = normalizeValue(_value);
+ }
+ }
+
+ const setHeaders = (headers, _rewrite) =>
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
+
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
+ setHeaders(header, valueOrRewrite);
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+ setHeaders(parseHeaders(header), valueOrRewrite);
+ } else if (utils$1.isHeaders(header)) {
+ for (const [key, value] of header.entries()) {
+ setHeader(value, key, rewrite);
+ }
+ } else {
+ header != null && setHeader(valueOrRewrite, header, rewrite);
+ }
+
+ return this;
+ }
+
+ get(header, parser) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ if (key) {
+ const value = this[key];
+
+ if (!parser) {
+ return value;
+ }
+
+ if (parser === true) {
+ return parseTokens(value);
+ }
+
+ if (utils$1.isFunction(parser)) {
+ return parser.call(this, value, key);
+ }
+
+ if (utils$1.isRegExp(parser)) {
+ return parser.exec(value);
+ }
+
+ throw new TypeError('parser must be boolean|regexp|function');
+ }
+ }
+ }
+
+ has(header, matcher) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils$1.findKey(this, header);
+
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ }
+
+ return false;
+ }
+
+ delete(header, matcher) {
+ const self = this;
+ let deleted = false;
+
+ function deleteHeader(_header) {
+ _header = normalizeHeader(_header);
+
+ if (_header) {
+ const key = utils$1.findKey(self, _header);
+
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+ delete self[key];
+
+ deleted = true;
+ }
+ }
+ }
+
+ if (utils$1.isArray(header)) {
+ header.forEach(deleteHeader);
+ } else {
+ deleteHeader(header);
+ }
+
+ return deleted;
+ }
+
+ clear(matcher) {
+ const keys = Object.keys(this);
+ let i = keys.length;
+ let deleted = false;
+
+ while (i--) {
+ const key = keys[i];
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+ delete this[key];
+ deleted = true;
+ }
+ }
+
+ return deleted;
+ }
+
+ normalize(format) {
+ const self = this;
+ const headers = {};
+
+ utils$1.forEach(this, (value, header) => {
+ const key = utils$1.findKey(headers, header);
+
+ if (key) {
+ self[key] = normalizeValue(value);
+ delete self[header];
+ return;
+ }
+
+ const normalized = format ? formatHeader(header) : String(header).trim();
+
+ if (normalized !== header) {
+ delete self[header];
+ }
+
+ self[normalized] = normalizeValue(value);
+
+ headers[normalized] = true;
+ });
+
+ return this;
+ }
+
+ concat(...targets) {
+ return this.constructor.concat(this, ...targets);
+ }
+
+ toJSON(asStrings) {
+ const obj = Object.create(null);
+
+ utils$1.forEach(this, (value, header) => {
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
+ });
+
+ return obj;
+ }
+
+ [Symbol.iterator]() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+
+ toString() {
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'AxiosHeaders';
+ }
+
+ static from(thing) {
+ return thing instanceof this ? thing : new this(thing);
+ }
+
+ static concat(first, ...targets) {
+ const computed = new this(first);
+
+ targets.forEach((target) => computed.set(target));
+
+ return computed;
+ }
+
+ static accessor(header) {
+ const internals = this[$internals] = (this[$internals] = {
+ accessors: {}
+ });
+
+ const accessors = internals.accessors;
+ const prototype = this.prototype;
+
+ function defineAccessor(_header) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!accessors[lHeader]) {
+ buildAccessors(prototype, _header);
+ accessors[lHeader] = true;
+ }
+ }
+
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+
+ return this;
+ }
+}
+
+AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+// reserved names hotfix
+utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+ return {
+ get: () => value,
+ set(headerValue) {
+ this[mapped] = headerValue;
+ }
+ }
+});
+
+utils$1.freezeMethods(AxiosHeaders);
+
+const AxiosHeaders$1 = AxiosHeaders;
+
+/**
+ * Transform the data for a request or a response
+ *
+ * @param {Array|Function} fns A single function or Array of functions
+ * @param {?Object} response The response object
+ *
+ * @returns {*} The resulting transformed data
+ */
+function transformData(fns, response) {
+ const config = this || defaults$1;
+ const context = response || config;
+ const headers = AxiosHeaders$1.from(context.headers);
+ let data = context.data;
+
+ utils$1.forEach(fns, function transform(fn) {
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ });
+
+ headers.normalize();
+
+ return data;
+}
+
+function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+}
+
+/**
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
+ *
+ * @param {string=} message The message.
+ * @param {Object=} config The config.
+ * @param {Object=} request The request.
+ *
+ * @returns {CanceledError} The created error.
+ */
+function CanceledError(message, config, request) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
+ this.name = 'CanceledError';
+}
+
+utils$1.inherits(CanceledError, AxiosError, {
+ __CANCEL__: true
+});
+
+/**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ *
+ * @returns {object} The response.
+ */
+function settle(resolve, reject, response) {
+ const validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(new AxiosError(
+ 'Request failed with status code ' + response.status,
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
+ response.config,
+ response.request,
+ response
+ ));
+ }
+}
+
+/**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ *
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+}
+
+/**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ *
+ * @returns {string} The combined URL
+ */
+function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+}
+
+/**
+ * Creates a new URL by combining the baseURL with the requestedURL,
+ * only when the requestedURL is not already an absolute URL.
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} requestedURL Absolute or relative URL to combine
+ *
+ * @returns {string} The combined full path
+ */
+function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+}
+
+const VERSION = "1.7.9";
+
+function parseProtocol(url) {
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+}
+
+const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
+
+/**
+ * Parse data uri to a Buffer or Blob
+ *
+ * @param {String} uri
+ * @param {?Boolean} asBlob
+ * @param {?Object} options
+ * @param {?Function} options.Blob
+ *
+ * @returns {Buffer|Blob}
+ */
+function fromDataURI(uri, asBlob, options) {
+ const _Blob = options && options.Blob || platform.classes.Blob;
+ const protocol = parseProtocol(uri);
+
+ if (asBlob === undefined && _Blob) {
+ asBlob = true;
+ }
+
+ if (protocol === 'data') {
+ uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
+
+ const match = DATA_URL_PATTERN.exec(uri);
+
+ if (!match) {
+ throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
+ }
+
+ const mime = match[1];
+ const isBase64 = match[2];
+ const body = match[3];
+ const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
+
+ if (asBlob) {
+ if (!_Blob) {
+ throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
+ }
+
+ return new _Blob([buffer], {type: mime});
+ }
+
+ return buffer;
+ }
+
+ throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
+}
+
+const kInternals = Symbol('internals');
+
+class AxiosTransformStream extends stream__default["default"].Transform{
+ constructor(options) {
+ options = utils$1.toFlatObject(options, {
+ maxRate: 0,
+ chunkSize: 64 * 1024,
+ minChunkSize: 100,
+ timeWindow: 500,
+ ticksRate: 2,
+ samplesCount: 15
+ }, null, (prop, source) => {
+ return !utils$1.isUndefined(source[prop]);
+ });
+
+ super({
+ readableHighWaterMark: options.chunkSize
+ });
+
+ const internals = this[kInternals] = {
+ timeWindow: options.timeWindow,
+ chunkSize: options.chunkSize,
+ maxRate: options.maxRate,
+ minChunkSize: options.minChunkSize,
+ bytesSeen: 0,
+ isCaptured: false,
+ notifiedBytesLoaded: 0,
+ ts: Date.now(),
+ bytes: 0,
+ onReadCallback: null
+ };
+
+ this.on('newListener', event => {
+ if (event === 'progress') {
+ if (!internals.isCaptured) {
+ internals.isCaptured = true;
+ }
+ }
+ });
+ }
+
+ _read(size) {
+ const internals = this[kInternals];
+
+ if (internals.onReadCallback) {
+ internals.onReadCallback();
+ }
+
+ return super._read(size);
+ }
+
+ _transform(chunk, encoding, callback) {
+ const internals = this[kInternals];
+ const maxRate = internals.maxRate;
+
+ const readableHighWaterMark = this.readableHighWaterMark;
+
+ const timeWindow = internals.timeWindow;
+
+ const divider = 1000 / timeWindow;
+ const bytesThreshold = (maxRate / divider);
+ const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
+
+ const pushChunk = (_chunk, _callback) => {
+ const bytes = Buffer.byteLength(_chunk);
+ internals.bytesSeen += bytes;
+ internals.bytes += bytes;
+
+ internals.isCaptured && this.emit('progress', internals.bytesSeen);
+
+ if (this.push(_chunk)) {
+ process.nextTick(_callback);
+ } else {
+ internals.onReadCallback = () => {
+ internals.onReadCallback = null;
+ process.nextTick(_callback);
+ };
+ }
+ };
+
+ const transformChunk = (_chunk, _callback) => {
+ const chunkSize = Buffer.byteLength(_chunk);
+ let chunkRemainder = null;
+ let maxChunkSize = readableHighWaterMark;
+ let bytesLeft;
+ let passed = 0;
+
+ if (maxRate) {
+ const now = Date.now();
+
+ if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {
+ internals.ts = now;
+ bytesLeft = bytesThreshold - internals.bytes;
+ internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
+ passed = 0;
+ }
+
+ bytesLeft = bytesThreshold - internals.bytes;
+ }
+
+ if (maxRate) {
+ if (bytesLeft <= 0) {
+ // next time window
+ return setTimeout(() => {
+ _callback(null, _chunk);
+ }, timeWindow - passed);
+ }
+
+ if (bytesLeft < maxChunkSize) {
+ maxChunkSize = bytesLeft;
+ }
+ }
+
+ if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {
+ chunkRemainder = _chunk.subarray(maxChunkSize);
+ _chunk = _chunk.subarray(0, maxChunkSize);
+ }
+
+ pushChunk(_chunk, chunkRemainder ? () => {
+ process.nextTick(_callback, null, chunkRemainder);
+ } : _callback);
+ };
+
+ transformChunk(chunk, function transformNextChunk(err, _chunk) {
+ if (err) {
+ return callback(err);
+ }
+
+ if (_chunk) {
+ transformChunk(_chunk, transformNextChunk);
+ } else {
+ callback(null);
+ }
+ });
+ }
+}
+
+const AxiosTransformStream$1 = AxiosTransformStream;
+
+const {asyncIterator} = Symbol;
+
+const readBlob = async function* (blob) {
+ if (blob.stream) {
+ yield* blob.stream();
+ } else if (blob.arrayBuffer) {
+ yield await blob.arrayBuffer();
+ } else if (blob[asyncIterator]) {
+ yield* blob[asyncIterator]();
+ } else {
+ yield blob;
+ }
+};
+
+const readBlob$1 = readBlob;
+
+const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
+
+const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
+
+const CRLF = '\r\n';
+const CRLF_BYTES = textEncoder.encode(CRLF);
+const CRLF_BYTES_COUNT = 2;
+
+class FormDataPart {
+ constructor(name, value) {
+ const {escapeName} = this.constructor;
+ const isStringValue = utils$1.isString(value);
+
+ let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
+ !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
+ }${CRLF}`;
+
+ if (isStringValue) {
+ value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
+ } else {
+ headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
+ }
+
+ this.headers = textEncoder.encode(headers + CRLF);
+
+ this.contentLength = isStringValue ? value.byteLength : value.size;
+
+ this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
+
+ this.name = name;
+ this.value = value;
+ }
+
+ async *encode(){
+ yield this.headers;
+
+ const {value} = this;
+
+ if(utils$1.isTypedArray(value)) {
+ yield value;
+ } else {
+ yield* readBlob$1(value);
+ }
+
+ yield CRLF_BYTES;
+ }
+
+ static escapeName(name) {
+ return String(name).replace(/[\r\n"]/g, (match) => ({
+ '\r' : '%0D',
+ '\n' : '%0A',
+ '"' : '%22',
+ }[match]));
+ }
+}
+
+const formDataToStream = (form, headersHandler, options) => {
+ const {
+ tag = 'form-data-boundary',
+ size = 25,
+ boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
+ } = options || {};
+
+ if(!utils$1.isFormData(form)) {
+ throw TypeError('FormData instance required');
+ }
+
+ if (boundary.length < 1 || boundary.length > 70) {
+ throw Error('boundary must be 10-70 characters long')
+ }
+
+ const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
+ const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
+ let contentLength = footerBytes.byteLength;
+
+ const parts = Array.from(form.entries()).map(([name, value]) => {
+ const part = new FormDataPart(name, value);
+ contentLength += part.size;
+ return part;
+ });
+
+ contentLength += boundaryBytes.byteLength * parts.length;
+
+ contentLength = utils$1.toFiniteNumber(contentLength);
+
+ const computedHeaders = {
+ 'Content-Type': `multipart/form-data; boundary=${boundary}`
+ };
+
+ if (Number.isFinite(contentLength)) {
+ computedHeaders['Content-Length'] = contentLength;
+ }
+
+ headersHandler && headersHandler(computedHeaders);
+
+ return stream.Readable.from((async function *() {
+ for(const part of parts) {
+ yield boundaryBytes;
+ yield* part.encode();
+ }
+
+ yield footerBytes;
+ })());
+};
+
+const formDataToStream$1 = formDataToStream;
+
+class ZlibHeaderTransformStream extends stream__default["default"].Transform {
+ __transform(chunk, encoding, callback) {
+ this.push(chunk);
+ callback();
+ }
+
+ _transform(chunk, encoding, callback) {
+ if (chunk.length !== 0) {
+ this._transform = this.__transform;
+
+ // Add Default Compression headers if no zlib headers are present
+ if (chunk[0] !== 120) { // Hex: 78
+ const header = Buffer.alloc(2);
+ header[0] = 120; // Hex: 78
+ header[1] = 156; // Hex: 9C
+ this.push(header, encoding);
+ }
+ }
+
+ this.__transform(chunk, encoding, callback);
+ }
+}
+
+const ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
+
+const callbackify = (fn, reducer) => {
+ return utils$1.isAsyncFn(fn) ? function (...args) {
+ const cb = args.pop();
+ fn.apply(this, args).then((value) => {
+ try {
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
+ } catch (err) {
+ cb(err);
+ }
+ }, cb);
+ } : fn;
+};
+
+const callbackify$1 = callbackify;
+
+/**
+ * Calculate data maxRate
+ * @param {Number} [samplesCount= 10]
+ * @param {Number} [min= 1000]
+ * @returns {Function}
+ */
+function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+
+ min = min !== undefined ? min : 1000;
+
+ return function push(chunkLength) {
+ const now = Date.now();
+
+ const startedAt = timestamps[tail];
+
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+
+ let i = tail;
+ let bytesCount = 0;
+
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+
+ head = (head + 1) % samplesCount;
+
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+
+ if (now - firstSampleTS < min) {
+ return;
+ }
+
+ const passed = startedAt && now - startedAt;
+
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+}
+
+/**
+ * Throttle decorator
+ * @param {Function} fn
+ * @param {Number} freq
+ * @return {Function}
+ */
+function throttle(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1000 / freq;
+ let lastArgs;
+ let timer;
+
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn.apply(null, args);
+ };
+
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if ( passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs);
+ }, threshold - passed);
+ }
+ }
+ };
+
+ const flush = () => lastArgs && invoke(lastArgs);
+
+ return [throttled, flush];
+}
+
+const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer(50, 250);
+
+ return throttle(e => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : undefined;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+
+ bytesNotified = loaded;
+
+ const data = {
+ loaded,
+ total,
+ progress: total ? (loaded / total) : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? 'download' : 'upload']: true
+ };
+
+ listener(data);
+ }, freq);
+};
+
+const progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+};
+
+const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
+
+const zlibOptions = {
+ flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
+ finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
+};
+
+const brotliOptions = {
+ flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
+ finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
+};
+
+const isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
+
+const {http: httpFollow, https: httpsFollow} = followRedirects__default["default"];
+
+const isHttps = /https:?/;
+
+const supportedProtocols = platform.protocols.map(protocol => {
+ return protocol + ':';
+});
+
+const flushOnFinish = (stream, [throttled, flush]) => {
+ stream
+ .on('end', flush)
+ .on('error', flush);
+
+ return throttled;
+};
+
+/**
+ * If the proxy or config beforeRedirects functions are defined, call them with the options
+ * object.
+ *
+ * @param {Object} options - The options object that was passed to the request.
+ *
+ * @returns {Object}
+ */
+function dispatchBeforeRedirect(options, responseDetails) {
+ if (options.beforeRedirects.proxy) {
+ options.beforeRedirects.proxy(options);
+ }
+ if (options.beforeRedirects.config) {
+ options.beforeRedirects.config(options, responseDetails);
+ }
+}
+
+/**
+ * If the proxy or config afterRedirects functions are defined, call them with the options
+ *
+ * @param {http.ClientRequestArgs} options
+ * @param {AxiosProxyConfig} configProxy configuration from Axios options object
+ * @param {string} location
+ *
+ * @returns {http.ClientRequestArgs}
+ */
+function setProxy(options, configProxy, location) {
+ let proxy = configProxy;
+ if (!proxy && proxy !== false) {
+ const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location);
+ if (proxyUrl) {
+ proxy = new URL(proxyUrl);
+ }
+ }
+ if (proxy) {
+ // Basic proxy authorization
+ if (proxy.username) {
+ proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
+ }
+
+ if (proxy.auth) {
+ // Support proxy auth object form
+ if (proxy.auth.username || proxy.auth.password) {
+ proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');
+ }
+ const base64 = Buffer
+ .from(proxy.auth, 'utf8')
+ .toString('base64');
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
+ }
+
+ options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
+ const proxyHost = proxy.hostname || proxy.host;
+ options.hostname = proxyHost;
+ // Replace 'host' since options is not a URL object
+ options.host = proxyHost;
+ options.port = proxy.port;
+ options.path = location;
+ if (proxy.protocol) {
+ options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
+ }
+ }
+
+ options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
+ // Configure proxy for redirected request, passing the original config proxy to apply
+ // the exact same logic as if the redirected request was performed by axios directly.
+ setProxy(redirectOptions, configProxy, redirectOptions.href);
+ };
+}
+
+const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process';
+
+// temporary hotfix
+
+const wrapAsync = (asyncExecutor) => {
+ return new Promise((resolve, reject) => {
+ let onDone;
+ let isDone;
+
+ const done = (value, isRejected) => {
+ if (isDone) return;
+ isDone = true;
+ onDone && onDone(value, isRejected);
+ };
+
+ const _resolve = (value) => {
+ done(value);
+ resolve(value);
+ };
+
+ const _reject = (reason) => {
+ done(reason, true);
+ reject(reason);
+ };
+
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
+ })
+};
+
+const resolveFamily = ({address, family}) => {
+ if (!utils$1.isString(address)) {
+ throw TypeError('address must be a string');
+ }
+ return ({
+ address,
+ family: family || (address.indexOf('.') < 0 ? 6 : 4)
+ });
+};
+
+const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {address, family});
+
+/*eslint consistent-return:0*/
+const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
+ let {data, lookup, family} = config;
+ const {responseType, responseEncoding} = config;
+ const method = config.method.toUpperCase();
+ let isDone;
+ let rejected = false;
+ let req;
+
+ if (lookup) {
+ const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
+ // hotfix to support opt.all option which is required for node 20.x
+ lookup = (hostname, opt, cb) => {
+ _lookup(hostname, opt, (err, arg0, arg1) => {
+ if (err) {
+ return cb(err);
+ }
+
+ const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
+
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
+ });
+ };
+ }
+
+ // temporary internal emitter until the AxiosRequest class will be implemented
+ const emitter = new events.EventEmitter();
+
+ const onFinished = () => {
+ if (config.cancelToken) {
+ config.cancelToken.unsubscribe(abort);
+ }
+
+ if (config.signal) {
+ config.signal.removeEventListener('abort', abort);
+ }
+
+ emitter.removeAllListeners();
+ };
+
+ onDone((value, isRejected) => {
+ isDone = true;
+ if (isRejected) {
+ rejected = true;
+ onFinished();
+ }
+ });
+
+ function abort(reason) {
+ emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
+ }
+
+ emitter.once('abort', reject);
+
+ if (config.cancelToken || config.signal) {
+ config.cancelToken && config.cancelToken.subscribe(abort);
+ if (config.signal) {
+ config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
+ }
+ }
+
+ // Parse url
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
+ const protocol = parsed.protocol || supportedProtocols[0];
+
+ if (protocol === 'data:') {
+ let convertedData;
+
+ if (method !== 'GET') {
+ return settle(resolve, reject, {
+ status: 405,
+ statusText: 'method not allowed',
+ headers: {},
+ config
+ });
+ }
+
+ try {
+ convertedData = fromDataURI(config.url, responseType === 'blob', {
+ Blob: config.env && config.env.Blob
+ });
+ } catch (err) {
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
+ }
+
+ if (responseType === 'text') {
+ convertedData = convertedData.toString(responseEncoding);
+
+ if (!responseEncoding || responseEncoding === 'utf8') {
+ convertedData = utils$1.stripBOM(convertedData);
+ }
+ } else if (responseType === 'stream') {
+ convertedData = stream__default["default"].Readable.from(convertedData);
+ }
+
+ return settle(resolve, reject, {
+ data: convertedData,
+ status: 200,
+ statusText: 'OK',
+ headers: new AxiosHeaders$1(),
+ config
+ });
+ }
+
+ if (supportedProtocols.indexOf(protocol) === -1) {
+ return reject(new AxiosError(
+ 'Unsupported protocol ' + protocol,
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+
+ const headers = AxiosHeaders$1.from(config.headers).normalize();
+
+ // Set User-Agent (required by some servers)
+ // See https://github.com/axios/axios/issues/69
+ // User-Agent is specified; handle case where no UA header is desired
+ // Only set header if it hasn't been set in config
+ headers.set('User-Agent', 'axios/' + VERSION, false);
+
+ const {onUploadProgress, onDownloadProgress} = config;
+ const maxRate = config.maxRate;
+ let maxUploadRate = undefined;
+ let maxDownloadRate = undefined;
+
+ // support for spec compliant FormData objects
+ if (utils$1.isSpecCompliantForm(data)) {
+ const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
+
+ data = formDataToStream$1(data, (formHeaders) => {
+ headers.set(formHeaders);
+ }, {
+ tag: `axios-${VERSION}-boundary`,
+ boundary: userBoundary && userBoundary[1] || undefined
+ });
+ // support for https://www.npmjs.com/package/form-data api
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
+ headers.set(data.getHeaders());
+
+ if (!headers.hasContentLength()) {
+ try {
+ const knownLength = await util__default["default"].promisify(data.getLength).call(data);
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
+ /*eslint no-empty:0*/
+ } catch (e) {
+ }
+ }
+ } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
+ data.size && headers.setContentType(data.type || 'application/octet-stream');
+ headers.setContentLength(data.size || 0);
+ data = stream__default["default"].Readable.from(readBlob$1(data));
+ } else if (data && !utils$1.isStream(data)) {
+ if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) {
+ data = Buffer.from(new Uint8Array(data));
+ } else if (utils$1.isString(data)) {
+ data = Buffer.from(data, 'utf-8');
+ } else {
+ return reject(new AxiosError(
+ 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+
+ // Add Content-Length header if data exists
+ headers.setContentLength(data.length, false);
+
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
+ return reject(new AxiosError(
+ 'Request body larger than maxBodyLength limit',
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+ }
+
+ const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
+
+ if (utils$1.isArray(maxRate)) {
+ maxUploadRate = maxRate[0];
+ maxDownloadRate = maxRate[1];
+ } else {
+ maxUploadRate = maxDownloadRate = maxRate;
+ }
+
+ if (data && (onUploadProgress || maxUploadRate)) {
+ if (!utils$1.isStream(data)) {
+ data = stream__default["default"].Readable.from(data, {objectMode: false});
+ }
+
+ data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({
+ maxRate: utils$1.toFiniteNumber(maxUploadRate)
+ })], utils$1.noop);
+
+ onUploadProgress && data.on('progress', flushOnFinish(
+ data,
+ progressEventDecorator(
+ contentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
+ )
+ ));
+ }
+
+ // HTTP basic authentication
+ let auth = undefined;
+ if (config.auth) {
+ const username = config.auth.username || '';
+ const password = config.auth.password || '';
+ auth = username + ':' + password;
+ }
+
+ if (!auth && parsed.username) {
+ const urlUsername = parsed.username;
+ const urlPassword = parsed.password;
+ auth = urlUsername + ':' + urlPassword;
+ }
+
+ auth && headers.delete('authorization');
+
+ let path;
+
+ try {
+ path = buildURL(
+ parsed.pathname + parsed.search,
+ config.params,
+ config.paramsSerializer
+ ).replace(/^\?/, '');
+ } catch (err) {
+ const customErr = new Error(err.message);
+ customErr.config = config;
+ customErr.url = config.url;
+ customErr.exists = true;
+ return reject(customErr);
+ }
+
+ headers.set(
+ 'Accept-Encoding',
+ 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false
+ );
+
+ const options = {
+ path,
+ method: method,
+ headers: headers.toJSON(),
+ agents: { http: config.httpAgent, https: config.httpsAgent },
+ auth,
+ protocol,
+ family,
+ beforeRedirect: dispatchBeforeRedirect,
+ beforeRedirects: {}
+ };
+
+ // cacheable-lookup integration hotfix
+ !utils$1.isUndefined(lookup) && (options.lookup = lookup);
+
+ if (config.socketPath) {
+ options.socketPath = config.socketPath;
+ } else {
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
+ options.port = parsed.port;
+ setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
+ }
+
+ let transport;
+ const isHttpsRequest = isHttps.test(options.protocol);
+ options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
+ if (config.transport) {
+ transport = config.transport;
+ } else if (config.maxRedirects === 0) {
+ transport = isHttpsRequest ? https__default["default"] : http__default["default"];
+ } else {
+ if (config.maxRedirects) {
+ options.maxRedirects = config.maxRedirects;
+ }
+ if (config.beforeRedirect) {
+ options.beforeRedirects.config = config.beforeRedirect;
+ }
+ transport = isHttpsRequest ? httpsFollow : httpFollow;
+ }
+
+ if (config.maxBodyLength > -1) {
+ options.maxBodyLength = config.maxBodyLength;
+ } else {
+ // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
+ options.maxBodyLength = Infinity;
+ }
+
+ if (config.insecureHTTPParser) {
+ options.insecureHTTPParser = config.insecureHTTPParser;
+ }
+
+ // Create the request
+ req = transport.request(options, function handleResponse(res) {
+ if (req.destroyed) return;
+
+ const streams = [res];
+
+ const responseLength = +res.headers['content-length'];
+
+ if (onDownloadProgress || maxDownloadRate) {
+ const transformStream = new AxiosTransformStream$1({
+ maxRate: utils$1.toFiniteNumber(maxDownloadRate)
+ });
+
+ onDownloadProgress && transformStream.on('progress', flushOnFinish(
+ transformStream,
+ progressEventDecorator(
+ responseLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
+ )
+ ));
+
+ streams.push(transformStream);
+ }
+
+ // decompress the response body transparently if required
+ let responseStream = res;
+
+ // return the last request in case of redirects
+ const lastRequest = res.req || req;
+
+ // if decompress disabled we should not decompress
+ if (config.decompress !== false && res.headers['content-encoding']) {
+ // if no content, but headers still say that it is encoded,
+ // remove the header not confuse downstream operations
+ if (method === 'HEAD' || res.statusCode === 204) {
+ delete res.headers['content-encoding'];
+ }
+
+ switch ((res.headers['content-encoding'] || '').toLowerCase()) {
+ /*eslint default-case:0*/
+ case 'gzip':
+ case 'x-gzip':
+ case 'compress':
+ case 'x-compress':
+ // add the unzipper to the body stream processing pipeline
+ streams.push(zlib__default["default"].createUnzip(zlibOptions));
+
+ // remove the content-encoding in order to not confuse downstream operations
+ delete res.headers['content-encoding'];
+ break;
+ case 'deflate':
+ streams.push(new ZlibHeaderTransformStream$1());
+
+ // add the unzipper to the body stream processing pipeline
+ streams.push(zlib__default["default"].createUnzip(zlibOptions));
+
+ // remove the content-encoding in order to not confuse downstream operations
+ delete res.headers['content-encoding'];
+ break;
+ case 'br':
+ if (isBrotliSupported) {
+ streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions));
+ delete res.headers['content-encoding'];
+ }
+ }
+ }
+
+ responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
+
+ const offListeners = stream__default["default"].finished(responseStream, () => {
+ offListeners();
+ onFinished();
+ });
+
+ const response = {
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: new AxiosHeaders$1(res.headers),
+ config,
+ request: lastRequest
+ };
+
+ if (responseType === 'stream') {
+ response.data = responseStream;
+ settle(resolve, reject, response);
+ } else {
+ const responseBuffer = [];
+ let totalResponseBytes = 0;
+
+ responseStream.on('data', function handleStreamData(chunk) {
+ responseBuffer.push(chunk);
+ totalResponseBytes += chunk.length;
+
+ // make sure the content length is not over the maxContentLength if specified
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
+ // stream.destroy() emit aborted event before calling reject() on Node.js v16
+ rejected = true;
+ responseStream.destroy();
+ reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
+ AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
+ }
+ });
+
+ responseStream.on('aborted', function handlerStreamAborted() {
+ if (rejected) {
+ return;
+ }
+
+ const err = new AxiosError(
+ 'stream has been aborted',
+ AxiosError.ERR_BAD_RESPONSE,
+ config,
+ lastRequest
+ );
+ responseStream.destroy(err);
+ reject(err);
+ });
+
+ responseStream.on('error', function handleStreamError(err) {
+ if (req.destroyed) return;
+ reject(AxiosError.from(err, null, config, lastRequest));
+ });
+
+ responseStream.on('end', function handleStreamEnd() {
+ try {
+ let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
+ if (responseType !== 'arraybuffer') {
+ responseData = responseData.toString(responseEncoding);
+ if (!responseEncoding || responseEncoding === 'utf8') {
+ responseData = utils$1.stripBOM(responseData);
+ }
+ }
+ response.data = responseData;
+ } catch (err) {
+ return reject(AxiosError.from(err, null, config, response.request, response));
+ }
+ settle(resolve, reject, response);
+ });
+ }
+
+ emitter.once('abort', err => {
+ if (!responseStream.destroyed) {
+ responseStream.emit('error', err);
+ responseStream.destroy();
+ }
+ });
+ });
+
+ emitter.once('abort', err => {
+ reject(err);
+ req.destroy(err);
+ });
+
+ // Handle errors
+ req.on('error', function handleRequestError(err) {
+ // @todo remove
+ // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;
+ reject(AxiosError.from(err, null, config, req));
+ });
+
+ // set tcp keep alive to prevent drop connection by peer
+ req.on('socket', function handleRequestSocket(socket) {
+ // default interval of sending ack packet is 1 minute
+ socket.setKeepAlive(true, 1000 * 60);
+ });
+
+ // Handle request timeout
+ if (config.timeout) {
+ // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
+ const timeout = parseInt(config.timeout, 10);
+
+ if (Number.isNaN(timeout)) {
+ reject(new AxiosError(
+ 'error trying to parse `config.timeout` to int',
+ AxiosError.ERR_BAD_OPTION_VALUE,
+ config,
+ req
+ ));
+
+ return;
+ }
+
+ // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
+ // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
+ // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
+ // And then these socket which be hang up will devouring CPU little by little.
+ // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
+ req.setTimeout(timeout, function handleRequestTimeout() {
+ if (isDone) return;
+ let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = config.transitional || transitionalDefaults;
+ if (config.timeoutErrorMessage) {
+ timeoutErrorMessage = config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
+ config,
+ req
+ ));
+ abort();
+ });
+ }
+
+
+ // Send the request
+ if (utils$1.isStream(data)) {
+ let ended = false;
+ let errored = false;
+
+ data.on('end', () => {
+ ended = true;
+ });
+
+ data.once('error', err => {
+ errored = true;
+ req.destroy(err);
+ });
+
+ data.on('close', () => {
+ if (!ended && !errored) {
+ abort(new CanceledError('Request stream has been aborted', config, req));
+ }
+ });
+
+ data.pipe(req);
+ } else {
+ req.end(data);
+ }
+ });
+};
+
+const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
+ url = new URL(url, platform.origin);
+
+ return (
+ origin.protocol === url.protocol &&
+ origin.host === url.host &&
+ (isMSIE || origin.port === url.port)
+ );
+})(
+ new URL(platform.origin),
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
+) : () => true;
+
+const cookies = platform.hasStandardBrowserEnv ?
+
+ // Standard browser envs support document.cookie
+ {
+ write(name, value, expires, path, domain, secure) {
+ const cookie = [name + '=' + encodeURIComponent(value)];
+
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
+
+ utils$1.isString(path) && cookie.push('path=' + path);
+
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
+
+ secure === true && cookie.push('secure');
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read(name) {
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ }
+
+ :
+
+ // Non-standard browser env (web workers, react-native) lack needed support.
+ {
+ write() {},
+ read() {
+ return null;
+ },
+ remove() {}
+ };
+
+const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
+
+/**
+ * Config-specific merge-function which creates a new config-object
+ * by merging two configuration objects together.
+ *
+ * @param {Object} config1
+ * @param {Object} config2
+ *
+ * @returns {Object} New object resulting from merging config2 to config1
+ */
+function mergeConfig(config1, config2) {
+ // eslint-disable-next-line no-param-reassign
+ config2 = config2 || {};
+ const config = {};
+
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
+ return utils$1.merge.call({caseless}, target, source);
+ } else if (utils$1.isPlainObject(source)) {
+ return utils$1.merge({}, source);
+ } else if (utils$1.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDeepProperties(a, b, prop , caseless) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(a, b, prop , caseless);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a, prop , caseless);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function valueFromConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function defaultToConfig2(a, b) {
+ if (!utils$1.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ } else if (!utils$1.isUndefined(a)) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) {
+ return getMergedValue(a, b);
+ } else if (prop in config1) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ const mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
+ };
+
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ const merge = mergeMap[prop] || mergeDeepProperties;
+ const configValue = merge(config1[prop], config2[prop], prop);
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
+ });
+
+ return config;
+}
+
+const resolveConfig = (config) => {
+ const newConfig = mergeConfig({}, config);
+
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
+
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
+
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+
+ // HTTP basic authentication
+ if (auth) {
+ headers.set('Authorization', 'Basic ' +
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
+ );
+ }
+
+ let contentType;
+
+ if (utils$1.isFormData(data)) {
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+ headers.setContentType(undefined); // Let the browser set it
+ } else if ((contentType = headers.getContentType()) !== false) {
+ // fix semicolon duplication issue for ReactNative FormData implementation
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
+ }
+ }
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+
+ if (platform.hasStandardBrowserEnv) {
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
+ // Add xsrf header
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+
+ if (xsrfValue) {
+ headers.set(xsrfHeaderName, xsrfValue);
+ }
+ }
+ }
+
+ return newConfig;
+};
+
+const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+
+const xhrAdapter = isXHRAdapterSupported && function (config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ const _config = resolveConfig(config);
+ let requestData = _config.data;
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
+ let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
+
+ function done() {
+ flushUpload && flushUpload(); // flush events
+ flushDownload && flushDownload(); // flush events
+
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+ }
+
+ let request = new XMLHttpRequest();
+
+ request.open(_config.method.toUpperCase(), _config.url, true);
+
+ // Set the request timeout in MS
+ request.timeout = _config.timeout;
+
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ // Prepare the response
+ const responseHeaders = AxiosHeaders$1.from(
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
+ );
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
+ request.responseText : request.response;
+ const response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ };
+
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, response);
+
+ // Clean up request
+ request = null;
+ }
+
+ if ('onloadend' in request) {
+ // Use onloadend if available
+ request.onloadend = onloadend;
+ } else {
+ // Listen for ready state to emulate onloadend
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+ // readystate handler is calling before onerror or ontimeout handlers,
+ // so we should call onloadend on the next 'tick'
+ setTimeout(onloadend);
+ };
+ }
+
+ // Handle browser request cancellation (as opposed to a manual cancellation)
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = _config.transitional || transitionalDefaults;
+ if (_config.timeoutErrorMessage) {
+ timeoutErrorMessage = _config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
+ config,
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Remove Content-Type if data is undefined
+ requestData === undefined && requestHeaders.setContentType(null);
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (!utils$1.isUndefined(_config.withCredentials)) {
+ request.withCredentials = !!_config.withCredentials;
+ }
+
+ // Add responseType to request if needed
+ if (responseType && responseType !== 'json') {
+ request.responseType = _config.responseType;
+ }
+
+ // Handle progress if needed
+ if (onDownloadProgress) {
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
+ request.addEventListener('progress', downloadThrottled);
+ }
+
+ // Not all browsers support upload events
+ if (onUploadProgress && request.upload) {
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
+
+ request.upload.addEventListener('progress', uploadThrottled);
+
+ request.upload.addEventListener('loadend', flushUpload);
+ }
+
+ if (_config.cancelToken || _config.signal) {
+ // Handle cancellation
+ // eslint-disable-next-line func-names
+ onCanceled = cancel => {
+ if (!request) {
+ return;
+ }
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) {
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
+ }
+ }
+
+ const protocol = parseProtocol(_config.url);
+
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
+ return;
+ }
+
+
+ // Send the request
+ request.send(requestData || null);
+ });
+};
+
+const composeSignals = (signals, timeout) => {
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
+
+ if (timeout || length) {
+ let controller = new AbortController();
+
+ let aborted;
+
+ const onabort = function (reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
+ }
+ };
+
+ let timer = timeout && setTimeout(() => {
+ timer = null;
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
+ }, timeout);
+
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach(signal => {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+ });
+ signals = null;
+ }
+ };
+
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
+
+ const {signal} = controller;
+
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
+
+ return signal;
+ }
+};
+
+const composeSignals$1 = composeSignals;
+
+const streamChunk = function* (chunk, chunkSize) {
+ let len = chunk.byteLength;
+
+ if (!chunkSize || len < chunkSize) {
+ yield chunk;
+ return;
+ }
+
+ let pos = 0;
+ let end;
+
+ while (pos < len) {
+ end = pos + chunkSize;
+ yield chunk.slice(pos, end);
+ pos = end;
+ }
+};
+
+const readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) {
+ yield* streamChunk(chunk, chunkSize);
+ }
+};
+
+const readStream = async function* (stream) {
+ if (stream[Symbol.asyncIterator]) {
+ yield* stream;
+ return;
+ }
+
+ const reader = stream.getReader();
+ try {
+ for (;;) {
+ const {done, value} = await reader.read();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ } finally {
+ await reader.cancel();
+ }
+};
+
+const trackStream = (stream, chunkSize, onProgress, onFinish) => {
+ const iterator = readBytes(stream, chunkSize);
+
+ let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ };
+
+ return new ReadableStream({
+ async pull(controller) {
+ try {
+ const {done, value} = await iterator.next();
+
+ if (done) {
+ _onFinish();
+ controller.close();
+ return;
+ }
+
+ let len = value.byteLength;
+ if (onProgress) {
+ let loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
+ }
+ },
+ cancel(reason) {
+ _onFinish(reason);
+ return iterator.return();
+ }
+ }, {
+ highWaterMark: 2
+ })
+};
+
+const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
+const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
+
+// used only inside the fetch adapter
+const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
+);
+
+const test = (fn, ...args) => {
+ try {
+ return !!fn(...args);
+ } catch (e) {
+ return false
+ }
+};
+
+const supportsRequestStream = isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+
+ const hasContentType = new Request(platform.origin, {
+ body: new ReadableStream(),
+ method: 'POST',
+ get duplex() {
+ duplexAccessed = true;
+ return 'half';
+ },
+ }).headers.has('Content-Type');
+
+ return duplexAccessed && !hasContentType;
+});
+
+const DEFAULT_CHUNK_SIZE = 64 * 1024;
+
+const supportsResponseStream = isReadableStreamSupported &&
+ test(() => utils$1.isReadableStream(new Response('').body));
+
+
+const resolvers = {
+ stream: supportsResponseStream && ((res) => res.body)
+};
+
+isFetchSupported && (((res) => {
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
+ (_, config) => {
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
+ });
+ });
+})(new Response));
+
+const getBodyLength = async (body) => {
+ if (body == null) {
+ return 0;
+ }
+
+ if(utils$1.isBlob(body)) {
+ return body.size;
+ }
+
+ if(utils$1.isSpecCompliantForm(body)) {
+ const _request = new Request(platform.origin, {
+ method: 'POST',
+ body,
+ });
+ return (await _request.arrayBuffer()).byteLength;
+ }
+
+ if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
+ return body.byteLength;
+ }
+
+ if(utils$1.isURLSearchParams(body)) {
+ body = body + '';
+ }
+
+ if(utils$1.isString(body)) {
+ return (await encodeText(body)).byteLength;
+ }
+};
+
+const resolveBodyLength = async (headers, body) => {
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
+
+ return length == null ? getBodyLength(body) : length;
+};
+
+const fetchAdapter = isFetchSupported && (async (config) => {
+ let {
+ url,
+ method,
+ data,
+ signal,
+ cancelToken,
+ timeout,
+ onDownloadProgress,
+ onUploadProgress,
+ responseType,
+ headers,
+ withCredentials = 'same-origin',
+ fetchOptions
+ } = resolveConfig(config);
+
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+
+ let request;
+
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+
+ let requestContentLength;
+
+ try {
+ if (
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
+ ) {
+ let _request = new Request(url, {
+ method: 'POST',
+ body: data,
+ duplex: "half"
+ });
+
+ let contentTypeHeader;
+
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+ headers.setContentType(contentTypeHeader);
+ }
+
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(
+ requestContentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress))
+ );
+
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ }
+
+ if (!utils$1.isString(withCredentials)) {
+ withCredentials = withCredentials ? 'include' : 'omit';
+ }
+
+ // Cloudflare Workers throws when credentials are defined
+ // see https://github.com/cloudflare/workerd/issues/902
+ const isCredentialsSupported = "credentials" in Request.prototype;
+ request = new Request(url, {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ });
+
+ let response = await fetch(request);
+
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
+ const options = {};
+
+ ['status', 'statusText', 'headers'].forEach(prop => {
+ options[prop] = response[prop];
+ });
+
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
+
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
+ responseContentLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
+ ) || [];
+
+ response = new Response(
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }),
+ options
+ );
+ }
+
+ responseType = responseType || 'text';
+
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
+
+ !isStreamResponse && unsubscribe && unsubscribe();
+
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders$1.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ });
+ })
+ } catch (err) {
+ unsubscribe && unsubscribe();
+
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
+ throw Object.assign(
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
+ {
+ cause: err.cause || err
+ }
+ )
+ }
+
+ throw AxiosError.from(err, err && err.code, config, request);
+ }
+});
+
+const knownAdapters = {
+ http: httpAdapter,
+ xhr: xhrAdapter,
+ fetch: fetchAdapter
+};
+
+utils$1.forEach(knownAdapters, (fn, value) => {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, 'name', {value});
+ } catch (e) {
+ // eslint-disable-next-line no-empty
+ }
+ Object.defineProperty(fn, 'adapterName', {value});
+ }
+});
+
+const renderReason = (reason) => `- ${reason}`;
+
+const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
+
+const adapters = {
+ getAdapter: (adapters) => {
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
+
+ const {length} = adapters;
+ let nameOrAdapter;
+ let adapter;
+
+ const rejectedReasons = {};
+
+ for (let i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ let id;
+
+ adapter = nameOrAdapter;
+
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+
+ if (adapter === undefined) {
+ throw new AxiosError(`Unknown adapter '${id}'`);
+ }
+ }
+
+ if (adapter) {
+ break;
+ }
+
+ rejectedReasons[id || '#' + i] = adapter;
+ }
+
+ if (!adapter) {
+
+ const reasons = Object.entries(rejectedReasons)
+ .map(([id, state]) => `adapter ${id} ` +
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
+ );
+
+ let s = length ?
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
+ 'as no adapter specified';
+
+ throw new AxiosError(
+ `There is no suitable adapter to dispatch the request ` + s,
+ 'ERR_NOT_SUPPORT'
+ );
+ }
+
+ return adapter;
+ },
+ adapters: knownAdapters
+};
+
+/**
+ * Throws a `CanceledError` if cancellation has been requested.
+ *
+ * @param {Object} config The config that is to be used for the request
+ *
+ * @returns {void}
+ */
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+
+ if (config.signal && config.signal.aborted) {
+ throw new CanceledError(null, config);
+ }
+}
+
+/**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ config.headers = AxiosHeaders$1.from(config.headers);
+
+ // Transform request data
+ config.data = transformData.call(
+ config,
+ config.transformRequest
+ );
+
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
+ }
+
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData.call(
+ config,
+ config.transformResponse,
+ response
+ );
+
+ response.headers = AxiosHeaders$1.from(response.headers);
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(
+ config,
+ config.transformResponse,
+ reason.response
+ );
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+}
+
+const validators$1 = {};
+
+// eslint-disable-next-line func-names
+['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
+ validators$1[type] = function validator(thing) {
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+ };
+});
+
+const deprecatedWarnings = {};
+
+/**
+ * Transitional option validator
+ *
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
+ * @param {string?} version - deprecated version / removed since version
+ * @param {string?} message - some message with additional info
+ *
+ * @returns {function}
+ */
+validators$1.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+ }
+
+ // eslint-disable-next-line func-names
+ return (value, opt, opts) => {
+ if (validator === false) {
+ throw new AxiosError(
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
+ AxiosError.ERR_DEPRECATED
+ );
+ }
+
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ // eslint-disable-next-line no-console
+ console.warn(
+ formatMessage(
+ opt,
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
+ )
+ );
+ }
+
+ return validator ? validator(value, opt, opts) : true;
+ };
+};
+
+validators$1.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ // eslint-disable-next-line no-console
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ }
+};
+
+/**
+ * Assert object's properties type
+ *
+ * @param {object} options
+ * @param {object} schema
+ * @param {boolean?} allowUnknown
+ *
+ * @returns {object}
+ */
+
+function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== 'object') {
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ const keys = Object.keys(options);
+ let i = keys.length;
+ while (i-- > 0) {
+ const opt = keys[i];
+ const validator = schema[opt];
+ if (validator) {
+ const value = options[opt];
+ const result = value === undefined || validator(value, opt, options);
+ if (result !== true) {
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
+ }
+ }
+}
+
+const validator = {
+ assertOptions,
+ validators: validators$1
+};
+
+const validators = validator.validators;
+
+/**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ *
+ * @return {Axios} A new instance of Axios
+ */
+class Axios {
+ constructor(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager$1(),
+ response: new InterceptorManager$1()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ async request(configOrUrl, config) {
+ try {
+ return await this._request(configOrUrl, config);
+ } catch (err) {
+ if (err instanceof Error) {
+ let dummy = {};
+
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
+
+ // slice off the Error: ... line
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+ try {
+ if (!err.stack) {
+ err.stack = stack;
+ // match without the 2 top stack lines
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+ err.stack += '\n' + stack;
+ }
+ } catch (e) {
+ // ignore the case where "stack" is an un-writable property
+ }
+ }
+
+ throw err;
+ }
+ }
+
+ _request(configOrUrl, config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof configOrUrl === 'string') {
+ config = config || {};
+ config.url = configOrUrl;
+ } else {
+ config = configOrUrl || {};
+ }
+
+ config = mergeConfig(this.defaults, config);
+
+ const {transitional, paramsSerializer, headers} = config;
+
+ if (transitional !== undefined) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean),
+ forcedJSONParsing: validators.transitional(validators.boolean),
+ clarifyTimeoutError: validators.transitional(validators.boolean)
+ }, false);
+ }
+
+ if (paramsSerializer != null) {
+ if (utils$1.isFunction(paramsSerializer)) {
+ config.paramsSerializer = {
+ serialize: paramsSerializer
+ };
+ } else {
+ validator.assertOptions(paramsSerializer, {
+ encode: validators.function,
+ serialize: validators.function
+ }, true);
+ }
+ }
+
+ validator.assertOptions(config, {
+ baseUrl: validators.spelling('baseURL'),
+ withXsrfToken: validators.spelling('withXSRFToken')
+ }, true);
+
+ // Set config.method
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+ // Flatten headers
+ let contextHeaders = headers && utils$1.merge(
+ headers.common,
+ headers[config.method]
+ );
+
+ headers && utils$1.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ (method) => {
+ delete headers[method];
+ }
+ );
+
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
+
+ // filter out skipped interceptors
+ const requestInterceptorChain = [];
+ let synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
+ return;
+ }
+
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ const responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ let promise;
+ let i = 0;
+ let len;
+
+ if (!synchronousRequestInterceptors) {
+ const chain = [dispatchRequest.bind(this), undefined];
+ chain.unshift.apply(chain, requestInterceptorChain);
+ chain.push.apply(chain, responseInterceptorChain);
+ len = chain.length;
+
+ promise = Promise.resolve(config);
+
+ while (i < len) {
+ promise = promise.then(chain[i++], chain[i++]);
+ }
+
+ return promise;
+ }
+
+ len = requestInterceptorChain.length;
+
+ let newConfig = config;
+
+ i = 0;
+
+ while (i < len) {
+ const onFulfilled = requestInterceptorChain[i++];
+ const onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
+ }
+ }
+
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+
+ i = 0;
+ len = responseInterceptorChain.length;
+
+ while (i < len) {
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ }
+
+ return promise;
+ }
+
+ getUri(config) {
+ config = mergeConfig(this.defaults, config);
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ return buildURL(fullPath, config.params, config.paramsSerializer);
+ }
+}
+
+// Provide aliases for supported request methods
+utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+});
+
+utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ headers: isForm ? {
+ 'Content-Type': 'multipart/form-data'
+ } : {},
+ url,
+ data
+ }));
+ };
+ }
+
+ Axios.prototype[method] = generateHTTPMethod();
+
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
+});
+
+const Axios$1 = Axios;
+
+/**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @param {Function} executor The executor function.
+ *
+ * @returns {CancelToken}
+ */
+class CancelToken {
+ constructor(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ let resolvePromise;
+
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ const token = this;
+
+ // eslint-disable-next-line func-names
+ this.promise.then(cancel => {
+ if (!token._listeners) return;
+
+ let i = token._listeners.length;
+
+ while (i-- > 0) {
+ token._listeners[i](cancel);
+ }
+ token._listeners = null;
+ });
+
+ // eslint-disable-next-line func-names
+ this.promise.then = onfulfilled => {
+ let _resolve;
+ // eslint-disable-next-line func-names
+ const promise = new Promise(resolve => {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+
+ return promise;
+ };
+
+ executor(function cancel(message, config, request) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new CanceledError(message, config, request);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ */
+ throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ }
+
+ /**
+ * Subscribe to the cancel signal
+ */
+
+ subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
+ }
+
+ if (this._listeners) {
+ this._listeners.push(listener);
+ } else {
+ this._listeners = [listener];
+ }
+ }
+
+ /**
+ * Unsubscribe from the cancel signal
+ */
+
+ unsubscribe(listener) {
+ if (!this._listeners) {
+ return;
+ }
+ const index = this._listeners.indexOf(listener);
+ if (index !== -1) {
+ this._listeners.splice(index, 1);
+ }
+ }
+
+ toAbortSignal() {
+ const controller = new AbortController();
+
+ const abort = (err) => {
+ controller.abort(err);
+ };
+
+ this.subscribe(abort);
+
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+
+ return controller.signal;
+ }
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ static source() {
+ let cancel;
+ const token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token,
+ cancel
+ };
+ }
+}
+
+const CancelToken$1 = CancelToken;
+
+/**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ *
+ * @returns {Function}
+ */
+function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+}
+
+/**
+ * Determines whether the payload is an error thrown by Axios
+ *
+ * @param {*} payload The value to test
+ *
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
+ */
+function isAxiosError(payload) {
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
+}
+
+const HttpStatusCode = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511,
+};
+
+Object.entries(HttpStatusCode).forEach(([key, value]) => {
+ HttpStatusCode[value] = key;
+});
+
+const HttpStatusCode$1 = HttpStatusCode;
+
+/**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ *
+ * @returns {Axios} A new instance of Axios
+ */
+function createInstance(defaultConfig) {
+ const context = new Axios$1(defaultConfig);
+ const instance = bind(Axios$1.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
+
+ // Copy context to instance
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
+
+ // Factory for creating new instances
+ instance.create = function create(instanceConfig) {
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
+ };
+
+ return instance;
+}
+
+// Create the default instance to be exported
+const axios = createInstance(defaults$1);
+
+// Expose Axios class to allow class inheritance
+axios.Axios = Axios$1;
+
+// Expose Cancel & CancelToken
+axios.CanceledError = CanceledError;
+axios.CancelToken = CancelToken$1;
+axios.isCancel = isCancel;
+axios.VERSION = VERSION;
+axios.toFormData = toFormData;
+
+// Expose AxiosError class
+axios.AxiosError = AxiosError;
+
+// alias for CanceledError for backward compatibility
+axios.Cancel = axios.CanceledError;
+
+// Expose all/spread
+axios.all = function all(promises) {
+ return Promise.all(promises);
+};
+
+axios.spread = spread;
+
+// Expose isAxiosError
+axios.isAxiosError = isAxiosError;
+
+// Expose mergeConfig
+axios.mergeConfig = mergeConfig;
+
+axios.AxiosHeaders = AxiosHeaders$1;
+
+axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
+
+axios.getAdapter = adapters.getAdapter;
+
+axios.HttpStatusCode = HttpStatusCode$1;
+
+axios.default = axios;
+
+module.exports = axios;
+//# sourceMappingURL=axios.cjs.map
diff --git a/node_modules/axios/index.d.cts b/node_modules/axios/index.d.cts
new file mode 100644
index 0000000..d513617
--- /dev/null
+++ b/node_modules/axios/index.d.cts
@@ -0,0 +1,549 @@
+interface RawAxiosHeaders {
+ [key: string]: axios.AxiosHeaderValue;
+}
+
+type MethodsHeaders = Partial<{
+ [Key in axios.Method as Lowercase]: AxiosHeaders;
+} & {common: AxiosHeaders}>;
+
+type AxiosHeaderMatcher = (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean;
+
+type AxiosHeaderParser = (this: AxiosHeaders, value: axios.AxiosHeaderValue, header: string) => any;
+
+type CommonRequestHeadersList = 'Accept' | 'Content-Length' | 'User-Agent'| 'Content-Encoding' | 'Authorization';
+
+type ContentType = axios.AxiosHeaderValue | 'text/html' | 'text/plain' | 'multipart/form-data' | 'application/json' | 'application/x-www-form-urlencoded' | 'application/octet-stream';
+
+type CommonResponseHeadersList = 'Server' | 'Content-Type' | 'Content-Length' | 'Cache-Control'| 'Content-Encoding';
+
+declare class AxiosHeaders {
+ constructor(
+ headers?: RawAxiosHeaders | AxiosHeaders | string
+ );
+
+ [key: string]: any;
+
+ set(headerName?: string, value?: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
+
+ get(headerName: string, parser: RegExp): RegExpExecArray | null;
+ get(headerName: string, matcher?: true | AxiosHeaderParser): axios.AxiosHeaderValue;
+
+ has(header: string, matcher?: AxiosHeaderMatcher): boolean;
+
+ delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean;
+
+ clear(matcher?: AxiosHeaderMatcher): boolean;
+
+ normalize(format: boolean): AxiosHeaders;
+
+ concat(...targets: Array): AxiosHeaders;
+
+ toJSON(asStrings?: boolean): RawAxiosHeaders;
+
+ static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
+
+ static accessor(header: string | string[]): AxiosHeaders;
+
+ static concat(...targets: Array): AxiosHeaders;
+
+ setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getContentType(parser?: RegExp): RegExpExecArray | null;
+ getContentType(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasContentType(matcher?: AxiosHeaderMatcher): boolean;
+
+ setContentLength(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getContentLength(parser?: RegExp): RegExpExecArray | null;
+ getContentLength(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
+
+ setAccept(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getAccept(parser?: RegExp): RegExpExecArray | null;
+ getAccept(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasAccept(matcher?: AxiosHeaderMatcher): boolean;
+
+ setUserAgent(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getUserAgent(parser?: RegExp): RegExpExecArray | null;
+ getUserAgent(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
+
+ setContentEncoding(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getContentEncoding(parser?: RegExp): RegExpExecArray | null;
+ getContentEncoding(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
+
+ setAuthorization(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
+ getAuthorization(parser?: RegExp): RegExpExecArray | null;
+ getAuthorization(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue;
+ hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
+
+ [Symbol.iterator](): IterableIterator<[string, axios.AxiosHeaderValue]>;
+}
+
+declare class AxiosError extends Error {
+ constructor(
+ message?: string,
+ code?: string,
+ config?: axios.InternalAxiosRequestConfig,
+ request?: any,
+ response?: axios.AxiosResponse
+ );
+
+ config?: axios.InternalAxiosRequestConfig;
+ code?: string;
+ request?: any;
+ response?: axios.AxiosResponse;
+ isAxiosError: boolean;
+ status?: number;
+ toJSON: () => object;
+ cause?: Error;
+ static readonly ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
+ static readonly ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
+ static readonly ERR_BAD_OPTION = "ERR_BAD_OPTION";
+ static readonly ERR_NETWORK = "ERR_NETWORK";
+ static readonly ERR_DEPRECATED = "ERR_DEPRECATED";
+ static readonly ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
+ static readonly ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
+ static readonly ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
+ static readonly ERR_INVALID_URL = "ERR_INVALID_URL";
+ static readonly ERR_CANCELED = "ERR_CANCELED";
+ static readonly ECONNABORTED = "ECONNABORTED";
+ static readonly ETIMEDOUT = "ETIMEDOUT";
+}
+
+declare class CanceledError extends AxiosError {
+}
+
+declare class Axios {
+ constructor(config?: axios.AxiosRequestConfig);
+ defaults: axios.AxiosDefaults;
+ interceptors: {
+ request: axios.AxiosInterceptorManager;
+ response: axios.AxiosInterceptorManager;
+ };
+ getUri(config?: axios.AxiosRequestConfig): string;
+ request, D = any>(config: axios.AxiosRequestConfig): Promise;
+ get, D = any>(url: string, config?: axios.AxiosRequestConfig): Promise;
+ delete, D = any>(url: string, config?: axios.AxiosRequestConfig): Promise;
+ head, D = any>(url: string, config?: axios.AxiosRequestConfig): Promise;
+ options, D = any>(url: string, config?: axios.AxiosRequestConfig): Promise;
+ post, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+ put, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+ patch, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+ postForm, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+ putForm, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+ patchForm, D = any>(url: string, data?: D, config?: axios.AxiosRequestConfig): Promise;
+}
+
+declare enum HttpStatusCode {
+ Continue = 100,
+ SwitchingProtocols = 101,
+ Processing = 102,
+ EarlyHints = 103,
+ Ok = 200,
+ Created = 201,
+ Accepted = 202,
+ NonAuthoritativeInformation = 203,
+ NoContent = 204,
+ ResetContent = 205,
+ PartialContent = 206,
+ MultiStatus = 207,
+ AlreadyReported = 208,
+ ImUsed = 226,
+ MultipleChoices = 300,
+ MovedPermanently = 301,
+ Found = 302,
+ SeeOther = 303,
+ NotModified = 304,
+ UseProxy = 305,
+ Unused = 306,
+ TemporaryRedirect = 307,
+ PermanentRedirect = 308,
+ BadRequest = 400,
+ Unauthorized = 401,
+ PaymentRequired = 402,
+ Forbidden = 403,
+ NotFound = 404,
+ MethodNotAllowed = 405,
+ NotAcceptable = 406,
+ ProxyAuthenticationRequired = 407,
+ RequestTimeout = 408,
+ Conflict = 409,
+ Gone = 410,
+ LengthRequired = 411,
+ PreconditionFailed = 412,
+ PayloadTooLarge = 413,
+ UriTooLong = 414,
+ UnsupportedMediaType = 415,
+ RangeNotSatisfiable = 416,
+ ExpectationFailed = 417,
+ ImATeapot = 418,
+ MisdirectedRequest = 421,
+ UnprocessableEntity = 422,
+ Locked = 423,
+ FailedDependency = 424,
+ TooEarly = 425,
+ UpgradeRequired = 426,
+ PreconditionRequired = 428,
+ TooManyRequests = 429,
+ RequestHeaderFieldsTooLarge = 431,
+ UnavailableForLegalReasons = 451,
+ InternalServerError = 500,
+ NotImplemented = 501,
+ BadGateway = 502,
+ ServiceUnavailable = 503,
+ GatewayTimeout = 504,
+ HttpVersionNotSupported = 505,
+ VariantAlsoNegotiates = 506,
+ InsufficientStorage = 507,
+ LoopDetected = 508,
+ NotExtended = 510,
+ NetworkAuthenticationRequired = 511,
+}
+
+type InternalAxiosError = AxiosError;
+
+declare namespace axios {
+ type AxiosError = InternalAxiosError;
+
+ type RawAxiosRequestHeaders = Partial;
+
+ type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders;
+
+ type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
+
+ type RawCommonResponseHeaders = {
+ [Key in CommonResponseHeadersList]: AxiosHeaderValue;
+ } & {
+ "set-cookie": string[];
+ };
+
+ type RawAxiosResponseHeaders = Partial;
+
+ type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders;
+
+ interface AxiosRequestTransformer {
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any;
+ }
+
+ interface AxiosResponseTransformer {
+ (this: InternalAxiosRequestConfig, data: any, headers: AxiosResponseHeaders, status?: number): any;
+ }
+
+ interface AxiosAdapter {
+ (config: InternalAxiosRequestConfig): AxiosPromise;
+ }
+
+ interface AxiosBasicCredentials {
+ username: string;
+ password: string;
+ }
+
+ interface AxiosProxyConfig {
+ host: string;
+ port: number;
+ auth?: AxiosBasicCredentials;
+ protocol?: string;
+ }
+
+ type Method =
+ | 'get' | 'GET'
+ | 'delete' | 'DELETE'
+ | 'head' | 'HEAD'
+ | 'options' | 'OPTIONS'
+ | 'post' | 'POST'
+ | 'put' | 'PUT'
+ | 'patch' | 'PATCH'
+ | 'purge' | 'PURGE'
+ | 'link' | 'LINK'
+ | 'unlink' | 'UNLINK';
+
+ type ResponseType =
+ | 'arraybuffer'
+ | 'blob'
+ | 'document'
+ | 'json'
+ | 'text'
+ | 'stream'
+ | 'formdata';
+
+ type responseEncoding =
+ | 'ascii' | 'ASCII'
+ | 'ansi' | 'ANSI'
+ | 'binary' | 'BINARY'
+ | 'base64' | 'BASE64'
+ | 'base64url' | 'BASE64URL'
+ | 'hex' | 'HEX'
+ | 'latin1' | 'LATIN1'
+ | 'ucs-2' | 'UCS-2'
+ | 'ucs2' | 'UCS2'
+ | 'utf-8' | 'UTF-8'
+ | 'utf8' | 'UTF8'
+ | 'utf16le' | 'UTF16LE';
+
+ interface TransitionalOptions {
+ silentJSONParsing?: boolean;
+ forcedJSONParsing?: boolean;
+ clarifyTimeoutError?: boolean;
+ }
+
+ interface GenericAbortSignal {
+ readonly aborted: boolean;
+ onabort?: ((...args: any) => any) | null;
+ addEventListener?: (...args: any) => any;
+ removeEventListener?: (...args: any) => any;
+ }
+
+ interface FormDataVisitorHelpers {
+ defaultVisitor: SerializerVisitor;
+ convertValue: (value: any) => any;
+ isVisitable: (value: any) => boolean;
+ }
+
+ interface SerializerVisitor {
+ (
+ this: GenericFormData,
+ value: any,
+ key: string | number,
+ path: null | Array,
+ helpers: FormDataVisitorHelpers
+ ): boolean;
+ }
+
+ interface SerializerOptions {
+ visitor?: SerializerVisitor;
+ dots?: boolean;
+ metaTokens?: boolean;
+ indexes?: boolean | null;
+ }
+
+ // tslint:disable-next-line
+ interface FormSerializerOptions extends SerializerOptions {
+ }
+
+ interface ParamEncoder {
+ (value: any, defaultEncoder: (value: any) => any): any;
+ }
+
+ interface CustomParamsSerializer {
+ (params: Record, options?: ParamsSerializerOptions): string;
+ }
+
+ interface ParamsSerializerOptions extends SerializerOptions {
+ encode?: ParamEncoder;
+ serialize?: CustomParamsSerializer;
+ }
+
+ type MaxUploadRate = number;
+
+ type MaxDownloadRate = number;
+
+ type BrowserProgressEvent = any;
+
+ interface AxiosProgressEvent {
+ loaded: number;
+ total?: number;
+ progress?: number;
+ bytes: number;
+ rate?: number;
+ estimated?: number;
+ upload?: boolean;
+ download?: boolean;
+ event?: BrowserProgressEvent;
+ lengthComputable: boolean;
+ }
+
+ type Milliseconds = number;
+
+ type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | string;
+
+ type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName;
+
+ type AddressFamily = 4 | 6 | undefined;
+
+ interface LookupAddressEntry {
+ address: string;
+ family?: AddressFamily;
+ }
+
+ type LookupAddress = string | LookupAddressEntry;
+
+ interface AxiosRequestConfig {
+ url?: string;
+ method?: Method | string;
+ baseURL?: string;
+ transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
+ transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
+ headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
+ params?: any;
+ paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
+ data?: D;
+ timeout?: Milliseconds;
+ timeoutErrorMessage?: string;
+ withCredentials?: boolean;
+ adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
+ auth?: AxiosBasicCredentials;
+ responseType?: ResponseType;
+ responseEncoding?: responseEncoding | string;
+ xsrfCookieName?: string;
+ xsrfHeaderName?: string;
+ onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
+ onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
+ maxContentLength?: number;
+ validateStatus?: ((status: number) => boolean) | null;
+ maxBodyLength?: number;
+ maxRedirects?: number;
+ maxRate?: number | [MaxUploadRate, MaxDownloadRate];
+ beforeRedirect?: (options: Record, responseDetails: {headers: Record, statusCode: HttpStatusCode}) => void;
+ socketPath?: string | null;
+ transport?: any;
+ httpAgent?: any;
+ httpsAgent?: any;
+ proxy?: AxiosProxyConfig | false;
+ cancelToken?: CancelToken;
+ decompress?: boolean;
+ transitional?: TransitionalOptions;
+ signal?: GenericAbortSignal;
+ insecureHTTPParser?: boolean;
+ env?: {
+ FormData?: new (...args: any[]) => object;
+ };
+ formSerializer?: FormSerializerOptions;
+ family?: AddressFamily;
+ lookup?: ((hostname: string, options: object, cb: (err: Error | null, address: LookupAddress | LookupAddress[], family?: AddressFamily) => void) => void) |
+ ((hostname: string, options: object) => Promise<[address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress>);
+ withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
+ fetchOptions?: Record;
+ }
+
+ // Alias
+ type RawAxiosRequestConfig = AxiosRequestConfig;
+
+ interface InternalAxiosRequestConfig extends AxiosRequestConfig {
+ headers: AxiosRequestHeaders;
+ }
+
+ interface HeadersDefaults {
+ common: RawAxiosRequestHeaders;
+ delete: RawAxiosRequestHeaders;
+ get: RawAxiosRequestHeaders;
+ head: RawAxiosRequestHeaders;
+ post: RawAxiosRequestHeaders;
+ put: RawAxiosRequestHeaders;
+ patch: RawAxiosRequestHeaders;
+ options?: RawAxiosRequestHeaders;
+ purge?: RawAxiosRequestHeaders;
+ link?: RawAxiosRequestHeaders;
+ unlink?: RawAxiosRequestHeaders;
+ }
+
+ interface AxiosDefaults extends Omit, 'headers'> {
+ headers: HeadersDefaults;
+ }
+
+ interface CreateAxiosDefaults extends Omit, 'headers'> {
+ headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial;
+ }
+
+ interface AxiosResponse {
+ data: T;
+ status: number;
+ statusText: string;
+ headers: RawAxiosResponseHeaders | AxiosResponseHeaders;
+ config: InternalAxiosRequestConfig;
+ request?: any;
+ }
+
+ type AxiosPromise = Promise>;
+
+ interface CancelStatic {
+ new (message?: string): Cancel;
+ }
+
+ interface Cancel {
+ message: string | undefined;
+ }
+
+ interface Canceler {
+ (message?: string, config?: AxiosRequestConfig, request?: any): void;
+ }
+
+ interface CancelTokenStatic {
+ new (executor: (cancel: Canceler) => void): CancelToken;
+ source(): CancelTokenSource;
+ }
+
+ interface CancelToken {
+ promise: Promise;
+ reason?: Cancel;
+ throwIfRequested(): void;
+ }
+
+ interface CancelTokenSource {
+ token: CancelToken;
+ cancel: Canceler;
+ }
+
+ interface AxiosInterceptorOptions {
+ synchronous?: boolean;
+ runWhen?: (config: InternalAxiosRequestConfig) => boolean;
+ }
+
+ type AxiosRequestInterceptorUse = (onFulfilled?: ((value: T) => T | Promise) | null, onRejected?: ((error: any) => any) | null, options?: AxiosInterceptorOptions) => number;
+
+ type AxiosResponseInterceptorUse = (onFulfilled?: ((value: T) => T | Promise) | null, onRejected?: ((error: any) => any) | null) => number;
+
+ interface AxiosInterceptorManager {
+ use: V extends AxiosResponse ? AxiosResponseInterceptorUse : AxiosRequestInterceptorUse;
+ eject(id: number): void;
+ clear(): void;
+ }
+
+ interface AxiosInstance extends Axios {
+ , D = any>(config: AxiosRequestConfig): Promise;
+ , D = any>(url: string, config?: AxiosRequestConfig): Promise;
+
+ defaults: Omit & {
+ headers: HeadersDefaults & {
+ [key: string]: AxiosHeaderValue
+ }
+ };
+ }
+
+ interface GenericFormData {
+ append(name: string, value: any, options?: any): any;
+ }
+
+ interface GenericHTMLFormElement {
+ name: string;
+ method: string;
+ submit(): void;
+ }
+
+ interface AxiosStatic extends AxiosInstance {
+ create(config?: CreateAxiosDefaults): AxiosInstance;
+ Cancel: CancelStatic;
+ CancelToken: CancelTokenStatic;
+ Axios: typeof Axios;
+ AxiosError: typeof AxiosError;
+ CanceledError: typeof CanceledError;
+ HttpStatusCode: typeof HttpStatusCode;
+ readonly VERSION: string;
+ isCancel(value: any): value is Cancel;
+ all(values: Array>): Promise;
+ spread(callback: (...args: T[]) => R): (array: T[]) => R;
+ isAxiosError(payload: any): payload is AxiosError;
+ toFormData(sourceObj: object, targetFormData?: GenericFormData, options?: FormSerializerOptions): GenericFormData;
+ formToJSON(form: GenericFormData|GenericHTMLFormElement): object;
+ getAdapter(adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined): AxiosAdapter;
+ AxiosHeaders: typeof AxiosHeaders;
+ }
+}
+
+declare const axios: axios.AxiosStatic;
+
+export = axios;
diff --git a/node_modules/axios/index.js b/node_modules/axios/index.js
new file mode 100644
index 0000000..fba3990
--- /dev/null
+++ b/node_modules/axios/index.js
@@ -0,0 +1,43 @@
+import axios from './lib/axios.js';
+
+// This module is intended to unwrap Axios default export as named.
+// Keep top-level export same with static properties
+// so that it can keep same with es module or cjs
+const {
+ Axios,
+ AxiosError,
+ CanceledError,
+ isCancel,
+ CancelToken,
+ VERSION,
+ all,
+ Cancel,
+ isAxiosError,
+ spread,
+ toFormData,
+ AxiosHeaders,
+ HttpStatusCode,
+ formToJSON,
+ getAdapter,
+ mergeConfig
+} = axios;
+
+export {
+ axios as default,
+ Axios,
+ AxiosError,
+ CanceledError,
+ isCancel,
+ CancelToken,
+ VERSION,
+ all,
+ Cancel,
+ isAxiosError,
+ spread,
+ toFormData,
+ AxiosHeaders,
+ HttpStatusCode,
+ formToJSON,
+ getAdapter,
+ mergeConfig
+}
diff --git a/node_modules/axios/lib/adapters/README.md b/node_modules/axios/lib/adapters/README.md
new file mode 100644
index 0000000..68f1118
--- /dev/null
+++ b/node_modules/axios/lib/adapters/README.md
@@ -0,0 +1,37 @@
+# axios // adapters
+
+The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received.
+
+## Example
+
+```js
+var settle = require('./../core/settle');
+
+module.exports = function myAdapter(config) {
+ // At this point:
+ // - config has been merged with defaults
+ // - request transformers have already run
+ // - request interceptors have already run
+
+ // Make the request using config provided
+ // Upon response settle the Promise
+
+ return new Promise(function(resolve, reject) {
+
+ var response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config: config,
+ request: request
+ };
+
+ settle(resolve, reject, response);
+
+ // From here:
+ // - response transformers will run
+ // - response interceptors will run
+ });
+}
+```
diff --git a/node_modules/axios/lib/adapters/adapters.js b/node_modules/axios/lib/adapters/adapters.js
new file mode 100644
index 0000000..b466dd5
--- /dev/null
+++ b/node_modules/axios/lib/adapters/adapters.js
@@ -0,0 +1,79 @@
+import utils from '../utils.js';
+import httpAdapter from './http.js';
+import xhrAdapter from './xhr.js';
+import fetchAdapter from './fetch.js';
+import AxiosError from "../core/AxiosError.js";
+
+const knownAdapters = {
+ http: httpAdapter,
+ xhr: xhrAdapter,
+ fetch: fetchAdapter
+}
+
+utils.forEach(knownAdapters, (fn, value) => {
+ if (fn) {
+ try {
+ Object.defineProperty(fn, 'name', {value});
+ } catch (e) {
+ // eslint-disable-next-line no-empty
+ }
+ Object.defineProperty(fn, 'adapterName', {value});
+ }
+});
+
+const renderReason = (reason) => `- ${reason}`;
+
+const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
+
+export default {
+ getAdapter: (adapters) => {
+ adapters = utils.isArray(adapters) ? adapters : [adapters];
+
+ const {length} = adapters;
+ let nameOrAdapter;
+ let adapter;
+
+ const rejectedReasons = {};
+
+ for (let i = 0; i < length; i++) {
+ nameOrAdapter = adapters[i];
+ let id;
+
+ adapter = nameOrAdapter;
+
+ if (!isResolvedHandle(nameOrAdapter)) {
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+
+ if (adapter === undefined) {
+ throw new AxiosError(`Unknown adapter '${id}'`);
+ }
+ }
+
+ if (adapter) {
+ break;
+ }
+
+ rejectedReasons[id || '#' + i] = adapter;
+ }
+
+ if (!adapter) {
+
+ const reasons = Object.entries(rejectedReasons)
+ .map(([id, state]) => `adapter ${id} ` +
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
+ );
+
+ let s = length ?
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
+ 'as no adapter specified';
+
+ throw new AxiosError(
+ `There is no suitable adapter to dispatch the request ` + s,
+ 'ERR_NOT_SUPPORT'
+ );
+ }
+
+ return adapter;
+ },
+ adapters: knownAdapters
+}
diff --git a/node_modules/axios/lib/adapters/fetch.js b/node_modules/axios/lib/adapters/fetch.js
new file mode 100644
index 0000000..f871a05
--- /dev/null
+++ b/node_modules/axios/lib/adapters/fetch.js
@@ -0,0 +1,229 @@
+import platform from "../platform/index.js";
+import utils from "../utils.js";
+import AxiosError from "../core/AxiosError.js";
+import composeSignals from "../helpers/composeSignals.js";
+import {trackStream} from "../helpers/trackStream.js";
+import AxiosHeaders from "../core/AxiosHeaders.js";
+import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../helpers/progressEventReducer.js";
+import resolveConfig from "../helpers/resolveConfig.js";
+import settle from "../core/settle.js";
+
+const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
+const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
+
+// used only inside the fetch adapter
+const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
+);
+
+const test = (fn, ...args) => {
+ try {
+ return !!fn(...args);
+ } catch (e) {
+ return false
+ }
+}
+
+const supportsRequestStream = isReadableStreamSupported && test(() => {
+ let duplexAccessed = false;
+
+ const hasContentType = new Request(platform.origin, {
+ body: new ReadableStream(),
+ method: 'POST',
+ get duplex() {
+ duplexAccessed = true;
+ return 'half';
+ },
+ }).headers.has('Content-Type');
+
+ return duplexAccessed && !hasContentType;
+});
+
+const DEFAULT_CHUNK_SIZE = 64 * 1024;
+
+const supportsResponseStream = isReadableStreamSupported &&
+ test(() => utils.isReadableStream(new Response('').body));
+
+
+const resolvers = {
+ stream: supportsResponseStream && ((res) => res.body)
+};
+
+isFetchSupported && (((res) => {
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
+ !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :
+ (_, config) => {
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
+ })
+ });
+})(new Response));
+
+const getBodyLength = async (body) => {
+ if (body == null) {
+ return 0;
+ }
+
+ if(utils.isBlob(body)) {
+ return body.size;
+ }
+
+ if(utils.isSpecCompliantForm(body)) {
+ const _request = new Request(platform.origin, {
+ method: 'POST',
+ body,
+ });
+ return (await _request.arrayBuffer()).byteLength;
+ }
+
+ if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {
+ return body.byteLength;
+ }
+
+ if(utils.isURLSearchParams(body)) {
+ body = body + '';
+ }
+
+ if(utils.isString(body)) {
+ return (await encodeText(body)).byteLength;
+ }
+}
+
+const resolveBodyLength = async (headers, body) => {
+ const length = utils.toFiniteNumber(headers.getContentLength());
+
+ return length == null ? getBodyLength(body) : length;
+}
+
+export default isFetchSupported && (async (config) => {
+ let {
+ url,
+ method,
+ data,
+ signal,
+ cancelToken,
+ timeout,
+ onDownloadProgress,
+ onUploadProgress,
+ responseType,
+ headers,
+ withCredentials = 'same-origin',
+ fetchOptions
+ } = resolveConfig(config);
+
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+
+ let request;
+
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
+ composedSignal.unsubscribe();
+ });
+
+ let requestContentLength;
+
+ try {
+ if (
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
+ ) {
+ let _request = new Request(url, {
+ method: 'POST',
+ body: data,
+ duplex: "half"
+ });
+
+ let contentTypeHeader;
+
+ if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+ headers.setContentType(contentTypeHeader)
+ }
+
+ if (_request.body) {
+ const [onProgress, flush] = progressEventDecorator(
+ requestContentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress))
+ );
+
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+ }
+ }
+
+ if (!utils.isString(withCredentials)) {
+ withCredentials = withCredentials ? 'include' : 'omit';
+ }
+
+ // Cloudflare Workers throws when credentials are defined
+ // see https://github.com/cloudflare/workerd/issues/902
+ const isCredentialsSupported = "credentials" in Request.prototype;
+ request = new Request(url, {
+ ...fetchOptions,
+ signal: composedSignal,
+ method: method.toUpperCase(),
+ headers: headers.normalize().toJSON(),
+ body: data,
+ duplex: "half",
+ credentials: isCredentialsSupported ? withCredentials : undefined
+ });
+
+ let response = await fetch(request);
+
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
+ const options = {};
+
+ ['status', 'statusText', 'headers'].forEach(prop => {
+ options[prop] = response[prop];
+ });
+
+ const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));
+
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
+ responseContentLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
+ ) || [];
+
+ response = new Response(
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
+ flush && flush();
+ unsubscribe && unsubscribe();
+ }),
+ options
+ );
+ }
+
+ responseType = responseType || 'text';
+
+ let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);
+
+ !isStreamResponse && unsubscribe && unsubscribe();
+
+ return await new Promise((resolve, reject) => {
+ settle(resolve, reject, {
+ data: responseData,
+ headers: AxiosHeaders.from(response.headers),
+ status: response.status,
+ statusText: response.statusText,
+ config,
+ request
+ })
+ })
+ } catch (err) {
+ unsubscribe && unsubscribe();
+
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
+ throw Object.assign(
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
+ {
+ cause: err.cause || err
+ }
+ )
+ }
+
+ throw AxiosError.from(err, err && err.code, config, request);
+ }
+});
+
+
diff --git a/node_modules/axios/lib/adapters/http.js b/node_modules/axios/lib/adapters/http.js
new file mode 100644
index 0000000..da0a42d
--- /dev/null
+++ b/node_modules/axios/lib/adapters/http.js
@@ -0,0 +1,695 @@
+'use strict';
+
+import utils from './../utils.js';
+import settle from './../core/settle.js';
+import buildFullPath from '../core/buildFullPath.js';
+import buildURL from './../helpers/buildURL.js';
+import proxyFromEnv from 'proxy-from-env';
+import http from 'http';
+import https from 'https';
+import util from 'util';
+import followRedirects from 'follow-redirects';
+import zlib from 'zlib';
+import {VERSION} from '../env/data.js';
+import transitionalDefaults from '../defaults/transitional.js';
+import AxiosError from '../core/AxiosError.js';
+import CanceledError from '../cancel/CanceledError.js';
+import platform from '../platform/index.js';
+import fromDataURI from '../helpers/fromDataURI.js';
+import stream from 'stream';
+import AxiosHeaders from '../core/AxiosHeaders.js';
+import AxiosTransformStream from '../helpers/AxiosTransformStream.js';
+import {EventEmitter} from 'events';
+import formDataToStream from "../helpers/formDataToStream.js";
+import readBlob from "../helpers/readBlob.js";
+import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
+import callbackify from "../helpers/callbackify.js";
+import {progressEventReducer, progressEventDecorator, asyncDecorator} from "../helpers/progressEventReducer.js";
+
+const zlibOptions = {
+ flush: zlib.constants.Z_SYNC_FLUSH,
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
+};
+
+const brotliOptions = {
+ flush: zlib.constants.BROTLI_OPERATION_FLUSH,
+ finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
+}
+
+const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
+
+const {http: httpFollow, https: httpsFollow} = followRedirects;
+
+const isHttps = /https:?/;
+
+const supportedProtocols = platform.protocols.map(protocol => {
+ return protocol + ':';
+});
+
+const flushOnFinish = (stream, [throttled, flush]) => {
+ stream
+ .on('end', flush)
+ .on('error', flush);
+
+ return throttled;
+}
+
+/**
+ * If the proxy or config beforeRedirects functions are defined, call them with the options
+ * object.
+ *
+ * @param {Object} options - The options object that was passed to the request.
+ *
+ * @returns {Object}
+ */
+function dispatchBeforeRedirect(options, responseDetails) {
+ if (options.beforeRedirects.proxy) {
+ options.beforeRedirects.proxy(options);
+ }
+ if (options.beforeRedirects.config) {
+ options.beforeRedirects.config(options, responseDetails);
+ }
+}
+
+/**
+ * If the proxy or config afterRedirects functions are defined, call them with the options
+ *
+ * @param {http.ClientRequestArgs} options
+ * @param {AxiosProxyConfig} configProxy configuration from Axios options object
+ * @param {string} location
+ *
+ * @returns {http.ClientRequestArgs}
+ */
+function setProxy(options, configProxy, location) {
+ let proxy = configProxy;
+ if (!proxy && proxy !== false) {
+ const proxyUrl = proxyFromEnv.getProxyForUrl(location);
+ if (proxyUrl) {
+ proxy = new URL(proxyUrl);
+ }
+ }
+ if (proxy) {
+ // Basic proxy authorization
+ if (proxy.username) {
+ proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
+ }
+
+ if (proxy.auth) {
+ // Support proxy auth object form
+ if (proxy.auth.username || proxy.auth.password) {
+ proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');
+ }
+ const base64 = Buffer
+ .from(proxy.auth, 'utf8')
+ .toString('base64');
+ options.headers['Proxy-Authorization'] = 'Basic ' + base64;
+ }
+
+ options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
+ const proxyHost = proxy.hostname || proxy.host;
+ options.hostname = proxyHost;
+ // Replace 'host' since options is not a URL object
+ options.host = proxyHost;
+ options.port = proxy.port;
+ options.path = location;
+ if (proxy.protocol) {
+ options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
+ }
+ }
+
+ options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
+ // Configure proxy for redirected request, passing the original config proxy to apply
+ // the exact same logic as if the redirected request was performed by axios directly.
+ setProxy(redirectOptions, configProxy, redirectOptions.href);
+ };
+}
+
+const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
+
+// temporary hotfix
+
+const wrapAsync = (asyncExecutor) => {
+ return new Promise((resolve, reject) => {
+ let onDone;
+ let isDone;
+
+ const done = (value, isRejected) => {
+ if (isDone) return;
+ isDone = true;
+ onDone && onDone(value, isRejected);
+ }
+
+ const _resolve = (value) => {
+ done(value);
+ resolve(value);
+ };
+
+ const _reject = (reason) => {
+ done(reason, true);
+ reject(reason);
+ }
+
+ asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
+ })
+};
+
+const resolveFamily = ({address, family}) => {
+ if (!utils.isString(address)) {
+ throw TypeError('address must be a string');
+ }
+ return ({
+ address,
+ family: family || (address.indexOf('.') < 0 ? 6 : 4)
+ });
+}
+
+const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});
+
+/*eslint consistent-return:0*/
+export default isHttpAdapterSupported && function httpAdapter(config) {
+ return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
+ let {data, lookup, family} = config;
+ const {responseType, responseEncoding} = config;
+ const method = config.method.toUpperCase();
+ let isDone;
+ let rejected = false;
+ let req;
+
+ if (lookup) {
+ const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);
+ // hotfix to support opt.all option which is required for node 20.x
+ lookup = (hostname, opt, cb) => {
+ _lookup(hostname, opt, (err, arg0, arg1) => {
+ if (err) {
+ return cb(err);
+ }
+
+ const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
+
+ opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
+ });
+ }
+ }
+
+ // temporary internal emitter until the AxiosRequest class will be implemented
+ const emitter = new EventEmitter();
+
+ const onFinished = () => {
+ if (config.cancelToken) {
+ config.cancelToken.unsubscribe(abort);
+ }
+
+ if (config.signal) {
+ config.signal.removeEventListener('abort', abort);
+ }
+
+ emitter.removeAllListeners();
+ }
+
+ onDone((value, isRejected) => {
+ isDone = true;
+ if (isRejected) {
+ rejected = true;
+ onFinished();
+ }
+ });
+
+ function abort(reason) {
+ emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
+ }
+
+ emitter.once('abort', reject);
+
+ if (config.cancelToken || config.signal) {
+ config.cancelToken && config.cancelToken.subscribe(abort);
+ if (config.signal) {
+ config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
+ }
+ }
+
+ // Parse url
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
+ const protocol = parsed.protocol || supportedProtocols[0];
+
+ if (protocol === 'data:') {
+ let convertedData;
+
+ if (method !== 'GET') {
+ return settle(resolve, reject, {
+ status: 405,
+ statusText: 'method not allowed',
+ headers: {},
+ config
+ });
+ }
+
+ try {
+ convertedData = fromDataURI(config.url, responseType === 'blob', {
+ Blob: config.env && config.env.Blob
+ });
+ } catch (err) {
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
+ }
+
+ if (responseType === 'text') {
+ convertedData = convertedData.toString(responseEncoding);
+
+ if (!responseEncoding || responseEncoding === 'utf8') {
+ convertedData = utils.stripBOM(convertedData);
+ }
+ } else if (responseType === 'stream') {
+ convertedData = stream.Readable.from(convertedData);
+ }
+
+ return settle(resolve, reject, {
+ data: convertedData,
+ status: 200,
+ statusText: 'OK',
+ headers: new AxiosHeaders(),
+ config
+ });
+ }
+
+ if (supportedProtocols.indexOf(protocol) === -1) {
+ return reject(new AxiosError(
+ 'Unsupported protocol ' + protocol,
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+
+ const headers = AxiosHeaders.from(config.headers).normalize();
+
+ // Set User-Agent (required by some servers)
+ // See https://github.com/axios/axios/issues/69
+ // User-Agent is specified; handle case where no UA header is desired
+ // Only set header if it hasn't been set in config
+ headers.set('User-Agent', 'axios/' + VERSION, false);
+
+ const {onUploadProgress, onDownloadProgress} = config;
+ const maxRate = config.maxRate;
+ let maxUploadRate = undefined;
+ let maxDownloadRate = undefined;
+
+ // support for spec compliant FormData objects
+ if (utils.isSpecCompliantForm(data)) {
+ const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
+
+ data = formDataToStream(data, (formHeaders) => {
+ headers.set(formHeaders);
+ }, {
+ tag: `axios-${VERSION}-boundary`,
+ boundary: userBoundary && userBoundary[1] || undefined
+ });
+ // support for https://www.npmjs.com/package/form-data api
+ } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
+ headers.set(data.getHeaders());
+
+ if (!headers.hasContentLength()) {
+ try {
+ const knownLength = await util.promisify(data.getLength).call(data);
+ Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
+ /*eslint no-empty:0*/
+ } catch (e) {
+ }
+ }
+ } else if (utils.isBlob(data) || utils.isFile(data)) {
+ data.size && headers.setContentType(data.type || 'application/octet-stream');
+ headers.setContentLength(data.size || 0);
+ data = stream.Readable.from(readBlob(data));
+ } else if (data && !utils.isStream(data)) {
+ if (Buffer.isBuffer(data)) {
+ // Nothing to do...
+ } else if (utils.isArrayBuffer(data)) {
+ data = Buffer.from(new Uint8Array(data));
+ } else if (utils.isString(data)) {
+ data = Buffer.from(data, 'utf-8');
+ } else {
+ return reject(new AxiosError(
+ 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+
+ // Add Content-Length header if data exists
+ headers.setContentLength(data.length, false);
+
+ if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
+ return reject(new AxiosError(
+ 'Request body larger than maxBodyLength limit',
+ AxiosError.ERR_BAD_REQUEST,
+ config
+ ));
+ }
+ }
+
+ const contentLength = utils.toFiniteNumber(headers.getContentLength());
+
+ if (utils.isArray(maxRate)) {
+ maxUploadRate = maxRate[0];
+ maxDownloadRate = maxRate[1];
+ } else {
+ maxUploadRate = maxDownloadRate = maxRate;
+ }
+
+ if (data && (onUploadProgress || maxUploadRate)) {
+ if (!utils.isStream(data)) {
+ data = stream.Readable.from(data, {objectMode: false});
+ }
+
+ data = stream.pipeline([data, new AxiosTransformStream({
+ maxRate: utils.toFiniteNumber(maxUploadRate)
+ })], utils.noop);
+
+ onUploadProgress && data.on('progress', flushOnFinish(
+ data,
+ progressEventDecorator(
+ contentLength,
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
+ )
+ ));
+ }
+
+ // HTTP basic authentication
+ let auth = undefined;
+ if (config.auth) {
+ const username = config.auth.username || '';
+ const password = config.auth.password || '';
+ auth = username + ':' + password;
+ }
+
+ if (!auth && parsed.username) {
+ const urlUsername = parsed.username;
+ const urlPassword = parsed.password;
+ auth = urlUsername + ':' + urlPassword;
+ }
+
+ auth && headers.delete('authorization');
+
+ let path;
+
+ try {
+ path = buildURL(
+ parsed.pathname + parsed.search,
+ config.params,
+ config.paramsSerializer
+ ).replace(/^\?/, '');
+ } catch (err) {
+ const customErr = new Error(err.message);
+ customErr.config = config;
+ customErr.url = config.url;
+ customErr.exists = true;
+ return reject(customErr);
+ }
+
+ headers.set(
+ 'Accept-Encoding',
+ 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false
+ );
+
+ const options = {
+ path,
+ method: method,
+ headers: headers.toJSON(),
+ agents: { http: config.httpAgent, https: config.httpsAgent },
+ auth,
+ protocol,
+ family,
+ beforeRedirect: dispatchBeforeRedirect,
+ beforeRedirects: {}
+ };
+
+ // cacheable-lookup integration hotfix
+ !utils.isUndefined(lookup) && (options.lookup = lookup);
+
+ if (config.socketPath) {
+ options.socketPath = config.socketPath;
+ } else {
+ options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
+ options.port = parsed.port;
+ setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
+ }
+
+ let transport;
+ const isHttpsRequest = isHttps.test(options.protocol);
+ options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
+ if (config.transport) {
+ transport = config.transport;
+ } else if (config.maxRedirects === 0) {
+ transport = isHttpsRequest ? https : http;
+ } else {
+ if (config.maxRedirects) {
+ options.maxRedirects = config.maxRedirects;
+ }
+ if (config.beforeRedirect) {
+ options.beforeRedirects.config = config.beforeRedirect;
+ }
+ transport = isHttpsRequest ? httpsFollow : httpFollow;
+ }
+
+ if (config.maxBodyLength > -1) {
+ options.maxBodyLength = config.maxBodyLength;
+ } else {
+ // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
+ options.maxBodyLength = Infinity;
+ }
+
+ if (config.insecureHTTPParser) {
+ options.insecureHTTPParser = config.insecureHTTPParser;
+ }
+
+ // Create the request
+ req = transport.request(options, function handleResponse(res) {
+ if (req.destroyed) return;
+
+ const streams = [res];
+
+ const responseLength = +res.headers['content-length'];
+
+ if (onDownloadProgress || maxDownloadRate) {
+ const transformStream = new AxiosTransformStream({
+ maxRate: utils.toFiniteNumber(maxDownloadRate)
+ });
+
+ onDownloadProgress && transformStream.on('progress', flushOnFinish(
+ transformStream,
+ progressEventDecorator(
+ responseLength,
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
+ )
+ ));
+
+ streams.push(transformStream);
+ }
+
+ // decompress the response body transparently if required
+ let responseStream = res;
+
+ // return the last request in case of redirects
+ const lastRequest = res.req || req;
+
+ // if decompress disabled we should not decompress
+ if (config.decompress !== false && res.headers['content-encoding']) {
+ // if no content, but headers still say that it is encoded,
+ // remove the header not confuse downstream operations
+ if (method === 'HEAD' || res.statusCode === 204) {
+ delete res.headers['content-encoding'];
+ }
+
+ switch ((res.headers['content-encoding'] || '').toLowerCase()) {
+ /*eslint default-case:0*/
+ case 'gzip':
+ case 'x-gzip':
+ case 'compress':
+ case 'x-compress':
+ // add the unzipper to the body stream processing pipeline
+ streams.push(zlib.createUnzip(zlibOptions));
+
+ // remove the content-encoding in order to not confuse downstream operations
+ delete res.headers['content-encoding'];
+ break;
+ case 'deflate':
+ streams.push(new ZlibHeaderTransformStream());
+
+ // add the unzipper to the body stream processing pipeline
+ streams.push(zlib.createUnzip(zlibOptions));
+
+ // remove the content-encoding in order to not confuse downstream operations
+ delete res.headers['content-encoding'];
+ break;
+ case 'br':
+ if (isBrotliSupported) {
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
+ delete res.headers['content-encoding'];
+ }
+ }
+ }
+
+ responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];
+
+ const offListeners = stream.finished(responseStream, () => {
+ offListeners();
+ onFinished();
+ });
+
+ const response = {
+ status: res.statusCode,
+ statusText: res.statusMessage,
+ headers: new AxiosHeaders(res.headers),
+ config,
+ request: lastRequest
+ };
+
+ if (responseType === 'stream') {
+ response.data = responseStream;
+ settle(resolve, reject, response);
+ } else {
+ const responseBuffer = [];
+ let totalResponseBytes = 0;
+
+ responseStream.on('data', function handleStreamData(chunk) {
+ responseBuffer.push(chunk);
+ totalResponseBytes += chunk.length;
+
+ // make sure the content length is not over the maxContentLength if specified
+ if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
+ // stream.destroy() emit aborted event before calling reject() on Node.js v16
+ rejected = true;
+ responseStream.destroy();
+ reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
+ AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
+ }
+ });
+
+ responseStream.on('aborted', function handlerStreamAborted() {
+ if (rejected) {
+ return;
+ }
+
+ const err = new AxiosError(
+ 'stream has been aborted',
+ AxiosError.ERR_BAD_RESPONSE,
+ config,
+ lastRequest
+ );
+ responseStream.destroy(err);
+ reject(err);
+ });
+
+ responseStream.on('error', function handleStreamError(err) {
+ if (req.destroyed) return;
+ reject(AxiosError.from(err, null, config, lastRequest));
+ });
+
+ responseStream.on('end', function handleStreamEnd() {
+ try {
+ let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
+ if (responseType !== 'arraybuffer') {
+ responseData = responseData.toString(responseEncoding);
+ if (!responseEncoding || responseEncoding === 'utf8') {
+ responseData = utils.stripBOM(responseData);
+ }
+ }
+ response.data = responseData;
+ } catch (err) {
+ return reject(AxiosError.from(err, null, config, response.request, response));
+ }
+ settle(resolve, reject, response);
+ });
+ }
+
+ emitter.once('abort', err => {
+ if (!responseStream.destroyed) {
+ responseStream.emit('error', err);
+ responseStream.destroy();
+ }
+ });
+ });
+
+ emitter.once('abort', err => {
+ reject(err);
+ req.destroy(err);
+ });
+
+ // Handle errors
+ req.on('error', function handleRequestError(err) {
+ // @todo remove
+ // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;
+ reject(AxiosError.from(err, null, config, req));
+ });
+
+ // set tcp keep alive to prevent drop connection by peer
+ req.on('socket', function handleRequestSocket(socket) {
+ // default interval of sending ack packet is 1 minute
+ socket.setKeepAlive(true, 1000 * 60);
+ });
+
+ // Handle request timeout
+ if (config.timeout) {
+ // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
+ const timeout = parseInt(config.timeout, 10);
+
+ if (Number.isNaN(timeout)) {
+ reject(new AxiosError(
+ 'error trying to parse `config.timeout` to int',
+ AxiosError.ERR_BAD_OPTION_VALUE,
+ config,
+ req
+ ));
+
+ return;
+ }
+
+ // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
+ // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
+ // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
+ // And then these socket which be hang up will devouring CPU little by little.
+ // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
+ req.setTimeout(timeout, function handleRequestTimeout() {
+ if (isDone) return;
+ let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = config.transitional || transitionalDefaults;
+ if (config.timeoutErrorMessage) {
+ timeoutErrorMessage = config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
+ config,
+ req
+ ));
+ abort();
+ });
+ }
+
+
+ // Send the request
+ if (utils.isStream(data)) {
+ let ended = false;
+ let errored = false;
+
+ data.on('end', () => {
+ ended = true;
+ });
+
+ data.once('error', err => {
+ errored = true;
+ req.destroy(err);
+ });
+
+ data.on('close', () => {
+ if (!ended && !errored) {
+ abort(new CanceledError('Request stream has been aborted', config, req));
+ }
+ });
+
+ data.pipe(req);
+ } else {
+ req.end(data);
+ }
+ });
+}
+
+export const __setProxy = setProxy;
diff --git a/node_modules/axios/lib/adapters/xhr.js b/node_modules/axios/lib/adapters/xhr.js
new file mode 100644
index 0000000..a7ee548
--- /dev/null
+++ b/node_modules/axios/lib/adapters/xhr.js
@@ -0,0 +1,197 @@
+import utils from './../utils.js';
+import settle from './../core/settle.js';
+import transitionalDefaults from '../defaults/transitional.js';
+import AxiosError from '../core/AxiosError.js';
+import CanceledError from '../cancel/CanceledError.js';
+import parseProtocol from '../helpers/parseProtocol.js';
+import platform from '../platform/index.js';
+import AxiosHeaders from '../core/AxiosHeaders.js';
+import {progressEventReducer} from '../helpers/progressEventReducer.js';
+import resolveConfig from "../helpers/resolveConfig.js";
+
+const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+
+export default isXHRAdapterSupported && function (config) {
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
+ const _config = resolveConfig(config);
+ let requestData = _config.data;
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
+ let onCanceled;
+ let uploadThrottled, downloadThrottled;
+ let flushUpload, flushDownload;
+
+ function done() {
+ flushUpload && flushUpload(); // flush events
+ flushDownload && flushDownload(); // flush events
+
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+ }
+
+ let request = new XMLHttpRequest();
+
+ request.open(_config.method.toUpperCase(), _config.url, true);
+
+ // Set the request timeout in MS
+ request.timeout = _config.timeout;
+
+ function onloadend() {
+ if (!request) {
+ return;
+ }
+ // Prepare the response
+ const responseHeaders = AxiosHeaders.from(
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
+ );
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
+ request.responseText : request.response;
+ const response = {
+ data: responseData,
+ status: request.status,
+ statusText: request.statusText,
+ headers: responseHeaders,
+ config,
+ request
+ };
+
+ settle(function _resolve(value) {
+ resolve(value);
+ done();
+ }, function _reject(err) {
+ reject(err);
+ done();
+ }, response);
+
+ // Clean up request
+ request = null;
+ }
+
+ if ('onloadend' in request) {
+ // Use onloadend if available
+ request.onloadend = onloadend;
+ } else {
+ // Listen for ready state to emulate onloadend
+ request.onreadystatechange = function handleLoad() {
+ if (!request || request.readyState !== 4) {
+ return;
+ }
+
+ // The request errored out and we didn't get a response, this will be
+ // handled by onerror instead
+ // With one exception: request that using file: protocol, most browsers
+ // will return status as 0 even though it's a successful request
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+ return;
+ }
+ // readystate handler is calling before onerror or ontimeout handlers,
+ // so we should call onloadend on the next 'tick'
+ setTimeout(onloadend);
+ };
+ }
+
+ // Handle browser request cancellation (as opposed to a manual cancellation)
+ request.onabort = function handleAbort() {
+ if (!request) {
+ return;
+ }
+
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle low level network errors
+ request.onerror = function handleError() {
+ // Real errors are hidden from us by the browser
+ // onerror should only fire if it's a network error
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Handle timeout
+ request.ontimeout = function handleTimeout() {
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+ const transitional = _config.transitional || transitionalDefaults;
+ if (_config.timeoutErrorMessage) {
+ timeoutErrorMessage = _config.timeoutErrorMessage;
+ }
+ reject(new AxiosError(
+ timeoutErrorMessage,
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
+ config,
+ request));
+
+ // Clean up request
+ request = null;
+ };
+
+ // Remove Content-Type if data is undefined
+ requestData === undefined && requestHeaders.setContentType(null);
+
+ // Add headers to the request
+ if ('setRequestHeader' in request) {
+ utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+ request.setRequestHeader(key, val);
+ });
+ }
+
+ // Add withCredentials to request if needed
+ if (!utils.isUndefined(_config.withCredentials)) {
+ request.withCredentials = !!_config.withCredentials;
+ }
+
+ // Add responseType to request if needed
+ if (responseType && responseType !== 'json') {
+ request.responseType = _config.responseType;
+ }
+
+ // Handle progress if needed
+ if (onDownloadProgress) {
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
+ request.addEventListener('progress', downloadThrottled);
+ }
+
+ // Not all browsers support upload events
+ if (onUploadProgress && request.upload) {
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
+
+ request.upload.addEventListener('progress', uploadThrottled);
+
+ request.upload.addEventListener('loadend', flushUpload);
+ }
+
+ if (_config.cancelToken || _config.signal) {
+ // Handle cancellation
+ // eslint-disable-next-line func-names
+ onCanceled = cancel => {
+ if (!request) {
+ return;
+ }
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
+ request.abort();
+ request = null;
+ };
+
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
+ if (_config.signal) {
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
+ }
+ }
+
+ const protocol = parseProtocol(_config.url);
+
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
+ return;
+ }
+
+
+ // Send the request
+ request.send(requestData || null);
+ });
+}
diff --git a/node_modules/axios/lib/axios.js b/node_modules/axios/lib/axios.js
new file mode 100644
index 0000000..873f246
--- /dev/null
+++ b/node_modules/axios/lib/axios.js
@@ -0,0 +1,89 @@
+'use strict';
+
+import utils from './utils.js';
+import bind from './helpers/bind.js';
+import Axios from './core/Axios.js';
+import mergeConfig from './core/mergeConfig.js';
+import defaults from './defaults/index.js';
+import formDataToJSON from './helpers/formDataToJSON.js';
+import CanceledError from './cancel/CanceledError.js';
+import CancelToken from './cancel/CancelToken.js';
+import isCancel from './cancel/isCancel.js';
+import {VERSION} from './env/data.js';
+import toFormData from './helpers/toFormData.js';
+import AxiosError from './core/AxiosError.js';
+import spread from './helpers/spread.js';
+import isAxiosError from './helpers/isAxiosError.js';
+import AxiosHeaders from "./core/AxiosHeaders.js";
+import adapters from './adapters/adapters.js';
+import HttpStatusCode from './helpers/HttpStatusCode.js';
+
+/**
+ * Create an instance of Axios
+ *
+ * @param {Object} defaultConfig The default config for the instance
+ *
+ * @returns {Axios} A new instance of Axios
+ */
+function createInstance(defaultConfig) {
+ const context = new Axios(defaultConfig);
+ const instance = bind(Axios.prototype.request, context);
+
+ // Copy axios.prototype to instance
+ utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
+
+ // Copy context to instance
+ utils.extend(instance, context, null, {allOwnKeys: true});
+
+ // Factory for creating new instances
+ instance.create = function create(instanceConfig) {
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
+ };
+
+ return instance;
+}
+
+// Create the default instance to be exported
+const axios = createInstance(defaults);
+
+// Expose Axios class to allow class inheritance
+axios.Axios = Axios;
+
+// Expose Cancel & CancelToken
+axios.CanceledError = CanceledError;
+axios.CancelToken = CancelToken;
+axios.isCancel = isCancel;
+axios.VERSION = VERSION;
+axios.toFormData = toFormData;
+
+// Expose AxiosError class
+axios.AxiosError = AxiosError;
+
+// alias for CanceledError for backward compatibility
+axios.Cancel = axios.CanceledError;
+
+// Expose all/spread
+axios.all = function all(promises) {
+ return Promise.all(promises);
+};
+
+axios.spread = spread;
+
+// Expose isAxiosError
+axios.isAxiosError = isAxiosError;
+
+// Expose mergeConfig
+axios.mergeConfig = mergeConfig;
+
+axios.AxiosHeaders = AxiosHeaders;
+
+axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
+
+axios.getAdapter = adapters.getAdapter;
+
+axios.HttpStatusCode = HttpStatusCode;
+
+axios.default = axios;
+
+// this module should only have a default export
+export default axios
diff --git a/node_modules/axios/lib/cancel/CancelToken.js b/node_modules/axios/lib/cancel/CancelToken.js
new file mode 100644
index 0000000..0fc2025
--- /dev/null
+++ b/node_modules/axios/lib/cancel/CancelToken.js
@@ -0,0 +1,135 @@
+'use strict';
+
+import CanceledError from './CanceledError.js';
+
+/**
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
+ *
+ * @param {Function} executor The executor function.
+ *
+ * @returns {CancelToken}
+ */
+class CancelToken {
+ constructor(executor) {
+ if (typeof executor !== 'function') {
+ throw new TypeError('executor must be a function.');
+ }
+
+ let resolvePromise;
+
+ this.promise = new Promise(function promiseExecutor(resolve) {
+ resolvePromise = resolve;
+ });
+
+ const token = this;
+
+ // eslint-disable-next-line func-names
+ this.promise.then(cancel => {
+ if (!token._listeners) return;
+
+ let i = token._listeners.length;
+
+ while (i-- > 0) {
+ token._listeners[i](cancel);
+ }
+ token._listeners = null;
+ });
+
+ // eslint-disable-next-line func-names
+ this.promise.then = onfulfilled => {
+ let _resolve;
+ // eslint-disable-next-line func-names
+ const promise = new Promise(resolve => {
+ token.subscribe(resolve);
+ _resolve = resolve;
+ }).then(onfulfilled);
+
+ promise.cancel = function reject() {
+ token.unsubscribe(_resolve);
+ };
+
+ return promise;
+ };
+
+ executor(function cancel(message, config, request) {
+ if (token.reason) {
+ // Cancellation has already been requested
+ return;
+ }
+
+ token.reason = new CanceledError(message, config, request);
+ resolvePromise(token.reason);
+ });
+ }
+
+ /**
+ * Throws a `CanceledError` if cancellation has been requested.
+ */
+ throwIfRequested() {
+ if (this.reason) {
+ throw this.reason;
+ }
+ }
+
+ /**
+ * Subscribe to the cancel signal
+ */
+
+ subscribe(listener) {
+ if (this.reason) {
+ listener(this.reason);
+ return;
+ }
+
+ if (this._listeners) {
+ this._listeners.push(listener);
+ } else {
+ this._listeners = [listener];
+ }
+ }
+
+ /**
+ * Unsubscribe from the cancel signal
+ */
+
+ unsubscribe(listener) {
+ if (!this._listeners) {
+ return;
+ }
+ const index = this._listeners.indexOf(listener);
+ if (index !== -1) {
+ this._listeners.splice(index, 1);
+ }
+ }
+
+ toAbortSignal() {
+ const controller = new AbortController();
+
+ const abort = (err) => {
+ controller.abort(err);
+ };
+
+ this.subscribe(abort);
+
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
+
+ return controller.signal;
+ }
+
+ /**
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
+ * cancels the `CancelToken`.
+ */
+ static source() {
+ let cancel;
+ const token = new CancelToken(function executor(c) {
+ cancel = c;
+ });
+ return {
+ token,
+ cancel
+ };
+ }
+}
+
+export default CancelToken;
diff --git a/node_modules/axios/lib/cancel/CanceledError.js b/node_modules/axios/lib/cancel/CanceledError.js
new file mode 100644
index 0000000..880066e
--- /dev/null
+++ b/node_modules/axios/lib/cancel/CanceledError.js
@@ -0,0 +1,25 @@
+'use strict';
+
+import AxiosError from '../core/AxiosError.js';
+import utils from '../utils.js';
+
+/**
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
+ *
+ * @param {string=} message The message.
+ * @param {Object=} config The config.
+ * @param {Object=} request The request.
+ *
+ * @returns {CanceledError} The created error.
+ */
+function CanceledError(message, config, request) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
+ this.name = 'CanceledError';
+}
+
+utils.inherits(CanceledError, AxiosError, {
+ __CANCEL__: true
+});
+
+export default CanceledError;
diff --git a/node_modules/axios/lib/cancel/isCancel.js b/node_modules/axios/lib/cancel/isCancel.js
new file mode 100644
index 0000000..a444a12
--- /dev/null
+++ b/node_modules/axios/lib/cancel/isCancel.js
@@ -0,0 +1,5 @@
+'use strict';
+
+export default function isCancel(value) {
+ return !!(value && value.__CANCEL__);
+}
diff --git a/node_modules/axios/lib/core/Axios.js b/node_modules/axios/lib/core/Axios.js
new file mode 100644
index 0000000..6dd3c2c
--- /dev/null
+++ b/node_modules/axios/lib/core/Axios.js
@@ -0,0 +1,233 @@
+'use strict';
+
+import utils from './../utils.js';
+import buildURL from '../helpers/buildURL.js';
+import InterceptorManager from './InterceptorManager.js';
+import dispatchRequest from './dispatchRequest.js';
+import mergeConfig from './mergeConfig.js';
+import buildFullPath from './buildFullPath.js';
+import validator from '../helpers/validator.js';
+import AxiosHeaders from './AxiosHeaders.js';
+
+const validators = validator.validators;
+
+/**
+ * Create a new instance of Axios
+ *
+ * @param {Object} instanceConfig The default config for the instance
+ *
+ * @return {Axios} A new instance of Axios
+ */
+class Axios {
+ constructor(instanceConfig) {
+ this.defaults = instanceConfig;
+ this.interceptors = {
+ request: new InterceptorManager(),
+ response: new InterceptorManager()
+ };
+ }
+
+ /**
+ * Dispatch a request
+ *
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
+ * @param {?Object} config
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+ async request(configOrUrl, config) {
+ try {
+ return await this._request(configOrUrl, config);
+ } catch (err) {
+ if (err instanceof Error) {
+ let dummy = {};
+
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
+
+ // slice off the Error: ... line
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+ try {
+ if (!err.stack) {
+ err.stack = stack;
+ // match without the 2 top stack lines
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+ err.stack += '\n' + stack
+ }
+ } catch (e) {
+ // ignore the case where "stack" is an un-writable property
+ }
+ }
+
+ throw err;
+ }
+ }
+
+ _request(configOrUrl, config) {
+ /*eslint no-param-reassign:0*/
+ // Allow for axios('example/url'[, config]) a la fetch API
+ if (typeof configOrUrl === 'string') {
+ config = config || {};
+ config.url = configOrUrl;
+ } else {
+ config = configOrUrl || {};
+ }
+
+ config = mergeConfig(this.defaults, config);
+
+ const {transitional, paramsSerializer, headers} = config;
+
+ if (transitional !== undefined) {
+ validator.assertOptions(transitional, {
+ silentJSONParsing: validators.transitional(validators.boolean),
+ forcedJSONParsing: validators.transitional(validators.boolean),
+ clarifyTimeoutError: validators.transitional(validators.boolean)
+ }, false);
+ }
+
+ if (paramsSerializer != null) {
+ if (utils.isFunction(paramsSerializer)) {
+ config.paramsSerializer = {
+ serialize: paramsSerializer
+ }
+ } else {
+ validator.assertOptions(paramsSerializer, {
+ encode: validators.function,
+ serialize: validators.function
+ }, true);
+ }
+ }
+
+ validator.assertOptions(config, {
+ baseUrl: validators.spelling('baseURL'),
+ withXsrfToken: validators.spelling('withXSRFToken')
+ }, true);
+
+ // Set config.method
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+ // Flatten headers
+ let contextHeaders = headers && utils.merge(
+ headers.common,
+ headers[config.method]
+ );
+
+ headers && utils.forEach(
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
+ (method) => {
+ delete headers[method];
+ }
+ );
+
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
+
+ // filter out skipped interceptors
+ const requestInterceptorChain = [];
+ let synchronousRequestInterceptors = true;
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
+ return;
+ }
+
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
+
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ const responseInterceptorChain = [];
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+ });
+
+ let promise;
+ let i = 0;
+ let len;
+
+ if (!synchronousRequestInterceptors) {
+ const chain = [dispatchRequest.bind(this), undefined];
+ chain.unshift.apply(chain, requestInterceptorChain);
+ chain.push.apply(chain, responseInterceptorChain);
+ len = chain.length;
+
+ promise = Promise.resolve(config);
+
+ while (i < len) {
+ promise = promise.then(chain[i++], chain[i++]);
+ }
+
+ return promise;
+ }
+
+ len = requestInterceptorChain.length;
+
+ let newConfig = config;
+
+ i = 0;
+
+ while (i < len) {
+ const onFulfilled = requestInterceptorChain[i++];
+ const onRejected = requestInterceptorChain[i++];
+ try {
+ newConfig = onFulfilled(newConfig);
+ } catch (error) {
+ onRejected.call(this, error);
+ break;
+ }
+ }
+
+ try {
+ promise = dispatchRequest.call(this, newConfig);
+ } catch (error) {
+ return Promise.reject(error);
+ }
+
+ i = 0;
+ len = responseInterceptorChain.length;
+
+ while (i < len) {
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
+ }
+
+ return promise;
+ }
+
+ getUri(config) {
+ config = mergeConfig(this.defaults, config);
+ const fullPath = buildFullPath(config.baseURL, config.url);
+ return buildURL(fullPath, config.params, config.paramsSerializer);
+ }
+}
+
+// Provide aliases for supported request methods
+utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+ /*eslint func-names:0*/
+ Axios.prototype[method] = function(url, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ url,
+ data: (config || {}).data
+ }));
+ };
+});
+
+utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+ /*eslint func-names:0*/
+
+ function generateHTTPMethod(isForm) {
+ return function httpMethod(url, data, config) {
+ return this.request(mergeConfig(config || {}, {
+ method,
+ headers: isForm ? {
+ 'Content-Type': 'multipart/form-data'
+ } : {},
+ url,
+ data
+ }));
+ };
+ }
+
+ Axios.prototype[method] = generateHTTPMethod();
+
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
+});
+
+export default Axios;
diff --git a/node_modules/axios/lib/core/AxiosError.js b/node_modules/axios/lib/core/AxiosError.js
new file mode 100644
index 0000000..73da248
--- /dev/null
+++ b/node_modules/axios/lib/core/AxiosError.js
@@ -0,0 +1,103 @@
+'use strict';
+
+import utils from '../utils.js';
+
+/**
+ * Create an Error with the specified message, config, error code, request and response.
+ *
+ * @param {string} message The error message.
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
+ * @param {Object} [config] The config.
+ * @param {Object} [request] The request.
+ * @param {Object} [response] The response.
+ *
+ * @returns {Error} The created error.
+ */
+function AxiosError(message, code, config, request, response) {
+ Error.call(this);
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = (new Error()).stack;
+ }
+
+ this.message = message;
+ this.name = 'AxiosError';
+ code && (this.code = code);
+ config && (this.config = config);
+ request && (this.request = request);
+ if (response) {
+ this.response = response;
+ this.status = response.status ? response.status : null;
+ }
+}
+
+utils.inherits(AxiosError, Error, {
+ toJSON: function toJSON() {
+ return {
+ // Standard
+ message: this.message,
+ name: this.name,
+ // Microsoft
+ description: this.description,
+ number: this.number,
+ // Mozilla
+ fileName: this.fileName,
+ lineNumber: this.lineNumber,
+ columnNumber: this.columnNumber,
+ stack: this.stack,
+ // Axios
+ config: utils.toJSONObject(this.config),
+ code: this.code,
+ status: this.status
+ };
+ }
+});
+
+const prototype = AxiosError.prototype;
+const descriptors = {};
+
+[
+ 'ERR_BAD_OPTION_VALUE',
+ 'ERR_BAD_OPTION',
+ 'ECONNABORTED',
+ 'ETIMEDOUT',
+ 'ERR_NETWORK',
+ 'ERR_FR_TOO_MANY_REDIRECTS',
+ 'ERR_DEPRECATED',
+ 'ERR_BAD_RESPONSE',
+ 'ERR_BAD_REQUEST',
+ 'ERR_CANCELED',
+ 'ERR_NOT_SUPPORT',
+ 'ERR_INVALID_URL'
+// eslint-disable-next-line func-names
+].forEach(code => {
+ descriptors[code] = {value: code};
+});
+
+Object.defineProperties(AxiosError, descriptors);
+Object.defineProperty(prototype, 'isAxiosError', {value: true});
+
+// eslint-disable-next-line func-names
+AxiosError.from = (error, code, config, request, response, customProps) => {
+ const axiosError = Object.create(prototype);
+
+ utils.toFlatObject(error, axiosError, function filter(obj) {
+ return obj !== Error.prototype;
+ }, prop => {
+ return prop !== 'isAxiosError';
+ });
+
+ AxiosError.call(axiosError, error.message, code, config, request, response);
+
+ axiosError.cause = error;
+
+ axiosError.name = error.name;
+
+ customProps && Object.assign(axiosError, customProps);
+
+ return axiosError;
+};
+
+export default AxiosError;
diff --git a/node_modules/axios/lib/core/AxiosHeaders.js b/node_modules/axios/lib/core/AxiosHeaders.js
new file mode 100644
index 0000000..7b576e9
--- /dev/null
+++ b/node_modules/axios/lib/core/AxiosHeaders.js
@@ -0,0 +1,302 @@
+'use strict';
+
+import utils from '../utils.js';
+import parseHeaders from '../helpers/parseHeaders.js';
+
+const $internals = Symbol('internals');
+
+function normalizeHeader(header) {
+ return header && String(header).trim().toLowerCase();
+}
+
+function normalizeValue(value) {
+ if (value === false || value == null) {
+ return value;
+ }
+
+ return utils.isArray(value) ? value.map(normalizeValue) : String(value);
+}
+
+function parseTokens(str) {
+ const tokens = Object.create(null);
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+ let match;
+
+ while ((match = tokensRE.exec(str))) {
+ tokens[match[1]] = match[2];
+ }
+
+ return tokens;
+}
+
+const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+
+function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+ if (utils.isFunction(filter)) {
+ return filter.call(this, value, header);
+ }
+
+ if (isHeaderNameFilter) {
+ value = header;
+ }
+
+ if (!utils.isString(value)) return;
+
+ if (utils.isString(filter)) {
+ return value.indexOf(filter) !== -1;
+ }
+
+ if (utils.isRegExp(filter)) {
+ return filter.test(value);
+ }
+}
+
+function formatHeader(header) {
+ return header.trim()
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
+ return char.toUpperCase() + str;
+ });
+}
+
+function buildAccessors(obj, header) {
+ const accessorName = utils.toCamelCase(' ' + header);
+
+ ['get', 'set', 'has'].forEach(methodName => {
+ Object.defineProperty(obj, methodName + accessorName, {
+ value: function(arg1, arg2, arg3) {
+ return this[methodName].call(this, header, arg1, arg2, arg3);
+ },
+ configurable: true
+ });
+ });
+}
+
+class AxiosHeaders {
+ constructor(headers) {
+ headers && this.set(headers);
+ }
+
+ set(header, valueOrRewrite, rewrite) {
+ const self = this;
+
+ function setHeader(_value, _header, _rewrite) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!lHeader) {
+ throw new Error('header name must be a non-empty string');
+ }
+
+ const key = utils.findKey(self, lHeader);
+
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
+ self[key || _header] = normalizeValue(_value);
+ }
+ }
+
+ const setHeaders = (headers, _rewrite) =>
+ utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
+
+ if (utils.isPlainObject(header) || header instanceof this.constructor) {
+ setHeaders(header, valueOrRewrite)
+ } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+ setHeaders(parseHeaders(header), valueOrRewrite);
+ } else if (utils.isHeaders(header)) {
+ for (const [key, value] of header.entries()) {
+ setHeader(value, key, rewrite);
+ }
+ } else {
+ header != null && setHeader(valueOrRewrite, header, rewrite);
+ }
+
+ return this;
+ }
+
+ get(header, parser) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils.findKey(this, header);
+
+ if (key) {
+ const value = this[key];
+
+ if (!parser) {
+ return value;
+ }
+
+ if (parser === true) {
+ return parseTokens(value);
+ }
+
+ if (utils.isFunction(parser)) {
+ return parser.call(this, value, key);
+ }
+
+ if (utils.isRegExp(parser)) {
+ return parser.exec(value);
+ }
+
+ throw new TypeError('parser must be boolean|regexp|function');
+ }
+ }
+ }
+
+ has(header, matcher) {
+ header = normalizeHeader(header);
+
+ if (header) {
+ const key = utils.findKey(this, header);
+
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+ }
+
+ return false;
+ }
+
+ delete(header, matcher) {
+ const self = this;
+ let deleted = false;
+
+ function deleteHeader(_header) {
+ _header = normalizeHeader(_header);
+
+ if (_header) {
+ const key = utils.findKey(self, _header);
+
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+ delete self[key];
+
+ deleted = true;
+ }
+ }
+ }
+
+ if (utils.isArray(header)) {
+ header.forEach(deleteHeader);
+ } else {
+ deleteHeader(header);
+ }
+
+ return deleted;
+ }
+
+ clear(matcher) {
+ const keys = Object.keys(this);
+ let i = keys.length;
+ let deleted = false;
+
+ while (i--) {
+ const key = keys[i];
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+ delete this[key];
+ deleted = true;
+ }
+ }
+
+ return deleted;
+ }
+
+ normalize(format) {
+ const self = this;
+ const headers = {};
+
+ utils.forEach(this, (value, header) => {
+ const key = utils.findKey(headers, header);
+
+ if (key) {
+ self[key] = normalizeValue(value);
+ delete self[header];
+ return;
+ }
+
+ const normalized = format ? formatHeader(header) : String(header).trim();
+
+ if (normalized !== header) {
+ delete self[header];
+ }
+
+ self[normalized] = normalizeValue(value);
+
+ headers[normalized] = true;
+ });
+
+ return this;
+ }
+
+ concat(...targets) {
+ return this.constructor.concat(this, ...targets);
+ }
+
+ toJSON(asStrings) {
+ const obj = Object.create(null);
+
+ utils.forEach(this, (value, header) => {
+ value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
+ });
+
+ return obj;
+ }
+
+ [Symbol.iterator]() {
+ return Object.entries(this.toJSON())[Symbol.iterator]();
+ }
+
+ toString() {
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
+ }
+
+ get [Symbol.toStringTag]() {
+ return 'AxiosHeaders';
+ }
+
+ static from(thing) {
+ return thing instanceof this ? thing : new this(thing);
+ }
+
+ static concat(first, ...targets) {
+ const computed = new this(first);
+
+ targets.forEach((target) => computed.set(target));
+
+ return computed;
+ }
+
+ static accessor(header) {
+ const internals = this[$internals] = (this[$internals] = {
+ accessors: {}
+ });
+
+ const accessors = internals.accessors;
+ const prototype = this.prototype;
+
+ function defineAccessor(_header) {
+ const lHeader = normalizeHeader(_header);
+
+ if (!accessors[lHeader]) {
+ buildAccessors(prototype, _header);
+ accessors[lHeader] = true;
+ }
+ }
+
+ utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+
+ return this;
+ }
+}
+
+AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+// reserved names hotfix
+utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+ return {
+ get: () => value,
+ set(headerValue) {
+ this[mapped] = headerValue;
+ }
+ }
+});
+
+utils.freezeMethods(AxiosHeaders);
+
+export default AxiosHeaders;
diff --git a/node_modules/axios/lib/core/InterceptorManager.js b/node_modules/axios/lib/core/InterceptorManager.js
new file mode 100644
index 0000000..6657a9d
--- /dev/null
+++ b/node_modules/axios/lib/core/InterceptorManager.js
@@ -0,0 +1,71 @@
+'use strict';
+
+import utils from './../utils.js';
+
+class InterceptorManager {
+ constructor() {
+ this.handlers = [];
+ }
+
+ /**
+ * Add a new interceptor to the stack
+ *
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
+ *
+ * @return {Number} An ID used to remove interceptor later
+ */
+ use(fulfilled, rejected, options) {
+ this.handlers.push({
+ fulfilled,
+ rejected,
+ synchronous: options ? options.synchronous : false,
+ runWhen: options ? options.runWhen : null
+ });
+ return this.handlers.length - 1;
+ }
+
+ /**
+ * Remove an interceptor from the stack
+ *
+ * @param {Number} id The ID that was returned by `use`
+ *
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
+ */
+ eject(id) {
+ if (this.handlers[id]) {
+ this.handlers[id] = null;
+ }
+ }
+
+ /**
+ * Clear all interceptors from the stack
+ *
+ * @returns {void}
+ */
+ clear() {
+ if (this.handlers) {
+ this.handlers = [];
+ }
+ }
+
+ /**
+ * Iterate over all the registered interceptors
+ *
+ * This method is particularly useful for skipping over any
+ * interceptors that may have become `null` calling `eject`.
+ *
+ * @param {Function} fn The function to call for each interceptor
+ *
+ * @returns {void}
+ */
+ forEach(fn) {
+ utils.forEach(this.handlers, function forEachHandler(h) {
+ if (h !== null) {
+ fn(h);
+ }
+ });
+ }
+}
+
+export default InterceptorManager;
diff --git a/node_modules/axios/lib/core/README.md b/node_modules/axios/lib/core/README.md
new file mode 100644
index 0000000..84559ce
--- /dev/null
+++ b/node_modules/axios/lib/core/README.md
@@ -0,0 +1,8 @@
+# axios // core
+
+The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are:
+
+- Dispatching requests
+ - Requests sent via `adapters/` (see lib/adapters/README.md)
+- Managing interceptors
+- Handling config
diff --git a/node_modules/axios/lib/core/buildFullPath.js b/node_modules/axios/lib/core/buildFullPath.js
new file mode 100644
index 0000000..b60927c
--- /dev/null
+++ b/node_modules/axios/lib/core/buildFullPath.js
@@ -0,0 +1,21 @@
+'use strict';
+
+import isAbsoluteURL from '../helpers/isAbsoluteURL.js';
+import combineURLs from '../helpers/combineURLs.js';
+
+/**
+ * Creates a new URL by combining the baseURL with the requestedURL,
+ * only when the requestedURL is not already an absolute URL.
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} requestedURL Absolute or relative URL to combine
+ *
+ * @returns {string} The combined full path
+ */
+export default function buildFullPath(baseURL, requestedURL) {
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
+ return combineURLs(baseURL, requestedURL);
+ }
+ return requestedURL;
+}
diff --git a/node_modules/axios/lib/core/dispatchRequest.js b/node_modules/axios/lib/core/dispatchRequest.js
new file mode 100644
index 0000000..9e306aa
--- /dev/null
+++ b/node_modules/axios/lib/core/dispatchRequest.js
@@ -0,0 +1,81 @@
+'use strict';
+
+import transformData from './transformData.js';
+import isCancel from '../cancel/isCancel.js';
+import defaults from '../defaults/index.js';
+import CanceledError from '../cancel/CanceledError.js';
+import AxiosHeaders from '../core/AxiosHeaders.js';
+import adapters from "../adapters/adapters.js";
+
+/**
+ * Throws a `CanceledError` if cancellation has been requested.
+ *
+ * @param {Object} config The config that is to be used for the request
+ *
+ * @returns {void}
+ */
+function throwIfCancellationRequested(config) {
+ if (config.cancelToken) {
+ config.cancelToken.throwIfRequested();
+ }
+
+ if (config.signal && config.signal.aborted) {
+ throw new CanceledError(null, config);
+ }
+}
+
+/**
+ * Dispatch a request to the server using the configured adapter.
+ *
+ * @param {object} config The config that is to be used for the request
+ *
+ * @returns {Promise} The Promise to be fulfilled
+ */
+export default function dispatchRequest(config) {
+ throwIfCancellationRequested(config);
+
+ config.headers = AxiosHeaders.from(config.headers);
+
+ // Transform request data
+ config.data = transformData.call(
+ config,
+ config.transformRequest
+ );
+
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
+ }
+
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
+
+ return adapter(config).then(function onAdapterResolution(response) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ response.data = transformData.call(
+ config,
+ config.transformResponse,
+ response
+ );
+
+ response.headers = AxiosHeaders.from(response.headers);
+
+ return response;
+ }, function onAdapterRejection(reason) {
+ if (!isCancel(reason)) {
+ throwIfCancellationRequested(config);
+
+ // Transform response data
+ if (reason && reason.response) {
+ reason.response.data = transformData.call(
+ config,
+ config.transformResponse,
+ reason.response
+ );
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
+ }
+ }
+
+ return Promise.reject(reason);
+ });
+}
diff --git a/node_modules/axios/lib/core/mergeConfig.js b/node_modules/axios/lib/core/mergeConfig.js
new file mode 100644
index 0000000..c510073
--- /dev/null
+++ b/node_modules/axios/lib/core/mergeConfig.js
@@ -0,0 +1,106 @@
+'use strict';
+
+import utils from '../utils.js';
+import AxiosHeaders from "./AxiosHeaders.js";
+
+const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
+
+/**
+ * Config-specific merge-function which creates a new config-object
+ * by merging two configuration objects together.
+ *
+ * @param {Object} config1
+ * @param {Object} config2
+ *
+ * @returns {Object} New object resulting from merging config2 to config1
+ */
+export default function mergeConfig(config1, config2) {
+ // eslint-disable-next-line no-param-reassign
+ config2 = config2 || {};
+ const config = {};
+
+ function getMergedValue(target, source, prop, caseless) {
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
+ return utils.merge.call({caseless}, target, source);
+ } else if (utils.isPlainObject(source)) {
+ return utils.merge({}, source);
+ } else if (utils.isArray(source)) {
+ return source.slice();
+ }
+ return source;
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDeepProperties(a, b, prop , caseless) {
+ if (!utils.isUndefined(b)) {
+ return getMergedValue(a, b, prop , caseless);
+ } else if (!utils.isUndefined(a)) {
+ return getMergedValue(undefined, a, prop , caseless);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function valueFromConfig2(a, b) {
+ if (!utils.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function defaultToConfig2(a, b) {
+ if (!utils.isUndefined(b)) {
+ return getMergedValue(undefined, b);
+ } else if (!utils.isUndefined(a)) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ // eslint-disable-next-line consistent-return
+ function mergeDirectKeys(a, b, prop) {
+ if (prop in config2) {
+ return getMergedValue(a, b);
+ } else if (prop in config1) {
+ return getMergedValue(undefined, a);
+ }
+ }
+
+ const mergeMap = {
+ url: valueFromConfig2,
+ method: valueFromConfig2,
+ data: valueFromConfig2,
+ baseURL: defaultToConfig2,
+ transformRequest: defaultToConfig2,
+ transformResponse: defaultToConfig2,
+ paramsSerializer: defaultToConfig2,
+ timeout: defaultToConfig2,
+ timeoutMessage: defaultToConfig2,
+ withCredentials: defaultToConfig2,
+ withXSRFToken: defaultToConfig2,
+ adapter: defaultToConfig2,
+ responseType: defaultToConfig2,
+ xsrfCookieName: defaultToConfig2,
+ xsrfHeaderName: defaultToConfig2,
+ onUploadProgress: defaultToConfig2,
+ onDownloadProgress: defaultToConfig2,
+ decompress: defaultToConfig2,
+ maxContentLength: defaultToConfig2,
+ maxBodyLength: defaultToConfig2,
+ beforeRedirect: defaultToConfig2,
+ transport: defaultToConfig2,
+ httpAgent: defaultToConfig2,
+ httpsAgent: defaultToConfig2,
+ cancelToken: defaultToConfig2,
+ socketPath: defaultToConfig2,
+ responseEncoding: defaultToConfig2,
+ validateStatus: mergeDirectKeys,
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
+ };
+
+ utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
+ const merge = mergeMap[prop] || mergeDeepProperties;
+ const configValue = merge(config1[prop], config2[prop], prop);
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
+ });
+
+ return config;
+}
diff --git a/node_modules/axios/lib/core/settle.js b/node_modules/axios/lib/core/settle.js
new file mode 100644
index 0000000..ac905c4
--- /dev/null
+++ b/node_modules/axios/lib/core/settle.js
@@ -0,0 +1,27 @@
+'use strict';
+
+import AxiosError from './AxiosError.js';
+
+/**
+ * Resolve or reject a Promise based on response status.
+ *
+ * @param {Function} resolve A function that resolves the promise.
+ * @param {Function} reject A function that rejects the promise.
+ * @param {object} response The response.
+ *
+ * @returns {object} The response.
+ */
+export default function settle(resolve, reject, response) {
+ const validateStatus = response.config.validateStatus;
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
+ resolve(response);
+ } else {
+ reject(new AxiosError(
+ 'Request failed with status code ' + response.status,
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
+ response.config,
+ response.request,
+ response
+ ));
+ }
+}
diff --git a/node_modules/axios/lib/core/transformData.js b/node_modules/axios/lib/core/transformData.js
new file mode 100644
index 0000000..eeb5a8a
--- /dev/null
+++ b/node_modules/axios/lib/core/transformData.js
@@ -0,0 +1,28 @@
+'use strict';
+
+import utils from './../utils.js';
+import defaults from '../defaults/index.js';
+import AxiosHeaders from '../core/AxiosHeaders.js';
+
+/**
+ * Transform the data for a request or a response
+ *
+ * @param {Array|Function} fns A single function or Array of functions
+ * @param {?Object} response The response object
+ *
+ * @returns {*} The resulting transformed data
+ */
+export default function transformData(fns, response) {
+ const config = this || defaults;
+ const context = response || config;
+ const headers = AxiosHeaders.from(context.headers);
+ let data = context.data;
+
+ utils.forEach(fns, function transform(fn) {
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+ });
+
+ headers.normalize();
+
+ return data;
+}
diff --git a/node_modules/axios/lib/defaults/index.js b/node_modules/axios/lib/defaults/index.js
new file mode 100644
index 0000000..e543fea
--- /dev/null
+++ b/node_modules/axios/lib/defaults/index.js
@@ -0,0 +1,161 @@
+'use strict';
+
+import utils from '../utils.js';
+import AxiosError from '../core/AxiosError.js';
+import transitionalDefaults from './transitional.js';
+import toFormData from '../helpers/toFormData.js';
+import toURLEncodedForm from '../helpers/toURLEncodedForm.js';
+import platform from '../platform/index.js';
+import formDataToJSON from '../helpers/formDataToJSON.js';
+
+/**
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+ * of the input
+ *
+ * @param {any} rawValue - The value to be stringified.
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
+ * @param {Function} encoder - A function that takes a value and returns a string.
+ *
+ * @returns {string} A stringified version of the rawValue.
+ */
+function stringifySafely(rawValue, parser, encoder) {
+ if (utils.isString(rawValue)) {
+ try {
+ (parser || JSON.parse)(rawValue);
+ return utils.trim(rawValue);
+ } catch (e) {
+ if (e.name !== 'SyntaxError') {
+ throw e;
+ }
+ }
+ }
+
+ return (encoder || JSON.stringify)(rawValue);
+}
+
+const defaults = {
+
+ transitional: transitionalDefaults,
+
+ adapter: ['xhr', 'http', 'fetch'],
+
+ transformRequest: [function transformRequest(data, headers) {
+ const contentType = headers.getContentType() || '';
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
+ const isObjectPayload = utils.isObject(data);
+
+ if (isObjectPayload && utils.isHTMLForm(data)) {
+ data = new FormData(data);
+ }
+
+ const isFormData = utils.isFormData(data);
+
+ if (isFormData) {
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+ }
+
+ if (utils.isArrayBuffer(data) ||
+ utils.isBuffer(data) ||
+ utils.isStream(data) ||
+ utils.isFile(data) ||
+ utils.isBlob(data) ||
+ utils.isReadableStream(data)
+ ) {
+ return data;
+ }
+ if (utils.isArrayBufferView(data)) {
+ return data.buffer;
+ }
+ if (utils.isURLSearchParams(data)) {
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+ return data.toString();
+ }
+
+ let isFileList;
+
+ if (isObjectPayload) {
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+ return toURLEncodedForm(data, this.formSerializer).toString();
+ }
+
+ if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+ const _FormData = this.env && this.env.FormData;
+
+ return toFormData(
+ isFileList ? {'files[]': data} : data,
+ _FormData && new _FormData(),
+ this.formSerializer
+ );
+ }
+ }
+
+ if (isObjectPayload || hasJSONContentType ) {
+ headers.setContentType('application/json', false);
+ return stringifySafely(data);
+ }
+
+ return data;
+ }],
+
+ transformResponse: [function transformResponse(data) {
+ const transitional = this.transitional || defaults.transitional;
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+ const JSONRequested = this.responseType === 'json';
+
+ if (utils.isResponse(data) || utils.isReadableStream(data)) {
+ return data;
+ }
+
+ if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
+
+ try {
+ return JSON.parse(data);
+ } catch (e) {
+ if (strictJSONParsing) {
+ if (e.name === 'SyntaxError') {
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
+ }
+ throw e;
+ }
+ }
+ }
+
+ return data;
+ }],
+
+ /**
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
+ * timeout is not created.
+ */
+ timeout: 0,
+
+ xsrfCookieName: 'XSRF-TOKEN',
+ xsrfHeaderName: 'X-XSRF-TOKEN',
+
+ maxContentLength: -1,
+ maxBodyLength: -1,
+
+ env: {
+ FormData: platform.classes.FormData,
+ Blob: platform.classes.Blob
+ },
+
+ validateStatus: function validateStatus(status) {
+ return status >= 200 && status < 300;
+ },
+
+ headers: {
+ common: {
+ 'Accept': 'application/json, text/plain, */*',
+ 'Content-Type': undefined
+ }
+ }
+};
+
+utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
+ defaults.headers[method] = {};
+});
+
+export default defaults;
diff --git a/node_modules/axios/lib/defaults/transitional.js b/node_modules/axios/lib/defaults/transitional.js
new file mode 100644
index 0000000..f891331
--- /dev/null
+++ b/node_modules/axios/lib/defaults/transitional.js
@@ -0,0 +1,7 @@
+'use strict';
+
+export default {
+ silentJSONParsing: true,
+ forcedJSONParsing: true,
+ clarifyTimeoutError: false
+};
diff --git a/node_modules/axios/lib/env/README.md b/node_modules/axios/lib/env/README.md
new file mode 100644
index 0000000..b41baff
--- /dev/null
+++ b/node_modules/axios/lib/env/README.md
@@ -0,0 +1,3 @@
+# axios // env
+
+The `data.js` file is updated automatically when the package version is upgrading. Please do not edit it manually.
diff --git a/node_modules/axios/lib/env/classes/FormData.js b/node_modules/axios/lib/env/classes/FormData.js
new file mode 100644
index 0000000..862adb9
--- /dev/null
+++ b/node_modules/axios/lib/env/classes/FormData.js
@@ -0,0 +1,2 @@
+import _FormData from 'form-data';
+export default typeof FormData !== 'undefined' ? FormData : _FormData;
diff --git a/node_modules/axios/lib/env/data.js b/node_modules/axios/lib/env/data.js
new file mode 100644
index 0000000..28eb8d1
--- /dev/null
+++ b/node_modules/axios/lib/env/data.js
@@ -0,0 +1 @@
+export const VERSION = "1.7.9";
\ No newline at end of file
diff --git a/node_modules/axios/lib/helpers/AxiosTransformStream.js b/node_modules/axios/lib/helpers/AxiosTransformStream.js
new file mode 100644
index 0000000..4140071
--- /dev/null
+++ b/node_modules/axios/lib/helpers/AxiosTransformStream.js
@@ -0,0 +1,143 @@
+'use strict';
+
+import stream from 'stream';
+import utils from '../utils.js';
+
+const kInternals = Symbol('internals');
+
+class AxiosTransformStream extends stream.Transform{
+ constructor(options) {
+ options = utils.toFlatObject(options, {
+ maxRate: 0,
+ chunkSize: 64 * 1024,
+ minChunkSize: 100,
+ timeWindow: 500,
+ ticksRate: 2,
+ samplesCount: 15
+ }, null, (prop, source) => {
+ return !utils.isUndefined(source[prop]);
+ });
+
+ super({
+ readableHighWaterMark: options.chunkSize
+ });
+
+ const internals = this[kInternals] = {
+ timeWindow: options.timeWindow,
+ chunkSize: options.chunkSize,
+ maxRate: options.maxRate,
+ minChunkSize: options.minChunkSize,
+ bytesSeen: 0,
+ isCaptured: false,
+ notifiedBytesLoaded: 0,
+ ts: Date.now(),
+ bytes: 0,
+ onReadCallback: null
+ };
+
+ this.on('newListener', event => {
+ if (event === 'progress') {
+ if (!internals.isCaptured) {
+ internals.isCaptured = true;
+ }
+ }
+ });
+ }
+
+ _read(size) {
+ const internals = this[kInternals];
+
+ if (internals.onReadCallback) {
+ internals.onReadCallback();
+ }
+
+ return super._read(size);
+ }
+
+ _transform(chunk, encoding, callback) {
+ const internals = this[kInternals];
+ const maxRate = internals.maxRate;
+
+ const readableHighWaterMark = this.readableHighWaterMark;
+
+ const timeWindow = internals.timeWindow;
+
+ const divider = 1000 / timeWindow;
+ const bytesThreshold = (maxRate / divider);
+ const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;
+
+ const pushChunk = (_chunk, _callback) => {
+ const bytes = Buffer.byteLength(_chunk);
+ internals.bytesSeen += bytes;
+ internals.bytes += bytes;
+
+ internals.isCaptured && this.emit('progress', internals.bytesSeen);
+
+ if (this.push(_chunk)) {
+ process.nextTick(_callback);
+ } else {
+ internals.onReadCallback = () => {
+ internals.onReadCallback = null;
+ process.nextTick(_callback);
+ };
+ }
+ }
+
+ const transformChunk = (_chunk, _callback) => {
+ const chunkSize = Buffer.byteLength(_chunk);
+ let chunkRemainder = null;
+ let maxChunkSize = readableHighWaterMark;
+ let bytesLeft;
+ let passed = 0;
+
+ if (maxRate) {
+ const now = Date.now();
+
+ if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {
+ internals.ts = now;
+ bytesLeft = bytesThreshold - internals.bytes;
+ internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;
+ passed = 0;
+ }
+
+ bytesLeft = bytesThreshold - internals.bytes;
+ }
+
+ if (maxRate) {
+ if (bytesLeft <= 0) {
+ // next time window
+ return setTimeout(() => {
+ _callback(null, _chunk);
+ }, timeWindow - passed);
+ }
+
+ if (bytesLeft < maxChunkSize) {
+ maxChunkSize = bytesLeft;
+ }
+ }
+
+ if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {
+ chunkRemainder = _chunk.subarray(maxChunkSize);
+ _chunk = _chunk.subarray(0, maxChunkSize);
+ }
+
+ pushChunk(_chunk, chunkRemainder ? () => {
+ process.nextTick(_callback, null, chunkRemainder);
+ } : _callback);
+ };
+
+ transformChunk(chunk, function transformNextChunk(err, _chunk) {
+ if (err) {
+ return callback(err);
+ }
+
+ if (_chunk) {
+ transformChunk(_chunk, transformNextChunk);
+ } else {
+ callback(null);
+ }
+ });
+ }
+}
+
+export default AxiosTransformStream;
diff --git a/node_modules/axios/lib/helpers/AxiosURLSearchParams.js b/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
new file mode 100644
index 0000000..b9aa9f0
--- /dev/null
+++ b/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
@@ -0,0 +1,58 @@
+'use strict';
+
+import toFormData from './toFormData.js';
+
+/**
+ * It encodes a string by replacing all characters that are not in the unreserved set with
+ * their percent-encoded equivalents
+ *
+ * @param {string} str - The string to encode.
+ *
+ * @returns {string} The encoded string.
+ */
+function encode(str) {
+ const charMap = {
+ '!': '%21',
+ "'": '%27',
+ '(': '%28',
+ ')': '%29',
+ '~': '%7E',
+ '%20': '+',
+ '%00': '\x00'
+ };
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+ return charMap[match];
+ });
+}
+
+/**
+ * It takes a params object and converts it to a FormData object
+ *
+ * @param {Object} params - The parameters to be converted to a FormData object.
+ * @param {Object} options - The options object passed to the Axios constructor.
+ *
+ * @returns {void}
+ */
+function AxiosURLSearchParams(params, options) {
+ this._pairs = [];
+
+ params && toFormData(params, this, options);
+}
+
+const prototype = AxiosURLSearchParams.prototype;
+
+prototype.append = function append(name, value) {
+ this._pairs.push([name, value]);
+};
+
+prototype.toString = function toString(encoder) {
+ const _encode = encoder ? function(value) {
+ return encoder.call(this, value, encode);
+ } : encode;
+
+ return this._pairs.map(function each(pair) {
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
+ }, '').join('&');
+};
+
+export default AxiosURLSearchParams;
diff --git a/node_modules/axios/lib/helpers/HttpStatusCode.js b/node_modules/axios/lib/helpers/HttpStatusCode.js
new file mode 100644
index 0000000..b3e7adc
--- /dev/null
+++ b/node_modules/axios/lib/helpers/HttpStatusCode.js
@@ -0,0 +1,71 @@
+const HttpStatusCode = {
+ Continue: 100,
+ SwitchingProtocols: 101,
+ Processing: 102,
+ EarlyHints: 103,
+ Ok: 200,
+ Created: 201,
+ Accepted: 202,
+ NonAuthoritativeInformation: 203,
+ NoContent: 204,
+ ResetContent: 205,
+ PartialContent: 206,
+ MultiStatus: 207,
+ AlreadyReported: 208,
+ ImUsed: 226,
+ MultipleChoices: 300,
+ MovedPermanently: 301,
+ Found: 302,
+ SeeOther: 303,
+ NotModified: 304,
+ UseProxy: 305,
+ Unused: 306,
+ TemporaryRedirect: 307,
+ PermanentRedirect: 308,
+ BadRequest: 400,
+ Unauthorized: 401,
+ PaymentRequired: 402,
+ Forbidden: 403,
+ NotFound: 404,
+ MethodNotAllowed: 405,
+ NotAcceptable: 406,
+ ProxyAuthenticationRequired: 407,
+ RequestTimeout: 408,
+ Conflict: 409,
+ Gone: 410,
+ LengthRequired: 411,
+ PreconditionFailed: 412,
+ PayloadTooLarge: 413,
+ UriTooLong: 414,
+ UnsupportedMediaType: 415,
+ RangeNotSatisfiable: 416,
+ ExpectationFailed: 417,
+ ImATeapot: 418,
+ MisdirectedRequest: 421,
+ UnprocessableEntity: 422,
+ Locked: 423,
+ FailedDependency: 424,
+ TooEarly: 425,
+ UpgradeRequired: 426,
+ PreconditionRequired: 428,
+ TooManyRequests: 429,
+ RequestHeaderFieldsTooLarge: 431,
+ UnavailableForLegalReasons: 451,
+ InternalServerError: 500,
+ NotImplemented: 501,
+ BadGateway: 502,
+ ServiceUnavailable: 503,
+ GatewayTimeout: 504,
+ HttpVersionNotSupported: 505,
+ VariantAlsoNegotiates: 506,
+ InsufficientStorage: 507,
+ LoopDetected: 508,
+ NotExtended: 510,
+ NetworkAuthenticationRequired: 511,
+};
+
+Object.entries(HttpStatusCode).forEach(([key, value]) => {
+ HttpStatusCode[value] = key;
+});
+
+export default HttpStatusCode;
diff --git a/node_modules/axios/lib/helpers/README.md b/node_modules/axios/lib/helpers/README.md
new file mode 100644
index 0000000..4ae3419
--- /dev/null
+++ b/node_modules/axios/lib/helpers/README.md
@@ -0,0 +1,7 @@
+# axios // helpers
+
+The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like:
+
+- Browser polyfills
+- Managing cookies
+- Parsing HTTP headers
diff --git a/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js b/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
new file mode 100644
index 0000000..d1791f0
--- /dev/null
+++ b/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
@@ -0,0 +1,28 @@
+"use strict";
+
+import stream from "stream";
+
+class ZlibHeaderTransformStream extends stream.Transform {
+ __transform(chunk, encoding, callback) {
+ this.push(chunk);
+ callback();
+ }
+
+ _transform(chunk, encoding, callback) {
+ if (chunk.length !== 0) {
+ this._transform = this.__transform;
+
+ // Add Default Compression headers if no zlib headers are present
+ if (chunk[0] !== 120) { // Hex: 78
+ const header = Buffer.alloc(2);
+ header[0] = 120; // Hex: 78
+ header[1] = 156; // Hex: 9C
+ this.push(header, encoding);
+ }
+ }
+
+ this.__transform(chunk, encoding, callback);
+ }
+}
+
+export default ZlibHeaderTransformStream;
diff --git a/node_modules/axios/lib/helpers/bind.js b/node_modules/axios/lib/helpers/bind.js
new file mode 100644
index 0000000..b3aa83b
--- /dev/null
+++ b/node_modules/axios/lib/helpers/bind.js
@@ -0,0 +1,7 @@
+'use strict';
+
+export default function bind(fn, thisArg) {
+ return function wrap() {
+ return fn.apply(thisArg, arguments);
+ };
+}
diff --git a/node_modules/axios/lib/helpers/buildURL.js b/node_modules/axios/lib/helpers/buildURL.js
new file mode 100644
index 0000000..5c5eb57
--- /dev/null
+++ b/node_modules/axios/lib/helpers/buildURL.js
@@ -0,0 +1,69 @@
+'use strict';
+
+import utils from '../utils.js';
+import AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';
+
+/**
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+ * URI encoded counterparts
+ *
+ * @param {string} val The value to be encoded.
+ *
+ * @returns {string} The encoded value.
+ */
+function encode(val) {
+ return encodeURIComponent(val).
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace(/%20/g, '+').
+ replace(/%5B/gi, '[').
+ replace(/%5D/gi, ']');
+}
+
+/**
+ * Build a URL by appending params to the end
+ *
+ * @param {string} url The base of the url (e.g., http://www.google.com)
+ * @param {object} [params] The params to be appended
+ * @param {?(object|Function)} options
+ *
+ * @returns {string} The formatted url
+ */
+export default function buildURL(url, params, options) {
+ /*eslint no-param-reassign:0*/
+ if (!params) {
+ return url;
+ }
+
+ const _encode = options && options.encode || encode;
+
+ if (utils.isFunction(options)) {
+ options = {
+ serialize: options
+ };
+ }
+
+ const serializeFn = options && options.serialize;
+
+ let serializedParams;
+
+ if (serializeFn) {
+ serializedParams = serializeFn(params, options);
+ } else {
+ serializedParams = utils.isURLSearchParams(params) ?
+ params.toString() :
+ new AxiosURLSearchParams(params, options).toString(_encode);
+ }
+
+ if (serializedParams) {
+ const hashmarkIndex = url.indexOf("#");
+
+ if (hashmarkIndex !== -1) {
+ url = url.slice(0, hashmarkIndex);
+ }
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+ }
+
+ return url;
+}
diff --git a/node_modules/axios/lib/helpers/callbackify.js b/node_modules/axios/lib/helpers/callbackify.js
new file mode 100644
index 0000000..4603bad
--- /dev/null
+++ b/node_modules/axios/lib/helpers/callbackify.js
@@ -0,0 +1,16 @@
+import utils from "../utils.js";
+
+const callbackify = (fn, reducer) => {
+ return utils.isAsyncFn(fn) ? function (...args) {
+ const cb = args.pop();
+ fn.apply(this, args).then((value) => {
+ try {
+ reducer ? cb(null, ...reducer(value)) : cb(null, value);
+ } catch (err) {
+ cb(err);
+ }
+ }, cb);
+ } : fn;
+}
+
+export default callbackify;
diff --git a/node_modules/axios/lib/helpers/combineURLs.js b/node_modules/axios/lib/helpers/combineURLs.js
new file mode 100644
index 0000000..9f04f02
--- /dev/null
+++ b/node_modules/axios/lib/helpers/combineURLs.js
@@ -0,0 +1,15 @@
+'use strict';
+
+/**
+ * Creates a new URL by combining the specified URLs
+ *
+ * @param {string} baseURL The base URL
+ * @param {string} relativeURL The relative URL
+ *
+ * @returns {string} The combined URL
+ */
+export default function combineURLs(baseURL, relativeURL) {
+ return relativeURL
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
+ : baseURL;
+}
diff --git a/node_modules/axios/lib/helpers/composeSignals.js b/node_modules/axios/lib/helpers/composeSignals.js
new file mode 100644
index 0000000..84087c8
--- /dev/null
+++ b/node_modules/axios/lib/helpers/composeSignals.js
@@ -0,0 +1,48 @@
+import CanceledError from "../cancel/CanceledError.js";
+import AxiosError from "../core/AxiosError.js";
+import utils from '../utils.js';
+
+const composeSignals = (signals, timeout) => {
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
+
+ if (timeout || length) {
+ let controller = new AbortController();
+
+ let aborted;
+
+ const onabort = function (reason) {
+ if (!aborted) {
+ aborted = true;
+ unsubscribe();
+ const err = reason instanceof Error ? reason : this.reason;
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
+ }
+ }
+
+ let timer = timeout && setTimeout(() => {
+ timer = null;
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))
+ }, timeout)
+
+ const unsubscribe = () => {
+ if (signals) {
+ timer && clearTimeout(timer);
+ timer = null;
+ signals.forEach(signal => {
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+ });
+ signals = null;
+ }
+ }
+
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
+
+ const {signal} = controller;
+
+ signal.unsubscribe = () => utils.asap(unsubscribe);
+
+ return signal;
+ }
+}
+
+export default composeSignals;
diff --git a/node_modules/axios/lib/helpers/cookies.js b/node_modules/axios/lib/helpers/cookies.js
new file mode 100644
index 0000000..d039ac4
--- /dev/null
+++ b/node_modules/axios/lib/helpers/cookies.js
@@ -0,0 +1,42 @@
+import utils from './../utils.js';
+import platform from '../platform/index.js';
+
+export default platform.hasStandardBrowserEnv ?
+
+ // Standard browser envs support document.cookie
+ {
+ write(name, value, expires, path, domain, secure) {
+ const cookie = [name + '=' + encodeURIComponent(value)];
+
+ utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
+
+ utils.isString(path) && cookie.push('path=' + path);
+
+ utils.isString(domain) && cookie.push('domain=' + domain);
+
+ secure === true && cookie.push('secure');
+
+ document.cookie = cookie.join('; ');
+ },
+
+ read(name) {
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
+ return (match ? decodeURIComponent(match[3]) : null);
+ },
+
+ remove(name) {
+ this.write(name, '', Date.now() - 86400000);
+ }
+ }
+
+ :
+
+ // Non-standard browser env (web workers, react-native) lack needed support.
+ {
+ write() {},
+ read() {
+ return null;
+ },
+ remove() {}
+ };
+
diff --git a/node_modules/axios/lib/helpers/deprecatedMethod.js b/node_modules/axios/lib/helpers/deprecatedMethod.js
new file mode 100644
index 0000000..9e8fae6
--- /dev/null
+++ b/node_modules/axios/lib/helpers/deprecatedMethod.js
@@ -0,0 +1,26 @@
+'use strict';
+
+/*eslint no-console:0*/
+
+/**
+ * Supply a warning to the developer that a method they are using
+ * has been deprecated.
+ *
+ * @param {string} method The name of the deprecated method
+ * @param {string} [instead] The alternate method to use if applicable
+ * @param {string} [docs] The documentation URL to get further details
+ *
+ * @returns {void}
+ */
+export default function deprecatedMethod(method, instead, docs) {
+ try {
+ console.warn(
+ 'DEPRECATED method `' + method + '`.' +
+ (instead ? ' Use `' + instead + '` instead.' : '') +
+ ' This method will be removed in a future release.');
+
+ if (docs) {
+ console.warn('For more information about usage see ' + docs);
+ }
+ } catch (e) { /* Ignore */ }
+}
diff --git a/node_modules/axios/lib/helpers/formDataToJSON.js b/node_modules/axios/lib/helpers/formDataToJSON.js
new file mode 100644
index 0000000..906ce60
--- /dev/null
+++ b/node_modules/axios/lib/helpers/formDataToJSON.js
@@ -0,0 +1,95 @@
+'use strict';
+
+import utils from '../utils.js';
+
+/**
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+ *
+ * @param {string} name - The name of the property to get.
+ *
+ * @returns An array of strings.
+ */
+function parsePropPath(name) {
+ // foo[x][y][z]
+ // foo.x.y.z
+ // foo-x-y-z
+ // foo x y z
+ return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
+ return match[0] === '[]' ? '' : match[1] || match[0];
+ });
+}
+
+/**
+ * Convert an array to an object.
+ *
+ * @param {Array} arr - The array to convert to an object.
+ *
+ * @returns An object with the same keys and values as the array.
+ */
+function arrayToObject(arr) {
+ const obj = {};
+ const keys = Object.keys(arr);
+ let i;
+ const len = keys.length;
+ let key;
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ obj[key] = arr[key];
+ }
+ return obj;
+}
+
+/**
+ * It takes a FormData object and returns a JavaScript object
+ *
+ * @param {string} formData The FormData object to convert to JSON.
+ *
+ * @returns {Object | null} The converted object.
+ */
+function formDataToJSON(formData) {
+ function buildPath(path, value, target, index) {
+ let name = path[index++];
+
+ if (name === '__proto__') return true;
+
+ const isNumericKey = Number.isFinite(+name);
+ const isLast = index >= path.length;
+ name = !name && utils.isArray(target) ? target.length : name;
+
+ if (isLast) {
+ if (utils.hasOwnProp(target, name)) {
+ target[name] = [target[name], value];
+ } else {
+ target[name] = value;
+ }
+
+ return !isNumericKey;
+ }
+
+ if (!target[name] || !utils.isObject(target[name])) {
+ target[name] = [];
+ }
+
+ const result = buildPath(path, value, target[name], index);
+
+ if (result && utils.isArray(target[name])) {
+ target[name] = arrayToObject(target[name]);
+ }
+
+ return !isNumericKey;
+ }
+
+ if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
+ const obj = {};
+
+ utils.forEachEntry(formData, (name, value) => {
+ buildPath(parsePropPath(name), value, obj, 0);
+ });
+
+ return obj;
+ }
+
+ return null;
+}
+
+export default formDataToJSON;
diff --git a/node_modules/axios/lib/helpers/formDataToStream.js b/node_modules/axios/lib/helpers/formDataToStream.js
new file mode 100644
index 0000000..77ffab1
--- /dev/null
+++ b/node_modules/axios/lib/helpers/formDataToStream.js
@@ -0,0 +1,111 @@
+import util from 'util';
+import {Readable} from 'stream';
+import utils from "../utils.js";
+import readBlob from "./readBlob.js";
+
+const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
+
+const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
+
+const CRLF = '\r\n';
+const CRLF_BYTES = textEncoder.encode(CRLF);
+const CRLF_BYTES_COUNT = 2;
+
+class FormDataPart {
+ constructor(name, value) {
+ const {escapeName} = this.constructor;
+ const isStringValue = utils.isString(value);
+
+ let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${
+ !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''
+ }${CRLF}`;
+
+ if (isStringValue) {
+ value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
+ } else {
+ headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`
+ }
+
+ this.headers = textEncoder.encode(headers + CRLF);
+
+ this.contentLength = isStringValue ? value.byteLength : value.size;
+
+ this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
+
+ this.name = name;
+ this.value = value;
+ }
+
+ async *encode(){
+ yield this.headers;
+
+ const {value} = this;
+
+ if(utils.isTypedArray(value)) {
+ yield value;
+ } else {
+ yield* readBlob(value);
+ }
+
+ yield CRLF_BYTES;
+ }
+
+ static escapeName(name) {
+ return String(name).replace(/[\r\n"]/g, (match) => ({
+ '\r' : '%0D',
+ '\n' : '%0A',
+ '"' : '%22',
+ }[match]));
+ }
+}
+
+const formDataToStream = (form, headersHandler, options) => {
+ const {
+ tag = 'form-data-boundary',
+ size = 25,
+ boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
+ } = options || {};
+
+ if(!utils.isFormData(form)) {
+ throw TypeError('FormData instance required');
+ }
+
+ if (boundary.length < 1 || boundary.length > 70) {
+ throw Error('boundary must be 10-70 characters long')
+ }
+
+ const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
+ const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
+ let contentLength = footerBytes.byteLength;
+
+ const parts = Array.from(form.entries()).map(([name, value]) => {
+ const part = new FormDataPart(name, value);
+ contentLength += part.size;
+ return part;
+ });
+
+ contentLength += boundaryBytes.byteLength * parts.length;
+
+ contentLength = utils.toFiniteNumber(contentLength);
+
+ const computedHeaders = {
+ 'Content-Type': `multipart/form-data; boundary=${boundary}`
+ }
+
+ if (Number.isFinite(contentLength)) {
+ computedHeaders['Content-Length'] = contentLength;
+ }
+
+ headersHandler && headersHandler(computedHeaders);
+
+ return Readable.from((async function *() {
+ for(const part of parts) {
+ yield boundaryBytes;
+ yield* part.encode();
+ }
+
+ yield footerBytes;
+ })());
+};
+
+export default formDataToStream;
diff --git a/node_modules/axios/lib/helpers/fromDataURI.js b/node_modules/axios/lib/helpers/fromDataURI.js
new file mode 100644
index 0000000..eb71d3f
--- /dev/null
+++ b/node_modules/axios/lib/helpers/fromDataURI.js
@@ -0,0 +1,53 @@
+'use strict';
+
+import AxiosError from '../core/AxiosError.js';
+import parseProtocol from './parseProtocol.js';
+import platform from '../platform/index.js';
+
+const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
+
+/**
+ * Parse data uri to a Buffer or Blob
+ *
+ * @param {String} uri
+ * @param {?Boolean} asBlob
+ * @param {?Object} options
+ * @param {?Function} options.Blob
+ *
+ * @returns {Buffer|Blob}
+ */
+export default function fromDataURI(uri, asBlob, options) {
+ const _Blob = options && options.Blob || platform.classes.Blob;
+ const protocol = parseProtocol(uri);
+
+ if (asBlob === undefined && _Blob) {
+ asBlob = true;
+ }
+
+ if (protocol === 'data') {
+ uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
+
+ const match = DATA_URL_PATTERN.exec(uri);
+
+ if (!match) {
+ throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
+ }
+
+ const mime = match[1];
+ const isBase64 = match[2];
+ const body = match[3];
+ const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
+
+ if (asBlob) {
+ if (!_Blob) {
+ throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
+ }
+
+ return new _Blob([buffer], {type: mime});
+ }
+
+ return buffer;
+ }
+
+ throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
+}
diff --git a/node_modules/axios/lib/helpers/isAbsoluteURL.js b/node_modules/axios/lib/helpers/isAbsoluteURL.js
new file mode 100644
index 0000000..4747a45
--- /dev/null
+++ b/node_modules/axios/lib/helpers/isAbsoluteURL.js
@@ -0,0 +1,15 @@
+'use strict';
+
+/**
+ * Determines whether the specified URL is absolute
+ *
+ * @param {string} url The URL to test
+ *
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
+ */
+export default function isAbsoluteURL(url) {
+ // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL).
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+ // by any combination of letters, digits, plus, period, or hyphen.
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+}
diff --git a/node_modules/axios/lib/helpers/isAxiosError.js b/node_modules/axios/lib/helpers/isAxiosError.js
new file mode 100644
index 0000000..da6cd63
--- /dev/null
+++ b/node_modules/axios/lib/helpers/isAxiosError.js
@@ -0,0 +1,14 @@
+'use strict';
+
+import utils from './../utils.js';
+
+/**
+ * Determines whether the payload is an error thrown by Axios
+ *
+ * @param {*} payload The value to test
+ *
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
+ */
+export default function isAxiosError(payload) {
+ return utils.isObject(payload) && (payload.isAxiosError === true);
+}
diff --git a/node_modules/axios/lib/helpers/isURLSameOrigin.js b/node_modules/axios/lib/helpers/isURLSameOrigin.js
new file mode 100644
index 0000000..6a92aa1
--- /dev/null
+++ b/node_modules/axios/lib/helpers/isURLSameOrigin.js
@@ -0,0 +1,14 @@
+import platform from '../platform/index.js';
+
+export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
+ url = new URL(url, platform.origin);
+
+ return (
+ origin.protocol === url.protocol &&
+ origin.host === url.host &&
+ (isMSIE || origin.port === url.port)
+ );
+})(
+ new URL(platform.origin),
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
+) : () => true;
diff --git a/node_modules/axios/lib/helpers/null.js b/node_modules/axios/lib/helpers/null.js
new file mode 100644
index 0000000..b9f82c4
--- /dev/null
+++ b/node_modules/axios/lib/helpers/null.js
@@ -0,0 +1,2 @@
+// eslint-disable-next-line strict
+export default null;
diff --git a/node_modules/axios/lib/helpers/parseHeaders.js b/node_modules/axios/lib/helpers/parseHeaders.js
new file mode 100644
index 0000000..50af948
--- /dev/null
+++ b/node_modules/axios/lib/helpers/parseHeaders.js
@@ -0,0 +1,55 @@
+'use strict';
+
+import utils from './../utils.js';
+
+// RawAxiosHeaders whose duplicates are ignored by node
+// c.f. https://nodejs.org/api/http.html#http_message_headers
+const ignoreDuplicateOf = utils.toObjectSet([
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
+ 'referer', 'retry-after', 'user-agent'
+]);
+
+/**
+ * Parse headers into an object
+ *
+ * ```
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
+ * Content-Type: application/json
+ * Connection: keep-alive
+ * Transfer-Encoding: chunked
+ * ```
+ *
+ * @param {String} rawHeaders Headers needing to be parsed
+ *
+ * @returns {Object} Headers parsed into an object
+ */
+export default rawHeaders => {
+ const parsed = {};
+ let key;
+ let val;
+ let i;
+
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+ i = line.indexOf(':');
+ key = line.substring(0, i).trim().toLowerCase();
+ val = line.substring(i + 1).trim();
+
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
+ return;
+ }
+
+ if (key === 'set-cookie') {
+ if (parsed[key]) {
+ parsed[key].push(val);
+ } else {
+ parsed[key] = [val];
+ }
+ } else {
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
+ }
+ });
+
+ return parsed;
+};
diff --git a/node_modules/axios/lib/helpers/parseProtocol.js b/node_modules/axios/lib/helpers/parseProtocol.js
new file mode 100644
index 0000000..586ec96
--- /dev/null
+++ b/node_modules/axios/lib/helpers/parseProtocol.js
@@ -0,0 +1,6 @@
+'use strict';
+
+export default function parseProtocol(url) {
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+ return match && match[1] || '';
+}
diff --git a/node_modules/axios/lib/helpers/progressEventReducer.js b/node_modules/axios/lib/helpers/progressEventReducer.js
new file mode 100644
index 0000000..ff601cc
--- /dev/null
+++ b/node_modules/axios/lib/helpers/progressEventReducer.js
@@ -0,0 +1,44 @@
+import speedometer from "./speedometer.js";
+import throttle from "./throttle.js";
+import utils from "../utils.js";
+
+export const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
+ let bytesNotified = 0;
+ const _speedometer = speedometer(50, 250);
+
+ return throttle(e => {
+ const loaded = e.loaded;
+ const total = e.lengthComputable ? e.total : undefined;
+ const progressBytes = loaded - bytesNotified;
+ const rate = _speedometer(progressBytes);
+ const inRange = loaded <= total;
+
+ bytesNotified = loaded;
+
+ const data = {
+ loaded,
+ total,
+ progress: total ? (loaded / total) : undefined,
+ bytes: progressBytes,
+ rate: rate ? rate : undefined,
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
+ event: e,
+ lengthComputable: total != null,
+ [isDownloadStream ? 'download' : 'upload']: true
+ };
+
+ listener(data);
+ }, freq);
+}
+
+export const progressEventDecorator = (total, throttled) => {
+ const lengthComputable = total != null;
+
+ return [(loaded) => throttled[0]({
+ lengthComputable,
+ total,
+ loaded
+ }), throttled[1]];
+}
+
+export const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));
diff --git a/node_modules/axios/lib/helpers/readBlob.js b/node_modules/axios/lib/helpers/readBlob.js
new file mode 100644
index 0000000..6de748e
--- /dev/null
+++ b/node_modules/axios/lib/helpers/readBlob.js
@@ -0,0 +1,15 @@
+const {asyncIterator} = Symbol;
+
+const readBlob = async function* (blob) {
+ if (blob.stream) {
+ yield* blob.stream()
+ } else if (blob.arrayBuffer) {
+ yield await blob.arrayBuffer()
+ } else if (blob[asyncIterator]) {
+ yield* blob[asyncIterator]();
+ } else {
+ yield blob;
+ }
+}
+
+export default readBlob;
diff --git a/node_modules/axios/lib/helpers/resolveConfig.js b/node_modules/axios/lib/helpers/resolveConfig.js
new file mode 100644
index 0000000..5e84c5c
--- /dev/null
+++ b/node_modules/axios/lib/helpers/resolveConfig.js
@@ -0,0 +1,57 @@
+import platform from "../platform/index.js";
+import utils from "../utils.js";
+import isURLSameOrigin from "./isURLSameOrigin.js";
+import cookies from "./cookies.js";
+import buildFullPath from "../core/buildFullPath.js";
+import mergeConfig from "../core/mergeConfig.js";
+import AxiosHeaders from "../core/AxiosHeaders.js";
+import buildURL from "./buildURL.js";
+
+export default (config) => {
+ const newConfig = mergeConfig({}, config);
+
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
+
+ newConfig.headers = headers = AxiosHeaders.from(headers);
+
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
+
+ // HTTP basic authentication
+ if (auth) {
+ headers.set('Authorization', 'Basic ' +
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
+ );
+ }
+
+ let contentType;
+
+ if (utils.isFormData(data)) {
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+ headers.setContentType(undefined); // Let the browser set it
+ } else if ((contentType = headers.getContentType()) !== false) {
+ // fix semicolon duplication issue for ReactNative FormData implementation
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
+ }
+ }
+
+ // Add xsrf header
+ // This is only done if running in a standard browser environment.
+ // Specifically not if we're in a web worker, or react-native.
+
+ if (platform.hasStandardBrowserEnv) {
+ withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
+ // Add xsrf header
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+
+ if (xsrfValue) {
+ headers.set(xsrfHeaderName, xsrfValue);
+ }
+ }
+ }
+
+ return newConfig;
+}
+
diff --git a/node_modules/axios/lib/helpers/speedometer.js b/node_modules/axios/lib/helpers/speedometer.js
new file mode 100644
index 0000000..3b3c666
--- /dev/null
+++ b/node_modules/axios/lib/helpers/speedometer.js
@@ -0,0 +1,55 @@
+'use strict';
+
+/**
+ * Calculate data maxRate
+ * @param {Number} [samplesCount= 10]
+ * @param {Number} [min= 1000]
+ * @returns {Function}
+ */
+function speedometer(samplesCount, min) {
+ samplesCount = samplesCount || 10;
+ const bytes = new Array(samplesCount);
+ const timestamps = new Array(samplesCount);
+ let head = 0;
+ let tail = 0;
+ let firstSampleTS;
+
+ min = min !== undefined ? min : 1000;
+
+ return function push(chunkLength) {
+ const now = Date.now();
+
+ const startedAt = timestamps[tail];
+
+ if (!firstSampleTS) {
+ firstSampleTS = now;
+ }
+
+ bytes[head] = chunkLength;
+ timestamps[head] = now;
+
+ let i = tail;
+ let bytesCount = 0;
+
+ while (i !== head) {
+ bytesCount += bytes[i++];
+ i = i % samplesCount;
+ }
+
+ head = (head + 1) % samplesCount;
+
+ if (head === tail) {
+ tail = (tail + 1) % samplesCount;
+ }
+
+ if (now - firstSampleTS < min) {
+ return;
+ }
+
+ const passed = startedAt && now - startedAt;
+
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+ };
+}
+
+export default speedometer;
diff --git a/node_modules/axios/lib/helpers/spread.js b/node_modules/axios/lib/helpers/spread.js
new file mode 100644
index 0000000..13479cb
--- /dev/null
+++ b/node_modules/axios/lib/helpers/spread.js
@@ -0,0 +1,28 @@
+'use strict';
+
+/**
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
+ *
+ * Common use case would be to use `Function.prototype.apply`.
+ *
+ * ```js
+ * function f(x, y, z) {}
+ * var args = [1, 2, 3];
+ * f.apply(null, args);
+ * ```
+ *
+ * With `spread` this example can be re-written.
+ *
+ * ```js
+ * spread(function(x, y, z) {})([1, 2, 3]);
+ * ```
+ *
+ * @param {Function} callback
+ *
+ * @returns {Function}
+ */
+export default function spread(callback) {
+ return function wrap(arr) {
+ return callback.apply(null, arr);
+ };
+}
diff --git a/node_modules/axios/lib/helpers/throttle.js b/node_modules/axios/lib/helpers/throttle.js
new file mode 100644
index 0000000..e256272
--- /dev/null
+++ b/node_modules/axios/lib/helpers/throttle.js
@@ -0,0 +1,44 @@
+/**
+ * Throttle decorator
+ * @param {Function} fn
+ * @param {Number} freq
+ * @return {Function}
+ */
+function throttle(fn, freq) {
+ let timestamp = 0;
+ let threshold = 1000 / freq;
+ let lastArgs;
+ let timer;
+
+ const invoke = (args, now = Date.now()) => {
+ timestamp = now;
+ lastArgs = null;
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ fn.apply(null, args);
+ }
+
+ const throttled = (...args) => {
+ const now = Date.now();
+ const passed = now - timestamp;
+ if ( passed >= threshold) {
+ invoke(args, now);
+ } else {
+ lastArgs = args;
+ if (!timer) {
+ timer = setTimeout(() => {
+ timer = null;
+ invoke(lastArgs)
+ }, threshold - passed);
+ }
+ }
+ }
+
+ const flush = () => lastArgs && invoke(lastArgs);
+
+ return [throttled, flush];
+}
+
+export default throttle;
diff --git a/node_modules/axios/lib/helpers/toFormData.js b/node_modules/axios/lib/helpers/toFormData.js
new file mode 100644
index 0000000..a41e966
--- /dev/null
+++ b/node_modules/axios/lib/helpers/toFormData.js
@@ -0,0 +1,219 @@
+'use strict';
+
+import utils from '../utils.js';
+import AxiosError from '../core/AxiosError.js';
+// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
+import PlatformFormData from '../platform/node/classes/FormData.js';
+
+/**
+ * Determines if the given thing is a array or js object.
+ *
+ * @param {string} thing - The object or array to be visited.
+ *
+ * @returns {boolean}
+ */
+function isVisitable(thing) {
+ return utils.isPlainObject(thing) || utils.isArray(thing);
+}
+
+/**
+ * It removes the brackets from the end of a string
+ *
+ * @param {string} key - The key of the parameter.
+ *
+ * @returns {string} the key without the brackets.
+ */
+function removeBrackets(key) {
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
+}
+
+/**
+ * It takes a path, a key, and a boolean, and returns a string
+ *
+ * @param {string} path - The path to the current key.
+ * @param {string} key - The key of the current object being iterated over.
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+ *
+ * @returns {string} The path to the current key.
+ */
+function renderKey(path, key, dots) {
+ if (!path) return key;
+ return path.concat(key).map(function each(token, i) {
+ // eslint-disable-next-line no-param-reassign
+ token = removeBrackets(token);
+ return !dots && i ? '[' + token + ']' : token;
+ }).join(dots ? '.' : '');
+}
+
+/**
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
+ *
+ * @param {Array} arr - The array to check
+ *
+ * @returns {boolean}
+ */
+function isFlatArray(arr) {
+ return utils.isArray(arr) && !arr.some(isVisitable);
+}
+
+const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
+ return /^is[A-Z]/.test(prop);
+});
+
+/**
+ * Convert a data object to FormData
+ *
+ * @param {Object} obj
+ * @param {?Object} [formData]
+ * @param {?Object} [options]
+ * @param {Function} [options.visitor]
+ * @param {Boolean} [options.metaTokens = true]
+ * @param {Boolean} [options.dots = false]
+ * @param {?Boolean} [options.indexes = false]
+ *
+ * @returns {Object}
+ **/
+
+/**
+ * It converts an object into a FormData object
+ *
+ * @param {Object} obj - The object to convert to form data.
+ * @param {string} formData - The FormData object to append to.
+ * @param {Object} options
+ *
+ * @returns
+ */
+function toFormData(obj, formData, options) {
+ if (!utils.isObject(obj)) {
+ throw new TypeError('target must be an object');
+ }
+
+ // eslint-disable-next-line no-param-reassign
+ formData = formData || new (PlatformFormData || FormData)();
+
+ // eslint-disable-next-line no-param-reassign
+ options = utils.toFlatObject(options, {
+ metaTokens: true,
+ dots: false,
+ indexes: false
+ }, false, function defined(option, source) {
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ return !utils.isUndefined(source[option]);
+ });
+
+ const metaTokens = options.metaTokens;
+ // eslint-disable-next-line no-use-before-define
+ const visitor = options.visitor || defaultVisitor;
+ const dots = options.dots;
+ const indexes = options.indexes;
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
+
+ if (!utils.isFunction(visitor)) {
+ throw new TypeError('visitor must be a function');
+ }
+
+ function convertValue(value) {
+ if (value === null) return '';
+
+ if (utils.isDate(value)) {
+ return value.toISOString();
+ }
+
+ if (!useBlob && utils.isBlob(value)) {
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
+ }
+
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+ }
+
+ return value;
+ }
+
+ /**
+ * Default visitor.
+ *
+ * @param {*} value
+ * @param {String|Number} key
+ * @param {Array} path
+ * @this {FormData}
+ *
+ * @returns {boolean} return true to visit the each prop of the value recursively
+ */
+ function defaultVisitor(value, key, path) {
+ let arr = value;
+
+ if (value && !path && typeof value === 'object') {
+ if (utils.endsWith(key, '{}')) {
+ // eslint-disable-next-line no-param-reassign
+ key = metaTokens ? key : key.slice(0, -2);
+ // eslint-disable-next-line no-param-reassign
+ value = JSON.stringify(value);
+ } else if (
+ (utils.isArray(value) && isFlatArray(value)) ||
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
+ )) {
+ // eslint-disable-next-line no-param-reassign
+ key = removeBrackets(key);
+
+ arr.forEach(function each(el, index) {
+ !(utils.isUndefined(el) || el === null) && formData.append(
+ // eslint-disable-next-line no-nested-ternary
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
+ convertValue(el)
+ );
+ });
+ return false;
+ }
+ }
+
+ if (isVisitable(value)) {
+ return true;
+ }
+
+ formData.append(renderKey(path, key, dots), convertValue(value));
+
+ return false;
+ }
+
+ const stack = [];
+
+ const exposedHelpers = Object.assign(predicates, {
+ defaultVisitor,
+ convertValue,
+ isVisitable
+ });
+
+ function build(value, path) {
+ if (utils.isUndefined(value)) return;
+
+ if (stack.indexOf(value) !== -1) {
+ throw Error('Circular reference detected in ' + path.join('.'));
+ }
+
+ stack.push(value);
+
+ utils.forEach(value, function each(el, key) {
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
+ );
+
+ if (result === true) {
+ build(el, path ? path.concat(key) : [key]);
+ }
+ });
+
+ stack.pop();
+ }
+
+ if (!utils.isObject(obj)) {
+ throw new TypeError('data must be an object');
+ }
+
+ build(obj);
+
+ return formData;
+}
+
+export default toFormData;
diff --git a/node_modules/axios/lib/helpers/toURLEncodedForm.js b/node_modules/axios/lib/helpers/toURLEncodedForm.js
new file mode 100644
index 0000000..988a38a
--- /dev/null
+++ b/node_modules/axios/lib/helpers/toURLEncodedForm.js
@@ -0,0 +1,18 @@
+'use strict';
+
+import utils from '../utils.js';
+import toFormData from './toFormData.js';
+import platform from '../platform/index.js';
+
+export default function toURLEncodedForm(data, options) {
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
+ visitor: function(value, key, path, helpers) {
+ if (platform.isNode && utils.isBuffer(value)) {
+ this.append(key, value.toString('base64'));
+ return false;
+ }
+
+ return helpers.defaultVisitor.apply(this, arguments);
+ }
+ }, options));
+}
diff --git a/node_modules/axios/lib/helpers/trackStream.js b/node_modules/axios/lib/helpers/trackStream.js
new file mode 100644
index 0000000..95d6008
--- /dev/null
+++ b/node_modules/axios/lib/helpers/trackStream.js
@@ -0,0 +1,87 @@
+
+export const streamChunk = function* (chunk, chunkSize) {
+ let len = chunk.byteLength;
+
+ if (!chunkSize || len < chunkSize) {
+ yield chunk;
+ return;
+ }
+
+ let pos = 0;
+ let end;
+
+ while (pos < len) {
+ end = pos + chunkSize;
+ yield chunk.slice(pos, end);
+ pos = end;
+ }
+}
+
+export const readBytes = async function* (iterable, chunkSize) {
+ for await (const chunk of readStream(iterable)) {
+ yield* streamChunk(chunk, chunkSize);
+ }
+}
+
+const readStream = async function* (stream) {
+ if (stream[Symbol.asyncIterator]) {
+ yield* stream;
+ return;
+ }
+
+ const reader = stream.getReader();
+ try {
+ for (;;) {
+ const {done, value} = await reader.read();
+ if (done) {
+ break;
+ }
+ yield value;
+ }
+ } finally {
+ await reader.cancel();
+ }
+}
+
+export const trackStream = (stream, chunkSize, onProgress, onFinish) => {
+ const iterator = readBytes(stream, chunkSize);
+
+ let bytes = 0;
+ let done;
+ let _onFinish = (e) => {
+ if (!done) {
+ done = true;
+ onFinish && onFinish(e);
+ }
+ }
+
+ return new ReadableStream({
+ async pull(controller) {
+ try {
+ const {done, value} = await iterator.next();
+
+ if (done) {
+ _onFinish();
+ controller.close();
+ return;
+ }
+
+ let len = value.byteLength;
+ if (onProgress) {
+ let loadedBytes = bytes += len;
+ onProgress(loadedBytes);
+ }
+ controller.enqueue(new Uint8Array(value));
+ } catch (err) {
+ _onFinish(err);
+ throw err;
+ }
+ },
+ cancel(reason) {
+ _onFinish(reason);
+ return iterator.return();
+ }
+ }, {
+ highWaterMark: 2
+ })
+}
diff --git a/node_modules/axios/lib/helpers/validator.js b/node_modules/axios/lib/helpers/validator.js
new file mode 100644
index 0000000..1270568
--- /dev/null
+++ b/node_modules/axios/lib/helpers/validator.js
@@ -0,0 +1,99 @@
+'use strict';
+
+import {VERSION} from '../env/data.js';
+import AxiosError from '../core/AxiosError.js';
+
+const validators = {};
+
+// eslint-disable-next-line func-names
+['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
+ validators[type] = function validator(thing) {
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+ };
+});
+
+const deprecatedWarnings = {};
+
+/**
+ * Transitional option validator
+ *
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
+ * @param {string?} version - deprecated version / removed since version
+ * @param {string?} message - some message with additional info
+ *
+ * @returns {function}
+ */
+validators.transitional = function transitional(validator, version, message) {
+ function formatMessage(opt, desc) {
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+ }
+
+ // eslint-disable-next-line func-names
+ return (value, opt, opts) => {
+ if (validator === false) {
+ throw new AxiosError(
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
+ AxiosError.ERR_DEPRECATED
+ );
+ }
+
+ if (version && !deprecatedWarnings[opt]) {
+ deprecatedWarnings[opt] = true;
+ // eslint-disable-next-line no-console
+ console.warn(
+ formatMessage(
+ opt,
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
+ )
+ );
+ }
+
+ return validator ? validator(value, opt, opts) : true;
+ };
+};
+
+validators.spelling = function spelling(correctSpelling) {
+ return (value, opt) => {
+ // eslint-disable-next-line no-console
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
+ return true;
+ }
+};
+
+/**
+ * Assert object's properties type
+ *
+ * @param {object} options
+ * @param {object} schema
+ * @param {boolean?} allowUnknown
+ *
+ * @returns {object}
+ */
+
+function assertOptions(options, schema, allowUnknown) {
+ if (typeof options !== 'object') {
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ const keys = Object.keys(options);
+ let i = keys.length;
+ while (i-- > 0) {
+ const opt = keys[i];
+ const validator = schema[opt];
+ if (validator) {
+ const value = options[opt];
+ const result = value === undefined || validator(value, opt, options);
+ if (result !== true) {
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
+ }
+ continue;
+ }
+ if (allowUnknown !== true) {
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
+ }
+ }
+}
+
+export default {
+ assertOptions,
+ validators
+};
diff --git a/node_modules/axios/lib/platform/browser/classes/Blob.js b/node_modules/axios/lib/platform/browser/classes/Blob.js
new file mode 100644
index 0000000..6c506c4
--- /dev/null
+++ b/node_modules/axios/lib/platform/browser/classes/Blob.js
@@ -0,0 +1,3 @@
+'use strict'
+
+export default typeof Blob !== 'undefined' ? Blob : null
diff --git a/node_modules/axios/lib/platform/browser/classes/FormData.js b/node_modules/axios/lib/platform/browser/classes/FormData.js
new file mode 100644
index 0000000..f36d31b
--- /dev/null
+++ b/node_modules/axios/lib/platform/browser/classes/FormData.js
@@ -0,0 +1,3 @@
+'use strict';
+
+export default typeof FormData !== 'undefined' ? FormData : null;
diff --git a/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js b/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
new file mode 100644
index 0000000..b7dae95
--- /dev/null
+++ b/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
@@ -0,0 +1,4 @@
+'use strict';
+
+import AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';
+export default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
diff --git a/node_modules/axios/lib/platform/browser/index.js b/node_modules/axios/lib/platform/browser/index.js
new file mode 100644
index 0000000..08c206f
--- /dev/null
+++ b/node_modules/axios/lib/platform/browser/index.js
@@ -0,0 +1,13 @@
+import URLSearchParams from './classes/URLSearchParams.js'
+import FormData from './classes/FormData.js'
+import Blob from './classes/Blob.js'
+
+export default {
+ isBrowser: true,
+ classes: {
+ URLSearchParams,
+ FormData,
+ Blob
+ },
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
+};
diff --git a/node_modules/axios/lib/platform/common/utils.js b/node_modules/axios/lib/platform/common/utils.js
new file mode 100644
index 0000000..52a3186
--- /dev/null
+++ b/node_modules/axios/lib/platform/common/utils.js
@@ -0,0 +1,51 @@
+const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+
+const _navigator = typeof navigator === 'object' && navigator || undefined;
+
+/**
+ * Determine if we're running in a standard browser environment
+ *
+ * This allows axios to run in a web worker, and react-native.
+ * Both environments support XMLHttpRequest, but not fully standard globals.
+ *
+ * web workers:
+ * typeof window -> undefined
+ * typeof document -> undefined
+ *
+ * react-native:
+ * navigator.product -> 'ReactNative'
+ * nativescript
+ * navigator.product -> 'NativeScript' or 'NS'
+ *
+ * @returns {boolean}
+ */
+const hasStandardBrowserEnv = hasBrowserEnv &&
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+/**
+ * Determine if we're running in a standard browser webWorker environment
+ *
+ * Although the `isStandardBrowserEnv` method indicates that
+ * `allows axios to run in a web worker`, the WebWorker will still be
+ * filtered out due to its judgment standard
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+ * This leads to a problem when axios post `FormData` in webWorker
+ */
+const hasStandardBrowserWebWorkerEnv = (() => {
+ return (
+ typeof WorkerGlobalScope !== 'undefined' &&
+ // eslint-disable-next-line no-undef
+ self instanceof WorkerGlobalScope &&
+ typeof self.importScripts === 'function'
+ );
+})();
+
+const origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+export {
+ hasBrowserEnv,
+ hasStandardBrowserWebWorkerEnv,
+ hasStandardBrowserEnv,
+ _navigator as navigator,
+ origin
+}
diff --git a/node_modules/axios/lib/platform/index.js b/node_modules/axios/lib/platform/index.js
new file mode 100644
index 0000000..860ba21
--- /dev/null
+++ b/node_modules/axios/lib/platform/index.js
@@ -0,0 +1,7 @@
+import platform from './node/index.js';
+import * as utils from './common/utils.js';
+
+export default {
+ ...utils,
+ ...platform
+}
diff --git a/node_modules/axios/lib/platform/node/classes/FormData.js b/node_modules/axios/lib/platform/node/classes/FormData.js
new file mode 100644
index 0000000..b07f947
--- /dev/null
+++ b/node_modules/axios/lib/platform/node/classes/FormData.js
@@ -0,0 +1,3 @@
+import FormData from 'form-data';
+
+export default FormData;
diff --git a/node_modules/axios/lib/platform/node/classes/URLSearchParams.js b/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
new file mode 100644
index 0000000..fba5842
--- /dev/null
+++ b/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
@@ -0,0 +1,4 @@
+'use strict';
+
+import url from 'url';
+export default url.URLSearchParams;
diff --git a/node_modules/axios/lib/platform/node/index.js b/node_modules/axios/lib/platform/node/index.js
new file mode 100644
index 0000000..aef514a
--- /dev/null
+++ b/node_modules/axios/lib/platform/node/index.js
@@ -0,0 +1,12 @@
+import URLSearchParams from './classes/URLSearchParams.js'
+import FormData from './classes/FormData.js'
+
+export default {
+ isNode: true,
+ classes: {
+ URLSearchParams,
+ FormData,
+ Blob: typeof Blob !== 'undefined' && Blob || null
+ },
+ protocols: [ 'http', 'https', 'file', 'data' ]
+};
diff --git a/node_modules/axios/lib/utils.js b/node_modules/axios/lib/utils.js
new file mode 100644
index 0000000..32679da
--- /dev/null
+++ b/node_modules/axios/lib/utils.js
@@ -0,0 +1,760 @@
+'use strict';
+
+import bind from './helpers/bind.js';
+
+// utils is a library of generic helper functions non-specific to axios
+
+const {toString} = Object.prototype;
+const {getPrototypeOf} = Object;
+
+const kindOf = (cache => thing => {
+ const str = toString.call(thing);
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+})(Object.create(null));
+
+const kindOfTest = (type) => {
+ type = type.toLowerCase();
+ return (thing) => kindOf(thing) === type
+}
+
+const typeOfTest = type => thing => typeof thing === type;
+
+/**
+ * Determine if a value is an Array
+ *
+ * @param {Object} val The value to test
+ *
+ * @returns {boolean} True if value is an Array, otherwise false
+ */
+const {isArray} = Array;
+
+/**
+ * Determine if a value is undefined
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if the value is undefined, otherwise false
+ */
+const isUndefined = typeOfTest('undefined');
+
+/**
+ * Determine if a value is a Buffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Buffer, otherwise false
+ */
+function isBuffer(val) {
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+}
+
+/**
+ * Determine if a value is an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+ */
+const isArrayBuffer = kindOfTest('ArrayBuffer');
+
+
+/**
+ * Determine if a value is a view on an ArrayBuffer
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+ */
+function isArrayBufferView(val) {
+ let result;
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
+ result = ArrayBuffer.isView(val);
+ } else {
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
+ }
+ return result;
+}
+
+/**
+ * Determine if a value is a String
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a String, otherwise false
+ */
+const isString = typeOfTest('string');
+
+/**
+ * Determine if a value is a Function
+ *
+ * @param {*} val The value to test
+ * @returns {boolean} True if value is a Function, otherwise false
+ */
+const isFunction = typeOfTest('function');
+
+/**
+ * Determine if a value is a Number
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Number, otherwise false
+ */
+const isNumber = typeOfTest('number');
+
+/**
+ * Determine if a value is an Object
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an Object, otherwise false
+ */
+const isObject = (thing) => thing !== null && typeof thing === 'object';
+
+/**
+ * Determine if a value is a Boolean
+ *
+ * @param {*} thing The value to test
+ * @returns {boolean} True if value is a Boolean, otherwise false
+ */
+const isBoolean = thing => thing === true || thing === false;
+
+/**
+ * Determine if a value is a plain Object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a plain Object, otherwise false
+ */
+const isPlainObject = (val) => {
+ if (kindOf(val) !== 'object') {
+ return false;
+ }
+
+ const prototype = getPrototypeOf(val);
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
+}
+
+/**
+ * Determine if a value is a Date
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Date, otherwise false
+ */
+const isDate = kindOfTest('Date');
+
+/**
+ * Determine if a value is a File
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFile = kindOfTest('File');
+
+/**
+ * Determine if a value is a Blob
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Blob, otherwise false
+ */
+const isBlob = kindOfTest('Blob');
+
+/**
+ * Determine if a value is a FileList
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a File, otherwise false
+ */
+const isFileList = kindOfTest('FileList');
+
+/**
+ * Determine if a value is a Stream
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a Stream, otherwise false
+ */
+const isStream = (val) => isObject(val) && isFunction(val.pipe);
+
+/**
+ * Determine if a value is a FormData
+ *
+ * @param {*} thing The value to test
+ *
+ * @returns {boolean} True if value is an FormData, otherwise false
+ */
+const isFormData = (thing) => {
+ let kind;
+ return thing && (
+ (typeof FormData === 'function' && thing instanceof FormData) || (
+ isFunction(thing.append) && (
+ (kind = kindOf(thing)) === 'formdata' ||
+ // detect form-data instance
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
+ )
+ )
+ )
+}
+
+/**
+ * Determine if a value is a URLSearchParams object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+ */
+const isURLSearchParams = kindOfTest('URLSearchParams');
+
+const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
+
+/**
+ * Trim excess whitespace off the beginning and end of a string
+ *
+ * @param {String} str The String to trim
+ *
+ * @returns {String} The String freed of excess whitespace
+ */
+const trim = (str) => str.trim ?
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+
+/**
+ * Iterate over an Array or an Object invoking a function for each item.
+ *
+ * If `obj` is an Array callback will be called passing
+ * the value, index, and complete array for each item.
+ *
+ * If 'obj' is an Object callback will be called passing
+ * the value, key, and complete object for each property.
+ *
+ * @param {Object|Array} obj The object to iterate
+ * @param {Function} fn The callback to invoke for each item
+ *
+ * @param {Boolean} [allOwnKeys = false]
+ * @returns {any}
+ */
+function forEach(obj, fn, {allOwnKeys = false} = {}) {
+ // Don't bother if no value provided
+ if (obj === null || typeof obj === 'undefined') {
+ return;
+ }
+
+ let i;
+ let l;
+
+ // Force an array if not already something iterable
+ if (typeof obj !== 'object') {
+ /*eslint no-param-reassign:0*/
+ obj = [obj];
+ }
+
+ if (isArray(obj)) {
+ // Iterate over array values
+ for (i = 0, l = obj.length; i < l; i++) {
+ fn.call(null, obj[i], i, obj);
+ }
+ } else {
+ // Iterate over object keys
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+ const len = keys.length;
+ let key;
+
+ for (i = 0; i < len; i++) {
+ key = keys[i];
+ fn.call(null, obj[key], key, obj);
+ }
+ }
+}
+
+function findKey(obj, key) {
+ key = key.toLowerCase();
+ const keys = Object.keys(obj);
+ let i = keys.length;
+ let _key;
+ while (i-- > 0) {
+ _key = keys[i];
+ if (key === _key.toLowerCase()) {
+ return _key;
+ }
+ }
+ return null;
+}
+
+const _global = (() => {
+ /*eslint no-undef:0*/
+ if (typeof globalThis !== "undefined") return globalThis;
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
+})();
+
+const isContextDefined = (context) => !isUndefined(context) && context !== _global;
+
+/**
+ * Accepts varargs expecting each argument to be an object, then
+ * immutably merges the properties of each object and returns result.
+ *
+ * When multiple objects contain the same key the later object in
+ * the arguments list will take precedence.
+ *
+ * Example:
+ *
+ * ```js
+ * var result = merge({foo: 123}, {foo: 456});
+ * console.log(result.foo); // outputs 456
+ * ```
+ *
+ * @param {Object} obj1 Object to merge
+ *
+ * @returns {Object} Result of all merge properties
+ */
+function merge(/* obj1, obj2, obj3, ... */) {
+ const {caseless} = isContextDefined(this) && this || {};
+ const result = {};
+ const assignValue = (val, key) => {
+ const targetKey = caseless && findKey(result, key) || key;
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+ result[targetKey] = merge(result[targetKey], val);
+ } else if (isPlainObject(val)) {
+ result[targetKey] = merge({}, val);
+ } else if (isArray(val)) {
+ result[targetKey] = val.slice();
+ } else {
+ result[targetKey] = val;
+ }
+ }
+
+ for (let i = 0, l = arguments.length; i < l; i++) {
+ arguments[i] && forEach(arguments[i], assignValue);
+ }
+ return result;
+}
+
+/**
+ * Extends object a by mutably adding to it the properties of object b.
+ *
+ * @param {Object} a The object to be extended
+ * @param {Object} b The object to copy properties from
+ * @param {Object} thisArg The object to bind function to
+ *
+ * @param {Boolean} [allOwnKeys]
+ * @returns {Object} The resulting value of object a
+ */
+const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
+ forEach(b, (val, key) => {
+ if (thisArg && isFunction(val)) {
+ a[key] = bind(val, thisArg);
+ } else {
+ a[key] = val;
+ }
+ }, {allOwnKeys});
+ return a;
+}
+
+/**
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+ *
+ * @param {string} content with BOM
+ *
+ * @returns {string} content value without BOM
+ */
+const stripBOM = (content) => {
+ if (content.charCodeAt(0) === 0xFEFF) {
+ content = content.slice(1);
+ }
+ return content;
+}
+
+/**
+ * Inherit the prototype methods from one constructor into another
+ * @param {function} constructor
+ * @param {function} superConstructor
+ * @param {object} [props]
+ * @param {object} [descriptors]
+ *
+ * @returns {void}
+ */
+const inherits = (constructor, superConstructor, props, descriptors) => {
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+ constructor.prototype.constructor = constructor;
+ Object.defineProperty(constructor, 'super', {
+ value: superConstructor.prototype
+ });
+ props && Object.assign(constructor.prototype, props);
+}
+
+/**
+ * Resolve object with deep prototype chain to a flat object
+ * @param {Object} sourceObj source object
+ * @param {Object} [destObj]
+ * @param {Function|Boolean} [filter]
+ * @param {Function} [propFilter]
+ *
+ * @returns {Object}
+ */
+const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
+ let props;
+ let i;
+ let prop;
+ const merged = {};
+
+ destObj = destObj || {};
+ // eslint-disable-next-line no-eq-null,eqeqeq
+ if (sourceObj == null) return destObj;
+
+ do {
+ props = Object.getOwnPropertyNames(sourceObj);
+ i = props.length;
+ while (i-- > 0) {
+ prop = props[i];
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+ destObj[prop] = sourceObj[prop];
+ merged[prop] = true;
+ }
+ }
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+
+ return destObj;
+}
+
+/**
+ * Determines whether a string ends with the characters of a specified string
+ *
+ * @param {String} str
+ * @param {String} searchString
+ * @param {Number} [position= 0]
+ *
+ * @returns {boolean}
+ */
+const endsWith = (str, searchString, position) => {
+ str = String(str);
+ if (position === undefined || position > str.length) {
+ position = str.length;
+ }
+ position -= searchString.length;
+ const lastIndex = str.indexOf(searchString, position);
+ return lastIndex !== -1 && lastIndex === position;
+}
+
+
+/**
+ * Returns new array from array like object or null if failed
+ *
+ * @param {*} [thing]
+ *
+ * @returns {?Array}
+ */
+const toArray = (thing) => {
+ if (!thing) return null;
+ if (isArray(thing)) return thing;
+ let i = thing.length;
+ if (!isNumber(i)) return null;
+ const arr = new Array(i);
+ while (i-- > 0) {
+ arr[i] = thing[i];
+ }
+ return arr;
+}
+
+/**
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+ * thing passed in is an instance of Uint8Array
+ *
+ * @param {TypedArray}
+ *
+ * @returns {Array}
+ */
+// eslint-disable-next-line func-names
+const isTypedArray = (TypedArray => {
+ // eslint-disable-next-line func-names
+ return thing => {
+ return TypedArray && thing instanceof TypedArray;
+ };
+})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+/**
+ * For each entry in the object, call the function with the key and value.
+ *
+ * @param {Object} obj - The object to iterate over.
+ * @param {Function} fn - The function to call for each entry.
+ *
+ * @returns {void}
+ */
+const forEachEntry = (obj, fn) => {
+ const generator = obj && obj[Symbol.iterator];
+
+ const iterator = generator.call(obj);
+
+ let result;
+
+ while ((result = iterator.next()) && !result.done) {
+ const pair = result.value;
+ fn.call(obj, pair[0], pair[1]);
+ }
+}
+
+/**
+ * It takes a regular expression and a string, and returns an array of all the matches
+ *
+ * @param {string} regExp - The regular expression to match against.
+ * @param {string} str - The string to search.
+ *
+ * @returns {Array}
+ */
+const matchAll = (regExp, str) => {
+ let matches;
+ const arr = [];
+
+ while ((matches = regExp.exec(str)) !== null) {
+ arr.push(matches);
+ }
+
+ return arr;
+}
+
+/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+const isHTMLForm = kindOfTest('HTMLFormElement');
+
+const toCamelCase = str => {
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
+ function replacer(m, p1, p2) {
+ return p1.toUpperCase() + p2;
+ }
+ );
+};
+
+/* Creating a function that will check if an object has a property. */
+const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
+
+/**
+ * Determine if a value is a RegExp object
+ *
+ * @param {*} val The value to test
+ *
+ * @returns {boolean} True if value is a RegExp object, otherwise false
+ */
+const isRegExp = kindOfTest('RegExp');
+
+const reduceDescriptors = (obj, reducer) => {
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
+ const reducedDescriptors = {};
+
+ forEach(descriptors, (descriptor, name) => {
+ let ret;
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
+ reducedDescriptors[name] = ret || descriptor;
+ }
+ });
+
+ Object.defineProperties(obj, reducedDescriptors);
+}
+
+/**
+ * Makes all methods read-only
+ * @param {Object} obj
+ */
+
+const freezeMethods = (obj) => {
+ reduceDescriptors(obj, (descriptor, name) => {
+ // skip restricted props in strict mode
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+ return false;
+ }
+
+ const value = obj[name];
+
+ if (!isFunction(value)) return;
+
+ descriptor.enumerable = false;
+
+ if ('writable' in descriptor) {
+ descriptor.writable = false;
+ return;
+ }
+
+ if (!descriptor.set) {
+ descriptor.set = () => {
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
+ };
+ }
+ });
+}
+
+const toObjectSet = (arrayOrString, delimiter) => {
+ const obj = {};
+
+ const define = (arr) => {
+ arr.forEach(value => {
+ obj[value] = true;
+ });
+ }
+
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+
+ return obj;
+}
+
+const noop = () => {}
+
+const toFiniteNumber = (value, defaultValue) => {
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+}
+
+const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
+
+const DIGIT = '0123456789';
+
+const ALPHABET = {
+ DIGIT,
+ ALPHA,
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
+}
+
+const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
+ let str = '';
+ const {length} = alphabet;
+ while (size--) {
+ str += alphabet[Math.random() * length|0]
+ }
+
+ return str;
+}
+
+/**
+ * If the thing is a FormData object, return true, otherwise return false.
+ *
+ * @param {unknown} thing - The thing to check.
+ *
+ * @returns {boolean}
+ */
+function isSpecCompliantForm(thing) {
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
+}
+
+const toJSONObject = (obj) => {
+ const stack = new Array(10);
+
+ const visit = (source, i) => {
+
+ if (isObject(source)) {
+ if (stack.indexOf(source) >= 0) {
+ return;
+ }
+
+ if(!('toJSON' in source)) {
+ stack[i] = source;
+ const target = isArray(source) ? [] : {};
+
+ forEach(source, (value, key) => {
+ const reducedValue = visit(value, i + 1);
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
+ });
+
+ stack[i] = undefined;
+
+ return target;
+ }
+ }
+
+ return source;
+ }
+
+ return visit(obj, 0);
+}
+
+const isAsyncFn = kindOfTest('AsyncFunction');
+
+const isThenable = (thing) =>
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
+
+// original code
+// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
+ if (setImmediateSupported) {
+ return setImmediate;
+ }
+
+ return postMessageSupported ? ((token, callbacks) => {
+ _global.addEventListener("message", ({source, data}) => {
+ if (source === _global && data === token) {
+ callbacks.length && callbacks.shift()();
+ }
+ }, false);
+
+ return (cb) => {
+ callbacks.push(cb);
+ _global.postMessage(token, "*");
+ }
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
+})(
+ typeof setImmediate === 'function',
+ isFunction(_global.postMessage)
+);
+
+const asap = typeof queueMicrotask !== 'undefined' ?
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
+
+// *********************
+
+export default {
+ isArray,
+ isArrayBuffer,
+ isBuffer,
+ isFormData,
+ isArrayBufferView,
+ isString,
+ isNumber,
+ isBoolean,
+ isObject,
+ isPlainObject,
+ isReadableStream,
+ isRequest,
+ isResponse,
+ isHeaders,
+ isUndefined,
+ isDate,
+ isFile,
+ isBlob,
+ isRegExp,
+ isFunction,
+ isStream,
+ isURLSearchParams,
+ isTypedArray,
+ isFileList,
+ forEach,
+ merge,
+ extend,
+ trim,
+ stripBOM,
+ inherits,
+ toFlatObject,
+ kindOf,
+ kindOfTest,
+ endsWith,
+ toArray,
+ forEachEntry,
+ matchAll,
+ isHTMLForm,
+ hasOwnProperty,
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
+ reduceDescriptors,
+ freezeMethods,
+ toObjectSet,
+ toCamelCase,
+ noop,
+ toFiniteNumber,
+ findKey,
+ global: _global,
+ isContextDefined,
+ ALPHABET,
+ generateString,
+ isSpecCompliantForm,
+ toJSONObject,
+ isAsyncFn,
+ isThenable,
+ setImmediate: _setImmediate,
+ asap
+};
diff --git a/node_modules/axios/package.json b/node_modules/axios/package.json
new file mode 100644
index 0000000..feb4bb0
--- /dev/null
+++ b/node_modules/axios/package.json
@@ -0,0 +1,219 @@
+{
+ "name": "axios",
+ "version": "1.7.9",
+ "description": "Promise based HTTP client for the browser and node.js",
+ "main": "index.js",
+ "exports": {
+ ".": {
+ "types": {
+ "require": "./index.d.cts",
+ "default": "./index.d.ts"
+ },
+ "browser": {
+ "require": "./dist/browser/axios.cjs",
+ "default": "./index.js"
+ },
+ "default": {
+ "require": "./dist/node/axios.cjs",
+ "default": "./index.js"
+ }
+ },
+ "./lib/adapters/http.js": "./lib/adapters/http.js",
+ "./lib/adapters/xhr.js": "./lib/adapters/xhr.js",
+ "./unsafe/*": "./lib/*",
+ "./unsafe/core/settle.js": "./lib/core/settle.js",
+ "./unsafe/core/buildFullPath.js": "./lib/core/buildFullPath.js",
+ "./unsafe/helpers/isAbsoluteURL.js": "./lib/helpers/isAbsoluteURL.js",
+ "./unsafe/helpers/buildURL.js": "./lib/helpers/buildURL.js",
+ "./unsafe/helpers/combineURLs.js": "./lib/helpers/combineURLs.js",
+ "./unsafe/adapters/http.js": "./lib/adapters/http.js",
+ "./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js",
+ "./unsafe/utils.js": "./lib/utils.js",
+ "./package.json": "./package.json"
+ },
+ "type": "module",
+ "types": "index.d.ts",
+ "scripts": {
+ "test": "npm run test:eslint && npm run test:mocha && npm run test:karma && npm run test:dtslint && npm run test:exports",
+ "test:eslint": "node bin/ssl_hotfix.js eslint lib/**/*.js",
+ "test:dtslint": "dtslint --localTs node_modules/typescript/lib",
+ "test:mocha": "node bin/ssl_hotfix.js mocha test/unit/**/*.js --timeout 30000 --exit",
+ "test:exports": "node bin/ssl_hotfix.js mocha test/module/test.js --timeout 30000 --exit",
+ "test:karma": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: karma start karma.conf.cjs --single-run",
+ "test:karma:firefox": "node bin/ssl_hotfix.js cross-env LISTEN_ADDR=:: Browsers=Firefox karma start karma.conf.cjs --single-run",
+ "test:karma:server": "node bin/ssl_hotfix.js cross-env karma start karma.conf.cjs",
+ "test:build:version": "node ./bin/check-build-version.js",
+ "start": "node ./sandbox/server.js",
+ "preversion": "gulp version",
+ "version": "npm run build && git add dist && git add package.json",
+ "prepublishOnly": "npm run test:build:version",
+ "postpublish": "git push && git push --tags",
+ "build": "gulp clear && cross-env NODE_ENV=production rollup -c -m",
+ "examples": "node ./examples/server.js",
+ "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
+ "fix": "eslint --fix lib/**/*.js",
+ "prepare": "husky install && npm run prepare:hooks",
+ "prepare:hooks": "npx husky set .husky/commit-msg \"npx commitlint --edit $1\"",
+ "release:dry": "release-it --dry-run --no-npm",
+ "release:info": "release-it --release-version",
+ "release:beta:no-npm": "release-it --preRelease=beta --no-npm",
+ "release:beta": "release-it --preRelease=beta",
+ "release:no-npm": "release-it --no-npm",
+ "release:changelog:fix": "node ./bin/injectContributorsList.js && git add CHANGELOG.md",
+ "release": "release-it"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/axios/axios.git"
+ },
+ "keywords": [
+ "xhr",
+ "http",
+ "ajax",
+ "promise",
+ "node"
+ ],
+ "author": "Matt Zabriskie",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/axios/axios/issues"
+ },
+ "homepage": "https://axios-http.com",
+ "devDependencies": {
+ "@babel/core": "^7.23.9",
+ "@babel/preset-env": "^7.23.9",
+ "@commitlint/cli": "^17.8.1",
+ "@commitlint/config-conventional": "^17.8.1",
+ "@release-it/conventional-changelog": "^5.1.1",
+ "@rollup/plugin-babel": "^5.3.1",
+ "@rollup/plugin-commonjs": "^15.1.0",
+ "@rollup/plugin-json": "^4.1.0",
+ "@rollup/plugin-multi-entry": "^4.1.0",
+ "@rollup/plugin-node-resolve": "^9.0.0",
+ "abortcontroller-polyfill": "^1.7.5",
+ "auto-changelog": "^2.4.0",
+ "body-parser": "^1.20.2",
+ "chalk": "^5.3.0",
+ "coveralls": "^3.1.1",
+ "cross-env": "^7.0.3",
+ "dev-null": "^0.1.1",
+ "dtslint": "^4.2.1",
+ "es6-promise": "^4.2.8",
+ "eslint": "^8.56.0",
+ "express": "^4.18.2",
+ "formdata-node": "^5.0.1",
+ "formidable": "^2.1.2",
+ "fs-extra": "^10.1.0",
+ "get-stream": "^3.0.0",
+ "gulp": "^4.0.2",
+ "gzip-size": "^7.0.0",
+ "handlebars": "^4.7.8",
+ "husky": "^8.0.3",
+ "istanbul-instrumenter-loader": "^3.0.1",
+ "jasmine-core": "^2.99.1",
+ "karma": "^6.3.17",
+ "karma-chrome-launcher": "^3.2.0",
+ "karma-firefox-launcher": "^2.1.2",
+ "karma-jasmine": "^1.1.2",
+ "karma-jasmine-ajax": "^0.1.13",
+ "karma-rollup-preprocessor": "^7.0.8",
+ "karma-safari-launcher": "^1.0.0",
+ "karma-sauce-launcher": "^4.3.6",
+ "karma-sinon": "^1.0.5",
+ "karma-sourcemap-loader": "^0.3.8",
+ "memoizee": "^0.4.15",
+ "minimist": "^1.2.8",
+ "mocha": "^10.3.0",
+ "multer": "^1.4.4",
+ "pretty-bytes": "^6.1.1",
+ "release-it": "^15.11.0",
+ "rollup": "^2.79.1",
+ "rollup-plugin-auto-external": "^2.0.0",
+ "rollup-plugin-bundle-size": "^1.0.3",
+ "rollup-plugin-terser": "^7.0.2",
+ "sinon": "^4.5.0",
+ "stream-throttle": "^0.1.3",
+ "string-replace-async": "^3.0.2",
+ "terser-webpack-plugin": "^4.2.3",
+ "typescript": "^4.9.5",
+ "@rollup/plugin-alias": "^5.1.0"
+ },
+ "browser": {
+ "./lib/adapters/http.js": "./lib/helpers/null.js",
+ "./lib/platform/node/index.js": "./lib/platform/browser/index.js",
+ "./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js"
+ },
+ "jsdelivr": "dist/axios.min.js",
+ "unpkg": "dist/axios.min.js",
+ "typings": "./index.d.ts",
+ "dependencies": {
+ "follow-redirects": "^1.15.6",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ },
+ "bundlesize": [
+ {
+ "path": "./dist/axios.min.js",
+ "threshold": "5kB"
+ }
+ ],
+ "contributors": [
+ "Matt Zabriskie (https://github.com/mzabriskie)",
+ "Nick Uraltsev (https://github.com/nickuraltsev)",
+ "Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)",
+ "Jay (https://github.com/jasonsaayman)",
+ "Emily Morehouse (https://github.com/emilyemorehouse)",
+ "Justin Beckwith (https://github.com/JustinBeckwith)",
+ "Rubén Norte (https://github.com/rubennorte)",
+ "Martti Laine (https://github.com/codeclown)",
+ "Xianming Zhong (https://github.com/chinesedfan)",
+ "Remco Haszing (https://github.com/remcohaszing)",
+ "Rikki Gibson (https://github.com/RikkiGibson)",
+ "Yasu Flores (https://github.com/yasuf)",
+ "Ben Carp (https://github.com/carpben)"
+ ],
+ "sideEffects": false,
+ "release-it": {
+ "git": {
+ "commitMessage": "chore(release): v${version}",
+ "push": true,
+ "commit": true,
+ "tag": true,
+ "requireCommits": false,
+ "requireCleanWorkingDir": false
+ },
+ "github": {
+ "release": true,
+ "draft": true
+ },
+ "npm": {
+ "publish": false,
+ "ignoreVersion": false
+ },
+ "plugins": {
+ "@release-it/conventional-changelog": {
+ "preset": "angular",
+ "infile": "CHANGELOG.md",
+ "header": "# Changelog"
+ }
+ },
+ "hooks": {
+ "before:init": "npm test",
+ "after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version && git add ./dist && git add ./package-lock.json",
+ "before:release": "npm run release:changelog:fix",
+ "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
+ }
+ },
+ "commitlint": {
+ "rules": {
+ "header-max-length": [
+ 2,
+ "always",
+ 130
+ ]
+ },
+ "extends": [
+ "@commitlint/config-conventional"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/node_modules/balanced-match/.github/FUNDING.yml b/node_modules/balanced-match/.github/FUNDING.yml
new file mode 100644
index 0000000..cea8b16
--- /dev/null
+++ b/node_modules/balanced-match/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+tidelift: "npm/balanced-match"
+patreon: juliangruber
diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md
new file mode 100644
index 0000000..2cdc8e4
--- /dev/null
+++ b/node_modules/balanced-match/LICENSE.md
@@ -0,0 +1,21 @@
+(MIT)
+
+Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md
new file mode 100644
index 0000000..d2a48b6
--- /dev/null
+++ b/node_modules/balanced-match/README.md
@@ -0,0 +1,97 @@
+# balanced-match
+
+Match balanced string pairs, like `{` and `}` or `` and ` `. Supports regular expressions as well!
+
+[](http://travis-ci.org/juliangruber/balanced-match)
+[](https://www.npmjs.org/package/balanced-match)
+
+[](https://ci.testling.com/juliangruber/balanced-match)
+
+## Example
+
+Get the first matching pair of braces:
+
+```js
+var balanced = require('balanced-match');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
+```
+
+The matches are:
+
+```bash
+$ node example.js
+{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
+{ start: 3,
+ end: 9,
+ pre: 'pre',
+ body: 'first',
+ post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
+```
+
+## API
+
+### var m = balanced(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+object with those keys:
+
+* **start** the index of the first match of `a`
+* **end** the index of the matching `b`
+* **pre** the preamble, `a` and `b` not included
+* **body** the match, `a` and `b` not included
+* **post** the postscript, `a` and `b` not included
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
+
+### var r = balanced.range(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+array with indexes: `[ , ]`.
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install balanced-match
+```
+
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js
new file mode 100644
index 0000000..c67a646
--- /dev/null
+++ b/node_modules/balanced-match/index.js
@@ -0,0 +1,62 @@
+'use strict';
+module.exports = balanced;
+function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
+ var r = range(a, b, str);
+
+ return r && {
+ start: r[0],
+ end: r[1],
+ pre: str.slice(0, r[0]),
+ body: str.slice(r[0] + a.length, r[1]),
+ post: str.slice(r[1] + b.length)
+ };
+}
+
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+ var begs, beg, left, right, result;
+ var ai = str.indexOf(a);
+ var bi = str.indexOf(b, ai + 1);
+ var i = ai;
+
+ if (ai >= 0 && bi > 0) {
+ if(a===b) {
+ return [ai, bi];
+ }
+ begs = [];
+ left = str.length;
+
+ while (i >= 0 && !result) {
+ if (i == ai) {
+ begs.push(i);
+ ai = str.indexOf(a, i + 1);
+ } else if (begs.length == 1) {
+ result = [ begs.pop(), bi ];
+ } else {
+ beg = begs.pop();
+ if (beg < left) {
+ left = beg;
+ right = bi;
+ }
+
+ bi = str.indexOf(b, i + 1);
+ }
+
+ i = ai < bi && ai >= 0 ? ai : bi;
+ }
+
+ if (begs.length) {
+ result = [ left, right ];
+ }
+ }
+
+ return result;
+}
diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json
new file mode 100644
index 0000000..ce6073e
--- /dev/null
+++ b/node_modules/balanced-match/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "balanced-match",
+ "description": "Match balanced character pairs, like \"{\" and \"}\"",
+ "version": "1.0.2",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/balanced-match.git"
+ },
+ "homepage": "https://github.com/juliangruber/balanced-match",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/test.js",
+ "bench": "matcha test/bench.js"
+ },
+ "devDependencies": {
+ "matcha": "^0.7.0",
+ "tape": "^4.6.0"
+ },
+ "keywords": [
+ "match",
+ "regexp",
+ "test",
+ "balanced",
+ "parse"
+ ],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/brace-expansion/.github/FUNDING.yml b/node_modules/brace-expansion/.github/FUNDING.yml
new file mode 100644
index 0000000..79d1eaf
--- /dev/null
+++ b/node_modules/brace-expansion/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+tidelift: "npm/brace-expansion"
+patreon: juliangruber
diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE
new file mode 100644
index 0000000..de32266
--- /dev/null
+++ b/node_modules/brace-expansion/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013 Julian Gruber
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/brace-expansion/README.md b/node_modules/brace-expansion/README.md
new file mode 100644
index 0000000..e55c583
--- /dev/null
+++ b/node_modules/brace-expansion/README.md
@@ -0,0 +1,135 @@
+# brace-expansion
+
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
+as known from sh/bash, in JavaScript.
+
+[](http://travis-ci.org/juliangruber/brace-expansion)
+[](https://www.npmjs.org/package/brace-expansion)
+[](https://greenkeeper.io/)
+
+[](https://ci.testling.com/juliangruber/brace-expansion)
+
+## Example
+
+```js
+var expand = require('brace-expansion');
+
+expand('file-{a,b,c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('-v{,,}')
+// => ['-v', '-v', '-v']
+
+expand('file{0..2}.jpg')
+// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
+
+expand('file-{a..c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('file{2..0}.jpg')
+// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
+
+expand('file{0..4..2}.jpg')
+// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
+
+expand('file-{a..e..2}.jpg')
+// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
+
+expand('file{00..10..5}.jpg')
+// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
+
+expand('{{A..C},{a..c}}')
+// => ['A', 'B', 'C', 'a', 'b', 'c']
+
+expand('ppp{,config,oe{,conf}}')
+// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
+```
+
+## API
+
+```js
+var expand = require('brace-expansion');
+```
+
+### var expanded = expand(str)
+
+Return an array of all possible and valid expansions of `str`. If none are
+found, `[str]` is returned.
+
+Valid expansions are:
+
+```js
+/^(.*,)+(.+)?$/
+// {a,b,...}
+```
+
+A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+A numeric sequence from `x` to `y` inclusive, with optional increment.
+If `x` or `y` start with a leading `0`, all the numbers will be padded
+to have equal length. Negative numbers and backwards iteration work too.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+An alphabetic sequence from `x` to `y` inclusive, with optional increment.
+`x` and `y` must be exactly one character, and if given, `incr` must be a
+number.
+
+For compatibility reasons, the string `${` is not eligible for brace expansion.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install brace-expansion
+```
+
+## Contributors
+
+- [Julian Gruber](https://github.com/juliangruber)
+- [Isaac Z. Schlueter](https://github.com/isaacs)
+
+## Sponsors
+
+This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
+
+Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
+
+## Security contact information
+
+To report a security vulnerability, please use the
+[Tidelift security contact](https://tidelift.com/security).
+Tidelift will coordinate the fix and disclosure.
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js
new file mode 100644
index 0000000..4af9dde
--- /dev/null
+++ b/node_modules/brace-expansion/index.js
@@ -0,0 +1,203 @@
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ // I don't know why Bash 4.3 does this, but it does.
+ // Anything starting with {} will have the first two bytes preserved
+ // but *only* at the top level, so {},a}b will not expand to anything,
+ // but a{},b}c will be expanded to [a}c,abc].
+ // One could argue that this is a bug in Bash, but since the goal of
+ // this module is to match Bash's rules, we escape a leading {}
+ if (str.substr(0, 2) === '{}') {
+ str = '\\{\\}' + str.substr(2);
+ }
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str, isTop) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m) return [str];
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+
+ if (/\$$/.test(m.pre)) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre+ '{' + m.body + '}' + post[k];
+ expansions.push(expansion);
+ }
+ } else {
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = m.body.indexOf(',') >= 0;
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*\}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = [];
+
+ for (var j = 0; j < n.length; j++) {
+ N.push.apply(N, expand(n[j], false));
+ }
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
+ }
+
+ return expansions;
+}
+
diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json
new file mode 100644
index 0000000..7097d41
--- /dev/null
+++ b/node_modules/brace-expansion/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "brace-expansion",
+ "description": "Brace expansion as known from sh/bash",
+ "version": "2.0.1",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/juliangruber/brace-expansion.git"
+ },
+ "homepage": "https://github.com/juliangruber/brace-expansion",
+ "main": "index.js",
+ "scripts": {
+ "test": "tape test/*.js",
+ "gentest": "bash test/generate.sh",
+ "bench": "matcha test/perf/bench.js"
+ },
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ },
+ "devDependencies": {
+ "@c4312/matcha": "^1.3.1",
+ "tape": "^4.6.0"
+ },
+ "keywords": [],
+ "author": {
+ "name": "Julian Gruber",
+ "email": "mail@juliangruber.com",
+ "url": "http://juliangruber.com"
+ },
+ "license": "MIT",
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "ie/8..latest",
+ "firefox/20..latest",
+ "firefox/nightly",
+ "chrome/25..latest",
+ "chrome/canary",
+ "opera/12..latest",
+ "opera/next",
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
+ ]
+ }
+}
diff --git a/node_modules/combined-stream/License b/node_modules/combined-stream/License
new file mode 100644
index 0000000..4804b7a
--- /dev/null
+++ b/node_modules/combined-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/combined-stream/Readme.md b/node_modules/combined-stream/Readme.md
new file mode 100644
index 0000000..9e367b5
--- /dev/null
+++ b/node_modules/combined-stream/Readme.md
@@ -0,0 +1,138 @@
+# combined-stream
+
+A stream that emits multiple other streams one after another.
+
+**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`.
+
+- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.
+
+- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.
+
+## Installation
+
+``` bash
+npm install combined-stream
+```
+
+## Usage
+
+Here is a simple example that shows how you can use combined-stream to combine
+two files into one:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+While the example above works great, it will pause all source streams until
+they are needed. If you don't want that to happen, you can set `pauseStreams`
+to `false`:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create({pauseStreams: false});
+combinedStream.append(fs.createReadStream('file1.txt'));
+combinedStream.append(fs.createReadStream('file2.txt'));
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+However, what if you don't have all the source streams yet, or you don't want
+to allocate the resources (file descriptors, memory, etc.) for them right away?
+Well, in that case you can simply provide a callback that supplies the stream
+by calling a `next()` function:
+
+``` javascript
+var CombinedStream = require('combined-stream');
+var fs = require('fs');
+
+var combinedStream = CombinedStream.create();
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file1.txt'));
+});
+combinedStream.append(function(next) {
+ next(fs.createReadStream('file2.txt'));
+});
+
+combinedStream.pipe(fs.createWriteStream('combined.txt'));
+```
+
+## API
+
+### CombinedStream.create([options])
+
+Returns a new combined stream object. Available options are:
+
+* `maxDataSize`
+* `pauseStreams`
+
+The effect of those options is described below.
+
+### combinedStream.pauseStreams = `true`
+
+Whether to apply back pressure to the underlaying streams. If set to `false`,
+the underlaying streams will never be paused. If set to `true`, the
+underlaying streams will be paused right after being appended, as well as when
+`delayedStream.pipe()` wants to throttle.
+
+### combinedStream.maxDataSize = `2 * 1024 * 1024`
+
+The maximum amount of bytes (or characters) to buffer for all source streams.
+If this value is exceeded, `combinedStream` emits an `'error'` event.
+
+### combinedStream.dataSize = `0`
+
+The amount of bytes (or characters) currently buffered by `combinedStream`.
+
+### combinedStream.append(stream)
+
+Appends the given `stream` to the combinedStream object. If `pauseStreams` is
+set to `true, this stream will also be paused right away.
+
+`streams` can also be a function that takes one parameter called `next`. `next`
+is a function that must be invoked in order to provide the `next` stream, see
+example above.
+
+Regardless of how the `stream` is appended, combined-stream always attaches an
+`'error'` listener to it, so you don't have to do that manually.
+
+Special case: `stream` can also be a String or Buffer.
+
+### combinedStream.write(data)
+
+You should not call this, `combinedStream` takes care of piping the appended
+streams into itself for you.
+
+### combinedStream.resume()
+
+Causes `combinedStream` to start drain the streams it manages. The function is
+idempotent, and also emits a `'resume'` event each time which usually goes to
+the stream that is currently being drained.
+
+### combinedStream.pause();
+
+If `combinedStream.pauseStreams` is set to `false`, this does nothing.
+Otherwise a `'pause'` event is emitted, this goes to the stream that is
+currently being drained, so you can use it to apply back pressure.
+
+### combinedStream.end();
+
+Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
+all streams from the queue.
+
+### combinedStream.destroy();
+
+Same as `combinedStream.end()`, except it emits a `'close'` event instead of
+`'end'`.
+
+## License
+
+combined-stream is licensed under the MIT license.
diff --git a/node_modules/combined-stream/lib/combined_stream.js b/node_modules/combined-stream/lib/combined_stream.js
new file mode 100644
index 0000000..125f097
--- /dev/null
+++ b/node_modules/combined-stream/lib/combined_stream.js
@@ -0,0 +1,208 @@
+var util = require('util');
+var Stream = require('stream').Stream;
+var DelayedStream = require('delayed-stream');
+
+module.exports = CombinedStream;
+function CombinedStream() {
+ this.writable = false;
+ this.readable = true;
+ this.dataSize = 0;
+ this.maxDataSize = 2 * 1024 * 1024;
+ this.pauseStreams = true;
+
+ this._released = false;
+ this._streams = [];
+ this._currentStream = null;
+ this._insideLoop = false;
+ this._pendingNext = false;
+}
+util.inherits(CombinedStream, Stream);
+
+CombinedStream.create = function(options) {
+ var combinedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ combinedStream[option] = options[option];
+ }
+
+ return combinedStream;
+};
+
+CombinedStream.isStreamLike = function(stream) {
+ return (typeof stream !== 'function')
+ && (typeof stream !== 'string')
+ && (typeof stream !== 'boolean')
+ && (typeof stream !== 'number')
+ && (!Buffer.isBuffer(stream));
+};
+
+CombinedStream.prototype.append = function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+
+ if (isStreamLike) {
+ if (!(stream instanceof DelayedStream)) {
+ var newStream = DelayedStream.create(stream, {
+ maxDataSize: Infinity,
+ pauseStream: this.pauseStreams,
+ });
+ stream.on('data', this._checkDataSize.bind(this));
+ stream = newStream;
+ }
+
+ this._handleErrors(stream);
+
+ if (this.pauseStreams) {
+ stream.pause();
+ }
+ }
+
+ this._streams.push(stream);
+ return this;
+};
+
+CombinedStream.prototype.pipe = function(dest, options) {
+ Stream.prototype.pipe.call(this, dest, options);
+ this.resume();
+ return dest;
+};
+
+CombinedStream.prototype._getNext = function() {
+ this._currentStream = null;
+
+ if (this._insideLoop) {
+ this._pendingNext = true;
+ return; // defer call
+ }
+
+ this._insideLoop = true;
+ try {
+ do {
+ this._pendingNext = false;
+ this._realGetNext();
+ } while (this._pendingNext);
+ } finally {
+ this._insideLoop = false;
+ }
+};
+
+CombinedStream.prototype._realGetNext = function() {
+ var stream = this._streams.shift();
+
+
+ if (typeof stream == 'undefined') {
+ this.end();
+ return;
+ }
+
+ if (typeof stream !== 'function') {
+ this._pipeNext(stream);
+ return;
+ }
+
+ var getStream = stream;
+ getStream(function(stream) {
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('data', this._checkDataSize.bind(this));
+ this._handleErrors(stream);
+ }
+
+ this._pipeNext(stream);
+ }.bind(this));
+};
+
+CombinedStream.prototype._pipeNext = function(stream) {
+ this._currentStream = stream;
+
+ var isStreamLike = CombinedStream.isStreamLike(stream);
+ if (isStreamLike) {
+ stream.on('end', this._getNext.bind(this));
+ stream.pipe(this, {end: false});
+ return;
+ }
+
+ var value = stream;
+ this.write(value);
+ this._getNext();
+};
+
+CombinedStream.prototype._handleErrors = function(stream) {
+ var self = this;
+ stream.on('error', function(err) {
+ self._emitError(err);
+ });
+};
+
+CombinedStream.prototype.write = function(data) {
+ this.emit('data', data);
+};
+
+CombinedStream.prototype.pause = function() {
+ if (!this.pauseStreams) {
+ return;
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
+ this.emit('pause');
+};
+
+CombinedStream.prototype.resume = function() {
+ if (!this._released) {
+ this._released = true;
+ this.writable = true;
+ this._getNext();
+ }
+
+ if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
+ this.emit('resume');
+};
+
+CombinedStream.prototype.end = function() {
+ this._reset();
+ this.emit('end');
+};
+
+CombinedStream.prototype.destroy = function() {
+ this._reset();
+ this.emit('close');
+};
+
+CombinedStream.prototype._reset = function() {
+ this.writable = false;
+ this._streams = [];
+ this._currentStream = null;
+};
+
+CombinedStream.prototype._checkDataSize = function() {
+ this._updateDataSize();
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
+ this._emitError(new Error(message));
+};
+
+CombinedStream.prototype._updateDataSize = function() {
+ this.dataSize = 0;
+
+ var self = this;
+ this._streams.forEach(function(stream) {
+ if (!stream.dataSize) {
+ return;
+ }
+
+ self.dataSize += stream.dataSize;
+ });
+
+ if (this._currentStream && this._currentStream.dataSize) {
+ this.dataSize += this._currentStream.dataSize;
+ }
+};
+
+CombinedStream.prototype._emitError = function(err) {
+ this._reset();
+ this.emit('error', err);
+};
diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json
new file mode 100644
index 0000000..6982b6d
--- /dev/null
+++ b/node_modules/combined-stream/package.json
@@ -0,0 +1,25 @@
+{
+ "author": "Felix Geisendörfer (http://debuggable.com/)",
+ "name": "combined-stream",
+ "description": "A stream that emits multiple other streams one after another.",
+ "version": "1.0.8",
+ "homepage": "https://github.com/felixge/node-combined-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-combined-stream.git"
+ },
+ "main": "./lib/combined_stream",
+ "scripts": {
+ "test": "node test/run.js"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "devDependencies": {
+ "far": "~0.0.7"
+ },
+ "license": "MIT"
+}
diff --git a/node_modules/combined-stream/yarn.lock b/node_modules/combined-stream/yarn.lock
new file mode 100644
index 0000000..7edf418
--- /dev/null
+++ b/node_modules/combined-stream/yarn.lock
@@ -0,0 +1,17 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+
+far@~0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
+ dependencies:
+ oop "0.0.3"
+
+oop@0.0.3:
+ version "0.0.3"
+ resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"
diff --git a/node_modules/data-uri-to-buffer/README.md b/node_modules/data-uri-to-buffer/README.md
new file mode 100644
index 0000000..d0f2e05
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/README.md
@@ -0,0 +1,88 @@
+data-uri-to-buffer
+==================
+### Generate a Buffer instance from a [Data URI][rfc] string
+[](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer)
+
+This module accepts a ["data" URI][rfc] String of data, and returns a
+node.js `Buffer` instance with the decoded data.
+
+
+Installation
+------------
+
+Install with `npm`:
+
+``` bash
+$ npm install data-uri-to-buffer
+```
+
+
+Example
+-------
+
+``` js
+import dataUriToBuffer from 'data-uri-to-buffer';
+
+// plain-text data is supported
+let uri = 'data:,Hello%2C%20World!';
+let decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+
+// base64-encoded data is supported
+uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D';
+decoded = dataUriToBuffer(uri);
+console.log(decoded.toString());
+// 'Hello, World!'
+```
+
+
+API
+---
+
+### dataUriToBuffer(String uri) → Buffer
+
+The `type` property on the Buffer instance gets set to the main type portion of
+the "mediatype" portion of the "data" URI, or defaults to `"text/plain"` if not
+specified.
+
+The `typeFull` property on the Buffer instance gets set to the entire
+"mediatype" portion of the "data" URI (including all parameters), or defaults
+to `"text/plain;charset=US-ASCII"` if not specified.
+
+The `charset` property on the Buffer instance gets set to the Charset portion of
+the "mediatype" portion of the "data" URI, or defaults to `"US-ASCII"` if the
+entire type is not specified, or defaults to `""` otherwise.
+
+*Note*: If the only the main type is specified but not the charset, e.g.
+`"data:text/plain,abc"`, the charset is set to the empty string. The spec only
+defaults to US-ASCII as charset if the entire type is not specified.
+
+
+License
+-------
+
+(The MIT License)
+
+Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+[rfc]: http://tools.ietf.org/html/rfc2397
diff --git a/node_modules/data-uri-to-buffer/dist/index.js b/node_modules/data-uri-to-buffer/dist/index.js
new file mode 100644
index 0000000..4ddd079
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/dist/index.js
@@ -0,0 +1,53 @@
+/**
+ * Returns a `Buffer` instance from the given data URI `uri`.
+ *
+ * @param {String} uri Data URI to turn into a Buffer instance
+ * @returns {Buffer} Buffer instance from Data URI
+ * @api public
+ */
+export function dataUriToBuffer(uri) {
+ if (!/^data:/i.test(uri)) {
+ throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
+ }
+ // strip newlines
+ uri = uri.replace(/\r?\n/g, '');
+ // split the URI up into the "metadata" and the "data" portions
+ const firstComma = uri.indexOf(',');
+ if (firstComma === -1 || firstComma <= 4) {
+ throw new TypeError('malformed data: URI');
+ }
+ // remove the "data:" scheme and parse the metadata
+ const meta = uri.substring(5, firstComma).split(';');
+ let charset = '';
+ let base64 = false;
+ const type = meta[0] || 'text/plain';
+ let typeFull = type;
+ for (let i = 1; i < meta.length; i++) {
+ if (meta[i] === 'base64') {
+ base64 = true;
+ }
+ else if (meta[i]) {
+ typeFull += `;${meta[i]}`;
+ if (meta[i].indexOf('charset=') === 0) {
+ charset = meta[i].substring(8);
+ }
+ }
+ }
+ // defaults to US-ASCII only if type is not provided
+ if (!meta[0] && !charset.length) {
+ typeFull += ';charset=US-ASCII';
+ charset = 'US-ASCII';
+ }
+ // get the encoded data portion and decode URI-encoded chars
+ const encoding = base64 ? 'base64' : 'ascii';
+ const data = unescape(uri.substring(firstComma + 1));
+ const buffer = Buffer.from(data, encoding);
+ // set `.type` and `.typeFull` properties to MIME type
+ buffer.type = type;
+ buffer.typeFull = typeFull;
+ // set the `.charset` property
+ buffer.charset = charset;
+ return buffer;
+}
+export default dataUriToBuffer;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/data-uri-to-buffer/package.json b/node_modules/data-uri-to-buffer/package.json
new file mode 100644
index 0000000..9e42713
--- /dev/null
+++ b/node_modules/data-uri-to-buffer/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "data-uri-to-buffer",
+ "version": "4.0.1",
+ "description": "Generate a Buffer instance from a Data URI string",
+ "type": "module",
+ "exports": "./dist/index.js",
+ "main": "./dist/index.js",
+ "types": "./dist/index.d.ts",
+ "files": [
+ "dist",
+ "src"
+ ],
+ "scripts": {
+ "build": "tsc",
+ "test": "jest",
+ "prepublishOnly": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-data-uri-to-buffer.git"
+ },
+ "engines": {
+ "node": ">= 12"
+ },
+ "keywords": [
+ "data",
+ "uri",
+ "datauri",
+ "data-uri",
+ "buffer",
+ "convert",
+ "rfc2397",
+ "2397"
+ ],
+ "author": "Nathan Rajlich (http://n8.io/)",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-data-uri-to-buffer/issues"
+ },
+ "homepage": "https://github.com/TooTallNate/node-data-uri-to-buffer",
+ "devDependencies": {
+ "@types/jest": "^27.0.2",
+ "@types/node": "^12.20.36",
+ "jest": "^27.3.1",
+ "ts-jest": "^27.0.7",
+ "typescript": "^4.4.4"
+ },
+ "jest": {
+ "preset": "ts-jest",
+ "globals": {
+ "ts-jest": {
+ "diagnostics": false,
+ "isolatedModules": true
+ }
+ },
+ "verbose": false,
+ "testEnvironment": "node",
+ "testMatch": [
+ "/test/**/*.test.ts"
+ ]
+ }
+}
diff --git a/node_modules/delayed-stream/.npmignore b/node_modules/delayed-stream/.npmignore
new file mode 100644
index 0000000..9daeafb
--- /dev/null
+++ b/node_modules/delayed-stream/.npmignore
@@ -0,0 +1 @@
+test
diff --git a/node_modules/delayed-stream/License b/node_modules/delayed-stream/License
new file mode 100644
index 0000000..4804b7a
--- /dev/null
+++ b/node_modules/delayed-stream/License
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Debuggable Limited
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/delayed-stream/Makefile b/node_modules/delayed-stream/Makefile
new file mode 100644
index 0000000..b4ff85a
--- /dev/null
+++ b/node_modules/delayed-stream/Makefile
@@ -0,0 +1,7 @@
+SHELL := /bin/bash
+
+test:
+ @./test/run.js
+
+.PHONY: test
+
diff --git a/node_modules/delayed-stream/Readme.md b/node_modules/delayed-stream/Readme.md
new file mode 100644
index 0000000..aca36f9
--- /dev/null
+++ b/node_modules/delayed-stream/Readme.md
@@ -0,0 +1,141 @@
+# delayed-stream
+
+Buffers events from a stream until you are ready to handle them.
+
+## Installation
+
+``` bash
+npm install delayed-stream
+```
+
+## Usage
+
+The following example shows how to write a http echo server that delays its
+response by 1000 ms.
+
+``` javascript
+var DelayedStream = require('delayed-stream');
+var http = require('http');
+
+http.createServer(function(req, res) {
+ var delayed = DelayedStream.create(req);
+
+ setTimeout(function() {
+ res.writeHead(200);
+ delayed.pipe(res);
+ }, 1000);
+});
+```
+
+If you are not using `Stream#pipe`, you can also manually release the buffered
+events by calling `delayedStream.resume()`:
+
+``` javascript
+var delayed = DelayedStream.create(req);
+
+setTimeout(function() {
+ // Emit all buffered events and resume underlaying source
+ delayed.resume();
+}, 1000);
+```
+
+## Implementation
+
+In order to use this meta stream properly, here are a few things you should
+know about the implementation.
+
+### Event Buffering / Proxying
+
+All events of the `source` stream are hijacked by overwriting the `source.emit`
+method. Until node implements a catch-all event listener, this is the only way.
+
+However, delayed-stream still continues to emit all events it captures on the
+`source`, regardless of whether you have released the delayed stream yet or
+not.
+
+Upon creation, delayed-stream captures all `source` events and stores them in
+an internal event buffer. Once `delayedStream.release()` is called, all
+buffered events are emitted on the `delayedStream`, and the event buffer is
+cleared. After that, delayed-stream merely acts as a proxy for the underlaying
+source.
+
+### Error handling
+
+Error events on `source` are buffered / proxied just like any other events.
+However, `delayedStream.create` attaches a no-op `'error'` listener to the
+`source`. This way you only have to handle errors on the `delayedStream`
+object, rather than in two places.
+
+### Buffer limits
+
+delayed-stream provides a `maxDataSize` property that can be used to limit
+the amount of data being buffered. In order to protect you from bad `source`
+streams that don't react to `source.pause()`, this feature is enabled by
+default.
+
+## API
+
+### DelayedStream.create(source, [options])
+
+Returns a new `delayedStream`. Available options are:
+
+* `pauseStream`
+* `maxDataSize`
+
+The description for those properties can be found below.
+
+### delayedStream.source
+
+The `source` stream managed by this object. This is useful if you are
+passing your `delayedStream` around, and you still want to access properties
+on the `source` object.
+
+### delayedStream.pauseStream = true
+
+Whether to pause the underlaying `source` when calling
+`DelayedStream.create()`. Modifying this property afterwards has no effect.
+
+### delayedStream.maxDataSize = 1024 * 1024
+
+The amount of data to buffer before emitting an `error`.
+
+If the underlaying source is emitting `Buffer` objects, the `maxDataSize`
+refers to bytes.
+
+If the underlaying source is emitting JavaScript strings, the size refers to
+characters.
+
+If you know what you are doing, you can set this property to `Infinity` to
+disable this feature. You can also modify this property during runtime.
+
+### delayedStream.dataSize = 0
+
+The amount of data buffered so far.
+
+### delayedStream.readable
+
+An ECMA5 getter that returns the value of `source.readable`.
+
+### delayedStream.resume()
+
+If the `delayedStream` has not been released so far, `delayedStream.release()`
+is called.
+
+In either case, `source.resume()` is called.
+
+### delayedStream.pause()
+
+Calls `source.pause()`.
+
+### delayedStream.pipe(dest)
+
+Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.
+
+### delayedStream.release()
+
+Emits and clears all events that have been buffered up so far. This does not
+resume the underlaying source, use `delayedStream.resume()` instead.
+
+## License
+
+delayed-stream is licensed under the MIT license.
diff --git a/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/delayed-stream/lib/delayed_stream.js
new file mode 100644
index 0000000..b38fc85
--- /dev/null
+++ b/node_modules/delayed-stream/lib/delayed_stream.js
@@ -0,0 +1,107 @@
+var Stream = require('stream').Stream;
+var util = require('util');
+
+module.exports = DelayedStream;
+function DelayedStream() {
+ this.source = null;
+ this.dataSize = 0;
+ this.maxDataSize = 1024 * 1024;
+ this.pauseStream = true;
+
+ this._maxDataSizeExceeded = false;
+ this._released = false;
+ this._bufferedEvents = [];
+}
+util.inherits(DelayedStream, Stream);
+
+DelayedStream.create = function(source, options) {
+ var delayedStream = new this();
+
+ options = options || {};
+ for (var option in options) {
+ delayedStream[option] = options[option];
+ }
+
+ delayedStream.source = source;
+
+ var realEmit = source.emit;
+ source.emit = function() {
+ delayedStream._handleEmit(arguments);
+ return realEmit.apply(source, arguments);
+ };
+
+ source.on('error', function() {});
+ if (delayedStream.pauseStream) {
+ source.pause();
+ }
+
+ return delayedStream;
+};
+
+Object.defineProperty(DelayedStream.prototype, 'readable', {
+ configurable: true,
+ enumerable: true,
+ get: function() {
+ return this.source.readable;
+ }
+});
+
+DelayedStream.prototype.setEncoding = function() {
+ return this.source.setEncoding.apply(this.source, arguments);
+};
+
+DelayedStream.prototype.resume = function() {
+ if (!this._released) {
+ this.release();
+ }
+
+ this.source.resume();
+};
+
+DelayedStream.prototype.pause = function() {
+ this.source.pause();
+};
+
+DelayedStream.prototype.release = function() {
+ this._released = true;
+
+ this._bufferedEvents.forEach(function(args) {
+ this.emit.apply(this, args);
+ }.bind(this));
+ this._bufferedEvents = [];
+};
+
+DelayedStream.prototype.pipe = function() {
+ var r = Stream.prototype.pipe.apply(this, arguments);
+ this.resume();
+ return r;
+};
+
+DelayedStream.prototype._handleEmit = function(args) {
+ if (this._released) {
+ this.emit.apply(this, args);
+ return;
+ }
+
+ if (args[0] === 'data') {
+ this.dataSize += args[1].length;
+ this._checkIfMaxDataSizeExceeded();
+ }
+
+ this._bufferedEvents.push(args);
+};
+
+DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
+ if (this._maxDataSizeExceeded) {
+ return;
+ }
+
+ if (this.dataSize <= this.maxDataSize) {
+ return;
+ }
+
+ this._maxDataSizeExceeded = true;
+ var message =
+ 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'
+ this.emit('error', new Error(message));
+};
diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json
new file mode 100644
index 0000000..eea3291
--- /dev/null
+++ b/node_modules/delayed-stream/package.json
@@ -0,0 +1,27 @@
+{
+ "author": "Felix Geisendörfer (http://debuggable.com/)",
+ "contributors": [
+ "Mike Atkins "
+ ],
+ "name": "delayed-stream",
+ "description": "Buffers events from a stream until you are ready to handle them.",
+ "license": "MIT",
+ "version": "1.0.0",
+ "homepage": "https://github.com/felixge/node-delayed-stream",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/felixge/node-delayed-stream.git"
+ },
+ "main": "./lib/delayed_stream",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "fake": "0.2.0",
+ "far": "0.0.1"
+ }
+}
diff --git a/node_modules/diff/CONTRIBUTING.md b/node_modules/diff/CONTRIBUTING.md
new file mode 100644
index 0000000..c974cf6
--- /dev/null
+++ b/node_modules/diff/CONTRIBUTING.md
@@ -0,0 +1,36 @@
+# How to Contribute
+
+## Pull Requests
+
+We also accept [pull requests][pull-request]!
+
+Generally we like to see pull requests that
+
+- Maintain the existing code style
+- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request)
+- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
+- Have tests
+- Don't decrease the current code coverage (see coverage/lcov-report/index.html)
+
+## Building
+
+```
+yarn
+yarn test
+```
+
+Running `yarn test -- dev` will watch for tests within Node and `karma start` may be used for manual testing in browsers.
+
+If you notice any problems, please report them to the GitHub issue tracker at
+[http://github.com/kpdecker/jsdiff/issues](http://github.com/kpdecker/jsdiff/issues).
+
+## Releasing
+
+A full release may be completed with the following:
+
+```
+yarn clean
+yarn grunt
+yarn grunt uglify
+yarn publish
+```
diff --git a/node_modules/diff/LICENSE b/node_modules/diff/LICENSE
new file mode 100644
index 0000000..2d48b19
--- /dev/null
+++ b/node_modules/diff/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2009-2015, Kevin Decker
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/diff/README.md b/node_modules/diff/README.md
new file mode 100644
index 0000000..0180717
--- /dev/null
+++ b/node_modules/diff/README.md
@@ -0,0 +1,339 @@
+# jsdiff
+
+[](http://travis-ci.org/kpdecker/jsdiff)
+[](https://saucelabs.com/u/jsdiff)
+
+A JavaScript text differencing implementation. Try it out in the **[online demo](https://kpdecker.github.io/jsdiff)**.
+
+Based on the algorithm proposed in
+["An O(ND) Difference Algorithm and its Variations" (Myers, 1986)](http://www.xmailserver.org/diff2.pdf).
+
+## Installation
+```bash
+npm install diff --save
+```
+
+## Usage
+
+Broadly, jsdiff's diff functions all take an old text and a new text and perform three steps:
+
+1. Split both texts into arrays of "tokens". What constitutes a token varies; in `diffChars`, each character is a token, while in `diffLines`, each line is a token.
+
+2. Find the smallest set of single-token *insertions* and *deletions* needed to transform the first array of tokens into the second.
+
+ This step depends upon having some notion of a token from the old array being "equal" to one from the new array, and this notion of equality affects the results. Usually two tokens are equal if `===` considers them equal, but some of the diff functions use an alternative notion of equality or have options to configure it. For instance, by default `diffChars("Foo", "FOOD")` will require two deletions (`o`, `o`) and three insertions (`O`, `O`, `D`), but `diffChars("Foo", "FOOD", {ignoreCase: true})` will require just one insertion (of a `D`), since `ignoreCase` causes `o` and `O` to be considered equal.
+
+3. Return an array representing the transformation computed in the previous step as a series of [change objects](#change-objects). The array is ordered from the start of the input to the end, and each change object represents *inserting* one or more tokens, *deleting* one or more tokens, or *keeping* one or more tokens.
+
+### API
+
+* `Diff.diffChars(oldStr, newStr[, options])` - diffs two blocks of text, treating each character as a token.
+
+ Returns a list of [change objects](#change-objects).
+
+ Options
+ * `ignoreCase`: If `true`, the uppercase and lowercase forms of a character are considered equal. Defaults to `false`.
+
+* `Diff.diffWords(oldStr, newStr[, options])` - diffs two blocks of text, treating each word and each word separator (punctuation, newline, or run of whitespace) as a token.
+
+ (Whitespace-only tokens are automatically treated as equal to each other, so changes like changing a space to a newline or a run of multiple spaces will be ignored.)
+
+ Returns a list of [change objects](#change-objects).
+
+ Options
+ * `ignoreCase`: Same as in `diffChars`. Defaults to false.
+
+* `Diff.diffWordsWithSpace(oldStr, newStr[, options])` - same as `diffWords`, except whitespace-only tokens are not automatically considered equal, so e.g. changing a space to a tab is considered a change.
+
+* `Diff.diffLines(oldStr, newStr[, options])` - diffs two blocks of text, treating each line as a token.
+
+ Options
+ * `ignoreWhitespace`: `true` to strip all leading and trailing whitespace characters from each line before performing the diff. Defaults to `false`.
+ * `stripTrailingCr`: `true` to remove all trailing CR (`\r`) characters before performing the diff. Defaults to `false`.
+ This helps to get a useful diff when diffing UNIX text files against Windows text files.
+ * `newlineIsToken`: `true` to treat the newline character at the end of each line as its own token. This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more human friendly form of `diffLines`; the default behavior with this option turned off is better suited for patches and other computer friendly output. Defaults to `false`.
+
+ Returns a list of [change objects](#change-objects).
+
+* `Diff.diffTrimmedLines(oldStr, newStr[, options])` - diffs two blocks of text, comparing line by line, after stripping leading and trailing whitespace. Equivalent to calling `diffLines` with `ignoreWhitespace: true`.
+
+ Options
+ * `stripTrailingCr`: Same as in `diffLines`. Defaults to `false`.
+ * `newlineIsToken`: Same as in `diffLines`. Defaults to `false`.
+
+ Returns a list of [change objects](#change-objects).
+
+* `Diff.diffSentences(oldStr, newStr[, options])` - diffs two blocks of text, treating each sentence as a token.
+
+ Returns a list of [change objects](#change-objects).
+
+* `Diff.diffCss(oldStr, newStr[, options])` - diffs two blocks of text, comparing CSS tokens.
+
+ Returns a list of [change objects](#change-objects).
+
+* `Diff.diffJson(oldObj, newObj[, options])` - diffs two JSON-serializable objects by first serializing them to prettily-formatted JSON and then treating each line of the JSON as a token. Object properties are ordered alphabetically in the serialized JSON, so the order of properties in the objects being compared doesn't affect the result.
+
+ Returns a list of [change objects](#change-objects).
+
+ Options
+ * `stringifyReplacer`: A custom replacer function. Operates similarly to the `replacer` parameter to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter), but must be a function.
+ * `undefinedReplacement`: A value to replace `undefined` with. Ignored if a `stringifyReplacer` is provided.
+
+* `Diff.diffArrays(oldArr, newArr[, options])` - diffs two arrays of tokens, comparing each item for strict equality (===).
+
+ Options
+ * `comparator`: `function(left, right)` for custom equality checks
+
+ Returns a list of [change objects](#change-objects).
+
+* `Diff.createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch by first computing a diff with `diffLines` and then serializing it to unified diff format.
+
+ Parameters:
+ * `oldFileName` : String to be output in the filename section of the patch for the removals
+ * `newFileName` : String to be output in the filename section of the patch for the additions
+ * `oldStr` : Original string value
+ * `newStr` : New string value
+ * `oldHeader` : Optional additional information to include in the old file header. Default: `undefined`.
+ * `newHeader` : Optional additional information to include in the new file header. Default: `undefined`.
+ * `options` : An object with options.
+ - `context` describes how many lines of context should be included. You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk.
+ - `ignoreWhitespace`: Same as in `diffLines`. Defaults to `false`.
+ - `stripTrailingCr`: Same as in `diffLines`. Defaults to `false`.
+ - `newlineIsToken`: Same as in `diffLines`. Defaults to `false`.
+
+* `Diff.createPatch(fileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch.
+
+ Just like Diff.createTwoFilesPatch, but with oldFileName being equal to newFileName.
+
+* `Diff.formatPatch(patch)` - creates a unified diff patch.
+
+ `patch` may be either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`).
+
+* `Diff.structuredPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - returns an object with an array of hunk objects.
+
+ This method is similar to createTwoFilesPatch, but returns a data structure
+ suitable for further processing. Parameters are the same as createTwoFilesPatch. The data structure returned may look like this:
+
+ ```js
+ {
+ oldFileName: 'oldfile', newFileName: 'newfile',
+ oldHeader: 'header1', newHeader: 'header2',
+ hunks: [{
+ oldStart: 1, oldLines: 3, newStart: 1, newLines: 3,
+ lines: [' line2', ' line3', '-line4', '+line5', '\\ No newline at end of file'],
+ }]
+ }
+ ```
+
+* `Diff.applyPatch(source, patch[, options])` - attempts to apply a unified diff patch.
+
+ If the patch was applied successfully, returns a string containing the patched text. If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), returns false.
+
+ `patch` may be a string diff or the output from the `parsePatch` or `structuredPatch` methods.
+
+ The optional `options` object may have the following keys:
+
+ - `fuzzFactor`: Number of lines that are allowed to differ before rejecting a patch. Defaults to 0.
+ - `compareLine(lineNumber, line, operation, patchContent)`: Callback used to compare to given lines to determine if they should be considered equal when patching. Defaults to strict equality but may be overridden to provide fuzzier comparison. Should return false if the lines should be rejected.
+
+* `Diff.applyPatches(patch, options)` - applies one or more patches.
+
+ `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files).
+
+ This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is:
+
+ - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution.
+ - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution.
+
+ Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made.
+
+* `Diff.parsePatch(diffStr)` - Parses a patch into structured data
+
+ Return a JSON object representation of the a patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `Diff.structuredPatch`.
+
+* `Diff.reversePatch(patch)` - Returns a new structured patch which when applied will undo the original `patch`.
+
+ `patch` may be either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`).
+
+* `Diff.convertChangesToXML(changes)` - converts a list of change objects to a serialized XML format
+
+* `Diff.convertChangesToDMP(changes)` - converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library
+
+#### Universal `options`
+
+Certain options can be provided in the `options` object of *any* method that calculates a diff:
+
+* `callback`: if provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. The value of the `callback` option should be a function and will be passed the result of the diff as its second argument. The first argument will always be undefined. Only works with functions that return change objects, like `diffLines`, not those that return patches, like `structuredPatch` or `createPatch`.
+
+ (Note that if the ONLY option you want to provide is a callback, you can pass the callback function directly as the `options` parameter instead of passing an object with a `callback` property.)
+* `maxEditLength`: a number specifying the maximum edit distance to consider between the old and new texts. If the edit distance is higher than this, jsdiff will return `undefined` instead of a diff. You can use this to limit the computational cost of diffing large, very different texts by giving up early if the cost will be huge. Works for functions that return change objects and also for `structuredPatch`, but not other patch-generation functions.
+
+* `timeout`: a number of milliseconds after which the diffing algorithm will abort and return `undefined`. Supported by the same functions as `maxEditLength`.
+
+### Defining custom diffing behaviors
+
+If you need behavior a little different to what any of the text diffing functions above offer, you can roll your own by customizing both the tokenization behavior used and the notion of equality used to determine if two tokens are equal.
+
+The simplest way to customize tokenization behavior is to simply tokenize the texts you want to diff yourself, with your own code, then pass the arrays of tokens to `diffArrays`. For instance, if you wanted a semantically-aware diff of some code, you could try tokenizing it using a parser specific to the programming language the code is in, then passing the arrays of tokens to `diffArrays`.
+
+To customize the notion of token equality used, use the `comparator` option to `diffArrays`.
+
+For even more customisation of the diffing behavior, you can create a `new Diff.Diff()` object, overwrite its `castInput`, `tokenize`, `removeEmpty`, `equals`, and `join` properties with your own functions, then call its `diff(oldString, newString[, options])` method. The methods you can overwrite are used as follows:
+
+* `castInput(value)`: used to transform the `oldString` and `newString` before any other steps in the diffing algorithm happen. For instance, `diffJson` uses `castInput` to serialize the objects being diffed to JSON. Defaults to a no-op.
+* `tokenize(value)`: used to convert each of `oldString` and `newString` (after they've gone through `castInput`) to an array of tokens. Defaults to returning `value.split('')` (returning an array of individual characters).
+* `removeEmpty(array)`: called on the arrays of tokens returned by `tokenize` and can be used to modify them. Defaults to stripping out falsey tokens, such as empty strings. `diffArrays` overrides this to simply return the `array`, which means that falsey values like empty strings can be handled like any other token by `diffArrays`.
+* `equals(left, right)`: called to determine if two tokens (one from the old string, one from the new string) should be considered equal. Defaults to comparing them with `===`.
+* `join(tokens)`: gets called with an array of consecutive tokens that have either all been added, all been removed, or are all common. Needs to join them into a single value that can be used as the `value` property of the [change object](#change-objects) for these tokens. Defaults to simply returning `tokens.join('')`.
+
+### Change Objects
+Many of the methods above return change objects. These objects consist of the following fields:
+
+* `value`: The concatenated content of all the tokens represented by this change object - i.e. generally the text that is either added, deleted, or common, as a single string. In cases where tokens are considered common but are non-identical (e.g. because an option like `ignoreCase` or a custom `comparator` was used), the value from the *new* string will be provided here.
+* `added`: True if the value was inserted into the new string
+* `removed`: True if the value was removed from the old string
+* `count`: How many tokens (e.g. chars for `diffChars`, lines for `diffLines`) the value in the change object consists of
+
+(Change objects where `added` and `removed` are both falsey represent content that is common to the old and new strings.)
+
+Note that some cases may omit a particular flag field. Comparison on the flag fields should always be done in a truthy or falsy manner.
+
+## Examples
+
+#### Basic example in Node
+
+```js
+require('colors');
+const Diff = require('diff');
+
+const one = 'beep boop';
+const other = 'beep boob blah';
+
+const diff = Diff.diffChars(one, other);
+
+diff.forEach((part) => {
+ // green for additions, red for deletions
+ let text = part.added ? part.value.bgGreen :
+ part.removed ? part.value.bgRed :
+ part.value;
+ process.stderr.write(text);
+});
+
+console.log();
+```
+Running the above program should yield
+
+
+
+#### Basic example in a web page
+
+```html
+
+
+
+```
+
+Open the above .html file in a browser and you should see
+
+
+
+#### Example of generating a patch from Node
+
+The code below is roughly equivalent to the Unix command `diff -u file1.txt file2.txt > mydiff.patch`:
+
+```
+const Diff = require('diff');
+const file1Contents = fs.readFileSync("file1.txt").toString();
+const file2Contents = fs.readFileSync("file2.txt").toString();
+const patch = Diff.createTwoFilesPatch("file1.txt", "file2.txt", file1Contents, file2Contents);
+fs.writeFileSync("mydiff.patch", patch);
+```
+
+#### Examples of parsing and applying a patch from Node
+
+##### Applying a patch to a specified file
+
+The code below is roughly equivalent to the Unix command `patch file1.txt mydiff.patch`:
+
+```
+const Diff = require('diff');
+const file1Contents = fs.readFileSync("file1.txt").toString();
+const patch = fs.readFileSync("mydiff.patch").toString();
+const patchedFile = Diff.applyPatch(file1Contents, patch);
+fs.writeFileSync("file1.txt", patchedFile);
+```
+
+##### Applying a multi-file patch to the files specified by the patch file itself
+
+The code below is roughly equivalent to the Unix command `patch < mydiff.patch`:
+
+```
+const Diff = require('diff');
+const patch = fs.readFileSync("mydiff.patch").toString();
+Diff.applyPatches(patch, {
+ loadFile: (patch, callback) => {
+ let fileContents;
+ try {
+ fileContents = fs.readFileSync(patch.oldFileName).toString();
+ } catch (e) {
+ callback(`No such file: ${patch.oldFileName}`);
+ return;
+ }
+ callback(undefined, fileContents);
+ },
+ patched: (patch, patchedContent, callback) => {
+ if (patchedContent === false) {
+ callback(`Failed to apply patch to ${patch.oldFileName}`)
+ return;
+ }
+ fs.writeFileSync(patch.oldFileName, patchedContent);
+ callback();
+ },
+ complete: (err) => {
+ if (err) {
+ console.log("Failed with error:", err);
+ }
+ }
+});
+```
+
+## Compatibility
+
+[](https://saucelabs.com/u/jsdiff)
+
+jsdiff supports all ES3 environments with some known issues on IE8 and below. Under these browsers some diff algorithms such as word diff and others may fail due to lack of support for capturing groups in the `split` operation.
+
+## License
+
+See [LICENSE](https://github.com/kpdecker/jsdiff/blob/master/LICENSE).
+
+## Deviations from the published Myers diff algorithm
+
+jsdiff deviates from the published algorithm in a couple of ways that don't affect results but do affect performance:
+
+* jsdiff keeps track of the diff for each diagonal using a linked list of change objects for each diagonal, rather than the historical array of furthest-reaching D-paths on each diagonal contemplated on page 8 of Myers's paper.
+* jsdiff skips considering diagonals where the furthest-reaching D-path would go off the edge of the edit graph. This dramatically reduces the time cost (from quadratic to linear) in cases where the new text just appends or truncates content at the end of the old text.
diff --git a/node_modules/diff/dist/diff.js b/node_modules/diff/dist/diff.js
new file mode 100644
index 0000000..76232b2
--- /dev/null
+++ b/node_modules/diff/dist/diff.js
@@ -0,0 +1,1730 @@
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (global = global || self, factory(global.Diff = {}));
+}(this, (function (exports) { 'use strict';
+
+ function Diff() {}
+ Diff.prototype = {
+ diff: function diff(oldString, newString) {
+ var _options$timeout;
+
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var callback = options.callback;
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+
+ this.options = options;
+ var self = this;
+
+ function done(value) {
+ if (callback) {
+ setTimeout(function () {
+ callback(undefined, value);
+ }, 0);
+ return true;
+ } else {
+ return value;
+ }
+ } // Allow subclasses to massage the input prior to running
+
+
+ oldString = this.castInput(oldString);
+ newString = this.castInput(newString);
+ oldString = this.removeEmpty(this.tokenize(oldString));
+ newString = this.removeEmpty(this.tokenize(newString));
+ var newLen = newString.length,
+ oldLen = oldString.length;
+ var editLength = 1;
+ var maxEditLength = newLen + oldLen;
+
+ if (options.maxEditLength) {
+ maxEditLength = Math.min(maxEditLength, options.maxEditLength);
+ }
+
+ var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity;
+ var abortAfterTimestamp = Date.now() + maxExecutionTime;
+ var bestPath = [{
+ oldPos: -1,
+ lastComponent: undefined
+ }]; // Seed editLength = 0, i.e. the content starts with the same values
+
+ var newPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+
+ if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
+ // Identity per the equality and tokenizer
+ return done([{
+ value: this.join(newString),
+ count: newString.length
+ }]);
+ } // Once we hit the right edge of the edit graph on some diagonal k, we can
+ // definitely reach the end of the edit graph in no more than k edits, so
+ // there's no point in considering any moves to diagonal k+1 any more (from
+ // which we're guaranteed to need at least k+1 more edits).
+ // Similarly, once we've reached the bottom of the edit graph, there's no
+ // point considering moves to lower diagonals.
+ // We record this fact by setting minDiagonalToConsider and
+ // maxDiagonalToConsider to some finite value once we've hit the edge of
+ // the edit graph.
+ // This optimization is not faithful to the original algorithm presented in
+ // Myers's paper, which instead pointlessly extends D-paths off the end of
+ // the edit graph - see page 7 of Myers's paper which notes this point
+ // explicitly and illustrates it with a diagram. This has major performance
+ // implications for some common scenarios. For instance, to compute a diff
+ // where the new text simply appends d characters on the end of the
+ // original text of length n, the true Myers algorithm will take O(n+d^2)
+ // time while this optimization needs only O(n+d) time.
+
+
+ var minDiagonalToConsider = -Infinity,
+ maxDiagonalToConsider = Infinity; // Main worker method. checks all permutations of a given edit length for acceptance.
+
+ function execEditLength() {
+ for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
+ var basePath = void 0;
+ var removePath = bestPath[diagonalPath - 1],
+ addPath = bestPath[diagonalPath + 1];
+
+ if (removePath) {
+ // No one else is going to attempt to use this value, clear it
+ bestPath[diagonalPath - 1] = undefined;
+ }
+
+ var canAdd = false;
+
+ if (addPath) {
+ // what newPos will be after we do an insertion:
+ var addPathNewPos = addPath.oldPos - diagonalPath;
+ canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;
+ }
+
+ var canRemove = removePath && removePath.oldPos + 1 < oldLen;
+
+ if (!canAdd && !canRemove) {
+ // If this path is a terminal then prune
+ bestPath[diagonalPath] = undefined;
+ continue;
+ } // Select the diagonal that we want to branch from. We select the prior
+ // path whose position in the old string is the farthest from the origin
+ // and does not pass the bounds of the diff graph
+ // TODO: Remove the `+ 1` here to make behavior match Myers algorithm
+ // and prefer to order removals before insertions.
+
+
+ if (!canRemove || canAdd && removePath.oldPos + 1 < addPath.oldPos) {
+ basePath = self.addToPath(addPath, true, undefined, 0);
+ } else {
+ basePath = self.addToPath(removePath, undefined, true, 1);
+ }
+
+ newPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
+
+ if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
+ // If we have hit the end of both strings, then we are done
+ return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken));
+ } else {
+ bestPath[diagonalPath] = basePath;
+
+ if (basePath.oldPos + 1 >= oldLen) {
+ maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);
+ }
+
+ if (newPos + 1 >= newLen) {
+ minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);
+ }
+ }
+ }
+
+ editLength++;
+ } // Performs the length of edit iteration. Is a bit fugly as this has to support the
+ // sync and async mode which is never fun. Loops over execEditLength until a value
+ // is produced, or until the edit length exceeds options.maxEditLength (if given),
+ // in which case it will return undefined.
+
+
+ if (callback) {
+ (function exec() {
+ setTimeout(function () {
+ if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
+ return callback();
+ }
+
+ if (!execEditLength()) {
+ exec();
+ }
+ }, 0);
+ })();
+ } else {
+ while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {
+ var ret = execEditLength();
+
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ },
+ addToPath: function addToPath(path, added, removed, oldPosInc) {
+ var last = path.lastComponent;
+
+ if (last && last.added === added && last.removed === removed) {
+ return {
+ oldPos: path.oldPos + oldPosInc,
+ lastComponent: {
+ count: last.count + 1,
+ added: added,
+ removed: removed,
+ previousComponent: last.previousComponent
+ }
+ };
+ } else {
+ return {
+ oldPos: path.oldPos + oldPosInc,
+ lastComponent: {
+ count: 1,
+ added: added,
+ removed: removed,
+ previousComponent: last
+ }
+ };
+ }
+ },
+ extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
+ var newLen = newString.length,
+ oldLen = oldString.length,
+ oldPos = basePath.oldPos,
+ newPos = oldPos - diagonalPath,
+ commonCount = 0;
+
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
+ newPos++;
+ oldPos++;
+ commonCount++;
+ }
+
+ if (commonCount) {
+ basePath.lastComponent = {
+ count: commonCount,
+ previousComponent: basePath.lastComponent
+ };
+ }
+
+ basePath.oldPos = oldPos;
+ return newPos;
+ },
+ equals: function equals(left, right) {
+ if (this.options.comparator) {
+ return this.options.comparator(left, right);
+ } else {
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+ }
+ },
+ removeEmpty: function removeEmpty(array) {
+ var ret = [];
+
+ for (var i = 0; i < array.length; i++) {
+ if (array[i]) {
+ ret.push(array[i]);
+ }
+ }
+
+ return ret;
+ },
+ castInput: function castInput(value) {
+ return value;
+ },
+ tokenize: function tokenize(value) {
+ return value.split('');
+ },
+ join: function join(chars) {
+ return chars.join('');
+ }
+ };
+
+ function buildValues(diff, lastComponent, newString, oldString, useLongestToken) {
+ // First we convert our linked list of components in reverse order to an
+ // array in the right order:
+ var components = [];
+ var nextComponent;
+
+ while (lastComponent) {
+ components.push(lastComponent);
+ nextComponent = lastComponent.previousComponent;
+ delete lastComponent.previousComponent;
+ lastComponent = nextComponent;
+ }
+
+ components.reverse();
+ var componentPos = 0,
+ componentLen = components.length,
+ newPos = 0,
+ oldPos = 0;
+
+ for (; componentPos < componentLen; componentPos++) {
+ var component = components[componentPos];
+
+ if (!component.removed) {
+ if (!component.added && useLongestToken) {
+ var value = newString.slice(newPos, newPos + component.count);
+ value = value.map(function (value, i) {
+ var oldValue = oldString[oldPos + i];
+ return oldValue.length > value.length ? oldValue : value;
+ });
+ component.value = diff.join(value);
+ } else {
+ component.value = diff.join(newString.slice(newPos, newPos + component.count));
+ }
+
+ newPos += component.count; // Common case
+
+ if (!component.added) {
+ oldPos += component.count;
+ }
+ } else {
+ component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
+ oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
+ // The diffing algorithm is tied to add then remove output and this is the simplest
+ // route to get the desired output with minimal overhead.
+
+ if (componentPos && components[componentPos - 1].added) {
+ var tmp = components[componentPos - 1];
+ components[componentPos - 1] = components[componentPos];
+ components[componentPos] = tmp;
+ }
+ }
+ } // Special case handle for when one terminal is ignored (i.e. whitespace).
+ // For this case we merge the terminal into the prior string and drop the change.
+ // This is only available for string mode.
+
+
+ var finalComponent = components[componentLen - 1];
+
+ if (componentLen > 1 && typeof finalComponent.value === 'string' && (finalComponent.added || finalComponent.removed) && diff.equals('', finalComponent.value)) {
+ components[componentLen - 2].value += finalComponent.value;
+ components.pop();
+ }
+
+ return components;
+ }
+
+ var characterDiff = new Diff();
+ function diffChars(oldStr, newStr, options) {
+ return characterDiff.diff(oldStr, newStr, options);
+ }
+
+ function generateOptions(options, defaults) {
+ if (typeof options === 'function') {
+ defaults.callback = options;
+ } else if (options) {
+ for (var name in options) {
+ /* istanbul ignore else */
+ if (options.hasOwnProperty(name)) {
+ defaults[name] = options[name];
+ }
+ }
+ }
+
+ return defaults;
+ }
+
+ //
+ // Ranges and exceptions:
+ // Latin-1 Supplement, 0080–00FF
+ // - U+00D7 × Multiplication sign
+ // - U+00F7 ÷ Division sign
+ // Latin Extended-A, 0100–017F
+ // Latin Extended-B, 0180–024F
+ // IPA Extensions, 0250–02AF
+ // Spacing Modifier Letters, 02B0–02FF
+ // - U+02C7 ˇ ˇ Caron
+ // - U+02D8 ˘ ˘ Breve
+ // - U+02D9 ˙ ˙ Dot Above
+ // - U+02DA ˚ ˚ Ring Above
+ // - U+02DB ˛ ˛ Ogonek
+ // - U+02DC ˜ ˜ Small Tilde
+ // - U+02DD ˝ ˝ Double Acute Accent
+ // Latin Extended Additional, 1E00–1EFF
+
+ var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
+ var reWhitespace = /\S/;
+ var wordDiff = new Diff();
+
+ wordDiff.equals = function (left, right) {
+ if (this.options.ignoreCase) {
+ left = left.toLowerCase();
+ right = right.toLowerCase();
+ }
+
+ return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
+ };
+
+ wordDiff.tokenize = function (value) {
+ // All whitespace symbols except newline group into one token, each newline - in separate token
+ var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
+
+ for (var i = 0; i < tokens.length - 1; i++) {
+ // If we have an empty string in the next field and we have only word chars before and after, merge
+ if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
+ tokens[i] += tokens[i + 2];
+ tokens.splice(i + 1, 2);
+ i--;
+ }
+ }
+
+ return tokens;
+ };
+
+ function diffWords(oldStr, newStr, options) {
+ options = generateOptions(options, {
+ ignoreWhitespace: true
+ });
+ return wordDiff.diff(oldStr, newStr, options);
+ }
+ function diffWordsWithSpace(oldStr, newStr, options) {
+ return wordDiff.diff(oldStr, newStr, options);
+ }
+
+ var lineDiff = new Diff();
+
+ lineDiff.tokenize = function (value) {
+ if (this.options.stripTrailingCr) {
+ // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior
+ value = value.replace(/\r\n/g, '\n');
+ }
+
+ var retLines = [],
+ linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
+
+ if (!linesAndNewlines[linesAndNewlines.length - 1]) {
+ linesAndNewlines.pop();
+ } // Merge the content and line separators into single tokens
+
+
+ for (var i = 0; i < linesAndNewlines.length; i++) {
+ var line = linesAndNewlines[i];
+
+ if (i % 2 && !this.options.newlineIsToken) {
+ retLines[retLines.length - 1] += line;
+ } else {
+ if (this.options.ignoreWhitespace) {
+ line = line.trim();
+ }
+
+ retLines.push(line);
+ }
+ }
+
+ return retLines;
+ };
+
+ function diffLines(oldStr, newStr, callback) {
+ return lineDiff.diff(oldStr, newStr, callback);
+ }
+ function diffTrimmedLines(oldStr, newStr, callback) {
+ var options = generateOptions(callback, {
+ ignoreWhitespace: true
+ });
+ return lineDiff.diff(oldStr, newStr, options);
+ }
+
+ var sentenceDiff = new Diff();
+
+ sentenceDiff.tokenize = function (value) {
+ return value.split(/(\S.+?[.!?])(?=\s+|$)/);
+ };
+
+ function diffSentences(oldStr, newStr, callback) {
+ return sentenceDiff.diff(oldStr, newStr, callback);
+ }
+
+ var cssDiff = new Diff();
+
+ cssDiff.tokenize = function (value) {
+ return value.split(/([{}:;,]|\s+)/);
+ };
+
+ function diffCss(oldStr, newStr, callback) {
+ return cssDiff.diff(oldStr, newStr, callback);
+ }
+
+ function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ _typeof = function (obj) {
+ return typeof obj;
+ };
+ } else {
+ _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ };
+ }
+
+ return _typeof(obj);
+ }
+
+ function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+ }
+
+ function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ keys.push.apply(keys, symbols);
+ }
+
+ return keys;
+ }
+
+ function _objectSpread2(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
+
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ _defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+ });
+ }
+ }
+
+ return target;
+ }
+
+ function _toConsumableArray(arr) {
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
+ }
+
+ function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
+ }
+
+ function _iterableToArray(iter) {
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
+ }
+
+ function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+ }
+
+ function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+
+ return arr2;
+ }
+
+ function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var objectPrototypeToString = Object.prototype.toString;
+ var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
+ // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
+
+ jsonDiff.useLongestToken = true;
+ jsonDiff.tokenize = lineDiff.tokenize;
+
+ jsonDiff.castInput = function (value) {
+ var _this$options = this.options,
+ undefinedReplacement = _this$options.undefinedReplacement,
+ _this$options$stringi = _this$options.stringifyReplacer,
+ stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
+ return typeof v === 'undefined' ? undefinedReplacement : v;
+ } : _this$options$stringi;
+ return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
+ };
+
+ jsonDiff.equals = function (left, right) {
+ return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
+ };
+
+ function diffJson(oldObj, newObj, options) {
+ return jsonDiff.diff(oldObj, newObj, options);
+ } // This function handles the presence of circular references by bailing out when encountering an
+ // object that is already on the "stack" of items being processed. Accepts an optional replacer
+
+ function canonicalize(obj, stack, replacementStack, replacer, key) {
+ stack = stack || [];
+ replacementStack = replacementStack || [];
+
+ if (replacer) {
+ obj = replacer(key, obj);
+ }
+
+ var i;
+
+ for (i = 0; i < stack.length; i += 1) {
+ if (stack[i] === obj) {
+ return replacementStack[i];
+ }
+ }
+
+ var canonicalizedObj;
+
+ if ('[object Array]' === objectPrototypeToString.call(obj)) {
+ stack.push(obj);
+ canonicalizedObj = new Array(obj.length);
+ replacementStack.push(canonicalizedObj);
+
+ for (i = 0; i < obj.length; i += 1) {
+ canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
+ }
+
+ stack.pop();
+ replacementStack.pop();
+ return canonicalizedObj;
+ }
+
+ if (obj && obj.toJSON) {
+ obj = obj.toJSON();
+ }
+
+ if (_typeof(obj) === 'object' && obj !== null) {
+ stack.push(obj);
+ canonicalizedObj = {};
+ replacementStack.push(canonicalizedObj);
+
+ var sortedKeys = [],
+ _key;
+
+ for (_key in obj) {
+ /* istanbul ignore else */
+ if (obj.hasOwnProperty(_key)) {
+ sortedKeys.push(_key);
+ }
+ }
+
+ sortedKeys.sort();
+
+ for (i = 0; i < sortedKeys.length; i += 1) {
+ _key = sortedKeys[i];
+ canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
+ }
+
+ stack.pop();
+ replacementStack.pop();
+ } else {
+ canonicalizedObj = obj;
+ }
+
+ return canonicalizedObj;
+ }
+
+ var arrayDiff = new Diff();
+
+ arrayDiff.tokenize = function (value) {
+ return value.slice();
+ };
+
+ arrayDiff.join = arrayDiff.removeEmpty = function (value) {
+ return value;
+ };
+
+ function diffArrays(oldArr, newArr, callback) {
+ return arrayDiff.diff(oldArr, newArr, callback);
+ }
+
+ function parsePatch(uniDiff) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
+ delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+ list = [],
+ i = 0;
+
+ function parseIndex() {
+ var index = {};
+ list.push(index); // Parse diff metadata
+
+ while (i < diffstr.length) {
+ var line = diffstr[i]; // File header found, end parsing diff metadata
+
+ if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
+ break;
+ } // Diff index
+
+
+ var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
+
+ if (header) {
+ index.index = header[1];
+ }
+
+ i++;
+ } // Parse file headers if they are defined. Unified diff requires them, but
+ // there's no technical issues to have an isolated hunk without file header
+
+
+ parseFileHeader(index);
+ parseFileHeader(index); // Parse hunks
+
+ index.hunks = [];
+
+ while (i < diffstr.length) {
+ var _line = diffstr[i];
+
+ if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
+ break;
+ } else if (/^@@/.test(_line)) {
+ index.hunks.push(parseHunk());
+ } else if (_line && options.strict) {
+ // Ignore unexpected content unless in strict mode
+ throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
+ } else {
+ i++;
+ }
+ }
+ } // Parses the --- and +++ headers, if none are found, no lines
+ // are consumed.
+
+
+ function parseFileHeader(index) {
+ var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
+
+ if (fileHeader) {
+ var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
+ var data = fileHeader[2].split('\t', 2);
+ var fileName = data[0].replace(/\\\\/g, '\\');
+
+ if (/^".*"$/.test(fileName)) {
+ fileName = fileName.substr(1, fileName.length - 2);
+ }
+
+ index[keyPrefix + 'FileName'] = fileName;
+ index[keyPrefix + 'Header'] = (data[1] || '').trim();
+ i++;
+ }
+ } // Parses a hunk
+ // This assumes that we are at the start of a hunk.
+
+
+ function parseHunk() {
+ var chunkHeaderIndex = i,
+ chunkHeaderLine = diffstr[i++],
+ chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
+ var hunk = {
+ oldStart: +chunkHeader[1],
+ oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
+ newStart: +chunkHeader[3],
+ newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
+ lines: [],
+ linedelimiters: []
+ }; // Unified Diff Format quirk: If the chunk size is 0,
+ // the first number is one lower than one would expect.
+ // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
+
+ if (hunk.oldLines === 0) {
+ hunk.oldStart += 1;
+ }
+
+ if (hunk.newLines === 0) {
+ hunk.newStart += 1;
+ }
+
+ var addCount = 0,
+ removeCount = 0;
+
+ for (; i < diffstr.length; i++) {
+ // Lines starting with '---' could be mistaken for the "remove line" operation
+ // But they could be the header for the next file. Therefore prune such cases out.
+ if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
+ break;
+ }
+
+ var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
+
+ if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
+ hunk.lines.push(diffstr[i]);
+ hunk.linedelimiters.push(delimiters[i] || '\n');
+
+ if (operation === '+') {
+ addCount++;
+ } else if (operation === '-') {
+ removeCount++;
+ } else if (operation === ' ') {
+ addCount++;
+ removeCount++;
+ }
+ } else {
+ break;
+ }
+ } // Handle the empty block count case
+
+
+ if (!addCount && hunk.newLines === 1) {
+ hunk.newLines = 0;
+ }
+
+ if (!removeCount && hunk.oldLines === 1) {
+ hunk.oldLines = 0;
+ } // Perform optional sanity checking
+
+
+ if (options.strict) {
+ if (addCount !== hunk.newLines) {
+ throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+ }
+
+ if (removeCount !== hunk.oldLines) {
+ throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+ }
+ }
+
+ return hunk;
+ }
+
+ while (i < diffstr.length) {
+ parseIndex();
+ }
+
+ return list;
+ }
+
+ // Iterator that traverses in the range of [min, max], stepping
+ // by distance from a given start position. I.e. for [0, 4], with
+ // start of 2, this will iterate 2, 3, 1, 4, 0.
+ function distanceIterator (start, minLine, maxLine) {
+ var wantForward = true,
+ backwardExhausted = false,
+ forwardExhausted = false,
+ localOffset = 1;
+ return function iterator() {
+ if (wantForward && !forwardExhausted) {
+ if (backwardExhausted) {
+ localOffset++;
+ } else {
+ wantForward = false;
+ } // Check if trying to fit beyond text length, and if not, check it fits
+ // after offset location (or desired location on first iteration)
+
+
+ if (start + localOffset <= maxLine) {
+ return localOffset;
+ }
+
+ forwardExhausted = true;
+ }
+
+ if (!backwardExhausted) {
+ if (!forwardExhausted) {
+ wantForward = true;
+ } // Check if trying to fit before text beginning, and if not, check it fits
+ // before offset location
+
+
+ if (minLine <= start - localOffset) {
+ return -localOffset++;
+ }
+
+ backwardExhausted = true;
+ return iterator();
+ } // We tried to fit hunk before text beginning and beyond text length, then
+ // hunk can't fit on the text. Return undefined
+
+ };
+ }
+
+ function applyPatch(source, uniDiff) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+ if (typeof uniDiff === 'string') {
+ uniDiff = parsePatch(uniDiff);
+ }
+
+ if (Array.isArray(uniDiff)) {
+ if (uniDiff.length > 1) {
+ throw new Error('applyPatch only works with a single input.');
+ }
+
+ uniDiff = uniDiff[0];
+ } // Apply the diff to the input
+
+
+ var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
+ delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+ hunks = uniDiff.hunks,
+ compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
+ return line === patchContent;
+ },
+ errorCount = 0,
+ fuzzFactor = options.fuzzFactor || 0,
+ minLine = 0,
+ offset = 0,
+ removeEOFNL,
+ addEOFNL;
+ /**
+ * Checks if the hunk exactly fits on the provided location
+ */
+
+
+ function hunkFits(hunk, toPos) {
+ for (var j = 0; j < hunk.lines.length; j++) {
+ var line = hunk.lines[j],
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line;
+
+ if (operation === ' ' || operation === '-') {
+ // Context sanity check
+ if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
+ errorCount++;
+
+ if (errorCount > fuzzFactor) {
+ return false;
+ }
+ }
+
+ toPos++;
+ }
+ }
+
+ return true;
+ } // Search best fit offsets for each hunk based on the previous ones
+
+
+ for (var i = 0; i < hunks.length; i++) {
+ var hunk = hunks[i],
+ maxLine = lines.length - hunk.oldLines,
+ localOffset = 0,
+ toPos = offset + hunk.oldStart - 1;
+ var iterator = distanceIterator(toPos, minLine, maxLine);
+
+ for (; localOffset !== undefined; localOffset = iterator()) {
+ if (hunkFits(hunk, toPos + localOffset)) {
+ hunk.offset = offset += localOffset;
+ break;
+ }
+ }
+
+ if (localOffset === undefined) {
+ return false;
+ } // Set lower text limit to end of the current hunk, so next ones don't try
+ // to fit over already patched text
+
+
+ minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
+ } // Apply patch hunks
+
+
+ var diffOffset = 0;
+
+ for (var _i = 0; _i < hunks.length; _i++) {
+ var _hunk = hunks[_i],
+ _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
+
+ diffOffset += _hunk.newLines - _hunk.oldLines;
+
+ for (var j = 0; j < _hunk.lines.length; j++) {
+ var line = _hunk.lines[j],
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line,
+ delimiter = _hunk.linedelimiters && _hunk.linedelimiters[j] || '\n';
+
+ if (operation === ' ') {
+ _toPos++;
+ } else if (operation === '-') {
+ lines.splice(_toPos, 1);
+ delimiters.splice(_toPos, 1);
+ /* istanbul ignore else */
+ } else if (operation === '+') {
+ lines.splice(_toPos, 0, content);
+ delimiters.splice(_toPos, 0, delimiter);
+ _toPos++;
+ } else if (operation === '\\') {
+ var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
+
+ if (previousOperation === '+') {
+ removeEOFNL = true;
+ } else if (previousOperation === '-') {
+ addEOFNL = true;
+ }
+ }
+ }
+ } // Handle EOFNL insertion/removal
+
+
+ if (removeEOFNL) {
+ while (!lines[lines.length - 1]) {
+ lines.pop();
+ delimiters.pop();
+ }
+ } else if (addEOFNL) {
+ lines.push('');
+ delimiters.push('\n');
+ }
+
+ for (var _k = 0; _k < lines.length - 1; _k++) {
+ lines[_k] = lines[_k] + delimiters[_k];
+ }
+
+ return lines.join('');
+ } // Wrapper that supports multiple file patches via callbacks.
+
+ function applyPatches(uniDiff, options) {
+ if (typeof uniDiff === 'string') {
+ uniDiff = parsePatch(uniDiff);
+ }
+
+ var currentIndex = 0;
+
+ function processIndex() {
+ var index = uniDiff[currentIndex++];
+
+ if (!index) {
+ return options.complete();
+ }
+
+ options.loadFile(index, function (err, data) {
+ if (err) {
+ return options.complete(err);
+ }
+
+ var updatedContent = applyPatch(data, index, options);
+ options.patched(index, updatedContent, function (err) {
+ if (err) {
+ return options.complete(err);
+ }
+
+ processIndex();
+ });
+ });
+ }
+
+ processIndex();
+ }
+
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ if (!options) {
+ options = {};
+ }
+
+ if (typeof options.context === 'undefined') {
+ options.context = 4;
+ }
+
+ var diff = diffLines(oldStr, newStr, options);
+
+ if (!diff) {
+ return;
+ }
+
+ diff.push({
+ value: '',
+ lines: []
+ }); // Append an empty value to make cleanup easier
+
+ function contextLines(lines) {
+ return lines.map(function (entry) {
+ return ' ' + entry;
+ });
+ }
+
+ var hunks = [];
+ var oldRangeStart = 0,
+ newRangeStart = 0,
+ curRange = [],
+ oldLine = 1,
+ newLine = 1;
+
+ var _loop = function _loop(i) {
+ var current = diff[i],
+ lines = current.lines || current.value.replace(/\n$/, '').split('\n');
+ current.lines = lines;
+
+ if (current.added || current.removed) {
+ var _curRange;
+
+ // If we have previous context, start with that
+ if (!oldRangeStart) {
+ var prev = diff[i - 1];
+ oldRangeStart = oldLine;
+ newRangeStart = newLine;
+
+ if (prev) {
+ curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
+ oldRangeStart -= curRange.length;
+ newRangeStart -= curRange.length;
+ }
+ } // Output our changes
+
+
+ (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
+ return (current.added ? '+' : '-') + entry;
+ }))); // Track the updated file position
+
+
+ if (current.added) {
+ newLine += lines.length;
+ } else {
+ oldLine += lines.length;
+ }
+ } else {
+ // Identical context lines. Track line changes
+ if (oldRangeStart) {
+ // Close out any changes that have been output (or join overlapping)
+ if (lines.length <= options.context * 2 && i < diff.length - 2) {
+ var _curRange2;
+
+ // Overlapping
+ (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
+ } else {
+ var _curRange3;
+
+ // end the range and output
+ var contextSize = Math.min(lines.length, options.context);
+
+ (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
+
+ var hunk = {
+ oldStart: oldRangeStart,
+ oldLines: oldLine - oldRangeStart + contextSize,
+ newStart: newRangeStart,
+ newLines: newLine - newRangeStart + contextSize,
+ lines: curRange
+ };
+
+ if (i >= diff.length - 2 && lines.length <= options.context) {
+ // EOF is inside this hunk
+ var oldEOFNewline = /\n$/.test(oldStr);
+ var newEOFNewline = /\n$/.test(newStr);
+ var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
+
+ if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
+ // special case: old has no eol and no trailing context; no-nl can end up before adds
+ // however, if the old file is empty, do not output the no-nl line
+ curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
+ }
+
+ if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
+ curRange.push('\\ No newline at end of file');
+ }
+ }
+
+ hunks.push(hunk);
+ oldRangeStart = 0;
+ newRangeStart = 0;
+ curRange = [];
+ }
+ }
+
+ oldLine += lines.length;
+ newLine += lines.length;
+ }
+ };
+
+ for (var i = 0; i < diff.length; i++) {
+ _loop(i);
+ }
+
+ return {
+ oldFileName: oldFileName,
+ newFileName: newFileName,
+ oldHeader: oldHeader,
+ newHeader: newHeader,
+ hunks: hunks
+ };
+ }
+ function formatPatch(diff) {
+ if (Array.isArray(diff)) {
+ return diff.map(formatPatch).join('\n');
+ }
+
+ var ret = [];
+
+ if (diff.oldFileName == diff.newFileName) {
+ ret.push('Index: ' + diff.oldFileName);
+ }
+
+ ret.push('===================================================================');
+ ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
+ ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
+
+ for (var i = 0; i < diff.hunks.length; i++) {
+ var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
+ // the first number is one lower than one would expect.
+ // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
+
+ if (hunk.oldLines === 0) {
+ hunk.oldStart -= 1;
+ }
+
+ if (hunk.newLines === 0) {
+ hunk.newStart -= 1;
+ }
+
+ ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
+ ret.push.apply(ret, hunk.lines);
+ }
+
+ return ret.join('\n') + '\n';
+ }
+ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
+ }
+ function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
+ return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
+ }
+
+ function arrayEqual(a, b) {
+ if (a.length !== b.length) {
+ return false;
+ }
+
+ return arrayStartsWith(a, b);
+ }
+ function arrayStartsWith(array, start) {
+ if (start.length > array.length) {
+ return false;
+ }
+
+ for (var i = 0; i < start.length; i++) {
+ if (start[i] !== array[i]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function calcLineCount(hunk) {
+ var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
+ oldLines = _calcOldNewLineCount.oldLines,
+ newLines = _calcOldNewLineCount.newLines;
+
+ if (oldLines !== undefined) {
+ hunk.oldLines = oldLines;
+ } else {
+ delete hunk.oldLines;
+ }
+
+ if (newLines !== undefined) {
+ hunk.newLines = newLines;
+ } else {
+ delete hunk.newLines;
+ }
+ }
+ function merge(mine, theirs, base) {
+ mine = loadPatch(mine, base);
+ theirs = loadPatch(theirs, base);
+ var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
+ // Leaving sanity checks on this to the API consumer that may know more about the
+ // meaning in their own context.
+
+ if (mine.index || theirs.index) {
+ ret.index = mine.index || theirs.index;
+ }
+
+ if (mine.newFileName || theirs.newFileName) {
+ if (!fileNameChanged(mine)) {
+ // No header or no change in ours, use theirs (and ours if theirs does not exist)
+ ret.oldFileName = theirs.oldFileName || mine.oldFileName;
+ ret.newFileName = theirs.newFileName || mine.newFileName;
+ ret.oldHeader = theirs.oldHeader || mine.oldHeader;
+ ret.newHeader = theirs.newHeader || mine.newHeader;
+ } else if (!fileNameChanged(theirs)) {
+ // No header or no change in theirs, use ours
+ ret.oldFileName = mine.oldFileName;
+ ret.newFileName = mine.newFileName;
+ ret.oldHeader = mine.oldHeader;
+ ret.newHeader = mine.newHeader;
+ } else {
+ // Both changed... figure it out
+ ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
+ ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
+ ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
+ ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
+ }
+ }
+
+ ret.hunks = [];
+ var mineIndex = 0,
+ theirsIndex = 0,
+ mineOffset = 0,
+ theirsOffset = 0;
+
+ while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
+ var mineCurrent = mine.hunks[mineIndex] || {
+ oldStart: Infinity
+ },
+ theirsCurrent = theirs.hunks[theirsIndex] || {
+ oldStart: Infinity
+ };
+
+ if (hunkBefore(mineCurrent, theirsCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
+ mineIndex++;
+ theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
+ } else if (hunkBefore(theirsCurrent, mineCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
+ theirsIndex++;
+ mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
+ } else {
+ // Overlap, merge as best we can
+ var mergedHunk = {
+ oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
+ oldLines: 0,
+ newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
+ newLines: 0,
+ lines: []
+ };
+ mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
+ theirsIndex++;
+ mineIndex++;
+ ret.hunks.push(mergedHunk);
+ }
+ }
+
+ return ret;
+ }
+
+ function loadPatch(param, base) {
+ if (typeof param === 'string') {
+ if (/^@@/m.test(param) || /^Index:/m.test(param)) {
+ return parsePatch(param)[0];
+ }
+
+ if (!base) {
+ throw new Error('Must provide a base reference or pass in a patch');
+ }
+
+ return structuredPatch(undefined, undefined, base, param);
+ }
+
+ return param;
+ }
+
+ function fileNameChanged(patch) {
+ return patch.newFileName && patch.newFileName !== patch.oldFileName;
+ }
+
+ function selectField(index, mine, theirs) {
+ if (mine === theirs) {
+ return mine;
+ } else {
+ index.conflict = true;
+ return {
+ mine: mine,
+ theirs: theirs
+ };
+ }
+ }
+
+ function hunkBefore(test, check) {
+ return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
+ }
+
+ function cloneHunk(hunk, offset) {
+ return {
+ oldStart: hunk.oldStart,
+ oldLines: hunk.oldLines,
+ newStart: hunk.newStart + offset,
+ newLines: hunk.newLines,
+ lines: hunk.lines
+ };
+ }
+
+ function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
+ // This will generally result in a conflicted hunk, but there are cases where the context
+ // is the only overlap where we can successfully merge the content here.
+ var mine = {
+ offset: mineOffset,
+ lines: mineLines,
+ index: 0
+ },
+ their = {
+ offset: theirOffset,
+ lines: theirLines,
+ index: 0
+ }; // Handle any leading content
+
+ insertLeading(hunk, mine, their);
+ insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
+
+ while (mine.index < mine.lines.length && their.index < their.lines.length) {
+ var mineCurrent = mine.lines[mine.index],
+ theirCurrent = their.lines[their.index];
+
+ if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
+ // Both modified ...
+ mutualChange(hunk, mine, their);
+ } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
+ var _hunk$lines;
+
+ // Mine inserted
+ (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
+ } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
+ var _hunk$lines2;
+
+ // Theirs inserted
+ (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
+ } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
+ // Mine removed or edited
+ removal(hunk, mine, their);
+ } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
+ // Their removed or edited
+ removal(hunk, their, mine, true);
+ } else if (mineCurrent === theirCurrent) {
+ // Context identity
+ hunk.lines.push(mineCurrent);
+ mine.index++;
+ their.index++;
+ } else {
+ // Context mismatch
+ conflict(hunk, collectChange(mine), collectChange(their));
+ }
+ } // Now push anything that may be remaining
+
+
+ insertTrailing(hunk, mine);
+ insertTrailing(hunk, their);
+ calcLineCount(hunk);
+ }
+
+ function mutualChange(hunk, mine, their) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectChange(their);
+
+ if (allRemoves(myChanges) && allRemoves(theirChanges)) {
+ // Special case for remove changes that are supersets of one another
+ if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
+ var _hunk$lines3;
+
+ (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
+
+ return;
+ } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
+ var _hunk$lines4;
+
+ (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
+
+ return;
+ }
+ } else if (arrayEqual(myChanges, theirChanges)) {
+ var _hunk$lines5;
+
+ (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
+
+ return;
+ }
+
+ conflict(hunk, myChanges, theirChanges);
+ }
+
+ function removal(hunk, mine, their, swap) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectContext(their, myChanges);
+
+ if (theirChanges.merged) {
+ var _hunk$lines6;
+
+ (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
+ } else {
+ conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
+ }
+ }
+
+ function conflict(hunk, mine, their) {
+ hunk.conflict = true;
+ hunk.lines.push({
+ conflict: true,
+ mine: mine,
+ theirs: their
+ });
+ }
+
+ function insertLeading(hunk, insert, their) {
+ while (insert.offset < their.offset && insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ insert.offset++;
+ }
+ }
+
+ function insertTrailing(hunk, insert) {
+ while (insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ }
+ }
+
+ function collectChange(state) {
+ var ret = [],
+ operation = state.lines[state.index][0];
+
+ while (state.index < state.lines.length) {
+ var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
+
+ if (operation === '-' && line[0] === '+') {
+ operation = '+';
+ }
+
+ if (operation === line[0]) {
+ ret.push(line);
+ state.index++;
+ } else {
+ break;
+ }
+ }
+
+ return ret;
+ }
+
+ function collectContext(state, matchChanges) {
+ var changes = [],
+ merged = [],
+ matchIndex = 0,
+ contextChanges = false,
+ conflicted = false;
+
+ while (matchIndex < matchChanges.length && state.index < state.lines.length) {
+ var change = state.lines[state.index],
+ match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
+
+ if (match[0] === '+') {
+ break;
+ }
+
+ contextChanges = contextChanges || change[0] !== ' ';
+ merged.push(match);
+ matchIndex++; // Consume any additions in the other block as a conflict to attempt
+ // to pull in the remaining context after this
+
+ if (change[0] === '+') {
+ conflicted = true;
+
+ while (change[0] === '+') {
+ changes.push(change);
+ change = state.lines[++state.index];
+ }
+ }
+
+ if (match.substr(1) === change.substr(1)) {
+ changes.push(change);
+ state.index++;
+ } else {
+ conflicted = true;
+ }
+ }
+
+ if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
+ conflicted = true;
+ }
+
+ if (conflicted) {
+ return changes;
+ }
+
+ while (matchIndex < matchChanges.length) {
+ merged.push(matchChanges[matchIndex++]);
+ }
+
+ return {
+ merged: merged,
+ changes: changes
+ };
+ }
+
+ function allRemoves(changes) {
+ return changes.reduce(function (prev, change) {
+ return prev && change[0] === '-';
+ }, true);
+ }
+
+ function skipRemoveSuperset(state, removeChanges, delta) {
+ for (var i = 0; i < delta; i++) {
+ var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
+
+ if (state.lines[state.index + i] !== ' ' + changeContent) {
+ return false;
+ }
+ }
+
+ state.index += delta;
+ return true;
+ }
+
+ function calcOldNewLineCount(lines) {
+ var oldLines = 0;
+ var newLines = 0;
+ lines.forEach(function (line) {
+ if (typeof line !== 'string') {
+ var myCount = calcOldNewLineCount(line.mine);
+ var theirCount = calcOldNewLineCount(line.theirs);
+
+ if (oldLines !== undefined) {
+ if (myCount.oldLines === theirCount.oldLines) {
+ oldLines += myCount.oldLines;
+ } else {
+ oldLines = undefined;
+ }
+ }
+
+ if (newLines !== undefined) {
+ if (myCount.newLines === theirCount.newLines) {
+ newLines += myCount.newLines;
+ } else {
+ newLines = undefined;
+ }
+ }
+ } else {
+ if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
+ newLines++;
+ }
+
+ if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
+ oldLines++;
+ }
+ }
+ });
+ return {
+ oldLines: oldLines,
+ newLines: newLines
+ };
+ }
+
+ function reversePatch(structuredPatch) {
+ if (Array.isArray(structuredPatch)) {
+ return structuredPatch.map(reversePatch).reverse();
+ }
+
+ return _objectSpread2(_objectSpread2({}, structuredPatch), {}, {
+ oldFileName: structuredPatch.newFileName,
+ oldHeader: structuredPatch.newHeader,
+ newFileName: structuredPatch.oldFileName,
+ newHeader: structuredPatch.oldHeader,
+ hunks: structuredPatch.hunks.map(function (hunk) {
+ return {
+ oldLines: hunk.newLines,
+ oldStart: hunk.newStart,
+ newLines: hunk.oldLines,
+ newStart: hunk.oldStart,
+ linedelimiters: hunk.linedelimiters,
+ lines: hunk.lines.map(function (l) {
+ if (l.startsWith('-')) {
+ return "+".concat(l.slice(1));
+ }
+
+ if (l.startsWith('+')) {
+ return "-".concat(l.slice(1));
+ }
+
+ return l;
+ })
+ };
+ })
+ });
+ }
+
+ // See: http://code.google.com/p/google-diff-match-patch/wiki/API
+ function convertChangesToDMP(changes) {
+ var ret = [],
+ change,
+ operation;
+
+ for (var i = 0; i < changes.length; i++) {
+ change = changes[i];
+
+ if (change.added) {
+ operation = 1;
+ } else if (change.removed) {
+ operation = -1;
+ } else {
+ operation = 0;
+ }
+
+ ret.push([operation, change.value]);
+ }
+
+ return ret;
+ }
+
+ function convertChangesToXML(changes) {
+ var ret = [];
+
+ for (var i = 0; i < changes.length; i++) {
+ var change = changes[i];
+
+ if (change.added) {
+ ret.push('');
+ } else if (change.removed) {
+ ret.push('');
+ }
+
+ ret.push(escapeHTML(change.value));
+
+ if (change.added) {
+ ret.push(' ');
+ } else if (change.removed) {
+ ret.push('');
+ }
+ }
+
+ return ret.join('');
+ }
+
+ function escapeHTML(s) {
+ var n = s;
+ n = n.replace(/&/g, '&');
+ n = n.replace(//g, '>');
+ n = n.replace(/"/g, '"');
+ return n;
+ }
+
+ exports.Diff = Diff;
+ exports.applyPatch = applyPatch;
+ exports.applyPatches = applyPatches;
+ exports.canonicalize = canonicalize;
+ exports.convertChangesToDMP = convertChangesToDMP;
+ exports.convertChangesToXML = convertChangesToXML;
+ exports.createPatch = createPatch;
+ exports.createTwoFilesPatch = createTwoFilesPatch;
+ exports.diffArrays = diffArrays;
+ exports.diffChars = diffChars;
+ exports.diffCss = diffCss;
+ exports.diffJson = diffJson;
+ exports.diffLines = diffLines;
+ exports.diffSentences = diffSentences;
+ exports.diffTrimmedLines = diffTrimmedLines;
+ exports.diffWords = diffWords;
+ exports.diffWordsWithSpace = diffWordsWithSpace;
+ exports.formatPatch = formatPatch;
+ exports.merge = merge;
+ exports.parsePatch = parsePatch;
+ exports.reversePatch = reversePatch;
+ exports.structuredPatch = structuredPatch;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/node_modules/diff/dist/diff.min.js b/node_modules/diff/dist/diff.min.js
new file mode 100644
index 0000000..078bcc5
--- /dev/null
+++ b/node_modules/diff/dist/diff.min.js
@@ -0,0 +1 @@
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).Diff={})}(this,function(e){"use strict";function t(){}t.prototype={diff:function(s,a,e){var n,t=2=c&&f<=v+1)return d([{value:this.join(a),count:a.length}]);var m=-1/0,g=1/0;function w(){for(var e=Math.max(m,-p);e<=Math.min(g,p);e+=2){var n=void 0,t=h[e-1],r=h[e+1];t&&(h[e-1]=void 0);var i,o=!1;r&&(i=r.oldPos-e,o=r&&0<=i&&i=c&&f<=v+1)return d(function(e,n,t,r,i){var o,l=[];for(;n;)l.push(n),o=n.previousComponent,delete n.previousComponent,n=o;l.reverse();for(var s=0,a=l.length,u=0,d=0;se.length?t:e}),p.value=e.join(c)):p.value=e.join(t.slice(u,u+p.count)),u+=p.count,p.added||(d+=p.count))}var h=l[a-1];1 =c&&(g=Math.min(g,e-1)),f<=v+1&&(m=Math.max(m,e+1))}else h[e]=void 0}p++}if(r)!function e(){setTimeout(function(){return il?r():void(w()||e())},0)}();else for(;p<=i&&Date.now()<=l;){var y=w();if(y)return y}},addToPath:function(e,n,t,r){var i=e.lastComponent;return i&&i.added===n&&i.removed===t?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:n,removed:t,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:n,removed:t,previousComponent:i}}},extractCommon:function(e,n,t,r){for(var i=n.length,o=t.length,l=e.oldPos,s=l-r,a=0;s+1e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=c.length-2&&a.length<=f.context&&(i=/\n$/.test(u),o=/\n$/.test(d),l=0==a.length&&m.length>r.oldLines,!i&&l&&0e.length)return!1;for(var t=0;t"):i.removed&&t.push(""),t.push((n=i.value,n.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),i.added?t.push(""):i.removed&&t.push("")}return t.join("")},e.createPatch=function(e,n,t,r,i,o){return b(e,e,n,t,r,i,o)},e.createTwoFilesPatch=b,e.diffArrays=function(e,n,t){return g.diff(e,n,t)},e.diffChars=function(e,n,t){return r.diff(e,n,t)},e.diffCss=function(e,n,t){return d.diff(e,n,t)},e.diffJson=function(e,n,t){return v.diff(e,n,t)},e.diffLines=L,e.diffSentences=function(e,n,t){return u.diff(e,n,t)},e.diffTrimmedLines=function(e,n,t){var r=i(t,{ignoreWhitespace:!0});return a.diff(e,n,r)},e.diffWords=function(e,n,t){return t=i(t,{ignoreWhitespace:!0}),s.diff(e,n,t)},e.diffWordsWithSpace=function(e,n,t){return s.diff(e,n,t)},e.formatPatch=S,e.merge=function(e,n,t){e=N(e,t),n=N(n,t);var r={};(e.index||n.index)&&(r.index=e.index||n.index),(e.newFileName||n.newFileName)&&(P(e)?P(n)?(r.oldFileName=j(r,e.oldFileName,n.oldFileName),r.newFileName=j(r,e.newFileName,n.newFileName),r.oldHeader=j(r,e.oldHeader,n.oldHeader),r.newHeader=j(r,e.newHeader,n.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=n.oldFileName||e.oldFileName,r.newFileName=n.newFileName||e.newFileName,r.oldHeader=n.oldHeader||e.oldHeader,r.newHeader=n.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,l=0,s=0;i');
+ } else if (change.removed) {
+ ret.push('