diff --git a/packages/checkout/widgets-lib/src/widgets/sale/SaleWidget.tsx b/packages/checkout/widgets-lib/src/widgets/sale/SaleWidget.tsx index 89f97d876b..01295330c9 100644 --- a/packages/checkout/widgets-lib/src/widgets/sale/SaleWidget.tsx +++ b/packages/checkout/widgets-lib/src/widgets/sale/SaleWidget.tsx @@ -40,7 +40,9 @@ import { sendSaleWidgetCloseEvent } from './SaleWidgetEvents'; import { EventTargetContext } from '../../context/event-target-context/EventTargetContext'; type OptionalWidgetParams = Pick; -type RequiredWidgetParams = Required>; +type RequiredWidgetParams = Required< +Omit +>; type WidgetParams = RequiredWidgetParams & OptionalWidgetParams; export interface SaleWidgetProps extends WidgetParams { @@ -94,9 +96,7 @@ export default function SaleWidget(props: SaleWidgetProps) { viewDispatch({ payload: { type: ViewActions.UPDATE_VIEW, - view: { - type: SaleWidgetViews.PAYMENT_METHODS, - }, + view: { type: SaleWidgetViews.PAYMENT_METHODS }, }, }); } @@ -164,6 +164,14 @@ export default function SaleWidget(props: SaleWidgetProps) { showSwapOption={config.isSwapEnabled} showBridgeOption={config.isBridgeEnabled} onCloseButtonClick={() => sendSaleWidgetCloseEvent(eventTarget)} + onBackButtonClick={() => { + viewDispatch({ + payload: { + type: ViewActions.UPDATE_VIEW, + view: { type: SaleWidgetViews.PAYMENT_METHODS }, + }, + }); + }} amount={viewState.view.data?.amount} tokenAddress={viewState.view.data?.tokenAddress} heading={viewState.view.data?.heading} diff --git a/packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx b/packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx index b3bb227eb0..af03edee6e 100644 --- a/packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx +++ b/packages/checkout/widgets-lib/src/widgets/sale/context/SaleContextProvider.tsx @@ -23,6 +23,7 @@ import { SaleWidgetViews, } from '../../../context/view-context/SaleViewContextTypes'; import { + SharedViews, ViewActions, ViewContext, } from '../../../context/view-context/ViewContext'; @@ -39,6 +40,7 @@ import { SmartCheckoutError, SmartCheckoutErrorTypes, } from '../types'; +import { getTopUpViewData } from '../functions/smartCheckoutUtils'; import { useSmartCheckout } from '../hooks/useSmartCheckout'; import { useClientConfig, defaultClientConfig } from '../hooks/useClientConfig'; @@ -188,10 +190,7 @@ export function SaleContextProvider(props: { const fromTokenAddress = currency?.erc20Address || ''; const goBackToPaymentMethods = useCallback( - ( - type?: SalePaymentTypes | undefined, - data?: Record, - ) => { + (type?: SalePaymentTypes | undefined, data?: Record) => { setPaymentMethod(type); viewDispatch({ payload: { @@ -321,7 +320,20 @@ export function SaleContextProvider(props: { === SmartCheckoutErrorTypes.FRACTIONAL_BALANCE_BLOCKED ) { disablePaymentTypes([SalePaymentTypes.CRYPTO]); - goBackToPaymentMethods(undefined); + setPaymentMethod(undefined); + viewDispatch({ + payload: { + type: ViewActions.UPDATE_VIEW, + view: { + type: SharedViews.TOP_UP_VIEW, + data: getTopUpViewData( + smartCheckoutError, + fromTokenAddress, + ), + }, + }, + }); + return; } goToErrorView(smartCheckoutError.type, smartCheckoutError.data); @@ -379,7 +391,7 @@ export function SaleContextProvider(props: { break; } } - }, [smartCheckoutResult]); + }, [smartCheckoutResult, smartCheckoutError, sign, amount, fromTokenAddress]); useEffect(() => { const invalidItems = !items || items.length === 0; diff --git a/packages/checkout/widgets-lib/src/widgets/sale/functions/smartCheckoutUtils.ts b/packages/checkout/widgets-lib/src/widgets/sale/functions/smartCheckoutUtils.ts index abe9401ae4..bc741142f6 100644 --- a/packages/checkout/widgets-lib/src/widgets/sale/functions/smartCheckoutUtils.ts +++ b/packages/checkout/widgets-lib/src/widgets/sale/functions/smartCheckoutUtils.ts @@ -14,6 +14,7 @@ import { } from '@imtbl/checkout-sdk'; import { BigNumber } from 'ethers'; import { calculateCryptoToFiat, formatFiatString } from '../../../lib/utils'; +import { SmartCheckoutError } from '../types'; export const MAX_GAS_LIMIT = '30000000'; @@ -155,3 +156,45 @@ export const filterSmartCheckoutResult = ( }, }; }; + +export const getTopUpViewData = (smartCheckoutError: SmartCheckoutError, tokenAddress: string) => { + const transactionRequirements = smartCheckoutError?.data?.transactionRequirements || []; + + const native = transactionRequirements.find( + ({ type }) => type === ItemType.NATIVE, + ); + const erc20 = transactionRequirements.find( + ({ type }) => type === ItemType.ERC20, + ); + + // FIXME: Get token symbols from requirements (ie. erc20.symbol) + const balances = { + erc20: { + value: erc20?.delta.formattedBalance, + symbol: 'USDC', + }, + native: { + value: native?.delta.formattedBalance, + symbol: 'IMX', + }, + }; + + const heading = ['views.PAYMENT_METHODS.topUp.heading']; + let subheading = ['views.PAYMENT_METHODS.topUp.subheading.both', balances]; + + if (native?.sufficient && !erc20?.sufficient) { + subheading = ['views.PAYMENT_METHODS.topUp.subheading.erc20', balances]; + } + if (!native?.sufficient && erc20?.sufficient) { + subheading = ['views.PAYMENT_METHODS.topUp.subheading.native', balances]; + } + + const amount = erc20?.delta.balance.toNumber() || 0; + + return { + amount, + heading, + subheading, + tokenAddress, + }; +}; diff --git a/packages/checkout/widgets-lib/src/widgets/sale/hooks/useInsufficientBalance.ts b/packages/checkout/widgets-lib/src/widgets/sale/hooks/useInsufficientBalance.ts deleted file mode 100644 index 941418d2b1..0000000000 --- a/packages/checkout/widgets-lib/src/widgets/sale/hooks/useInsufficientBalance.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - SharedViews, - ViewActions, - ViewContext, -} from 'context/view-context/ViewContext'; -import { useContext, useEffect } from 'react'; -import { ItemType } from '@imtbl/checkout-sdk'; -import { useSaleContext } from '../context/SaleContextProvider'; -import { SmartCheckoutErrorTypes } from '../types'; - -export const useInsufficientBalance = () => { - const { viewDispatch } = useContext(ViewContext); - const { - smartCheckoutError, - fromTokenAddress: tokenAddress, - amount, - } = useSaleContext(); - - useEffect(() => { - if ( - smartCheckoutError?.data?.error?.message - !== SmartCheckoutErrorTypes.FRACTIONAL_BALANCE_BLOCKED - ) return; - - const transactionRequirements = smartCheckoutError?.data?.transactionRequirements || []; - - const native = transactionRequirements.find( - ({ type }) => type === ItemType.NATIVE, - ); - const erc20 = transactionRequirements.find( - ({ type }) => type === ItemType.ERC20, - ); - - // FIXME: Get token symbols from requirements (ie. erc20.symbol) - const balances = { - erc20: { - value: erc20?.delta.formattedBalance, - symbol: 'USDC', - }, - native: { - value: native?.delta.formattedBalance, - symbol: 'IMX', - }, - }; - - const heading = ['views.PAYMENT_METHODS.topUp.heading']; - let subheading = ['views.PAYMENT_METHODS.topUp.subheading.both', balances]; - - if (native?.sufficient && !erc20?.sufficient) { - subheading = ['views.PAYMENT_METHODS.topUp.subheading.erc20', balances]; - } - if (!native?.sufficient && erc20?.sufficient) { - subheading = ['views.PAYMENT_METHODS.topUp.subheading.native', balances]; - } - - viewDispatch({ - payload: { - type: ViewActions.UPDATE_VIEW, - view: { - type: SharedViews.TOP_UP_VIEW, - data: { - tokenAddress, - amount, - heading, - subheading, - }, - }, - }, - }); - }, [smartCheckoutError]); - - return null; -}; diff --git a/packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx b/packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx index 57addd3d7b..8300686aed 100644 --- a/packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx +++ b/packages/checkout/widgets-lib/src/widgets/sale/views/PaymentMethods.tsx @@ -20,10 +20,8 @@ import { PaymentOptions } from '../components/PaymentOptions'; import { useSaleContext } from '../context/SaleContextProvider'; import { useSaleEvent } from '../hooks/useSaleEvents'; import { SaleErrorTypes, SignPaymentTypes } from '../types'; -import { useInsufficientBalance } from '../hooks/useInsufficientBalance'; export function PaymentMethods() { - useInsufficientBalance(); const { t } = useTranslation(); const { viewDispatch } = useContext(ViewContext); const { diff --git a/packages/checkout/widgets-lib/src/widgets/sale/views/SaleErrorView.tsx b/packages/checkout/widgets-lib/src/widgets/sale/views/SaleErrorView.tsx index e502c9367a..22f449da65 100644 --- a/packages/checkout/widgets-lib/src/widgets/sale/views/SaleErrorView.tsx +++ b/packages/checkout/widgets-lib/src/widgets/sale/views/SaleErrorView.tsx @@ -3,7 +3,10 @@ import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; import { SalePaymentTypes } from '@imtbl/checkout-sdk'; import { StatusType } from '../../../components/Status/StatusType'; -import { StatusView, StatusViewProps } from '../../../components/Status/StatusView'; +import { + StatusView, + StatusViewProps, +} from '../../../components/Status/StatusView'; import { SaleErrorTypes } from '../types'; import { useSaleContext } from '../context/SaleContextProvider'; import { sendSaleWidgetCloseEvent } from '../SaleWidgetEvents'; @@ -17,18 +20,23 @@ interface ErrorHandlerConfig { } type SaleErrorViewProps = { - biomeTheme: BaseTokens - errorType: SaleErrorTypes | undefined, - transactionHash?: string, - blockExplorerLink?: string, + biomeTheme: BaseTokens; + errorType: SaleErrorTypes | undefined; + transactionHash?: string; + blockExplorerLink?: string; }; export function SaleErrorView({ - errorType = SaleErrorTypes.DEFAULT, transactionHash, blockExplorerLink, biomeTheme, + biomeTheme, + transactionHash, + blockExplorerLink, + errorType = SaleErrorTypes.DEFAULT, }: SaleErrorViewProps) { const { t } = useTranslation(); const { goBackToPaymentMethods } = useSaleContext(); - const { eventTargetState: { eventTarget } } = useContext(EventTargetContext); + const { + eventTargetState: { eventTarget }, + } = useContext(EventTargetContext); const closeWidget = () => { sendSaleWidgetCloseEvent(eventTarget); @@ -37,9 +45,11 @@ export function SaleErrorView({ const errorHandlersConfig: Record = { [SaleErrorTypes.TRANSACTION_FAILED]: { onActionClick: goBackToPaymentMethods, - onSecondaryActionClick: transactionHash ? () => { - window.open(blockExplorerLink); - } : closeWidget, + onSecondaryActionClick: transactionHash + ? () => { + window.open(blockExplorerLink); + } + : closeWidget, statusType: StatusType.FAILURE, statusIconStyles: { fill: biomeTheme.color.status.destructive.dim, @@ -126,8 +136,8 @@ export function SaleErrorView({ const getErrorViewProps = (): StatusViewProps => { const handlers = errorHandlersConfig[errorType] || {}; const secondaryActionText = errorType === SaleErrorTypes.TRANSACTION_FAILED && transactionHash - ? t(`views.SALE_FAIL.errors.${SaleErrorTypes.DEFAULT}.secondaryAction`) - : t(`views.SALE_FAIL.errors.${errorType}.secondaryAction`); + ? t(`views.SALE_FAIL.errors.${errorType}.secondaryAction`) + : t(`views.SALE_FAIL.errors.${SaleErrorTypes.DEFAULT}.secondaryAction`); return { testId: 'fail-view', @@ -145,7 +155,5 @@ export function SaleErrorView({ }, }; }; - return ( - - ); + return ; } diff --git a/packages/checkout/widgets-sample-app/package.json b/packages/checkout/widgets-sample-app/package.json index 4074163adf..8431b8e5c0 100644 --- a/packages/checkout/widgets-sample-app/package.json +++ b/packages/checkout/widgets-sample-app/package.json @@ -36,7 +36,7 @@ "@types/react-dom": "^18.0.11", "@vitejs/plugin-react": "^4.2.0", "typescript": "^4.9.5", - "vite": "^5.0.2", + "vite": "^5.0.12", "vite-plugin-node-polyfills": "^0.16.0", "web-vitals": "^2.1.4" }, diff --git a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/SeaportFulfillAvailableAdvancedOrders.tsx b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/SeaportFulfillAvailableAdvancedOrders.tsx new file mode 100644 index 0000000000..df04d3b14a --- /dev/null +++ b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/SeaportFulfillAvailableAdvancedOrders.tsx @@ -0,0 +1,170 @@ +import { PopulatedTransaction } from 'ethers'; +import React, { + useCallback, useEffect, useMemo, useState, +} from 'react'; +import { + Accordion, Form, Spinner, Stack, +} from 'react-bootstrap'; +import WorkflowButton from '@/components/WorkflowButton'; +import { RequestExampleProps } from '@/types'; +import { useImmutableProvider } from '@/context/ImmutableProvider'; +import { usePassportProvider } from '@/context/PassportProvider'; +import { ActionType, TransactionAction, TransactionPurpose } from '@imtbl/orderbook'; + +function SeaportFulfillAvailableAdvancedOrders({ disabled, handleExampleSubmitted }: RequestExampleProps) { + const { orderbookClient } = useImmutableProvider(); + const { zkEvmProvider } = usePassportProvider(); + + const [listingIds, setListingIds] = useState(''); + const [walletAddress, setWalletAddress] = useState(''); + const [isBuldingTransaction, setIsBuildingTransaction] = useState(false); + const [transaction, setTransaction] = useState(); + const [transactionError, setTransactionError] = useState(''); + + const seaportContractAddress = useMemo( + () => ( + orderbookClient.config().seaportContractAddress + ), + [orderbookClient], + ); + + useEffect(() => { + const getAddress = async () => { + if (zkEvmProvider) { + const [address] = await zkEvmProvider.request({ + method: 'eth_requestAccounts', + }); + setWalletAddress(address || ''); + } + }; + + getAddress().catch(console.log); + }, [zkEvmProvider, setWalletAddress]); + + useEffect(() => { + setTransactionError(''); + setTransaction(undefined); + }, [listingIds]); + + const validate = useCallback(async () => { + setTransactionError(''); + setTransaction(undefined); + setIsBuildingTransaction(true); + + try { + const fulfillResponse = await orderbookClient.fulfillBulkOrders( + listingIds.replace(' ', '').split(',').map((orderId) => ({ + listingId: orderId, + takerFees: [], + })), + walletAddress, + ); + + if (!fulfillResponse.sufficientBalance) { + setTransactionError('Insufficient balance to fulfill the order(s)'); + return; + } + + const { + actions, unfulfillableOrders, + } = fulfillResponse; + + if (unfulfillableOrders.length > 0) { + setTransactionError('Not all orders are fulfillable'); + return; + } + + const verifyAction = actions.find((action) => ( + action.type === ActionType.TRANSACTION && action.purpose === TransactionPurpose.APPROVAL + )) as TransactionAction | undefined; + + if (verifyAction) { + const approvalTransaction = await verifyAction.buildTransaction(); + await zkEvmProvider?.request({ + method: 'eth_sendTransaction', + params: [approvalTransaction], + }); + } + + const transactionAction = actions.find((action) => ( + action.type === ActionType.TRANSACTION && action.purpose === TransactionPurpose.FULFILL_ORDER + )) as TransactionAction | undefined; + + if (!transactionAction) { + setTransactionError('Failed to find transaction to process'); + return; + } + + setTransaction(await transactionAction.buildTransaction()); + } catch (err) { + setTransactionError(`Failed to retrieve Seaport orders: ${err}`); + } finally { + setIsBuildingTransaction(false); + } + }, [listingIds, orderbookClient, walletAddress, zkEvmProvider]); + + const handleSubmit = useCallback(async (e: React.FormEvent) => { + e.preventDefault(); + e.stopPropagation(); + + return handleExampleSubmitted({ + method: 'eth_sendTransaction', + params: [transaction], + }); + }, [handleExampleSubmitted, transaction]); + + return ( + + Seaport Fulfill Available Advanced Orders + +
+ + + Seaport Contract Address + + + + + + Listing IDs (comma separated) + + setListingIds(e.target.value)} + /> + + {transactionError} + + + + + Validate + + + Submit + + { isBuldingTransaction && } + +
+
+
+ ); +} + +export default SeaportFulfillAvailableAdvancedOrders; diff --git a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/index.ts b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/index.ts index 1053104dec..426d9af5d5 100644 --- a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/index.ts +++ b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/index.ts @@ -1,11 +1,13 @@ import TransferImx from './TransferImx'; import SpendingCapApproval from './SpendingCapApproval'; import NFTApproval from './NFTApproval'; +import SeaportFulfillAvailableAdvancedOrders from './SeaportFulfillAvailableAdvancedOrders'; const EthSendTransactionExamples = [ TransferImx, SpendingCapApproval, NFTApproval, + SeaportFulfillAvailableAdvancedOrders, ]; export default EthSendTransactionExamples; diff --git a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx index c3f7274306..4237098cfb 100644 --- a/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx +++ b/packages/passport/sdk-sample-app/src/context/ImmutableProvider.tsx @@ -8,8 +8,9 @@ import { production, sandbox, } from '@imtbl/x-client'; +import { Orderbook, OrderbookOverrides } from '@imtbl/orderbook'; import { Passport, PassportModuleConfiguration } from '@imtbl/passport'; -import { Environment, ImmutableConfiguration } from '@imtbl/config'; +import { Environment, ImmutableConfiguration, ModuleConfiguration } from '@imtbl/config'; import { AUDIENCE, LOGOUT_REDIRECT_URI, @@ -118,13 +119,44 @@ const getPassportConfig = (environment: EnvironmentNames): PassportModuleConfigu } }; +const getOrderbookConfig = (environment: EnvironmentNames): ModuleConfiguration => { + switch (environment) { + case EnvironmentNames.PRODUCTION: { + const baseConfig = new ImmutableConfiguration({ environment: Environment.PRODUCTION }); + return { + baseConfig, + }; + } + case EnvironmentNames.SANDBOX: { + const baseConfig = new ImmutableConfiguration({ environment: Environment.SANDBOX }); + return { + baseConfig, + }; + } + case EnvironmentNames.DEV: { + const baseConfig = new ImmutableConfiguration({ environment: Environment.SANDBOX }); + return { + baseConfig, + overrides: { + seaportContractAddress: '0xbA22c310787e9a3D74343B17AB0Ab946c28DFB52', + }, + }; + } + default: { + throw new Error('Invalid environment'); + } + } +}; + const ImmutableContext = createContext<{ passportClient: Passport, sdkClient: ImmutableX, + orderbookClient: Orderbook, environment: EnvironmentNames, setEnvironment?:(environment: EnvironmentNames) => void; }>({ sdkClient: new ImmutableX(getSdkConfig(EnvironmentNames.DEV)), + orderbookClient: new Orderbook(getOrderbookConfig(EnvironmentNames.DEV)), passportClient: new Passport(getPassportConfig(EnvironmentNames.DEV)), environment: EnvironmentNames.DEV, }); @@ -139,21 +171,26 @@ export function ImmutableProvider({ const [sdkClient, setSdkClient] = useState( useContext(ImmutableContext).sdkClient, ); + const [orderbookClient, setOrderbookClient] = useState( + useContext(ImmutableContext).orderbookClient, + ); const [passportClient, setPassportClient] = useState( useContext(ImmutableContext).passportClient, ); useEffect(() => { setSdkClient(new ImmutableX(getSdkConfig(environment))); + setOrderbookClient(new Orderbook(getOrderbookConfig(environment))); setPassportClient(new Passport(getPassportConfig(environment))); }, [environment]); const providerValues = useMemo(() => ({ sdkClient, + orderbookClient, passportClient, environment, setEnvironment, - }), [sdkClient, passportClient, environment, setEnvironment]); + }), [sdkClient, orderbookClient, passportClient, environment, setEnvironment]); return ( @@ -164,9 +201,17 @@ export function ImmutableProvider({ export function useImmutableProvider() { const { - sdkClient, passportClient, environment, setEnvironment, + sdkClient, + orderbookClient, + passportClient, + environment, + setEnvironment, } = useContext(ImmutableContext); return { - sdkClient, passportClient, environment, setEnvironment, + sdkClient, + orderbookClient, + passportClient, + environment, + setEnvironment, }; } diff --git a/samples/apps/ts-immutable-sample/yarn.lock b/samples/apps/ts-immutable-sample/yarn.lock index 48094140dc..134c5a224b 100644 --- a/samples/apps/ts-immutable-sample/yarn.lock +++ b/samples/apps/ts-immutable-sample/yarn.lock @@ -1196,7 +1196,7 @@ __metadata: "@imtbl/sdk@file:../../../sdk::locator=ts-immutable-sample%40workspace%3A.": version: 0.0.0 - resolution: "@imtbl/sdk@file:../../../sdk#../../../sdk::hash=d58b95&locator=ts-immutable-sample%40workspace%3A." + resolution: "@imtbl/sdk@file:../../../sdk#../../../sdk::hash=502a0e&locator=ts-immutable-sample%40workspace%3A." dependencies: "@0xsequence/abi": ^1.4.3 "@0xsequence/core": ^1.4.3 @@ -1245,7 +1245,7 @@ __metadata: peerDependencies: react: ^18.2.0 react-dom: ^18.2.0 - checksum: 1e06b047e5d89c569f91e6bc51cff823653de502bfe05f2376becb3cfe8c6a7af219895ce5d6157b188e5b22e41b0c0e191c775094adae1b8506acc031b92ab7 + checksum: 1bae1fe584e0cf7a92a3b4be98a13b73b6fc4bd81d8c098c829b7620af6036d94e989d689a266e3525babb31ecfa343f62e4f1aee91d57391f40dc2419662074 languageName: node linkType: hard @@ -7991,12 +7991,12 @@ __metadata: linkType: hard "follow-redirects@npm:^1.15.4": - version: 1.15.5 - resolution: "follow-redirects@npm:1.15.5" + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 5ca49b5ce6f44338cbfc3546823357e7a70813cecc9b7b768158a1d32c1e62e7407c944402a918ea8c38ae2e78266312d617dc68783fac502cbb55e1047b34ec + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index d09782a138..cd69393e00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2669,156 +2669,163 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/android-arm64@npm:0.19.7" +"@esbuild/aix-ppc64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/aix-ppc64@npm:0.20.2" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/android-arm64@npm:0.20.2" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@esbuild/android-arm@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/android-arm@npm:0.19.7" +"@esbuild/android-arm@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/android-arm@npm:0.20.2" conditions: os=android & cpu=arm languageName: node linkType: hard -"@esbuild/android-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/android-x64@npm:0.19.7" +"@esbuild/android-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/android-x64@npm:0.20.2" conditions: os=android & cpu=x64 languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/darwin-arm64@npm:0.19.7" +"@esbuild/darwin-arm64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/darwin-arm64@npm:0.20.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/darwin-x64@npm:0.19.7" +"@esbuild/darwin-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/darwin-x64@npm:0.20.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/freebsd-arm64@npm:0.19.7" +"@esbuild/freebsd-arm64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/freebsd-arm64@npm:0.20.2" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/freebsd-x64@npm:0.19.7" +"@esbuild/freebsd-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/freebsd-x64@npm:0.20.2" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-arm64@npm:0.19.7" +"@esbuild/linux-arm64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-arm64@npm:0.20.2" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-arm@npm:0.19.7" +"@esbuild/linux-arm@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-arm@npm:0.20.2" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-ia32@npm:0.19.7" +"@esbuild/linux-ia32@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-ia32@npm:0.20.2" conditions: os=linux & cpu=ia32 languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-loong64@npm:0.19.7" +"@esbuild/linux-loong64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-loong64@npm:0.20.2" conditions: os=linux & cpu=loong64 languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-mips64el@npm:0.19.7" +"@esbuild/linux-mips64el@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-mips64el@npm:0.20.2" conditions: os=linux & cpu=mips64el languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-ppc64@npm:0.19.7" +"@esbuild/linux-ppc64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-ppc64@npm:0.20.2" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-riscv64@npm:0.19.7" +"@esbuild/linux-riscv64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-riscv64@npm:0.20.2" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-s390x@npm:0.19.7" +"@esbuild/linux-s390x@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-s390x@npm:0.20.2" conditions: os=linux & cpu=s390x languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/linux-x64@npm:0.19.7" +"@esbuild/linux-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/linux-x64@npm:0.20.2" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/netbsd-x64@npm:0.19.7" +"@esbuild/netbsd-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/netbsd-x64@npm:0.20.2" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/openbsd-x64@npm:0.19.7" +"@esbuild/openbsd-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/openbsd-x64@npm:0.20.2" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/sunos-x64@npm:0.19.7" +"@esbuild/sunos-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/sunos-x64@npm:0.20.2" conditions: os=sunos & cpu=x64 languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/win32-arm64@npm:0.19.7" +"@esbuild/win32-arm64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/win32-arm64@npm:0.20.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/win32-ia32@npm:0.19.7" +"@esbuild/win32-ia32@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/win32-ia32@npm:0.20.2" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.19.7": - version: 0.19.7 - resolution: "@esbuild/win32-x64@npm:0.19.7" +"@esbuild/win32-x64@npm:0.20.2": + version: 0.20.2 + resolution: "@esbuild/win32-x64@npm:0.20.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3480,7 +3487,7 @@ __metadata: react-dom: ^18.2.0 react-router-dom: ^6.11.0 typescript: ^4.9.5 - vite: ^5.0.2 + vite: ^5.0.12 vite-plugin-node-polyfills: ^0.16.0 web-vitals: ^2.1.4 languageName: unknown @@ -6728,86 +6735,93 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.5.2" +"@rollup/rollup-android-arm-eabi@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.13.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-android-arm64@npm:4.5.2" +"@rollup/rollup-android-arm64@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-android-arm64@npm:4.13.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-darwin-arm64@npm:4.5.2" +"@rollup/rollup-darwin-arm64@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.13.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-darwin-x64@npm:4.5.2" +"@rollup/rollup-darwin-x64@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.13.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.5.2" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.13.0" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.5.2" +"@rollup/rollup-linux-arm64-gnu@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.13.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.5.2" +"@rollup/rollup-linux-arm64-musl@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.13.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.5.2" +"@rollup/rollup-linux-riscv64-gnu@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.13.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.13.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.5.2" +"@rollup/rollup-linux-x64-musl@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.13.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.5.2" +"@rollup/rollup-win32-arm64-msvc@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.13.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.5.2" +"@rollup/rollup-win32-ia32-msvc@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.13.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.5.2": - version: 4.5.2 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.5.2" +"@rollup/rollup-win32-x64-msvc@npm:4.13.0": + version: 4.13.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.13.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -9151,6 +9165,13 @@ __metadata: languageName: node linkType: hard +"@types/estree@npm:1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: dd8b5bed28e6213b7acd0fb665a84e693554d850b0df423ac8076cc3ad5823a6bc26b0251d080bdc545af83179ede51dd3f6fa78cad2c46ed1f29624ddf3e41a + languageName: node + linkType: hard + "@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^4.17.33": version: 4.17.35 resolution: "@types/express-serve-static-core@npm:4.17.35" @@ -15324,33 +15345,36 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.19.3": - version: 0.19.7 - resolution: "esbuild@npm:0.19.7" - dependencies: - "@esbuild/android-arm": 0.19.7 - "@esbuild/android-arm64": 0.19.7 - "@esbuild/android-x64": 0.19.7 - "@esbuild/darwin-arm64": 0.19.7 - "@esbuild/darwin-x64": 0.19.7 - "@esbuild/freebsd-arm64": 0.19.7 - "@esbuild/freebsd-x64": 0.19.7 - "@esbuild/linux-arm": 0.19.7 - "@esbuild/linux-arm64": 0.19.7 - "@esbuild/linux-ia32": 0.19.7 - "@esbuild/linux-loong64": 0.19.7 - "@esbuild/linux-mips64el": 0.19.7 - "@esbuild/linux-ppc64": 0.19.7 - "@esbuild/linux-riscv64": 0.19.7 - "@esbuild/linux-s390x": 0.19.7 - "@esbuild/linux-x64": 0.19.7 - "@esbuild/netbsd-x64": 0.19.7 - "@esbuild/openbsd-x64": 0.19.7 - "@esbuild/sunos-x64": 0.19.7 - "@esbuild/win32-arm64": 0.19.7 - "@esbuild/win32-ia32": 0.19.7 - "@esbuild/win32-x64": 0.19.7 +"esbuild@npm:^0.20.1": + version: 0.20.2 + resolution: "esbuild@npm:0.20.2" + dependencies: + "@esbuild/aix-ppc64": 0.20.2 + "@esbuild/android-arm": 0.20.2 + "@esbuild/android-arm64": 0.20.2 + "@esbuild/android-x64": 0.20.2 + "@esbuild/darwin-arm64": 0.20.2 + "@esbuild/darwin-x64": 0.20.2 + "@esbuild/freebsd-arm64": 0.20.2 + "@esbuild/freebsd-x64": 0.20.2 + "@esbuild/linux-arm": 0.20.2 + "@esbuild/linux-arm64": 0.20.2 + "@esbuild/linux-ia32": 0.20.2 + "@esbuild/linux-loong64": 0.20.2 + "@esbuild/linux-mips64el": 0.20.2 + "@esbuild/linux-ppc64": 0.20.2 + "@esbuild/linux-riscv64": 0.20.2 + "@esbuild/linux-s390x": 0.20.2 + "@esbuild/linux-x64": 0.20.2 + "@esbuild/netbsd-x64": 0.20.2 + "@esbuild/openbsd-x64": 0.20.2 + "@esbuild/sunos-x64": 0.20.2 + "@esbuild/win32-arm64": 0.20.2 + "@esbuild/win32-ia32": 0.20.2 + "@esbuild/win32-x64": 0.20.2 dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true "@esbuild/android-arm": optional: true "@esbuild/android-arm64": @@ -15397,7 +15421,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: a5d979224d47ae0cc6685447eb8f1ceaf7b67f5eaeaac0246f4d589ff7d81b08e4502a6245298d948f13e9b571ac8556a6d83b084af24954f762b1cfe59dbe55 + checksum: bc88050fc1ca5c1bd03648f9979e514bdefb956a63aa3974373bb7b9cbac0b3aac9b9da1b5bdca0b3490e39d6b451c72815dbd6b7d7f978c91fbe9c9e9aa4e4c languageName: node linkType: hard @@ -21867,6 +21891,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" + bin: + nanoid: bin/nanoid.cjs + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 + languageName: node + linkType: hard + "napi-wasm@npm:^1.1.0": version: 1.1.0 resolution: "napi-wasm@npm:1.1.0" @@ -24070,7 +24103,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.31, postcss@npm:^8.4.31": +"postcss@npm:8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" dependencies: @@ -24102,6 +24135,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.4.36": + version: 8.4.38 + resolution: "postcss@npm:8.4.38" + dependencies: + nanoid: ^3.3.7 + picocolors: ^1.0.0 + source-map-js: ^1.2.0 + checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 + languageName: node + linkType: hard + "posthtml-parser@npm:^0.10.1": version: 0.10.2 resolution: "posthtml-parser@npm:0.10.2" @@ -25583,22 +25627,24 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.2.0": - version: 4.5.2 - resolution: "rollup@npm:4.5.2" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.5.2 - "@rollup/rollup-android-arm64": 4.5.2 - "@rollup/rollup-darwin-arm64": 4.5.2 - "@rollup/rollup-darwin-x64": 4.5.2 - "@rollup/rollup-linux-arm-gnueabihf": 4.5.2 - "@rollup/rollup-linux-arm64-gnu": 4.5.2 - "@rollup/rollup-linux-arm64-musl": 4.5.2 - "@rollup/rollup-linux-x64-gnu": 4.5.2 - "@rollup/rollup-linux-x64-musl": 4.5.2 - "@rollup/rollup-win32-arm64-msvc": 4.5.2 - "@rollup/rollup-win32-ia32-msvc": 4.5.2 - "@rollup/rollup-win32-x64-msvc": 4.5.2 +"rollup@npm:^4.13.0": + version: 4.13.0 + resolution: "rollup@npm:4.13.0" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.13.0 + "@rollup/rollup-android-arm64": 4.13.0 + "@rollup/rollup-darwin-arm64": 4.13.0 + "@rollup/rollup-darwin-x64": 4.13.0 + "@rollup/rollup-linux-arm-gnueabihf": 4.13.0 + "@rollup/rollup-linux-arm64-gnu": 4.13.0 + "@rollup/rollup-linux-arm64-musl": 4.13.0 + "@rollup/rollup-linux-riscv64-gnu": 4.13.0 + "@rollup/rollup-linux-x64-gnu": 4.13.0 + "@rollup/rollup-linux-x64-musl": 4.13.0 + "@rollup/rollup-win32-arm64-msvc": 4.13.0 + "@rollup/rollup-win32-ia32-msvc": 4.13.0 + "@rollup/rollup-win32-x64-msvc": 4.13.0 + "@types/estree": 1.0.5 fsevents: ~2.3.2 dependenciesMeta: "@rollup/rollup-android-arm-eabi": @@ -25615,6 +25661,8 @@ __metadata: optional: true "@rollup/rollup-linux-arm64-musl": optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true "@rollup/rollup-linux-x64-gnu": optional: true "@rollup/rollup-linux-x64-musl": @@ -25629,7 +25677,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 0cf68670556753c290e07492c01ea7ce19b7d178b903a518c908f7f9a90c0abee4e91c3089849f05a47040fd59c5ac0f10a58e4ee704cf7b03b24667e72c368a + checksum: c2c35bee0a71ceb0df37c170c2b73a500bf9ebdffb747487d77831348603d50dcfcdd9d0a937362d3a87edda559c9d1e017fba2d75f05f0c594634d9b8dde9a4 languageName: node linkType: hard @@ -26352,6 +26400,13 @@ __metadata: languageName: node linkType: hard +"source-map-js@npm:^1.2.0": + version: 1.2.0 + resolution: "source-map-js@npm:1.2.0" + checksum: 791a43306d9223792e84293b00458bf102a8946e7188f3db0e4e22d8d530b5f80a4ce468eb5ec0bf585443ad55ebbd630bf379c98db0b1f317fd902500217f97 + languageName: node + linkType: hard + "source-map-loader@npm:^3.0.0": version: 3.0.2 resolution: "source-map-loader@npm:3.0.2" @@ -28715,14 +28770,14 @@ __metadata: languageName: node linkType: hard -"vite@npm:^5.0.2": - version: 5.0.2 - resolution: "vite@npm:5.0.2" +"vite@npm:^5.0.12": + version: 5.2.2 + resolution: "vite@npm:5.2.2" dependencies: - esbuild: ^0.19.3 + esbuild: ^0.20.1 fsevents: ~2.3.3 - postcss: ^8.4.31 - rollup: ^4.2.0 + postcss: ^8.4.36 + rollup: ^4.13.0 peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 less: "*" @@ -28751,7 +28806,7 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 28784e10ae40f20afdafb81f09439800b2ba48b4e9f14720cb97a8bc47537369b91dc0d1ea955543dd5a443277d4af4718df9e95a9062276167c428fbc931566 + checksum: ef20480a0d4145f05378d33d295917995679c75205c19872346f18ad847cca8ac90794b7cfb280f787c0db60a90afcc1ae2c2e5ccedfe4751fb4a3c0ff07be69 languageName: node linkType: hard